diff --git a/.travis.yml b/.travis.yml
index d4511c6..65a2959 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,11 @@
language: node_js
node_js:
- "6"
+before_install:
+ - npm install -g babel-cli rimraf
+ - cd redux-saga-router
+ - npm install
+ - cd ..
script:
- npm test -- --coverage
- npm build
diff --git a/package.json b/package.json
index 2627531..f976110 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tfoosball",
- "version": "2.0.1",
+ "version": "2.1.1",
"private": true,
"devDependencies": {
"autoprefixer": "6.5.1",
@@ -62,21 +62,25 @@
},
"dependencies": {
"babel-polyfill": "^6.20.0",
- "chart.js": "^2.2.2",
+ "chart.js": "^2.5.0",
+ "es6-error": "^4.0.2",
"md5": "^2.2.1",
"promise-window": "^1.1.0",
"randy": "^1.5.1",
- "react": "^15.4.1",
+ "react": "^15.4.2",
"react-bootstrap": "^0.30.7",
- "react-dom": "^15.4.1",
- "react-redux": "^4.4.6",
- "react-router": "^2.8.1",
+ "react-dom": "^15.4.2",
+ "react-fontawesome": "^1.5.0",
+ "react-redux": "^5.0.3",
+ "react-router": "^3.0.2",
"react-router-bootstrap": "^0.23.1",
"redux": "^3.6.0",
+ "redux-form": "^6.6.1",
"redux-saga": "^0.14.3",
- "redux-saga-router": "^2.0.0"
+ "redux-saga-router": "file:./redux-saga-router"
},
"scripts": {
+ "heroku-prebuild": "npm install -g babel-cli rimraf && cd redux-saga-router && npm install && cd ..",
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom"
diff --git a/redux-saga-router/.babelrc b/redux-saga-router/.babelrc
new file mode 100644
index 0000000..57488dd
--- /dev/null
+++ b/redux-saga-router/.babelrc
@@ -0,0 +1,18 @@
+{
+ "presets": [
+ ["es2015", { "loose": true }],
+ "react"
+ ],
+ "plugins": [
+ "transform-class-properties",
+ "transform-export-extensions"
+ ],
+ "env": {
+ "test": {
+ "plugins": [
+ "transform-async-to-generator",
+ "transform-object-rest-spread"
+ ]
+ }
+ }
+}
diff --git a/redux-saga-router/.eslintrc.json b/redux-saga-router/.eslintrc.json
new file mode 100644
index 0000000..eb4ae9e
--- /dev/null
+++ b/redux-saga-router/.eslintrc.json
@@ -0,0 +1,16 @@
+{
+ "parser": "babel-eslint",
+ "extends": [
+ "airbnb",
+ "plugin:import/errors",
+ "plugin:import/warnings"
+ ],
+ "settings": {
+ "import/resolver": "node"
+ },
+ "rules": {
+ "arrow-parens": 0,
+ "react/forbid-prop-types": 0,
+ "react/jsx-filename-extension": 0
+ }
+}
diff --git a/redux-saga-router/.gitignore b/redux-saga-router/.gitignore
new file mode 100644
index 0000000..90b71b3
--- /dev/null
+++ b/redux-saga-router/.gitignore
@@ -0,0 +1,38 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules
+jspm_packages
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
+lib/
diff --git a/redux-saga-router/.travis.yml b/redux-saga-router/.travis.yml
new file mode 100644
index 0000000..41d9a6f
--- /dev/null
+++ b/redux-saga-router/.travis.yml
@@ -0,0 +1,12 @@
+language: node_js
+node_js:
+ - "4"
+ - "5"
+ - "6"
+branches:
+ only:
+ - master
+ - /^greenkeeper.*$/
+script:
+ - npm run lint
+ - npm test
diff --git a/redux-saga-router/CHANGELOG.md b/redux-saga-router/CHANGELOG.md
new file mode 100644
index 0000000..650b1ef
--- /dev/null
+++ b/redux-saga-router/CHANGELOG.md
@@ -0,0 +1,79 @@
+## v2.0.0
+
+### Spawned Route Sagas
+
+While this is a new major version, there aren't any directly noticeable breaking
+changes. Route sagas used to be invoked via the `call` effect. Unfortunately,
+`call` is blocking, so long running sagas could prevent other route sagas from
+immediately running if the route changed. Another issue is that if a route saga
+happened to `fork` or `spawn` a sub saga, there was no way to know when the
+route changed to perform cleanup such as cancelling the forked sub saga.
+
+Thanks to [@victorchabbert](https://github.com/victorchabbert), route sagas are
+now spawned via the `spawn` effect. This creates a detached, forked task for
+each route saga when its route triggers. Now, when the route changes, Redux Saga
+Router will cancel any currently running route saga task, giving you the
+opportunity to perform cleanup in your route saga or sub sagas.
+
+```js
+const delay = time => new Promise(resolve => setTimeout(resolve, time));
+
+function* autoSaveSaga() {
+ try {
+ while (true) {
+ const data = yield select(getData);
+ yield call(Api.saveEditor, data);
+ yield call(delay, 5000);
+ }
+ } finally {
+ if (yield cancelled()) {
+ // do some other cleanup
+ }
+ }
+}
+
+const routes = {
+ '/editor': function* editorSaga() {
+ try {
+ yield fork(autoSaveSaga);
+ } finally {
+ if (yield cancelled()) {
+ // do some cleanup
+ }
+ }
+ },
+};
+
+function* mainSaga() {
+ yield* router(history, routes);
+}
+```
+
+Because the behavior of route sagas has slightly changed, this could impact your
+application. For example, if you have a route saga that fetches some data from
+an API and the route suddenly changes, Redux Saga Router used to wait for the
+data to come back and the currently running saga to complete before starting the
+new route saga. Now, Redux Saga Router will cancel the running saga even if the
+data hasn't come back yet. This new behavior actually makes more sense because
+there is no reason to complete fetching the data or delay letting the new route
+saga run. If you used to depend on the previous behavior, though, then Redux
+Saga Router could break your app. Therefore, this release was a major bump so
+you can ensure your route sagas are safe before upgrading.
+
+---
+
+## v1.1.0
+
+- Support redux-saga 0.14.x, 0.13.x, and 0.12.x
+
+---
+
+## v1.0.1
+
+- Internal implementation tweaks
+
+---
+
+## v1.0.0
+
+- Initial Release
diff --git a/redux-saga-router/LICENSE b/redux-saga-router/LICENSE
new file mode 100644
index 0000000..dc1199b
--- /dev/null
+++ b/redux-saga-router/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Jeremy Fairbank
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/redux-saga-router/README.md b/redux-saga-router/README.md
new file mode 100644
index 0000000..339773a
--- /dev/null
+++ b/redux-saga-router/README.md
@@ -0,0 +1,376 @@
+# Redux Saga Router
+
+[![Travis branch](https://img.shields.io/travis/jfairbank/redux-saga-router/master.svg?style=flat-square)](https://travis-ci.org/jfairbank/redux-saga-router)
+[![npm](https://img.shields.io/npm/v/redux-saga-router.svg?style=flat-square)](https://www.npmjs.com/package/redux-saga-router)
+
+#### A router for Redux Saga
+
+Redux Saga Router gives you a saga for handling clientside routes in your Redux
+Saga application. This affords you a perfect way to manage side effects or
+dispatch Redux actions in response to route changes.
+
+## Table of Contents
+
+- [Install](#install)
+- [Usage](#usage)
+- [Behavior](#behavior)
+- [Pattern matching](#pattern-matching)
+- [Options](#options)
+- [Navigation](#navigation)
+ - [Hash History](#hash-history)
+ - [Browser History](#browser-history)
+ - [Browser History with React](#browser-history-with-react)
+ - [React Router](#react-router)
+
+## Install
+
+ $ npm install --save redux-saga-router
+
+## Usage
+
+Redux Saga Router comes equipped with a `router` saga and two history
+strategies, `createBrowserHistory` and `createHashHistory`.
+
+The `router` saga expects a history object and a routes object with key-value
+pairs of route paths to other sagas (or just functions). It also takes optional
+third argument with [additional options](#options).
+
+To create a history object, you can use `createBrowserHistory` or
+`createHashHistory`. `createBrowserHistory` uses HTML5 `pushState` while
+`createHashHistory` uses (you guessed it) hashes, which is perfect for older
+browsers. These two history creation functions in fact come from the
+[history](https://github.com/mjackson/history) library.
+
+```js
+// saga.js
+
+// ES2015
+import { router, createBrowserHistory } from 'redux-saga-router';
+
+// Or CJS
+const rsr = require('redux-saga-router');
+const router = rsr.router;
+const createBrowserHistory = rsr.createBrowserHistory;
+
+const history = createBrowserHistory();
+
+const options = {
+ // A saga to be spawned in parallel on every location change
+ *beforeRouteChange() {
+ yield put(clearNotifications());
+ }
+
+ // Should match all applicable rules?
+ shouldFallThrough: true,
+}
+
+const routes = {
+ // Method syntax
+ *'/users'() {
+ const users = yield call(fetchUsers);
+ yield put(setUsers(users));
+ },
+
+ // Or long form with function expression
+ '/users/:id': function* userSaga({ id }) {
+ const user = yield call(fetchUser, id);
+ yield put(setCurrentUser(user));
+ },
+};
+
+function* mainSaga() {
+ const data = yield call(fetchInitialData);
+
+ yield put(ready(data));
+
+ yield* router(history, routes, options); // [options] is not required
+}
+```
+
+## Behavior
+
+Redux Saga Router will `spawn` the matching route saga. When the location
+changes, the current running saga will be cancelled. As such, you might want to
+[clean up](https://redux-saga.github.io/redux-saga/docs/advanced/TaskCancellation.html)
+your saga in that event.
+
+If you wish to avoid your saga's being cancelled, you can `spawn` a sub saga in
+your route saga like the following:
+
+```js
+const routes = {
+ *'/'() {
+ yield spawn(subSaga);
+ },
+
+ // Or long form with function expression
+ '/': function* homeSaga() {
+ yield spawn(subSaga);
+ },
+};
+```
+
+In the event of an unhandled error occurring in one of your sagas, the error
+will stop the running saga and will not propagate to the router. That means that
+your application will continue to function when you hit other routes. That also
+means you should ensure you handle any potential errors that could occur in your
+route sagas.
+
+## Pattern matching
+
+The router path may consist of multiple patterns. Examples:
+
+### Exact matching
+
+```
+const routes = {
+ // it will be matched only if location is equal to "/foo"
+ '/foo': saga,
+}
+```
+
+### Named parameters
+
+```
+const routes = {
+ // it will be matched by locations like "/bar/42baz" but NOT "/bar/"
+ '/bar/:id': saga,
+}
+```
+
+### Optional named parameters
+
+```
+const routes = {
+ // it will be matched by both "/bar/42baz" AND "/bar/"
+ '/bar/:id?': saga,
+
+ // a period before optional parameter is optional too, see "/bar/LICENSE", "/bar/README.md"
+ '/bar/:fname.:ext?': saga,
+}
+```
+
+### Catch-all pattern
+
+```
+const routes = {
+ // it will be matched based only on a prefix, e.g. "/bar/", "/bar/baz/foo/"
+ '/bar/*': saga,
+}
+```
+
+## Options
+
+The `router` saga may also take a third argument - an `options` object - which
+allows to specify additional behaviour as described below:
+
+Key | Description
+--------------------|--------------------------------------------------------
+`beforeRouteChange` | A saga spawned on any location change, before other saga
+`shouldFallThrough` | Determines whether route matching should take into account all matching rules
+
+
+## Navigation
+
+### Hash History
+If you use hash history, then navigation will work right out of the box.
+
+```js
+import { router, createHashHistory } from 'redux-saga-router';
+
+const history = createHashHistory();
+
+const routes = {
+ // ...
+};
+
+function* mainSaga() {
+ const data = yield call(fetchInitialData);
+
+ yield put(ready(data));
+
+ yield* router(history, routes);
+}
+```
+
+```html
+
+
+
+```
+
+### Browser History
+
+Browser history depends on `pushState` changes, so you'll need a method for
+making anchor tags change history state instead of actually exhibiting their
+default behavior. Also, if you're building a single-page application, your
+server will need to support your client side routes to ensure your app loads
+properly.
+
+```js
+import { router, createBrowserHistory } from 'redux-saga-router';
+
+const history = createBrowserHistory();
+
+// This is a naive example, so you might want something more robust
+document.addEventListener('click', (e) => {
+ const el = e.target;
+
+ if (el.tagName === 'A') {
+ e.preventDefault();
+ history.push(el.pathname);
+ }
+});
+
+const routes = {
+ // ...
+};
+
+function* mainSaga() {
+ // ...
+}
+```
+
+### Browser History with React
+
+If you're using React in your application, then Redux Saga Router does export a
+higher-order component (HOC) that allows you to abstract away dealing with
+`pushState` manually. You can import the `createLink` HOC from
+`redux-saga-router/react` to create a `Link` component similar to what's
+available in React Router. Just pass in your `history` object to the
+`createLink` function to create the `Link` component. You'll probably want a
+separate file in your application for exporting your `history` object and your
+`Link` component.
+
+```js
+// history.js
+
+import { createBrowserHistory } from 'redux-saga-router';
+import { createLink } from 'redux-saga-router/react'
+
+const history = createBrowserHistory();
+
+export const Link = createLink(history);
+export { history };
+```
+
+```js
+// saga.js
+
+import { router } from 'redux-saga-router';
+import { history } from './history';
+
+const routes = {
+ // ...
+};
+
+function* mainSaga() {
+ const data = yield call(fetchInitialData);
+
+ yield put(ready(data));
+
+ yield* router(history, routes);
+}
+```
+
+```jsx
+// App.js
+
+import React from 'react';
+import { Link } from './history';
+
+export default function App() {
+ return (
+
+
+ Users
+ A Specific User
+
+
+ );
+}
+```
+
+### React Router
+
+Redux Saga Router can also work in tandem with React Router! Instead of using
+one of Redux Saga Router's history creation functions, just use your history
+object from React Router.
+
+**NOTE:** examples below are for React Router v2/3 for now.
+
+```js
+// saga.js
+
+import { router } from 'redux-saga-router';
+import { browserHistory as history } from 'react-router';
+
+const routes = {
+ // ...
+};
+
+export default function* mainSaga() {
+ const data = yield call(fetchInitialData);
+
+ yield put(ready(data));
+
+ yield* router(history, routes);
+}
+```
+
+```jsx
+// App.js
+
+import React from 'react';
+import { Link } from 'react-router';
+
+export default function App({ children }) {
+ return (
+
+
+
+ Users
+ A Specific User
+
+
+
+
+ {children}
+
+
+ );
+}
+```
+
+```jsx
+import React from 'react';
+import { render } from 'react-dom';
+import { applyMiddleware, createStore } from 'redux';
+import createSagaMiddleware from 'redux-saga';
+import { Router, Route, browserHistory as history } from 'react-router';
+import App from './App';
+import Users from './Users';
+import User from './User';
+import mainSaga from './saga';
+
+function reducer() {
+ return {};
+}
+
+const sagaMiddleware = createSagaMiddleware();
+const store = createStore(reducer, applyMiddleware(sagaMiddleware));
+
+sagaMiddleware.run(mainSaga);
+
+render((
+
+
+
+
+
+
+), document.getElementById('main'));
+```
diff --git a/redux-saga-router/__tests__/.eslintrc.json b/redux-saga-router/__tests__/.eslintrc.json
new file mode 100644
index 0000000..d3c3d01
--- /dev/null
+++ b/redux-saga-router/__tests__/.eslintrc.json
@@ -0,0 +1,21 @@
+{
+ "parser": "babel-eslint",
+ "env": {
+ "jest": true
+ },
+ "extends": [
+ "airbnb",
+ "plugin:import/errors",
+ "plugin:import/warnings"
+ ],
+ "settings": {
+ "import/resolver": "node"
+ },
+ "rules": {
+ "arrow-parens": 0,
+ "no-underscore-dangle": 0,
+ "import/no-extraneous-dependencies": 0,
+ "react/forbid-prop-types": 0,
+ "react/jsx-filename-extension": 0
+ }
+}
diff --git a/redux-saga-router/__tests__/buildRouteMatcher.test.js b/redux-saga-router/__tests__/buildRouteMatcher.test.js
new file mode 100644
index 0000000..90a34b4
--- /dev/null
+++ b/redux-saga-router/__tests__/buildRouteMatcher.test.js
@@ -0,0 +1,61 @@
+import buildRouteMatcher from '../src/buildRouteMatcher';
+
+test('creates a route matcher', () => {
+ const rootRoute = () => 'root route';
+ const fooRoute = () => 'foo route';
+
+ const routeMatcher = buildRouteMatcher({
+ '/': rootRoute,
+ '/foo': fooRoute,
+ });
+
+ const rootMatch = routeMatcher.match('/');
+ const fooMatch = routeMatcher.match('/foo');
+
+ expect(rootMatch).not.toBe(null);
+ expect(fooMatch).not.toBe(null);
+
+ expect(rootMatch.action).toBe(rootRoute);
+ expect(fooMatch.action).toBe(fooRoute);
+});
+
+test('recognizes fall-through pattern', () => {
+ const rootRoute = () => 'root route';
+ const fooRoute = () => 'foo route';
+
+ const routeMatcher = buildRouteMatcher({
+ '/*': rootRoute,
+ '/foo': fooRoute,
+ });
+
+ const match1 = routeMatcher.match('/foo');
+ const match2 = match1.next();
+
+ expect(match1).not.toBe(null);
+ expect(match2).not.toBe(null);
+
+ expect(match1.action).toBe(rootRoute);
+ expect(match2.action).toBe(fooRoute);
+});
+
+test('handles params', () => {
+ const fooRoute = ({ id }) => `got ${id}`;
+ const barRoute = ({ id, otherId }) => `${id} : ${otherId}`;
+
+ const routeMatcher = buildRouteMatcher({
+ '/foo/:id': fooRoute,
+ '/bar/:id/person/:otherId': barRoute,
+ });
+
+ const fooMatch = routeMatcher.match('/foo/42');
+ const barMatch = routeMatcher.match('/bar/20/person/abcd-1234');
+
+ expect(fooMatch).not.toBe(null);
+ expect(barMatch).not.toBe(null);
+
+ expect(fooMatch.action).toBe(fooRoute);
+ expect(barMatch.action).toBe(barRoute);
+
+ expect(fooMatch.action(fooMatch.params)).toBe('got 42');
+ expect(barMatch.action(barMatch.params)).toBe('20 : abcd-1234');
+});
diff --git a/redux-saga-router/__tests__/createHistoryChannel.test.js b/redux-saga-router/__tests__/createHistoryChannel.test.js
new file mode 100644
index 0000000..fc8b5b3
--- /dev/null
+++ b/redux-saga-router/__tests__/createHistoryChannel.test.js
@@ -0,0 +1,99 @@
+import createHistoryChannel from '../src/createHistoryChannel';
+
+function createOldHistory(initialLocation) {
+ let listener = null;
+
+ return {
+ getCurrentLocation: () => initialLocation,
+
+ listen(fn) {
+ listener = fn;
+
+ return () => {
+ listener = null;
+ };
+ },
+
+ emit(location) {
+ listener(location);
+ },
+ };
+}
+
+function createHistory(initialLocation) {
+ let listener = null;
+
+ return {
+ location: initialLocation,
+
+ listen(fn) {
+ listener = fn;
+
+ return () => {
+ listener = null;
+ };
+ },
+
+ emit(location) {
+ listener(location);
+ },
+ };
+}
+
+const defaultLocation = {
+ pathname: '/foo',
+};
+
+test('gets initial location from getCurrentLocation if available', () => {
+ const history = createOldHistory(defaultLocation);
+ const channel = createHistoryChannel(history);
+ const spy = jest.fn();
+
+ channel.take(spy);
+
+ expect(spy).toHaveBeenCalledTimes(1);
+ expect(spy.mock.calls[0][0]).toEqual(defaultLocation);
+});
+
+test('gets initial location from history.location if available', () => {
+ const history = createHistory(defaultLocation);
+ const channel = createHistoryChannel(history);
+ const spy = jest.fn();
+
+ channel.take(spy);
+
+ expect(spy).toHaveBeenCalledTimes(1);
+ expect(spy.mock.calls[0][0]).toEqual(defaultLocation);
+});
+
+test('gets initial location via listening', () => {
+ const history = createHistory();
+ const channel = createHistoryChannel(history);
+ const spy = jest.fn();
+
+ channel.take(spy);
+
+ history.emit(defaultLocation);
+
+ expect(spy).toHaveBeenCalledTimes(1);
+ expect(spy.mock.calls[0][0]).toEqual(defaultLocation);
+});
+
+test('triggers more location changes', () => {
+ const newLocation = {
+ pathname: '/bar',
+ };
+
+ const history = createHistory(defaultLocation);
+ const channel = createHistoryChannel(history);
+ const spy = jest.fn();
+
+ channel.take(spy);
+ channel.take(spy);
+
+ history.emit(newLocation);
+
+ expect(spy).toHaveBeenCalledTimes(2);
+ expect(spy.mock.calls[0][0]).toEqual(defaultLocation);
+ expect(spy.mock.calls[1][0]).toEqual(newLocation);
+});
diff --git a/redux-saga-router/__tests__/router.test.js b/redux-saga-router/__tests__/router.test.js
new file mode 100644
index 0000000..f4442f5
--- /dev/null
+++ b/redux-saga-router/__tests__/router.test.js
@@ -0,0 +1,247 @@
+/* eslint no-console: ["error", { allow: ["error"] }] */
+import { eventChannel } from 'redux-saga';
+import { put, spawn } from 'redux-saga/effects';
+import { createMockTask } from 'redux-saga/lib/utils';
+import testSaga from 'redux-saga-test-plan';
+import router from '../src/router';
+
+const initialLocation = {
+ pathname: '/',
+};
+
+const history = {
+ location: initialLocation,
+ listen() {},
+};
+
+const fakeErrorWithoutStack = {
+ name: 'Error',
+ message: 'an error',
+};
+
+const fakeError = {
+ ...fakeErrorWithoutStack,
+ stack: '1234',
+};
+
+const mockBeforeRouteChange = createMockTask();
+
+function* fooSaga() {
+ yield put({ type: 'FOO' });
+}
+
+function* barSaga({ id }) {
+ yield put({ type: 'BAR', payload: id });
+}
+
+function* barDetailsSaga({ id }) {
+ yield put({ type: 'BAR_DETAILS', payload: id });
+}
+
+function* bazSaga({ id, otherId }) {
+ yield put({ type: 'BAZ', payload: [id, otherId] });
+}
+
+function* beforeAllSaga(params) {
+ yield put({ type: 'ALL', payload: params });
+}
+
+function* errorSaga() {
+ yield put({ type: 'ERROR' });
+ throw fakeError;
+}
+
+const routes = {
+ '/foo': fooSaga,
+ '/bar/:id/*': barSaga,
+ '/bar/:id/details': barDetailsSaga,
+ '/baz/:id/quux/:otherId': bazSaga,
+ '/error': errorSaga,
+};
+
+const options1 = {
+ matchAll: true,
+};
+
+const options2 = {
+ beforeRouteChange: beforeAllSaga,
+};
+
+const fakeChannel = eventChannel(() => () => {});
+
+test('router', () => {
+ testSaga(router, history, routes)
+ .next() // init
+ .next(fakeChannel) // listen
+ .next(initialLocation) // no match and listen
+
+ .next({ pathname: '/foo' })
+ .parallel([
+ spawn(fooSaga, {}),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/bar/42/' })
+ .parallel([
+ spawn(barSaga, { id: '42' }),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/hello' }) // no match and listen
+
+ .next({ pathname: '/baz/20/quux/abcd-1234' })
+ .parallel([
+ spawn(bazSaga, { id: '20', otherId: 'abcd-1234' }),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/error' })
+ .parallel([
+ spawn(errorSaga, {}),
+ ])
+ .throw(fakeError) // simulate error in route
+ .call(
+ [console, console.error],
+ 'Redux Saga Router: Unhandled Error in route "/error":\nan error\n1234'
+ )
+
+ .next() // listen
+ .next({ pathname: '/foo' })
+ .parallel([
+ spawn(fooSaga, {}),
+ ])
+
+ .next() // listen
+ .throw(fakeError) // simulate error while listening
+ .call(
+ [console, console.error],
+ 'Redux Saga Router: Unexpected Error while listening for route:\nan error\n1234'
+ )
+
+ .next() // listen
+ .next({ pathname: '/error' })
+ .parallel([
+ spawn(errorSaga, {}),
+ ])
+ .throw(fakeErrorWithoutStack) // simulate error when stack not available
+ .call(
+ [console, console.error],
+ 'Redux Saga Router: Unhandled Error in route "/error":\nan error'
+ )
+
+ .finish()
+ .isDone()
+
+ .restart()
+ .finish(42)
+ .returns(42);
+});
+
+test('router with fallThrough', () => {
+ testSaga(router, history, routes, options1)
+ .next() // init
+ .next(fakeChannel) // listen
+ .next(initialLocation) // no match and listen
+
+ .next({ pathname: '/foo' })
+ .parallel([
+ spawn(fooSaga, {}),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/bar/42/' })
+ .parallel([
+ spawn(barSaga, { id: '42' }),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/bar/42/details' })
+ .parallel([
+ spawn(barSaga, { id: '42' }),
+ spawn(barDetailsSaga, { id: '42' }),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/hello' }) // no match and listen
+
+ .next({ pathname: '/baz/20/quux/abcd-1234' })
+ .parallel([
+ spawn(bazSaga, { id: '20', otherId: 'abcd-1234' }),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/error' })
+ .parallel([
+ spawn(errorSaga, {}),
+ ])
+ .throw(fakeError) // simulate error in route
+ .call(
+ [console, console.error],
+ 'Redux Saga Router: Unhandled Error in route "/error":\nan error\n1234'
+ )
+
+ .next() // listen
+ .next({ pathname: '/foo' })
+ .parallel([
+ spawn(fooSaga, {}),
+ ])
+
+ .next() // listen
+ .throw(fakeError) // simulate error while listening
+ .call(
+ [console, console.error],
+ 'Redux Saga Router: Unexpected Error while listening for route:\nan error\n1234'
+ )
+
+ .next() // listen
+ .next({ pathname: '/error' })
+ .parallel([
+ spawn(errorSaga, {}),
+ ])
+ .throw(fakeErrorWithoutStack) // simulate error when stack not available
+ .call(
+ [console, console.error],
+ 'Redux Saga Router: Unhandled Error in route "/error":\nan error'
+ )
+
+ .finish()
+ .isDone()
+
+ .restart()
+ .finish(42)
+ .returns(42);
+});
+
+test('router with beforeRouteChange', () => {
+ testSaga(router, history, routes, options2)
+ .next() // init
+ .next(fakeChannel) // listen
+ .next(initialLocation) // no match and listen
+ .next({ pathname: '/foo' })
+ .spawn(beforeAllSaga, {})
+ .next(mockBeforeRouteChange)
+ .join(mockBeforeRouteChange)
+ .next()
+ .parallel([
+ spawn(fooSaga, {}),
+ ])
+
+ .next() // listen
+ .next({ pathname: '/hello' }) // no match and listen
+
+ .next({ pathname: '/baz/20/quux/abcd-1234' })
+ .spawn(beforeAllSaga, { id: '20', otherId: 'abcd-1234' })
+ .next(mockBeforeRouteChange)
+ .join(mockBeforeRouteChange)
+ .next()
+ .parallel([
+ spawn(bazSaga, { id: '20', otherId: 'abcd-1234' }),
+ ])
+
+ .finish()
+ .isDone()
+
+ .restart()
+ .finish(42)
+ .returns(42);
+});
diff --git a/redux-saga-router/package.json b/redux-saga-router/package.json
new file mode 100644
index 0000000..a13a4b8
--- /dev/null
+++ b/redux-saga-router/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "redux-saga-router",
+ "version": "2.1.0",
+ "description": "A router for Redux Saga",
+ "main": "lib/index.js",
+ "files": [
+ "react.js",
+ "lib",
+ "src"
+ ],
+ "scripts": {
+ "build": "babel src --out-dir lib",
+ "clean": "rimraf lib",
+ "lint": "eslint src __tests__",
+ "prepublish": "npm run clean && npm run build",
+ "test": "jest"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jfairbank/redux-saga-router.git"
+ },
+ "keywords": [
+ "redux",
+ "redux-saga",
+ "saga",
+ "router",
+ "routing",
+ "history"
+ ],
+ "author": "Jeremy Fairbank (http://jeremyfairbank.com)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jfairbank/redux-saga-router/issues"
+ },
+ "homepage": "https://github.com/jfairbank/redux-saga-router#readme",
+ "dependencies": {
+ "fsm-iterator": "^1.0.0",
+ "history": "^4.3.0",
+ "ruta3": "^2.0.1"
+ },
+ "devDependencies": {
+ "babel-cli": "^6.16.0",
+ "babel-core": "^6.16.0",
+ "babel-eslint": "^7.0.0",
+ "babel-jest": "^15.0.0",
+ "babel-loader": "^6.2.5",
+ "babel-plugin-transform-async-to-generator": "^6.16.0",
+ "babel-plugin-transform-class-properties": "^6.16.0",
+ "babel-plugin-transform-export-extensions": "^6.8.0",
+ "babel-plugin-transform-object-rest-spread": "^6.16.0",
+ "babel-polyfill": "^6.16.0",
+ "babel-preset-es2015": "^6.18.0",
+ "babel-preset-react": "^6.16.0",
+ "babel-runtime": "^6.20.0",
+ "eslint": "^3.6.1",
+ "eslint-config-airbnb": "^12.0.0",
+ "eslint-config-airbnb-base": "^8.0.0",
+ "eslint-import-resolver-node": "^0.2.3",
+ "eslint-plugin-import": "^1.16.0",
+ "eslint-plugin-jsx-a11y": "^2.2.2",
+ "eslint-plugin-react": "^6.3.0",
+ "express": "^4.14.0",
+ "jest": "^15.1.1",
+ "react": "^15.3.2",
+ "react-dom": "^15.3.2",
+ "react-redux": "^4.4.5",
+ "react-router": "^2.8.1",
+ "redux": "^3.6.0",
+ "redux-saga": "^0.14.2",
+ "redux-saga-test-plan": "^2.1.0",
+ "rimraf": "^2.5.4",
+ "webpack": "^1.13.2",
+ "webpack-dev-server": "^1.16.1"
+ },
+ "peerDependencies": {
+ "redux-saga": ">=0.10.0 <0.15.0"
+ }
+}
diff --git a/redux-saga-router/react.js b/redux-saga-router/react.js
new file mode 100644
index 0000000..efa19b7
--- /dev/null
+++ b/redux-saga-router/react.js
@@ -0,0 +1 @@
+exports.createLink = require('./lib/react/createLink').default;
diff --git a/redux-saga-router/src/buildRouteMatcher.js b/redux-saga-router/src/buildRouteMatcher.js
new file mode 100644
index 0000000..e35b454
--- /dev/null
+++ b/redux-saga-router/src/buildRouteMatcher.js
@@ -0,0 +1,11 @@
+import ruta3 from 'ruta3';
+
+export default function buildRouteMatcher(routes) {
+ const routeMatcher = ruta3();
+
+ Object.keys(routes).forEach((route) => {
+ routeMatcher.addRoute(route, routes[route]);
+ });
+
+ return routeMatcher;
+}
diff --git a/redux-saga-router/src/createHistoryChannel.js b/redux-saga-router/src/createHistoryChannel.js
new file mode 100644
index 0000000..d6f8672
--- /dev/null
+++ b/redux-saga-router/src/createHistoryChannel.js
@@ -0,0 +1,25 @@
+import { eventChannel, buffers } from 'redux-saga';
+
+const BUFFER_LIMIT = 5;
+
+export default function createHistoryChannel(history) {
+ function subscribe(emitter) {
+ let initialLocation;
+
+ if (typeof history.getCurrentLocation === 'function') {
+ initialLocation = history.getCurrentLocation();
+ } else {
+ initialLocation = history.location;
+ }
+
+ if (initialLocation) {
+ emitter(initialLocation);
+ }
+
+ return history.listen(location => {
+ emitter(location);
+ });
+ }
+
+ return eventChannel(subscribe, buffers.fixed(BUFFER_LIMIT));
+}
diff --git a/redux-saga-router/src/index.js b/redux-saga-router/src/index.js
new file mode 100644
index 0000000..30fb0b6
--- /dev/null
+++ b/redux-saga-router/src/index.js
@@ -0,0 +1,3 @@
+export createBrowserHistory from 'history/createBrowserHistory';
+export createHashHistory from 'history/createHashHistory';
+export router from './router';
diff --git a/redux-saga-router/src/react/createLink.js b/redux-saga-router/src/react/createLink.js
new file mode 100644
index 0000000..231424f
--- /dev/null
+++ b/redux-saga-router/src/react/createLink.js
@@ -0,0 +1,29 @@
+/* eslint-disable import/no-extraneous-dependencies */
+import React, { Component, PropTypes } from 'react';
+
+export default function createLink(history) {
+ class Link extends Component {
+ static propTypes = {
+ to: PropTypes.string.isRequired,
+ className: PropTypes.string,
+ children: PropTypes.any,
+ };
+
+ onClick = (e) => {
+ e.preventDefault();
+ history.push(this.props.to);
+ };
+
+ render() {
+ const { to, className, children } = this.props;
+
+ return (
+
+ {children}
+
+ );
+ }
+ }
+
+ return Link;
+}
diff --git a/redux-saga-router/src/router.js b/redux-saga-router/src/router.js
new file mode 100644
index 0000000..71aad47
--- /dev/null
+++ b/redux-saga-router/src/router.js
@@ -0,0 +1,131 @@
+/* eslint no-console: ["error", { allow: ["error"] }] */
+import { call, take, spawn, cancel, join } from 'redux-saga/effects';
+import fsmIterator from 'fsm-iterator';
+import buildRouteMatcher from './buildRouteMatcher';
+import createHistoryChannel from './createHistoryChannel';
+
+const INIT = 'INIT';
+const LISTEN = 'LISTEN';
+const BEFORE_HANDLE_LOCATION = 'BEFORE_HANDLE_LOCATION';
+const AWAIT_BEFORE_ALL = 'AWAIT_BEFORE_HANDLE_LOCATION';
+const HANDLE_LOCATION = 'HANDLE_LOCATION';
+
+export default function router(history, routes, options = {}) {
+ const routeMatcher = buildRouteMatcher(routes);
+ let historyChannel = null;
+ let lastMatch = null;
+ let lastSaga = null;
+ let pendingBeforeRouteChange = null;
+ let currentLocation = null;
+
+ function errorMessageValue(error, message) {
+ let finalMessage = `Redux Saga Router: ${message}:\n${error.message}`;
+
+ if ('stack' in error) {
+ finalMessage += `\n${error.stack}`;
+ }
+
+ return {
+ value: call([console, console.error], finalMessage),
+ next: LISTEN,
+ };
+ }
+
+ return fsmIterator(INIT, {
+ [INIT]: () => ({
+ value: call(createHistoryChannel, history),
+ next: LISTEN,
+ }),
+
+ [LISTEN](effects) {
+ if (effects && !historyChannel) {
+ historyChannel = effects;
+ }
+
+ if (effects instanceof Array) {
+ [lastSaga] = effects;
+ }
+
+ if ('beforeRouteChange' in options) {
+ return {
+ value: take(historyChannel),
+ next: BEFORE_HANDLE_LOCATION,
+ };
+ }
+
+ return {
+ value: take(historyChannel),
+ next: HANDLE_LOCATION,
+ };
+ },
+
+ [BEFORE_HANDLE_LOCATION](location, fsm) {
+ const path = location.pathname;
+ const match = routeMatcher.match(path);
+ currentLocation = location;
+
+ if (!match) {
+ return fsm[LISTEN]();
+ }
+
+ pendingBeforeRouteChange = spawn(options.beforeRouteChange, match.params);
+
+ return {
+ value: pendingBeforeRouteChange,
+ next: AWAIT_BEFORE_ALL,
+ };
+ },
+
+ [AWAIT_BEFORE_ALL](task) {
+ if (task) {
+ return { value: join(task), next: HANDLE_LOCATION };
+ }
+ return {
+ value: join(pendingBeforeRouteChange),
+ next: HANDLE_LOCATION,
+ };
+ },
+
+ [HANDLE_LOCATION](location, fsm) {
+ const path = location ? location.pathname : currentLocation.pathname;
+ let match = routeMatcher.match(path);
+ const effects = [];
+
+ while (match !== null) {
+ lastMatch = match;
+ effects.push(spawn(match.action, match.params));
+ match = options.matchAll ? match.next() : null;
+ }
+
+ if (lastSaga) {
+ effects.push(cancel(lastSaga));
+ }
+
+ if (effects.length > 0) {
+ return {
+ value: effects,
+ next: LISTEN,
+ };
+ }
+
+ return fsm[LISTEN]();
+ },
+
+ throw(e, fsm) {
+ switch (fsm.previousState) {
+ case HANDLE_LOCATION:
+ return errorMessageValue(e, `Unhandled ${e.name} in route "${lastMatch.route}"`);
+
+ case LISTEN:
+ return errorMessageValue(e, `Unexpected ${e.name} while listening for route`);
+
+ case BEFORE_HANDLE_LOCATION:
+ case AWAIT_BEFORE_ALL:
+ return errorMessageValue(e, `Error ${e.name} was uncaught within the before handle location hook.`);
+
+ default:
+ return { done: true };
+ }
+ },
+ });
+}
diff --git a/src/api/helpers.js b/src/api/helpers.js
index 0c13c08..0a58ad3 100644
--- a/src/api/helpers.js
+++ b/src/api/helpers.js
@@ -1,11 +1,23 @@
+import {APIError, APIUnauthorizedError, APIForbiddenError} from '../errors';
+
+export const retryOnError = (fn, errClass=Error) => fn().catch(error => {
+ if (error.constructor === errClass) {
+ return fn();
+ }
+ return Promise.reject(error);
+});
+
export const ensureJSON = (response) => response.json();
+
export const ensureSuccessOr = (errorMsg) =>
- (response) =>
- (response.status >= 200 && response.status < 300) ?
- Promise.resolve(response) :
- Promise.reject( new Error(errorMsg) );
-export const checkIfForbiddenOr = (errorMsg) =>
- (response) =>
- (response.status !== 403) ?
- Promise.resolve(response) :
- Promise.reject( new Error(errorMsg) );
+ (response) => {
+ if (response.status >= 200 && response.status < 300) {
+ return Promise.resolve(response);
+ } else if (response.status === 403) {
+ return response.json().then(responseBody => Promise.reject(new APIForbiddenError(errorMsg, responseBody)));
+ } else if (response.status === 401) {
+ return response.json().then(responseBody => Promise.reject(new APIUnauthorizedError(responseBody)));
+ } else {
+ return response.json().then(responseBody => Promise.reject(new APIError(errorMsg, responseBody)));
+ }
+ };
diff --git a/src/api/index.js b/src/api/index.js
index 77a5bc4..f8b10ec 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -1,6 +1,6 @@
import { API_ROOT } from './config';
import { loadState } from '../persistence';
-import { ensureJSON, ensureSuccessOr, checkIfForbiddenOr } from './helpers';
+import { ensureJSON, ensureSuccessOr } from './helpers';
const getDefaultHeaders = () => {
const persistedState = loadState();
@@ -25,7 +25,6 @@ const api = {
headers: getDefaultHeaders(),
});
return fetch(request)
- .then(checkIfForbiddenOr('Access denied'))
.then(ensureSuccessOr(error_msg))
.then(ensureJSON);
},
@@ -36,7 +35,6 @@ const api = {
body: JSON.stringify(body),
});
return fetch(request)
- .then(checkIfForbiddenOr('Access denied'))
.then(ensureSuccessOr(error_msg))
.then(ensureJSON);
},
@@ -47,7 +45,6 @@ const api = {
body: JSON.stringify(body),
});
return fetch(request)
- .then(checkIfForbiddenOr('Access denied'))
.then(ensureSuccessOr(error_msg))
.then(ensureJSON);
},
@@ -57,7 +54,6 @@ const api = {
headers: getDefaultHeaders(),
});
return fetch(request)
- .then(checkIfForbiddenOr('Access denied'))
.then(ensureSuccessOr(error_msg));
},
},
diff --git a/src/assets/css/bootstrap.min.css b/src/assets/css/bootstrap.min.css
index afeeb3b..5c1dafe 100644
--- a/src/assets/css/bootstrap.min.css
+++ b/src/assets/css/bootstrap.min.css
@@ -8,4 +8,4 @@
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;line-height:1.42857143;color:#2c3e50;background-color:#ffffff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#18bc9c;text-decoration:none}a:hover,a:focus{color:#18bc9c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#ffffff;border:1px solid #ecf0f1;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:21px;margin-bottom:21px;border:0;border-top:1px solid #ecf0f1}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#b4bcc2}h1,.h1,h2,.h2,h3,.h3{margin-top:21px;margin-bottom:10.5px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10.5px;margin-bottom:10.5px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:39px}h2,.h2{font-size:32px}h3,.h3{font-size:26px}h4,.h4{font-size:19px}h5,.h5{font-size:15px}h6,.h6{font-size:13px}p{margin:0 0 10.5px}.lead{margin-bottom:21px;font-size:17px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:22.5px}}small,.small{font-size:86%}mark,.mark{background-color:#f39c12;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#b4bcc2}.text-primary{color:#2c3e50}a.text-primary:hover,a.text-primary:focus{color:#1a242f}.text-success{color:#ffffff}a.text-success:hover,a.text-success:focus{color:#e6e6e6}.text-info{color:#ffffff}a.text-info:hover,a.text-info:focus{color:#e6e6e6}.text-warning{color:#ffffff}a.text-warning:hover,a.text-warning:focus{color:#e6e6e6}.text-danger{color:#ffffff}a.text-danger:hover,a.text-danger:focus{color:#e6e6e6}.bg-primary{color:#fff;background-color:#2c3e50}a.bg-primary:hover,a.bg-primary:focus{background-color:#1a242f}.bg-success{background-color:#18bc9c}a.bg-success:hover,a.bg-success:focus{background-color:#128f76}.bg-info{background-color:#3498db}a.bg-info:hover,a.bg-info:focus{background-color:#217dbb}.bg-warning{background-color:#f39c12}a.bg-warning:hover,a.bg-warning:focus{background-color:#c87f0a}.bg-danger{background-color:#e74c3c}a.bg-danger:hover,a.bg-danger:focus{background-color:#d62c1a}.page-header{padding-bottom:9.5px;margin:42px 0 21px;border-bottom:1px solid transparent}ul,ol{margin-top:0;margin-bottom:10.5px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:21px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #b4bcc2}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10.5px 21px;margin:0 0 21px;font-size:18.75px;border-left:5px solid #ecf0f1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#b4bcc2}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #ecf0f1;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:21px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#ffffff;background-color:#333333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:10px;margin:0 0 10.5px;font-size:14px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#7b8a8b;background-color:#ecf0f1;border:1px solid #cccccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#b4bcc2;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:21px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ecf0f1}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ecf0f1}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ecf0f1}.table .table{background-color:#ffffff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ecf0f1}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ecf0f1}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#ecf0f1}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#ecf0f1}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#dde4e6}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#18bc9c}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#15a589}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#3498db}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#258cd1}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#f39c12}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#e08e0b}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#e74c3c}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#e43725}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15.75px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ecf0f1}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:21px;font-size:22.5px;line-height:inherit;color:#2c3e50;border:0;border-bottom:1px solid transparent}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:11px;font-size:15px;line-height:1.42857143;color:#2c3e50}.form-control{display:block;width:100%;height:45px;padding:10px 15px;font-size:15px;line-height:1.42857143;color:#2c3e50;background-color:#ffffff;background-image:none;border:1px solid #dce4ec;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#2c3e50;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(44,62,80,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(44,62,80,0.6)}.form-control::-moz-placeholder{color:#acb6c0;opacity:1}.form-control:-ms-input-placeholder{color:#acb6c0}.form-control::-webkit-input-placeholder{color:#acb6c0}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#ecf0f1;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type="date"].form-control,input[type="time"].form-control,input[type="datetime-local"].form-control,input[type="month"].form-control{line-height:45px}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm,.input-group-sm input[type="date"],.input-group-sm input[type="time"],.input-group-sm input[type="datetime-local"],.input-group-sm input[type="month"]{line-height:35px}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg,.input-group-lg input[type="date"],.input-group-lg input[type="time"],.input-group-lg input[type="datetime-local"],.input-group-lg input[type="month"]{line-height:66px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:21px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:11px;padding-bottom:11px;margin-bottom:0;min-height:36px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}select.input-sm{height:35px;line-height:35px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:35px;line-height:35px}.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control{height:auto}.form-group-sm .form-control-static{height:35px;min-height:34px;padding:7px 9px;font-size:13px;line-height:1.5}.input-lg{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}select.input-lg{height:66px;line-height:66px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:66px;line-height:66px}.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control{height:auto}.form-group-lg .form-control-static{height:66px;min-height:40px;padding:19px 27px;font-size:19px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:56.25px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:45px;height:45px;line-height:45px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback{width:66px;height:66px;line-height:66px}.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback{width:35px;height:35px;line-height:35px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#ffffff}.has-success .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-success .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#18bc9c}.has-success .form-control-feedback{color:#ffffff}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#ffffff}.has-warning .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-warning .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#f39c12}.has-warning .form-control-feedback{color:#ffffff}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#ffffff}.has-error .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-error .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#e74c3c}.has-error .form-control-feedback{color:#ffffff}.has-feedback label~.form-control-feedback{top:26px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#597ea2}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:11px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:32px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:11px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:19px;font-size:19px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:7px;font-size:13px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:10px 15px;font-size:15px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#ffffff;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#ffffff;background-color:#95a5a6;border-color:#95a5a6}.btn-default:focus,.btn-default.focus{color:#ffffff;background-color:#798d8f;border-color:#566566}.btn-default:hover{color:#ffffff;background-color:#798d8f;border-color:#74898a}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#ffffff;background-color:#798d8f;border-color:#74898a}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#ffffff;background-color:#687b7c;border-color:#566566}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#95a5a6;border-color:#95a5a6}.btn-default .badge{color:#95a5a6;background-color:#ffffff}.btn-primary{color:#ffffff;background-color:#2c3e50;border-color:#2c3e50}.btn-primary:focus,.btn-primary.focus{color:#ffffff;background-color:#1a242f;border-color:#000000}.btn-primary:hover{color:#ffffff;background-color:#1a242f;border-color:#161f29}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#1a242f;border-color:#161f29}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#ffffff;background-color:#0d1318;border-color:#000000}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#2c3e50;border-color:#2c3e50}.btn-primary .badge{color:#2c3e50;background-color:#ffffff}.btn-success{color:#ffffff;background-color:#18bc9c;border-color:#18bc9c}.btn-success:focus,.btn-success.focus{color:#ffffff;background-color:#128f76;border-color:#0a4b3e}.btn-success:hover{color:#ffffff;background-color:#128f76;border-color:#11866f}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#ffffff;background-color:#128f76;border-color:#11866f}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#ffffff;background-color:#0e6f5c;border-color:#0a4b3e}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#18bc9c;border-color:#18bc9c}.btn-success .badge{color:#18bc9c;background-color:#ffffff}.btn-info{color:#ffffff;background-color:#3498db;border-color:#3498db}.btn-info:focus,.btn-info.focus{color:#ffffff;background-color:#217dbb;border-color:#16527a}.btn-info:hover{color:#ffffff;background-color:#217dbb;border-color:#2077b2}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#ffffff;background-color:#217dbb;border-color:#2077b2}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#ffffff;background-color:#1c699d;border-color:#16527a}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#3498db;border-color:#3498db}.btn-info .badge{color:#3498db;background-color:#ffffff}.btn-warning{color:#ffffff;background-color:#f39c12;border-color:#f39c12}.btn-warning:focus,.btn-warning.focus{color:#ffffff;background-color:#c87f0a;border-color:#7f5006}.btn-warning:hover{color:#ffffff;background-color:#c87f0a;border-color:#be780a}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#ffffff;background-color:#c87f0a;border-color:#be780a}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#ffffff;background-color:#a66908;border-color:#7f5006}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#f39c12;border-color:#f39c12}.btn-warning .badge{color:#f39c12;background-color:#ffffff}.btn-danger{color:#ffffff;background-color:#e74c3c;border-color:#e74c3c}.btn-danger:focus,.btn-danger.focus{color:#ffffff;background-color:#d62c1a;border-color:#921e12}.btn-danger:hover{color:#ffffff;background-color:#d62c1a;border-color:#cd2a19}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#d62c1a;border-color:#cd2a19}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#ffffff;background-color:#b62516;border-color:#921e12}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#e74c3c;border-color:#e74c3c}.btn-danger .badge{color:#e74c3c;background-color:#ffffff}.btn-link{color:#18bc9c;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#18bc9c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#b4bcc2;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:13px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;-o-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:15px;text-align:left;background-color:#ffffff;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);-webkit-background-clip:padding-box;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9.5px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#7b8a8b;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#ffffff;background-color:#2c3e50}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#2c3e50}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#b4bcc2}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:13px;line-height:1.42857143;color:#b4bcc2;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:66px;line-height:66px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:35px;line-height:35px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:10px 15px;font-size:15px;font-weight:normal;line-height:1;color:#2c3e50;text-align:center;background-color:#ecf0f1;border:1px solid #dce4ec;border-radius:4px}.input-group-addon.input-sm{padding:6px 9px;font-size:13px;border-radius:3px}.input-group-addon.input-lg{padding:18px 27px;font-size:19px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#ecf0f1}.nav>li.disabled>a{color:#b4bcc2}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#b4bcc2;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#ecf0f1;border-color:#18bc9c}.nav .nav-divider{height:1px;margin:9.5px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ecf0f1}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#ecf0f1 #ecf0f1 #ecf0f1}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#2c3e50;background-color:#ffffff;border:1px solid #ecf0f1;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ecf0f1}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ecf0f1;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#ffffff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#ffffff;background-color:#2c3e50}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ecf0f1}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ecf0f1;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#ffffff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:60px;margin-bottom:21px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:19.5px 15px;font-size:19px;line-height:21px;height:60px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:13px;margin-bottom:13px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:9.75px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:21px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:21px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:19.5px;padding-bottom:19.5px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:7.5px;margin-bottom:7.5px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:7.5px;margin-bottom:7.5px}.navbar-btn.btn-sm{margin-top:12.5px;margin-bottom:12.5px}.navbar-btn.btn-xs{margin-top:19px;margin-bottom:19px}.navbar-text{margin-top:19.5px;margin-bottom:19.5px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#2c3e50;border-color:transparent}.navbar-default .navbar-brand{color:#ffffff}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#18bc9c;background-color:transparent}.navbar-default .navbar-text{color:#ffffff}.navbar-default .navbar-nav>li>a{color:#ffffff}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#18bc9c;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#ffffff;background-color:#1a242f}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#1a242f}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#1a242f}.navbar-default .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:transparent}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#1a242f;color:#ffffff}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#18bc9c;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#1a242f}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-default .navbar-link{color:#ffffff}.navbar-default .navbar-link:hover{color:#18bc9c}.navbar-default .btn-link{color:#ffffff}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#18bc9c}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#cccccc}.navbar-inverse{background-color:#18bc9c;border-color:transparent}.navbar-inverse .navbar-brand{color:#ffffff}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#2c3e50;background-color:transparent}.navbar-inverse .navbar-text{color:#ffffff}.navbar-inverse .navbar-nav>li>a{color:#ffffff}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#2c3e50;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#ffffff;background-color:#15a589}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#128f76}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#128f76}.navbar-inverse .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#149c82}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#15a589;color:#ffffff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#2c3e50;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#15a589}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-inverse .navbar-link{color:#ffffff}.navbar-inverse .navbar-link:hover{color:#2c3e50}.navbar-inverse .btn-link{color:#ffffff}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#2c3e50}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#cccccc}.breadcrumb{padding:8px 15px;margin-bottom:21px;list-style:none;background-color:#ecf0f1;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#cccccc}.breadcrumb>.active{color:#95a5a6}.pagination{display:inline-block;padding-left:0;margin:21px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:10px 15px;line-height:1.42857143;text-decoration:none;color:#ffffff;background-color:#18bc9c;border:1px solid transparent;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{z-index:2;color:#ffffff;background-color:#0f7864;border-color:transparent}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:3;color:#ffffff;background-color:#0f7864;border-color:transparent;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#ecf0f1;background-color:#3be6c4;border-color:transparent;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:18px 27px;font-size:19px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:6px 9px;font-size:13px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:21px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#18bc9c;border:1px solid transparent;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#0f7864}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#ffffff;background-color:#18bc9c;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#ffffff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#95a5a6}.label-default[href]:hover,.label-default[href]:focus{background-color:#798d8f}.label-primary{background-color:#2c3e50}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#1a242f}.label-success{background-color:#18bc9c}.label-success[href]:hover,.label-success[href]:focus{background-color:#128f76}.label-info{background-color:#3498db}.label-info[href]:hover,.label-info[href]:focus{background-color:#217dbb}.label-warning{background-color:#f39c12}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#c87f0a}.label-danger{background-color:#e74c3c}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#d62c1a}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:13px;font-weight:bold;color:#ffffff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#2c3e50;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge,.btn-group-xs>.btn .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#2c3e50;background-color:#ffffff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#ecf0f1}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:23px;font-weight:200}.jumbotron>hr{border-top-color:#cfd9db}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:68px}}.thumbnail{display:block;padding:4px;margin-bottom:21px;line-height:1.42857143;background-color:#ffffff;border:1px solid #ecf0f1;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#18bc9c}.thumbnail .caption{padding:9px;color:#2c3e50}.alert{padding:15px;margin-bottom:21px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#18bc9c;border-color:#18bc9c;color:#ffffff}.alert-success hr{border-top-color:#15a589}.alert-success .alert-link{color:#e6e6e6}.alert-info{background-color:#3498db;border-color:#3498db;color:#ffffff}.alert-info hr{border-top-color:#258cd1}.alert-info .alert-link{color:#e6e6e6}.alert-warning{background-color:#f39c12;border-color:#f39c12;color:#ffffff}.alert-warning hr{border-top-color:#e08e0b}.alert-warning .alert-link{color:#e6e6e6}.alert-danger{background-color:#e74c3c;border-color:#e74c3c;color:#ffffff}.alert-danger hr{border-top-color:#e43725}.alert-danger .alert-link{color:#e6e6e6}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:21px;margin-bottom:21px;background-color:#ecf0f1;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:13px;line-height:21px;color:#ffffff;text-align:center;background-color:#2c3e50;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#18bc9c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#3498db}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#f39c12}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#e74c3c}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#ffffff;border:1px solid #ecf0f1}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333333}a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus{text-decoration:none;color:#555555;background-color:#ecf0f1}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{background-color:#ecf0f1;color:#b4bcc2;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#b4bcc2}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#ffffff;background-color:#2c3e50;border-color:#2c3e50}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#8aa4be}.list-group-item-success{color:#ffffff;background-color:#18bc9c}a.list-group-item-success,button.list-group-item-success{color:#ffffff}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus{color:#ffffff;background-color:#15a589}a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-info{color:#ffffff;background-color:#3498db}a.list-group-item-info,button.list-group-item-info{color:#ffffff}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus{color:#ffffff;background-color:#258cd1}a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-warning{color:#ffffff;background-color:#f39c12}a.list-group-item-warning,button.list-group-item-warning{color:#ffffff}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus{color:#ffffff;background-color:#e08e0b}a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-danger{color:#ffffff;background-color:#e74c3c}a.list-group-item-danger,button.list-group-item-danger{color:#ffffff}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus{color:#ffffff;background-color:#e43725}a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:21px;background-color:#ffffff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:17px;color:inherit}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#ecf0f1;border-top:1px solid #ecf0f1;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ecf0f1}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:21px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #ecf0f1}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ecf0f1}.panel-default{border-color:#ecf0f1}.panel-default>.panel-heading{color:#2c3e50;background-color:#ecf0f1;border-color:#ecf0f1}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ecf0f1}.panel-default>.panel-heading .badge{color:#ecf0f1;background-color:#2c3e50}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ecf0f1}.panel-primary{border-color:#2c3e50}.panel-primary>.panel-heading{color:#ffffff;background-color:#2c3e50;border-color:#2c3e50}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#2c3e50}.panel-primary>.panel-heading .badge{color:#2c3e50;background-color:#ffffff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#2c3e50}.panel-success{border-color:#18bc9c}.panel-success>.panel-heading{color:#ffffff;background-color:#18bc9c;border-color:#18bc9c}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#18bc9c}.panel-success>.panel-heading .badge{color:#18bc9c;background-color:#ffffff}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#18bc9c}.panel-info{border-color:#3498db}.panel-info>.panel-heading{color:#ffffff;background-color:#3498db;border-color:#3498db}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#3498db}.panel-info>.panel-heading .badge{color:#3498db;background-color:#ffffff}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#3498db}.panel-warning{border-color:#f39c12}.panel-warning>.panel-heading{color:#ffffff;background-color:#f39c12;border-color:#f39c12}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#f39c12}.panel-warning>.panel-heading .badge{color:#f39c12;background-color:#ffffff}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#f39c12}.panel-danger{border-color:#e74c3c}.panel-danger>.panel-heading{color:#ffffff;background-color:#e74c3c;border-color:#e74c3c}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#e74c3c}.panel-danger>.panel-heading .badge{color:#e74c3c;background-color:#ffffff}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#e74c3c}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#ecf0f1;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:22.5px;font-weight:bold;line-height:1;color:#000000;text-shadow:none;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#ffffff;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:0.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{padding:20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:13px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:0.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;background-color:#000000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:15px;background-color:#ffffff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:15px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999999;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999999;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.next,.carousel-inner>.item.active.right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:0.5;filter:alpha(opacity=50);font-size:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.0001)));background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.0001)), to(rgba(0,0,0,0.5)));background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #ffffff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#ffffff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-header:before,.modal-header:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-header:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table !important}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table !important}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table !important}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table !important}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table !important}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}.navbar{border-width:0}.navbar-default .badge{background-color:#fff;color:#2c3e50}.navbar-inverse .badge{background-color:#fff;color:#18bc9c}.navbar-brand{line-height:1}.btn{border-width:2px}.btn:active{-webkit-box-shadow:none;box-shadow:none}.btn-group.open .dropdown-toggle{-webkit-box-shadow:none;box-shadow:none}.text-primary,.text-primary:hover{color:#2c3e50}.text-success,.text-success:hover{color:#18bc9c}.text-danger,.text-danger:hover{color:#e74c3c}.text-warning,.text-warning:hover{color:#f39c12}.text-info,.text-info:hover{color:#3498db}table a:not(.btn),.table a:not(.btn){text-decoration:underline}table .dropdown-menu a,.table .dropdown-menu a{text-decoration:none}table .success,.table .success,table .warning,.table .warning,table .danger,.table .danger,table .info,.table .info{color:#fff}table .success>th>a,.table .success>th>a,table .warning>th>a,.table .warning>th>a,table .danger>th>a,.table .danger>th>a,table .info>th>a,.table .info>th>a,table .success>td>a,.table .success>td>a,table .warning>td>a,.table .warning>td>a,table .danger>td>a,.table .danger>td>a,table .info>td>a,.table .info>td>a,table .success>a,.table .success>a,table .warning>a,.table .warning>a,table .danger>a,.table .danger>a,table .info>a,.table .info>a{color:#fff}table>thead>tr>th,.table>thead>tr>th,table>tbody>tr>th,.table>tbody>tr>th,table>tfoot>tr>th,.table>tfoot>tr>th,table>thead>tr>td,.table>thead>tr>td,table>tbody>tr>td,.table>tbody>tr>td,table>tfoot>tr>td,.table>tfoot>tr>td{border:none}table-bordered>thead>tr>th,.table-bordered>thead>tr>th,table-bordered>tbody>tr>th,.table-bordered>tbody>tr>th,table-bordered>tfoot>tr>th,.table-bordered>tfoot>tr>th,table-bordered>thead>tr>td,.table-bordered>thead>tr>td,table-bordered>tbody>tr>td,.table-bordered>tbody>tr>td,table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ecf0f1}.form-control,input{border-width:2px;-webkit-box-shadow:none;box-shadow:none}.form-control:focus,input:focus{-webkit-box-shadow:none;box-shadow:none}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label,.has-warning .form-control-feedback{color:#f39c12}.has-warning .form-control,.has-warning .form-control:focus{border:2px solid #f39c12}.has-warning .input-group-addon{border-color:#f39c12}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label,.has-error .form-control-feedback{color:#e74c3c}.has-error .form-control,.has-error .form-control:focus{border:2px solid #e74c3c}.has-error .input-group-addon{border-color:#e74c3c}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label,.has-success .form-control-feedback{color:#18bc9c}.has-success .form-control,.has-success .form-control:focus{border:2px solid #18bc9c}.has-success .input-group-addon{border-color:#18bc9c}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{border-color:transparent}.pager a,.pager a:hover{color:#fff}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{background-color:#3be6c4}.close{color:#fff;text-decoration:none;opacity:0.4}.close:hover,.close:focus{color:#fff;opacity:1}.alert .alert-link{color:#fff;text-decoration:underline}.progress{height:10px;-webkit-box-shadow:none;box-shadow:none}.progress .progress-bar{font-size:10px;line-height:10px}.well{-webkit-box-shadow:none;box-shadow:none}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{border-color:#ecf0f1}a.list-group-item-success.active{background-color:#18bc9c}a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{background-color:#15a589}a.list-group-item-warning.active{background-color:#f39c12}a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{background-color:#e08e0b}a.list-group-item-danger.active{background-color:#e74c3c}a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{background-color:#e43725}.panel-default .close{color:#2c3e50}.modal .close{color:#2c3e50}.popover{color:#2c3e50}
\ No newline at end of file
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;line-height:1.42857143;color:#2c3e50;background-color:#ffffff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#18bc9c;text-decoration:none}a:hover,a:focus{color:#18bc9c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#ffffff;border:1px solid #ecf0f1;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:21px;margin-bottom:21px;border:0;border-top:1px solid #ecf0f1}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#b4bcc2}h1,.h1,h2,.h2,h3,.h3{margin-top:21px;margin-bottom:10.5px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10.5px;margin-bottom:10.5px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:39px}h2,.h2{font-size:32px}h3,.h3{font-size:26px}h4,.h4{font-size:19px}h5,.h5{font-size:15px}h6,.h6{font-size:13px}p{margin:0 0 10.5px}.lead{margin-bottom:21px;font-size:17px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:22.5px}}small,.small{font-size:86%}mark,.mark{background-color:#f39c12;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#b4bcc2}.text-primary{color:#2c3e50}a.text-primary:hover,a.text-primary:focus{color:#1a242f}.text-success{color:#ffffff}a.text-success:hover,a.text-success:focus{color:#e6e6e6}.text-info{color:#ffffff}a.text-info:hover,a.text-info:focus{color:#e6e6e6}.text-warning{color:#ffffff}a.text-warning:hover,a.text-warning:focus{color:#e6e6e6}.text-danger{color:#ffffff}a.text-danger:hover,a.text-danger:focus{color:#e6e6e6}.bg-primary{color:#fff;background-color:#2c3e50}a.bg-primary:hover,a.bg-primary:focus{background-color:#1a242f}.bg-success{background-color:#18bc9c}a.bg-success:hover,a.bg-success:focus{background-color:#128f76}.bg-info{background-color:#3498db}a.bg-info:hover,a.bg-info:focus{background-color:#217dbb}.bg-warning{background-color:#f39c12}a.bg-warning:hover,a.bg-warning:focus{background-color:#c87f0a}.bg-danger{background-color:#e74c3c}a.bg-danger:hover,a.bg-danger:focus{background-color:#d62c1a}.page-header{padding-bottom:9.5px;margin:42px 0 21px;border-bottom:1px solid transparent}ul,ol{margin-top:0;margin-bottom:10.5px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:21px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #b4bcc2}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10.5px 21px;margin:0 0 21px;font-size:18.75px;border-left:5px solid #ecf0f1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#b4bcc2}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #ecf0f1;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:21px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#ffffff;background-color:#333333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:10px;margin:0 0 10.5px;font-size:14px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#7b8a8b;background-color:#ecf0f1;border:1px solid #cccccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#b4bcc2;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:21px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ecf0f1}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ecf0f1}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ecf0f1}.table .table{background-color:#ffffff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ecf0f1}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ecf0f1}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#ecf0f1}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#ecf0f1}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#dde4e6}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#18bc9c}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#15a589}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#3498db}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#258cd1}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#f39c12}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#e08e0b}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#e74c3c}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#e43725}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:768px){.table-responsive{width:100%;margin-bottom:15.75px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ecf0f1}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:21px;font-size:22.5px;line-height:inherit;color:#2c3e50;border:0;border-bottom:1px solid transparent}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:11px;font-size:15px;line-height:1.42857143;color:#2c3e50}.form-control{display:block;width:100%;height:45px;padding:10px 15px;font-size:15px;line-height:1.42857143;color:#2c3e50;background-color:#ffffff;background-image:none;border:1px solid #dce4ec;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#2c3e50;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(44,62,80,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(44,62,80,0.6)}.form-control::-moz-placeholder{color:#acb6c0;opacity:1}.form-control:-ms-input-placeholder{color:#acb6c0}.form-control::-webkit-input-placeholder{color:#acb6c0}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#ecf0f1;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type="date"].form-control,input[type="time"].form-control,input[type="datetime-local"].form-control,input[type="month"].form-control{line-height:45px}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm,.input-group-sm input[type="date"],.input-group-sm input[type="time"],.input-group-sm input[type="datetime-local"],.input-group-sm input[type="month"]{line-height:35px}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg,.input-group-lg input[type="date"],.input-group-lg input[type="time"],.input-group-lg input[type="datetime-local"],.input-group-lg input[type="month"]{line-height:66px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:21px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:11px;padding-bottom:11px;margin-bottom:0;min-height:36px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}select.input-sm{height:35px;line-height:35px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:35px;line-height:35px}.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control{height:auto}.form-group-sm .form-control-static{height:35px;min-height:34px;padding:7px 9px;font-size:13px;line-height:1.5}.input-lg{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}select.input-lg{height:66px;line-height:66px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:66px;line-height:66px}.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control{height:auto}.form-group-lg .form-control-static{height:66px;min-height:40px;padding:19px 27px;font-size:19px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:56.25px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:45px;height:45px;line-height:45px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback{width:66px;height:66px;line-height:66px}.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback{width:35px;height:35px;line-height:35px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#ffffff}.has-success .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-success .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#18bc9c}.has-success .form-control-feedback{color:#ffffff}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#ffffff}.has-warning .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-warning .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#f39c12}.has-warning .form-control-feedback{color:#ffffff}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#ffffff}.has-error .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-error .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#e74c3c}.has-error .form-control-feedback{color:#ffffff}.has-feedback label~.form-control-feedback{top:26px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#597ea2}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:11px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:32px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:11px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:19px;font-size:19px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:7px;font-size:13px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:10px 15px;font-size:15px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#ffffff;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#ffffff;background-color:#95a5a6;border-color:#95a5a6}.btn-default:focus,.btn-default.focus{color:#ffffff;background-color:#798d8f;border-color:#566566}.btn-default:hover{color:#ffffff;background-color:#798d8f;border-color:#74898a}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#ffffff;background-color:#798d8f;border-color:#74898a}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#ffffff;background-color:#687b7c;border-color:#566566}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#95a5a6;border-color:#95a5a6}.btn-default .badge{color:#95a5a6;background-color:#ffffff}.btn-primary{color:#ffffff;background-color:#2c3e50;border-color:#2c3e50}.btn-primary:focus,.btn-primary.focus{color:#ffffff;background-color:#1a242f;border-color:#000000}.btn-primary:hover{color:#ffffff;background-color:#1a242f;border-color:#161f29}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#1a242f;border-color:#161f29}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#ffffff;background-color:#0d1318;border-color:#000000}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#2c3e50;border-color:#2c3e50}.btn-primary .badge{color:#2c3e50;background-color:#ffffff}.btn-success{color:#ffffff;background-color:#18bc9c;border-color:#18bc9c}.btn-success:focus,.btn-success.focus{color:#ffffff;background-color:#128f76;border-color:#0a4b3e}.btn-success:hover{color:#ffffff;background-color:#128f76;border-color:#11866f}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#ffffff;background-color:#128f76;border-color:#11866f}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#ffffff;background-color:#0e6f5c;border-color:#0a4b3e}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#18bc9c;border-color:#18bc9c}.btn-success .badge{color:#18bc9c;background-color:#ffffff}.btn-info{color:#ffffff;background-color:#3498db;border-color:#3498db}.btn-info:focus,.btn-info.focus{color:#ffffff;background-color:#217dbb;border-color:#16527a}.btn-info:hover{color:#ffffff;background-color:#217dbb;border-color:#2077b2}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#ffffff;background-color:#217dbb;border-color:#2077b2}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#ffffff;background-color:#1c699d;border-color:#16527a}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#3498db;border-color:#3498db}.btn-info .badge{color:#3498db;background-color:#ffffff}.btn-warning{color:#ffffff;background-color:#f39c12;border-color:#f39c12}.btn-warning:focus,.btn-warning.focus{color:#ffffff;background-color:#c87f0a;border-color:#7f5006}.btn-warning:hover{color:#ffffff;background-color:#c87f0a;border-color:#be780a}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#ffffff;background-color:#c87f0a;border-color:#be780a}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#ffffff;background-color:#a66908;border-color:#7f5006}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#f39c12;border-color:#f39c12}.btn-warning .badge{color:#f39c12;background-color:#ffffff}.btn-danger{color:#ffffff;background-color:#e74c3c;border-color:#e74c3c}.btn-danger:focus,.btn-danger.focus{color:#ffffff;background-color:#d62c1a;border-color:#921e12}.btn-danger:hover{color:#ffffff;background-color:#d62c1a;border-color:#cd2a19}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#d62c1a;border-color:#cd2a19}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#ffffff;background-color:#b62516;border-color:#921e12}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#e74c3c;border-color:#e74c3c}.btn-danger .badge{color:#e74c3c;background-color:#ffffff}.btn-link{color:#18bc9c;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#18bc9c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#b4bcc2;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:13px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;-o-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:15px;text-align:left;background-color:#ffffff;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);-webkit-background-clip:padding-box;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9.5px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#7b8a8b;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#ffffff;background-color:#2c3e50}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#2c3e50}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#b4bcc2}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:13px;line-height:1.42857143;color:#b4bcc2;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:66px;line-height:66px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:35px;line-height:35px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:10px 15px;font-size:15px;font-weight:normal;line-height:1;color:#2c3e50;text-align:center;background-color:#ecf0f1;border:1px solid #dce4ec;border-radius:4px}.input-group-addon.input-sm{padding:6px 9px;font-size:13px;border-radius:3px}.input-group-addon.input-lg{padding:18px 27px;font-size:19px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#ecf0f1}.nav>li.disabled>a{color:#b4bcc2}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#b4bcc2;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#ecf0f1;border-color:#18bc9c}.nav .nav-divider{height:1px;margin:9.5px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ecf0f1}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#ecf0f1 #ecf0f1 #ecf0f1}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#2c3e50;background-color:#ffffff;border:1px solid #ecf0f1;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ecf0f1}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ecf0f1;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#ffffff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#ffffff;background-color:#2c3e50}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ecf0f1}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ecf0f1;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#ffffff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:60px;margin-bottom:21px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:19.5px 15px;font-size:19px;line-height:21px;height:60px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:13px;margin-bottom:13px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:9.75px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:21px}@media (max-width:768px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:21px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:19.5px;padding-bottom:19.5px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:7.5px;margin-bottom:7.5px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:768px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:7.5px;margin-bottom:7.5px}.navbar-btn.btn-sm{margin-top:12.5px;margin-bottom:12.5px}.navbar-btn.btn-xs{margin-top:19px;margin-bottom:19px}.navbar-text{margin-top:19.5px;margin-bottom:19.5px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#2c3e50;border-color:transparent}.navbar-default .navbar-brand{color:#ffffff}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#18bc9c;background-color:transparent}.navbar-default .navbar-text{color:#ffffff}.navbar-default .navbar-nav>li>a{color:#ffffff}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#18bc9c;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#ffffff;background-color:#1a242f}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#1a242f}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#1a242f}.navbar-default .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:transparent}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#1a242f;color:#ffffff}@media (max-width:768px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#18bc9c;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#1a242f}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-default .navbar-link{color:#ffffff}.navbar-default .navbar-link:hover{color:#18bc9c}.navbar-default .btn-link{color:#ffffff}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#18bc9c}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#cccccc}.navbar-inverse{background-color:#18bc9c;border-color:transparent}.navbar-inverse .navbar-brand{color:#ffffff}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#2c3e50;background-color:transparent}.navbar-inverse .navbar-text{color:#ffffff}.navbar-inverse .navbar-nav>li>a{color:#ffffff}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#2c3e50;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#ffffff;background-color:#15a589}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#128f76}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#128f76}.navbar-inverse .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#149c82}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#15a589;color:#ffffff}@media (max-width:768px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#2c3e50;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#15a589}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-inverse .navbar-link{color:#ffffff}.navbar-inverse .navbar-link:hover{color:#2c3e50}.navbar-inverse .btn-link{color:#ffffff}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#2c3e50}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#cccccc}.breadcrumb{padding:8px 15px;margin-bottom:21px;list-style:none;background-color:#ecf0f1;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#cccccc}.breadcrumb>.active{color:#95a5a6}.pagination{display:inline-block;padding-left:0;margin:21px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:10px 15px;line-height:1.42857143;text-decoration:none;color:#ffffff;background-color:#18bc9c;border:1px solid transparent;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{z-index:2;color:#ffffff;background-color:#0f7864;border-color:transparent}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:3;color:#ffffff;background-color:#0f7864;border-color:transparent;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#ecf0f1;background-color:#3be6c4;border-color:transparent;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:18px 27px;font-size:19px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:6px 9px;font-size:13px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:21px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#18bc9c;border:1px solid transparent;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#0f7864}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#ffffff;background-color:#18bc9c;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#ffffff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#95a5a6}.label-default[href]:hover,.label-default[href]:focus{background-color:#798d8f}.label-primary{background-color:#2c3e50}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#1a242f}.label-success{background-color:#18bc9c}.label-success[href]:hover,.label-success[href]:focus{background-color:#128f76}.label-info{background-color:#3498db}.label-info[href]:hover,.label-info[href]:focus{background-color:#217dbb}.label-warning{background-color:#f39c12}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#c87f0a}.label-danger{background-color:#e74c3c}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#d62c1a}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:13px;font-weight:bold;color:#ffffff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#2c3e50;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge,.btn-group-xs>.btn .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#2c3e50;background-color:#ffffff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#ecf0f1}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:23px;font-weight:200}.jumbotron>hr{border-top-color:#cfd9db}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:68px}}.thumbnail{display:block;padding:4px;margin-bottom:21px;line-height:1.42857143;background-color:#ffffff;border:1px solid #ecf0f1;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#18bc9c}.thumbnail .caption{padding:9px;color:#2c3e50}.alert{padding:15px;margin-bottom:21px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#18bc9c;border-color:#18bc9c;color:#ffffff}.alert-success hr{border-top-color:#15a589}.alert-success .alert-link{color:#e6e6e6}.alert-info{background-color:#3498db;border-color:#3498db;color:#ffffff}.alert-info hr{border-top-color:#258cd1}.alert-info .alert-link{color:#e6e6e6}.alert-warning{background-color:#f39c12;border-color:#f39c12;color:#ffffff}.alert-warning hr{border-top-color:#e08e0b}.alert-warning .alert-link{color:#e6e6e6}.alert-danger{background-color:#e74c3c;border-color:#e74c3c;color:#ffffff}.alert-danger hr{border-top-color:#e43725}.alert-danger .alert-link{color:#e6e6e6}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:21px;margin-bottom:21px;background-color:#ecf0f1;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:13px;line-height:21px;color:#ffffff;text-align:center;background-color:#2c3e50;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#18bc9c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#3498db}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#f39c12}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#e74c3c}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#ffffff;border:1px solid #ecf0f1}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333333}a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus{text-decoration:none;color:#555555;background-color:#ecf0f1}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{background-color:#ecf0f1;color:#b4bcc2;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#b4bcc2}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#ffffff;background-color:#2c3e50;border-color:#2c3e50}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#8aa4be}.list-group-item-success{color:#ffffff;background-color:#18bc9c}a.list-group-item-success,button.list-group-item-success{color:#ffffff}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus{color:#ffffff;background-color:#15a589}a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-info{color:#ffffff;background-color:#3498db}a.list-group-item-info,button.list-group-item-info{color:#ffffff}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus{color:#ffffff;background-color:#258cd1}a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-warning{color:#ffffff;background-color:#f39c12}a.list-group-item-warning,button.list-group-item-warning{color:#ffffff}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus{color:#ffffff;background-color:#e08e0b}a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-danger{color:#ffffff;background-color:#e74c3c}a.list-group-item-danger,button.list-group-item-danger{color:#ffffff}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus{color:#ffffff;background-color:#e43725}a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:21px;background-color:#ffffff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:17px;color:inherit}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#ecf0f1;border-top:1px solid #ecf0f1;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ecf0f1}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:21px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #ecf0f1}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ecf0f1}.panel-default{border-color:#ecf0f1}.panel-default>.panel-heading{color:#2c3e50;background-color:#ecf0f1;border-color:#ecf0f1}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ecf0f1}.panel-default>.panel-heading .badge{color:#ecf0f1;background-color:#2c3e50}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ecf0f1}.panel-primary{border-color:#2c3e50}.panel-primary>.panel-heading{color:#ffffff;background-color:#2c3e50;border-color:#2c3e50}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#2c3e50}.panel-primary>.panel-heading .badge{color:#2c3e50;background-color:#ffffff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#2c3e50}.panel-success{border-color:#18bc9c}.panel-success>.panel-heading{color:#ffffff;background-color:#18bc9c;border-color:#18bc9c}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#18bc9c}.panel-success>.panel-heading .badge{color:#18bc9c;background-color:#ffffff}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#18bc9c}.panel-info{border-color:#3498db}.panel-info>.panel-heading{color:#ffffff;background-color:#3498db;border-color:#3498db}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#3498db}.panel-info>.panel-heading .badge{color:#3498db;background-color:#ffffff}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#3498db}.panel-warning{border-color:#f39c12}.panel-warning>.panel-heading{color:#ffffff;background-color:#f39c12;border-color:#f39c12}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#f39c12}.panel-warning>.panel-heading .badge{color:#f39c12;background-color:#ffffff}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#f39c12}.panel-danger{border-color:#e74c3c}.panel-danger>.panel-heading{color:#ffffff;background-color:#e74c3c;border-color:#e74c3c}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#e74c3c}.panel-danger>.panel-heading .badge{color:#e74c3c;background-color:#ffffff}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#e74c3c}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#ecf0f1;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:22.5px;font-weight:bold;line-height:1;color:#000000;text-shadow:none;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#ffffff;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:0.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{padding:20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:13px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:0.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;background-color:#000000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:15px;background-color:#ffffff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:15px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999999;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999999;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.next,.carousel-inner>.item.active.right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:0.5;filter:alpha(opacity=50);font-size:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.0001)));background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.0001)), to(rgba(0,0,0,0.5)));background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #ffffff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#ffffff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-header:before,.modal-header:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-header:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:768px){.visible-xs{display:block !important}table.visible-xs{display:table !important}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:768px){.visible-xs-block{display:block !important}}@media (max-width:768px){.visible-xs-inline{display:inline !important}}@media (max-width:768px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table !important}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table !important}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table !important}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:768px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table !important}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}.navbar{border-width:0}.navbar-default .badge{background-color:#fff;color:#2c3e50}.navbar-inverse .badge{background-color:#fff;color:#18bc9c}.navbar-brand{line-height:1}.btn{border-width:2px}.btn:active{-webkit-box-shadow:none;box-shadow:none}.btn-group.open .dropdown-toggle{-webkit-box-shadow:none;box-shadow:none}.text-primary,.text-primary:hover{color:#2c3e50}.text-success,.text-success:hover{color:#18bc9c}.text-danger,.text-danger:hover{color:#e74c3c}.text-warning,.text-warning:hover{color:#f39c12}.text-info,.text-info:hover{color:#3498db}table a:not(.btn),.table a:not(.btn){text-decoration:underline}table .dropdown-menu a,.table .dropdown-menu a{text-decoration:none}table .success,.table .success,table .warning,.table .warning,table .danger,.table .danger,table .info,.table .info{color:#fff}table .success>th>a,.table .success>th>a,table .warning>th>a,.table .warning>th>a,table .danger>th>a,.table .danger>th>a,table .info>th>a,.table .info>th>a,table .success>td>a,.table .success>td>a,table .warning>td>a,.table .warning>td>a,table .danger>td>a,.table .danger>td>a,table .info>td>a,.table .info>td>a,table .success>a,.table .success>a,table .warning>a,.table .warning>a,table .danger>a,.table .danger>a,table .info>a,.table .info>a{color:#fff}table>thead>tr>th,.table>thead>tr>th,table>tbody>tr>th,.table>tbody>tr>th,table>tfoot>tr>th,.table>tfoot>tr>th,table>thead>tr>td,.table>thead>tr>td,table>tbody>tr>td,.table>tbody>tr>td,table>tfoot>tr>td,.table>tfoot>tr>td{border:none}table-bordered>thead>tr>th,.table-bordered>thead>tr>th,table-bordered>tbody>tr>th,.table-bordered>tbody>tr>th,table-bordered>tfoot>tr>th,.table-bordered>tfoot>tr>th,table-bordered>thead>tr>td,.table-bordered>thead>tr>td,table-bordered>tbody>tr>td,.table-bordered>tbody>tr>td,table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ecf0f1}.form-control,input{border-width:2px;-webkit-box-shadow:none;box-shadow:none}.form-control:focus,input:focus{-webkit-box-shadow:none;box-shadow:none}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label,.has-warning .form-control-feedback{color:#f39c12}.has-warning .form-control,.has-warning .form-control:focus{border:2px solid #f39c12}.has-warning .input-group-addon{border-color:#f39c12}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label,.has-error .form-control-feedback{color:#e74c3c}.has-error .form-control,.has-error .form-control:focus{border:2px solid #e74c3c}.has-error .input-group-addon{border-color:#e74c3c}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label,.has-success .form-control-feedback{color:#18bc9c}.has-success .form-control,.has-success .form-control:focus{border:2px solid #18bc9c}.has-success .input-group-addon{border-color:#18bc9c}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{border-color:transparent}.pager a,.pager a:hover{color:#fff}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{background-color:#3be6c4}.close{color:#fff;text-decoration:none;opacity:0.4}.close:hover,.close:focus{color:#fff;opacity:1}.alert .alert-link{color:#fff;text-decoration:underline}.progress{height:10px;-webkit-box-shadow:none;box-shadow:none}.progress .progress-bar{font-size:10px;line-height:10px}.well{-webkit-box-shadow:none;box-shadow:none}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{border-color:#ecf0f1}a.list-group-item-success.active{background-color:#18bc9c}a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{background-color:#15a589}a.list-group-item-warning.active{background-color:#f39c12}a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{background-color:#e08e0b}a.list-group-item-danger.active{background-color:#e74c3c}a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{background-color:#e43725}.panel-default .close{color:#2c3e50}.modal .close{color:#2c3e50}.popover{color:#2c3e50}
\ No newline at end of file
diff --git a/src/assets/css/font-awesome.min.css b/src/assets/css/font-awesome.min.css
new file mode 100644
index 0000000..540440c
--- /dev/null
+++ b/src/assets/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
diff --git a/src/assets/css/styles.css b/src/assets/css/styles.css
index 2a53b2d..6653f86 100644
--- a/src/assets/css/styles.css
+++ b/src/assets/css/styles.css
@@ -12,6 +12,16 @@
margin: 15px !important;
}
+.with-horizontal-margin {
+ margin-left: 15px !important;
+ margin-right: 15px !important;
+}
+
+.with-vertical-margin {
+ margin-top: 15px !important;
+ margin-bottom: 15px !important;
+}
+
.with-padding {
padding: 15px !important;
}
@@ -20,6 +30,11 @@
padding: 0 !important;
}
+.no-vertical-padding {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+}
+
.no-margin {
margin: 0 !important;
}
@@ -41,10 +56,6 @@ tr.selected {
cursor: pointer;
}
-.align-r {
- text-align: right;
-}
-
.progress {
background: #fff !important;
}
@@ -60,6 +71,16 @@ tr.selected {
margin: 0 16px 16px 0;
}
+nav .profile-photo img {
+ width: 40px;
+ height: 40px;
+ margin: 10px;
+}
+
+.winners-stand .profile-photo img {
+ margin: 10px auto;
+}
+
.container-fluid {
padding: 0 !important;
}
@@ -72,4 +93,137 @@ tr.selected {
.alert {
border-radius: 0 !important;
margin-top: -21px;
-}
\ No newline at end of file
+}
+
+#profileChartWrapper {
+ height: 300px;
+}
+
+.text-ellipsis {
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+}
+
+.pager {
+ background-color: #ecf0f1;
+ border-radius: 15px;
+}
+
+.pager li.right a {
+ border-radius: 0 15px 15px 0;
+}
+
+.pager li.left a {
+ border-radius: 15px 0 0 15px;
+}
+
+.winners-stand {
+ margin-bottom: 15px;
+}
+
+.list-group-item {
+ overflow: hidden !important;
+ padding-left: 30px !important;
+}
+
+.list-group-item-lt-info {
+ background-color: #d6efff;
+}
+
+.col-options {
+ display: block;
+ width: 30px;
+ position: absolute;
+ top: 15px;
+ left: 10px;
+ bottom: 15px;
+ z-index: 150;
+}
+
+@media (min-width: 768px) {
+ .h6-large {
+ font-size: 16px;
+ }
+}
+
+.text-lt-success {
+ color: #d6fff6;
+}
+
+.switch {
+ display: inline-block;
+ position: relative;
+}
+
+.switch span {
+ display: inline-block;
+ vertical-align: middle;
+ height: 34px;
+ line-height: 34px;
+ padding: 0 15px;
+}
+
+.switch-box {
+ position: relative;
+ display: inline-block;
+ width: 60px;
+ height: 34px;
+ vertical-align: middle;
+ margin: 0;
+}
+
+.switch-box input {display:none;}
+
+.switch-box .slider {
+ position: absolute;
+ cursor: pointer;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: #ecf0f1;
+ -webkit-transition: .4s;
+ transition: .4s;
+ border-radius: 34px;
+
+}
+
+.switch-box .slider:before {
+ position: absolute;
+ content: "";
+ height: 26px;
+ width: 26px;
+ left: 4px;
+ bottom: 4px;
+ background-color: white;
+ -webkit-transition: .4s;
+ transition: .4s;
+ border-radius: 50%;
+}
+
+input:checked + .slider.slider-success {
+ background-color: #18bc9c;
+}
+
+input:checked + .slider.slider-info {
+ background-color: #3498db;
+}
+
+input:checked + .slider.slider-danger {
+ background-color: #e74c3c;
+}
+
+input:checked + .slider.slider-warning {
+ background-color: #f39c12;
+}
+
+input:checked + .slider.slider-primary {
+ background-color: #2c3e50;
+}
+
+input:checked + .slider:before {
+ -webkit-transform: translateX(26px);
+ -ms-transform: translateX(26px);
+ transform: translateX(26px);
+}
diff --git a/src/assets/fonts/FontAwesome.otf b/src/assets/fonts/FontAwesome.otf
new file mode 100644
index 0000000..401ec0f
Binary files /dev/null and b/src/assets/fonts/FontAwesome.otf differ
diff --git a/src/assets/fonts/fontawesome-webfont.eot b/src/assets/fonts/fontawesome-webfont.eot
new file mode 100644
index 0000000..e9f60ca
Binary files /dev/null and b/src/assets/fonts/fontawesome-webfont.eot differ
diff --git a/src/assets/fonts/fontawesome-webfont.svg b/src/assets/fonts/fontawesome-webfont.svg
new file mode 100644
index 0000000..855c845
--- /dev/null
+++ b/src/assets/fonts/fontawesome-webfont.svg
@@ -0,0 +1,2671 @@
+
+
+
+
+Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016
+ By ,,,
+Copyright Dave Gandy 2016. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/fonts/fontawesome-webfont.ttf b/src/assets/fonts/fontawesome-webfont.ttf
new file mode 100644
index 0000000..35acda2
Binary files /dev/null and b/src/assets/fonts/fontawesome-webfont.ttf differ
diff --git a/src/assets/fonts/fontawesome-webfont.woff b/src/assets/fonts/fontawesome-webfont.woff
new file mode 100644
index 0000000..400014a
Binary files /dev/null and b/src/assets/fonts/fontawesome-webfont.woff differ
diff --git a/src/assets/fonts/fontawesome-webfont.woff2 b/src/assets/fonts/fontawesome-webfont.woff2
new file mode 100644
index 0000000..4d13fc6
Binary files /dev/null and b/src/assets/fonts/fontawesome-webfont.woff2 differ
diff --git a/src/errors.js b/src/errors.js
new file mode 100644
index 0000000..d919c3f
--- /dev/null
+++ b/src/errors.js
@@ -0,0 +1,24 @@
+import ExtendableError from 'es6-error';
+
+export class APIError extends ExtendableError {
+ constructor(message, serverResponse) {
+ super(message);
+ this.serverResponse = serverResponse;
+ }
+
+ toDebugString() {
+ return JSON.stringify(this.serverResponse, null, 2);
+ }
+}
+
+export class APIUnauthorizedError extends APIError {
+ constructor(serverResponse) {
+ super('Session has expired.', serverResponse);
+ }
+}
+
+export class APIForbiddenError extends APIError {
+ constructor(serverResponse) {
+ super('Access denied', serverResponse);
+ }
+}
diff --git a/src/homepage/components/App.js b/src/homepage/components/App.js
index e218107..cb104f0 100644
--- a/src/homepage/components/App.js
+++ b/src/homepage/components/App.js
@@ -1,6 +1,12 @@
import React from 'react';
import Header from '../../shared/components/Header';
-import QuestionModal from '../../shared/components/QuestionModal';
+import ModalMessage from '../../shared/components/QuestionModal';
+import { ListGroupItem } from 'react-bootstrap';
+import {utils} from 'react-bootstrap';
+
+utils.bootstrapUtils.addStyle(ListGroupItem, 'lt-success');
+utils.bootstrapUtils.addStyle(ListGroupItem, 'default');
+
export default class App extends React.Component {
render() {
@@ -8,7 +14,7 @@ export default class App extends React.Component {
return (
-
+
{children}
diff --git a/src/homepage/components/JoinTeamForm.js b/src/homepage/components/JoinTeamForm.js
deleted file mode 100644
index b77aef9..0000000
--- a/src/homepage/components/JoinTeamForm.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import React from 'react';
-import { connect } from 'react-redux';
-import { Row, Col, Form, FormGroup, FormControl, Button } from 'react-bootstrap';
-import { requestJoinTeam } from '../../shared/teams/teams.actions.js';
-
-const mapDispatchToProps = (dispatch) => ({
- joinTeam: (team, username) => dispatch(requestJoinTeam(team, username)),
-});
-
-@connect(null, mapDispatchToProps)
-export default class JoinTeamForm extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- team: '',
- username: '',
- };
- }
-
- handleJoinTeam = () => {
- const { joinTeam } = this.props;
- const { team, username } = this.state;
- joinTeam(team, username);
- };
-
- handleChange = (field) => (event) => {
- this.setState({ [field]: event.target.value });
- };
-
- render() {
- return (
-
- );
- }
-}
diff --git a/src/homepage/components/TeamAssignment.js b/src/homepage/components/TeamAssignment.js
index 3801d9a..8b8f706 100644
--- a/src/homepage/components/TeamAssignment.js
+++ b/src/homepage/components/TeamAssignment.js
@@ -2,10 +2,10 @@ import React from 'react';
import {Panel, Grid, Row} from 'react-bootstrap';
import {connect} from 'react-redux';
import TeamCreationForm from './TeamCreationForm';
-import JoinTeamForm from './JoinTeamForm';
+import JoinTeamForm from '../../teams/components/JoinTeamForm';
const mapStateToProps = ({teams}) => ({
- pending: teams.pending,
+ my_pending: teams.my_pending,
});
const TeamAssignment = (props) => (
@@ -18,8 +18,8 @@ const TeamAssignment = (props) => (
{
- props.pending > 0 ?
-
Number of pending join requests: {props.pending} :
+ props.my_pending > 0 ?
+
Number of pending join requests: {props.my_pending} :
null
}
Create team:
diff --git a/src/homepage/components/TeamCreationForm.js b/src/homepage/components/TeamCreationForm.js
index 4ebfeed..04fb1fa 100644
--- a/src/homepage/components/TeamCreationForm.js
+++ b/src/homepage/components/TeamCreationForm.js
@@ -1,7 +1,7 @@
import React from 'react';
import {connect} from 'react-redux';
import {Row, Col, Form, FormGroup, FormControl, Button} from 'react-bootstrap';
-import {requestCreateTeam} from '../../shared/teams/teams.actions.js';
+import {requestCreateTeam} from '../../teams/teams.actions.js';
const mapDispatchToProps = (dispatch) => ({
createTeam: (team, username) => dispatch(requestCreateTeam(team, username)),
diff --git a/src/homepage/root.reducer.js b/src/homepage/root.reducer.js
index 5d000a3..3a83f69 100644
--- a/src/homepage/root.reducer.js
+++ b/src/homepage/root.reducer.js
@@ -2,12 +2,13 @@ import users from '../users/users.reducer';
import notifications from '../shared/notifier.reducer';
import profile from '../profile/profile.reducer';
import tournaments from '../tournament/tournaments.reducer';
-import auth from '../shared/auth.reducer';
+import auth from '../shared/auth/auth.reducer';
import ranking from '../ranking/ranking.reducer';
import modal from '../shared/modal.reducer';
import matches from '../matches/matches.reducer';
import play from '../play/play.reducer';
-import teams from '../shared/teams/teams.reducer';
+import teams from '../teams/teams.reducer';
+import { reducer as form } from 'redux-form'
import {combineReducers} from 'redux';
const reducer = combineReducers({
@@ -21,6 +22,7 @@ const reducer = combineReducers({
matches, // A state for matches list
play, // Currently played match
teams, // Available teams
+ form, // Current state of forms across the app
});
export default reducer;
diff --git a/src/homepage/root.sagas.js b/src/homepage/root.sagas.js
index 5660a6c..40da51f 100644
--- a/src/homepage/root.sagas.js
+++ b/src/homepage/root.sagas.js
@@ -1,18 +1,21 @@
-import { loginFlow } from '../shared/auth.sagas';
+import { loginFlow, sessionExpired } from '../shared/auth/auth.sagas';
import { logger } from '../shared/logger.sagas';
import { routerSaga } from '../shared/routes.sagas';
import { publish, removeMatch } from '../matches/matches.sagas';
import { playScore } from '../play/play.sagas';
-import { teams } from '../shared/teams/teams.sagas';
+import { teams } from '../teams/teams.sagas';
+import { onRequestSaveSettings } from '../settings/settings.sagas';
export default function* rootSaga() {
yield [
teams(),
logger(),
+ sessionExpired(),
loginFlow(),
routerSaga(),
publish(),
removeMatch(),
playScore(),
+ onRequestSaveSettings(),
];
}
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 17d0fd4..bbf479a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -4,23 +4,32 @@ import App from './homepage/components/App';
import { Provider } from 'react-redux';
import { Router, Route, browserHistory } from 'react-router';
import store from './store';
-import MatchLayout from './play/components/PlayLayout';
-import ProfileLayout from './profile/components/ProfileLayout';
+import PlayLayout from './play/components/PlayLayout';
+import { ProfileLayout, ProfileMatches, ProfileTeams, ProfileSettings } from './profile/components';
import RankingLayout from './ranking/components/RankingLayout';
import MatchesLayout from './matches/components/MatchesLayout';
import SettingsLayout from './settings/components/SettingsLayout';
import TeamAssignment from './homepage/components/TeamAssignment';
import IntroLayout from './homepage/components/IntroLayout';
-import ProfileMatches from './profile/components/ProfileMatches';
import './assets/css/bootstrap.min.css';
+import './assets/css/font-awesome.min.css';
import './assets/css/styles.css';
import './utils/object';
import './utils/doughnutText';
import {loadState} from './persistence';
+const hasToken = (state) => state &&
+ state.hasOwnProperty('auth') &&
+ state.auth.hasOwnProperty('token');
+
+const hasJoinedTeam = (state) => state &&
+ state.hasOwnProperty('teams') &&
+ state.teams.hasOwnProperty('joined') &&
+ state.teams.joined.length >= 1;
+
function requireAuth(nextState, replace, next) {
const persistedState = loadState();
- if (!(persistedState.hasOwnProperty('auth') && persistedState.auth.hasOwnProperty('token'))) {
+ if (!hasToken(persistedState)) {
replace({
pathname: "/",
state: {nextPathname: nextState.location.pathname}
@@ -28,14 +37,27 @@ function requireAuth(nextState, replace, next) {
}
next();
}
+function homepage(nextState, replace, next) {
+ const persistedState = loadState();
+ const isToken = hasToken(persistedState);
+ const isJoinedTeam = hasJoinedTeam(persistedState)
+ if (isToken && isJoinedTeam) {
+ replace({
+ pathname: "/match",
+ state: {nextPathname: nextState.location.pathname}
+ });
+ } else if (isToken && !isJoinedTeam) {
+ replace({
+ pathname: "/welcome",
+ state: {nextPathname: nextState.location.pathname}
+ });
+ }
+ next();
+}
function hasTeams(nextState, replace, next) {
const persistedState = loadState();
- if (
- persistedState.hasOwnProperty('teams') &&
- persistedState.teams.hasOwnProperty('joined') &&
- persistedState.teams.joined.length >= 1
- ) {
+ if (hasJoinedTeam(persistedState)) {
replace({
pathname: "/match",
state: {nextPathname: nextState.location.pathname}
@@ -50,16 +72,20 @@ ReactDOM.render(
-
+
-
+
+
+
+ {/* */}
+
{/* */}
diff --git a/src/matches/components/MatchItem.js b/src/matches/components/MatchItem.js
index f20f6ce..85e4b94 100644
--- a/src/matches/components/MatchItem.js
+++ b/src/matches/components/MatchItem.js
@@ -1,37 +1,46 @@
import React from 'react';
-import { Row, Col, Glyphicon, Button } from 'react-bootstrap';
+import {Col, Glyphicon, Button, ListGroupItem} from 'react-bootstrap';
+import Icon from 'react-fontawesome';
-const MatchItem = (params) => {
+
+const MatchItem = ({match, username, onRemove, withOptions, signed}) => {
const highlight = (
- params.red_score > params.blue_score &&
- (params.username === params.red_att || params.username === params.red_def)
- ) || (
- params.red_score < params.blue_score &&
- (params.username === params.blue_att || params.username === params.blue_def)
- );
+ match.red_score > match.blue_score &&
+ (username === match.red_att || username === match.red_def)
+ ) || (
+ match.red_score < match.blue_score &&
+ (username === match.blue_att || username === match.blue_def)
+ );
return (
-
-
- {params.red_def}, {params.red_att}
+
+ { withOptions &&
+
+
+
+ }
+
+ {match.red_def} [D], {match.red_att} [A]
+ {match.blue_def} [D], {match.blue_att} [A]
-
- {params.red_score} - {params.blue_score}
+
+ {match.red_def} [D], {match.red_att} [A]
-
- {params.blue_att}, {params.blue_def}
+
+
+ {match.red_score}
+ -
+ {match.blue_score}
+
+ {Math.abs(match.points) * (!highlight && signed ? -1 : 1)}xp
+
+ { highlight && }
+
+
-
- {Math.abs(params.points) * (!highlight && params.withOptions ? -1 : 1)}
+
+ {match.blue_def} [D], {match.blue_att} [A]
- { params.withOptions ?
-
-
-
-
- :
- null
- }
-
+
);
};
diff --git a/src/matches/components/MatchList.js b/src/matches/components/MatchList.js
index 73402ec..8042744 100644
--- a/src/matches/components/MatchList.js
+++ b/src/matches/components/MatchList.js
@@ -1,50 +1,36 @@
import React from 'react';
-import {Table, Row, Col} from 'react-bootstrap';
+import { ListGroup, ListGroupItem } from 'react-bootstrap';
import MatchItem from './MatchItem';
+import Switch from '../../shared/components/Switch';
+
export default class MatchList extends React.Component {
+ getMatchItem = () => {
+ const { withOptions, onRemove, username, signed } = this.props;
+ return (match, idx) => (
+
+ );
+ };
+
render() {
- const { matches, withOptions, onRemove, username } = this.props;
+ const {matches, count, switchDeleteMode} = this.props;
return (
-
-
-
-
- Red team
-
-
- Score
-
-
- Blue team
-
-
- EXP
-
- {
- withOptions ?
-
- Options
- :
- null
- }
-
-
-
- {
- matches.map((match, idx) =>
-
- )
- }
-
-
+
+ { matches.map(this.getMatchItem()) }
+
+ Delete mode
+ Total matches: { count }
+
+
);
+
};
}
diff --git a/src/matches/components/MatchesLayout.js b/src/matches/components/MatchesLayout.js
index eb3a440..a520cef 100644
--- a/src/matches/components/MatchesLayout.js
+++ b/src/matches/components/MatchesLayout.js
@@ -16,14 +16,14 @@ export default class MatchesLayout extends React.Component {
return (
-
+
Matches
-
-
+
+
diff --git a/src/matches/matches.reducer.js b/src/matches/matches.reducer.js
index 9af6144..2b970a2 100644
--- a/src/matches/matches.reducer.js
+++ b/src/matches/matches.reducer.js
@@ -1,6 +1,8 @@
import * as types from './match.types';
-export default (state = { page: 1, totalPages: 1, list: [] }, action) => {
+export const defaultData = {list: [], page: 1, totalPages: 1, count: 0 };
+
+export default (state = defaultData, action) => {
switch (action.type) {
case types.LIST:
return {
@@ -8,6 +10,7 @@ export default (state = { page: 1, totalPages: 1, list: [] }, action) => {
list: action.response.results,
page: parseInt(action.response.page, 10),
totalPages: Math.ceil(action.response.count / action.response.page_size),
+ count: action.response.count,
};
default:
return state;
diff --git a/src/matches/matches.sagas.js b/src/matches/matches.sagas.js
index b7465bb..b39bd55 100644
--- a/src/matches/matches.sagas.js
+++ b/src/matches/matches.sagas.js
@@ -6,11 +6,13 @@ import { removed } from './match.actions';
import { showInfo, raiseError } from '../shared/notifier.actions';
import { fetchUpdateUsers } from '../users/users.sagas';
+export const stateTeamsSelectedSelector = state => state.teams.selected;
+
export function* publish() {
const success_msg = points => `Match successfully saved. Red: ${points}, Blue: ${-points}`;
while (true) {
const action = yield take(PUBLISH);
- const currentTeamId = yield select(state => state.teams.selected);
+ const currentTeamId = yield select(stateTeamsSelectedSelector);
const url = api.urls.teamMatchList(currentTeamId);
try {
const response = yield call(api.requests.post, url, action.match_data, 'Failed to send match to server');
@@ -27,25 +29,24 @@ export function* publish() {
export function* removeMatch() {
while (true) {
const action = yield take(DELETE);
- const currentTeamId = yield select(state => state.teams.selected);
+ const currentTeamId = yield select(stateTeamsSelectedSelector);
const url = api.urls.teamMatchEntity(currentTeamId, action.id);
try {
yield call(api.requests['delete'], url);
yield put(removed(action.id));
} catch (error) {
- console.error(error);
yield put(raiseError(error));
}
}
}
export function* listMatches({page}) {
- const currentTeamId = yield select(state => state.teams.selected);
+ const currentTeamId = yield select(stateTeamsSelectedSelector);
const url = api.urls.teamMatchList(currentTeamId);
try {
- const matches = yield call(api.requests.get, url, { page });
+ const matches = yield call(api.requests.get, url, { page }, 'Failed to retrieve a list of matches.');
yield put(list(matches));
} catch (error) {
- yield put(raiseError('Failed to retrieve a list of matches.'));
+ yield put(raiseError(error));
}
}
diff --git a/src/play/components/FoosballTable.js b/src/play/components/FoosballTable.js
index 3fe5d61..11e2af6 100644
--- a/src/play/components/FoosballTable.js
+++ b/src/play/components/FoosballTable.js
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { Row, Col, ButtonGroup, Image, Well } from 'react-bootstrap';
import { connect } from 'react-redux';
+import { publish } from '../../matches/match.actions';
import UserPicker from '../../users/components/UserPicker';
import PlayResult from './PlayResult';
import PlayStats from './PlayStats';
@@ -17,12 +18,13 @@ const mapDispatchToProps = (dispatch) => ({
try { dispatch(choosePlayersForMatch()) }
catch(err) { dispatch(raiseError(err.message)); }
},
+ publishMatch: (data, callback) => dispatch(publish(data, callback)),
});
@connect(mapStateToProps, mapDispatchToProps)
class FoosballTable extends Component {
render() {
- const { users, swapSides, swapPositions, regenerate } = this.props;
+ const { users, swapSides, swapPositions, regenerate, publishMatch } = this.props;
const playing = users.filter(u => u.playing);
return (
@@ -31,23 +33,23 @@ class FoosballTable extends Component {
-
+
-
-
+
+
-
+
-
-
+
+
-
+
{ playing.length === 4 ? : null }
);
diff --git a/src/play/components/PlayResult.js b/src/play/components/PlayResult.js
index c34e1d0..d319659 100644
--- a/src/play/components/PlayResult.js
+++ b/src/play/components/PlayResult.js
@@ -1,14 +1,7 @@
import React from 'react';
-import { connect } from 'react-redux';
-import * as MatchActions from '../../matches/match.actions';
import { Button, Row, Col, FormControl } from 'react-bootstrap';
-const mapStateToProps = ({users}) => ({users});
-const mapDispatchToProps = (dispatch) => ({
- publish: (data, callback) => dispatch(MatchActions.publish(data, callback)),
-});
-@connect(mapStateToProps, mapDispatchToProps)
class PlayResult extends React.Component {
constructor(props) {
super(props);
@@ -21,14 +14,13 @@ class PlayResult extends React.Component {
onInputChange = (team) => (event) => this.setState({ [team]: event.target.value });
handleFinish = () => {
- const { users, publish } = this.props;
- const players = users.filter(u => u.playing);
+ const { players, onPublish } = this.props;
const requestData = {
...(players.reduce((o, p) => Object.assign(o, {[`${p.team}_${p.position}`]: p.username}), {})),
red_score: this.state.red,
blue_score: this.state.blue,
};
- publish(requestData, this.clear);
+ onPublish(requestData, this.clear);
};
clear = () => this.setState({ blue: 0, red: 0, });
@@ -41,11 +33,11 @@ class PlayResult extends React.Component {
@@ -53,11 +45,11 @@ class PlayResult extends React.Component {
diff --git a/src/play/components/PlayToolbar.jsx b/src/play/components/PlayToolbar.js
similarity index 100%
rename from src/play/components/PlayToolbar.jsx
rename to src/play/components/PlayToolbar.js
diff --git a/src/play/play.sagas.js b/src/play/play.sagas.js
index 675ce93..1969dca 100644
--- a/src/play/play.sagas.js
+++ b/src/play/play.sagas.js
@@ -1,27 +1,34 @@
-import { call, take, put, select } from 'redux-saga/effects';
+import { call, put, select, takeLatest } from 'redux-saga/effects';
import api from '../api';
-import { CHOOSE } from '../users/user.types';
+import { getCurrentTeam } from '../teams/teams.sagas';
+import { CHOOSE, SWAP_SIDES, SWAP_POSITIONS, ASSIGN } from '../users/user.types';
import { raiseError } from '../shared/notifier.actions';
import { requestStatsDone } from './play.actions';
-export function* playScore() {
- while (true) {
- yield take(CHOOSE);
- const players = yield select(
- ({users}) => users
- .filter(u => u.playing)
- .reduce(
- (data, player) => Object.assign(data, {[`${player.team}_${player.position}`]: player.id}),
- {}
- )
- );
- const currentTeamId = yield select(state => state.teams.selected);
- const url = api.urls.teamMatchPoints(currentTeamId);
- try {
- const response = yield call(api.requests.get, url, players, 'Unable to get match score statistics.');
- yield put(requestStatsDone(response));
- } catch (error) {
- yield put(raiseError(error));
- }
+export const stateUsersPlayingSelector = ({users}) => users
+ .filter(u => u.playing)
+ .reduce(
+ (data, player) => Object.assign(data, {[`${player.team}_${player.position}`]: player.id}),
+ {}
+ );
+
+
+export function* fetchPlayScore() {
+ const players = yield select(stateUsersPlayingSelector);
+ if (Object.keys(players).length !== 4) return;
+ const currentTeam = yield call(getCurrentTeam);
+ const url = api.urls.teamMatchPoints(currentTeam.id);
+ try {
+ const response = yield call(api.requests.get, url, players, 'Unable to get match score statistics.');
+ yield put(requestStatsDone(response));
+ } catch (error) {
+ yield put(raiseError(error));
}
}
+
+export function* playScore() {
+ yield takeLatest(CHOOSE, fetchPlayScore);
+ yield takeLatest(SWAP_POSITIONS, fetchPlayScore);
+ yield takeLatest(SWAP_SIDES, fetchPlayScore);
+ yield takeLatest(ASSIGN, fetchPlayScore);
+}
diff --git a/src/profile/components/Gravatar.js b/src/profile/components/Gravatar.js
new file mode 100644
index 0000000..c6b35c1
--- /dev/null
+++ b/src/profile/components/Gravatar.js
@@ -0,0 +1,14 @@
+import React from 'react'
+import md5 from 'md5';
+
+const Gravatar = ({email}) => {
+ if (!email) return null;
+ const avatarURL = `https://www.gravatar.com/avatar/${md5(email)}?s=200`;
+ return (
+
+
+
+ );
+};
+
+export default Gravatar;
diff --git a/src/profile/components/ProfileChart.js b/src/profile/components/ProfileChart.js
index b019ce1..ae3544e 100644
--- a/src/profile/components/ProfileChart.js
+++ b/src/profile/components/ProfileChart.js
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import Chart from 'chart.js';
-import { Col } from 'react-bootstrap';
import Loading from '../../shared/components/Loading';
export default class ProfileChart extends Component {
@@ -21,7 +20,9 @@ export default class ProfileChart extends Component {
display: false,
}
}]
- }
+ },
+ responsive: true,
+ maintainAspectRatio: false,
};
const ctx = this.chartDOM;
const { profile: { exp_history } } = this.props;
@@ -63,16 +64,20 @@ export default class ProfileChart extends Component {
render() {
const { profile: {exp_history}, profile } = this.props;
return (
-
- History
- {
- Object.keys(profile).length === 0 ?
- :
- exp_history ?
- { this.chartDOM = chart; }} /> :
- Sorry, user has no experience points history.
- }
-
+
+
Exp history
+ {
+ Object.keys(profile).length === 0 ?
+
:
+ exp_history ?
+
+ {
+ this.chartDOM = chart;
+ }}/>
+
:
+
Sorry, user has no experience points history.
+ }
+
);
}
}
diff --git a/src/profile/components/ProfileLayout.js b/src/profile/components/ProfileLayout.js
index ca81fe3..e6c3c5b 100644
--- a/src/profile/components/ProfileLayout.js
+++ b/src/profile/components/ProfileLayout.js
@@ -2,41 +2,66 @@ import React from 'react';
import { connect } from 'react-redux';
import ProfileChart from './ProfileChart';
import ProfileStats from './ProfileStats';
-import { Panel, NavItem, Nav } from 'react-bootstrap';
+import { Row, Col, Panel, NavItem, Nav, Glyphicon } from 'react-bootstrap';
import { withRouter } from 'react-router';
import { LinkContainer } from 'react-router-bootstrap';
-import md5 from 'md5';
+import Icon from 'react-fontawesome';
+import Gravatar from './Gravatar';
+
+const mapStateToProps = ({profile, auth}) => ({
+ profile,
+ myUsername: auth.profile.username,
+});
-const mapStateToProps = ({profile}) => ({profile});
@withRouter
@connect(mapStateToProps, null)
export default class ProfileLayout extends React.Component {
render() {
- const { children, profile, params: {username}} = this.props;
- const avatarURL = !profile.email ? '' : `https://www.gravatar.com/avatar/${md5(profile.email )}`;
+ const { children, profile, params: {username}, myUsername} = this.props;
return (
-
-
-
+
{ username } { profile.exp } XP
-
-
- Statistics
+
+
+
+ Statistics
+
-
- Matches played
+
+
+ Matches
+
+ { myUsername === username ?
+
+
+ Teams
+
+ :
+ null }
+ { myUsername === username ?
+
+
+ Settings
+
+ : null }
{ children ?
children :
-
-
+
+
+
+
+
+
+
+
}
diff --git a/src/profile/components/ProfileMatches.js b/src/profile/components/ProfileMatches.js
index d1549d8..e8fa00d 100644
--- a/src/profile/components/ProfileMatches.js
+++ b/src/profile/components/ProfileMatches.js
@@ -6,6 +6,7 @@ import * as ModalActions from '../../shared/modal.actions';
import * as MatchActions from '../../matches/match.actions';
import NaivePager from '../../shared/components/NaivePager';
import Loading from '../../shared/components/Loading';
+import { defaultData } from '../../matches/matches.reducer';
const mapStateToProps = ({ profile: { matches } }) => ({ matches });
const mapDispatchToProps = (dispatch) => ({
@@ -13,29 +14,54 @@ const mapDispatchToProps = (dispatch) => ({
remove: (id) => dispatch(MatchActions.remove(id)),
});
-const ProfileMatches = ({ matches = {list: [], page: 1, totalPages:1}, onRemove, remove, params: {username} }) => {
- const askToRemove = (match) => (event) => {
+@connect(mapStateToProps, mapDispatchToProps)
+export default class ProfileMatches extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ deleteMode: false,
+ };
+ }
+
+ switchDeleteMode = ({target: {checked}}) => {
+ this.setState({deleteMode: checked});
+ };
+
+ askToRemove = (match) => (event) => {
+ const {onRemove, remove} = this.props;
const params = {
title: 'Are you sure?',
- heading: 'You are about to remove the following match:',
+ heading: 'You are about to remove the following match:',
text: `${match.id}) ${match.red_def} ${match.red_att} [${match.red_score} - ${match.blue_score}] \
- ${match.blue_att} ${match.blue_def}`,
+ ${match.blue_att} ${match.blue_def}`,
onAccept: () => remove(match.id),
+ onReject: () => {},
};
onRemove(params);
event.preventDefault();
};
- return (
-
- Matches
-
- {
- matches.list ?
- :
-
- }
-
- );
-};
-export default connect(mapStateToProps, mapDispatchToProps)(ProfileMatches);
+ render() {
+ const { matches = defaultData, params: {username} } = this.props;
+ const { deleteMode } = this.state;
+ return (
+
+
+ {
+ matches.list ?
+ :
+
+ }
+
+
+ );
+ }
+}
diff --git a/src/profile/components/ProfileSettings.js b/src/profile/components/ProfileSettings.js
new file mode 100644
index 0000000..90a0ae8
--- /dev/null
+++ b/src/profile/components/ProfileSettings.js
@@ -0,0 +1,31 @@
+import React from 'react';
+import { Panel } from 'react-bootstrap';
+import { connect } from 'react-redux';
+import SettingsForm from './SettingsForm';
+import { requestSaveSettings } from '../../settings/settings.actions';
+
+
+const mapStateToProps = ({ auth: {profile} }) => ({profile});
+const mapDispatchToProps = (dispatch) => ({
+ saveSettings: (initialValues, values) => dispatch(requestSaveSettings(initialValues, values)),
+});
+
+@connect(mapStateToProps, mapDispatchToProps)
+class ProfileSettings extends React.Component {
+ onSubmit = (initialValues) => (values) => this.props.saveSettings(initialValues, values);
+
+ render() {
+ const { profile: { username, first_name, last_name }} = this.props;
+ const initialValues = { username, first_name, last_name, };
+ return (
+
+
+
+ );
+ }
+}
+
+export default ProfileSettings;
diff --git a/src/profile/components/ProfileStats.js b/src/profile/components/ProfileStats.js
index 759fbb3..2e7f3b9 100644
--- a/src/profile/components/ProfileStats.js
+++ b/src/profile/components/ProfileStats.js
@@ -13,9 +13,7 @@ const ProfileStats = ({
const att = Math.round(att_ratio * 100);
const win = Math.round(win_ratio * 100);
return (
-
- User statistics
@@ -28,19 +26,14 @@ const ProfileStats = ({
-
-
+
+
-
-
-
-
-
-
+
+
-
);
};
diff --git a/src/profile/components/ProfileTeams.js b/src/profile/components/ProfileTeams.js
new file mode 100644
index 0000000..98f7202
--- /dev/null
+++ b/src/profile/components/ProfileTeams.js
@@ -0,0 +1,95 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { Panel, Label, Row } from 'react-bootstrap';
+import { TeamList, PendingMemberList } from '../../teams/components/';
+import { selectTeam, leaveTeam, memberAcceptance } from '../../teams/teams.actions';
+import { getSelectedTeam } from '../../teams/teams.reducer';
+import { showQuestionModal } from '../../shared/modal.actions';
+import Switch from '../../shared/components/Switch';
+
+
+const mapStateToProps = ({teams}) => ({teams});
+const mapDispatchToProps = (dispatch) => ({
+ selectTeam: (team) => dispatch(selectTeam(team)),
+ leaveTeam: (team) => dispatch(leaveTeam(team)),
+ acceptMember: (id) => dispatch(memberAcceptance(id, true)),
+ rejectMember: (id) => dispatch(memberAcceptance(id, false)),
+ showModal: (modalParams) => dispatch(showQuestionModal(modalParams)),
+});
+
+@connect(mapStateToProps, mapDispatchToProps)
+class ProfileTeams extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ editMode: false,
+ joinMode: false,
+ };
+ }
+
+ switchEditMode = ({target: {checked}}) => {
+ this.setState({editMode: checked});
+ };
+
+ switchJoinMode = ({target: {checked}}) => {
+ this.setState({joinMode: checked});
+ };
+
+ onTeamSelect = (team) => {
+ const {selectTeam, leaveTeam, showModal} = this.props;
+ if (this.state.editMode) {
+ showModal({
+ title: 'Are you sure?',
+ text: `You are about to leave team ${team.name}. Proceed?`,
+ onAccept: () => leaveTeam(team),
+ onReject: () => {
+ },
+ });
+ } else {
+ selectTeam(team);
+ }
+ };
+
+ render() {
+ const {teams, acceptMember, rejectMember} = this.props;
+ return (
+
+ Current team
+
+
+ {getSelectedTeam(teams).name}
+
+
+
+
+
+ Joined teams
+
+
+ Join team mode
+ Leave team mode
+
+
+
+
+ Pending team members
+ { teams.pending.length > 0 ?
+ :
+ There are no pending team members
+ }
+
+ );
+ }
+}
+
+export default ProfileTeams;
diff --git a/src/profile/components/SettingsForm.js b/src/profile/components/SettingsForm.js
new file mode 100644
index 0000000..5e35137
--- /dev/null
+++ b/src/profile/components/SettingsForm.js
@@ -0,0 +1,31 @@
+import React from 'react'
+import { Form, FormGroup, Row, Col, Button } from 'react-bootstrap';
+import { reduxForm, Field } from 'redux-form';
+import SettingsInput from './SettingsInput';
+import { isUsername, isName } from '../../validators';
+
+
+const SettingsForm = ({ handleSubmit, pristine }) => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default reduxForm({
+ form: 'profileSettings',
+})(SettingsForm);
diff --git a/src/profile/components/SettingsInput.js b/src/profile/components/SettingsInput.js
new file mode 100644
index 0000000..85e6e64
--- /dev/null
+++ b/src/profile/components/SettingsInput.js
@@ -0,0 +1,22 @@
+import React from 'react'
+import { ControlLabel, FormControl, FormGroup, Col } from 'react-bootstrap';
+
+
+export default class SettingsInput extends React.Component {
+
+ render () {
+ const { placeholder, type, input, meta: {error}, label } = this.props;
+
+ return (
+
+ {label}:
+
+
+ { error && {error.message} }
+
+
+ {/* */}
+
+ );
+ }
+}
diff --git a/src/profile/components/index.js b/src/profile/components/index.js
new file mode 100644
index 0000000..845864e
--- /dev/null
+++ b/src/profile/components/index.js
@@ -0,0 +1,6 @@
+export ProfileLayout from './ProfileLayout';
+export ProfileStats from './ProfileStats';
+export ProfileMatches from './ProfileMatches';
+export ProfileTeams from './ProfileTeams';
+export ProfileChart from './ProfileChart';
+export ProfileSettings from './ProfileSettings';
diff --git a/src/profile/profile.actions.js b/src/profile/profile.actions.js
index 512e046..c36c144 100644
--- a/src/profile/profile.actions.js
+++ b/src/profile/profile.actions.js
@@ -5,9 +5,9 @@ export const profileUpdate = (response) => ({
response,
});
-export const receiveProfile = (response) => ({
+export const receiveProfile = (profiles) => ({
type: types.RECEIVE_PROFILE,
- response,
+ response: profiles[0],
});
export const receiveUserMatches = (response) => ({
diff --git a/src/profile/profile.reducer.js b/src/profile/profile.reducer.js
index ec8c50d..1d3ad45 100644
--- a/src/profile/profile.reducer.js
+++ b/src/profile/profile.reducer.js
@@ -1,8 +1,9 @@
import * as types from './profile.types';
-import * as authTypes from '../shared/auth.types';
+import * as authTypes from '../shared/auth/auth.types';
import * as MatchTypes from '../matches/match.types';
+import {defaultData} from '../matches/matches.reducer';
-const matches = (state = { page: 1, totalPages: 1, list: [] }, action) => {
+const matches = (state = defaultData, action) => {
switch (action.type) {
case types.RECEIVE_MATCHES:
return {
@@ -10,11 +11,13 @@ const matches = (state = { page: 1, totalPages: 1, list: [] }, action) => {
list: action.response.results,
page: parseInt(action.response.page, 10),
totalPages: Math.ceil(action.response.count / action.response.page_size),
+ count: action.response.count,
};
case MatchTypes.DELETED:
return {
...state,
list: state.list.filter(match => match.id !== action.id),
+ count: state.count - 1,
};
default:
return state;
diff --git a/src/profile/profile.sagas.js b/src/profile/profile.sagas.js
index 73d5222..368d08d 100644
--- a/src/profile/profile.sagas.js
+++ b/src/profile/profile.sagas.js
@@ -3,6 +3,7 @@ import api from '../api';
import { receiveUserMatches, receiveProfile } from './profile.actions';
import { raiseError } from '../shared/notifier.actions';
+
export function* profileMatches({username, page=1}) {
const currentTeamId = yield select(state => state.teams.selected);
const url = api.urls.teamMatchList(currentTeamId);
@@ -18,8 +19,8 @@ export function* profileStats({username}) {
const currentTeamId = yield select(state => state.teams.selected);
try {
const url = `${api.urls.teamMemberList(currentTeamId)}?username=${username}`;
- const profile = yield call(api.requests.get, url, null, `Failed to get ${username} profile.`);
- yield put(receiveProfile(profile[0]));
+ const profiles = yield call(api.requests.get, url, null, `Failed to get ${username} profile.`);
+ yield put(receiveProfile(profiles));
} catch (error) {
yield put(raiseError(error))
}
diff --git a/src/ranking/components/RankingLayout.js b/src/ranking/components/RankingLayout.js
index 0d4999c..523d279 100644
--- a/src/ranking/components/RankingLayout.js
+++ b/src/ranking/components/RankingLayout.js
@@ -1,11 +1,15 @@
import React from 'react';
-import {Grid, Row, Col} from 'react-bootstrap';
+import {Grid, Row, Col, Panel} from 'react-bootstrap';
import {sortBy} from '../../users/user.actions';
import {connect} from 'react-redux';
import RankingList from './RankingList';
+import WinnersStand from './WinnersStand';
+import {getSortedUsers} from '../../users/users.reducer';
+
const mapStateToProps = ({users, ranking, auth}) => ({
users, ranking, auth,
+ winners: getSortedUsers(users, 'exp', false).slice(0, 3),
});
const mapDispatchToProps = (dispatch, props) => ({
@@ -15,18 +19,16 @@ const mapDispatchToProps = (dispatch, props) => ({
@connect(mapStateToProps, mapDispatchToProps)
export default class RankingLayout extends React.Component {
render() {
- const {users, sortBy, ranking, auth} = this.props;
+ const {users, sortBy, ranking, auth, winners} = this.props;
const profile = auth.profile || {};
return (
+
+
+
-
- Ranking
-
-
-
-
+
diff --git a/src/ranking/components/RankingList.js b/src/ranking/components/RankingList.js
index 387d045..e434454 100644
--- a/src/ranking/components/RankingList.js
+++ b/src/ranking/components/RankingList.js
@@ -3,11 +3,14 @@ import {Table} from 'react-bootstrap';
import RankingItem from './RankingItem';
import RankingListHeader from './RankingListHeader';
import {IS_MOBILE} from '../../api/config';
-import { browserHistory } from 'react-router';
+import {browserHistory} from 'react-router';
+
const RankingList = ({users, username, sortBy, ranking}) => {
const model = (IS_MOBILE) ? ranking.model.mobile : ranking.model.desktop;
- const showProfile = (username) => () => { browserHistory.push(`/profile/${username}/stats`) };
+ const showProfile = (username) => () => {
+ browserHistory.push(`/profile/${username}/stats`)
+ };
return (
diff --git a/src/ranking/components/WinnersStand.js b/src/ranking/components/WinnersStand.js
new file mode 100644
index 0000000..e2facb3
--- /dev/null
+++ b/src/ranking/components/WinnersStand.js
@@ -0,0 +1,25 @@
+import React from 'react'
+import { Row, Col, Label} from 'react-bootstrap';
+import Gravatar from '../../profile/components/Gravatar';
+
+const WinnersStand = ({ winners }) => {
+ const Face = ({user: {email, username, exp}, ...props}) => (
+
+
+ {username}
+ {exp}XP
+
+ );
+ return (
+ winners.length === 3 ?
+
+ Top players
+
+
+
+
:
+ null
+ );
+};
+
+export default WinnersStand;
diff --git a/src/ranking/ranking.reducer.js b/src/ranking/ranking.reducer.js
index 166cb52..84e6774 100644
--- a/src/ranking/ranking.reducer.js
+++ b/src/ranking/ranking.reducer.js
@@ -2,17 +2,16 @@ import * as types from '../users/user.types';
const model = {
"desktop": {
- "id": "ID",
"username": "Username",
"first_name": "First name",
"last_name": "Last name",
- "exp": "Experience",
+ "exp": "EXP",
"att_ratio": "Attack ratio",
"def_ratio": "Defense ratio",
"lose_streak": "Lose streak",
"win_streak": "Win streak",
- "lowest_exp": "Lowest experience",
- "highest_exp": "Highest experience"
+ "lowest_exp": "Lowest EXP",
+ "highest_exp": "Highest EXP"
},
"mobile": {
"username": "Username",
@@ -20,7 +19,7 @@ const model = {
}
};
-export default (state = {sorting: {column: "exp", isAscendingOrder: true}, model}, action) => {
+export default (state = {sorting: {column: "exp", isAscendingOrder: false}, model}, action) => {
switch (action.type) {
case types.SORT:
return {
diff --git a/src/settings/components/MemberSettings.js b/src/settings/components/MemberSettings.js
deleted file mode 100644
index 55becb3..0000000
--- a/src/settings/components/MemberSettings.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import React from 'react'
-import InputField from './InputField';
-import { Form, FormGroup, Button, Col } from 'react-bootstrap';
-
-const MemberSettings = ({saveMember, handleChange, username}) => {
- return (
-
- );
-};
-
-export default MemberSettings;
diff --git a/src/settings/components/PendingMemberList.js b/src/settings/components/PendingMemberList.js
deleted file mode 100644
index a4a6a2f..0000000
--- a/src/settings/components/PendingMemberList.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import React from 'react'
-import {ListGroupItem, ListGroup, Row, Col, Button, ButtonToolbar, Glyphicon} from 'react-bootstrap';
-
-const PendingMemberList = ({users = [], onAccept, onReject}) => {
- if (!users || users.length === 0) {
- return null;
- }
- return (
-
-
Pending members
-
- {
- users.map(
- user =>
-
-
-
- {user.username} ({user.email})
-
-
-
- onAccept(user.id)}>
- Accept
-
- onReject(user.id)}>
-
-
-
-
-
-
- )
- }
-
-
- );
-};
-
-export default PendingMemberList;
diff --git a/src/settings/components/ProfileSettings.js b/src/settings/components/ProfileSettings.js
index a70ca25..bc41110 100644
--- a/src/settings/components/ProfileSettings.js
+++ b/src/settings/components/ProfileSettings.js
@@ -1,34 +1,57 @@
-import React from 'react'
-import InputField from './InputField';
-import { Form, FormGroup, Button, Col } from 'react-bootstrap';
-
-const ProfileSettings = ({saveProfile, first_name, last_name, handleChange}) => {
- return (
-
- );
-};
+
+
+ );
+ }
+}
export default ProfileSettings;
diff --git a/src/settings/components/ProfileSettingsForm.js b/src/settings/components/ProfileSettingsForm.js
new file mode 100644
index 0000000..a27e47c
--- /dev/null
+++ b/src/settings/components/ProfileSettingsForm.js
@@ -0,0 +1,37 @@
+import React from 'react'
+import InputField from './InputField';
+import {Form, FormGroup, Button, Col} from 'react-bootstrap';
+
+const ProfileSettingsForm = ({saveProfile, first_name, last_name, username, handleChange}) => {
+ return (
+
+ );
+};
+
+export default ProfileSettingsForm;
diff --git a/src/settings/components/SettingsLayout.js b/src/settings/components/SettingsLayout.js
index 6150eec..e301a82 100644
--- a/src/settings/components/SettingsLayout.js
+++ b/src/settings/components/SettingsLayout.js
@@ -1,14 +1,17 @@
import React from 'react';
import {connect} from 'react-redux';
-import {Row, Col, Well} from 'react-bootstrap';
+import {Row, Col, Tab, NavItem, Nav} from 'react-bootstrap';
import {requestSaveMember, requestSaveProfile} from '../settings.actions';
-import {getSelectedTeam} from '../../shared/teams/teams.reducer';
-import { memberAcceptance } from '../../shared/teams/teams.actions';
-import MemberSettings from './MemberSettings';
+import { memberAcceptance } from '../../teams/teams.actions';
import ProfileSettings from './ProfileSettings';
-import PendingMemberList from './PendingMemberList';
+import TeamSettings from './TeamSettings';
+import {getSelectedTeam} from '../../teams/teams.reducer';
-const mapStateToProps = ({auth: {profile}, teams}) => ({profile, teams});
+const mapStateToProps = ({auth: {profile}, teams}) => ({
+ profile,
+ currentTeam: getSelectedTeam(teams),
+ pendingTeams: teams.pending,
+});
const mapDispatchToProps = (dispatch) => ({
saveMember: (data) => dispatch(requestSaveMember(data)),
saveProfile: (data) => dispatch(requestSaveProfile(data)),
@@ -18,76 +21,51 @@ const mapDispatchToProps = (dispatch) => ({
@connect(mapStateToProps, mapDispatchToProps)
export default class SettingsLayout extends React.Component {
- constructor(props) {
- super(props);
- const {profile: {first_name, last_name, username}, teams} = this.props;
- const currentTeam = getSelectedTeam(teams);
- this.state = {
- username,
- first_name,
- last_name,
- currentTeam,
- };
- }
-
- handleChange = (fieldName) => (event) => {
- this.setState({[fieldName]: event.target.value});
- };
-
- saveMember = (event) => {
- event.preventDefault();
- const data = {
- username: this.state.username
- };
- this.props.saveMember(data);
- };
-
- saveProfile = (event) => {
- event.preventDefault();
- const data = {
- first_name: this.state.first_name,
- last_name: this.state.last_name,
- };
- this.props.saveProfile(data);
- };
-
render() {
- const {currentTeam, username, first_name, last_name} = this.state;
- const {teams: {pending}, rejectMember, acceptMember} = this.props;
+ const {
+ pendingTeams,
+ currentTeam,
+ profile,
+ rejectMember,
+ acceptMember,
+ saveProfile,
+ saveMember
+ } = this.props;
return (
Settings
-
-
-
-
-
-
-
-
-
- Team membership ({ currentTeam ? currentTeam.name : ''} )
-
-
-
-
-
-
+
+
+
+
+ Profile
+ Team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{this.props.children}
);
diff --git a/src/settings/components/TeamSettings.js b/src/settings/components/TeamSettings.js
new file mode 100644
index 0000000..8bc4dd3
--- /dev/null
+++ b/src/settings/components/TeamSettings.js
@@ -0,0 +1,26 @@
+import React from 'react';
+import { Panel} from 'react-bootstrap';
+import PendingMemberList from '../../teams/components/PendingMemberList';
+
+class TeamSettings extends React.Component {
+ render() {
+ const { pendingTeams, acceptMember, rejectMember, currentTeam } = this.props;
+ return (
+
+ Team: {currentTeam.name}
+
+ Pending team members
+ { pendingTeams.length > 0 ?
+ :
+ There are no pending team members
+ }
+
+ );
+ }
+}
+
+export default TeamSettings;
diff --git a/src/settings/settings.actions.js b/src/settings/settings.actions.js
index df0199b..b126cf5 100644
--- a/src/settings/settings.actions.js
+++ b/src/settings/settings.actions.js
@@ -1,5 +1,7 @@
export const REQUEST_SAVE_PROFILE = 'SETTINGS::SAVE_PROFILE';
export const REQUEST_SAVE_MEMBER = 'SETTINGS::SAVE_MEMBER';
+export const REQUEST_SAVE_SETTINGS = 'SETTINGS::REQUEST_SAVE';
+export const SETTINGS_SAVED = 'SETTINGS::SAVED';
export const requestSaveProfile = (partialData) => ({
type: REQUEST_SAVE_PROFILE,
@@ -10,3 +12,18 @@ export const requestSaveMember = (partialData) => ({
type: REQUEST_SAVE_MEMBER,
partialData,
});
+
+export const requestSaveSettings = (initialValues, values) => {
+ const changedValues = Object.entries(values).reduce(
+ (acc, [name, value]) => initialValues[name] !== values[name] ?
+ Object.assign(acc, {[name]: value}) :
+ acc,
+ {}
+ );
+ return {
+ type: REQUEST_SAVE_SETTINGS,
+ values: changedValues,
+ }
+};
+
+export const settingsSaved = (values) => ({ type: SETTINGS_SAVED, values });
diff --git a/src/settings/settings.sagas.js b/src/settings/settings.sagas.js
index b7a5d34..f24ab4f 100644
--- a/src/settings/settings.sagas.js
+++ b/src/settings/settings.sagas.js
@@ -1,9 +1,10 @@
-import { call, take, put, select } from 'redux-saga/effects';
+import { call, take, put, takeLatest } from 'redux-saga/effects';
import api from '../api';
-import { REQUEST_SAVE_MEMBER, REQUEST_SAVE_PROFILE } from './settings.actions';
+import { REQUEST_SAVE_MEMBER, REQUEST_SAVE_PROFILE, REQUEST_SAVE_SETTINGS, settingsSaved } from './settings.actions';
import { showInfo, raiseError } from '../shared/notifier.actions';
-import { getSelectedTeam } from '../shared/teams/teams.reducer';
-import { fetchPendingMembers } from '../shared/teams/teams.sagas';
+import { getCurrentTeam } from '../teams/teams.sagas';
+import { browserHistory } from 'react-router'
+
// TODO move it somewhere
export const validateMember = (data) => {
@@ -16,7 +17,10 @@ export const validateMember = (data) => {
return data;
};
-function* saveProfile() {
+const profileSettingsFilter = ({ first_name, last_name }) => ({ first_name, last_name });
+const memberSettingsFilter = ({ username }) => ({ username });
+
+export function* saveProfile() {
const url = api.urls.profile();
while (true) {
const action = yield take(REQUEST_SAVE_PROFILE);
@@ -29,11 +33,10 @@ function* saveProfile() {
}
}
-function* saveMember() {
+export function* saveMember() {
while (true) {
const action = yield take(REQUEST_SAVE_MEMBER);
- const teamsState = yield select(state => state.teams);
- const currentTeam = getSelectedTeam(teamsState);
+ const currentTeam = yield call(getCurrentTeam);
const url = api.urls.teamMemberEntity(currentTeam.id, currentTeam.member_id);
try {
const data = validateMember(action.partialData);
@@ -45,10 +48,41 @@ function* saveMember() {
}
}
+export function* saveSettings({values}) {
+ const successMsg = 'Profile settings were saved';
+ const errorMsg = 'Failed to save profile settings';
+ if (values.first_name || values.last_name) {
+ const profileUrl = api.urls.profile();
+ const profileSettings = profileSettingsFilter(values);
+ yield call(api.requests.patch, profileUrl, profileSettings, errorMsg);
+ }
+
+ if (values.username) {
+ const currentTeam = yield call(getCurrentTeam);
+ const memberUrl = api.urls.teamMemberEntity(currentTeam.id, currentTeam.member_id);
+ const memberSettings = memberSettingsFilter(values);
+ yield call(api.requests.patch, memberUrl, memberSettings, errorMsg);
+ }
+ yield put(showInfo(successMsg));
+ yield put(settingsSaved(values));
+ if (values.username) {
+ yield call([browserHistory, browserHistory.push], `/profile/${values.username}/settings`);
+ }
+}
+
+export function* onRequestSaveSettings() {
+ const errorMsg = 'Failed to save profile settings';
+ try {
+ yield takeLatest(REQUEST_SAVE_SETTINGS, saveSettings);
+ } catch(error) {
+ yield put(raiseError(errorMsg));
+ yield takeLatest(REQUEST_SAVE_SETTINGS, saveSettings);
+ }
+}
+
export function* settings() {
yield [
saveProfile(),
saveMember(),
- fetchPendingMembers(),
];
}
diff --git a/src/shared/auth.sagas.js b/src/shared/auth.sagas.js
deleted file mode 100644
index 542fb63..0000000
--- a/src/shared/auth.sagas.js
+++ /dev/null
@@ -1,82 +0,0 @@
-import { take, call, put, fork, cancel, select } from 'redux-saga/effects';
-import { browserHistory } from 'react-router'
-import { SIGN_IN, SIGN_OUT } from './auth.types';
-import { setToken, setProfile, signedOut } from './auth.actions';
-import { raiseError, clean } from './notifier.actions';
-import { initTeam, fetchTeams } from './teams/teams.sagas';
-import { prepareWindow } from '../api/oauth';
-import api from '../api';
-import { removeState } from '../persistence';
-
-export const getOAuthErrorMsg = (error) => {
- switch(error) {
- case 'blocked':
- return 'Authentication window was blocked. Please, try again.';
- case 'closed':
- return 'Authentication window was closed. Please, try again.';
- case 'failure':
- return 'Failed to log in.';
- default:
- return 'Failed to authenticate.';
- }
-};
-
-export function* authenticate() {
- const token = yield select(state => state.auth.token);
- if (token) return { token };
- const promptWindow = prepareWindow();
- try {
- const { token } = yield call([promptWindow, promptWindow.open]);
- yield put(setToken(token));
- return { token };
- } catch (error) {
- const errorMsg = getOAuthErrorMsg(error);
- yield put(raiseError(errorMsg));
- }
- return {};
-}
-
-export function* fetchProfile(team_id, member_id) {
- const profile_url = api.urls.teamMemberEntity(team_id, member_id);
- const profile = yield call(api.requests.get, profile_url, {}, 'Failed to load user profile');
- yield put(setProfile(profile));
-}
-
-export function* signIn() {
- yield take(SIGN_IN);
- yield call(authenticate);
- yield call(fetchTeams);
- const currentTeam = yield call(initTeam);
- if (!currentTeam) {
- // User is not assigned to any team and we were redirected to /welcome page
- return;
- }
- try {
- yield call(fetchProfile, currentTeam.id, currentTeam.member_id);
- } catch (error) {
- // TODO What if the entry belongs to the other user that was previously logged in?
- // yield call(removeTeamState);
- // yield chooseTeam();
- // yield fetchProfile();
- console.error(error);
- }
- yield call([browserHistory, browserHistory.push], `/match`);
-}
-
-export function* loginFlow() {
- while (true) {
- const task = yield fork(signIn);
- try {
- yield take(SIGN_OUT);
- yield cancel(task);
- const logout_url = api.urls.logout();
- yield call(api.requests.get, logout_url, null, 'Failed to sign out. Please try again.');
- yield put(signedOut());
- yield put(clean());
- yield call(removeState);
- yield call([browserHistory, browserHistory.push], '/');
- } catch (error) {
- yield put(raiseError(error));
- }
- }
-}
diff --git a/src/shared/auth.actions.js b/src/shared/auth/auth.actions.js
similarity index 84%
rename from src/shared/auth.actions.js
rename to src/shared/auth/auth.actions.js
index 8e93a75..a9f2e15 100644
--- a/src/shared/auth.actions.js
+++ b/src/shared/auth/auth.actions.js
@@ -1,8 +1,9 @@
import * as types from './auth.types';
-export const setToken = (token) => ({
+export const setToken = (token, expires_at) => ({
type: types.SET_TOKEN,
token,
+ expires_at,
});
export const setProfile = (response) => ({
diff --git a/src/shared/auth.reducer.js b/src/shared/auth/auth.reducer.js
similarity index 62%
rename from src/shared/auth.reducer.js
rename to src/shared/auth/auth.reducer.js
index 47da476..a25528c 100644
--- a/src/shared/auth.reducer.js
+++ b/src/shared/auth/auth.reducer.js
@@ -1,22 +1,25 @@
import * as types from './auth.types';
-import { REQUEST_SAVE_PROFILE, REQUEST_SAVE_MEMBER} from '../settings/settings.actions';
+import { REQUEST_SAVE_PROFILE, REQUEST_SAVE_MEMBER, SETTINGS_SAVED} from '../../settings/settings.actions';
-const profile = (state = {}, action) => {
+export const profile = (state = {}, action) => {
switch (action.type) {
case REQUEST_SAVE_PROFILE:
case REQUEST_SAVE_MEMBER:
- return Object.assign(state, action.partialData);
+ return Object.assign({}, state, action.partialData);
+ case SETTINGS_SAVED:
+ return Object.assign({}, state, action.values);
default:
return state;
}
};
-const auth = (state = {}, action) => {
+export const auth = (state = {}, action) => {
switch (action.type) {
case types.SET_TOKEN:
return {
...state,
token: action.token,
+ expires_at: action.expires_at,
};
case types.SIGNED_OUT:
return {};
@@ -27,6 +30,7 @@ const auth = (state = {}, action) => {
};
case REQUEST_SAVE_MEMBER:
case REQUEST_SAVE_PROFILE:
+ case SETTINGS_SAVED:
return {
...state,
profile: profile(state.profile, action),
@@ -35,4 +39,5 @@ const auth = (state = {}, action) => {
return state;
}
};
-export default auth;
\ No newline at end of file
+
+export default auth;
diff --git a/src/shared/auth/auth.sagas.js b/src/shared/auth/auth.sagas.js
new file mode 100644
index 0000000..ec9499b
--- /dev/null
+++ b/src/shared/auth/auth.sagas.js
@@ -0,0 +1,89 @@
+import { take, call, put, fork, cancel, select, takeLatest } from 'redux-saga/effects';
+import { browserHistory } from 'react-router'
+import { SIGN_IN, SIGN_OUT } from './auth.types';
+import { setToken, setProfile, signedOut } from './auth.actions';
+import { raiseError, clean, RAISE_UNAUTHORIZED } from '../notifier.actions';
+import { initTeam, fetchTeams } from '../../teams/teams.sagas';
+import { prepareWindow } from '../../api/oauth';
+import api from '../../api';
+import { removeState } from '../../persistence';
+import { getOAuthErrorMsg } from './auth.utils';
+import { showModalInfo, acceptModal } from '../modal.actions';
+
+export function* authenticate(reauthenticate = false) {
+ const token = yield select(state => state.auth.token);
+ if (token && !reauthenticate) return { token };
+ const promptWindow = prepareWindow();
+ try {
+ const { token, expires_at } = yield call([promptWindow, promptWindow.open]);
+ yield put(setToken(token, expires_at));
+ return { token };
+ } catch (error) {
+ const errorMsg = getOAuthErrorMsg(error);
+ yield put(raiseError(errorMsg));
+ }
+ return {};
+}
+
+export function* fetchProfile(team_id, member_id) {
+ const profile_url = api.urls.teamMemberEntity(team_id, member_id);
+ try {
+ const profile = yield call(api.requests.get, profile_url, {}, 'Failed to load user profile');
+ yield put(setProfile(profile));
+ } catch(error) {
+ yield put(raiseError(error));
+ }
+}
+
+export function* signIn() {
+ yield take(SIGN_IN);
+ yield call(authenticate);
+ yield call(fetchTeams);
+ const currentTeam = yield call(initTeam);
+ if (!currentTeam) {
+ // User is not assigned to any team and we were redirected to /welcome page
+ return;
+ }
+ // try {
+ yield call(fetchProfile, currentTeam.id, currentTeam.member_id);
+ // } catch (error) {
+ // TODO What if the entry belongs to the other user that was previously logged in?
+ // yield call(removeTeamState);
+ // yield chooseTeam();
+ // yield fetchProfile();
+ // console.error(error);
+ // }
+ yield call([browserHistory, browserHistory.push], `/match`);
+}
+
+export function* loginFlow() {
+ while (true) {
+ const task = yield fork(signIn);
+ yield take(SIGN_OUT);
+ yield cancel(task);
+ const logout_url = api.urls.logout();
+ try {
+ yield call(api.requests.get, logout_url, null, 'Failed to sign out. Please try again.');
+ } catch (error) {}
+ yield put(signedOut());
+ yield put(clean());
+ yield call(removeState);
+ yield call([browserHistory, browserHistory.push], '/');
+ }
+}
+
+export function* sessionExpired() {
+ const reauthenticate = function* () {
+ // TODO replay
+ const info = {
+ title: 'Unauthenticated',
+ text: 'Your session has expired, please log in again.',
+ onAccept: () => {},
+ };
+ yield put(showModalInfo(info));
+ yield call(authenticate, true);
+ yield put(acceptModal());
+ yield call([browserHistory, browserHistory.push], '/');
+ };
+ yield takeLatest(RAISE_UNAUTHORIZED, reauthenticate);
+}
diff --git a/src/shared/auth.types.js b/src/shared/auth/auth.types.js
similarity index 100%
rename from src/shared/auth.types.js
rename to src/shared/auth/auth.types.js
diff --git a/src/shared/auth/auth.utils.js b/src/shared/auth/auth.utils.js
new file mode 100644
index 0000000..9d109b0
--- /dev/null
+++ b/src/shared/auth/auth.utils.js
@@ -0,0 +1,12 @@
+export const getOAuthErrorMsg = (error) => {
+ switch(error) {
+ case 'blocked':
+ return 'Authentication window was blocked. Please, try again.';
+ case 'closed':
+ return 'Authentication window was closed. Please, try again.';
+ case 'failure':
+ return 'Failed to log in.';
+ default:
+ return 'Failed to authenticate.';
+ }
+};
diff --git a/src/shared/components/Header.js b/src/shared/components/Header.js
index d8221f9..918b319 100644
--- a/src/shared/components/Header.js
+++ b/src/shared/components/Header.js
@@ -1,73 +1,50 @@
import React from 'react';
-import { signIn, signOut } from '../auth.actions';
-import { selectTeam } from '../teams/teams.actions';
-import { getSelectedTeam } from '../teams/teams.reducer';
-import { Navbar, Nav, NavItem } from 'react-bootstrap';
-import { LinkContainer } from 'react-router-bootstrap';
+import {signIn, signOut} from '../auth/auth.actions';
+import {Navbar, Nav, NavItem} from 'react-bootstrap';
import SignInButton from './SignInButton';
-import { connect } from 'react-redux';
-import HeaderDropdown from './HeaderDropdown';
+import {connect} from 'react-redux';
import Notifications from './Notifications';
+import Navigation from './Navigation';
-const mapStateToProps = ({auth, teams}) => ({auth, teams});
+
+const mapStateToProps = ({auth: {profile, token}}) => ({
+ username: profile && profile.hasOwnProperty('username') ? profile.username : '',
+ isAuthenticated: !!token,
+});
const mapDispatchToProps = dispatch => ({
signIn: () => dispatch(signIn()),
signOut: () => dispatch(signOut()),
- selectTeam: (team) => dispatch(selectTeam(team)),
});
@connect(mapStateToProps, mapDispatchToProps)
export default class Header extends React.Component {
- renderNavigation(username) {
- return (
-
-
- New match
-
-
- My profile
-
-
- Ranking
-
-
- Matches
-
-
- );
- }
-
render() {
- const { auth: {token, profile}, teams, signIn, signOut, selectTeam } = this.props;
- const currentTeam = getSelectedTeam(teams);
- const username = profile && profile.hasOwnProperty('username') ? profile.username : '';
+ const {signIn, signOut} = this.props;
+ const {username, isAuthenticated} = this.props;
return (
-
-
-
- TFoosball
-
-
-
-
- { username ? this.renderNavigation(username) : null }
-
- {
- token && username ?
- :
-
- }
-
-
-
-
+
+
+
+ TFoosball
+
+
+
+
+ { username && }
+
+ { username && {username} }
+
+ {
+ isAuthenticated ?
+ Sign out :
+
+ }
+
+
+
+
+
);
}
diff --git a/src/shared/components/HeaderDropdown.js b/src/shared/components/HeaderDropdown.js
deleted file mode 100644
index 7c0f96b..0000000
--- a/src/shared/components/HeaderDropdown.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react';
-import { NavDropdown, MenuItem } from 'react-bootstrap';
-import { LinkContainer } from 'react-router-bootstrap';
-
-
-const HeaderDropdown = ({ teams, username, signOut, selectTeam, currentTeam }) => (
-
- TEAMS
- {
- teams.length > 0 ?
- teams.map(team =>
- selectTeam(team)}
- disabled={currentTeam.name === team.name}
- >
- {team.name}
-
- ) :
- null
- }
-
-
- Settings
-
-
- Sign out
-
-);
-
-export default HeaderDropdown;
diff --git a/src/shared/components/NaivePager.js b/src/shared/components/NaivePager.js
index 8ab5375..bd7278b 100644
--- a/src/shared/components/NaivePager.js
+++ b/src/shared/components/NaivePager.js
@@ -1,20 +1,29 @@
import React from 'react'
import {Pager} from 'react-bootstrap';
+import {browserHistory} from 'react-router';
const NaivePager = ({page, totalPages, prefix}) => {
+ const onClick = (url) => () => browserHistory.push(url);
return (
-
- {
- page > 1 ?
- « Previous Page :
- null
- }
- {
- page < totalPages ?
- Next Page » :
- null
- }
-
+
+
+
+ {
+ page > 1 ?
+
+ « Previous Page
+ :
+ null
+ }
+ {
+ page < totalPages ?
+
+ Next Page »
+ :
+ null
+ }
+
+
);
};
diff --git a/src/shared/components/Navigation.js b/src/shared/components/Navigation.js
new file mode 100644
index 0000000..aacf577
--- /dev/null
+++ b/src/shared/components/Navigation.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { Nav, NavItem } from 'react-bootstrap';
+import { LinkContainer } from 'react-router-bootstrap';
+
+const Navigation = ({ username }) => {
+ return (
+
+
+ New match
+
+
+ My profile
+
+
+ Ranking
+
+
+ Matches
+
+
+ );
+};
+
+export default Navigation;
diff --git a/src/shared/components/QuestionModal.js b/src/shared/components/QuestionModal.js
index 5001b01..8e9f5e2 100644
--- a/src/shared/components/QuestionModal.js
+++ b/src/shared/components/QuestionModal.js
@@ -12,7 +12,7 @@ const mapDispatchToProps = (dispatch) => ({
});
@connect(mapStateToProps, mapDispatchToProps)
-class QuestionModal extends React.Component {
+class ModalMessage extends React.Component {
onAccept = () => {
const { accept, onAccept } = this.props;
accept(); // Callee callback
@@ -39,11 +39,19 @@ class QuestionModal extends React.Component {
{text}
- No
- Yes
+ { this.props.onReject ?
+
+ Cancel
+ :
+ null
+ }
+ { this.props.onAccept ?
+ OK :
+ null
+ }
)
}
}
-export default QuestionModal;
+export default ModalMessage;
diff --git a/src/shared/components/SignInButton.js b/src/shared/components/SignInButton.js
index fb906c2..2bab6cc 100644
--- a/src/shared/components/SignInButton.js
+++ b/src/shared/components/SignInButton.js
@@ -1,14 +1,14 @@
import React from 'react';
-import { Button } from 'react-bootstrap';
+import {Button} from 'react-bootstrap';
import checkMobile from '../../utils/checkMobile';
const SignInButton = ({signIn}) => (
-
+
Let me in with Google
);
diff --git a/src/shared/components/Switch.js b/src/shared/components/Switch.js
new file mode 100644
index 0000000..761665b
--- /dev/null
+++ b/src/shared/components/Switch.js
@@ -0,0 +1,15 @@
+import React from 'react'
+
+const Switch = ({bsStyle, onChange, children, checked}) => {
+ return (
+
+ );
+};
+
+export default Switch;
diff --git a/src/shared/components/Widget.js b/src/shared/components/Widget.js
index 3df971c..2b67516 100644
--- a/src/shared/components/Widget.js
+++ b/src/shared/components/Widget.js
@@ -1,15 +1,20 @@
-import React, { Component } from 'react';
+import React from 'react';
import { Panel, Col } from 'react-bootstrap';
-export default class Widget extends Component {
- render() {
- return (
-
-
- {this.props.label}
- {this.props.value}
-
-
- );
- }
-}
\ No newline at end of file
+
+const Widget = ({label, value, altValue, style}) => (
+
+
+
+ {value}
+ { altValue ?
+ / {altValue} :
+ null
+ }
+
+ {label}
+
+
+);
+
+export default Widget;
diff --git a/src/shared/modal.actions.js b/src/shared/modal.actions.js
index ad3bd47..2771c11 100644
--- a/src/shared/modal.actions.js
+++ b/src/shared/modal.actions.js
@@ -1,10 +1,16 @@
export const SHOW_QUESTION = 'MODAL::SHOW_QUESTION';
+export const SHOW_MODAL_INFO = 'MODAL::SHOW_INFO';
export const REJECT = 'MODAL::REJECT';
export const ACCEPT = 'MODAL::ACCEPT';
export const showQuestionModal = (params) => ({
type: SHOW_QUESTION,
- params
+ params,
+});
+
+export const showModalInfo = (params) => ({
+ type: SHOW_MODAL_INFO,
+ params,
});
export const rejectModal = () => ({
diff --git a/src/shared/modal.reducer.js b/src/shared/modal.reducer.js
index e170478..095fd78 100644
--- a/src/shared/modal.reducer.js
+++ b/src/shared/modal.reducer.js
@@ -1,8 +1,9 @@
-import { SHOW_QUESTION, ACCEPT, REJECT } from './modal.actions';
+import { SHOW_QUESTION, SHOW_MODAL_INFO, ACCEPT, REJECT } from './modal.actions';
export default (state = {}, action) => {
switch (action.type) {
case SHOW_QUESTION:
+ case SHOW_MODAL_INFO:
return action.params;
case ACCEPT:
case REJECT:
diff --git a/src/shared/notifier.actions.js b/src/shared/notifier.actions.js
index 0110208..8b3a7a2 100644
--- a/src/shared/notifier.actions.js
+++ b/src/shared/notifier.actions.js
@@ -1,5 +1,7 @@
+import { APIUnauthorizedError } from '../errors';
export const SHOW_INFO = 'NOTIFIER::SHOW_INFO';
export const RAISE_ERROR = 'NOTIFIER::RAISE_ERROR';
+export const RAISE_UNAUTHORIZED = 'NOTIFIER::RAISE_UNAUTHORIZED';
export const HANDLE = 'NOTIFIER::HANDLE';
export const CLEAN = 'NOTIFIER::CLEAN';
@@ -9,11 +11,17 @@ export const showInfo = (msg) => ({
msg
});
-export const raiseError = (msg) => ({
- type: RAISE_ERROR,
- style: 'danger',
- msg
-});
+export const raiseError = (error) => {
+ // TODO pass action that failed
+ if (error.constructor === APIUnauthorizedError) {
+ return { type: RAISE_UNAUTHORIZED };
+ }
+ return {
+ type: RAISE_ERROR,
+ style: 'danger',
+ msg: error.toString(),
+ };
+};
export const handleMsg = (id) => ({
type: HANDLE,
diff --git a/src/shared/routes.sagas.js b/src/shared/routes.sagas.js
index 0601ee7..61333d6 100644
--- a/src/shared/routes.sagas.js
+++ b/src/shared/routes.sagas.js
@@ -4,20 +4,26 @@ import { profileMatches, profileStats } from '../profile/profile.sagas';
import { fetchUsers } from '../users/users.sagas';
import { listMatches } from '../matches/matches.sagas';
import { settings } from '../settings/settings.sagas';
+import { fetchPendingMembers, fetchTeams } from '../teams/teams.sagas';
+import { cleanNotifications } from './shared.sagas';
+const options = {
+ matchAll: true,
+ beforeRouteChange: cleanNotifications,
+};
const routes = {
- '/profile/:username/matches/:page': profileMatches,
- '/profile/:username/matches': profileMatches,
- '/profile/:username/stats': profileStats,
- '/match': fetchUsers,
+ '/profile/:username/*': profileStats,
+ '/profile/:username/matches/:page?': profileMatches,
+ '/profile/:username/teams': function*() { yield [fetchPendingMembers(), fetchTeams() ]; },
'/matches/:page': listMatches,
+ '/match': fetchUsers,
'/ranking': fetchUsers,
'/settings': settings,
};
export function* routerSaga() {
while (true) {
- yield* router(history, routes);
+ yield* router(history, routes, options);
}
}
\ No newline at end of file
diff --git a/src/shared/shared.sagas.js b/src/shared/shared.sagas.js
new file mode 100644
index 0000000..6b6c819
--- /dev/null
+++ b/src/shared/shared.sagas.js
@@ -0,0 +1,6 @@
+import { put } from 'redux-saga/effects';
+import { clean } from './notifier.actions';
+
+export function* cleanNotifications() {
+ yield put(clean());
+}
diff --git a/src/store.js b/src/store.js
index be52c40..9f47f85 100644
--- a/src/store.js
+++ b/src/store.js
@@ -4,6 +4,7 @@ import rootSaga from './homepage/root.sagas';
import reducer from './homepage/root.reducer'
import { loadState, saveState } from './persistence';
+
const createLoggingDispatch = (store) => {
const rawDispatch = store.dispatch;
if (!console.group) {
diff --git a/src/teams/components/JoinTeamForm.js b/src/teams/components/JoinTeamForm.js
new file mode 100644
index 0000000..a534078
--- /dev/null
+++ b/src/teams/components/JoinTeamForm.js
@@ -0,0 +1,62 @@
+import React from 'react';
+import {connect} from 'react-redux';
+import {Col, InputGroup, Form, FormGroup, FormControl, Button} from 'react-bootstrap';
+import {requestJoinTeam} from '../teams.actions.js';
+import Icon from 'react-fontawesome';
+
+
+const mapDispatchToProps = (dispatch) => ({
+ joinTeam: (team, username) => dispatch(requestJoinTeam(team, username)),
+});
+
+@connect(null, mapDispatchToProps)
+export default class JoinTeamForm extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ team: '',
+ username: '',
+ };
+ }
+
+ handleJoinTeam = () => {
+ const {joinTeam} = this.props;
+ const {team, username} = this.state;
+ joinTeam(team, username);
+ };
+
+ handleChange = (field) => (event) => {
+ this.setState({[field]: event.target.value});
+ };
+
+ render() {
+ return (
+
+ );
+ }
+}
diff --git a/src/teams/components/JoinTeamItem.js b/src/teams/components/JoinTeamItem.js
new file mode 100644
index 0000000..2922e9e
--- /dev/null
+++ b/src/teams/components/JoinTeamItem.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import {
+ ListGroupItem,
+} from 'react-bootstrap';
+import JoinTeamForm from './JoinTeamForm';
+
+
+const JoinTeamItem = () => {
+ return (
+
+
+
+ );
+};
+
+export default JoinTeamItem;
diff --git a/src/teams/components/PendingMemberList.js b/src/teams/components/PendingMemberList.js
new file mode 100644
index 0000000..17181b9
--- /dev/null
+++ b/src/teams/components/PendingMemberList.js
@@ -0,0 +1,30 @@
+import React from 'react'
+import {ListGroupItem, ListGroup, Row, Col, Button, ButtonGroup, Glyphicon} from 'react-bootstrap';
+
+const PendingMemberItem = ({user, onAccept, onReject}) => (
+
+
+
+ {user.username} ({user.email})
+
+
+
+ onReject(user.id)}>
+
+
+ onAccept(user.id)}>
+ Accept
+
+
+
+
+
+);
+
+const PendingMemberList = ({users = [], onAccept, onReject}) => (
+
+ { users.map(user => ) }
+
+);
+
+export default PendingMemberList;
diff --git a/src/teams/components/SelectTeamItem.js b/src/teams/components/SelectTeamItem.js
new file mode 100644
index 0000000..8b58c9c
--- /dev/null
+++ b/src/teams/components/SelectTeamItem.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { ListGroupItem, Row, Col } from 'react-bootstrap';
+import Icon from 'react-fontawesome';
+
+const SelectTeamItem = ({team, onSelect, selected, editable}) => {
+ const {name, username} = team;
+ return (
+ !selected ? onSelect(args) : null} disabled={selected}>
+ {/*{name} */}
+
+ {name}
+ {username}
+
+
+
+
+
+ );
+};
+
+export default SelectTeamItem;
diff --git a/src/teams/components/TeamList.js b/src/teams/components/TeamList.js
new file mode 100644
index 0000000..3f17525
--- /dev/null
+++ b/src/teams/components/TeamList.js
@@ -0,0 +1,25 @@
+import React from 'react'
+import { ListGroup } from 'react-bootstrap';
+import { SelectTeamItem, JoinTeamItem } from './index';
+
+
+const TeamList = ({teams, onTeamSelect, selectedTeam, editable, joinable}) => {
+ return (
+
+ { joinable ? : null }
+ {
+ teams.map((team, idx) =>
+ onTeamSelect(team)}
+ selected={selectedTeam === team.id}
+ editable={editable}
+ />
+ )
+ }
+
+ );
+};
+
+export default TeamList;
diff --git a/src/teams/components/index.js b/src/teams/components/index.js
new file mode 100644
index 0000000..afe711e
--- /dev/null
+++ b/src/teams/components/index.js
@@ -0,0 +1,5 @@
+export PendingMemberList from './PendingMemberList';
+export TeamList from './TeamList';
+export SelectTeamItem from './SelectTeamItem';
+export JoinTeamItem from './JoinTeamItem';
+export JoinTeamForm from './JoinTeamForm';
diff --git a/src/shared/teams/teams.actions.js b/src/teams/teams.actions.js
similarity index 81%
rename from src/shared/teams/teams.actions.js
rename to src/teams/teams.actions.js
index 66ec054..f0b2d5e 100644
--- a/src/shared/teams/teams.actions.js
+++ b/src/teams/teams.actions.js
@@ -5,6 +5,9 @@ export const SET_TEAMS = 'TEAMS::SET_TEAMS';
export const SELECT_TEAM = 'TEAMS::SELECT';
export const PENDING_MEMBERS = 'TEAMS::PENDING_MEMBERS';
export const MEMBER_ACCEPTANCE = 'TEAMS::MEMBER_ACCEPTANCE';
+export const LEAVE_TEAM = 'TEAMS::LEAVE';
+export const TEAM_LEFT = 'TEAMS::LEFT';
+
export const requestCreateTeam = (name, username) => ({
type: REQUEST_CREATE_TEAM,
@@ -20,7 +23,7 @@ export const teamCreated = (team) => ({
export const setTeams = ({ teams, pending }) => ({
type: SET_TEAMS,
teams,
- pending
+ my_pending: pending
});
export const selectTeam = (team) => ({
@@ -28,6 +31,16 @@ export const selectTeam = (team) => ({
team
});
+export const leaveTeam = (team) => ({
+ type: LEAVE_TEAM,
+ team
+});
+
+export const teamLeft = (team) => ({
+ type: TEAM_LEFT,
+ team
+});
+
export const requestJoinTeam = (team, username) => ({
type: REQUEST_JOIN_TEAM,
data: {
diff --git a/src/shared/teams/teams.reducer.js b/src/teams/teams.reducer.js
similarity index 60%
rename from src/shared/teams/teams.reducer.js
rename to src/teams/teams.reducer.js
index 3b12224..fb1b6a3 100644
--- a/src/shared/teams/teams.reducer.js
+++ b/src/teams/teams.reducer.js
@@ -1,9 +1,9 @@
-import { TEAM_CREATED, SET_TEAMS, SELECT_TEAM, PENDING_MEMBERS } from './teams.actions';
-import { UPDATE_PROFILE } from '../../profile/profile.types';
-import { SIGNED_OUT } from '../auth.types';
+import { TEAM_CREATED, SET_TEAMS, SELECT_TEAM, PENDING_MEMBERS, TEAM_LEFT } from './teams.actions';
+import { UPDATE_PROFILE } from '../profile/profile.types';
+import { SIGNED_OUT } from '../shared/auth/auth.types';
export const getSelectedTeam = (state) => state.joined.find(team => team.id === state.selected);
-export default (state = { joined: [], selected: 0, pending: [] }, action) => {
+export const teams = (state = { joined: [], selected: 0, pending: [] }, action) => {
switch (action.type) {
case TEAM_CREATED:
return {
@@ -13,8 +13,8 @@ export default (state = { joined: [], selected: 0, pending: [] }, action) => {
case SET_TEAMS:
return {
...state,
- joined: action.teams,
- pending: action.pending,
+ joined: action.teams || [],
+ my_pending: action.my_pending || 0,
};
case SELECT_TEAM:
return {
@@ -29,17 +29,24 @@ export default (state = { joined: [], selected: 0, pending: [] }, action) => {
return {
...state,
joined: state.joined.map(
- t => t.id !== state.selected ? t : Object.assign(t, {username: action.response.username})
+ t => t.id !== state.selected ? t : Object.assign({}, t, {username: action.response.username})
),
};
case SIGNED_OUT:
- return { joined: [], selected: 0 };
+ return { joined: [], selected: 0, pending: [] };
case PENDING_MEMBERS:
return {
...state,
pending: action.list,
};
+ case TEAM_LEFT:
+ return {
+ ...state,
+ joined: state.joined.filter(t => t.id !== action.team.id),
+ };
default:
return state;
}
-}
+};
+
+export default teams;
diff --git a/src/shared/teams/teams.sagas.js b/src/teams/teams.sagas.js
similarity index 54%
rename from src/shared/teams/teams.sagas.js
rename to src/teams/teams.sagas.js
index 9fb6a11..4adb29d 100644
--- a/src/shared/teams/teams.sagas.js
+++ b/src/teams/teams.sagas.js
@@ -1,65 +1,88 @@
-import { call, take, put, select } from 'redux-saga/effects';
+import { call, take, put, select, takeEvery } from 'redux-saga/effects';
import {
REQUEST_CREATE_TEAM,
REQUEST_JOIN_TEAM,
SELECT_TEAM,
MEMBER_ACCEPTANCE,
+ LEAVE_TEAM,
teamCreated,
setTeams,
selectTeam,
setPendingMembers,
+ teamLeft,
} from './teams.actions.js';
-import api from '../../api';
-import { showInfo, raiseError } from '../notifier.actions';
-import { authenticate, fetchProfile } from '../auth.sagas';
-import { validateMember } from '../../settings/settings.sagas';
+import api from '../api';
+import { showInfo, raiseError } from '../shared/notifier.actions';
+import { authenticate, fetchProfile } from '../shared/auth/auth.sagas';
+import { validateMember } from '../settings/settings.sagas';
import { browserHistory } from 'react-router';
import { getSelectedTeam } from './teams.reducer';
+import { showQuestionModal } from '../shared/modal.actions';
+export const stateTokenSelector = state => state.hasOwnProperty('auth') && state.auth.hasOwnProperty('token');
+export const stateTeamsSelector = state => state.hasOwnProperty('teams') ? state.teams : [];
+
+export function* getCurrentTeam() {
+ const teamsState = yield select(stateTeamsSelector);
+ return getSelectedTeam(teamsState);
+}
+
export function* handleSelectTeam() {
while (true) {
const { team } = yield take(SELECT_TEAM);
- try {
- yield call(fetchProfile, team.id, team.member_id);
- yield call([browserHistory, browserHistory.push], '/match');
- } catch (error) {
- yield put(raiseError(error));
- }
+ yield call(fetchProfile, team.id, team.member_id);
+ yield call([browserHistory, browserHistory.push], `/profile/${team.username}/teams`);
}
}
-function* createTeam(action) {
+export function* createTeam(action) {
const url = api.urls.teamList();
const data = validateMember({
name: action.name,
username: action.username,
});
- const response = yield call(api.requests.post, url, data, 'Team already exists');
+ let response = {};
+ try {
+ response = yield call(api.requests.post, url, data, 'Team already exists');
+ } catch (error) {
+ yield put(raiseError(error));
+ return response;
+ }
yield put(teamCreated(response));
yield put(showInfo(`Team ${action.name} created.`));
yield put(selectTeam(response));
return response;
}
-export function* teamCreationFlow() {
- while (true) {
- const action = yield take(REQUEST_CREATE_TEAM);
- // TODO First validate form data
+export function* leaveTeam() {
+ const leave = function* ({team}) {
+ const url = api.urls.teamMemberEntity(team.id, team.member_id);
try {
- yield call(authenticate); // TODO check if not authenticated within this generator itself
- const team = yield call(createTeam, action);
- yield call(fetchTeams);
- yield call(fetchProfile, team.id, team.member_id); // TODO Should not get there if failed during any previous steps
- yield call([browserHistory, browserHistory.push], '/match');
+ yield call(api.requests['delete'], url, {}, `Failed to leave the team ${team.name}.`);
} catch (error) {
yield put(raiseError(error));
}
+ yield put(teamLeft(team));
+ yield put(showInfo(`Team ${team.name} was left.`));
+ };
+ yield takeEvery(LEAVE_TEAM, leave);
+}
+
+export function* teamCreationFlow() {
+ while (true) {
+ const action = yield take(REQUEST_CREATE_TEAM);
+ // TODO First validate form data
+ yield call(authenticate); // TODO check if not authenticated within this generator itself
+ const team = yield call(createTeam, action);
+ yield call(fetchTeams);
+ yield call(fetchProfile, team.id, team.member_id); // TODO Should not get there if failed during any previous steps
+ yield call([browserHistory, browserHistory.push], '/match');
}
}
export function* fetchTeams() {
- const alreadyAuthenticated = yield select(state => !!state.auth.token);
+ const alreadyAuthenticated = yield select(stateTokenSelector);
if (!alreadyAuthenticated) return;
const url = api.urls.teamListJoined();
try {
@@ -71,28 +94,31 @@ export function* fetchTeams() {
}
export function* initTeam() {
- const teamsState = yield select(state => state.teams);
+ const teamsState = yield select(stateTeamsSelector);
let currentTeam = getSelectedTeam(teamsState);
if (teamsState.joined.length === 0) {
- browserHistory.push('/welcome');
+ yield call([browserHistory, browserHistory.push], '/welcome');
return;
}
if (!currentTeam) {
currentTeam = teamsState.joined[0];
}
yield put(selectTeam(currentTeam));
- console.log('initTeam returns', currentTeam);
return currentTeam;
}
-function* handleJoinTeam() {
+export function* handleJoinTeam() {
while (true) {
const action = yield take(REQUEST_JOIN_TEAM);
const url = api.urls.teamJoin();
try {
- const err_msg = 'Team doesn\'t exist or username already taken';
- const response = yield call(api.requests.post, url, action.data, err_msg);
- yield put(showInfo(response));
+ const errorMsg = 'Team doesn\'t exist or username already taken';
+ const response = yield call(api.requests.post, url, action.data, errorMsg);
+ yield put(showQuestionModal({
+ title: 'Notice',
+ text: response,
+ onAccept: () => {},
+ }));
} catch(error) {
yield put(raiseError(error));
}
@@ -100,11 +126,11 @@ function* handleJoinTeam() {
}
export function* fetchPendingMembers() {
- const teamsState = yield select(state => state.teams);
- let currentTeam = getSelectedTeam(teamsState);
+ const errorMsg = 'Failed to fetch pending members';
+ const currentTeam = yield call(getCurrentTeam);
const url = api.urls.teamMemberList(currentTeam.id);
try {
- const response = yield call(api.requests.get, url, { is_accepted: 'False' }, 'Failed to fetch pending members');
+ const response = yield call(api.requests.get, url, { is_accepted: 'False' }, errorMsg);
yield put(setPendingMembers(response));
} catch (error) {
yield put(raiseError(error));
@@ -114,8 +140,7 @@ export function* fetchPendingMembers() {
export function* memberAcceptance() {
while (true) {
const action = yield take(MEMBER_ACCEPTANCE);
- const teamsState = yield select(state => state.teams);
- let currentTeam = getSelectedTeam(teamsState);
+ const currentTeam = yield call(getCurrentTeam);
const url = api.urls.teamMemberEntity(currentTeam.id, action.id);
try {
if (action.shouldAccept) {
@@ -139,5 +164,6 @@ export function* teams() {
handleSelectTeam(),
handleJoinTeam(),
memberAcceptance(),
+ leaveTeam(),
];
}
\ No newline at end of file
diff --git a/src/test/auth.reducer.test.js b/src/test/auth.reducer.test.js
new file mode 100644
index 0000000..e43a032
--- /dev/null
+++ b/src/test/auth.reducer.test.js
@@ -0,0 +1,195 @@
+import deepFreeze from 'deep-freeze';
+import {
+ setToken,
+ setProfile,
+ signedOut,
+ signIn,
+ signOut,
+} from '../shared/auth/auth.actions';
+import { profile, auth } from '../shared/auth/auth.reducer';
+import {} from '../shared/auth/auth.types';
+import {
+ requestSaveMember,
+ requestSaveProfile,
+} from '../settings/settings.actions';
+
+describe('Profile reducer', () => {
+ it('should not change profile state on default', () => {
+ const state = {};
+ const action = { type: "NULL::DEFAULT", };
+
+ deepFreeze(state);
+ deepFreeze(action);
+
+ expect(profile(state, action)).toEqual(state);
+ });
+
+ it('should update profile on REQUEST_SAVE_PROFILE', () => {
+ const stateBefore = {
+ first_name: 'abcdef',
+ };
+ const action = requestSaveProfile({ first_name: 'fib', last_name: 'nacci', });
+ const stateAfter = {
+ first_name: 'fib',
+ last_name: 'nacci',
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+ expect(profile(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should update profile on REQUEST_SAVE_MEMBER', () => {
+ const stateBefore = {
+ username: 'Pierre',
+ };
+ const action = requestSaveMember({ username: 'Cardin', });
+ const stateAfter = {
+ username: 'Cardin',
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+ expect(profile(stateBefore, action)).toEqual(stateAfter);
+ });
+});
+
+describe('Auth reducer', () => {
+ it('should not change profile state on default', () => {
+ const state = {};
+ const action = {type: "NULL::DEFAULT",};
+
+ deepFreeze(state);
+ deepFreeze(action);
+
+ expect(auth(state, action)).toEqual(state);
+ });
+
+ it('should store token', () => {
+ const token = 'qwertyuiop12345';
+ const stateBefore = {
+ dummy: [],
+ };
+ const action = setToken(token);
+ const stateAfter = {
+ dummy: [],
+ token,
+ };
+
+ deepFreeze(token);
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(auth(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should update token', () => {
+ const token = 'qwertyuiop12345';
+ const stateBefore = {
+ profile: {},
+ token: 'asdfghjkl',
+ };
+ const action = setToken(token);
+ const stateAfter = {
+ profile: {},
+ token,
+ };
+
+ deepFreeze(token);
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(auth(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should clean state on SIGNED_OUT', () => {
+ const stateBefore = {
+ token: 'asdfghjkl',
+ profile: {},
+ };
+ const action = signedOut();
+ const stateAfter = {};
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(auth(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should set profile', () => {
+ const stateBefore = {
+ token: 'asdfghjkl',
+ };
+ const action = setProfile({
+ id: 5,
+ username: 'Username1',
+ });
+ const stateAfter = {
+ token: 'asdfghjkl',
+ profile: {
+ id: 5,
+ username: 'Username1',
+ }
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(auth(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should update profile', () => {
+ const stateBefore = {
+ token: 'asdfghjkl',
+ profile: {
+ username: 'Username1',
+ first_name: '1st name',
+ last_name: 'last name',
+ },
+ };
+ const action = requestSaveProfile({
+ first_name: 'Jacob',
+ last_name: 'Adler',
+ });
+ const stateAfter = {
+ token: 'asdfghjkl',
+ profile: {
+ username: 'Username1',
+ first_name: 'Jacob',
+ last_name: 'Adler',
+ }
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(auth(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should update member profile', () => {
+ const stateBefore = {
+ token: 'asdfghjkl',
+ profile: {
+ username: 'Username1',
+ first_name: '1st name',
+ last_name: 'last name',
+ },
+ };
+ const action = requestSaveProfile({
+ username: 'JAdler',
+ });
+ const stateAfter = {
+ token: 'asdfghjkl',
+ profile: {
+ username: 'JAdler',
+ first_name: '1st name',
+ last_name: 'last name',
+ }
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(auth(stateBefore, action)).toEqual(stateAfter);
+ });
+});
diff --git a/src/test/auth.saga.test.js b/src/test/auth.saga.test.js
deleted file mode 100644
index 620cd3c..0000000
--- a/src/test/auth.saga.test.js
+++ /dev/null
@@ -1,163 +0,0 @@
-import { call, put, take, select, fork, cancel } from 'redux-saga/effects';
-import { createMockTask } from 'redux-saga/utils';
-import { prepareWindow } from '../api/oauth';
-import api from '../api';
-import * as AuthActions from '../shared/auth.actions';
-import { clean, raiseError } from '../shared/notifier.actions';
-import { authenticate, loginFlow, getOAuthErrorMsg, signIn, fetchProfile } from '../shared/auth.sagas';
-import { fetchTeams, initTeam } from '../shared/teams/teams.sagas';
-import { removeState } from '../persistence';
-import profile from '../assets/mocks/profile.json';
-import { browserHistory } from 'react-router'
-
-
-describe('Authenticate: OAuth window success scenario', () => {
- const iterator = authenticate();
- const fixture = { token: 'some_token_value' };
-
- it('should check if token exists', () => {
- const iter = iterator.next().value;
- expect(JSON.stringify(iter)).toEqual(JSON.stringify(select()))
- });
-
- it('should yield an effect call([promptWindow, open])', () => {
- const promptWindow = prepareWindow();
- const iter1 = iterator.next().value;
- const call1 = call([promptWindow, promptWindow.open]);
- expect(JSON.stringify(iter1)).toEqual(JSON.stringify(call1));
- });
-
- it('should yield an effect put(setToken(token))', () => {
- expect(iterator.next(fixture).value).toEqual(put(AuthActions.setToken(fixture.token)));
- });
-
- it('should return token and complete', () => {
- const iter = iterator.next(fixture.token).value;
- expect(iter).toEqual(fixture);
- expect(iterator.next().done).toEqual(true);
- });
-});
-
-describe('Authenticate: OAuth window already authenticated', () => {
- const iterator = authenticate();
- const fixture = { token: 'some_token_value' };
-
- it('should check if token exists', () => {
- const iter = iterator.next(fixture).value;
- expect(JSON.stringify(iter)).toEqual(JSON.stringify(select()))
- });
-
- it('should return token and complete', () => {
- const iter = iterator.next(fixture.token).value;
- expect(iter).toEqual(fixture);
- expect(iterator.next().done).toEqual(true);
- });
-});
-
-describe('Authenticate: OAuth window failure scenario', () => {
- const iterator = authenticate();
- const fixture = { error: 'failure' };
-
- it('should check if token exists', () => {
- const iter = iterator.next(fixture).value;
- expect(JSON.stringify(iter)).toEqual(JSON.stringify(select()))
- });
-
- it('should yield an effect call([promptWindow, open])', () => {
- const promptWindow = prepareWindow();
- const iter = iterator.next().value;
- const called = call([promptWindow, promptWindow.open]);
- expect(JSON.stringify(iter)).toEqual(JSON.stringify(called));
- });
-
- it('should yield an effect put(raiseError(errorMsg))', () => {
- const errorMsg = getOAuthErrorMsg(fixture);
- expect(iterator.throw(fixture).value).toEqual(put(raiseError(errorMsg)));
- });
-
- it('should complete', () => {
- const iter = iterator.next('some-token').value;
- expect(iter).toEqual({});
- expect(iterator.next().done).toEqual(true);
- });
-});
-
-describe('SignIn saga', () => {
- const iterator = signIn();
- const fixtureTeam = {
- id: 1,
- member_id: 7,
- };
-
- it('should wait for action SIGN_IN', () => {
- expect(iterator.next(AuthActions.signIn()).value).toEqual(take(AuthActions.signIn().type));
- });
-
- it('should call Authenticate saga', () => {
- expect(iterator.next().value).toEqual(call(authenticate));
- });
-
- it('should call FetchTeams saga', () => {
- expect(iterator.next().value).toEqual(call(fetchTeams));
- });
-
- it('should call InitTeam saga', () => {
- expect(iterator.next().value).toEqual(call(initTeam));
- });
-
- it('should call FetchProfile saga', () => {
- expect(iterator.next(fixtureTeam).value).toEqual(call(fetchProfile, fixtureTeam.id, fixtureTeam.member_id));
- });
-
- it('should navigate to root and finish', () => {
- expect(iterator.next().value).toEqual(call([browserHistory, browserHistory.push], `/match`));
- expect(iterator.next().done).toEqual(true);
- });
-
-});
-
-describe('Login flow', () => {
- const iterator = loginFlow();
-
- describe('success scenario', () => {
- let signInSaga;
- it('should fork SignIn saga', () => {
- signInSaga = fork(signIn);
- expect(iterator.next().value).toEqual(signInSaga);
- });
-
- it('should wait for SIGN_OUT action', () => {
- expect(iterator.next(createMockTask()).value).toEqual(take(AuthActions.signOut().type));
- });
-
- it('should cancel SignIn saga', () => {
- expect(JSON.stringify(iterator.next().value)).toEqual(JSON.stringify(cancel(createMockTask())));
- });
-
- it('should call API sign out', () => {
- const logout_url = api.urls.logout();
- const expected = call(api.requests.get, logout_url, null, 'Failed to sign out. Please try again.');
- expect(iterator.next().value).toEqual(expected)
- });
-
- it('should dispatch SIGNED_OUT action', () => {
- expect(iterator.next().value).toEqual(put(AuthActions.signedOut()));
- });
-
- it('should clean notifications', () => {
- expect(iterator.next().value).toEqual(put(clean()));
- });
-
- it('should clean localStorage', () => {
- expect(iterator.next().value).toEqual(call(removeState));
- });
-
- it('should redirect to home page', () => {
- expect(iterator.next().value).toEqual(call([browserHistory, browserHistory.push], '/'));
- });
-
- it('should not complete the saga', () => {
- expect(iterator.next().done).toEqual(false); // Fork signIn again
- });
- });
-});
\ No newline at end of file
diff --git a/src/test/auth.sagas.test.js b/src/test/auth.sagas.test.js
new file mode 100644
index 0000000..fbe9b54
--- /dev/null
+++ b/src/test/auth.sagas.test.js
@@ -0,0 +1,258 @@
+import { call, put, take, select, fork, cancel } from 'redux-saga/effects';
+import { createMockTask } from 'redux-saga/utils';
+import { prepareWindow } from '../api/oauth';
+import api from '../api';
+import * as AuthActions from '../shared/auth/auth.actions';
+import { clean, raiseError } from '../shared/notifier.actions';
+import { authenticate, loginFlow, signIn, fetchProfile } from '../shared/auth/auth.sagas';
+import { getOAuthErrorMsg } from '../shared/auth/auth.utils';
+import { fetchTeams, initTeam } from '../teams/teams.sagas';
+import { removeState } from '../persistence';
+import { browserHistory } from 'react-router'
+
+
+describe('Authenticate saga', () => {
+ describe('Scenario 1: OAuth window - success', () => {
+ const iterator = authenticate();
+ const fixture = { token: 'some_token_value' };
+
+ it('should check if token exists', () => {
+ const iter = iterator.next().value;
+ expect(JSON.stringify(iter)).toEqual(JSON.stringify(select()))
+ });
+
+ it('should yield an effect call([promptWindow, open])', () => {
+ const promptWindow = prepareWindow();
+ const iter1 = iterator.next().value;
+ const call1 = call([promptWindow, promptWindow.open]);
+ expect(JSON.stringify(iter1)).toEqual(JSON.stringify(call1));
+ });
+
+ it('should yield an effect put(setToken(token))', () => {
+ expect(iterator.next(fixture).value).toEqual(put(AuthActions.setToken(fixture.token)));
+ });
+
+ it('should return token and complete', () => {
+ const iter = iterator.next(fixture.token).value;
+ expect(iter).toEqual(fixture);
+ expect(iterator.next().done).toEqual(true);
+ });
+ });
+
+ describe('Scenario 2: OAuth window - already authenticated', () => {
+ const iterator = authenticate();
+ const fixture = { token: 'some_token_value' };
+
+ it('should check if token exists', () => {
+ const iter = iterator.next(fixture).value;
+ expect(JSON.stringify(iter)).toEqual(JSON.stringify(select()))
+ });
+
+ it('should return token and complete', () => {
+ const iter = iterator.next(fixture.token).value;
+ expect(iter).toEqual(fixture);
+ expect(iterator.next().done).toEqual(true);
+ });
+ });
+
+ describe('Scenario 3: OAuth window - failure scenario', () => {
+ const iterator = authenticate();
+ const fixture = { error: 'failure' };
+
+ it('should check if token exists', () => {
+ const iter = iterator.next(fixture).value;
+ expect(JSON.stringify(iter)).toEqual(JSON.stringify(select()))
+ });
+
+ it('should yield an effect call([promptWindow, open])', () => {
+ const promptWindow = prepareWindow();
+ const iter = iterator.next().value;
+ const called = call([promptWindow, promptWindow.open]);
+ expect(JSON.stringify(iter)).toEqual(JSON.stringify(called));
+ });
+
+ it('should yield an effect put(raiseError(errorMsg))', () => {
+ const errorMsg = getOAuthErrorMsg(fixture);
+ expect(iterator.throw(fixture).value).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should complete', () => {
+ const iter = iterator.next('some-token').value;
+ expect(iter).toEqual({});
+ expect(iterator.next().done).toEqual(true);
+ });
+ });
+});
+
+
+describe('SignIn saga', () => {
+ describe('Scenario 1: Typical [Success]', () => {
+ const iterator = signIn();
+ const fixtureTeam = {
+ id: 1,
+ member_id: 7,
+ };
+
+ it('should wait for action SIGN_IN', () => {
+ expect(iterator.next(AuthActions.signIn()).value).toEqual(take(AuthActions.signIn().type));
+ });
+
+ it('should call Authenticate saga', () => {
+ expect(iterator.next().value).toEqual(call(authenticate));
+ });
+
+ it('should call FetchTeams saga', () => {
+ expect(iterator.next().value).toEqual(call(fetchTeams));
+ });
+
+ it('should call InitTeam saga', () => {
+ expect(iterator.next().value).toEqual(call(initTeam));
+ });
+
+ it('should call FetchProfile saga', () => {
+ expect(iterator.next(fixtureTeam).value).toEqual(call(fetchProfile, fixtureTeam.id, fixtureTeam.member_id));
+ });
+
+ it('should navigate to root and finish', () => {
+ expect(iterator.next().value).toEqual(call([browserHistory, browserHistory.push], `/match`));
+ expect(iterator.next().done).toEqual(true);
+ });
+ });
+
+ describe('Scenario 2: User not assigned to any team', () => {
+ const iterator = signIn();
+ it('should wait for action SIGN_IN', () => {
+ expect(iterator.next(AuthActions.signIn()).value).toEqual(take(AuthActions.signIn().type));
+ });
+
+ it('should call Authenticate saga', () => {
+ expect(iterator.next().value).toEqual(call(authenticate));
+ });
+
+ it('should call FetchTeams saga', () => {
+ expect(iterator.next().value).toEqual(call(fetchTeams));
+ });
+
+ it('should call InitTeam saga', () => {
+ expect(iterator.next().value).toEqual(call(initTeam));
+ });
+
+ it('should return from saga', () => {
+ expect(iterator.next().done).toEqual(true);
+ });
+ });
+});
+
+
+describe('LoginFlow saga', () => {
+ describe('Scenario 1: Typical success', () => {
+ const iterator = loginFlow();
+ let signInSaga;
+ it('should fork SignIn saga', () => {
+ signInSaga = fork(signIn);
+ expect(iterator.next().value).toEqual(signInSaga);
+ });
+
+ it('should wait for SIGN_OUT action', () => {
+ expect(iterator.next(createMockTask()).value).toEqual(take(AuthActions.signOut().type));
+ });
+
+ it('should cancel SignIn saga', () => {
+ expect(JSON.stringify(iterator.next().value)).toEqual(JSON.stringify(cancel(createMockTask())));
+ });
+
+ it('should call API sign out', () => {
+ const logout_url = api.urls.logout();
+ const expected = call(api.requests.get, logout_url, null, 'Failed to sign out. Please try again.');
+ expect(iterator.next().value).toEqual(expected)
+ });
+
+ it('should dispatch SIGNED_OUT action', () => {
+ expect(iterator.next().value).toEqual(put(AuthActions.signedOut()));
+ });
+
+ it('should clean notifications', () => {
+ expect(iterator.next().value).toEqual(put(clean()));
+ });
+
+ it('should clean localStorage', () => {
+ expect(iterator.next().value).toEqual(call(removeState));
+ });
+
+ it('should redirect to home page', () => {
+ expect(iterator.next().value).toEqual(call([browserHistory, browserHistory.push], '/'));
+ });
+
+ it('should not complete the saga', () => {
+ expect(iterator.next().done).toEqual(false); // Fork signIn again
+ });
+ });
+
+ describe('Scenario 2: Failed to sign out', () => {
+ const iterator = loginFlow();
+ const error_msg = 'Failed to sign out. Please try again.';
+ let signInSaga;
+ it('should fork SignIn saga', () => {
+ signInSaga = fork(signIn);
+ expect(iterator.next().value).toEqual(signInSaga);
+ });
+
+ it('should wait for SIGN_OUT action', () => {
+ expect(iterator.next(createMockTask()).value).toEqual(take(AuthActions.signOut().type));
+ });
+
+ it('should cancel SignIn saga', () => {
+ expect(JSON.stringify(iterator.next().value)).toEqual(JSON.stringify(cancel(createMockTask())));
+ });
+
+ it('should call API sign out', () => {
+ const logout_url = api.urls.logout();
+ const expected = call(api.requests.get, logout_url, null, error_msg);
+ expect(iterator.next().value).toEqual(expected)
+ });
+
+ it('should dispatch SIGNED_OUT action', () => {
+ expect(iterator.next().value).toEqual(put(AuthActions.signedOut()));
+ });
+
+ it('should clean notifications', () => {
+ expect(iterator.next().value).toEqual(put(clean()));
+ });
+
+ it('should clean localStorage', () => {
+ expect(iterator.next().value).toEqual(call(removeState));
+ });
+
+ it('should redirect to home page', () => {
+ expect(iterator.next().value).toEqual(call([browserHistory, browserHistory.push], '/'));
+ });
+
+ it('should restart the saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toEqual(false);
+ expect(iter.value).toEqual(fork(signIn));
+ })
+ })
+});
+
+describe('Fetch profile saga', () => {
+ const team = {id: 1, member_id: 7};
+ const iterator = fetchProfile(team.id, team.member_id);
+ const profile_url = api.urls.teamMemberEntity(team.id, team.member_id);
+ const profile = { username: 'Heniek' };
+
+ it('should fetch profile from API', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(call(api.requests.get, profile_url, {}, 'Failed to load user profile'));
+ });
+
+ it('should set profile in store', () => {
+ const iter = iterator.next(profile).value;
+ expect(iter).toEqual(put(AuthActions.setProfile(profile)));
+ });
+
+ it('should return from saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toEqual(true);
+ });
+});
diff --git a/src/test/match.components.test.js b/src/test/match.components.test.js
index 2add784..92310a9 100644
--- a/src/test/match.components.test.js
+++ b/src/test/match.components.test.js
@@ -18,64 +18,64 @@ describe('MatchItem component in ProfileMatches', () => {
it('should display correct exp for user at red_def won', () => {
const match = mockMatch(username, 'BSauron2', 'CSaruman3', 'DGandalf4', 10, 5);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('15');
+ expect(component.find('.points').text()).toEqual('15xp');
});
it('should display correct exp for user at red_def lost', () => {
const match = mockMatch(username, 'BSauron2', 'CSaruman3', 'DGandalf4', 5, 10);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('-15');
+ expect(component.find('.points').text()).toEqual('-15xp');
});
it('should display correct exp for user at red_att won', () => {
const match = mockMatch('BSauron2', username, 'CSaruman3', 'DGandalf4', 10, 5);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('15');
+ expect(component.find('.points').text()).toEqual('15xp');
});
it('should display correct exp for user at red_att lost', () => {
const match = mockMatch('BSauron2', username, 'CSaruman3', 'DGandalf4', 5, 10);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('-15');
+ expect(component.find('.points').text()).toEqual('-15xp');
});
it('should display correct exp for user at blue_att won', () => {
const match = mockMatch('BSauron2', 'CSaruman3', username, 'DGandalf4', 5, 10);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('15');
+ expect(component.find('.points').text()).toEqual('15xp');
});
it('should display correct exp for user at blue_att lost', () => {
const match = mockMatch('BSauron2', 'CSaruman3', username, 'DGandalf4', 10, 5);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('-15');
+ expect(component.find('.points').text()).toEqual('-15xp');
});
it('should display correct exp for user at blue_def won', () => {
const match = mockMatch('BSauron2', 'CSaruman3', 'DGandalf4', username, 5, 10);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('15');
+ expect(component.find('.points').text()).toEqual('15xp');
});
it('should display correct exp for user at blue_def lost', () => {
const match = mockMatch('BSauron2', 'CSaruman3', 'DGandalf4', username, 10, 5);
const component = render(
- {}} username={username} />
+ {}} username={username} />
);
- expect(component.find('.points').text()).toEqual('-15');
+ expect(component.find('.points').text()).toEqual('-15xp');
});
});
\ No newline at end of file
diff --git a/src/test/match.saga.test.js b/src/test/match.saga.test.js
deleted file mode 100644
index 3addc0a..0000000
--- a/src/test/match.saga.test.js
+++ /dev/null
@@ -1,151 +0,0 @@
-import { call, put, take, select } from 'redux-saga/effects';
-import api from '../api';
-import * as MatchActions from '../matches/match.actions';
-import * as MatchTypes from '../matches/match.types';
-import { raiseError, showInfo } from '../shared/notifier.actions';
-import { publish, removeMatch } from '../matches/matches.sagas';
-import { fetchUpdateUsers } from '../users/users.sagas';
-
-describe('Publish a match - success scenario', () => {
- const iterator = publish();
- const matchData = {
- red_def: 'agappe1',
- red_att: 'barthy2',
- blue_def: 'celine3',
- blue_att: 'doughnut4',
- red_score: 3,
- blue_score: 10,
- };
- const response = {
- red_def: 'agappe1',
- red_att: 'barthy2',
- blue_def: 'celine3',
- blue_att: 'doughnut4',
- date: "2017-01-10T20:24:31.805366Z",
- red_score: 3,
- blue_score: 10,
- points: -22,
- };
- const callback = () => {};
-
- it('should wait for PUBLISH action to be dispatched', () => {
- const iter = iterator.next().value;
- expect(iter).toEqual(take(MatchTypes.PUBLISH));
- });
-
- it('should select team id', () => {
- expect(JSON.stringify(iterator.next(MatchActions.publish(matchData, callback)).value)).toEqual(JSON.stringify(select(() => 1)));
- });
-
- it('should call api to publish match', () => {
- const url = api.urls.teamMatchList(1);
- const expected = call(api.requests.post, url, matchData, 'Failed to send match to server');
- const iter = iterator.next(1).value;
- expect(iter).toEqual(expected);
- });
-
- it('should put an action with server response', () => {
- expect(iterator.next(response).value).toEqual(put(MatchActions.sent(response)));
- });
-
- it('should display success message', () => {
- const success_msg = points => `Match successfully saved. Red: ${points}, Blue: ${-points}`;
- expect(iterator.next(response).value).toEqual(put(showInfo(success_msg(response.points))));
- });
-
- it('should call to refresh users', () => {
- expect(iterator.next().value).toEqual(call(fetchUpdateUsers));
- });
-
- it('should call the callback', () => {
- expect(iterator.next().value).toEqual(call(callback));
- });
-});
-
-describe('Publish a match - API failure scenario', () => {
- const iterator = publish();
- const matchData = {
- red_def: 'agappe1',
- red_att: 'barthy2',
- blue_def: 'celine3',
- blue_att: 'doughnut4',
- red_score: 3,
- blue_score: 10,
- };
- const currentTeamId = 1;
- const callback = () => {};
-
- it('should wait for PUBLISH action to be dispatched', () => {
- const iter = iterator.next().value;
- expect(iter).toEqual(take(MatchTypes.PUBLISH));
- });
-
- it('should select team id', () => {
- const iter = JSON.stringify(iterator.next(MatchActions.publish(matchData, callback)).value);
- expect(iter).toEqual(JSON.stringify(select(() => currentTeamId)));
- });
-
- it('should call api to publish match', () => {
- const url = api.urls.teamMatchList(currentTeamId);
- const expected = call(api.requests.post, url, matchData, 'Failed to send match to server');
- const iter = iterator.next(currentTeamId).value;
- expect(iter).toEqual(expected);
- });
-
- it('should put ERROR when API fails', () => {
- const error_msg = 'Failed to send match to server';
- expect(iterator.throw(error_msg).value).toEqual(put(raiseError(error_msg)));
- });
-});
-
-describe('Remove a match - success scenario', () => {
- const iterator = removeMatch();
- const matchID = 0;
-
- it('should wait for DELETE action to be dispatched', () => {
- const iter = iterator.next().value;
- expect(iter).toEqual(take(MatchTypes.DELETE));
- });
-
- it('should select team id', () => {
- const iter = JSON.stringify(iterator.next(MatchActions.remove(matchID)).value);
- expect(iter).toEqual(JSON.stringify(select(() => 1)));
- });
-
- it('should call API to remove match', () => {
- const iter = iterator.next(1).value;
- const url = api.urls.teamMatchEntity(1, matchID);
- expect(iter).toEqual(call(api.requests['delete'], url));
- });
-
- it('should put action match DELETED', () => {
- const iter = iterator.next().value;
- expect(iter).toEqual(put(MatchActions.removed(matchID)));
- });
-});
-
-describe('Remove a match - failure scenario', () => {
- const iterator = removeMatch();
- const matchID = 0;
-
- it('should wait for DELETE action to be dispatched', () => {
- const iter = iterator.next().value;
- expect(iter).toEqual(take(MatchTypes.DELETE));
- });
-
- it('should select team id', () => {
- const iter = JSON.stringify(iterator.next(MatchActions.remove(matchID)).value);
- expect(iter).toEqual(JSON.stringify(select(() => 1)));
- });
-
- it('should call API to remove match', () => {
- const iter = iterator.next(1).value;
- const url = api.urls.teamMatchEntity(1, matchID);
- expect(iter).toEqual(call(api.requests['delete'], url));
- });
-
- it('should handle API response error', () => {
- const iter = iterator.throw(`Failed to delete match of id#${matchID}`).value;
- expect(iter).toEqual(put(raiseError(`Failed to delete match of id#${matchID}`)));
- });
-});
diff --git a/src/test/match.sagas.test.js b/src/test/match.sagas.test.js
new file mode 100644
index 0000000..b73bcab
--- /dev/null
+++ b/src/test/match.sagas.test.js
@@ -0,0 +1,207 @@
+import { call, put, take, select } from 'redux-saga/effects';
+import api from '../api';
+import * as MatchActions from '../matches/match.actions';
+import * as MatchTypes from '../matches/match.types';
+import { raiseError, showInfo } from '../shared/notifier.actions';
+import { publish, removeMatch, listMatches, stateTeamsSelectedSelector } from '../matches/matches.sagas';
+import { fetchUpdateUsers } from '../users/users.sagas';
+
+
+describe('Publish match saga', () => {
+ describe('Scenario 1: Success', () => {
+ const iterator = publish();
+ const matchData = {
+ red_def: 'agappe1',
+ red_att: 'barthy2',
+ blue_def: 'celine3',
+ blue_att: 'doughnut4',
+ red_score: 3,
+ blue_score: 10,
+ };
+ const response = {
+ red_def: 'agappe1',
+ red_att: 'barthy2',
+ blue_def: 'celine3',
+ blue_att: 'doughnut4',
+ date: "2017-01-10T20:24:31.805366Z",
+ red_score: 3,
+ blue_score: 10,
+ points: -22,
+ };
+ const callback = () => {};
+
+ it('should wait for PUBLISH action to be dispatched', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(MatchTypes.PUBLISH));
+ });
+
+ it('should select team id', () => {
+ expect(JSON.stringify(iterator.next(MatchActions.publish(matchData, callback)).value)).toEqual(JSON.stringify(select(() => 1)));
+ });
+
+ it('should call api to publish match', () => {
+ const url = api.urls.teamMatchList(1);
+ const expected = call(api.requests.post, url, matchData, 'Failed to send match to server');
+ const iter = iterator.next(1).value;
+ expect(iter).toEqual(expected);
+ });
+
+ it('should put an action with server response', () => {
+ expect(iterator.next(response).value).toEqual(put(MatchActions.sent(response)));
+ });
+
+ it('should display success message', () => {
+ const success_msg = points => `Match successfully saved. Red: ${points}, Blue: ${-points}`;
+ expect(iterator.next(response).value).toEqual(put(showInfo(success_msg(response.points))));
+ });
+
+ it('should call to refresh users', () => {
+ expect(iterator.next().value).toEqual(call(fetchUpdateUsers));
+ });
+
+ it('should call the callback', () => {
+ expect(iterator.next().value).toEqual(call(callback));
+ });
+
+ it('should not return from saga', () => {
+ expect(iterator.next().done).toBe(false);
+ });
+ });
+
+ describe('Scenario 2: API failure', () => {
+ const iterator = publish();
+ const matchData = {
+ red_def: 'agappe1',
+ red_att: 'barthy2',
+ blue_def: 'celine3',
+ blue_att: 'doughnut4',
+ red_score: 3,
+ blue_score: 10,
+ };
+ const currentTeamId = 1;
+ const callback = () => {};
+
+ it('should wait for PUBLISH action to be dispatched', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(MatchTypes.PUBLISH));
+ });
+
+ it('should select team id', () => {
+ const iter = JSON.stringify(iterator.next(MatchActions.publish(matchData, callback)).value);
+ expect(iter).toEqual(JSON.stringify(select(() => currentTeamId)));
+ });
+
+ it('should call api to publish match', () => {
+ const url = api.urls.teamMatchList(currentTeamId);
+ const expected = call(api.requests.post, url, matchData, 'Failed to send match to server');
+ const iter = iterator.next(currentTeamId).value;
+ expect(iter).toEqual(expected);
+ });
+
+ it('should put ERROR when API fails', () => {
+ const error_msg = 'Failed to send match to server';
+ expect(iterator.throw(error_msg).value).toEqual(put(raiseError(error_msg)));
+ });
+ });
+});
+
+
+describe('RemoveMatch saga', () => {
+ describe('Scenario 1: Success', () => {
+ const iterator = removeMatch();
+ const matchID = 0;
+
+ it('should wait for DELETE action to be dispatched', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(MatchTypes.DELETE));
+ });
+
+ it('should select team id', () => {
+ const iter = JSON.stringify(iterator.next(MatchActions.remove(matchID)).value);
+ expect(iter).toEqual(JSON.stringify(select(() => 1)));
+ });
+
+ it('should call API to remove match', () => {
+ const iter = iterator.next(1).value;
+ const url = api.urls.teamMatchEntity(1, matchID);
+ expect(iter).toEqual(call(api.requests['delete'], url));
+ });
+
+ it('should put action match DELETED', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(put(MatchActions.removed(matchID)));
+ });
+
+ it('should not return from saga', () => {
+ expect(iterator.next().done).toBe(false);
+ });
+ });
+
+ describe('Scenario 2: API failure', () => {
+ const iterator = removeMatch();
+ const matchID = 0;
+
+ it('should wait for DELETE action to be dispatched', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(MatchTypes.DELETE));
+ });
+
+ it('should select team id', () => {
+ const iter = JSON.stringify(iterator.next(MatchActions.remove(matchID)).value);
+ expect(iter).toEqual(JSON.stringify(select(() => 1)));
+ });
+
+ it('should call API to remove match', () => {
+ const iter = iterator.next(1).value;
+ const url = api.urls.teamMatchEntity(1, matchID);
+ expect(iter).toEqual(call(api.requests['delete'], url));
+ });
+
+ it('should handle API response error', () => {
+ const iter = iterator.throw(`Failed to delete match of id#${matchID}`).value;
+ expect(iter).toEqual(put(raiseError(`Failed to delete match of id#${matchID}`)));
+ });
+ });
+});
+
+describe('ListMatches saga', () => {
+ const params = {page: 7};
+ const currentTeamId = 17;
+ const url = api.urls.teamMatchList(currentTeamId);
+ const matches = [{id: 15}, {id: 32}];
+ const errorMsg = 'Failed to retrieve a list of matches.';
+
+ describe('Scenario 1: Success', () => {
+ const iterator = listMatches(params);
+
+ it('should select team selected from store', () => {
+ expect(iterator.next(currentTeamId).value).toEqual(select(stateTeamsSelectedSelector));
+ });
+ it('should call fetch data from API', () => {
+ expect(iterator.next(currentTeamId).value).toEqual(call(api.requests.get, url, params, errorMsg));
+ });
+ it('should put matches to store', () => {
+ expect(iterator.next(matches).value).toEqual(put(MatchActions.list(matches)));
+ });
+ it('should return from saga', () => {
+ expect(iterator.next().done).toBe(true);
+ })
+ });
+
+ describe('Scenario 2: Failure', () => {
+ const iterator = listMatches(params);
+
+ it('should select team selected from store', () => {
+ expect(iterator.next(currentTeamId).value).toEqual(select(stateTeamsSelectedSelector));
+ });
+ it('should call fetch data from API', () => {
+ expect(iterator.next(currentTeamId).value).toEqual(call(api.requests.get, url, params, errorMsg));
+ });
+ it('should display message on failure', () => {
+ expect(iterator.throw(errorMsg).value).toEqual(put(raiseError(errorMsg)));
+ });
+ it('should return from saga', () => {
+ expect(iterator.next().done).toBe(true);
+ })
+ });
+});
diff --git a/src/test/play.components.test.js b/src/test/play.components.test.js
new file mode 100644
index 0000000..ef1eb7b
--- /dev/null
+++ b/src/test/play.components.test.js
@@ -0,0 +1,15 @@
+import React from 'react';
+import { shallow } from 'enzyme';
+import PlayResult from '../play/components/PlayResult';
+import { FormControl } from 'react-bootstrap';
+
+
+describe('PlayResult component', () => {
+ it('should render two numeric inputs', () => {
+ const component = shallow( );
+ const inputs = component.find(FormControl);
+ expect(inputs).toHaveLength(2);
+ expect(inputs.first().prop('type')).toEqual('number');
+ expect(inputs.last().prop('type')).toEqual('number');
+ });
+});
diff --git a/src/test/play.sagas.test.js b/src/test/play.sagas.test.js
new file mode 100644
index 0000000..6f1c630
--- /dev/null
+++ b/src/test/play.sagas.test.js
@@ -0,0 +1,120 @@
+import { call, put, takeLatest, select } from 'redux-saga/effects';
+import api from '../api';
+import { raiseError, showInfo } from '../shared/notifier.actions';
+import { stateUsersPlayingSelector, fetchPlayScore, playScore } from '../play/play.sagas';
+import { CHOOSE, SWAP_SIDES, SWAP_POSITIONS, ASSIGN } from '../users/user.types';
+import { getCurrentTeam } from '../teams/teams.sagas';
+import { requestStatsDone } from '../play/play.actions';
+
+describe('PlayScore saga', () => {
+ const currentTeam = {
+ id: 17,
+ };
+ const url = api.urls.teamMatchPoints(currentTeam.id);
+ const errorMsg = 'Unable to get match score statistics.';
+ const players = {
+ red_att: {id: 1},
+ red_def: {id: 2},
+ blue_def: {id: 3},
+ blue_att: {id: 4},
+ };
+ const response = {
+ blue: 21,
+ red: 21,
+ };
+
+ describe('Scenario 1: Successfully obtained play score', () => {
+ const iterator = fetchPlayScore();
+
+ it('should select playing users', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(select(stateUsersPlayingSelector));
+ });
+
+ it('should obtain current team', () => {
+ const iter = iterator.next(players).value;
+ expect(iter).toEqual(call(getCurrentTeam));
+ });
+
+ it('should make GET request to team match points', () => {
+ const iter = iterator.next(currentTeam).value;
+ expect(iter).toEqual(call(api.requests.get, url, players, errorMsg));
+ });
+
+ it('should put action with score', () => {
+ const iter = iterator.next(response).value;
+ expect(iter).toEqual(put(requestStatsDone(response)));
+ });
+
+ it('should return from saga', () => {
+ expect(iterator.next().done).toBe(true);
+ });
+ });
+
+ describe('Scenario 2: Failed to obtain play score from API', () => {
+ const iterator = fetchPlayScore();
+
+ it('should select playing users', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(select(stateUsersPlayingSelector));
+ });
+
+ it('should obtain current team', () => {
+ const iter = iterator.next(players).value;
+ expect(iter).toEqual(call(getCurrentTeam));
+ });
+
+ it('should make GET request to team match points', () => {
+ const iter = iterator.next(currentTeam).value;
+ expect(iter).toEqual(call(api.requests.get, url, players, errorMsg));
+ });
+
+ it('should put RAISE_ERROR with errorMsg', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should return from saga', () => {
+ expect(iterator.next().done).toBe(true);
+ });
+ });
+
+ describe('React to all player changing actions', () => {
+ const iterator = playScore();
+
+ it('should take latest CHOOSE', () => {
+ expect(iterator.next().value).toEqual(takeLatest(CHOOSE, fetchPlayScore));
+ });
+
+ it('should take latest SWAP_POSITIONS', () => {
+ expect(iterator.next().value).toEqual(takeLatest(SWAP_POSITIONS, fetchPlayScore));
+ });
+
+ it('should take latest SWAP_SIDES', () => {
+ expect(iterator.next().value).toEqual(takeLatest(SWAP_SIDES, fetchPlayScore));
+ });
+
+ it('should take latest ASSIGN', () => {
+ expect(iterator.next().value).toEqual(takeLatest(ASSIGN, fetchPlayScore));
+ });
+ });
+});
+
+describe('Playing users selector', () => {
+ const state = {
+ users: [
+ { id: 1, team: 'red', position: 'att', playing: true, },
+ { id: 2, },
+ { id: 3, team: 'red', position: 'def', playing: true, },
+ { id: 4, team: 'blue', position: 'att', playing: true, },
+ { id: 5, team: 'blue', position: 'def', playing: true, },
+ ]
+ };
+ const expectedData = {
+ red_att: 1,
+ red_def: 3,
+ blue_att: 4,
+ blue_def: 5,
+ };
+ expect(stateUsersPlayingSelector(state)).toEqual(expectedData);
+});
diff --git a/src/test/profile.components.test.js b/src/test/profile.components.test.js
new file mode 100644
index 0000000..6b3bbb0
--- /dev/null
+++ b/src/test/profile.components.test.js
@@ -0,0 +1,14 @@
+import React from 'react';
+import { shallow } from 'enzyme';
+import { Panel } from 'react-bootstrap';
+import ProfileTeams from '../profile/components/ProfileTeams';
+
+
+describe('Profile teams page', () => {
+ describe('ProfileTeams component', () => {
+ xit('should render properly and consist of a Panel', () => {
+ const component = shallow( );
+ expect(component.find(Panel)).toHaveLength(1);
+ });
+ });
+});
diff --git a/src/test/settings.sagas.test.js b/src/test/settings.sagas.test.js
new file mode 100644
index 0000000..308b7b1
--- /dev/null
+++ b/src/test/settings.sagas.test.js
@@ -0,0 +1,291 @@
+import { call, put, take, takeLatest } from 'redux-saga/effects';
+import api from '../api';
+import { raiseError, showInfo } from '../shared/notifier.actions';
+import {
+ saveProfile, saveMember, saveSettings, onRequestSaveSettings, validateMember, settings
+} from '../settings/settings.sagas';
+import { settingsSaved } from '../settings/settings.actions';
+import { getCurrentTeam } from '../teams/teams.sagas';
+import { browserHistory } from 'react-router'
+
+import {
+ REQUEST_SAVE_PROFILE,
+ REQUEST_SAVE_MEMBER,
+ REQUEST_SAVE_SETTINGS,
+ requestSaveSettings,
+ requestSaveProfile,
+ requestSaveMember,
+} from '../settings/settings.actions';
+
+
+
+describe('onRequestSaveSettings saga', () => {
+ const iterator = onRequestSaveSettings();
+
+ it('should take latest REQUEST_SAVE_SETTINGS', () => {
+ expect(iterator.next().value).toEqual(takeLatest(REQUEST_SAVE_SETTINGS, saveSettings));
+ });
+
+ it('should return from the saga', () => {
+ expect(iterator.next().done).toBe(true);
+ });
+});
+
+describe('Save settings saga', () => {
+ const memberSettings = { username: 'ABC123', };
+ const profileSettings = { first_name: 'ABC', last_name: '123', };
+ const currentTeam = { id: 1, member_id: 15, };
+ const successMsg = 'Profile settings were saved';
+ const errorMsg = 'Failed to save profile settings';
+
+ describe('Scenario 1: Should save profile only', () => {
+ const action = requestSaveSettings({}, profileSettings);
+ const iterator = saveSettings(action);
+ const profileUrl = api.urls.profile();
+
+ it('should call API with PATCH request to save profile', () => {
+ const iter = iterator.next(action).value;
+ expect(iter).toEqual(call(api.requests.patch, profileUrl, action.values, errorMsg))
+ });
+
+ it('should show info about success', () => {
+ expect(iterator.next().value).toEqual(put(showInfo(successMsg)));
+ });
+
+ it('should dispatch action SETTINGS_SAVED', () => {
+ expect(iterator.next().value).toEqual(put(settingsSaved(action.values)));
+ });
+ });
+
+ describe('Scenario 2: Should save member only', () => {
+ const action = requestSaveSettings({}, memberSettings);
+ const iterator = saveSettings(action);
+ const memberUrl = api.urls.teamMemberEntity(currentTeam.id, currentTeam.member_id);
+
+ it('should get current team', () => {
+ expect(iterator.next().value).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call API with PATCH request to save profile', () => {
+ const iter = iterator.next(currentTeam).value;
+ expect(iter).toEqual(call(api.requests.patch, memberUrl, action.values, errorMsg))
+ });
+
+ it('should show info about success', () => {
+ expect(iterator.next().value).toEqual(put(showInfo(successMsg)));
+ });
+
+ it('should dispatch action SETTINGS_SAVED', () => {
+ expect(iterator.next().value).toEqual(put(settingsSaved(action.values)));
+ });
+
+ it('should redir to new profile url', () => {
+ const expected = call([browserHistory, browserHistory.push], '/profile/ABC123/settings');
+ expect(iterator.next().value).toEqual(expected);
+ });
+ });
+
+ describe('Scenario 3: Should both profile and member', () => {
+ const action = requestSaveSettings({}, { ...memberSettings, ...profileSettings });
+ const iterator = saveSettings(action);
+ const profileUrl = api.urls.profile();
+ const memberUrl = api.urls.teamMemberEntity(currentTeam.id, currentTeam.member_id);
+
+ it('should call API with PATCH request to save profile', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(call(api.requests.patch, profileUrl, profileSettings, errorMsg));
+ });
+
+ it('should get current team', () => {
+ expect(iterator.next().value).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call API with PATCH request to save profile', () => {
+ const iter = iterator.next(currentTeam).value;
+ expect(iter).toEqual(call(api.requests.patch, memberUrl, memberSettings, errorMsg));
+ });
+
+ it('should show info about success', () => {
+ expect(iterator.next().value).toEqual(put(showInfo(successMsg)));
+ });
+
+ it('should dispatch action SETTINGS_SAVED', () => {
+ expect(iterator.next().value).toEqual(put(settingsSaved(action.values)));
+ });
+
+ it('should redir to new profile url', () => {
+ const expected = call([browserHistory, browserHistory.push], '/profile/ABC123/settings');
+ expect(iterator.next().value).toEqual(expected);
+ });
+ });
+
+
+});
+
+describe('SaveProfile saga', () => {
+ const url = api.urls.profile();
+ const errorMsg = 'Failed to save profile.';
+
+ describe('Scenario 1: User profile saved', () => {
+ const iterator = saveProfile();
+
+ it('should wait to take REQUEST_SAVE_PROFILE', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(REQUEST_SAVE_PROFILE));
+ });
+
+ it('should call API with PATCH request to save profile', () => {
+ const action = requestSaveProfile({ first_name: 'Abc', last_name: '123' });
+ const iter = iterator.next(action).value;
+ expect(iter).toEqual(call(api.requests.patch, url, action.partialData, errorMsg));
+ });
+
+ it('should put SHOW_INFO that profile was saved', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(put(showInfo('Profile changes saved.')));
+ });
+
+ it('should not return from saga', () => {
+ expect(iterator.next().done).toBe(false);
+ });
+ });
+
+ describe('Scenario 2: Failed to save user profile', () => {
+ const iterator = saveProfile();
+
+ it('should wait to take REQUEST_SAVE_PROFILE', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(REQUEST_SAVE_PROFILE));
+ });
+
+ it('should call API with PATCH request to save profile', () => {
+ const action = requestSaveProfile({ first_name: 'Abc', last_name: '123' });
+ const iter = iterator.next(action).value;
+ expect(iter).toEqual(call(api.requests.patch, url, action.partialData, errorMsg));
+ });
+
+ it('should put RAISE_ERROR that profile was not saved', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should not return from saga', () => {
+ expect(iterator.next().done).toBe(false);
+ });
+ });
+
+});
+
+
+describe('SaveMember saga', () => {
+ const currentTeam = {
+ id: 1,
+ member_id: 15,
+ };
+ const url = api.urls.teamMemberEntity(currentTeam.id, currentTeam.member_id);
+ const successMsg = 'Team member profile saved.';
+ const errorMsg = 'Failed to save team member.';
+
+ describe('Scenario 1: Member profile saved', () => {
+ const iterator = saveMember();
+ const action = requestSaveMember({ username: 'Audiomatic' });
+
+ it('should wait to take REQUEST_SAVE_MEMBER', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(REQUEST_SAVE_MEMBER));
+ });
+
+ it('should get current team', () => {
+ expect(iterator.next(action).value).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call API with PATCH request to save profile', () => {
+ const iter = iterator.next(currentTeam).value;
+ const data = validateMember(action.partialData);
+ expect(iter).toEqual(call(api.requests.patch, url, data, errorMsg));
+ });
+
+ it('should put SHOW_INFO that profile was saved', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(put(showInfo(successMsg)));
+ });
+
+ it('should not return from saga', () => {
+ expect(iterator.next().done).toBe(false);
+ });
+ });
+
+
+
+ describe('Scenario 2: Failed to save member profile', () => {
+ const iterator = saveMember();
+ const action = requestSaveMember({ username: 'Audiomatic' });
+
+ it('should wait to take REQUEST_SAVE_MEMBER', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(REQUEST_SAVE_MEMBER));
+ });
+
+ it('should get current team', () => {
+ expect(iterator.next(action).value).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call API with PATCH request to save profile', () => {
+ const iter = iterator.next(currentTeam).value;
+ const data = validateMember(action.partialData);
+ expect(iter).toEqual(call(api.requests.patch, url, data, errorMsg));
+ });
+
+ it('should put RAISE_ERROR that the profile was NOT saved', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should not return from saga', () => {
+ expect(iterator.next().done).toBe(false);
+ });
+ });
+});
+
+describe('Validate member profile data', () => {
+ it('should return data when username has length >=3', () => {
+ const validData = {
+ username: 'exe',
+ };
+ expect(() => validateMember(validData)).not.toThrowError();
+ expect(validateMember(validData)).toEqual(validData);
+ });
+
+ it('should return data when username has length <= 14', () => {
+ const validData = {
+ username: 'executive12345',
+ };
+ expect(() => validateMember(validData)).not.toThrowError();
+ expect(validateMember(validData)).toEqual(validData);
+ });
+
+ it('should throw error when username consists of more than 14 characters', () => {
+ const invalidData = {
+ username: 'anatomopatomorfolog',
+ };
+ expect(() => validateMember(invalidData)).toThrowError();
+ });
+
+ it('should throw error when username consists of no more than 3 characters', () => {
+ const invalidData = {
+ username: 'dx',
+ };
+ expect(() => validateMember(invalidData)).toThrowError();
+ });
+});
+
+describe('Test settings route saga', () => {
+ const iterator = settings();
+ it('should yield all sagas that run on the route', () => {
+ const exp = [
+ saveProfile(),
+ saveMember(),
+ ];
+ expect(JSON.stringify(iterator.next().value)).toEqual(JSON.stringify(exp));
+ });
+});
diff --git a/src/test/teams.reducer.test.js b/src/test/teams.reducer.test.js
new file mode 100644
index 0000000..45ff377
--- /dev/null
+++ b/src/test/teams.reducer.test.js
@@ -0,0 +1,173 @@
+import * as actions from '../teams/teams.actions';
+import { signedOut } from '../shared/auth/auth.actions';
+import { profileUpdate } from '../profile/profile.actions';
+import { teams, getSelectedTeam } from '../teams/teams.reducer';
+import deepFreeze from 'deep-freeze';
+
+describe('Teams teams', () => {
+ it('should add created team to joined list', () => {
+ const team = { id: 1, name: 'Team1', };
+ const stateBefore = {
+ selected: 0,
+ pending: [],
+ joined: [],
+ };
+ const action = actions.teamCreated(team);
+ const stateAfter = {
+ selected: 0,
+ pending: [],
+ joined: [ team ],
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should select team', () => {
+ const team = { id: 1, name: 'Team1', };
+ const stateBefore = {
+ selected: 0,
+ pending: [],
+ joined: [],
+ };
+ const action = actions.selectTeam(team);
+ const stateAfter = {
+ selected: 1,
+ pending: [],
+ joined: [],
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should set teams', () => {
+ const teamList = [{ id: 1, name: 'Team1', }, { id: 2, name: 'Team2', }];
+ const stateBefore = {
+ selected: 0,
+ pending: [],
+ my_pending: 0,
+ joined: [],
+ };
+ const action = actions.setTeams({teams: teamList,});
+ const stateAfter = {
+ selected: 0,
+ pending: [],
+ my_pending: 0,
+ joined: teamList,
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should clean on signed out', () => {
+ const teamList = [{ id: 1, name: 'Team1', }, { id: 2, name: 'Team2', }];
+ const stateBefore = {
+ selected: 5,
+ pending: [teamList],
+ joined: [teamList],
+ };
+ const action = signedOut();
+ const stateAfter = {
+ selected: 0,
+ pending: [],
+ joined: [],
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should update pending list', () => {
+ const teamList = [{ id: 1, name: 'Team1', }, { id: 2, name: 'Team2', }];
+ const stateBefore = {
+ selected: 0,
+ pending: [],
+ joined: [],
+ };
+ const action = actions.setPendingMembers(teamList);
+ const stateAfter = {
+ selected: 0,
+ pending: teamList,
+ joined: [],
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should not change state on default', () => {
+ const teamList = [{ id: 1, name: 'Team1', }, { id: 2, name: 'Team2', }];
+ const stateBefore = {
+ selected: 0,
+ pending: teamList,
+ joined: teamList,
+ };
+ const action = { type: 'NULL::DEFAULT '};
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateBefore);
+ });
+
+ it('should update profile', () => {
+ const stateBefore = {
+ selected: 1,
+ pending: [],
+ joined: [{ id: 1, name: 'Team1', username: 'Wacko'},],
+ };
+ const action = profileUpdate({ username: 'UName'});
+ const stateAfter = {
+ selected: 1,
+ pending: [],
+ joined: [{ id: 1, name: 'Team1', username: 'UName'},],
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should not update profile', () => {
+ const stateBefore = {
+ selected: 1,
+ pending: [],
+ joined: [{ id: 1, name: 'Team1', username: 'Wacko'},],
+ };
+ const action = profileUpdate({ prop: 'unk'});
+ const stateAfter = {
+ selected: 1,
+ pending: [],
+ joined: [{ id: 1, name: 'Team1', username: 'Wacko'},],
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(teams(stateBefore, action)).toEqual(stateAfter);
+ });
+});
+
+describe('getSelectedTeam', () => {
+ it('should get selected team', () => {
+ const state = {
+ selected: 2,
+ pending: [],
+ joined: [{ id: 1, name: 'Team1', }, { id: 2, name: 'Team2', }],
+ };
+ expect(getSelectedTeam(state)).toEqual({ id: 2, name: 'Team2', });
+ });
+});
\ No newline at end of file
diff --git a/src/test/teams.sagas.test.js b/src/test/teams.sagas.test.js
new file mode 100644
index 0000000..ca55cd5
--- /dev/null
+++ b/src/test/teams.sagas.test.js
@@ -0,0 +1,459 @@
+import { call, put, take, select } from 'redux-saga/effects';
+import { requestCreateTeam } from '../teams/teams.actions';
+import {
+ teamCreationFlow,
+ createTeam,
+ fetchTeams,
+ handleSelectTeam,
+ stateTokenSelector,
+ stateTeamsSelector,
+ initTeam,
+ handleJoinTeam,
+ fetchPendingMembers,
+ getCurrentTeam
+} from '../teams/teams.sagas';
+import { authenticate, fetchProfile } from '../shared/auth/auth.sagas';
+import { requestJoinTeam } from '../teams/teams.actions';
+import { browserHistory } from 'react-router';
+import api from '../api';
+import { showInfo, raiseError } from '../shared/notifier.actions';
+import {
+ REQUEST_JOIN_TEAM,
+ SELECT_TEAM,
+ teamCreated,
+ setTeams,
+ selectTeam,
+ setPendingMembers,
+} from '../teams/teams.actions.js';
+import { showQuestionModal } from '../shared/modal.actions';
+
+
+
+describe('StateTokenSelector', () => {
+ it('should return true when token is present', () => {
+ const state = { auth: {token: 'abc123'}};
+ expect(stateTokenSelector(state)).toBe(true);
+ });
+
+ it('should return false when token is not present', () => {
+ const state = { auth: {}};
+ expect(stateTokenSelector(state)).toBe(false);
+ });
+
+ it('should return false when auth is not present', () => {
+ const state = {};
+ expect(stateTokenSelector(state)).toBe(false);
+ });
+});
+
+describe('StateTeamsSelector', () => {
+ it('should return list of joined teams when possible', () => {
+ const state = { teams: { joined: [{id: 5}]}};
+ expect(stateTeamsSelector(state)).toEqual(state.teams);
+ });
+
+ it('should return empty list when teams is not present', () => {
+ const state = {};
+ expect(stateTeamsSelector(state)).toEqual([]);
+ });
+});
+
+describe('TeamCreationFlow saga', () => {
+ describe('Scenario 1: Typical [Success]', () => {
+ const iterator = teamCreationFlow();
+ const action = requestCreateTeam('Team', 'Username');
+ const team = { id: 1, name: 'Team', member_id: 7 };
+
+ it('should wait for REQUEST_CREATE_TEAM', () => {
+ expect(iterator.next().value).toEqual(take(action.type));
+ });
+
+ it('should attempt authenticating user', () => {
+ const iter = iterator.next(action).value;
+ expect(iter).toEqual(call(authenticate));
+ });
+
+ it('should invoke createTeam saga', () => {
+ expect(iterator.next().value).toEqual(call(createTeam, action));
+ });
+
+ it('should fetch user\'s teams', () => {
+ expect(iterator.next(team).value).toEqual(call(fetchTeams));
+ });
+
+ it('should fetch user profile', () => {
+ expect(iterator.next().value).toEqual(call(fetchProfile, team.id, team.member_id));
+ });
+
+ it('should redirect to /match page', () => {
+ expect(iterator.next().value).toEqual(call([browserHistory, browserHistory.push], '/match'));
+ });
+ });
+});
+
+describe('CreateTeam saga - success scenario', () => {
+ const team = {
+ name: 'Team 0',
+ username: 'Zbyszek',
+ };
+ const url = api.urls.teamList();
+
+ describe('Scenario 1: Typical [Success]', () => {
+ const iterator = createTeam(team);
+
+ it('should call api: POST request', () => {
+ const iter = iterator.next(team).value;
+ expect(iter).toEqual(call(api.requests.post, url, team, 'Team already exists'));
+ });
+
+ it('should put TEAM_CREATED', () => {
+ const iter = iterator.next(team).value;
+ expect(iter).toEqual(put(teamCreated(team)))
+ });
+
+ it('should put SHOW_INFO about created team', () => {
+ const iter = iterator.next(team).value;
+ expect(iter).toEqual(put(showInfo(`Team ${team.name} created.`)));
+ });
+
+ it('should SELECT_TEAM', () => {
+ const iter = iterator.next(team).value;
+ expect(iter).toEqual(put(selectTeam(team)));
+ });
+
+ it('should return from saga with team data', () => {
+ const iter = iterator.next();
+ expect(iter.done).toEqual(true);
+ });
+ });
+
+ describe('Scenario 2: Failed to POST a new team', () => {
+ const iterator = createTeam(team);
+ const errorMsg = 'Team already exists';
+ it('should call api: POST request', () => {
+ const iter = iterator.next(team).value;
+ expect(iter).toEqual(call(api.requests.post, url, team, errorMsg));
+ });
+
+ it('should put RAISE_ERROR with error message', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should return from the saga with empty object', () => {
+ const iter = iterator.next();
+ expect(iter.done).toEqual(true);
+ expect(iter.value).toEqual({});
+ });
+ });
+});
+
+describe('HandleSelectTeam saga', () => {
+ const iterator = handleSelectTeam();
+ const team = {
+ id: 7,
+ member_id: 15,
+ username: 'Axis'
+ };
+
+ it('should wait to take SELECT_TEAM', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(SELECT_TEAM));
+ });
+
+ it('should fetch profile', () => {
+ const iter = iterator.next(selectTeam(team)).value;
+ expect(iter).toEqual(call(fetchProfile, team.id, team.member_id));
+ });
+
+ it('should redirect to new profile teams', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(call([browserHistory, browserHistory.push], `/profile/${team.username}/teams`));
+ });
+
+ it('should not return from saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toEqual(false);
+ expect(iter.value).toEqual(take(SELECT_TEAM));
+ });
+});
+
+describe('FetchTeams saga', () => {
+ const authenticatedStoreMock = {
+ auth: {
+ token: 'abc123',
+ },
+ };
+ const unauthenticatedStoreMock = {};
+ const responseMock = { teams: [{id: 5}, {id: 7},], pending: 0 };
+ const errorMsg = 'Failed to fetch user teams';
+
+ describe('Scenario 1: Success', () => {
+ const iterator = fetchTeams();
+
+ it('should check whether token is present in store', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(select(stateTokenSelector));
+ });
+
+ it('should call API to fetch user teams', () => {
+ const iter = iterator.next(authenticatedStoreMock).value;
+ const url = api.urls.teamListJoined();
+ expect(iter).toEqual(call(api.requests.get, url, {}, errorMsg));
+ });
+
+ it('should put SET_TEAMS with returned team list', () => {
+ const iter = iterator.next(responseMock).value;
+ expect(iter).toEqual(put(setTeams(responseMock)))
+ });
+
+ it('should return from the saga', () => {
+ expect(iterator.next().done).toBe(true);
+ });
+ });
+
+ describe('Scenario 2: Unauthenticated', () => {
+ const iterator = fetchTeams();
+
+ it('should check whether token is present in store', () => {
+ const iter = iterator.next(unauthenticatedStoreMock).value;
+ expect(iter).toEqual(select(stateTokenSelector));
+ });
+
+ it('should call API to fetch user teams', () => {
+ const iter = iterator.next();
+ expect(iter.value).toBe(undefined);
+ expect(iter.done).toBe(true);
+ });
+ });
+
+ describe('Scenario 3: Fetch failed', () => {
+ const iterator = fetchTeams();
+
+ it('should check whether token is present in store', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(select(stateTokenSelector));
+ });
+
+ it('should call API to fetch user teams', () => {
+ const iter = iterator.next(authenticatedStoreMock).value;
+ const url = api.urls.teamListJoined();
+ expect(iter).toEqual(call(api.requests.get, url, {}, errorMsg));
+ });
+
+ it('should put RAISE_ERROR with errorMsg', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should return from the saga', () => {
+ expect(iterator.next().done).toBe(true);
+ });
+ });
+});
+
+describe('InitTeam saga', () => {
+ const stateWithTeamsAndSelected = {
+ teams: {
+ joined: [ {id: 3}, {id: 5} ],
+ pending: 0,
+ selected: 5
+ },
+ };
+ const stateWithTeams = {
+ teams: {
+ joined: [ {id: 3}, {id: 5} ],
+ pending: 0,
+ }
+ };
+
+ const stateWithoutTeams = {
+ teams: {
+ joined: [],
+ pending: 1,
+ }
+ };
+
+ describe('Scenario 1: Success - team selected', () => {
+ const iterator = initTeam();
+ it('should get teams from store', () => {
+ const iter = iterator.next(stateWithTeamsAndSelected).value;
+ expect(iter).toEqual(select(stateTeamsSelector));
+ });
+
+ it('should put SELECT_TEAM with the team', () => {
+ const iter = iterator.next(stateWithTeamsAndSelected.teams).value;
+ expect(iter).toEqual(put(selectTeam(stateWithTeamsAndSelected.teams.joined[1])))
+ });
+
+ it('should return from the saga with the team selected', () => {
+ const iter = iterator.next();
+ expect(iter.value).toEqual(stateWithTeamsAndSelected.teams.joined[1]);
+ expect(iter.done).toBe(true);
+ });
+ });
+
+ describe('Scenario 2: No teams were joined', () => {
+ const iterator = initTeam();
+ it('should get teams from store', () => {
+ const iter = iterator.next(stateWithoutTeams).value;
+ expect(iter).toEqual(select(stateTeamsSelector));
+ });
+
+ it('should redirect to /welcome page', () => {
+ const iter = iterator.next(stateWithoutTeams.teams).value;
+ expect(iter).toEqual(call([browserHistory, browserHistory.push], '/welcome'));
+ });
+
+ it('should return from the saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toBe(true);
+ });
+ });
+
+ describe('Scenario 3: No team was selected previously', () => {
+ const iterator = initTeam();
+
+ it('should get teams from store', () => {
+ const iter = iterator.next(stateWithTeams).value;
+ expect(iter).toEqual(select(stateTeamsSelector));
+ });
+
+ it('should put SELECT_TEAM with the team', () => {
+ const iter = iterator.next(stateWithTeams.teams).value;
+ expect(iter).toEqual(put(selectTeam(stateWithTeamsAndSelected.teams.joined[0])))
+ });
+
+ it('should return from the saga with the team selected', () => {
+ const iter = iterator.next();
+ expect(iter.value).toEqual(stateWithTeamsAndSelected.teams.joined[0]);
+ expect(iter.done).toBe(true);
+ });
+ })
+});
+
+describe('HandleJoinTeam saga', () => {
+ const url = api.urls.teamJoin();
+ const errorMsg = 'Team doesn\'t exist or username already taken';
+ const action = requestJoinTeam({id: 17}, 'Dodo');
+
+ describe('Scenario 1: Successful POST with join request', () => {
+ const iterator = handleJoinTeam();
+ it('should wait for REQUEST_JOIN_TEAM', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(REQUEST_JOIN_TEAM));
+ });
+
+ it('should call API with POST request to join team', () => {
+ const iter = iterator.next(action).value;
+ expect(iter).toEqual(call(api.requests.post, url, action.data, errorMsg));
+ });
+
+ it('should show modal with a response message', () => {
+ const response = 'OK';
+ const iter = iterator.next(response).value;
+ const expected = put(showQuestionModal({
+ title: 'Notice',
+ text: response,
+ onAccept: () => {},
+ }));
+ expect(JSON.stringify(iter)).toEqual(JSON.stringify(expected));
+ });
+
+ it('should not return from the saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toBe(false);
+ });
+ });
+
+ describe('Scenario 2: POST with join request failed', () => {
+ const iterator = handleJoinTeam();
+ it('should wait for REQUEST_JOIN_TEAM', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(take(REQUEST_JOIN_TEAM));
+ });
+
+ it('should call API with POST request to join team', () => {
+ const iter = iterator.next(action).value;
+ expect(iter).toEqual(call(api.requests.post, url, action.data, errorMsg));
+ });
+
+ it('should put RAISE_ERROR with error message', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should not return from the saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toBe(false);
+ });
+ });
+});
+
+describe('FetchPendingMembers saga', () => {
+ const errorMsg = 'Failed to fetch pending members';
+ const stateWithTeamsAndSelected = {
+ teams: {
+ joined: [ {id: 3}, {id: 5} ],
+ pending: 0,
+ selected: 5
+ },
+ };
+
+ describe('Scenario 1: Successful GET pending members', () => {
+ const iterator = fetchPendingMembers();
+ const url = api.urls.teamMemberList(stateWithTeamsAndSelected.teams.selected);
+
+ it('should get current team', () => {
+ const iter = iterator.next(stateWithTeamsAndSelected).value;
+ expect(iter).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call API with GET request to fetch not accepted members', () => {
+ const iter = iterator.next(stateWithTeamsAndSelected.teams.joined[1]).value;
+ expect(iter).toEqual(call(api.requests.get, url, { is_accepted: 'False'}, errorMsg));
+ });
+
+ it('should put SET_PENDING_MEMBERS with success message', () => {
+ const response = {};
+ const iter = iterator.next(response).value;
+ expect(iter).toEqual(put(setPendingMembers(response)));
+ });
+
+ it('should return from the saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toBe(true);
+ });
+ });
+
+ describe('Scenario 2: Failed to get pending members list', () => {
+ const iterator = fetchPendingMembers();
+ const url = api.urls.teamMemberList(stateWithTeamsAndSelected.teams.selected);
+
+ it('should get current team', () => {
+ const iter = iterator.next(stateWithTeamsAndSelected).value;
+ expect(iter).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call API with GET request to fetch not accepted members', () => {
+ const iter = iterator.next(stateWithTeamsAndSelected.teams.joined[1]).value;
+ expect(iter).toEqual(call(api.requests.get, url, { is_accepted: 'False'}, errorMsg));
+ });
+
+ it('should put SET_PENDING_MEMBERS with success message', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should return from the saga', () => {
+ const iter = iterator.next();
+ expect(iter.done).toBe(true);
+ });
+ });
+});
+
+//
+// it('should ', () => {
+// const iter = iterator.next().value;
+// expect(iter).toEqual()
+// })
diff --git a/src/test/users.reducer.test.js b/src/test/users.reducer.test.js
index bc300f8..c33d263 100644
--- a/src/test/users.reducer.test.js
+++ b/src/test/users.reducer.test.js
@@ -1,16 +1,119 @@
-import { expect } from 'chai';
import * as actions from '../users/user.actions';
import deepFreeze from 'deep-freeze';
-import users from '../users/users.reducer';
+import { user, users, getSortedUsers, clean } from '../users/users.reducer';
import usersMock from '../assets/mocks/users.json';
-describe('Users reducer', function() {
+
+describe('Clean reducer', () => {
+ it('should clean playing, team, position', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 1000, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1000, },
+ {id: 5, exp: 1000, },
+ ];
+ const action = actions.choosePlayersForMatch();
+ const stateAfter = [
+ {id: 1, playing: false, team: undefined, position: undefined, exp: 1000, },
+ {id: 2, playing: false, team: undefined, position: undefined, exp: 1000, },
+ {id: 3, playing: false, team: undefined, position: undefined, exp: 1000, },
+ {id: 4, playing: false, team: undefined, position: undefined, exp: 1000, },
+ {id: 5, playing: false, team: undefined, position: undefined, exp: 1000, },
+ ];
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(clean(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should not change state on default action', () => {
+ const state = [{ id: 0, username: 'U0', team: 'red', position: 'att', }];
+ const action = { type: 'NULL::DEFAULT', };
+ deepFreeze(state);
+ deepFreeze(action);
+ expect(users(state, action)).toEqual(state);
+ });
+});
+
+
+describe('User reducer', () => {
+ it('should create new user object', () => {
+ const stateBefore = {};
+ const action = actions.userNew('Corn');
+ const stateAfter = {
+ id: 0,
+ username: 'Corn',
+ exp: 1000,
+ };
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+ expect(user(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should swap position', () => {
+ const stateBefore = { id: 0, username: 'U0', playing: true, team: 'red', position: 'att', };
+ const stateAfter = { id: 0, username: 'U0', playing: true, team: 'red', position: 'def', };
+ const action = actions.swapPositions();
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(user(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should not swap position of non-player', () => {
+ const stateBefore = { id: 0, username: 'U0', team: 'red', position: 'att', };
+ const stateAfter = { id: 0, username: 'U0', team: 'red', position: 'att', };
+ const action = actions.swapPositions();
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(user(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should swap side', () => {
+ const stateBefore = { id: 0, username: 'U0', playing: true, team: 'red', position: 'att', };
+ const stateAfter = { id: 0, username: 'U0', playing: true, team: 'blue', position: 'att', };
+ const action = actions.swapSides();
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(user(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should not swap side of non-player', () => {
+ const stateBefore = { id: 0, username: 'U0', team: 'red', position: 'att', };
+ const stateAfter = { id: 0, username: 'U0', team: 'red', position: 'att', };
+ const action = actions.swapSides();
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(user(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should not change state on default action', () => {
+ const state = { id: 0, username: 'U0', team: 'red', position: 'att', };
+ const action = { type: 'NULL::DEFAULT', };
+ deepFreeze(state);
+ deepFreeze(action);
+ expect(users(state, action)).toEqual(state);
+ });
+});
+
+
+describe('User list reducer', function() {
const username = 'Shannon';
it('should add user', function() {
const stateBefore = [];
const action = actions.userNew(username);
const stateAfter = [{
- id: 0,
+ id: 1,
username,
exp: 1000,
}];
@@ -18,42 +121,73 @@ describe('Users reducer', function() {
deepFreeze(stateBefore);
deepFreeze(action);
- expect(users(stateBefore, action)).to.deep.equal(stateAfter);
+ expect(users(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should update user', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 1000, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1000, },
+ {id: 5, exp: 1000, },
+ ];
+ const stateAfter = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 1521, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1000, },
+ {id: 5, exp: 1000, },
+ ];
+ const action = actions.userUpdate(3, { exp: 1521, });
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(users(stateBefore, action)).toEqual(stateAfter);
});
it('should delete user', function() {
- const stateBefore = [{
- id: 0,
- username,
- exp: 1000,
- }];
- const action = actions.userDelete(0);
- const stateAfter = [];
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 1000, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1000, },
+ {id: 5, exp: 1000, },
+ ];
+ const stateAfter = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1000, },
+ {id: 5, exp: 1000, },
+ ];
+ const action = actions.userDelete(3);
deepFreeze(stateBefore);
deepFreeze(action);
- expect(users(stateBefore, action)).to.deep.equal(stateAfter);
+ expect(users(stateBefore, action)).toEqual(stateAfter);
});
it('should select user', function() {
- const stateBefore = [{
- id: 0,
- username,
- exp: 1000,
- }];
- const action = actions.userToggle(stateBefore[0]);
- const stateAfter = [{
- id: 0,
- username,
- exp: 1000,
- selected: true,
- }];
+ const stateBefore = [
+ { id: 0, username: 'User0', exp: 1000, },
+ { id: 1, username: 'User1', exp: 1000, },
+ { id: 2, username: 'User2', exp: 1000, },
+ ];
+ const user = stateBefore[1];
+ const action = actions.userToggle(user);
+ const stateAfter = [
+ { id: 0, username: 'User0', exp: 1000, },
+ { id: 1, username: 'User1', exp: 1000, selected: true, },
+ { id: 2, username: 'User2', exp: 1000, },
+ ];
deepFreeze(stateBefore);
+ deepFreeze(user);
deepFreeze(action);
- expect(users(stateBefore, action)).to.deep.equal(stateAfter);
+ expect(users(stateBefore, action)).toEqual(stateAfter);
});
it('should choose four users with teams and positions', function() {
@@ -62,12 +196,28 @@ describe('Users reducer', function() {
deepFreeze(stateBefore);
deepFreeze(action);
const stateAfter = users(stateBefore, action).filter(u => u.playing);
- expect(stateAfter).to.have.lengthOf(4);
- for (let user of stateAfter) {
- expect(user).to.contain.all.keys(['team', 'position']);
+ expect(stateAfter).toHaveLength(4);
+ for (const user of stateAfter) {
+ const keys = Object.keys(user);
+ expect(keys).toContain('team');
+ expect(keys).toContain('position');
}
});
+ it('should throw error when insufficient no of players selected', () => {
+ const errorMsg = 'Insufficient number of players selected.';
+ const stateBefore = [
+ { id: 0, username: 'User0', exp: 1000, selected: true, },
+ { id: 1, username: 'User1', exp: 1000, selected: true, },
+ { id: 2, username: 'User2', exp: 1000, selected: true, },
+ { id: 3, username: 'User3', exp: 1000, },
+ ];
+ const action = actions.choosePlayersForMatch();
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+ expect(() => users(stateBefore, action)).toThrowError(errorMsg);
+ });
+
it('should not mutate state while sorting', function() {
const stateBefore = usersMock;
const actionExp = actions.sortByExp();
@@ -75,7 +225,169 @@ describe('Users reducer', function() {
deepFreeze(stateBefore);
deepFreeze(actionExp);
deepFreeze(actionName);
- expect(users.bind(null, stateBefore, actionExp)).to.not.throw(Error);
- expect(users.bind(null, stateBefore, actionName)).to.not.throw(Error);
+ expect(users.bind(null, stateBefore, actionExp)).not.toThrowError();
+ expect(users.bind(null, stateBefore, actionName)).not.toThrowError();
+ });
+
+ it('should sort by exp ascending', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 978, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1015, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 866, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1121, },
+ {id: 5, exp: 1004, },
+ ];
+ const action = actions.sortBy('exp', true);
+ const stateAfter = [
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 866, },
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 978, },
+ {id: 5, exp: 1004, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1015, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1121, },
+ ];
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(users(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should swap sides', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att'},
+ {id: 2, playing: true, team: 'red', position: 'def'},
+ {id: 3, playing: true, team: 'blue', position: 'att'},
+ {id: 4, playing: true, team: 'blue', position: 'def'},
+ ];
+ const action = actions.swapSides();
+ const stateAfter = [
+ {id: 1, playing: true, team: 'blue', position: 'att'},
+ {id: 2, playing: true, team: 'blue', position: 'def'},
+ {id: 3, playing: true, team: 'red', position: 'att'},
+ {id: 4, playing: true, team: 'red', position: 'def'},
+ ];
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(users(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should swap positions', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att'},
+ {id: 2, playing: true, team: 'red', position: 'def'},
+ {id: 3, playing: true, team: 'blue', position: 'att'},
+ {id: 4, playing: true, team: 'blue', position: 'def'},
+ ];
+ const action = actions.swapPositions();
+ const stateAfter = [
+ {id: 1, playing: true, team: 'red', position: 'def'},
+ {id: 2, playing: true, team: 'red', position: 'att'},
+ {id: 3, playing: true, team: 'blue', position: 'def'},
+ {id: 4, playing: true, team: 'blue', position: 'att'},
+ ];
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(users(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should update users list', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 1000, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1000, },
+ {id: 5, exp: 1000, },
+ ];
+ const action = actions.updateUsers([
+ {id: 3, exp: 1050, },
+ {id: 4, exp: 1050, },
+ {id: 5, exp: 1050, },
+ ]);
+ const stateAfter = getSortedUsers([
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 1050, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1050, },
+ {id: 5, exp: 1050, },
+ ], 'exp', false);
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(users(stateBefore, action)).toEqual(stateAfter);
+ });
+
+ it('should not change state on default action', () => {
+ const state = {
+ users: [],
+ };
+ const action = { type: 'NULL::DEFAULT', };
+ deepFreeze(state);
+ deepFreeze(action);
+ expect(users(state, action)).toEqual(state);
+ });
+
+ it('should set users as empty array on wrong response', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 1000, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1000, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 1000, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1000, },
+ {id: 5, exp: 1000, },
+ ];
+ const action = actions.receiveUsers({});
+ const stateAfter = [];
+
+ deepFreeze(stateBefore);
+ deepFreeze(action);
+
+ expect(() => users(stateBefore, action)).not.toThrowError();
+ expect(users(stateBefore, action)).toEqual(stateAfter);
+ });
+});
+
+describe('Sorting users by column', () => {
+ it('should sort by exp ascending', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 978, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1015, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 866, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1121, },
+ {id: 5, exp: 1004, },
+ ];
+ const stateAfter = [
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 866, },
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 978, },
+ {id: 5, exp: 1004, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1015, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1121, },
+ ];
+
+ deepFreeze(stateBefore);
+ expect(getSortedUsers(stateBefore, 'exp', true)).toEqual(stateAfter);
+ });
+
+ it('should sort by exp descending', () => {
+ const stateBefore = [
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 978, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1015, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 866, },
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1121, },
+ {id: 5, exp: 1004, },
+ ];
+ const stateAfter = [
+ {id: 4, playing: true, team: 'blue', position: 'def', exp: 1121, },
+ {id: 2, playing: true, team: 'red', position: 'def', exp: 1015, },
+ {id: 5, exp: 1004, },
+ {id: 1, playing: true, team: 'red', position: 'att', exp: 978, },
+ {id: 3, playing: true, team: 'blue', position: 'att', exp: 866, },
+ ];
+
+ deepFreeze(stateBefore);
+ expect(getSortedUsers(stateBefore, 'exp', false)).toEqual(stateAfter);
});
-});
\ No newline at end of file
+});
diff --git a/src/test/users.saga.test.js b/src/test/users.saga.test.js
deleted file mode 100644
index 1ec69f3..0000000
--- a/src/test/users.saga.test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import { call, put, select } from 'redux-saga/effects';
-import api from '../api';
-import response from '../assets/mocks/users.json';
-import * as UserActions from '../users/user.actions';
-import { raiseError } from '../shared/notifier.actions';
-import { fetchUsers } from '../users/users.sagas.js';
-
-describe('Fetch user list - success scenario', () => {
- const iterator = fetchUsers();
- const currentTeamId = 1;
-
- it('should select team id', () => {
- expect(JSON.stringify(iterator.next().value)).toEqual(JSON.stringify(select(() => currentTeamId)));
- });
-
- it('should call fetch api', () => {
- const url = api.urls.teamMemberList(currentTeamId);
- expect(iterator.next(currentTeamId).value).toEqual(call(api.requests.get, url));
- });
-
- it('should put response action', () => {
- expect(iterator.next(response).value).toEqual(put(UserActions.receiveUsers(response)));
- });
-});
-
-describe('Fetch user list - failure scenario', () => {
- const iterator = fetchUsers();
- const errorMsg = 'Unable to fetch user list';
- const currentTeamId = 1;
-
- it('should select team id', () => {
- expect(JSON.stringify(iterator.next().value)).toEqual(JSON.stringify(select(() => currentTeamId)));
- });
-
- it('should call fetch api', () => {
- const url = api.urls.teamMemberList(currentTeamId);
- expect(iterator.next(currentTeamId).value).toEqual(call(api.requests.get, url));
- });
-
- it('should put raise error action', () => {
- expect(iterator.throw(errorMsg).value).toEqual(put(raiseError(errorMsg)));
- });
-});
\ No newline at end of file
diff --git a/src/test/users.sagas.test.js b/src/test/users.sagas.test.js
new file mode 100644
index 0000000..9853f0d
--- /dev/null
+++ b/src/test/users.sagas.test.js
@@ -0,0 +1,117 @@
+import { call, put, select } from 'redux-saga/effects';
+import api from '../api';
+import response from '../assets/mocks/users.json';
+import * as UserActions from '../users/user.actions';
+import { raiseError } from '../shared/notifier.actions';
+import { fetchUsers, fetchUpdateUsers } from '../users/users.sagas.js';
+import { getCurrentTeam } from '../teams/teams.sagas';
+
+describe('FetchUsers saga ', () => {
+ const iterator = fetchUsers();
+ const currentTeam = {id: 1};
+ const url = api.urls.teamMemberList(currentTeam.id);
+
+ describe('Scenario 1 - success scenario', () => {
+ it('should select team id', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call fetch api', () => {
+ expect(iterator.next(currentTeam).value).toEqual(call(api.requests.get, url));
+ });
+
+ it('should put response action', () => {
+ const iter = iterator.next(response).value;
+ expect(iter).toEqual(put(UserActions.receiveUsers(response)));
+ });
+
+ it('should return from saga', () => {
+ const iter = iterator.next().done;
+ expect(iter).toBe(true);
+ });
+ });
+
+
+ describe('Scenario 2: - failure scenario', () => {
+ const iterator = fetchUsers();
+ const errorMsg = 'Unable to fetch user list';
+
+ it('should select team id', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(call(getCurrentTeam));
+ });
+
+ it('should call fetch api', () => {
+ const iter = iterator.next(currentTeam).value;
+ expect(iter).toEqual(call(api.requests.get, url));
+ });
+
+ it('should put raise error action', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should return from saga', () => {
+ const iter = iterator.next().done;
+ expect(iter).toBe(true);
+ });
+ });
+
+});
+
+
+describe('FetchUpdateUsers saga', () => {
+ const currentTeam = { id: 6 };
+ const url = api.urls.teamMemberList(currentTeam.id);
+ const response = [{id: 6}, {id: 7}];
+ const errorMsg = 'Failed to fetch users list';
+
+ describe('Scenario 1: Success', () => {
+ const iterator = fetchUpdateUsers();
+
+ it('should call to get current team', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(call(getCurrentTeam))
+ });
+
+ it('should call API to get team users list', () => {
+ const iter = iterator.next(currentTeam).value;
+ expect(iter).toEqual(call(api.requests.get, url, {}, errorMsg));
+ });
+
+ it('should put updateUsers action', () => {
+ const iter = iterator.next(response).value;
+ expect(iter).toEqual(put(UserActions.updateUsers(response)));
+ });
+
+ it('should return from saga', () => {
+ const iter = iterator.next(response).done;
+ expect(iter).toBe(true);
+ });
+ });
+
+ describe('Scenario 2: Failure', () => {
+ const iterator = fetchUpdateUsers();
+
+ it('should call to get current team', () => {
+ const iter = iterator.next().value;
+ expect(iter).toEqual(call(getCurrentTeam))
+ });
+
+ it('should call API to get team users list', () => {
+ const iter = iterator.next(currentTeam).value;
+ expect(iter).toEqual(call(api.requests.get, url, {}, errorMsg));
+ });
+
+ it('should put updateUsers action', () => {
+ const iter = iterator.throw(errorMsg).value;
+ expect(iter).toEqual(put(raiseError(errorMsg)));
+ });
+
+ it('should return from saga', () => {
+ const iter = iterator.next(response).done;
+ expect(iter).toBe(true);
+ });
+ });
+});
diff --git a/src/users/components/MatchToolbar.js b/src/users/components/MatchToolbar.js
index 264b952..4e7a21d 100644
--- a/src/users/components/MatchToolbar.js
+++ b/src/users/components/MatchToolbar.js
@@ -1,4 +1,4 @@
-import React, { Component } from 'react';
+import React from 'react';
import { connect } from 'react-redux';
import * as UserActions from '../user.actions';
import { raiseError } from '../../shared/notifier.actions';
@@ -11,22 +11,35 @@ const mapDispatchToProps = (dispatch) => ({
catch(err) { dispatch(raiseError(err.message)); }
window.scrollTo(0, 0);
},
- sortByExp: () => dispatch(UserActions.sortBy("exp", false)),
- sortByName: () => dispatch(UserActions.sortBy("username")),
+ sortByExp: (direction) => dispatch(UserActions.sortBy("exp", direction)),
+ sortByName: (direction) => dispatch(UserActions.sortBy("username", direction)),
});
@connect(mapStateToProps, mapDispatchToProps)
-class MatchToolbar extends Component {
+class MatchToolbar extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ sortDir: false,
+ };
+ }
+
+ sort = (method) => {
+ const { sortDir } = this.state;
+ method(sortDir);
+ this.setState({sortDir: !sortDir});
+ };
+
render() {
const { sortByName, sortByExp, handlePlay } = this.props;
return (
- By name
+ this.sort(sortByName)}>By name
- By XP
+ this.sort(sortByExp)}>By XP
Play!
diff --git a/src/users/components/UserList.js b/src/users/components/UserList.js
index 0bc3b4d..5a008f1 100644
--- a/src/users/components/UserList.js
+++ b/src/users/components/UserList.js
@@ -18,7 +18,7 @@ const UserList = ({users, select}) => (
- {}}>
+
Username
diff --git a/src/users/components/UserPicker.js b/src/users/components/UserPicker.js
index 74e8d5b..cf76eb1 100644
--- a/src/users/components/UserPicker.js
+++ b/src/users/components/UserPicker.js
@@ -1,7 +1,7 @@
-import React, { Component } from 'react';
+import React from 'react';
import { DropdownButton, MenuItem } from 'react-bootstrap';
import { connect } from 'react-redux';
-import { userUpdate } from '../user.actions';
+import { userUpdate, userAssign } from '../user.actions';
const mapStateToProps = ({users}) => ({
users: users.filter(u => u.selected),
@@ -11,12 +11,12 @@ const mapDispatchToProps = dispatch => ({
userUpdate(user.id, {playing: false, team: undefined, position: undefined})
),
assignUser: (user, team, position) => dispatch(
- userUpdate(user.id, {playing: true, team, position})
+ userAssign(user.id, {playing: true, team, position})
),
});
@connect(mapStateToProps, mapDispatchToProps)
-class UserPicker extends Component {
+class UserPicker extends React.Component {
getUsersOptions = () => {
const { users } = this.props;
return users.length === 0 ?
@@ -46,8 +46,12 @@ class UserPicker extends Component {
const user = users.find(u => u.team === team && u.position === position);
return (
-
+
+ {position.toUpperCase()}
{this.getUsersOptions()}
);
diff --git a/src/users/user.actions.js b/src/users/user.actions.js
index 77ee5eb..a17e8b4 100644
--- a/src/users/user.actions.js
+++ b/src/users/user.actions.js
@@ -29,8 +29,15 @@ export const userUpdate = (id, userData) => ({
userData,
});
-export const choosePlayersForMatch = () => ({
- type: types.CHOOSE
+export const userAssign = (id, userData) => ({
+ type: types.ASSIGN,
+ id,
+ userData,
+});
+
+export const choosePlayersForMatch = (preset) => ({
+ type: types.CHOOSE,
+ preset,
});
export const sortByExp = () => ({
diff --git a/src/users/user.types.js b/src/users/user.types.js
index d7f84d7..5c95c3c 100644
--- a/src/users/user.types.js
+++ b/src/users/user.types.js
@@ -7,3 +7,4 @@ export const SORT = 'USER::SORT';
export const UPDATE_LIST = 'USER::UPDATE::LIST';
export const SWAP_SIDES = 'USER::SWAP::SIDES';
export const SWAP_POSITIONS = 'USER::SWAP::POSITIONS';
+export const ASSIGN = 'USER::ASSIGN';
diff --git a/src/users/users.reducer.js b/src/users/users.reducer.js
index d98ace6..549cd01 100644
--- a/src/users/users.reducer.js
+++ b/src/users/users.reducer.js
@@ -2,7 +2,7 @@ import * as types from "./user.types";
import choice from "../utils/choice";
import getRoles from "../utils/roles";
-const user = (state, action) => {
+export const user = (state = {}, action) => {
switch (action.type) {
case types.ADD:
return {
@@ -10,18 +10,19 @@ const user = (state, action) => {
};
case types.CHOOSE:
case types.UPDATE:
+ case types.ASSIGN:
if (state.id !== action.id) return state;
return Object.assign({}, state, action.userData);
case types.UPDATE_LIST:
- return Object.assign(state, action.userList.find(u => u.id === state.id));
+ return Object.assign({}, state, action.userList.find(u => u.id === state.id));
case types.SWAP_POSITIONS:
if (state.playing) {
- return Object.assign(state, { position: state.position === 'att' ? 'def' : 'att'});
+ return Object.assign({}, state, { position: state.position === 'att' ? 'def' : 'att'});
}
return state;
case types.SWAP_SIDES:
if (state.playing) {
- return Object.assign(state, { team: state.team === 'red' ? 'blue' : 'red' })
+ return Object.assign({}, state, { team: state.team === 'red' ? 'blue' : 'red' })
}
return state;
default:
@@ -35,7 +36,7 @@ export const getSortedUsers = (state, column, isAscendingOrder) =>
return isAscendingOrder ? comparison : -comparison;
});
-const clean = (state = [], action) => {
+export const clean = (state = [], action) => {
switch (action.type) {
case types.CHOOSE:
return state.map(u => ({
@@ -49,7 +50,7 @@ const clean = (state = [], action) => {
}
};
-export default (state = [], action) => {
+export const users = (state = [], action) => {
switch (action.type) {
case types.ADD:
return [
@@ -59,6 +60,7 @@ export default (state = [], action) => {
case types.UPDATE:
case types.SWAP_POSITIONS:
case types.SWAP_SIDES:
+ case types.ASSIGN:
return state.map(u => user(u, action));
case types.DELETE:
return state.filter(user => user.id !== action.id);
@@ -68,8 +70,7 @@ export default (state = [], action) => {
if (selected.length < 4) { //TODO Feature request 1-1 matches
throw new Error("Insufficient number of players selected.");
}
- const chosen = choice(selected, 4);
- const playing = getRoles(chosen);
+ const playing = getRoles(choice(selected, 4));
return intermediateState.map(u => (playing[u.username]) ? playing[u.username] : u);
case types.SORT:
return getSortedUsers(state, action.column, action.isAscendingOrder);
@@ -83,3 +84,5 @@ export default (state = [], action) => {
return state;
}
};
+
+export default users;
diff --git a/src/users/users.sagas.js b/src/users/users.sagas.js
index a8b9e87..d81138e 100644
--- a/src/users/users.sagas.js
+++ b/src/users/users.sagas.js
@@ -1,11 +1,12 @@
-import { call, put, select } from 'redux-saga/effects';
+import { call, put } from 'redux-saga/effects';
import api from '../api';
import * as UserActions from './user.actions';
import { raiseError } from '../shared/notifier.actions';
+import { getCurrentTeam } from '../teams/teams.sagas';
export function* fetchUsers() {
- const currentTeamId = yield select(state => state.teams.selected);
- const url = api.urls.teamMemberList(currentTeamId);
+ const currentTeam = yield call(getCurrentTeam);
+ const url = api.urls.teamMemberList(currentTeam.id);
try {
const response = yield call(api.requests.get, url);
yield put(UserActions.receiveUsers(response));
@@ -15,12 +16,12 @@ export function* fetchUsers() {
}
export function* fetchUpdateUsers() {
- const currentTeamId = yield select(state => state.teams.selected);
- const url = api.urls.teamMemberList(currentTeamId);
+ const currentTeam = yield call(getCurrentTeam);
+ const url = api.urls.teamMemberList(currentTeam.id);
try {
- const response = yield call(api.requests.get, url);
+ const response = yield call(api.requests.get, url, {}, 'Failed to fetch users list');
yield put(UserActions.updateUsers(response));
} catch (error) {
yield put(raiseError(error));
}
-};
+}
diff --git a/src/validators.js b/src/validators.js
new file mode 100644
index 0000000..76c837a
--- /dev/null
+++ b/src/validators.js
@@ -0,0 +1,8 @@
+export const isUsername = (value, allValues, props) => value.length > 14 || value.length < 2 ?
+ new Error('Username length should be between 2 and 14 characters.') : undefined;
+
+export const isName = (value, allValues, props) => value.length <= 30 ?
+ undefined : new Error('Name should consist of no more than 30 characters.');
+
+export const isScore = (value, allValues, props) => Number.isInteger(value) && value >= 0 ?
+ undefined : new Error('Match score should be a number greater than zero.');