diff --git a/.classpath b/.classpath
new file mode 100644
index 00000000..e01fe513
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index b5e6a76d..00000000
--- a/.gitattributes
+++ /dev/null
@@ -1,5 +0,0 @@
-# Github language stats file
-external/* linguist-vendored
-lib/* linguist-vendored
-*.css linguist-vendored
-*.js linguist-vendored
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
index cc2fb2a5..47284c32
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,5 @@
-# Configuration and dependencies
+/screenlog.0*
/hal.conf
/hal.db*
-/lib/zutil-*
-/recordings/
-
-# Runtime files
-/screenlog.0*
-/OZW_Log.txt
-
-# Build and Ide files
-build
-.gradle
-.idea
\ No newline at end of file
+/build/
+/lib/Zutil.jar
diff --git a/.project b/.project
new file mode 100644
index 00000000..2656b0ff
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ hal
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Hal.iml b/Hal.iml
new file mode 100755
index 00000000..5f300ff3
--- /dev/null
+++ b/Hal.iml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index c82929e5..00000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,35 +0,0 @@
-// Jenkinsfile (Pipeline Script)
-node {
- // Configure environment
- env.JAVA_HOME = tool name: 'jdk-11'
- env.REPO_URL = "repo.koc.se/hal.git" //scm.getUserRemoteConfigs()[0].getUrl()
- env.BUILD_NAME = "BUILD-${env.BUILD_ID}"
-
-
- checkout scm
-
- stage('Build') {
- sh './gradlew clean'
- sh './gradlew build'
- }
-
- stage('Test') {
- try {
- sh './gradlew test'
- } finally {
- junit testResults: '**/build/test-results/test/*.xml'
- }
- }
-
- stage('Package') {
- sh './gradlew distZip'
- archiveArtifacts artifacts: 'build/distributions/Hal.zip', fingerprint: true
-
- // Tag artifact
- withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
- usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
- sh "git tag ${env.BUILD_NAME}"
- sh "git push 'https://${USERNAME}:${PASSWORD}@${env.REPO_URL}' ${env.BUILD_NAME}"
- }
- }
-}
diff --git a/LICENSE.txt b/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index 5a054d6b..4e797208
--- a/README.md
+++ b/README.md
@@ -1,56 +1,39 @@
# Hal
Hal is a home automation hub with sensor statistics with the functionality to
-share that data between friends. It has been developed to be very extensible so future
+share that data between friends. It is developed to be very extensible so future
Sensors and other input devices can be supported.
-
-Features:
-- **Map**, Set up a house map with sensors and events mapped on a floorplan
-- **Triggers and Actions**, IFTTT type functionality
-- **Power;Challenge**, Sync power or sensor usage between friends to challenge each other to lower the power usage
-- **[Google Assistant Integration](plugins/hal-assistant-google/READNME.md)**
-
+
Currently supported devices:
- **Network Scanner**, IP scanner to detect devices on local network
- **NUT**, Linux UPS daemon
- **Tellstick**, Supported devices:
- - NexaSelfLearning
- - Oregon0x1A2D
+ - NexaSelfLearning
+ - Oregon0x1A2D
- **Raspberry Pi**, GPIO connected sensors
-- **[Zigbee](plugins/hal-zigbee/README.md)**
- - Temperature Sensors
- - Humidity Sensors
- - Pressure Sensors
- - OnnOff Devices
-- **Google Assistant**
-- **MQTT Devices**
-
-Under development (Not ready to be used yet)
-- **Z-Wave**
-The project is currently in alpha state, and as such things will change and break continuously.
+The project is currently in alpha state, and as such things will change and break.
### Screenshots
-
+
-
+
-
+
-
+
## Installing
To run the Hal server you first need to clone the git repository and then run the
-gradle command to build and run the server:
+ant command to build and run:
```
-./gradlew run
+ant run
```
-Check `hal.conf.example` for available configuration options.
-By default, HAL server will be listening to http://localhost:8080.
+Check `hal.conf.example` for available configuration options.
## Running the tests
@@ -58,34 +41,7 @@ The current test coverage is greatly lacking, but to run the available JUnit
test-cases run:
```
-./gradlew test
-```
-
-## Architecture
-
-```
- HalAbstractControlerManager
- |
- | HalAbstractController
- | |
- | | HalAbstractDevice
- | | |
- .-----------. .------------. .--------.
- | | | | | |
- | | | | ----> | Device |
- | | | | | |
- | | ----> | Controller | '--------'
- | | | | .--------.
- | | | | | |
- | Manager | | | ----> | Device |
- | | | | | |
- | | '------------' '--------'
- | | .------------. .--------.
- | | | | | |
- | | ----> | Controller | ----> | Device |
- | | | | | |
- '-----------' '------------' '--------'
-
+ant test
```
## Authors
diff --git a/arduino/ArduinoTellstickDuo/archtech.cpp b/arduino/ArduinoTellstickDuo/archtech.cpp
index 491ce88d..74662a3b 100644
--- a/arduino/ArduinoTellstickDuo/archtech.cpp
+++ b/arduino/ArduinoTellstickDuo/archtech.cpp
@@ -59,28 +59,28 @@ bool parseArctechSelfLearning(uint8_t* bufStartP, uint8_t* bufEndP) { //start
uint64_t data = 0;
bool dimValuePresent;
uint8_t b1,b2,b3,b4;
-
+
//parse preamp
b1 = *bufStartP;
stepBufferPointer(&bufStartP);
b2 = *bufStartP;
stepBufferPointer(&bufStartP);
- if (!IS_PREAMP(b1, b2)){
+ if(!IS_PREAMP(b1, b2)){
return false;
}
//parse data
-
+
uint16_t dataBitsInBuffer = (calculateBufferPointerDistance(bufStartP, bufEndP)-2) / 4; //each bit is representd by 4 high/low
if (dataBitsInBuffer == 32) {
dimValuePresent = false;
- } else if (dataBitsInBuffer == 36){
+ }else if(dataBitsInBuffer == 36){
dimValuePresent = true;
} else {
return false;
}
-
+
for (uint8_t i = 0; i < dataBitsInBuffer; ++i) {
b1 = *bufStartP; //no of high
stepBufferPointer(&bufStartP);
@@ -103,7 +103,7 @@ bool parseArctechSelfLearning(uint8_t* bufStartP, uint8_t* bufEndP) { //start
}
//data parsed - send event over serial
-
+
Serial.print(F("+Wclass:command;protocol:arctech;model:selflearning;data:0x"));
uint8_t hexToSend = (dimValuePresent ? 9 : 8);
for (int8_t i = hexToSend - 1; i >= 0; --i) {
diff --git a/arduino/ArduinoTellstickDuo/rf.cpp b/arduino/ArduinoTellstickDuo/rf.cpp
index c97cc0d7..0d5a31a7 100644
--- a/arduino/ArduinoTellstickDuo/rf.cpp
+++ b/arduino/ArduinoTellstickDuo/rf.cpp
@@ -17,29 +17,29 @@ void parseRadioRXBuffer() {
bool parse = false;
while (bufferReadP != bufferWriteP) { //stop if the read pointer is pointing to where the writing is currently performed
uint8_t sampleCount = *bufferReadP;
-
+
if ( (((uintptr_t)bufferReadP) & 0x1) == 1 ) { //buffer pointer is odd (stores highs)
//Serial.print("high:"); Serial.println(sampleCount);
if (prevValue >= SILENCE_LENGTH) {
startDataP = bufferReadP; //some new data must start here since this is the first "high" after a silent period
}
-
+
//stream data to stream parsers
parseOregonStream(HIGH, sampleCount);
-
+
} else { //buffer pointer is even (stores lows)
//Serial.print("low:"); Serial.println(sampleCount);
if (sampleCount >= SILENCE_LENGTH) { //evaluate if it is time to parse the curernt data
endDataP = bufferReadP; //this is a silient period and must be the end of a data
- if (startDataP != 0){
+ if(startDataP != 0){
parse = true;
break;
}
}
-
+
//stream data to stream parsers
parseOregonStream(LOW, sampleCount);
-
+
}
//step the read pointer one step
@@ -74,11 +74,11 @@ void parseRadioRXBuffer() {
//Let all available parsers parse the data set now.
parseArctechSelfLearning(startDataP, endDataP);
//TODO: add more parsers here
-
+
//reset the data pointers since the data have been parsed at this point
startDataP = 0;
endDataP = 0;
-
+
}; //end radioTask
void sendTCodedData(uint8_t* data, uint8_t T_long, uint8_t* timings, uint8_t repeat, uint8_t pause) {
@@ -88,7 +88,7 @@ void sendTCodedData(uint8_t* data, uint8_t T_long, uint8_t* timings, uint8_t rep
for (int i = 0; i < T_long; ++i) {
uint8_t timeIndex = (data[i / 4] >> (6 - (2 * (i % 4)))) & 0x03;
if (timings[timeIndex] > 0 || i == T_long - 1) {
- if (nextPinState){
+ if(nextPinState){
TX_PIN_HIGH();
}else{
TX_PIN_LOW();
@@ -111,7 +111,7 @@ void sendSCodedData(uint8_t* data, uint8_t pulseCount, uint8_t repeat, uint8_t p
bool nextPinState = HIGH;
for (int i = 0; i < pulseCount; ++i) {
if (data[i] > 0 || i == pulseCount - 1) {
- if (nextPinState){
+ if(nextPinState){
TX_PIN_HIGH();
}else{
TX_PIN_LOW();
diff --git a/arduino/HalMultiSensor/HalConfiguration.h b/arduino/HalMultiSensor/HalConfiguration.h
old mode 100644
new mode 100755
index afab67fa..374981c5
--- a/arduino/HalMultiSensor/HalConfiguration.h
+++ b/arduino/HalMultiSensor/HalConfiguration.h
@@ -6,25 +6,24 @@
#define TIMER_MILLISECOND 60000 // poling in minutes
#define INDICATOR_PIN 13 // diode
-#define TX_PIN 11
-#define DEVICE_BASE_ID 99
+#define DEVICE_BASE_ID 20
// POWER CONSUMPTION SENSOR
//#define POWERCON_ENABLED // comment out to disable sensor
#define POWERCON_SENSOR SensorPhotocell()
-#define POWERCON_PROTOCOL ProtocolOregon(TX_PIN, DEVICE_BASE_ID + 0)
+#define POWERCON_PROTOCOL ProtocolOregon(11, DEVICE_BASE_ID + 1)
#define POWER_TIMER_MULTIPLIER 1
// TEMPERATURE SENSOR
#define TEMPERATURE_ENABLED // comment out to disable sensor
#define TEMPERATURE_SENSOR SensorDHT(DHT11, 10)
-#define TEMPERATURE_PROTOCOL ProtocolOregon(TX_PIN, DEVICE_BASE_ID + 1)
+#define TEMPERATURE_PROTOCOL ProtocolOregon(11, DEVICE_BASE_ID + 2)
#define TEMPERATURE_TIMER_MULTIPLIER 10
// LIGHT SENSOR
-//#define LIGHT_ENABLED // comment out to disable sensor
+#define LIGHT_ENABLED // comment out to disable sensor
#define LIGHT_SENSOR SensorBH1750()
-#define LIGHT_PROTOCOL ProtocolOregon(TX_PIN, DEVICE_BASE_ID + 2)
+#define LIGHT_PROTOCOL ProtocolOregon(11, DEVICE_BASE_ID + 3)
#define LIGHT_TIMER_MULTIPLIER 10
diff --git a/arduino/HalMultiSensor/HalInclude.h b/arduino/HalMultiSensor/HalInclude.h
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/HalInterfaces.h b/arduino/HalMultiSensor/HalInterfaces.h
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/HalMultiSensor.ino b/arduino/HalMultiSensor/HalMultiSensor.ino
old mode 100644
new mode 100755
index 0b9f3b4b..c7bc6714
--- a/arduino/HalMultiSensor/HalMultiSensor.ino
+++ b/arduino/HalMultiSensor/HalMultiSensor.ino
@@ -10,15 +10,6 @@ the data to a central location.
#include "Interrupt.h"
-#ifndef POWERCON_ENABLED
- #define POWER_TIMER_MULTIPLIER 1
-#endif
-#ifndef TEMPERATURE_ENABLED
- #define TEMPERATURE_TIMER_MULTIPLIER 1
-#endif
-#ifndef LIGHT_ENABLED
- #define LIGHT_TIMER_MULTIPLIER 1
-#endif
#define TIMER_MULTIPLIER_MAX \
POWER_TIMER_MULTIPLIER * TEMPERATURE_TIMER_MULTIPLIER * LIGHT_TIMER_MULTIPLIER
unsigned int timerMultiplier = 0;
@@ -92,7 +83,7 @@ void loop()
// Send power consumption
#ifdef POWERCON_ENABLED
- if (timerMultiplier % POWER_TIMER_MULTIPLIER == 0)
+ if(timerMultiplier % POWER_TIMER_MULTIPLIER == 0)
{
static PowerData powerData;
powerSensor->read(powerData); // not needed, only here for future use
@@ -103,7 +94,7 @@ void loop()
// Handle temperature sensor
#ifdef TEMPERATURE_ENABLED
- if (timerMultiplier % TEMPERATURE_TIMER_MULTIPLIER == 0)
+ if(timerMultiplier % TEMPERATURE_TIMER_MULTIPLIER == 0)
{
static TemperatureData tempData;
tempSensor->read(tempData);
@@ -114,7 +105,7 @@ void loop()
// Handle light sensor
#ifdef LIGHT_ENABLED
- if (timerMultiplier % LIGHT_TIMER_MULTIPLIER == 0)
+ if(timerMultiplier % LIGHT_TIMER_MULTIPLIER == 0)
{
static LightData lightData;
lightSensor->read(lightData);
diff --git a/arduino/HalMultiSensor/HalMultiSensorEnclosure.FCStd b/arduino/HalMultiSensor/HalMultiSensorEnclosure.FCStd
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/HalMultiSensorEnclosure_bottom.stl b/arduino/HalMultiSensor/HalMultiSensorEnclosure_bottom.stl
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/HalMultiSensorEnclosure_top.stl b/arduino/HalMultiSensor/HalMultiSensorEnclosure_top.stl
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/Interrupt.cpp b/arduino/HalMultiSensor/Interrupt.cpp
old mode 100644
new mode 100755
index 009af7e7..4389e570
--- a/arduino/HalMultiSensor/Interrupt.cpp
+++ b/arduino/HalMultiSensor/Interrupt.cpp
@@ -36,14 +36,13 @@ void Interrupt::sleep()
sleep_enable(); // enables the sleep bit in the mcucr register
// so sleep is possible. just a safety pin
- //power_adc_disable();
+ power_adc_disable();
//power_spi_disable();
- //power_usart0_disable();
//power_timer0_disable();
//power_timer1_disable();
//power_timer2_disable();
//power_twi_disable();
- //power_all_disable();
+ //power_all_disable()
while( ! Interrupt::wakeUpNow)
{
@@ -53,7 +52,7 @@ void Interrupt::sleep()
sleep_disable(); // first thing after waking from sleep:
// disable sleep...
- //power_adc_enable();
+ power_adc_enable();
//power_spi_enable();
//power_usart0_enable();
//power_timer0_enable();
diff --git a/arduino/HalMultiSensor/Interrupt.h b/arduino/HalMultiSensor/Interrupt.h
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/ProtocolNexa.cpp b/arduino/HalMultiSensor/ProtocolNexa.cpp
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/ProtocolNexa.h b/arduino/HalMultiSensor/ProtocolNexa.h
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/ProtocolOregon.cpp b/arduino/HalMultiSensor/ProtocolOregon.cpp
old mode 100644
new mode 100755
index 96f04174..04e91ca9
--- a/arduino/HalMultiSensor/ProtocolOregon.cpp
+++ b/arduino/HalMultiSensor/ProtocolOregon.cpp
@@ -83,14 +83,14 @@ inline void ProtocolOregon::setId(byte data[], byte id)
*/
inline void ProtocolOregon::setBatteryLevel(byte data[], bool level)
{
- if (!level) data[4] = 0x0C;
+ if(!level) data[4] = 0x0C;
else data[4] = 0x00;
}
inline void ProtocolOregon::setTemperature(byte data[], float temp)
{
// Set temperature sign
- if (temp < 0)
+ if(temp < 0)
{
data[6] = 0x08;
temp *= -1;
@@ -127,9 +127,9 @@ inline void ProtocolOregon::calculateAndSetChecksum(byte data[])
for(byte i = 0; i<8;i++)
{
sum += (data[i]&0xF0) >> 4;
- sum += (data[i]&0x0F);
+ sum += (data[i]&0xF);
}
- data[8] = ((sum - 0x0A) & 0xFF);
+ data[8] = ((sum - 0xa) & 0xFF);
}
diff --git a/arduino/HalMultiSensor/ProtocolOregon.h b/arduino/HalMultiSensor/ProtocolOregon.h
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/SensorBH1750.cpp b/arduino/HalMultiSensor/SensorBH1750.cpp
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/SensorBH1750.h b/arduino/HalMultiSensor/SensorBH1750.h
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/SensorDHT.cpp b/arduino/HalMultiSensor/SensorDHT.cpp
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/SensorDHT.h b/arduino/HalMultiSensor/SensorDHT.h
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/SensorPhotocell.cpp b/arduino/HalMultiSensor/SensorPhotocell.cpp
old mode 100644
new mode 100755
diff --git a/arduino/HalMultiSensor/SensorPhotocell.h b/arduino/HalMultiSensor/SensorPhotocell.h
old mode 100644
new mode 100755
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 5f07163e..00000000
--- a/build.gradle
+++ /dev/null
@@ -1,86 +0,0 @@
-plugins {
- id 'java'
- id 'application'
-}
-
-// ------------------------------------
-// Hal common configuration
-// ------------------------------------
-
-allprojects {
- repositories {
- mavenLocal()
- mavenCentral()
- }
-}
-
-subprojects {
- apply plugin: 'java-library'
-
- dependencies {
- //implementation 'se.koc:zutil:1.0.314'
- implementation 'se.koc:zutil:1.0.0-SNAPSHOT'
-
- testImplementation 'junit:junit:4.12'
- testImplementation 'org.hamcrest:hamcrest-core:2.2'
- }
-
- sourceSets {
- main {
- java {
- srcDirs 'src'
- }
- // We do not want the resource folder to be included in the jar file
- //resources {
- // srcDir 'resource'
- //}
- }
- test {
- java {
- srcDirs 'test'
- }
- }
- }
-}
-
-// ------------------------------------
-// Hal general configuration
-// ------------------------------------
-
-dependencies {
- project.subprojects.each { subProject ->
- runtimeOnly subProject
- }
-}
-
-distributions {
- distTar.enabled = false
- distZip.enabled = false
-
- main {
- contents {
- from 'hal.conf.example'
- from 'logging.properties'
-
- from "${buildDir}/resources"
- }
- }
-}
-
-task copyRecources(type: Copy) {
- doFirst{
- System.out.println("Copying resource files...")
- }
-
- project.subprojects.each { subProject ->
- from "${subProject.projectDir}/resources"
- }
-
- into("${buildDir}/resources")
-}
-
-processResources.finalizedBy(copyRecources)
-
-application {
- mainClass = 'se.hal.HalServer'
-}
\ No newline at end of file
diff --git a/build.xml b/build.xml
new file mode 100755
index 00000000..6278ccc5
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Z-Stick_Gen5_Drivers.zip b/external/Z-Stick_Gen5_Drivers.zip
deleted file mode 100644
index c5b3356e..00000000
Binary files a/external/Z-Stick_Gen5_Drivers.zip and /dev/null differ
diff --git a/external/marytts-5.1.2/LICENSE.txt b/external/marytts-5.1.2/LICENSE.txt
new file mode 100755
index 00000000..01dc74eb
--- /dev/null
+++ b/external/marytts-5.1.2/LICENSE.txt
@@ -0,0 +1,74 @@
+MARY Software User Agreement
+11 April 2011
+
+MARY is licensed under the following terms.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, version 3 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program. If not, see .
+
+
+
+
+Applicable Licenses
+
+MARY is built upon a number of other open source technologies and products.
+Here is a list of those products with links to their licenses.
+
+hts_engine: the HMM-based speech synthesis code in MARY TTS is based on HTS, ported to Java by DFKI. The original HTS can be obtained from
+http://hts-engine.sourceforge.net/ -- it is released under the New and
+Simplified BSD License.
+
+freetts: MARY uses code from FreeTTS (http://freetts.sf.net) for various
+processing modules and as the source of one method for waveform synthesis.
+FreeTTS is licensed under the (BSD-style) FreeTTS license, see
+doc/licenses/freetts-license.txt.
+
+JTok: The JTok tokenizer from http://heartofgold.dfki.de is distributed
+under the GNU Lesser General Public License, see http://www.gnu.org or
+doc/licenses/LGPL.txt.
+
+jsresources.jar: A few utility classes from http://www.jsresources.org
+are distributed under the terms of the jsresources license, see
+doc/licenses/jsresources-license.txt.
+
+log4j: MARY uses log4j (http://logging.apache.org/log4j) as a logging
+mechanism. log4j is distributed under the Apache Software License, see
+http://www.apache.org or doc/licenses/apache-software-license.txt
+
+JUnit: For unit testing of the java source, mary uses JUnit
+(http://junit.org). JUnit is licensed under the Common Public License, see
+http://junit.org or doc/licenses/CPL.txt.
+
+java-diff: A java diff implementation from http://www.incava.org/projects/java-diff for input-output-comparisons in the
+Mary Expert Interface. java-diff is licensed under the GNU Lesser General
+Public License, see http://www.gnu.org or doc/licenses/LGPL.txt.
+
+fast-md5: A fast md5 checksum implementation from http://www.twmacinta.com/myjava/fast_md5.php
+used for computing checksums after downloading voices. fast-md5 is licensed under
+the GNU Lesser General Public License, see http://www.gnu.org or doc/licenses/LGPL.txt.
+
+JavaOpenAIR: MARY can optionally be used as an OpenAIR component,
+building on the JavaOpenAIR reference implementation from
+http://www.mindmakers.org, which is licensed under the
+(BSD-style) JavaOpenAIR license, see doc/licenses/JavaOpenAIR-license.txt
+(files concerned: JavaOpenAIR.jar)
+
+mwdumper: A tool for extracting sets of pages from a MediaWiki dump file.
+mwdumper is MIT-style like licensed, see http://www.mediawiki.org/wiki/Mwdumper
+and for the license http://en.wikipedia.org/wiki/MIT_License.
+(files concerned: mwdumper-2008-04-13.jar)
+
+
+sgt: The Scientific Graphics Toolkit (sgt) is provided by the NOAA/PMEL/EPIC group (see http://www.epic.noaa.gov/java/sgt/) under the BSD-style EPIC license, see doc/licenses/epic-license.txt.
+
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS
+AND CONDITIONS PRIOR TO USE OF THIS CONTENT.
diff --git a/external/marytts-5.1.2/bin/marytts-client b/external/marytts-5.1.2/bin/marytts-client
new file mode 100755
index 00000000..f20b9315
--- /dev/null
+++ b/external/marytts-5.1.2/bin/marytts-client
@@ -0,0 +1,10 @@
+#!/bin/bash
+##########################################################################
+# MARY TTS client
+##########################################################################
+
+# Set the Mary base installation directory in an environment variable:
+BINDIR="`dirname "$0"`"
+export MARY_BASE="`(cd "$BINDIR"/.. ; pwd)`"
+
+java -showversion -ea -Dserver.host=localhost -Dserver.port=59125 -jar "$MARY_BASE/lib/marytts-client-5.1.2-jar-with-dependencies.jar"
diff --git a/external/marytts-5.1.2/bin/marytts-client.bat b/external/marytts-5.1.2/bin/marytts-client.bat
new file mode 100755
index 00000000..4a231d9f
--- /dev/null
+++ b/external/marytts-5.1.2/bin/marytts-client.bat
@@ -0,0 +1,10 @@
+@echo off
+set BINDIR=%~dp0
+call :RESOLVE "%BINDIR%\.." MARY_BASE
+
+java -showversion -ea -Dserver.host=localhost -Dserver.port=59125 -jar "%MARY_BASE%\lib\marytts-client-5.1.2-jar-with-dependencies.jar"
+goto :EOF
+
+:RESOLVE
+set %2=%~f1
+goto :EOF
diff --git a/external/marytts-5.1.2/bin/marytts-component-installer b/external/marytts-5.1.2/bin/marytts-component-installer
new file mode 100755
index 00000000..44cea75d
--- /dev/null
+++ b/external/marytts-5.1.2/bin/marytts-component-installer
@@ -0,0 +1,5 @@
+#!/bin/sh
+BINDIR="`dirname "$0"`"
+export MARY_BASE="`(cd "$BINDIR"/.. ; pwd)`"
+java -showversion -ea -Dmary.base="$MARY_BASE" $* -cp "$MARY_BASE/lib/*" marytts.tools.install.InstallerGUI
+
diff --git a/external/marytts-5.1.2/bin/marytts-component-installer.bat b/external/marytts-5.1.2/bin/marytts-component-installer.bat
new file mode 100755
index 00000000..8f4ff657
--- /dev/null
+++ b/external/marytts-5.1.2/bin/marytts-component-installer.bat
@@ -0,0 +1,9 @@
+@echo off
+set BINDIR=%~dp0
+call :RESOLVE "%BINDIR%\.." MARY_BASE
+java -showversion -ea -Dmary.base="%MARY_BASE%" -cp ".;%MARY_BASE%\lib\*" marytts.tools.install.InstallerGUI
+goto :EOF
+
+:RESOLVE
+set %2=%~f1
+goto :EOF
diff --git a/external/marytts-5.1.2/bin/marytts-server b/external/marytts-5.1.2/bin/marytts-server
new file mode 100755
index 00000000..be3c0939
--- /dev/null
+++ b/external/marytts-5.1.2/bin/marytts-server
@@ -0,0 +1,11 @@
+#!/bin/bash
+##########################################################################
+# MARY TTS server
+##########################################################################
+
+# Set the Mary base installation directory in an environment variable:
+BINDIR="`dirname "$0"`"
+export MARY_BASE="`(cd "$BINDIR"/.. ; pwd)`"
+
+
+java -showversion -ea -Xms40m -Xmx1g -cp "$MARY_BASE/lib/*" -Dmary.base="$MARY_BASE" $* marytts.server.Mary
diff --git a/external/marytts-5.1.2/bin/marytts-server.bat b/external/marytts-5.1.2/bin/marytts-server.bat
new file mode 100755
index 00000000..f3cc2dad
--- /dev/null
+++ b/external/marytts-5.1.2/bin/marytts-server.bat
@@ -0,0 +1,14 @@
+@echo off
+
+rem Set the Mary base installation directory in an environment variable:
+set BINDIR=%~dp0
+
+call :RESOLVE "%BINDIR%\.." MARY_BASE
+
+set CLASSPATH=".;%MARY_BASE%\lib\*"
+java -showversion -ea -Xms40m -Xmx1g -cp %CLASSPATH% "-Dmary.base=%MARY_BASE%" marytts.server.Mary
+goto :EOF
+
+:RESOLVE
+set %2=%~f1
+goto :EOF
diff --git a/external/marytts-5.1.2/doc/examples/client/MaryClient.py b/external/marytts-5.1.2/doc/examples/client/MaryClient.py
new file mode 100755
index 00000000..46569873
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/MaryClient.py
@@ -0,0 +1,367 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+import socket, sys, types, getopt
+
+
+languageNames = {'de':'German',
+ 'en':'English',
+ 'en_US':'US English',
+ 'tib':'Tibetan'}
+
+class MaryClient:
+ specificationVersion = "0.1"
+
+ """Python implementation of a MARY TTS client"""
+ def __init__( self, host="cling.dfki.uni-sb.de", port=59125, profile=False, quiet=False ):
+ self.host = host
+ self.port = port
+ self.profile = profile
+ self.quiet = quiet
+ self.allVoices = None # array of Voice objects
+ self.voicesByLocaleMap = {} # Map locale strings to arrays of Voice objects
+ self.allDataTypes = None # array of DataType objects
+ self.inputDataTypes = None # array of DataType objects
+ self.outputDataTypes = None # array of DataType objects
+ self.serverExampleTexts = {}
+ self.voiceExampleTexts = {}
+ self.serverVersionInfo = u''
+
+ if not self.quiet:
+ sys.stderr.write( "MARY TTS Python Client %s\n" % ( self.specificationVersion ) )
+ try:
+ info = self.getServerVersionInfo()
+ except:
+ sys.stderr.write( "Problem connecting to mary server at %s:%i\n" % ( self.host, self.port ) )
+ raise
+ sys.stderr.write( "Connected to %s:%i, " % ( self.host, self.port ) )
+ sys.stderr.write( info )
+ sys.stderr.write( '\n' )
+
+ def __getServerInfo( self, request="", marySocket=None ):
+ """Get answer to request from mary server. Returns a list of unicode strings,
+ each representing a line without the line break.
+ """
+ closeSocket = False
+ if marySocket is None:
+ closeSocket = True
+ marySocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
+ marySocket.connect( ( self.host, self.port ) )
+ assert isinstance(marySocket, socket.SocketType)
+ maryFile = marySocket.makefile( 'rwb', 1 ) # read-write, line-buffered
+ maryFile.write( unicode( request+"\n" ).encode( 'utf-8' ) )
+ result = []
+ while True:
+ got = unicode( maryFile.readline().strip(), 'utf-8' )
+ # read until end of file or an empty line is read:
+ if not got: break
+ result.append(got)
+ if closeSocket:
+ marySocket.close()
+ return result
+
+ def getServerVersionInfo( self ):
+ "Get version info from server. Returns a unicode string"
+ if self.serverVersionInfo == u'':
+ # need to get it from server
+ self.serverVersionInfo = u'\n'.join(self.__getServerInfo("MARY VERSION"))
+ return self.serverVersionInfo
+
+ def getAllDataTypes(self, locale=None):
+ """Obtain a list of all data types known to the server. If the information is not
+ yet available, the server is queried. This is optional information
+ which is not required for the normal operation of the client, but
+ may help to avoid incompatibilities.
+ Returns an array of DataType objects
+ """
+ if self.allDataTypes is None:
+ self.__fillDataTypes()
+ assert self.allDataTypes is not None and len( self.allDataTypes ) > 0
+ if locale is None:
+ return self.allDataTypes
+ else:
+ assert isinstance(locale, types.UnicodeType), "Unexpected type for locale: '%s'" % (type(locale))
+ return [d for d in self.allDataTypes if d.locale is None or d.locale == locale]
+
+ def getInputDataTypes(self,locale=None):
+ """Obtain a list of input data types known to the server. If the information is not
+ yet available, the server is queried. This is optional information
+ which is not required for the normal operation of the client, but
+ may help to avoid incompatibilities.
+ Returns an arry of DataType objects
+ """
+ if self.inputDataTypes is None:
+ self.__fillDataTypes()
+ assert self.inputDataTypes is not None and len( self.inputDataTypes ) > 0
+ if locale is None:
+ return self.inputDataTypes
+ else:
+ assert isinstance(locale, types.UnicodeType), "Unexpected type for locale: '%s'" % (type(locale))
+ return [d for d in self.inputDataTypes if d.locale is None or d.locale == locale]
+
+ def getOutputDataTypes(self, locale=None):
+ """Obtain a list of output data types known to the server. If the information is not
+ yet available, the server is queried. This is optional information
+ which is not required for the normal operation of the client, but
+ may help to avoid incompatibilities.
+ Returns an arry of DataType objects
+ """
+ if self.outputDataTypes is None:
+ self.__fillDataTypes()
+ assert self.outputDataTypes is not None and len( self.outputDataTypes ) > 0
+ if locale is None:
+ return self.outputDataTypes
+ else:
+ assert isinstance(locale, types.UnicodeType), "Unexpected type for locale: '%s'" % (type(locale))
+ return [d for d in self.outputDataTypes if d.locale is None or d.locale == locale]
+
+
+ def __fillDataTypes( self ):
+ self.allDataTypes = []
+ self.inputDataTypes = []
+ self.outputDataTypes = []
+ marySocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
+ marySocket.connect( ( self.host, self.port ) )
+ # Expect a variable number of lines of the kind
+ # RAWMARYXML INPUT OUTPUT
+ # TEXT_DE LOCALE=de INPUT
+ # AUDIO OUTPUT
+ typeStrings = self.__getServerInfo( "MARY LIST DATATYPES", marySocket )
+ if not typeStrings or len(typeStrings) == 0:
+ raise IOError( "Could not get list of data types from Mary server" )
+ marySocket.close()
+ for typeString in typeStrings:
+ parts = typeString.split()
+ if len( parts ) == 0:
+ continue
+ name = parts[0]
+ isInputType = False
+ isOutputType = False
+ locale = None
+ for part in parts[1:]:
+ if part[:7] == "LOCALE=":
+ locale = part[7:]
+ elif part == "INPUT":
+ isInputType = True
+ elif part == "OUTPUT":
+ isOutputType = True
+ dt = DataType( name, locale, isInputType, isOutputType )
+ self.allDataTypes.append( dt )
+ if dt.isInputType:
+ self.inputDataTypes.append( dt )
+ if dt.isOutputType:
+ self.outputDataTypes.append( dt )
+
+ def getVoices( self, locale=None ):
+ """Obtain a list of voices known to the server. If the information is not
+ yet available, the server is queried. This is optional information
+ which is not required for the normal operation of the client, but
+ may help to avoid incompatibilities.
+ Returns an array of Voice objects
+ """
+ if self.allVoices is None:
+ self.__fillVoices()
+ assert self.allVoices is not None and len( self.allVoices ) > 0
+ if locale is None:
+ return self.allVoices
+ else:
+ assert isinstance(locale, types.UnicodeType), "Unexpected type for locale: '%s'" % (type(locale))
+ if self.voicesByLocaleMap.has_key(locale):
+ return self.voicesByLocaleMap[locale]
+ else:
+ raise Exception("No voices for locale '%s'" % (locale))
+
+ def __fillVoices( self ):
+ self.allVoices = []
+ self.voicesByLocaleMap = {}
+ marySocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
+ marySocket.connect( ( self.host, self.port ) )
+ # Expect a variable number of lines of the kind
+ # de7 de female
+ # us2 en male
+ # dfki-stadium-emo de male limited
+ voiceStrings = self.__getServerInfo( "MARY LIST VOICES", marySocket )
+ if not voiceStrings or len(voiceStrings) == 0:
+ raise IOError( "Could not get list of voices from Mary server" )
+ marySocket.close()
+ for voiceString in voiceStrings:
+ parts = voiceString.split()
+ if len( parts ) < 3:
+ continue
+ name = parts[0]
+ locale = parts[1]
+ gender = parts[2]
+ domain = None
+ if len( parts ) > 3:
+ domain = parts[3]
+ voice = Voice( name, locale, gender, domain )
+ self.allVoices.append( voice )
+ localeVoices = None
+ if self.voicesByLocaleMap.has_key( locale ):
+ localeVoices = self.voicesByLocaleMap[locale]
+ else:
+ localeVoices = []
+ self.voicesByLocaleMap[locale] = localeVoices
+ localeVoices.append( voice )
+
+ def getGeneralDomainVoices( self, locale=None ):
+ """Obtain a list of general domain voices known to the server. If the information is not
+ yet available, the server is queried. This is optional information
+ which is not required for the normal operation of the client, but
+ may help to avoid incompatibilities.
+ Returns an array of Voice objects
+ """
+ return [v for v in self.getVoices( locale ) if not v.isLimitedDomain]
+
+ def getLimitedDomainVoices( self, locale=None ):
+ """Obtain a list of limited domain voices known to the server. If the information is not
+ yet available, the server is queried. This is optional information
+ which is not required for the normal operation of the client, but
+ may help to avoid incompatibilities.
+ Returns an array of Voice objects
+ """
+ return [v for v in self.getVoices( locale ) if v.isLimitedDomain]
+
+ def getAvailableLanguages(self):
+ """ Check available voices and return a list of tuples (abbrev, name)
+ representing the available languages -- e.g. [('en', 'English'),('de', 'German')].
+ """
+ if self.allVoices is None:
+ self.__fillVoices()
+ assert self.allVoices is not None and len( self.allVoices ) > 0
+ languages = []
+ for l in self.voicesByLocaleMap.keys():
+ if languageNames.has_key(l):
+ languages.append((l,languageNames[l]))
+ else:
+ languages.append((l, l))
+ return languages
+
+ def getServerExampleText( self, dataType ):
+ """Request an example text for a given data type from the server.
+ dataType the string representation of the data type,
+ e.g. "RAWMARYXML". This is optional information
+ which is not required for the normal operation of the client, but
+ may help to avoid incompatibilities."""
+ if not self.serverExampleTexts.has_key( dataType ):
+ exampleTexts = self.__getServerInfo( "MARY EXAMPLETEXT %s" % ( dataType ) )
+ if not exampleTexts or len(exampleTexts) == 0:
+ raise IOError( "Could not get example text for type '%s' from Mary server" % (dataType))
+ exampleText = u'\n'.join(exampleTexts)
+ self.serverExampleTexts[dataType] = exampleText
+ return self.serverExampleTexts[dataType]
+
+ def process( self, input, inputType, outputType, audioType=None, defaultVoiceName=None, output=sys.stdout ):
+ assert type( input ) in types.StringTypes
+ assert type( inputType ) in types.StringTypes
+ assert type( outputType ) in types.StringTypes
+ assert audioType is None or type( audioType ) in types.StringTypes
+ assert defaultVoiceName is None or type( defaultVoiceName ) in types.StringTypes
+ assert callable( getattr( output, 'write' ) )
+ if type( input ) != types.UnicodeType:
+ input = unicode( input, 'utf-8' )
+ maryInfoSocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
+ maryInfoSocket.connect( ( self.host, self.port ) )
+ assert type( maryInfoSocket ) is socket.SocketType
+ maryInfo = maryInfoSocket.makefile( 'rwb', 1 ) # read-write, line-buffered
+ maryInfo.write( unicode( "MARY IN=%s OUT=%s" % ( inputType, outputType ), 'utf-8' ) )
+ if audioType:
+ maryInfo.write( unicode( " AUDIO=%s" % ( audioType ), 'utf-8' ) )
+ if defaultVoiceName:
+ maryInfo.write( unicode( " VOICE=%s" % ( defaultVoiceName ), 'utf-8' ) )
+ maryInfo.write( "\r\n" )
+ # Receive a request ID:
+ id = maryInfo.readline()
+ maryDataSocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
+ maryDataSocket.connect( ( self.host, self.port ) )
+ assert type( maryDataSocket ) is socket.SocketType
+ maryDataSocket.sendall( id ) # includes newline
+ maryDataSocket.sendall( input.encode( 'utf-8' ) )
+ maryDataSocket.shutdown( 1 ) # shutdown writing
+ # Set mary info socket to non-blocking, so we only read somthing
+ # if there is something to read:
+ maryInfoSocket.setblocking( 0 )
+ while True:
+ try:
+ err = maryInfoSocket.recv( 8192 )
+ if err: sys.stderr.write( err )
+ except:
+ pass
+ got = maryDataSocket.recv( 8192 )
+ if not got: break
+ output.write( got )
+ maryInfoSocket.setblocking( 1 )
+ while True:
+ err = maryInfoSocket.recv( 8192 )
+ if not err: break
+ sys.stderr.write( err )
+
+
+
+################ data representation classes ##################
+
+class DataType:
+ def __init__( self, name, locale=None, isInputType=False, isOutputType=False ):
+ self.name = name
+ self.locale = locale
+ self.isInputType = isInputType
+ self.isOutputType = isOutputType
+
+ def isTextType( self ):
+ return self.name != "AUDIO"
+
+class Voice:
+
+ def __init__( self, name, locale, gender, domain="general" ):
+ self.name = name
+ self.locale = locale
+ self.gender = gender
+ self.domain = domain
+ if not domain or domain == "general":
+ self.isLimitedDomain = False
+ else:
+ self.isLimitedDomain = True
+
+ def __str__(self):
+ if languageNames.has_key(self.locale):
+ langName = languageNames[self.locale]
+ else:
+ langName = self.locale
+ if self.isLimitedDomain:
+ return "%s (%s, %s %s)" % (self.name, self.domain, langName, self.gender)
+ else:
+ return "%s (%s %s)" % (self.name, langName, self.gender)
+
+##################### Main #########################
+
+if __name__ == '__main__':
+
+ serverHost = "cling.dfki.uni-sb.de"
+ serverPort = 59125
+ inputType = "TEXT"
+ outputType = "AUDIO"
+ audioType = "WAVE"
+ defaultVoice = None
+ inputEncoding = 'utf-8'
+ ( options, rest ) = getopt.getopt( sys.argv[1:], '', \
+ ['server.host=', 'server.port=', 'input.type=', 'output.type=', \
+ 'audio.type=', 'voice.default=', 'input.encoding='] )
+ for ( option, value ) in options:
+ if option == '--server.host': serverHost = value
+ elif option == '--server.port': serverPort = int( value )
+ elif option == '--input.type': inputType = value
+ elif option == '--output.type': outputType = value
+ elif option == '--audio.type': audioType = value
+ elif option == '--voice.default': defaultVoice = value
+ elif option == '--input.encoding': inputEncoding = value
+ if len( rest )>0: # have input file
+ inputFile = file( rest[0] )
+ else:
+ inputFile = sys.stdin
+ input = unicode( ''.join( inputFile.readlines() ), inputEncoding )
+ if len( rest )>1: # also have output file
+ outputFile = file( rest[1] )
+ else:
+ outputFile = sys.stdout
+
+ maryClient = MaryClient( serverHost, serverPort )
+ maryClient.process( input, inputType, outputType, audioType, defaultVoice, outputFile )
diff --git a/external/marytts-5.1.2/doc/examples/client/MaryClientUser.java b/external/marytts-5.1.2/doc/examples/client/MaryClientUser.java
new file mode 100755
index 00000000..a416ab3a
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/MaryClientUser.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright 2000-2006 DFKI GmbH.
+ * All Rights Reserved. Use is subject to license terms.
+ *
+ * Permission is hereby granted, free of charge, to use and distribute
+ * this software and its documentation without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of this work, and to
+ * permit persons to whom this work is furnished to do so, subject to
+ * the following conditions:
+ *
+ * 1. The code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * 2. Any modifications must be clearly marked as such.
+ * 3. Original authors' names are not deleted.
+ * 4. The authors' names are not used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * DFKI GMBH AND THE CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DFKI GMBH NOR THE
+ * CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+import marytts.client.MaryClient;
+import marytts.util.data.audio.AudioPlayer;
+import marytts.util.http.Address;
+
+import javax.sound.sampled.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.UnknownHostException;
+
+/**
+ * A demo class illustrating how to use the MaryClient class.
+ * This will connect to a MARY server, version 4.x.
+ * It requires maryclient.jar from MARY 4.0.
+ * This works transparently with MARY servers in both http and socket server mode.
+ *
+ * Compile this as follows:
+ * javac -cp maryclient.jar MaryClientUser.java
+ *
+ * And run as:
+ * java -cp .:maryclient.jar MaryClientUser
+ *
+ * @author marc
+ *
+ */
+
+public class MaryClientUser {
+
+ public static void main(String[] args)
+ throws IOException, UnknownHostException, UnsupportedAudioFileException,
+ InterruptedException
+ {
+ String serverHost = System.getProperty("server.host", "cling.dfki.uni-sb.de");
+ int serverPort = Integer.getInteger("server.port", 59125).intValue();
+ MaryClient mary = MaryClient.getMaryClient(new Address(serverHost, serverPort));
+ String text = "Willkommen in der Welt der Sprachsynthese!";
+ // If the given locale is not supported by the server, it returns
+ // an ambigous exception: "Problem processing the data."
+ String locale = "de"; // or US English (en-US), Telugu (te), Turkish (tr), ...
+ String inputType = "TEXT";
+ String outputType = "AUDIO";
+ String audioType = "WAVE";
+ String defaultVoiceName = null;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ mary.process(text, inputType, outputType, locale, audioType, defaultVoiceName, baos);
+ // The byte array constitutes a full wave file, including the headers.
+ // And now, play the audio data:
+ AudioInputStream ais = AudioSystem.getAudioInputStream(
+ new ByteArrayInputStream(baos.toByteArray()));
+ LineListener lineListener = new LineListener() {
+ public void update(LineEvent event) {
+ if (event.getType() == LineEvent.Type.START) {
+ System.err.println("Audio started playing.");
+ } else if (event.getType() == LineEvent.Type.STOP) {
+ System.err.println("Audio stopped playing.");
+ } else if (event.getType() == LineEvent.Type.OPEN) {
+ System.err.println("Audio line opened.");
+ } else if (event.getType() == LineEvent.Type.CLOSE) {
+ System.err.println("Audio line closed.");
+ }
+ }
+ };
+
+ AudioPlayer ap = new AudioPlayer(ais, lineListener);
+ ap.start();
+ }
+}
diff --git a/external/marytts-5.1.2/doc/examples/client/c++/Makefile b/external/marytts-5.1.2/doc/examples/client/c++/Makefile
new file mode 100755
index 00000000..a609beda
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/c++/Makefile
@@ -0,0 +1,45 @@
+##########################################################################
+# Copyright (C) 2000-2006 DFKI GmbH.
+# All rights reserved. Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to use and distribute
+# this software and its documentation without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of this work, and to
+# permit persons to whom this work is furnished to do so, subject to
+# the following conditions:
+#
+# 1. The code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+# 2. Any modifications must be clearly marked as such.
+# 3. Original authors' names are not deleted.
+# 4. The authors' names are not used to endorse or promote products
+# derived from this software without specific prior written
+# permission.
+#
+# DFKI GMBH AND THE CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DFKI GMBH NOR THE
+# CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+# THIS SOFTWARE.
+##########################################################################
+
+CC=g++
+CFLAGS=-Wall -w -O3 -g
+ICUDIR=/usr/local/icu
+ICULIBS=-Wl,-R,$(ICUDIR)/lib -L$(ICUDIR)/lib -licuuc -licui18n -ldl
+
+all: MaryDemo
+
+MaryDemo: MaryClient.o MaryDemo.o
+ $(CC) $(CFLAGS) *.o -o MaryDemo $(LIBS)
+
+%.o: %.cc
+ $(CC) $(CFLAGS) $(RFLAGS) -o $@ -c $<
+
+clean:
+ rm -rf *.o ./MaryDemo
+
diff --git a/external/marytts-5.1.2/doc/examples/client/c++/MaryClient.cc b/external/marytts-5.1.2/doc/examples/client/c++/MaryClient.cc
new file mode 100755
index 00000000..7e920d95
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/c++/MaryClient.cc
@@ -0,0 +1,277 @@
+/**
+ * Copyright 2000-2006 DFKI GmbH.
+ * All Rights Reserved. Use is subject to license terms.
+ *
+ * Permission is hereby granted, free of charge, to use and distribute
+ * this software and its documentation without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of this work, and to
+ * permit persons to whom this work is furnished to do so, subject to
+ * the following conditions:
+ *
+ * 1. The code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * 2. Any modifications must be clearly marked as such.
+ * 3. Original authors' names are not deleted.
+ * 4. The authors' names are not used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * DFKI GMBH AND THE CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DFKI GMBH NOR THE
+ * CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#include
+#include
+#include
+#include
+
+#include "MaryClient.h"
+
+using namespace std;
+
+/**
+ * A C++ implementation of a simple client to the MARY TTS system.
+ * result: an empty string serving as the container for the output.
+ * It will return text or audio data; text data will be encoded as UTF-8.
+ * inputText: the UTF-8 encoded text (or XML document) to send as a request
+ * maryInFormat: the input type of the data in inputText, e.g. TEXT
+ * maryOutFormat: the output type to produce, e.g. MBROLA, AUDIO
+ * locale: the language of the input, e.g. EN-US, DE
+ * audioType: for AUDIO output, the type of audio data to produce,
+ * e.g. WAVE or MP3.
+ * voice: the voice to be used, e.g. cmu-slt-hsmm, bits3.
+ * effects: the list of effects to be generated.
+ * return value: 0 on success, negative on failure.
+ */
+int
+MaryClient::maryQuery( int server_port,
+ string server_host,
+ string& result,
+ string inputText,
+ string maryInFormat,
+ string maryOutFormat,
+ string locale,
+ string audioType,
+ string voice,
+ string effects ) {
+
+ // prepare the request
+ string query = "MARY";
+ query += " IN=" + maryInFormat;
+ query += " OUT=" + maryOutFormat;
+ query += " LOCALE=" + locale; // remove this line, if using an older version than MARY 4.0
+ query += " AUDIO=" + audioType;
+ query += " VOICE=" + voice;
+ if (effects != "") {
+ query += " EFFECTS=" + effects;
+ }
+ query += "\012\015";
+
+ //cout << "Constructed query: " << query << endl;
+
+ // declare connection stuff
+ struct sockaddr_in maryServer;
+ struct sockaddr_in maryClient;
+ struct hostent* hostInfo;
+
+ // declare variables
+ int maryInfoSocket;
+ int maryDataSocket;
+
+ // set configuration parameters
+
+ // get host information
+ hostInfo = gethostbyname (server_host.c_str());
+
+ if (hostInfo == NULL)
+ {
+ return -2;
+ }
+
+
+ // create a tcp connection to the mary server
+ maryInfoSocket = socket (AF_INET, SOCK_STREAM, 0);
+
+ // verify that the socket could be opened successfully
+ if (maryInfoSocket == -1)
+ {
+ return -2;
+ }
+ else
+ // autoflush stdout, bind and connect
+ {
+ maryClient.sin_family = AF_INET;
+ maryClient.sin_port = htons (0);
+ maryClient.sin_addr.s_addr = INADDR_ANY;
+
+ int status = bind (maryInfoSocket, (struct sockaddr*) &maryClient, sizeof (maryClient));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+
+ maryServer.sin_family = AF_INET;
+ maryServer.sin_port = htons (server_port);
+ memcpy ((char*) &maryServer.sin_addr.s_addr, hostInfo->h_addr_list [0], hostInfo->h_length);
+
+ status = connect (maryInfoSocket, (struct sockaddr*) &maryServer, sizeof (maryServer));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+ }
+
+ // send request to the Mary server
+ if (send (maryInfoSocket, query.c_str (), query.size (), 0) == -1)
+ {
+ return -2;
+ }
+
+
+ // receive the request id
+ char id [32] = "";
+
+ if (recv (maryInfoSocket, id, 32, 0) == -1)
+ {
+ return -2;
+ }
+
+ //cout << "Read id: " << id << endl;
+
+ // create a tcp connection to the mary server
+ maryDataSocket = socket (AF_INET, SOCK_STREAM, 0);
+
+ // verify that the socket could be opened successfully
+ if (maryDataSocket == -1)
+ {
+ return -2;
+ }
+ else
+ // autoflush stdout, bind and connect
+ {
+ maryClient.sin_family = AF_INET;
+ maryClient.sin_port = htons (0);
+ maryClient.sin_addr.s_addr = INADDR_ANY;
+
+ int status = bind (maryDataSocket, (struct sockaddr*) &maryClient, sizeof (maryClient));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+
+ maryServer.sin_family = AF_INET;
+ maryServer.sin_port = htons (server_port);
+ memcpy ((char*) &maryServer.sin_addr.s_addr, hostInfo->h_addr_list [0], hostInfo->h_length);
+
+ status = connect (maryDataSocket, (struct sockaddr*) &maryServer, sizeof (maryServer));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+ }
+
+
+ // send the request id to the Mary server
+ if (send (maryDataSocket, id, strlen (id), 0) == -1)
+ {
+ return -2;
+ }
+
+ //cout << "Sending request: " << inputText << endl;
+
+ // send the query to the Mary server
+ if (send (maryDataSocket, inputText.c_str (), inputText.size (), 0) == -1)
+ {
+ return -2;
+ }
+
+ if (send (maryDataSocket, "\012\015", 2, 0) == -1)
+ {
+ return -2;
+ }
+
+
+ // shutdown data socket
+ shutdown (maryDataSocket, 1);
+
+
+ //cout << "Reading result" << endl;
+
+ unsigned int total_bytes = 0;
+ int recv_bytes = 0;
+ char data [1024] = "";
+
+ result [0] = '\0';
+
+ // receive the request result
+ do
+ {
+ data [0] = '\0';
+
+ recv_bytes = recv (maryDataSocket, data, 1024, 0);
+
+ if (recv_bytes == -1)
+ {
+ return -2;
+ }
+ else if (recv_bytes > 0)
+ {
+ //cout << "("</libwsock32.a
+#include
+#else
+#include
+#endif
+
+#include
+#include
+#include
+
+#include "MaryClient.h"
+
+using namespace std;
+
+/**
+ * A C++ implementation of a simple client to the MARY TTS system.
+ * result: an empty string serving as the container for the output.
+ * It will return text or audio data; text data will be encoded as UTF-8.
+ * inputText: the UTF-8 encoded text (or XML document) to send as a request
+ * maryInFormat: the input type of the data in inputText, e.g. TEXT
+ * maryOutFormat: the output type to produce, e.g. MBROLA, AUDIO
+ * locale: the language of the input, e.g. EN-US, DE
+ * audioType: for AUDIO output, the type of audio data to produce,
+ * e.g. WAVE or MP3.
+ * voice: the voice to be used, e.g. cmu-slt-hsmm, bits3.
+ * effects: the list of effects to be generated.
+ * return value: 0 on success, negative on failure.
+ */
+int
+MaryClient::maryQuery( int server_port,
+ string server_host,
+ string& result,
+ string inputText,
+ string maryInFormat,
+ string maryOutFormat,
+ string locale,
+ string audioType,
+ string voice,
+ string effects ) {
+
+ // prepare the request
+ string query = "MARY";
+ query += " IN=" + maryInFormat;
+ query += " OUT=" + maryOutFormat;
+ query += " LOCALE=" + locale; // remove this line, if using an older version than MARY 4.0
+ query += " AUDIO=" + audioType;
+ query += " VOICE=" + voice;
+ if (effects != "") {
+ query += " EFFECTS=" + effects;
+ }
+ query += "\012\015";
+
+ //cout << "Constructed query: " << query << endl;
+
+ // declare connection stuff
+ struct sockaddr_in maryServer;
+ struct sockaddr_in maryClient;
+ struct hostent* hostInfo;
+
+ // declare variables
+ int maryInfoSocket;
+ int maryDataSocket;
+
+ // set configuration parameters
+
+ // get host information
+ hostInfo = gethostbyname (server_host.c_str());
+
+ if (hostInfo == NULL)
+ {
+ return -2;
+ }
+
+
+ // create a tcp connection to the mary server
+ maryInfoSocket = socket (AF_INET, SOCK_STREAM, 0);
+
+ // verify that the socket could be opened successfully
+ if (maryInfoSocket == -1)
+ {
+ return -2;
+ }
+ else
+ // autoflush stdout, bind and connect
+ {
+ maryClient.sin_family = AF_INET;
+ maryClient.sin_port = htons (0);
+ maryClient.sin_addr.s_addr = INADDR_ANY;
+
+ int status = bind (maryInfoSocket, (struct sockaddr*) &maryClient, sizeof (maryClient));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+
+ maryServer.sin_family = AF_INET;
+ maryServer.sin_port = htons (server_port);
+ memcpy ((char*) &maryServer.sin_addr.s_addr, hostInfo->h_addr_list [0], hostInfo->h_length);
+
+ status = connect (maryInfoSocket, (struct sockaddr*) &maryServer, sizeof (maryServer));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+ }
+
+ // send request to the Mary server
+ if (send (maryInfoSocket, query.c_str (), query.size (), 0) == -1)
+ {
+ return -2;
+ }
+
+
+ // receive the request id
+ char id [32] = "";
+
+ if (recv (maryInfoSocket, id, 32, 0) == -1)
+ {
+ return -2;
+ }
+
+ //cout << "Read id: " << id << endl;
+
+ // create a tcp connection to the mary server
+ maryDataSocket = socket (AF_INET, SOCK_STREAM, 0);
+
+ // verify that the socket could be opened successfully
+ if (maryDataSocket == -1)
+ {
+ return -2;
+ }
+ else
+ // autoflush stdout, bind and connect
+ {
+ maryClient.sin_family = AF_INET;
+ maryClient.sin_port = htons (0);
+ maryClient.sin_addr.s_addr = INADDR_ANY;
+
+ int status = bind (maryDataSocket, (struct sockaddr*) &maryClient, sizeof (maryClient));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+
+ maryServer.sin_family = AF_INET;
+ maryServer.sin_port = htons (server_port);
+ memcpy ((char*) &maryServer.sin_addr.s_addr, hostInfo->h_addr_list [0], hostInfo->h_length);
+
+ status = connect (maryDataSocket, (struct sockaddr*) &maryServer, sizeof (maryServer));
+
+ if (status != 0)
+ {
+ return -2;
+ }
+ }
+
+
+ // send the request id to the Mary server
+ if (send (maryDataSocket, id, strlen (id), 0) == -1)
+ {
+ return -2;
+ }
+
+ //cout << "Sending request: " << inputText << endl;
+
+ // send the query to the Mary server
+ if (send (maryDataSocket, inputText.c_str (), inputText.size (), 0) == -1)
+ {
+ return -2;
+ }
+
+ if (send (maryDataSocket, "\012\015", 2, 0) == -1)
+ {
+ return -2;
+ }
+
+
+ // shutdown data socket
+ shutdown (maryDataSocket, 1);
+
+
+ //cout << "Reading result" << endl;
+
+ unsigned int total_bytes = 0;
+ int recv_bytes = 0;
+ char data [1024] = "";
+
+ result [0] = '\0';
+
+ // receive the request result
+ do
+ {
+ data [0] = '\0';
+
+ recv_bytes = recv (maryDataSocket, data, 1024, 0);
+
+ if (recv_bytes == -1)
+ {
+ return -2;
+ }
+ else if (recv_bytes > 0)
+ {
+ //cout << "("<
+#include
+#include
+
+#include "MaryClient.h"
+
+using namespace std;
+
+/**
+ * Demonstration code for using the MaryClient.
+ + Call this as:
+ * ./MaryDemo
+ * or
+ * ./MaryDemo > output.wav
+ */
+int main() {
+ int server_port = 59125;
+ string server_host = "localhost";
+ string inputText = "Welcome to the world of speech synthesis!";
+ string maryInFormat = "TEXT";
+ string maryOutFormat = "AUDIO";
+ //string maryOutFormat = "REALISED_DURATIONS";
+ string locale = "en-US";
+ string audioType = "WAV_FILE";
+ string voice = "cmu-slt-hsmm";
+ string effects;
+// effects += "Volume(amount:5.0;)+";
+// effects += "TractScaler(amount:1.5;)+";
+// effects += "F0Scale(f0Scale:2.0;)+";
+// effects += "F0Add(f0Add:50.0;)+";
+// effects += "Rate(durScale:1.5;)+";
+// effects += "Robot(amount:100.0;)+";
+// effects += "Whisper(amount:100.0;)+";
+// effects += "Stadium(amount:100.0)+";
+// effects += "Chorus(delay1:466;amp1:0.54;delay2:600;amp2:-0.10;delay3:250;amp3:0.30)+";
+// effects += "FIRFilter(type:3;fc1:500.0;fc2:2000.0)+";
+// effects += "JetPilot";
+ string result;
+
+ MaryClient maryClient;
+ maryClient.maryQuery( server_port, server_host, result, inputText, maryInFormat, maryOutFormat, locale, audioType, voice, effects);
+
+ if (maryOutFormat == "AUDIO") {
+ // write result into a file
+ const char *filename = "output.wav";
+ ofstream file( filename );
+ file << result;
+
+ // play output
+ //system("play output.wav");
+ } else {
+ cout << "RESULT: " << endl << result << endl;
+ }
+
+ return 0;
+}
+
diff --git a/external/marytts-5.1.2/doc/examples/client/c++/README.txt b/external/marytts-5.1.2/doc/examples/client/c++/README.txt
new file mode 100755
index 00000000..e38af989
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/c++/README.txt
@@ -0,0 +1,4 @@
+Start MARY as a socket server:
+
+maryserver -Dserver=socket
+(or change entry 'server' in conf/marybase.config)
diff --git a/external/marytts-5.1.2/doc/examples/client/maryclient-http.py b/external/marytts-5.1.2/doc/examples/client/maryclient-http.py
new file mode 100755
index 00000000..cf9782e8
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/maryclient-http.py
@@ -0,0 +1,185 @@
+#!/usr/bin/env python
+import httplib, urllib
+
+# A basic mary client in Python,
+# kindly donated to the MARY TTS project
+# by Hugh Sasse. Thanks Hugh!
+
+# A very basic Python class for accessing
+# the MARY TTS system using the modern
+# HTTP server.
+# Warning, this is probably ghastly Python,
+# most of my time of late has been with
+# other languages, so I'm not up to date
+# with all the stylistic conventions of
+# modern Python.
+# This does seem to work OK though.
+
+class maryclient:
+ """A basic handler for MARY-TTS HTTP clients
+
+ At present, there is no checking for
+ allowed voices, locales, and so on.
+ Most of the useful parameters can be
+ accessed by get_ and set_ methods.
+ Relying on winsound, this is Windows
+ specific.
+ """
+ def __init__(self):
+ """Set up useful defaults (for
+ people in England, anyway)"""
+ self.host = "127.0.0.1"
+ self.port = 59125
+ self.input_type = "TEXT"
+ self.output_type = "AUDIO"
+ self.audio = "WAVE_FILE"
+ self.locale = "en_GB"
+ self.voice = "dfki-prudence-hsmm"
+
+ def set_host(self, a_host):
+ """Set the host for the TTS server."""
+ self.host = a_host
+
+ def get_host(self):
+ """Get the host for the TTS server."""
+ self.host
+
+ def set_port(self, a_port):
+ """Set the port for the TTS server."""
+ self.port = a_port
+
+ def get_port(self):
+ """Get the port for the TTS server."""
+ self.port
+
+ def set_input_type(self, type):
+ """Set the type of input being
+ supplied to the TTS server
+ (such as 'TEXT')."""
+ self.input_type = type
+
+ def get_input_type(self):
+ """Get the type of input being
+ supplied to the TTS server
+ (such as 'TEXT')."""
+ self.input_type
+
+ def set_output_type(self, type):
+ """Set the type of input being
+ supplied to the TTS server
+ (such as 'AUDIO')."""
+ self.output_type = type
+
+ def get_output_type(self):
+ """Get the type of input being
+ supplied to the TTS server
+ (such as "AUDIO")."""
+ self.output_type
+
+ def set_locale(self, a_locale):
+ """Set the locale
+ (such as "en_GB")."""
+ self.locale = a_locale
+
+ def get_locale(self):
+ """Get the locale
+ (such as "en_GB")."""
+ self.locale
+
+ def set_audio(self, audio_type):
+ """Set the audio type for playback
+ (such as "WAVE_FILE")."""
+ self.audio = audio_type
+
+ def get_audio(self):
+ """Get the audio type for playback
+ (such as "WAVE_FILE")."""
+ self.audio
+
+ def set_voice(self, a_voice):
+ """Set the voice to speak with
+ (such as "dfki-prudence-hsmm")."""
+ self.voice = a_voice
+
+ def get_voice(self):
+ """Get the voice to speak with
+ (such as "dfki-prudence-hsmm")."""
+ self.voice
+
+ def generate(self, message):
+ """Given a message in message,
+ return a response in the appropriate
+ format."""
+ raw_params = {"INPUT_TEXT": message,
+ "INPUT_TYPE": self.input_type,
+ "OUTPUT_TYPE": self.output_type,
+ "LOCALE": self.locale,
+ "AUDIO": self.audio,
+ "VOICE": self.voice,
+ }
+ params = urllib.urlencode(raw_params)
+ headers = {}
+
+ # Open connection to self.host, self.port.
+ conn = httplib.HTTPConnection(self.host, self.port)
+
+ # conn.set_debuglevel(5)
+
+ conn.request("POST", "/process", params, headers)
+ response = conn.getresponse()
+ if response.status != 200:
+ print response.getheaders()
+ raise RuntimeError("{0}: {1}".format(response.status,
+ response.reason))
+ return response.read()
+
+# If this is invoked as a program, just give
+# a greeting to show it is working.
+# The platform specific code is moved to this
+# part so that this file may be imported without
+# bringing platform specific code in.
+if __name__ == "__main__":
+
+ # For handling command line arguments:
+ import sys
+ import platform
+
+ # check we are on Windows:
+ system = platform.system().lower()
+ if (system == "windows"):
+
+ import winsound
+
+ class Player:
+ def __init__(self):
+ pass
+
+ def play(self, a_sound):
+ winsound.PlaySound(a_sound, winsound.SND_MEMORY)
+
+ #if ("cygwin" in system):
+ else:
+ # Not sure how to do audio on cygwin,
+ # portably for python. So have a sound
+ # player class that doesn't play sounds.
+ # A null object, if you like.
+ class Player:
+ def __init__(self):
+ pass
+
+ def play(self, a_sound):
+ print("Here I would play a sound if I knew how")
+ pass
+
+ # Probably want to parse arguments to
+ # set the voice, etc., here
+
+ client = maryclient()
+ client.set_audio("WAVE_FILE") # for example
+
+ player = Player()
+ the_sound = client.generate("hello from Mary Text to Speech, with Python.")
+ if client.output_type == "AUDIO":
+ player.play(the_sound)
+
+# vi:set sw=4 et:
diff --git a/external/marytts-5.1.2/doc/examples/client/maryclient.cgi b/external/marytts-5.1.2/doc/examples/client/maryclient.cgi
new file mode 100755
index 00000000..876a846e
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/maryclient.cgi
@@ -0,0 +1,177 @@
+#!/usr/bin/perl -T
+# -*- Mode: Perl -*-
+# MARY Text-to-Speech System
+# CGI Script implementing a simple mary client,
+# can be used for web pages.
+##########################################################################
+# Copyright (C) 2000-2006 DFKI GmbH.
+# All rights reserved. Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to use and distribute
+# this software and its documentation without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of this work, and to
+# permit persons to whom this work is furnished to do so, subject to
+# the following conditions:
+#
+# 1. The code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+# 2. Any modifications must be clearly marked as such.
+# 3. Original authors' names are not deleted.
+# 4. The authors' names are not used to endorse or promote products
+# derived from this software without specific prior written
+# permission.
+#
+# DFKI GMBH AND THE CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DFKI GMBH NOR THE
+# CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+# THIS SOFTWARE.
+##########################################################################
+# Author: Marc Schroeder
+
+use strict;
+use IO::Socket;
+use CGI;
+
+# variables getting their values from form:
+my ($inputtext, $in, $out, $audiotype, $voice);
+
+# little helpers:
+my ($var, $tmp);
+
+# contacting the mary server:
+my ($host, $port, $maryInfoSocket, $maryDataSocket, $id);
+
+# helping with audio output:
+my ($save_to_disk, $audiosubtype, $filename);
+
+
+my $cgi = new CGI;
+my @param = $cgi->param();
+$inputtext = $cgi->param('inputtext');
+$in = $cgi->param('in');
+$out = $cgi->param('out');
+$audiotype = $cgi->param('audiotype');
+$save_to_disk = $cgi->param('save_to_disk');
+$voice = $cgi->param('voice');
+
+my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
+$year += 1900;
+printf STDERR "[%04i-%02i-%02i %02i:%02i:%02i] ", $year, $mon, $mday, $hour, $min, $sec;
+print STDERR "Request from ",$cgi->remote_user(),"@",$cgi->remote_host(),": \n";
+print STDERR " in=",$in;
+print STDERR " out=",$out;
+print STDERR " audiotype=",$audiotype;
+print STDERR " voice=",$voice;
+print STDERR " save_to_disk=",$save_to_disk,"\n";
+print STDERR " inputtext: ";
+print STDERR $inputtext,"\n";
+
+
+# Limit inputtext length to 5000 bytes:
+if (length $inputtext > 5000) {
+ $inputtext = substr $inputtext, 0, 5000;
+}
+
+
+# set audio subtype
+if ($out eq "AUDIO") {
+ if ($audiotype eq "AU") {
+ $audiosubtype = "basic";
+ $filename = "mary.au";
+ } elsif ($audiotype eq "AIFF") {
+ $audiosubtype = "x-aiff";
+ $filename = "mary.aiff";
+ } elsif ($audiotype eq "WAVE") {
+ $audiosubtype = "x-wav";
+ $filename = "mary.wav";
+ } elsif ($audiotype eq "MP3") {
+ $audiosubtype = "mp3";
+ $filename = "mary.mp3";
+ } else {
+ $audiosubtype = "x-wav";
+ $filename = "mary.wav";
+ }
+}
+
+# announce data type on stdout
+if ($save_to_disk) {
+ print "Content-Type: application/octet-stream";
+} else {
+ print "Content-Type: audio/$audiosubtype";
+}
+print "\nContent-Disposition: filename=\"$filename\"\n\n";
+
+# contact mary server
+$host = "cling.dfki.uni-sb.de";
+$port = 59125;
+
+# create a tcp connection to the specified host and port
+$maryInfoSocket = IO::Socket::INET->new(Proto => "tcp",
+ PeerAddr => $host,
+ PeerPort => $port)
+ or die "can't connect to port $port on $host: $!";
+
+# avoid buffering when writing to server:
+$maryInfoSocket->autoflush(1); # so output gets there right away
+
+########## Write input to server: ##########
+# formulate the request:
+print $maryInfoSocket "MARY IN=$in OUT=$out AUDIO=$audiotype";
+if ($voice && $voice ne 'v') { print $maryInfoSocket " VOICE=$voice"; }
+print $maryInfoSocket " LOG=\"REMOTE_HOST=$ENV{'REMOTE_HOST'}",
+ ", REMOTE_ADDR=$ENV{'REMOTE_ADDR'}\"";
+print $maryInfoSocket "\015\012";
+
+# receive a request ID:
+$id = <$maryInfoSocket>;
+
+# open second socket for the data:
+$maryDataSocket = IO::Socket::INET->new(Proto => "tcp",
+ PeerAddr => $host,
+ PeerPort => $port)
+ or die "can't connect to port $port on $host: $!";
+# identify with request number:
+print $maryDataSocket $id; # $id contains a newline character
+
+# copy $inputtext to mary data socket
+print $maryDataSocket $inputtext;
+
+# mark end-of-request:
+print $maryDataSocket "\015\012"; # that is a \n, actually
+$maryDataSocket->shutdown(1); # we have stopped writing data
+
+########## Read output from server: ##########
+# copy the data socket to standard output
+if ($out ne "AUDIO") { # text output
+ my $line;
+ while (defined ($line = <$maryDataSocket>)) {
+ print STDOUT $line;
+ }
+} else { # audio data output
+ my $nr; # number of bytes read
+ my $buf; # buffer to read into
+ my $outnr; # number of bytes written
+ while($nr = read($maryDataSocket, $buf, 8192)) {
+ # (read returns no. of bytes read, 0 at eof)
+ print STDOUT $buf
+ or die "Write error on stdout";
+ } # while read something from socket
+} # audio output
+
+### Read complaints from server:
+my $line;
+while (defined ($line = <$maryInfoSocket>)) {
+ print STDERR $line;
+}
+
+
+
+
+
+
+
diff --git a/external/marytts-5.1.2/doc/examples/client/maryclient.pl b/external/marytts-5.1.2/doc/examples/client/maryclient.pl
new file mode 100755
index 00000000..8b3f5f80
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/maryclient.pl
@@ -0,0 +1,136 @@
+#!/usr/bin/env perl
+#
+# MARY Text-to-Speech System
+# Minimal Socket client (for demonstration)
+##########################################################################
+# Copyright (C) 2000-2006 DFKI GmbH.
+# All rights reserved. Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to use and distribute
+# this software and its documentation without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of this work, and to
+# permit persons to whom this work is furnished to do so, subject to
+# the following conditions:
+#
+# 1. The code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+# 2. Any modifications must be clearly marked as such.
+# 3. Original authors' names are not deleted.
+# 4. The authors' names are not used to endorse or promote products
+# derived from this software without specific prior written
+# permission.
+#
+# DFKI GMBH AND THE CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DFKI GMBH NOR THE
+# CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+# THIS SOFTWARE.
+##########################################################################
+# Author: Marc Schroeder
+# This is a minimal version of a socket client for the mary TtS system.
+# It is intended to be used as a model for writing socket clients for
+# particular applications. All input verification, command line options,
+# and other luxury have been omitted.
+#
+# Usage:
+# maryclient.pl infile.txt > outfile.wav
+#
+# Input/output formats and other options must be set in the perl code directly.
+# See also Protocol.html for a description of the Protocol.
+#
+
+use strict;
+use IO::Socket;
+
+############################
+# Package-global variables #
+############################
+# global settings:
+my $maryInfoSocket; # handle to socket server
+my $maryDataSocket; # handle to socket server
+my $host; # string containing host address
+my $port; # socket port on which we listen
+my ($in, $out, $audiotype); # requested input / output format
+my $voice; # default voice
+my $id; # request ID
+
+######################################################################
+################################ main ################################
+######################################################################
+
+STDOUT->autoflush(1);
+
+$host = "cling.dfki.uni-sb.de";
+$port = 59125;
+$in = "TEXT_DE";
+$out = "AUDIO";
+$audiotype = "MP3";
+#$audiotype = "WAVE";
+#$voice = "male";
+$voice = "de3";
+
+# create a tcp connection to the specified host and port
+$maryInfoSocket = IO::Socket::INET->new(Proto => "tcp",
+ PeerAddr => $host,
+ PeerPort => $port)
+ or die "can't connect to port $port on $host: $!";
+
+# avoid buffering when writing to server:
+$maryInfoSocket->autoflush(1); # so output gets there right away
+
+########## Write input to server: ##########
+# formulate the request:
+print $maryInfoSocket "MARY IN=$in OUT=$out AUDIO=$audiotype";
+if ($voice) { print $maryInfoSocket " VOICE=$voice"; }
+print $maryInfoSocket "\015\012";
+
+# receive a request ID:
+$id = <$maryInfoSocket>;
+chomp $id; chomp $id;
+
+# open second socket for the data:
+$maryDataSocket = IO::Socket::INET->new(Proto => "tcp",
+ PeerAddr => $host,
+ PeerPort => $port)
+ or die "can't connect to port $port on $host: $!";
+# identify with request number:
+print $maryDataSocket $id, "\015\012";
+
+# copy standard input and/or files given on the command line to the socket
+while (defined (my $line = <>)) {
+ print $maryDataSocket $line;
+}
+# mark end-of-request:
+print $maryDataSocket "\015\012"; # that is a \n, actually
+shutdown($maryDataSocket, 1); # we have stopped writing data
+
+########## Read output from server: ##########
+# copy the data socket to standard output
+if ($out ne "AUDIO") { # text output
+ my $line;
+ while (defined ($line = <$maryDataSocket>)) {
+ print STDOUT $line;
+ }
+} else { # audio data output
+ my $nr; # number of bytes read
+ my $buf; # buffer to read into
+ my $outnr; # number of bytes written
+ while($nr = read($maryDataSocket, $buf, 100000)) {
+ # (read returns no. of bytes read, 0 at eof)
+ print STDOUT $buf
+ or die "Write error on stdout";
+ } # while read something from socket
+} # audio output
+
+### Read complaints from server:
+my $line;
+while (defined ($line = <$maryInfoSocket>)) {
+ print STDERR $line;
+}
+
+
+
diff --git a/external/marytts-5.1.2/doc/examples/client/maryclient.rb b/external/marytts-5.1.2/doc/examples/client/maryclient.rb
new file mode 100755
index 00000000..c4156cbb
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/maryclient.rb
@@ -0,0 +1,261 @@
+#!/usr/bin/env ruby
+#
+# A basic mary client in Ruby,
+# kindly donated to the MARY TTS project
+# by Hugh Sasse. Thanks Hugh!
+
+
+# Ruby client for the MARY TTS HTTP server.
+# This is for Windows only, and relies on
+# the Win32-Sound gem to access the audio.
+#
+#
+
+require 'rubygems'
+require 'net/http'
+require 'uri'
+
+# A fairly minimal client class for the
+# MARY TTS system. This uses the modern
+# HTTP interface to access the server.
+# At present, this doesn't wrap the methods
+# which provide documentation or lists of
+# voices or features.
+class MaryClient
+ attr_accessor :host, :port
+ attr_accessor :input_type, :output_type
+ attr_accessor :locale, :audio, :voice
+
+ # Set up the defaults for the MARY TTS
+ # server, which is assumed to be running
+ # on the local host, with British voices
+ # installed. These may be modified with
+ # the appropriate methods.
+ # host = 127.0.0.1)
+ # port = 59125
+ # input_type = "TEXT"
+ # output_type = "AUDIO"
+ # audio = "WAVE_FILE"
+ # locale = "en_GB"
+ # voice = "dfki-prudence-hsmm"
+ def initialize
+ @host = "127.0.0.1" # The local machine
+ @port = 59125
+ @input_type = "TEXT"
+ @output_type = "AUDIO"
+ @locale = "en_GB"
+ @audio = "WAVE_FILE"
+ @voice = "dfki-prudence-hsmm"
+ end
+
+ # Process a text message, which with a
+ # new client, will return the audio.
+ # This is so that platform dependent parts
+ # are kept separate.
+ def generate(message)
+ raw_params = {"INPUT_TEXT" => message,
+ "INPUT_TYPE" => @input_type,
+ "OUTPUT_TYPE" => @output_type,
+ "LOCALE" => @locale,
+ "AUDIO" => @audio,
+ "VOICE" => @voice,
+ }
+ res = Net::HTTP.post_form(URI.parse("http://#{@host}:#{@port}/process"), raw_params)
+ res.value # Throw an exception on failure
+ #puts res.body
+ return res.body
+ end
+end
+
+
+# If this invoked as a program with no
+# argumens, just give a greeting to show
+# that it is working. If arguments are
+# supplied, process options to work out
+# what to do with the arguments.
+if __FILE__ == $0
+
+ # These files are only loaded when this is
+ # invoked as a program.
+ require 'rbconfig'
+ require 'getoptlong'
+
+ # PLATFORM SPECIFIC CODE.
+ # Needs more work [!]
+ case Config::CONFIG['host_os']
+ when /darwin/i
+ raise NotImplementedError.new("Don't know how to play audio on a Mac")
+ when /linux/i
+ raise NotImplementedError.new("Far too many ways to play audio on Linux, you'll need to choose something")
+ when /sunos|solaris/i
+ raise NotImplementedError.new("Have not played audio on Suns for too long to implement this.")
+ when /java/i
+ raise NotImplementedError.new("Don't know how to play audio from Java ")
+ when /win32|cygwin|mingw32/i
+ # The various things that can use the Win32
+ # sound gem
+ require 'win32/sound'
+ # Create a player class that will play the
+ # sound that the Mary TTS system returns
+ class Player
+
+ # Play the audio passed in.
+ # Possibly this should receive the audio
+ # type so we can check that we can play it,
+ # but at the moment that is the
+ # responsibility of the user.
+ def self.play(sound)
+ Win32::Sound.play(sound, Win32::Sound::MEMORY)
+ end
+ end
+ else
+ raise NotImplementedError.new("Haven't thought how to support this OS yet")
+ end
+
+
+ client = nil
+ split = ""
+
+ if ARGV.size.zero?
+ client = MaryClient.new()
+ sound = client.generate("Hello from Mary Text to Speech with Ruby.")
+ Player.play(sound)
+ else
+ args_mode = :words
+ stdout_mode = :absorb
+ opts = GetoptLong::new(
+ ["--audio", "-a", GetoptLong::REQUIRED_ARGUMENT],
+ ["--echo", "-e", GetoptLong::NO_ARGUMENT],
+ ["--help", "-h", GetoptLong::NO_ARGUMENT],
+ ["--host", "-H", GetoptLong::REQUIRED_ARGUMENT],
+ ["--input-type", "-i", GetoptLong::REQUIRED_ARGUMENT],
+ ["--locale", "-l", GetoptLong::REQUIRED_ARGUMENT],
+ ["--read", "-r", GetoptLong::NO_ARGUMENT],
+
+ ["--split", "-s", GetoptLong::REQUIRED_ARGUMENT],
+ ["--output-type", "-o", GetoptLong::REQUIRED_ARGUMENT],
+ ["--port", "-P", GetoptLong::REQUIRED_ARGUMENT],
+ ["--tee", "-t", GetoptLong::NO_ARGUMENT],
+ ["--voice", "-v", GetoptLong::REQUIRED_ARGUMENT]
+ )
+
+ opts.each do |opt, arg|
+ unless ["--help", "-h"].include?(opt)
+ # skip if we are only getting help
+ client ||= MaryClient.new()
+ end
+ case opt
+ when "--help", "-h"
+ puts <<-EOHELP
+Usage: #{$0} [options] [arguments]
+--audio -a
+ Audio format. Defualt: WAVE_FILE
+--echo -e
+ Act as an echo command and send output
+ arguments to the synthesizer only (not
+ to standard output.
+ Turns off --read|-r
+--help -h
+ Print this help, then exit.
+--host -H
+ The host which is the server.
+ Default: 127.0.0.1
+--input-type -i
+ The type of the input supplied to the
+ TTS system. Default: TEXT
+--locale -l
+ The locale of the input. Default: en_GB
+--output-type -o
+ The output type from the TTS system.
+ Default: AUDIO
+--port -P
+ The port for the TTS server
+ Default: 59125
+--read -r
+ Read the files passed as arguments.
+ Turns off --echo|-e
+--split -s (lines|paragraphs)
+ When reading files, split the input
+ into lines or paragraphs. Paragraphs
+ mean reading up to the next double
+ newline. Note, the argument is literally
+ "lines" or "paragraphs" (or some
+ abbreviation of those) without the
+ quotes.
+ Default is paragraphs.
+--tee -t
+ Act as tee: send the output to the TTS
+ system, and to standard output.
+--voice -v
+ The voice to use.
+ Default: dfki-prudence-hsmm
+ EOHELP
+ exit(0)
+ when "--audio", "-a"
+ client.audio = arg
+ when "--echo", "-e"
+ args_mode = :words
+ when "--host", "-H"
+ client.host = arg
+ when "--input-type", "-i"
+ client.input_type = arg
+ when "--locale", "-l"
+ client.locale = arg
+ when "--output-type", "-o"
+ client.output_type = arg
+ when "--port", "-P"
+ client.port = arg.to_i
+ when "--read", "-r"
+ args_mode = :files
+ when "--split", "-s"
+ case arg
+ when /^p/i
+ split = ""
+ when /^l/i
+ split = $/
+ end
+ when "--tee", "-t"
+ stdout_mode = :emit
+ when "--voice", "-v"
+ client.voice = arg
+ end
+ end
+
+ client ||= MaryClient.new()
+ case args_mode
+ when :words
+ input_text = ARGV.join(" ")
+ unless input_text =~ /\A\s*\Z/m
+ sound = client.generate(input_text)
+ if client.output_type == "AUDIO"
+ Player.play(sound)
+ end
+ end
+ if stdout_mode == :emit
+ puts input_text
+ end
+ when :files
+ # Slurp in paragraphs so sentences
+ # don't get broken in stupid places.
+ $/ = split # paragraph mode
+ ARGF.each do |paragraph|
+ begin
+ unless paragraph =~ /\A\s*\Z/m
+ sound = client.generate(paragraph)
+ if client.output_type == "AUDIO"
+ # and client.audio == "WAVE_FILE"
+ Player.play(sound)
+ end
+ end
+ rescue Exception => e
+ puts "got error #{e} while trying to say #{paragraph.inspect}"
+ raise
+ end
+ if stdout_mode == :emit
+ puts paragraph
+ end # end if
+ end # end ARGF.each
+ end # end case
+ end # if ARGV.size.zero?
+end
+
diff --git a/external/marytts-5.1.2/doc/examples/client/maryclient.tcl b/external/marytts-5.1.2/doc/examples/client/maryclient.tcl
new file mode 100755
index 00000000..3a358235
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/maryclient.tcl
@@ -0,0 +1,705 @@
+# Tcl/Tk MARY TTS client.
+
+# This has been tested on Windows, and because
+# of the use of sound there will be portability
+# issues. However, there should be enough here
+# for a reasonable start at a client, for any
+# platform that supports Tcl/Tk. The platform
+# specific code has, as far as possible, been
+# isolated in the part of the code that detects
+# whether this is being run as a program.
+
+# Notes:
+# More work will need to be done with this,
+# in order to make the code clean. It should
+# probably be wrapped in a package, to solve
+# any namespace issues. There are a lot of
+# global variables. It seems that some of
+# these are necessary for the menus to work.
+# Handling of temporary files could be improved.
+
+# TODO:
+# Create modifier sliders, for the effects.
+# Extend the query proc to make use of them.
+# Turn the Help menu into something more useful.
+# Debug the actions for the Edit menu.
+# Provide a means of getting example inputs
+# from the server.
+# Provide a means of re-loading all the
+# dynamically collected information when the
+# server is changed from the menu. This means
+# that we need to delete the existing menu
+# entries in order to add them correctly.
+# How do we ensure temporary files are removed
+# in the event of a problem? if {catch {}} ...?
+# Maybe leaving them around is diagnostic info?
+# Make that an option?
+# Add error handling code for network and disk
+# failures likely to beset such clients.
+# Add sensible defaults for things the user must
+# always set at startup, but these will be
+# platform spacific. Always default to Audio
+# output for example, or is it possible that
+# people have no voices installed?
+
+
+# This is a GUI, so:
+package require Tk
+
+# We are communicating with the Mary server
+# with HTTP.
+package require http
+
+# Use the local machine in preference to the
+# one in Germany.
+set mary_tts_default_host "127.0.0.1"
+set mary_tts_default_port 59125
+
+# Actual host and port, and global old
+# copies to allow revert on cancel in the
+# dialogues. Apparently upvar #0 is the
+# norm for that sort of thing [Tcl Wiki]
+set mary_tts_host $mary_tts_default_host
+set old_mary_tts_host $mary_tts_host
+set mary_tts_port $mary_tts_default_port
+set old_mary_tts_port $mary_tts_port
+
+# Informational URLs
+set informational_urls [ list \
+version datatypes voices \
+audioformats audioeffects ]
+
+#######
+
+# Obtain a static page from the server, i.e.
+# no parameters are needed to get it.
+proc get_page { relative_url } {
+ global mary_tts_host mary_tts_port
+ set url http://$mary_tts_host:$mary_tts_port/$relative_url
+ set result [::http::geturl $url]
+ return [::http::data $result]
+}
+
+proc list_of_lines {str} {
+ return [ split $str "\n" ]
+}
+
+
+# We will need to collect this information
+# when we have the server and port chosen.
+proc get_audioeffects {} {
+ return [list_of_lines [get_page audioeffects] ]
+}
+
+proc get_audioformats {} {
+ return [list_of_lines [get_page audioformats] ]
+}
+
+proc get_datatypes {} {
+ return [ list_of_lines [get_page datatypes] ]
+}
+
+
+proc get_voices {} {
+ return [list_of_lines [get_page voices] ]
+}
+
+# Handling post queries.
+
+# Submit the query to the server, using the
+# http POST method.
+proc make_query {url encoded_params} {
+ set http [::http::geturl $url -query $encoded_params]
+ set result [::http::data $http]
+ return $result
+}
+
+# Get the text from the input text area
+proc get_input_text {} {
+ return [.io.inp.input_area get 1.0 end]
+}
+
+# Get the text from the output text area
+proc get_output_text {} {
+ return [.io.out.output_area get 1.0 end]
+}
+
+# Collect the audio data from the server.
+proc collect_audio_data {text_to_process} {
+ global mary_tts_host mary_tts_port
+ global inputtype outputtype locales
+ global audioformat voice
+ set url "http://$mary_tts_host:$mary_tts_port/process"
+ # ::http::formatQuery converts a list of
+ # key value pairs into the correct format
+ # for http POST.
+ set params [::http::formatQuery INPUT_TEXT $text_to_process INPUT_TYPE $inputtype OUTPUT_TYPE $outputtype LOCALE $locales($voice) AUDIO $audioformat VOICE $voice ]
+ set result [make_query $url $params]
+ return $result
+}
+
+# Pushes the query to the server and gets
+# the results back, displaying or playing
+# them.
+proc generate_output {text_to_process} {
+ global outputtype
+ set result [collect_audio_data $text_to_process]
+ if {$outputtype eq "AUDIO"} {
+ # call the platform dependent implementation.
+ play $result
+ } else {
+ clear_output
+ add_message $result
+ }
+ # Return the result so we can save it if
+ # the user requires it.
+ return $result
+}
+
+
+# These next procs are for handling the
+# lists of data one gets back from the server
+# which possibly have several words per line,
+# separated by spaces.
+
+# If the first word of each listed line is
+# significant, extract the list of first words.
+proc collect_first_words_of_phrase_list {a_list} {
+ for {set i 0} {$i < [llength $a_list]} {incr i} {
+ set data [lindex $a_list $i ]
+ set word [ lindex [split $data " "] 0 ]
+ lappend words $word
+ }
+ return $words
+}
+
+
+# If the second word of each listed line is
+# significant, extract the list of second words.
+proc collect_second_words_of_phrase_list {a_list} {
+ for {set i 0} {$i < [llength $a_list]} {incr i} {
+ set data [lindex $a_list $i ]
+ set word [ lindex [split $data " "] 1 ]
+ lappend words $word
+ }
+ return $words
+}
+
+
+# The list of datatypes must be separated into
+# input data types and output data types so that
+# interactions with the server make sense.
+# This handles the inputs.
+proc collect_first_words_of_input_types {a_list} {
+ for {set i 0} {$i < [llength $a_list]} {incr i} {
+ set data [lindex $a_list $i ]
+ if {[ string match -nocase "*input*" $data ]} {
+ set word [ lindex [split $data " "] 0 ]
+ lappend words $word
+ }
+ }
+ return $words
+}
+
+
+# The list of datatypes must be separated into
+# input data types and output data types so that
+# interactions with the server make sense.
+# This handles the outputs.
+proc collect_first_words_of_output_types {a_list} {
+ for {set i 0} {$i < [llength $a_list]} {incr i} {
+ set data [lindex $a_list $i ]
+ if {[string match -nocase "*output*" $data]} {
+ set word [ lindex [split $data " "] 0 ]
+ lappend words $word
+ }
+ }
+ return $words
+}
+
+# setup all the variables to hold voices,
+# audio options, etc., based on what the
+# server can do.
+proc setup_globals {} {
+ global audioeffects audioformats voices
+ global inputtypes outputtypes audioformat voice
+ global inputtype outputtype locales
+
+ set audioeffects [get_audioeffects]
+ set audioformats [get_audioformats]
+ set audioformat [lindex $audioformats 0 ]
+ set datatypes_data [get_datatypes]
+ set inputtypes [collect_first_words_of_input_types $datatypes_data]
+ set inputtype [lindex $inputtypes 0]
+ set outputtypes [collect_first_words_of_output_types $datatypes_data]
+ set outputtype [lindex $outputtypes 0]
+ set voices_data [get_voices]
+ set voices [collect_first_words_of_phrase_list $voices_data]
+ set locales_list [collect_second_words_of_phrase_list $voices_data ]
+ for {set i 0} {$i < [llength $voices]} {incr i} {
+ set locales([lindex $voices $i]) [lindex $locales_list $i]
+ }
+ set voice [lindex $voices 0]
+}
+
+# A general procedure for filling in the
+# elements of a listbox from a list.
+# At present this is unused, but it could
+# be useful later. [It took a while to
+# figure out so I'm not ready to kill it
+# with YAGNI.]
+proc add_listbox_items {a_var a_widget} {
+ upvar $a_var var
+ foreach item $var {
+ $a_widget insert end $item
+ }
+}
+
+# Create the menubuttons along the top.
+# Usual File, Edit and Help menus plus
+# those to set attributes.
+proc create_menubuttons {} {
+ set buttons [ list file File edit Edit \
+ server "Server" \
+ inputtype "Input type" outputtype "Output type" \
+ voice Voice \
+ audioformat "Audio format" \
+ textstyle "Text style" help Help ]
+
+ set count 1
+ foreach { menu_tag string_tag} $buttons {
+ menubutton .menus.$menu_tag -text $string_tag \
+ -menu .menus.${menu_tag}.menu -underline 0 -font ClientFont
+ menu .menus.${menu_tag}.menu -tearoff true
+ grid .menus.$menu_tag -in .menus -row 1 -column $count -sticky w
+ incr count
+ }
+}
+
+# Get the contents of a text file for reading
+# or loading into a text widget, etc.
+proc text_file_contents {what_for} {
+ set a_file [tk_getOpenFile -title $what_for ]
+ set the_text ""
+
+ if {$a_file != ""} {
+ set a_stream [open $a_file r ]
+ set the_text [read $a_stream]
+ close $a_stream
+ }
+
+ return $the_text
+}
+
+
+# Save the_text to a text file specified
+# by the user, for the given reason (what_for).
+# At the moment there is no error handling
+# for this (disk full, write protected, etc).
+proc save_text_file {the_text what_for} {
+ set a_file [tk_getSaveFile -title $what_for -parent .]
+ if {$a_file != ""} {
+ set a_stream [open $a_file w ]
+ puts $a_stream $the_text
+ close $a_stream
+ }
+}
+
+# Save the_data to a binary file specified
+# by the user, for the given reason (what_for),
+# a text string.
+# At the moment there is no error handling
+# for this (disk full, write protected, etc).
+proc save_binary_file {the_data what_for} {
+ set a_file [tk_getSaveFile -title $what_for -parent .]
+ if {$a_file != ""} {
+ set a_stream [open $a_file w ]
+ fconfigure $a_stream -translation binary
+ puts -nonewline $a_stream $the_data
+ close $a_stream
+ }
+}
+
+# Create the menu for File operations
+proc create_menu_file {} {
+ set fmenu .menus.file.menu
+ $fmenu add command -label "New" \
+ -font ClientFont -command {
+ .io.inp.input_area delete 1.0 end
+ }
+ # Replace the contents of the input text
+ # widget by the data from the open file.
+ # YAGNI, but is there any reason
+ # to allow inserting a file, rather than
+ # replacing the text with file contents?
+ #
+ $fmenu add command -label "Open" \
+ -font ClientFont -command {
+ set the_text [text_file_contents "File to load"]
+ if {$the_text != ""} {
+ .io.inp.input_area delete 1.0 end
+ .io.inp.input_area insert end $the_text
+ }
+ }
+
+ $fmenu add command -label "Read" \
+ -font ClientFont -command {
+ generate_output [text_file_contents "File to read"]
+ }
+ # How to make these disabled for now?
+ $fmenu add command -label "Save Input" \
+ -font ClientFont -command {
+ set the_text [get_input_text]
+ save_text_file $the_text "Save Input"
+ }
+ $fmenu add command -label "Save Output" \
+ -font ClientFont -command {
+ set the_text [get_output_text]
+ save_text_file $the_text "Save Output"
+ }
+}
+
+# Create the menu for edit operations
+proc create_menu_edit {} {
+ set emenu .menus.edit.menu
+ $emenu add command -label "Select All from Input Area" \
+ -font ClientFont -command {
+ # This code says copy the selection as well.
+ # May be wrong for some platforms, but is
+ # it more useful?
+ .io.inp.input_area tag add sel 1.0 end
+ event generate .io.inp.input_area <>
+}
+ $emenu add command -label "Select All from Output Area" \
+ -font ClientFont -command {
+ # This code says copy the selection as well.
+ # May be wrong for some platforms, but is
+ # it more useful?
+ .io.out.output_area tag add sel 1.0 end
+ event generate .io.out.output_area <>
+}
+ $emenu add command -label "Copy from Input Area" \
+ -font ClientFont -command {
+ # this appears not to work. FIXME
+ event generate .io.inp.input_area <>
+ }
+ $emenu add command -label "Copy from Output Area" \
+ -font ClientFont -command {
+ # this appears not to work. FIXME
+ event generate .io.out.output_area <>
+ }
+ $emenu add command -label "Paste into Input Area" \
+ -font ClientFont -command {
+ # this appears not to work. FIXME
+ event generate .io.inp.input_area <>
+ }
+ $emenu add command \
+ -font ClientFont -label "Insert example text into Input Area"\
+ -command {
+ }
+ # Add specific editing commands here later.
+ # For example, we would like to be able to
+ # add whole tags to the XML based formats,
+ # wrap matching tags around selected text.
+ # Also we need to find out what happens with
+ # copy cut and paste, given that X Windows
+ # is different from MS Windows.
+ # Allow example text to be inserted.
+ # However, my thinking is that this should not
+ # overwrite as it is in the Java application,
+ # because this rubs out edits when switching
+ # voices, and this can be annoying when
+ # exploring the system.
+}
+
+# Set the server properties, mostly just
+# host and port. Maybe later protocol will
+# be possible for https connections?
+proc create_menu_server {} {
+ set smenu .menus.server.menu
+ $smenu add command -label "host" -font ClientFont -command {
+ create_entry_dialog "MARY TTS server name" "hostname/IP Address" mary_tts_host
+ }
+ $smenu add command -label "port" -font ClientFont -command {
+ create_entry_dialog "MARY TTS server port" "pott number" mary_tts_port
+ }
+}
+
+# setup the fonts for the various areas on the dipslay.
+proc setup_font {family size} {
+ foreach win {.io .controls .entry.dialogue } {
+ font configure ClientFont -family $family -size $size
+ }
+}
+
+# Create the menu for changing the text size.
+proc create_menu_textstyle {} {
+ set tmenu .menus.textstyle.menu
+
+ $tmenu add cascade -label "Courier" -underline 0 -menu \
+ $tmenu.courier -font ClientFont
+ $tmenu add cascade -label "Times" -underline 0 -menu \
+ $tmenu.times -font ClientFont
+ $tmenu add cascade -label "Helvetica" -underline 0 -menu \
+ $tmenu.helvetica -font ClientFont
+ foreach {name family} [list $tmenu.courier Courier \
+ $tmenu.times Times $tmenu.helvetica Helvetica ] {
+ set m1 [menu $name]
+ foreach pts {6 7 8 9 10 12 14 16 18 20 24 28 32 36} {
+ $m1 add command -label "$pts" -font ClientFont\
+ -command [list setup_font $family $pts ]
+ }
+ }
+}
+
+
+
+# Create the menu for Help
+proc create_menu_help {} {
+ # This is all pretty much "wet paint"
+ # Is there enough to merit separate menus?
+ set hmenu .menus.help.menu
+ $hmenu add command -label "Introduction" -font ClientFont\
+ -command {
+ tk_messageBox -message "This is a basic Tcl/Tk
+client for the MARY TTS system. Most of the options
+are reached through the menus on the top. Some
+facilities are presently lacking.
+
+Most of the interface should be self-explanatory.
+In the File menu, Read will read a given file aloud
+(or at least take it as input for the present
+form of processing), whereas Open will load it
+into the input area. Save input and Save output
+refer to the contents of the text windows. The
+save button next to the play button will save
+the output to a file; this is assumed to be a
+text file, unless the output is audio, in which
+case it is a binary file.
+
+The Edit menu has cut and paste facilities,
+but these don't seem to work reliably. The
+default key bindings for text areas should
+be useable.
+
+You will need to set the input and output types
+and the audio format before pressing play.
+Code does not yet exist to figure out sensible
+defaults for your platform.
+
+This does not have support for the effects, yet.
+
+Contributions from developers welcome." -type ok
+ }
+ $hmenu add command -label "About" -command {} -font ClientFont
+}
+
+# We need to create menus for the available
+# voices and audio formats, etc.
+# When we have the data for these menus from
+# the server, create them by using the global
+# lists of information.
+proc create_radio_menu_from_list {what} {
+ global $what
+ set plural "${what}s"
+ upvar 1 $plural var
+ foreach item $var {
+ .menus.${what}.menu add radiobutton -label $item -variable $what \
+ -value $item -font ClientFont
+ }
+}
+
+proc reset_entry_and_var {a_variable} {
+ upvar #0 $a_variable var
+ upvar #0 old_$a_variable old_var
+ set var $old_var
+ destroy .entry_dialogue
+}
+# Create the toplevel for choosing a host
+# or port, something taken from an entry.
+proc create_entry_dialog {a_message a_label a_variable} {
+ upvar #0 $a_variable var
+ upvar #0 old_$a_variable old_var
+ toplevel .entry_dialogue
+ label .entry_dialogue.the_message -text $a_message \
+ -font ClientFont
+ label .entry_dialogue.the_label -text $a_label -font ClientFont
+ entry .entry_dialogue.the_entry -textvariable $a_variable \
+ -font ClientFont
+ button .entry_dialogue.ok -text "OK" -font ClientFont -command {
+ destroy .entry_dialogue
+ }
+ button .entry_dialogue.cancel -text "Cancel" -font ClientFont \
+ -command "reset_entry_and_var $a_variable"
+
+ grid .entry_dialogue.the_message -row 1 -column 1
+ grid .entry_dialogue.the_label -row 2 -column 1
+ grid .entry_dialogue.the_entry -row 2 -column 2
+ grid .entry_dialogue.ok -row 3 -column 1
+ grid .entry_dialogue.cancel -row 3 -column 2
+}
+
+# Add a message to the end of the output
+# text widget.
+proc add_message {a_message} {
+ .io.out.output_area configure -state normal
+ .io.out.output_area insert end $a_message
+ .io.out.output_area configure -state disabled
+}
+
+
+# Clear the text in the output text widget.
+proc clear_output {} {
+ .io.out.output_area configure -state normal
+ .io.out.output_area delete 1.0 end
+ .io.out.output_area configure -state disabled
+}
+
+# Sound generation is platform dependent.
+# This provides an "abstract" function to
+# be overridden by the platform dependent
+# code. In this case it alerts the user
+# in the output window that nothing is going
+# to happen.
+proc play {sound} {
+ add_message \
+ "play sound not implemented on this platform apparently"
+}
+
+# Graphical stuff.
+
+# In order to be able to scale the font, define a font.
+font create ClientFont -family [font actual TkDefaultFont -family] \
+ -size [font actual TkDefaultFont -size]
+
+frame .menus
+create_menubuttons
+create_menu_file
+create_menu_edit
+create_menu_server
+create_menu_textstyle
+create_menu_help
+# Fill in the other menus at runtime.
+
+# .io communicates text with the user,
+# through an input and output window.
+frame .io
+frame .io.inp
+frame .io.out
+# .controls will hold the play button and
+# the effects controls.
+frame .controls
+
+# Draw the controls in .io
+label .io.inp.input_label -text "Input Area" -font ClientFont
+text .io.inp.input_area -height 10 -width 40 \
+-xscrollcommand ".io.inp.input_x set" \
+-yscrollcommand ".io.inp.input_y set" -font ClientFont
+scrollbar .io.inp.input_x -orient horizontal \
+-command ".io.inp.input_area xview"
+scrollbar .io.inp.input_y -orient vertical \
+-command ".io.inp.input_area yview"
+
+label .io.out.output_label -text "Output Area" -font ClientFont
+text .io.out.output_area -height 10 -width 40 -state disabled \
+-xscrollcommand ".io.out.output_x set" \
+-yscrollcommand ".io.out.output_y set" -font ClientFont
+scrollbar .io.out.output_x -orient horizontal \
+-command ".io.out.output_area xview"
+scrollbar .io.out.output_y -orient vertical \
+-command ".io.out.output_area yview"
+
+grid .io.inp -in .io -row 1 -column 1
+grid .io.out -in .io -row 1 -column 2
+grid .io.inp.input_label -in .io.inp -row 1 -column 1
+grid .io.inp.input_area -in .io.inp -row 2 -column 1
+grid .io.inp.input_y -in .io.inp -row 2 -column 2 -sticky ns
+grid .io.inp.input_x -in .io.inp -row 3 -column 1 -sticky ew
+
+grid .io.out.output_label -in .io.out -row 1 -column 1
+grid .io.out.output_area -in .io.out -row 2 -column 1
+grid .io.out.output_y -in .io.out -row 2 -column 2 -sticky ns
+grid .io.out.output_x -in .io.out -row 3 -column 1 -sticky ew
+
+button .controls.play -text "play" -font ClientFont -command {
+ generate_output [get_input_text]
+}
+grid .controls.play -in .controls -row 1 -column 1
+
+button .controls.save -text "save" -font ClientFont -command {
+ global outputtype
+ set input_text [get_input_text]
+ if { $outputtype eq "AUDIO" } {
+ save_binary_file [collect_audio_data $input_text ] "Save audio file"
+ } else {
+ save_text_file [collect_audio_data $input_text ] "Save output to file"
+ }
+}
+
+grid .controls.save -in .controls -row 1 -column 2
+
+pack .menus .io .controls -in . -side top
+
+
+
+# Detect whether this is the main program
+# This test was taken from the Tcl Wiki, and
+# seems to work OK.
+
+if {[info exists argv0] && [file tail [info script]] eq [file tail $argv0]} {
+
+ # Try to find the temporary files directory.
+ catch { set tmpdir "/tmp" }
+ catch { set tmpdir $::env(TRASH_FOLDER) }
+ catch { set tmpdir $::env(TMP) }
+ catch { set tmpdir $::env(TEMP) }
+ # This needs better handling of
+ # possible alternatives
+ # This is needed for Windows sound only.
+
+ # Do the platform dependent things.
+ if {$tcl_platform(platform) eq "windows"} {
+ package require twapi
+
+ proc play {sound} {
+ global tmpdir
+ # Write sound to a temporary file
+ set sndfile [file join $tmpdir "MARYTTS_sound.[pid].wav" ]
+ set stream [open $sndfile w]
+ # Make sure the file is binary:
+ fconfigure $stream -translation binary
+ puts -nonewline $stream $sound
+ close $stream
+ # Play the file.
+ ::twapi::play_sound $sndfile
+ # Remove the file.
+ file delete $sndfile
+ }
+ }
+ # Put other platforms here.
+
+ # Setup the globals with reference to the
+ # server, which is assumed to be working.
+ # Since we have options to alter this with
+ # menu items, there probably needs to be
+ # some way to reload all this. But we need
+ # to know how to delete the existing menu
+ # entries to do that.
+ setup_globals
+ create_radio_menu_from_list inputtype
+ create_radio_menu_from_list outputtype
+ create_radio_menu_from_list voice
+ create_radio_menu_from_list audioformat
+
+ # Note, at the moment voices holds locales,
+ # gender, and voice type
+
+ # At the moment this is just diagnostic:
+ ## add_message [ join $voices "\n" ]
+ # it tells us we have a basically working
+ # system and the list of voices has been
+ # picked up and manipulated correctly.
+ # So it is commented out now.
+}
+
+
diff --git a/external/marytts-5.1.2/doc/examples/client/texttospeechdemo.html b/external/marytts-5.1.2/doc/examples/client/texttospeechdemo.html
new file mode 100755
index 00000000..e788cf50
--- /dev/null
+++ b/external/marytts-5.1.2/doc/examples/client/texttospeechdemo.html
@@ -0,0 +1,81 @@
+
+
+
+
+
+
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hal-core/resources/web/api/openapi.json b/hal-core/resources/web/api/openapi.json
deleted file mode 100644
index a3dbf042..00000000
--- a/hal-core/resources/web/api/openapi.json
+++ /dev/null
@@ -1,313 +0,0 @@
-{
- "components": {
- "schemas": {
- "alertClass": {
- "type": "object",
- "properties": {
- "id": {"type": "integer"},
- "level": {"type": "string"},
- "ttl": {"type": "integer"},
- "title": {"type": "string"},
- "description": {"type": "string"}
- }
- },
-
- "eventClass": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "$ref": "#/components/schemas/dataClass"
- },
- "dataType": {"type": "string"},
- "name": {"type": "string"},
- "id": {"type": "integer"},
- "map": {
- "type": "object",
- "$ref": "#/components/schemas/mapClass"
- },
- "user": {"type": "string"},
- "config": {
- "type": "object",
- "$ref": "#/components/schemas/configClass"
- },
- "configType": {"type": "string"}
- }
- },
-
- "roomClass": {
- "type": "object",
- "properties": {
- "id": {"type": "integer"},
- "name": {"type": "string"},
- "map": {
- "type": "object",
- "$ref": "#/components/schemas/mapClass"
- }
- }
- },
-
- "sensorClass": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "$ref": "#/components/schemas/dataClass"
- },
- "name": {"type": "string"},
- "id": {"type": "integer"},
- "map": {
- "type": "object",
- "$ref": "#/components/schemas/mapClass"
- },
- "user": {"type": "string"},
- "config": {
- "type": "object",
- "$ref": "#/components/schemas/configClass"
- },
- "aggregate": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "number"
- }
- },
- "timestamps": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- }
- }
- },
-
- "configClass": {
- "type": "object",
- "properties": {
- }
- },
-
- "dataClass": {
- "type": "object",
- "properties": {
- "valueStr": {"type": "string"},
- "value": {"type": "number"},
- "timestamp": {"type": "integer"}
- }
- },
-
- "mapClass": {
- "type": "object",
- "properties": {
- "x": {"type": "number"},
- "y": {"type": "number"},
- "width": {"type": "number"},
- "height": {"type": "number"}
- }
- },
- }
- },
-
- "servers": [
- {
- "description": "Hal Server",
- "url": "/api"
- }
- ],
-
- "openapi": "3.0.1",
-
- "paths": {
- "/alert": {
- "get": {
- "responses": {
- "200": {
- "description": "A successful response.",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/components/schemas/alertClass"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "schema": {
- "type": "string",
- "enum": [
- "poll",
- "peek",
- "dismiss"
- ]
- },
- "in": "query",
- "name": "action",
- "required": true
- },
- {
- "schema": {
- "type": "integer"
- },
- "in": "query",
- "name": "id",
- "required": false
- }
- ]
- }
- },
-
- "/event": {
- "get": {
- "responses": {
- "200": {
- "description": "A successful response.",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/components/schemas/eventClass"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "schema": {
- "type": "integer"
- },
- "in": "query",
- "name": "id",
- "required": false
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "configType",
- "required": false
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "dataType",
- "required": false
- }
- ]
- }
- },
-
- "/room": {
- "get": {
- "responses": {
- "200": {
- "description": "A successful response.",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/components/schemas/roomClass"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "schema": {
- "type": "integer"
- },
- "in": "query",
- "name": "id",
- "required": false
- }
- ]
- }
- },
-
- "/sensor": {
- "get": {
- "responses": {
- "200": {
- "description": "A successful response.",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/components/schemas/sensorClass"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "schema": {
- "type": "integer"
- },
- "in": "query",
- "name": "id",
- "required": false
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "configType",
- "required": false
- },
- {
- "schema": {
- "type": "string"
- },
- "in": "query",
- "name": "dataType",
- "required": false
- },
- {
- "schema": {
- "type": "string",
- "enum": [
- "min",
- "hour",
- "day",
- "week"
- ]
- },
- "in": "query",
- "name": "aggregation",
- "required": false
- }
- ]
- }
- }
- },
- "info": {
- "description": "This API allows developers and external tools to interface to Hal data and trigger different actions.",
- "title": "Hal REST API",
- "version": ""
- }
-}
\ No newline at end of file
diff --git a/hal-core/resources/web/css/hal.css b/hal-core/resources/web/css/hal.css
deleted file mode 100644
index 030b1863..00000000
--- a/hal-core/resources/web/css/hal.css
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Base structure
- */
-
-/* Move down content because we have a fixed navbar that is 50px tall */
-body {
- padding-top: 50px;
-}
-
-
-/*
- * Global add-ons
- */
-
-.sub-header {
- padding-bottom: 10px;
- border-bottom: 1px solid #eee;
-}
-
-/*
- * Top navigation
- * Hide default border to remove 1px line.
- */
-.navbar-fixed-top {
- border: 0;
-}
-
-/*
- * Sidebar
- */
-
-/* Hide for mobile, show later */
-.sidebar {
- display: none;
-}
-@media (min-width: 768px) {
- .sidebar {
- position: fixed;
- top: 51px;
- bottom: 0;
- left: 0;
- z-index: 1000;
- display: block;
- padding: 20px;
- overflow-x: hidden;
- overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
- background-color: #f5f5f5;
- border-right: 1px solid #eee;
- }
-}
-
-/* Sidebar navigation */
-.nav-sidebar {
- margin-right: -21px; /* 20px padding + 1px border */
- margin-bottom: 20px;
- margin-left: -20px;
-}
-.nav-sidebar > li > a {
- padding-right: 20px;
- padding-left: 20px;
-}
-.nav-sidebar > .active > a,
-.nav-sidebar > .active > a:hover,
-.nav-sidebar > .active > a:focus {
- color: #fff;
- background-color: #428bca;
-}
-
-
-/*
- * Main content
- */
-
-.main {
- padding: 20px;
-}
-@media (min-width: 768px) {
- .main {
- padding-right: 40px;
- padding-left: 40px;
- }
-}
-.main .page-header {
- margin-top: 0;
-}
-
-.vertical-space {
- height: 70px;
-}
-.text-vert-middle {
- vertical-align: middle !important;
-}
-
-.table-borderless tbody tr td {
- border: none;
-}
-
-.drop-shadow {
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12)
-}
-
-.disabled {
- background-color: lightgray;
- opacity: .6;
-}
-
-/*
- * Placeholder dashboard ideas
- */
-
-.placeholders {
- margin-bottom: 150px;
- text-align: center;
-}
-.placeholders h4 {
- margin-bottom: 0;
-}
-.placeholder {
- margin-bottom: 20px;
-}
-.placeholder img {
- display: inline-block;
- border-radius: 50%;
-}
-
-
-/*
- * c3.js charts overrides
- */
-.c3 line, .c3 path {
- stroke: #ccc;
-}
-.c3-line {
- stroke-width: 2px;
-}
-
-
-.anim-spin {
- animation: spin 2s infinite linear;
-}
-@keyframes spin {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(359deg);
- }
-}
-
-/*
- * Animations
- */
-
-.pulse-border {
- animation: pulse 2s infinite;
-}
-
-@keyframes pulse {
- 0% {
- stroke-width: 3;
- opacity: 1;
- }
-
- 10% {
- stroke-width: 5;
- opacity: 0.2;
- }
- 15% {
- stroke-width: 5;
- opacity: 0.2;
- }
-
- 50% {
- stroke-width: 3;
- opacity: 1;
- }
-
- 100% {
- stroke-width: 3;
- opacity: 1;
- }
-}
-
-/*
- * Switch checkbox CSS, originally from:
- * https://community.tadabase.io/t/convert-checkbox-to-toggle-switch/2566
- */
-
-input[type="checkbox"].switch {
- /* Backgrpund properties */
- appearance: none;
- background-color: #e1e1e1; /* unchecked background color */
- border-radius: 72px;
- border-style: none;
- flex-shrink: 0;
- position: relative;
- cursor: pointer;
- margin: 0 !important;
- width: 40px !important;
- height: 20px !important;
- border: 1px solid #ccc;
-}
-input[type="checkbox"].switch,
-input[type="checkbox"].switch::after {
- transition: all 100ms ease-out;
-}
-input[type="checkbox"].switch::after {
- /* Ball properties */
- background-color: #fff; /* Color of ball */
- border-radius: 50%;
- content: "";
- height: 15px !important;
- width: 15px !important;
- left: 3px !important;
- top: 2px !important;
- position: absolute;
-}
-/* Properties for a checked state */
-input[type="checkbox"].switch:checked {
- background-color: #d9534f; /* Color of background */
-}
-input[type="checkbox"].switch:checked::after {
- background-color: #fff; /* Color of ball */
- left: 20px !important;
-}
-
-/*
- * Slider styling
- */
-
-input[type="range"] {
- accent-color: #d9534f;
-}
diff --git a/hal-core/resources/web/css/lib/bootstrap-switch.min.css b/hal-core/resources/web/css/lib/bootstrap-switch.min.css
deleted file mode 100644
index 77006595..00000000
--- a/hal-core/resources/web/css/lib/bootstrap-switch.min.css
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
- *
- * @version v3.3.4
- * @homepage https://bttstrp.github.io/bootstrap-switch
- * @author Mattia Larentis (http://larentis.eu)
- * @license Apache-2.0
- */
-
-.bootstrap-switch{display:inline-block;direction:ltr;cursor:pointer;border-radius:4px;border:1px solid #ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;z-index:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-webkit-transition:border-color ease-in-out .15s,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}.bootstrap-switch .bootstrap-switch-container{display:inline-block;top:0;border-radius:4px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table-cell;vertical-align:middle;padding:6px 12px;font-size:14px;line-height:20px}.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on{text-align:center;z-index:1}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary{color:#fff;background:#337ab7}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info{color:#fff;background:#5bc0de}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success{color:#fff;background:#5cb85c}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning{background:#f0ad4e;color:#fff}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger{color:#fff;background:#d9534f}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default{color:#000;background:#eee}.bootstrap-switch .bootstrap-switch-label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;color:#333;background:#fff}.bootstrap-switch span::before{content:"\200b"}.bootstrap-switch .bootstrap-switch-handle-on{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch .bootstrap-switch-handle-off{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch input[type=radio],.bootstrap-switch input[type=checkbox]{position:absolute!important;top:0;left:0;margin:0;z-index:-1;opacity:0;filter:alpha(opacity=0);visibility:hidden}.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label{padding:1px 5px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label{padding:5px 10px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label{padding:6px 16px;font-size:18px;line-height:1.3333333}.bootstrap-switch.bootstrap-switch-disabled,.bootstrap-switch.bootstrap-switch-indeterminate,.bootstrap-switch.bootstrap-switch-readonly{cursor:default!important}.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container{-webkit-transition:margin-left .5s;-o-transition:margin-left .5s;transition:margin-left .5s}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on{border-radius:0 3px 3px 0}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off{border-radius:3px 0 0 3px}.bootstrap-switch.bootstrap-switch-focused{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label{border-bottom-left-radius:3px;border-top-left-radius:3px}
\ No newline at end of file
diff --git a/hal-core/resources/web/css/lib/bootstrap.min.css b/hal-core/resources/web/css/lib/bootstrap.min.css
deleted file mode 100644
index 2b8fc88d..00000000
--- a/hal-core/resources/web/css/lib/bootstrap.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * 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;-webkit-text-size-adjust:100%;-ms-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:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}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{padding:0;border: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-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{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 td,.table-bordered th{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:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro: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}:after,:before{-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:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.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}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.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,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.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:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.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:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;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:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;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{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.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-md-1,.col-md-10,.col-md-11,.col-md-12,.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-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.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-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{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-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{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-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{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-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{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:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{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=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(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:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;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:34px}.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],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.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],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@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 .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;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:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .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-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.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}.dropdown,.dropup{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;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{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-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-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-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(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-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-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-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;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=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{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-right:0;padding-left: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:46px;padding:10px 16px;font-size:18px;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:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.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:30px;padding:5px 10px;font-size:12px;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:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn: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:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{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-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-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:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-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:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{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{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.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:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.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:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.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:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.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{margin-bottom:5px;text-align:center}.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:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.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-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{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-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{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;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{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;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;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:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@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 .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@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 .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{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;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left: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:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.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:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.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{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-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{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-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:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.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-body,.media-left,.media-right{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{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-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:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}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:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}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:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}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:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}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:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;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-left-radius:3px;border-top-right-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-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody: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:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.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 th:first-child,.panel>.table-responsive:first-child>.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 th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.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 th:last-child,.panel>.table-responsive:first-child>.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 th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.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 th:first-child,.panel>.table-responsive:last-child>.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 th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.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 th:last-child,.panel>.table-responsive:last-child>.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 th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.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 #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.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>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height: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:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.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:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.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:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.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,.5);box-shadow:0 5px 15px rgba(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:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;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:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;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{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>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.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,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;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.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%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(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-next,.carousel-control .icon-prev{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{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left: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-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-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}td.visible-xs,th.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}td.visible-sm,th.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}td.visible-md,th.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}td.visible-lg,th.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}td.visible-print,th.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}}
-/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/hal-core/resources/web/css/lib/svg.select.css b/hal-core/resources/web/css/lib/svg.select.css
deleted file mode 100644
index 18888ab3..00000000
--- a/hal-core/resources/web/css/lib/svg.select.css
+++ /dev/null
@@ -1,44 +0,0 @@
-.svg_select_points_lt{
- cursor: nw-resize;
-}
-.svg_select_points_rt{
- cursor: ne-resize;
-}
-.svg_select_points_rb{
- cursor: se-resize;
-}
-.svg_select_points_lb{
- cursor: sw-resize;
-}
-.svg_select_points_t{
- cursor: n-resize;
-}
-.svg_select_points_r{
- cursor: e-resize;
-}
-.svg_select_points_b{
- cursor: s-resize;
-}
-.svg_select_points_l{
- cursor: w-resize;
-}
-
-.svg_select_points_rot{
- stroke-width:1;
- stroke:black;
- fill: #F9FFED;
-}
-
-.svg_select_points_point{
- cursor: move;
-}
-
-.svg_select_boundingRect{
- stroke-width:1;
- fill:gray;
- stroke-dasharray:10 10;
- stroke:black;
- stroke-opacity:0.8;
- fill-opacity:0.1;
- pointer-events:none; /* This ons is needed if you want to deselect or drag the shape*/
-}
\ No newline at end of file
diff --git a/hal-core/resources/web/css/lib/svg.select.min.css b/hal-core/resources/web/css/lib/svg.select.min.css
deleted file mode 100644
index d8345130..00000000
--- a/hal-core/resources/web/css/lib/svg.select.min.css
+++ /dev/null
@@ -1 +0,0 @@
-.svg_select_points_lt{cursor:nw-resize}.svg_select_points_rt{cursor:ne-resize}.svg_select_points_rb{cursor:se-resize}.svg_select_points_lb{cursor:sw-resize}.svg_select_points_t{cursor:n-resize}.svg_select_points_r{cursor:e-resize}.svg_select_points_b{cursor:s-resize}.svg_select_points_l{cursor:w-resize}.svg_select_points_rot{stroke-width:1;stroke:#000;fill:#f9ffed}.svg_select_points_point{cursor:move}.svg_select_boundingRect{stroke-width:1;fill:gray;stroke-dasharray:10 10;stroke:#000;stroke-opacity:.8;fill-opacity:.1;pointer-events:none}
\ No newline at end of file
diff --git a/hal-core/resources/web/favicon.ico b/hal-core/resources/web/favicon.ico
deleted file mode 100644
index e9d61583..00000000
Binary files a/hal-core/resources/web/favicon.ico and /dev/null differ
diff --git a/hal-core/resources/web/img/favicon.svg b/hal-core/resources/web/img/favicon.svg
deleted file mode 100644
index bb6996a5..00000000
--- a/hal-core/resources/web/img/favicon.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/hal-core/resources/web/js/hal.js b/hal-core/resources/web/js/hal.js
deleted file mode 100644
index e731b2e7..00000000
--- a/hal-core/resources/web/js/hal.js
+++ /dev/null
@@ -1,214 +0,0 @@
-// --------------------------------------------------------
-// Autostart
-// --------------------------------------------------------
-
-"use strict";
-
-$(function(){
- $(".toggle-switch").bootstrapSwitch({inverse: true, size: "mini"});
-
- $(".timestamp").relTimestamp();
-});
-
-// --------------------------------------------------------
-// JQuery helper functions
-// --------------------------------------------------------
-
-// $.attr() # returns all attributes of an element
-(function(old) {
- $.fn.attr = function() {
- if(arguments.length === 0) {
- if(this.length === 0) {
- return null;
- }
-
- let obj = {};
- $.each(this[0].attributes, function() {
- if(this.specified) {
- obj[this.name] = this.value;
- }
- });
- return obj;
- }
-
- return old.apply(this, arguments);
- };
-})($.fn.attr);
-
-// --------------------------------------------------------
-// Timestamps
-// --------------------------------------------------------
-
-// Converts all timestamps to human readable time and date
-$.fn.relTimestamp = function() {
- return this.each(function() {
- let timestamp = parseInt($(this).text());
-
- $(this).text(getRelTimestamp(timestamp));
- return this;
- });
-};
-
-// Converts all timestamps to human readable time and date
-function getRelTimestamp(timestamp) {
- if (timestamp == null)
- return "";
-
- let timestampNow = Date.now();
- let timeDiff = timestampNow - timestamp;
-
- if(timeDiff < 10 * 60 * 1000) // less than 10 min
- return moment(timestamp).fromNow();
- else if(timeDiff < 24 * 60 * 60 * 1000) // less than 24 hours
- return moment(timestamp).fromNow() + " ("+moment(timestamp).format("HH:mm")+")";
- else
- return moment(timestamp).format("YYYY-MM-DD HH:mm");
-}
-
-// --------------------------------------------------------
-// Chart functions
-// --------------------------------------------------------
-
-function createChart(elementId, url, updateTime=-1){
- let tickConf = {count: 20};
- if (updateTime < 60*60*1000)
- tickConf['format'] = '%H:%M';
- else if (updateTime < 24*60*60*1000)
- tickConf['format'] = '%Y-%m-%d %H:%M';
- else
- tickConf['format'] = '%Y-%m-%d';
-
-
- var chart = c3.generate({
- bindto: elementId,
- data: {json: []}, // set empty data, data will be loaded later
- axis : {
- x : {
- type : 'timeseries',
- label: 'Timestamp',
- tick: tickConf,
- },
- y: {
- label: 'Power (kWh)',
- min: 0,
- },
- y2: {
- show: true,
- label: 'Temperature (C)',
- min: 0,
- }
- },
- grid: {
- y: {show: true}
- },
- point: {
- show: false
- }
- });
-
- updateChart(chart, url, updateTime);
- $(window).focus(function(e) {
- updateChart(chart, url);
- });
-}
-function updateChart(chart, url, updateTime=-1){
- console.log('Updating chart: ' + chart.element.id);
-
- $.getJSON(url, function(json) {
- chart.load(getChartData(json));
- });
-
- if (updateTime > 0) {
- setTimeout(function() {
- updateChart(chart, url, updateTime);
- }, updateTime);
- }
-}
-function getChartData(json){
- let dataXaxis = {};
- let dataYaxis = {};
- let data = [];
- let labels = [];
-
- json.forEach(function(sensor, i) {
- var index = 'data' + i;
- labels[index] = sensor.user + ': ' + sensor.name;
- dataXaxis[index] = 'data' + i + 'x';
- data.push([index + 'x'].concat(sensor.aggregate.timestamps));
- data.push([index].concat(sensor.aggregate.data));
-
- if (sensor.type == 'PowerConsumptionSensorData')
- dataYaxis[index] = 'y';
- else //if (sensor.type == "TemperatureSensorData")
- dataYaxis[index] = 'y2';
- });
-
- return {
- xs: dataXaxis,
- columns: data,
- names: labels,
- type: 'spline',
- axes: dataYaxis,
- unload: true,
- };
-}
-
-// --------------------------------------------------------
-// Dynamic forms
-// --------------------------------------------------------
-
-var dynamicConf = {};
-
-function initDynamicModalForm(modalId, formTemplateId = null, templateID = null){
- // read in all configurations into global variable (to skip naming issues)
- if (formTemplateId != null) {
- dynamicConf[formTemplateId] = [];
- $("#" + templateID + " div").each(function(){
- dynamicConf[formTemplateId][$(this).prop("id")] = $(this).html();
- });
-
- // Update dynamic inputs
- $("#" + modalId + " select[name=type]").change(function(){
- $("#" + modalId + " #" + formTemplateId).html(dynamicConf[formTemplateId][$(this).val()]);
- });
- }
-
- // click event
- $("#" + modalId).on('show.bs.modal', function (event) {
- let button = $(event.relatedTarget);
- let modal = $(this);
-
- modal.find(" input, select").val('').change(); // Reset all inputs
-
- // Set dynamic form data
- $.each(button.attr(), function(fieldName, value) {
- if(fieldName.startsWith("data-")) {
- fieldName = fieldName.substring(5); // remove prefix data-
-
- // Case-insensitive search
- var input = modal.find("input, select").filter(function() {
- if (this.name.toLowerCase() == fieldName) {
- if (this.type == "hidden" && modal.find("input[type=checkbox][name=" + fieldName + "]").length > 0)
- return false; // Workaround for the default(false) boolean input
- return true;
- }
- return false;
- });
-
- if (input.length > 0) {
- if (input.prop("type") == "checkbox") { // special handling for checkboxes
- input.prop("value", "true");
- input.prop("checked", value == "true");
-
- if (modal.find("input[type=hidden][name=" + fieldName + "]") == null) {
- // Add default false value as a unchecked checkbox is not included in the post
- input.parent().prepend("");
- }
- } else {
- input.val(value).change();
- }
- }
- }
- });
- });
-}
\ No newline at end of file
diff --git a/hal-core/resources/web/js/hal_alert.js b/hal-core/resources/web/js/hal_alert.js
deleted file mode 100644
index e2e9baa7..00000000
--- a/hal-core/resources/web/js/hal_alert.js
+++ /dev/null
@@ -1,86 +0,0 @@
-// --------------------------------------------------------
-// Autostart
-// --------------------------------------------------------
-
-"use strict";
-
-var alertDivId = "alert-container"
-var alertTemplate = {
- ERROR: `
-
-
-
-
-
-
`,
- WARNING: `
-
-
-
-
-
-
`,
- SUCCESS: `
-
-
-
-
-
-
`,
- INFO: `
-
-
-
-
-
-
`
-}
-
-$(function(){
- updateAlerts();
-
- setInterval(function() {
- updateAlerts();
- }, 3000); // 3 sec
-});
-
-function updateAlerts() {
- fetch('/api/alert?action=poll')
- .then(response => response.json())
- .then(data => {
- data.forEach(alert => {
- var alertElement = $("#alert-id-" + alert.id);
-
- if (alertElement.length <= 0) {
- alertElement = $(alertTemplate[alert.level]);
- $("#" + alertDivId).append(alertElement);
-
- alertElement.attr("id", "alert-id-" + alert.id);
- alertElement.data("alert-id", alert.id);
- alertElement.find(".close").click(dismissEvent);
- }
-
- alertElement.find(".alert-title").html(alert.title);
- alertElement.find(".alert-description").html(alert.description);
- alertElement.find(".timestamp").relTimestamp();
- });
- });
-}
-
-function dismissEvent(e) {
- dismissAlert($(e.target).parent().parent().data("alert-id"));
-}
-function dismissAlert(id) {
- fetch('/api/alert?action=dismiss&id=' + id)
- .then(response => response.json())
- .then(data => {
- });
-}
\ No newline at end of file
diff --git a/hal-core/resources/web/js/hal_map.js b/hal-core/resources/web/js/hal_map.js
deleted file mode 100644
index d05f22a4..00000000
--- a/hal-core/resources/web/js/hal_map.js
+++ /dev/null
@@ -1,306 +0,0 @@
-"use strict";
-
-var svg;
-var data = {
- rooms: [],
- sensors: [],
- events: []
-};
-var editModeEnabled = false;
-
-$(function(){
- // ------------------------------------------
- // Setup map
- // ------------------------------------------
-
- svg = SVG('map');
-
- // Initialize events
-
- $("#button-edit").click(function() {
- editMode(true);
- });
- $("#button-save").click(function() {
- saveMap();
- editMode(false);
- fetchData(drawMap);
- });
- $("#button-cancel").click(function() {
- editMode(false);
- fetchData(drawMap);
- });
-
- // Initialize background image uploader
-
- $("#button-bg-edit").click(function() {
- // Reset modal
- $('#bg-file-input').parent().show();
- if ($("#file_input").prop("jFiler") != null)
- $("#file_input").prop("jFiler").reset();
- $('#bg-file-progress').parent().hide();
- $('#bgUploadModal').modal('show');
- });
- $('#bg-file-input').filer({
- limit: 1,
- extensions: ['jpg','png','svg','gif'],
- maxSize: 3, // in MB
- uploadFile: {
- url: "",
- type: 'POST',
- enctype: 'multipart/form-data',
- beforeSend: function(){
- $('#bg-file-input').parent().hide();
- $('#bg-file-progress').parent().show();
- },
- success: function(data, el){
- $('#bgUploadModal').modal('hide');
- drawMap();
- },
- error: function(el){
- $("#bg-file-progress").addClass("progress-bar-danger");
- },
- onProgress: function(t){
- $("#bg-file-progress").css("width", t + "%");
- },
- }
- });
-
- // ------------------------------------------
- // Start draw loop
- // ------------------------------------------
-
- fetchData(drawMap);
-
- setInterval(function() {
- if (editModeEnabled == false) {
- fetchData(drawMap);
- }
- }, 3000); // 3 sec
- //}, 10000); // 10 sec
-
-});
-
-// ----------------------------------------------
-// Events
-// ----------------------------------------------
-
-function editMode(enable){
- if (editModeEnabled == enable) {
- return;
- }
-
- editModeEnabled = enable;
-
- if (editModeEnabled) {
- $('.edit-mode').show();
- $('.view-mode').hide();
- $('#map').css('border-color', '#6eb16e');
-
- svg.select('.draggable').draggable(true);
- //svg.select('.resizable').on('click', selectEvent, false);
- svg.select('.resizable').selectize({
- points: ['rt', 'lb', 'rb'], // Add selection points on the corners
- rotationPoint: false
- }).resize()
- } else {
- $('.edit-mode').hide();
- $('.view-mode').show();
- $('#map').css('border-color', '');
-
- svg.select('.draggable').draggable(false);
- svg.select('resizable').selectize(false);
- }
-}
-
-function beforeDragEvent(e) {
- if (editModeEnabled == false) {
- e.preventDefault(); // Prevent drag
- }
-}
-
-function selectEvent(e) {
- if (editModeEnabled == true) {
- e.target.selectize({
- points: ['rt', 'lb', 'rb'], // Add selection points on the corners
- rotationPoint: false
- }).resize();
- }
-}
-
-// --------------------------------------
-// Draw
-// --------------------------------------
-
-function drawMap() {
- // Reset map
- svg.clear();
-
- // Background
-
- if (svg.select(".bg-image").length() <= 0) {
- var bgImage = svg.image("?bgimage").addClass("bg-image")
- .x(0)
- .y(0)
- .width("100%")
- .height("100%");
- }
-
- // Rooms
-
- if (data.rooms != null) {
- $.each(data.rooms, function(i, room) {
- svg.select("#room-" + room.id).remove();
-
- var group = svg.group();
-
- group.text(room.name).move(5, 5).fill('#999');
- var rect = group.rect(room.map.width, room.map.height);
- setAlertStyle(rect, (room.alert == null ? null : room.alert.level));
- rect.addClass("resizable");
-
- group.addClass("room")
- .attr("id", "room-" + room.id)
- .attr("room-id", room.id)
- .x(room.map.x)
- .y(room.map.y)
- .addClass("draggable");
- });
- }
-
- // Sensors
-
- if (data.sensors != null) {
- $.each(data.sensors, function(i, sensor) {
- svg.select("#sensor-" + sensor.id).remove();
-
- var group = svg.group();
- group.element('title').words(sensor.name);
-
- group.text(sensor.data.valueStr).move(45, 15).fill('#999');
- group.image("/img/temperature.svg").size(50, 50);
-
- group.addClass("sensor")
- .attr("id", "sensor-" + sensor.id)
- .attr("sensor-id", sensor.id)
- .x(sensor.map.x)
- .y(sensor.map.y)
- .addClass("draggable");
- });
- }
-
- // Events
-
- if (data.events != null) {
- $.each(data.events, function(i, event) {
- svg.select("#event-" + event.id).remove();
-
- var group = svg.group();
- group.element('title').words(event.name);
-
- var img = "/img/lightbulb_off.svg";
- if (event.data.valueStr == "ON")
- img = "/img/lightbulb_on.svg";
- group.image(img).size(50, 50);
-
- group.addClass("event")
- .attr("id", "event-" + event.id)
- .attr("event-id", event.id)
- .x(event.map.x)
- .y(event.map.y)
- .addClass("draggable");
- });
- }
-}
-
-// ----------------------------------------------
-// Load and Store data
-// ----------------------------------------------
-
-async function fetchData(callback) {
- await fetch('/api/room')
- .then(response => response.json())
- .then(json => {
- data.rooms = json;
- })
-
- await fetch('/api/sensor')
- .then(response => response.json())
- .then(json => {
- data.sensors = json;
- })
-
- await fetch('/api/event')
- .then(response => response.json())
- .then(json => {
- data.events = json;
- })
-
- callback();
-}
-
-function saveMap(){
- svg.select(".room").each(function(){
- saveDevice(this, "room", "room-id");
- });
- svg.select(".sensor").each(function(){
- saveDevice(this, "sensor", "sensor-id");
- });
- svg.select(".event").each(function(){
- saveDevice(this, "event", "event-id");
- });
-}
-function saveDevice(element, type, id) {
- var data = {
- action: "save",
- id: element.attr(id),
- type: type,
- x: element.x(),
- y: element.y()
- };
-
- var resizable = element.select(".resizable");
- if (resizable.length() > 0) {
- data.width = resizable.get(0).width();
- data.height = resizable.get(0).height();
- }
-
- $.ajax({
- async: false,
- dataType: "json",
- url: "/api/map?",
- data: data
- });
-}
-
-// ----------------------------------------------
-// Colors
-// ----------------------------------------------
-
-function setAlertStyle(target, level=null) {
- target.addClass("pulse-border");
- target.fill('none');
-
- switch(level) {
- case "ERROR":
- target.stroke({opacity: 1, color: '#f00'});
- break;
- case "WARNING":
- target.stroke({opacity: 1, color: '#ffa500'});
- break;
- case "SUCCESS":
- target.stroke({opacity: 1, color: '#90EE90'});
- break;
- case "INFO":
- target.stroke({opacity: 1, color: '#87CEFA'});
- break;
-
- default:
- target.removeClass("pulse-border");
- target.stroke({
- color: '#000',
- opacity: 0.6,
- width: 3
- });;
- break;
- }
-}
\ No newline at end of file
diff --git a/hal-core/resources/web/js/lib/bootstrap-colorpicker.LICENSE b/hal-core/resources/web/js/lib/bootstrap-colorpicker.LICENSE
deleted file mode 100644
index bc6fc511..00000000
--- a/hal-core/resources/web/js/lib/bootstrap-colorpicker.LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Javi Aguilar
-
-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/hal-core/resources/web/js/lib/bootstrap-colorpicker.LICENSE.txt b/hal-core/resources/web/js/lib/bootstrap-colorpicker.LICENSE.txt
deleted file mode 100644
index bc6fc511..00000000
--- a/hal-core/resources/web/js/lib/bootstrap-colorpicker.LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Javi Aguilar
-
-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/hal-core/resources/web/js/lib/bootstrap-colorpicker.js b/hal-core/resources/web/js/lib/bootstrap-colorpicker.js
deleted file mode 100644
index e2fd15da..00000000
--- a/hal-core/resources/web/js/lib/bootstrap-colorpicker.js
+++ /dev/null
@@ -1,6252 +0,0 @@
-/*!
- * Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.
- * @package bootstrap-colorpicker
- * @version v3.2.0
- * @license MIT
- * @link https://itsjavi.com/bootstrap-colorpicker/
- * @link https://github.com/itsjavi/bootstrap-colorpicker.git
- */
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("jquery"));
- else if(typeof define === 'function' && define.amd)
- define("bootstrap-colorpicker", ["jquery"], factory);
- else if(typeof exports === 'object')
- exports["bootstrap-colorpicker"] = factory(require("jquery"));
- else
- root["bootstrap-colorpicker"] = factory(root["jQuery"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 7);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, exports) {
-
-module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
-
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _jquery = __webpack_require__(0);
-
-var _jquery2 = _interopRequireDefault(_jquery);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * Colorpicker extension class.
- */
-var Extension = function () {
- /**
- * @param {Colorpicker} colorpicker
- * @param {Object} options
- */
- function Extension(colorpicker) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- _classCallCheck(this, Extension);
-
- /**
- * The colorpicker instance
- * @type {Colorpicker}
- */
- this.colorpicker = colorpicker;
- /**
- * Extension options
- *
- * @type {Object}
- */
- this.options = options;
-
- if (!(this.colorpicker.element && this.colorpicker.element.length)) {
- throw new Error('Extension: this.colorpicker.element is not valid');
- }
-
- this.colorpicker.element.on('colorpickerCreate.colorpicker-ext', _jquery2.default.proxy(this.onCreate, this));
- this.colorpicker.element.on('colorpickerDestroy.colorpicker-ext', _jquery2.default.proxy(this.onDestroy, this));
- this.colorpicker.element.on('colorpickerUpdate.colorpicker-ext', _jquery2.default.proxy(this.onUpdate, this));
- this.colorpicker.element.on('colorpickerChange.colorpicker-ext', _jquery2.default.proxy(this.onChange, this));
- this.colorpicker.element.on('colorpickerInvalid.colorpicker-ext', _jquery2.default.proxy(this.onInvalid, this));
- this.colorpicker.element.on('colorpickerShow.colorpicker-ext', _jquery2.default.proxy(this.onShow, this));
- this.colorpicker.element.on('colorpickerHide.colorpicker-ext', _jquery2.default.proxy(this.onHide, this));
- this.colorpicker.element.on('colorpickerEnable.colorpicker-ext', _jquery2.default.proxy(this.onEnable, this));
- this.colorpicker.element.on('colorpickerDisable.colorpicker-ext', _jquery2.default.proxy(this.onDisable, this));
- }
-
- /**
- * Function called every time a new color needs to be created.
- * Return false to skip this resolver and continue with other extensions' ones
- * or return anything else to consider the color resolved.
- *
- * @param {ColorItem|String|*} color
- * @param {boolean} realColor if true, the color should resolve into a real (not named) color code
- * @return {ColorItem|String|*}
- */
-
-
- _createClass(Extension, [{
- key: 'resolveColor',
- value: function resolveColor(color) {
- var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
-
- return false;
- }
-
- /**
- * Method called after the colorpicker is created
- *
- * @listens Colorpicker#colorpickerCreate
- * @param {Event} event
- */
-
- }, {
- key: 'onCreate',
- value: function onCreate(event) {}
- // to be extended
-
-
- /**
- * Method called after the colorpicker is destroyed
- *
- * @listens Colorpicker#colorpickerDestroy
- * @param {Event} event
- */
-
- }, {
- key: 'onDestroy',
- value: function onDestroy(event) {
- this.colorpicker.element.off('.colorpicker-ext');
- }
-
- /**
- * Method called after the colorpicker is updated
- *
- * @listens Colorpicker#colorpickerUpdate
- * @param {Event} event
- */
-
- }, {
- key: 'onUpdate',
- value: function onUpdate(event) {}
- // to be extended
-
-
- /**
- * Method called after the colorpicker color is changed
- *
- * @listens Colorpicker#colorpickerChange
- * @param {Event} event
- */
-
- }, {
- key: 'onChange',
- value: function onChange(event) {}
- // to be extended
-
-
- /**
- * Method called when the colorpicker color is invalid
- *
- * @listens Colorpicker#colorpickerInvalid
- * @param {Event} event
- */
-
- }, {
- key: 'onInvalid',
- value: function onInvalid(event) {}
- // to be extended
-
-
- /**
- * Method called after the colorpicker is hidden
- *
- * @listens Colorpicker#colorpickerHide
- * @param {Event} event
- */
-
- }, {
- key: 'onHide',
- value: function onHide(event) {}
- // to be extended
-
-
- /**
- * Method called after the colorpicker is shown
- *
- * @listens Colorpicker#colorpickerShow
- * @param {Event} event
- */
-
- }, {
- key: 'onShow',
- value: function onShow(event) {}
- // to be extended
-
-
- /**
- * Method called after the colorpicker is disabled
- *
- * @listens Colorpicker#colorpickerDisable
- * @param {Event} event
- */
-
- }, {
- key: 'onDisable',
- value: function onDisable(event) {}
- // to be extended
-
-
- /**
- * Method called after the colorpicker is enabled
- *
- * @listens Colorpicker#colorpickerEnable
- * @param {Event} event
- */
-
- }, {
- key: 'onEnable',
- value: function onEnable(event) {
- // to be extended
- }
- }]);
-
- return Extension;
-}();
-
-exports.default = Extension;
-module.exports = exports.default;
-
-/***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.ColorItem = exports.HSVAColor = undefined;
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**
- * Color manipulation class, specific for Bootstrap Colorpicker
- */
-
-
-var _color = __webpack_require__(16);
-
-var _color2 = _interopRequireDefault(_color);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * HSVA color data class, containing the hue, saturation, value and alpha
- * information.
- */
-var HSVAColor = function () {
- /**
- * @param {number|int} h
- * @param {number|int} s
- * @param {number|int} v
- * @param {number|int} a
- */
- function HSVAColor(h, s, v, a) {
- _classCallCheck(this, HSVAColor);
-
- this.h = isNaN(h) ? 0 : h;
- this.s = isNaN(s) ? 0 : s;
- this.v = isNaN(v) ? 0 : v;
- this.a = isNaN(h) ? 1 : a;
- }
-
- _createClass(HSVAColor, [{
- key: 'toString',
- value: function toString() {
- return this.h + ', ' + this.s + '%, ' + this.v + '%, ' + this.a;
- }
- }]);
-
- return HSVAColor;
-}();
-
-/**
- * HSVA color manipulation
- */
-
-
-var ColorItem = function () {
- _createClass(ColorItem, [{
- key: 'api',
-
-
- /**
- * Applies a method of the QixColor API and returns a new Color object or
- * the return value of the method call.
- *
- * If no argument is provided, the internal QixColor object is returned.
- *
- * @param {String} fn QixColor function name
- * @param args QixColor function arguments
- * @example let darkerColor = color.api('darken', 0.25);
- * @example let luminosity = color.api('luminosity');
- * @example color = color.api('negate');
- * @example let qColor = color.api().negate();
- * @returns {ColorItem|QixColor|*}
- */
- value: function api(fn) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- if (arguments.length === 0) {
- return this._color;
- }
-
- var result = this._color[fn].apply(this._color, args);
-
- if (!(result instanceof _color2.default)) {
- // return result of the method call
- return result;
- }
-
- return new ColorItem(result, this.format);
- }
-
- /**
- * Returns the original ColorItem constructor data,
- * plus a 'valid' flag to know if it's valid or not.
- *
- * @returns {{color: *, format: String, valid: boolean}}
- */
-
- }, {
- key: 'original',
- get: function get() {
- return this._original;
- }
-
- /**
- * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data
- * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.
- */
-
- }], [{
- key: 'HSVAColor',
-
-
- /**
- * Returns the HSVAColor class
- *
- * @static
- * @example let colorData = new ColorItem.HSVAColor(360, 100, 100, 1);
- * @returns {HSVAColor}
- */
- get: function get() {
- return HSVAColor;
- }
- }]);
-
- function ColorItem() {
- var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
- var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
-
- _classCallCheck(this, ColorItem);
-
- this.replace(color, format);
- }
-
- /**
- * Replaces the internal QixColor object with a new one.
- * This also replaces the internal original color data.
- *
- * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data to be parsed (if needed)
- * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.
- * @example color.replace('rgb(255,0,0)', 'hsl');
- * @example color.replace(hsvaColorData);
- */
-
-
- _createClass(ColorItem, [{
- key: 'replace',
- value: function replace(color) {
- var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
-
- format = ColorItem.sanitizeFormat(format);
-
- /**
- * @type {{color: *, format: String}}
- * @private
- */
- this._original = {
- color: color,
- format: format,
- valid: true
- };
- /**
- * @type {QixColor}
- * @private
- */
- this._color = ColorItem.parse(color);
-
- if (this._color === null) {
- this._color = (0, _color2.default)();
- this._original.valid = false;
- return;
- }
-
- /**
- * @type {*|string}
- * @private
- */
- this._format = format ? format : ColorItem.isHex(color) ? 'hex' : this._color.model;
- }
-
- /**
- * Parses the color returning a Qix Color object or null if cannot be
- * parsed.
- *
- * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data
- * @example let qColor = ColorItem.parse('rgb(255,0,0)');
- * @static
- * @returns {QixColor|null}
- */
-
- }, {
- key: 'isValid',
-
-
- /**
- * Returns true if the color is valid, false if not.
- *
- * @returns {boolean}
- */
- value: function isValid() {
- return this._original.valid === true;
- }
-
- /**
- * Hue value from 0 to 360
- *
- * @returns {int}
- */
-
- }, {
- key: 'setHueRatio',
-
-
- /**
- * Sets the hue ratio, where 1.0 is 0, 0.5 is 180 and 0.0 is 360.
- *
- * @ignore
- * @param {number} h Ratio from 1.0 to 0.0
- */
- value: function setHueRatio(h) {
- this.hue = (1 - h) * 360;
- }
-
- /**
- * Sets the saturation value
- *
- * @param {int} value Integer from 0 to 100
- */
-
- }, {
- key: 'setSaturationRatio',
-
-
- /**
- * Sets the saturation ratio, where 1.0 is 100 and 0.0 is 0.
- *
- * @ignore
- * @param {number} s Ratio from 0.0 to 1.0
- */
- value: function setSaturationRatio(s) {
- this.saturation = s * 100;
- }
-
- /**
- * Sets the 'value' channel value
- *
- * @param {int} value Integer from 0 to 100
- */
-
- }, {
- key: 'setValueRatio',
-
-
- /**
- * Sets the value ratio, where 1.0 is 0 and 0.0 is 100.
- *
- * @ignore
- * @param {number} v Ratio from 1.0 to 0.0
- */
- value: function setValueRatio(v) {
- this.value = (1 - v) * 100;
- }
-
- /**
- * Sets the alpha value. It will be rounded to 2 decimals.
- *
- * @param {int} value Float from 0.0 to 1.0
- */
-
- }, {
- key: 'setAlphaRatio',
-
-
- /**
- * Sets the alpha ratio, where 1.0 is 0.0 and 0.0 is 1.0.
- *
- * @ignore
- * @param {number} a Ratio from 1.0 to 0.0
- */
- value: function setAlphaRatio(a) {
- this.alpha = 1 - a;
- }
-
- /**
- * Sets the default color format
- *
- * @param {String} value Supported: 'rgb', 'hsl', 'hex'
- */
-
- }, {
- key: 'isDesaturated',
-
-
- /**
- * Returns true if the saturation value is zero, false otherwise
- *
- * @returns {boolean}
- */
- value: function isDesaturated() {
- return this.saturation === 0;
- }
-
- /**
- * Returns true if the alpha value is zero, false otherwise
- *
- * @returns {boolean}
- */
-
- }, {
- key: 'isTransparent',
- value: function isTransparent() {
- return this.alpha === 0;
- }
-
- /**
- * Returns true if the alpha value is numeric and less than 1, false otherwise
- *
- * @returns {boolean}
- */
-
- }, {
- key: 'hasTransparency',
- value: function hasTransparency() {
- return this.hasAlpha() && this.alpha < 1;
- }
-
- /**
- * Returns true if the alpha value is numeric, false otherwise
- *
- * @returns {boolean}
- */
-
- }, {
- key: 'hasAlpha',
- value: function hasAlpha() {
- return !isNaN(this.alpha);
- }
-
- /**
- * Returns a new HSVAColor object, based on the current color
- *
- * @returns {HSVAColor}
- */
-
- }, {
- key: 'toObject',
- value: function toObject() {
- return new HSVAColor(this.hue, this.saturation, this.value, this.alpha);
- }
-
- /**
- * Alias of toObject()
- *
- * @returns {HSVAColor}
- */
-
- }, {
- key: 'toHsva',
- value: function toHsva() {
- return this.toObject();
- }
-
- /**
- * Returns a new HSVAColor object with the ratio values (from 0.0 to 1.0),
- * based on the current color.
- *
- * @ignore
- * @returns {HSVAColor}
- */
-
- }, {
- key: 'toHsvaRatio',
- value: function toHsvaRatio() {
- return new HSVAColor(this.hue / 360, this.saturation / 100, this.value / 100, this.alpha);
- }
-
- /**
- * Converts the current color to its string representation,
- * using the internal format of this instance.
- *
- * @returns {String}
- */
-
- }, {
- key: 'toString',
- value: function toString() {
- return this.string();
- }
-
- /**
- * Converts the current color to its string representation,
- * using the given format.
- *
- * @param {String|null} format Format to convert to. If empty or null, the internal format will be used.
- * @returns {String}
- */
-
- }, {
- key: 'string',
- value: function string() {
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
-
- format = ColorItem.sanitizeFormat(format ? format : this.format);
-
- if (!format) {
- return this._color.round().string();
- }
-
- if (this._color[format] === undefined) {
- throw new Error('Unsupported color format: \'' + format + '\'');
- }
-
- var str = this._color[format]();
-
- return str.round ? str.round().string() : str;
- }
-
- /**
- * Returns true if the given color values equals this one, false otherwise.
- * The format is not compared.
- * If any of the colors is invalid, the result will be false.
- *
- * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data
- *
- * @returns {boolean}
- */
-
- }, {
- key: 'equals',
- value: function equals(color) {
- color = color instanceof ColorItem ? color : new ColorItem(color);
-
- if (!color.isValid() || !this.isValid()) {
- return false;
- }
-
- return this.hue === color.hue && this.saturation === color.saturation && this.value === color.value && this.alpha === color.alpha;
- }
-
- /**
- * Creates a copy of this instance
- *
- * @returns {ColorItem}
- */
-
- }, {
- key: 'getClone',
- value: function getClone() {
- return new ColorItem(this._color, this.format);
- }
-
- /**
- * Creates a copy of this instance, only copying the hue value,
- * and setting the others to its max value.
- *
- * @returns {ColorItem}
- */
-
- }, {
- key: 'getCloneHueOnly',
- value: function getCloneHueOnly() {
- return new ColorItem([this.hue, 100, 100, 1], this.format);
- }
-
- /**
- * Creates a copy of this instance setting the alpha to the max.
- *
- * @returns {ColorItem}
- */
-
- }, {
- key: 'getCloneOpaque',
- value: function getCloneOpaque() {
- return new ColorItem(this._color.alpha(1), this.format);
- }
-
- /**
- * Converts the color to a RGB string
- *
- * @returns {String}
- */
-
- }, {
- key: 'toRgbString',
- value: function toRgbString() {
- return this.string('rgb');
- }
-
- /**
- * Converts the color to a Hexadecimal string
- *
- * @returns {String}
- */
-
- }, {
- key: 'toHexString',
- value: function toHexString() {
- return this.string('hex');
- }
-
- /**
- * Converts the color to a HSL string
- *
- * @returns {String}
- */
-
- }, {
- key: 'toHslString',
- value: function toHslString() {
- return this.string('hsl');
- }
-
- /**
- * Returns true if the color is dark, false otherwhise.
- * This is useful to decide a text color.
- *
- * @returns {boolean}
- */
-
- }, {
- key: 'isDark',
- value: function isDark() {
- return this._color.isDark();
- }
-
- /**
- * Returns true if the color is light, false otherwhise.
- * This is useful to decide a text color.
- *
- * @returns {boolean}
- */
-
- }, {
- key: 'isLight',
- value: function isLight() {
- return this._color.isLight();
- }
-
- /**
- * Generates a list of colors using the given hue-based formula or the given array of hue values.
- * Hue formulas can be extended using ColorItem.colorFormulas static property.
- *
- * @param {String|Number[]} formula Examples: 'complementary', 'triad', 'tetrad', 'splitcomplement', [180, 270]
- * @example let colors = color.generate('triad');
- * @example let colors = color.generate([45, 80, 112, 200]);
- * @returns {ColorItem[]}
- */
-
- }, {
- key: 'generate',
- value: function generate(formula) {
- var hues = [];
-
- if (Array.isArray(formula)) {
- hues = formula;
- } else if (!ColorItem.colorFormulas.hasOwnProperty(formula)) {
- throw new Error('No color formula found with the name \'' + formula + '\'.');
- } else {
- hues = ColorItem.colorFormulas[formula];
- }
-
- var colors = [],
- mainColor = this._color,
- format = this.format;
-
- hues.forEach(function (hue) {
- var levels = [hue ? (mainColor.hue() + hue) % 360 : mainColor.hue(), mainColor.saturationv(), mainColor.value(), mainColor.alpha()];
-
- colors.push(new ColorItem(levels, format));
- });
-
- return colors;
- }
- }, {
- key: 'hue',
- get: function get() {
- return this._color.hue();
- }
-
- /**
- * Saturation value from 0 to 100
- *
- * @returns {int}
- */
- ,
-
-
- /**
- * Sets the hue value
- *
- * @param {int} value Integer from 0 to 360
- */
- set: function set(value) {
- this._color = this._color.hue(value);
- }
- }, {
- key: 'saturation',
- get: function get() {
- return this._color.saturationv();
- }
-
- /**
- * Value channel value from 0 to 100
- *
- * @returns {int}
- */
- ,
- set: function set(value) {
- this._color = this._color.saturationv(value);
- }
- }, {
- key: 'value',
- get: function get() {
- return this._color.value();
- }
-
- /**
- * Alpha value from 0.0 to 1.0
- *
- * @returns {number}
- */
- ,
- set: function set(value) {
- this._color = this._color.value(value);
- }
- }, {
- key: 'alpha',
- get: function get() {
- var a = this._color.alpha();
-
- return isNaN(a) ? 1 : a;
- }
-
- /**
- * Default color format to convert to when calling toString() or string()
- *
- * @returns {String} 'rgb', 'hsl', 'hex' or ''
- */
- ,
- set: function set(value) {
- // 2 decimals max
- this._color = this._color.alpha(Math.round(value * 100) / 100);
- }
- }, {
- key: 'format',
- get: function get() {
- return this._format ? this._format : this._color.model;
- },
- set: function set(value) {
- this._format = ColorItem.sanitizeFormat(value);
- }
- }], [{
- key: 'parse',
- value: function parse(color) {
- if (color instanceof _color2.default) {
- return color;
- }
-
- if (color instanceof ColorItem) {
- return color._color;
- }
-
- var format = null;
-
- if (color instanceof HSVAColor) {
- color = [color.h, color.s, color.v, isNaN(color.a) ? 1 : color.a];
- } else {
- color = ColorItem.sanitizeString(color);
- }
-
- if (color === null) {
- return null;
- }
-
- if (Array.isArray(color)) {
- format = 'hsv';
- }
-
- try {
- return (0, _color2.default)(color, format);
- } catch (e) {
- return null;
- }
- }
-
- /**
- * Sanitizes a color string, adding missing hash to hexadecimal colors
- * and converting 'transparent' to a color code.
- *
- * @param {String|*} str Color string
- * @example let colorStr = ColorItem.sanitizeString('ffaa00');
- * @static
- * @returns {String|*}
- */
-
- }, {
- key: 'sanitizeString',
- value: function sanitizeString(str) {
- if (!(typeof str === 'string' || str instanceof String)) {
- return str;
- }
-
- if (str.match(/^[0-9a-f]{2,}$/i)) {
- return '#' + str;
- }
-
- if (str.toLowerCase() === 'transparent') {
- return '#FFFFFF00';
- }
-
- return str;
- }
-
- /**
- * Detects if a value is a string and a color in hexadecimal format (in any variant).
- *
- * @param {String} str
- * @example ColorItem.isHex('rgba(0,0,0)'); // false
- * @example ColorItem.isHex('ffaa00'); // true
- * @example ColorItem.isHex('#ffaa00'); // true
- * @static
- * @returns {boolean}
- */
-
- }, {
- key: 'isHex',
- value: function isHex(str) {
- if (!(typeof str === 'string' || str instanceof String)) {
- return false;
- }
-
- return !!str.match(/^#?[0-9a-f]{2,}$/i);
- }
-
- /**
- * Sanitizes a color format to one supported by web browsers.
- * Returns an empty string of the format can't be recognised.
- *
- * @param {String|*} format
- * @example ColorItem.sanitizeFormat('rgba'); // 'rgb'
- * @example ColorItem.isHex('hex8'); // 'hex'
- * @example ColorItem.isHex('invalid'); // ''
- * @static
- * @returns {String} 'rgb', 'hsl', 'hex' or ''.
- */
-
- }, {
- key: 'sanitizeFormat',
- value: function sanitizeFormat(format) {
- switch (format) {
- case 'hex':
- case 'hex3':
- case 'hex4':
- case 'hex6':
- case 'hex8':
- return 'hex';
- case 'rgb':
- case 'rgba':
- case 'keyword':
- case 'name':
- return 'rgb';
- case 'hsl':
- case 'hsla':
- case 'hsv':
- case 'hsva':
- case 'hwb': // HWB this is supported by Qix Color, but not by browsers
- case 'hwba':
- return 'hsl';
- default:
- return '';
- }
- }
- }]);
-
- return ColorItem;
-}();
-
-/**
- * List of hue-based color formulas used by ColorItem.prototype.generate()
- *
- * @static
- * @type {{complementary: number[], triad: number[], tetrad: number[], splitcomplement: number[]}}
- */
-
-
-ColorItem.colorFormulas = {
- complementary: [180],
- triad: [0, 120, 240],
- tetrad: [0, 90, 180, 270],
- splitcomplement: [0, 72, 216]
-};
-
-exports.default = ColorItem;
-exports.HSVAColor = HSVAColor;
-exports.ColorItem = ColorItem;
-
-/***/ }),
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/**
- * @module
- */
-
-// adjust these values accordingly to the sass vars
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-var sassVars = {
- 'bar_size_short': 16,
- 'base_margin': 6,
- 'columns': 6
-};
-
-var sliderSize = sassVars.bar_size_short * sassVars.columns + sassVars.base_margin * (sassVars.columns - 1);
-
-/**
- * Colorpicker default options
- */
-exports.default = {
- /**
- * Custom class to be added to the `.colorpicker-element` element
- *
- * @type {String|null}
- * @default null
- */
- customClass: null,
- /**
- * Sets a initial color, ignoring the one from the element/input value or the data-color attribute.
- *
- * @type {(String|ColorItem|boolean)}
- * @default false
- */
- color: false,
- /**
- * Fallback color to use when the given color is invalid.
- * If false, the latest valid color will be used as a fallback.
- *
- * @type {String|ColorItem|boolean}
- * @default false
- */
- fallbackColor: false,
- /**
- * Forces an specific color format. If 'auto', it will be automatically detected the first time only,
- * but if null it will be always recalculated.
- *
- * Note that the ending 'a' of the format meaning "alpha" has currently no effect, meaning that rgb is the same as
- * rgba excepting if the alpha channel is disabled (see useAlpha).
- *
- * @type {('rgb'|'hex'|'hsl'|'auto'|null)}
- * @default 'auto'
- */
- format: 'auto',
- /**
- * Horizontal mode layout.
- *
- * If true, the hue and alpha channel bars will be rendered horizontally, above the saturation selector.
- *
- * @type {boolean}
- * @default false
- */
- horizontal: false,
- /**
- * Forces to show the colorpicker as an inline element.
- *
- * Note that if there is no container specified, the inline element
- * will be added to the body, so you may want to set the container option.
- *
- * @type {boolean}
- * @default false
- */
- inline: false,
- /**
- * Container where the colorpicker is appended to in the DOM.
- *
- * If is a string (CSS selector), the colorpicker will be placed inside this container.
- * If true, the `.colorpicker-element` element itself will be used as the container.
- * If false, the document body is used as the container, unless it is a popover (in this case it is appended to the
- * popover body instead).
- *
- * @type {String|boolean}
- * @default false
- */
- container: false,
- /**
- * Bootstrap Popover options.
- * The trigger, content and html options are always ignored.
- *
- * @type {boolean}
- * @default Object
- */
- popover: {
- animation: true,
- placement: 'bottom',
- fallbackPlacement: 'flip'
- },
- /**
- * If true, loads the 'debugger' extension automatically, which logs the events in the console
- * @type {boolean}
- * @default false
- */
- debug: false,
- /**
- * Child CSS selector for the colorpicker input.
- *
- * @type {String}
- * @default 'input'
- */
- input: 'input',
- /**
- * Child CSS selector for the colorpicker addon.
- * If it exists, the child element background will be changed on color change.
- *
- * @type {String}
- * @default '.colorpicker-trigger, .colorpicker-input-addon'
- */
- addon: '.colorpicker-input-addon',
- /**
- * If true, the input content will be replaced always with a valid color,
- * if false, the invalid color will be left in the input,
- * while the internal color object will still resolve into a valid one.
- *
- * @type {boolean}
- * @default true
- */
- autoInputFallback: true,
- /**
- * If true a hash will be prepended to hexadecimal colors.
- * If false, the hash will be removed.
- * This only affects the input values in hexadecimal format.
- *
- * @type {boolean}
- * @default true
- */
- useHashPrefix: true,
- /**
- * If true, the alpha channel bar will be displayed no matter what.
- *
- * If false, it will be always hidden and alpha channel will be disabled also programmatically, meaning that
- * the selected or typed color will be always opaque.
- *
- * If null, the alpha channel will be automatically disabled/enabled depending if the initial color format supports
- * alpha or not.
- *
- * @type {boolean}
- * @default true
- */
- useAlpha: true,
- /**
- * Colorpicker widget template
- * @type {String}
- * @example
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
- template: '
\n
\n
\n
\n \n \n
\n
',
- /**
- *
- * Associative object with the extension class name and its config.
- * Colorpicker comes with many bundled extensions: debugger, palette, preview and swatches (a superset of palette).
- *
- * @type {Object[]}
- * @example
- * extensions: [
- * {
- * name: 'swatches'
- * options: {
- * colors: {
- * 'primary': '#337ab7',
- * 'success': '#5cb85c',
- * 'info': '#5bc0de',
- * 'warning': '#f0ad4e',
- * 'danger': '#d9534f'
- * },
- * namesAsValues: true
- * }
- * }
- * ]
- */
- extensions: [{
- name: 'preview',
- options: {
- showText: true
- }
- }],
- /**
- * Vertical sliders configuration
- * @type {Object}
- */
- sliders: {
- saturation: {
- selector: '.colorpicker-saturation',
- maxLeft: sliderSize,
- maxTop: sliderSize,
- callLeft: 'setSaturationRatio',
- callTop: 'setValueRatio'
- },
- hue: {
- selector: '.colorpicker-hue',
- maxLeft: 0,
- maxTop: sliderSize,
- callLeft: false,
- callTop: 'setHueRatio'
- },
- alpha: {
- selector: '.colorpicker-alpha',
- childSelector: '.colorpicker-alpha-color',
- maxLeft: 0,
- maxTop: sliderSize,
- callLeft: false,
- callTop: 'setAlphaRatio'
- }
- },
- /**
- * Horizontal sliders configuration
- * @type {Object}
- */
- slidersHorz: {
- saturation: {
- selector: '.colorpicker-saturation',
- maxLeft: sliderSize,
- maxTop: sliderSize,
- callLeft: 'setSaturationRatio',
- callTop: 'setValueRatio'
- },
- hue: {
- selector: '.colorpicker-hue',
- maxLeft: sliderSize,
- maxTop: 0,
- callLeft: 'setHueRatio',
- callTop: false
- },
- alpha: {
- selector: '.colorpicker-alpha',
- childSelector: '.colorpicker-alpha-color',
- maxLeft: sliderSize,
- maxTop: 0,
- callLeft: 'setAlphaRatio',
- callTop: false
- }
- }
-};
-module.exports = exports.default;
-
-/***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _Extension2 = __webpack_require__(1);
-
-var _Extension3 = _interopRequireDefault(_Extension2);
-
-var _jquery = __webpack_require__(0);
-
-var _jquery2 = _interopRequireDefault(_jquery);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-var defaults = {
- /**
- * Key-value pairs defining a color alias and its CSS color representation.
- *
- * They can also be just an array of values. In that case, no special names are used, only the real colors.
- *
- * @type {Object|Array}
- * @default null
- * @example
- * {
- * 'black': '#000000',
- * 'white': '#ffffff',
- * 'red': '#FF0000',
- * 'default': '#777777',
- * 'primary': '#337ab7',
- * 'success': '#5cb85c',
- * 'info': '#5bc0de',
- * 'warning': '#f0ad4e',
- * 'danger': '#d9534f'
- * }
- *
- * @example ['#f0ad4e', '#337ab7', '#5cb85c']
- */
- colors: null,
- /**
- * If true, when a color swatch is selected the name (alias) will be used as input value,
- * otherwise the swatch real color value will be used.
- *
- * @type {boolean}
- * @default true
- */
- namesAsValues: true
-};
-
-/**
- * Palette extension
- * @ignore
- */
-
-var Palette = function (_Extension) {
- _inherits(Palette, _Extension);
-
- _createClass(Palette, [{
- key: 'colors',
-
-
- /**
- * @returns {Object|Array}
- */
- get: function get() {
- return this.options.colors;
- }
- }]);
-
- function Palette(colorpicker) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- _classCallCheck(this, Palette);
-
- var _this = _possibleConstructorReturn(this, (Palette.__proto__ || Object.getPrototypeOf(Palette)).call(this, colorpicker, _jquery2.default.extend(true, {}, defaults, options)));
-
- if (!Array.isArray(_this.options.colors) && _typeof(_this.options.colors) !== 'object') {
- _this.options.colors = null;
- }
- return _this;
- }
-
- /**
- * @returns {int}
- */
-
-
- _createClass(Palette, [{
- key: 'getLength',
- value: function getLength() {
- if (!this.options.colors) {
- return 0;
- }
-
- if (Array.isArray(this.options.colors)) {
- return this.options.colors.length;
- }
-
- if (_typeof(this.options.colors) === 'object') {
- return Object.keys(this.options.colors).length;
- }
-
- return 0;
- }
- }, {
- key: 'resolveColor',
- value: function resolveColor(color) {
- var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
-
- if (this.getLength() <= 0) {
- return false;
- }
-
- // Array of colors
- if (Array.isArray(this.options.colors)) {
- if (this.options.colors.indexOf(color) >= 0) {
- return color;
- }
- if (this.options.colors.indexOf(color.toUpperCase()) >= 0) {
- return color.toUpperCase();
- }
- if (this.options.colors.indexOf(color.toLowerCase()) >= 0) {
- return color.toLowerCase();
- }
- return false;
- }
-
- if (_typeof(this.options.colors) !== 'object') {
- return false;
- }
-
- // Map of objects
- if (!this.options.namesAsValues || realColor) {
- return this.getValue(color, false);
- }
- return this.getName(color, this.getName('#' + color));
- }
-
- /**
- * Given a color value, returns the corresponding color name or defaultValue.
- *
- * @param {String} value
- * @param {*} defaultValue
- * @returns {*}
- */
-
- }, {
- key: 'getName',
- value: function getName(value) {
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- if (!(typeof value === 'string') || !this.options.colors) {
- return defaultValue;
- }
- for (var name in this.options.colors) {
- if (!this.options.colors.hasOwnProperty(name)) {
- continue;
- }
- if (this.options.colors[name].toLowerCase() === value.toLowerCase()) {
- return name;
- }
- }
- return defaultValue;
- }
-
- /**
- * Given a color name, returns the corresponding color value or defaultValue.
- *
- * @param {String} name
- * @param {*} defaultValue
- * @returns {*}
- */
-
- }, {
- key: 'getValue',
- value: function getValue(name) {
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- if (!(typeof name === 'string') || !this.options.colors) {
- return defaultValue;
- }
- if (this.options.colors.hasOwnProperty(name)) {
- return this.options.colors[name];
- }
- return defaultValue;
- }
- }]);
-
- return Palette;
-}(_Extension3.default);
-
-exports.default = Palette;
-module.exports = exports.default;
-
-/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-module.exports = {
- "aliceblue": [240, 248, 255],
- "antiquewhite": [250, 235, 215],
- "aqua": [0, 255, 255],
- "aquamarine": [127, 255, 212],
- "azure": [240, 255, 255],
- "beige": [245, 245, 220],
- "bisque": [255, 228, 196],
- "black": [0, 0, 0],
- "blanchedalmond": [255, 235, 205],
- "blue": [0, 0, 255],
- "blueviolet": [138, 43, 226],
- "brown": [165, 42, 42],
- "burlywood": [222, 184, 135],
- "cadetblue": [95, 158, 160],
- "chartreuse": [127, 255, 0],
- "chocolate": [210, 105, 30],
- "coral": [255, 127, 80],
- "cornflowerblue": [100, 149, 237],
- "cornsilk": [255, 248, 220],
- "crimson": [220, 20, 60],
- "cyan": [0, 255, 255],
- "darkblue": [0, 0, 139],
- "darkcyan": [0, 139, 139],
- "darkgoldenrod": [184, 134, 11],
- "darkgray": [169, 169, 169],
- "darkgreen": [0, 100, 0],
- "darkgrey": [169, 169, 169],
- "darkkhaki": [189, 183, 107],
- "darkmagenta": [139, 0, 139],
- "darkolivegreen": [85, 107, 47],
- "darkorange": [255, 140, 0],
- "darkorchid": [153, 50, 204],
- "darkred": [139, 0, 0],
- "darksalmon": [233, 150, 122],
- "darkseagreen": [143, 188, 143],
- "darkslateblue": [72, 61, 139],
- "darkslategray": [47, 79, 79],
- "darkslategrey": [47, 79, 79],
- "darkturquoise": [0, 206, 209],
- "darkviolet": [148, 0, 211],
- "deeppink": [255, 20, 147],
- "deepskyblue": [0, 191, 255],
- "dimgray": [105, 105, 105],
- "dimgrey": [105, 105, 105],
- "dodgerblue": [30, 144, 255],
- "firebrick": [178, 34, 34],
- "floralwhite": [255, 250, 240],
- "forestgreen": [34, 139, 34],
- "fuchsia": [255, 0, 255],
- "gainsboro": [220, 220, 220],
- "ghostwhite": [248, 248, 255],
- "gold": [255, 215, 0],
- "goldenrod": [218, 165, 32],
- "gray": [128, 128, 128],
- "green": [0, 128, 0],
- "greenyellow": [173, 255, 47],
- "grey": [128, 128, 128],
- "honeydew": [240, 255, 240],
- "hotpink": [255, 105, 180],
- "indianred": [205, 92, 92],
- "indigo": [75, 0, 130],
- "ivory": [255, 255, 240],
- "khaki": [240, 230, 140],
- "lavender": [230, 230, 250],
- "lavenderblush": [255, 240, 245],
- "lawngreen": [124, 252, 0],
- "lemonchiffon": [255, 250, 205],
- "lightblue": [173, 216, 230],
- "lightcoral": [240, 128, 128],
- "lightcyan": [224, 255, 255],
- "lightgoldenrodyellow": [250, 250, 210],
- "lightgray": [211, 211, 211],
- "lightgreen": [144, 238, 144],
- "lightgrey": [211, 211, 211],
- "lightpink": [255, 182, 193],
- "lightsalmon": [255, 160, 122],
- "lightseagreen": [32, 178, 170],
- "lightskyblue": [135, 206, 250],
- "lightslategray": [119, 136, 153],
- "lightslategrey": [119, 136, 153],
- "lightsteelblue": [176, 196, 222],
- "lightyellow": [255, 255, 224],
- "lime": [0, 255, 0],
- "limegreen": [50, 205, 50],
- "linen": [250, 240, 230],
- "magenta": [255, 0, 255],
- "maroon": [128, 0, 0],
- "mediumaquamarine": [102, 205, 170],
- "mediumblue": [0, 0, 205],
- "mediumorchid": [186, 85, 211],
- "mediumpurple": [147, 112, 219],
- "mediumseagreen": [60, 179, 113],
- "mediumslateblue": [123, 104, 238],
- "mediumspringgreen": [0, 250, 154],
- "mediumturquoise": [72, 209, 204],
- "mediumvioletred": [199, 21, 133],
- "midnightblue": [25, 25, 112],
- "mintcream": [245, 255, 250],
- "mistyrose": [255, 228, 225],
- "moccasin": [255, 228, 181],
- "navajowhite": [255, 222, 173],
- "navy": [0, 0, 128],
- "oldlace": [253, 245, 230],
- "olive": [128, 128, 0],
- "olivedrab": [107, 142, 35],
- "orange": [255, 165, 0],
- "orangered": [255, 69, 0],
- "orchid": [218, 112, 214],
- "palegoldenrod": [238, 232, 170],
- "palegreen": [152, 251, 152],
- "paleturquoise": [175, 238, 238],
- "palevioletred": [219, 112, 147],
- "papayawhip": [255, 239, 213],
- "peachpuff": [255, 218, 185],
- "peru": [205, 133, 63],
- "pink": [255, 192, 203],
- "plum": [221, 160, 221],
- "powderblue": [176, 224, 230],
- "purple": [128, 0, 128],
- "rebeccapurple": [102, 51, 153],
- "red": [255, 0, 0],
- "rosybrown": [188, 143, 143],
- "royalblue": [65, 105, 225],
- "saddlebrown": [139, 69, 19],
- "salmon": [250, 128, 114],
- "sandybrown": [244, 164, 96],
- "seagreen": [46, 139, 87],
- "seashell": [255, 245, 238],
- "sienna": [160, 82, 45],
- "silver": [192, 192, 192],
- "skyblue": [135, 206, 235],
- "slateblue": [106, 90, 205],
- "slategray": [112, 128, 144],
- "slategrey": [112, 128, 144],
- "snow": [255, 250, 250],
- "springgreen": [0, 255, 127],
- "steelblue": [70, 130, 180],
- "tan": [210, 180, 140],
- "teal": [0, 128, 128],
- "thistle": [216, 191, 216],
- "tomato": [255, 99, 71],
- "turquoise": [64, 224, 208],
- "violet": [238, 130, 238],
- "wheat": [245, 222, 179],
- "white": [255, 255, 255],
- "whitesmoke": [245, 245, 245],
- "yellow": [255, 255, 0],
- "yellowgreen": [154, 205, 50]
-};
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* MIT license */
-var cssKeywords = __webpack_require__(5);
-
-// NOTE: conversions should only return primitive values (i.e. arrays, or
-// values that give correct `typeof` results).
-// do not use box values types (i.e. Number(), String(), etc.)
-
-var reverseKeywords = {};
-for (var key in cssKeywords) {
- if (cssKeywords.hasOwnProperty(key)) {
- reverseKeywords[cssKeywords[key]] = key;
- }
-}
-
-var convert = module.exports = {
- rgb: {channels: 3, labels: 'rgb'},
- hsl: {channels: 3, labels: 'hsl'},
- hsv: {channels: 3, labels: 'hsv'},
- hwb: {channels: 3, labels: 'hwb'},
- cmyk: {channels: 4, labels: 'cmyk'},
- xyz: {channels: 3, labels: 'xyz'},
- lab: {channels: 3, labels: 'lab'},
- lch: {channels: 3, labels: 'lch'},
- hex: {channels: 1, labels: ['hex']},
- keyword: {channels: 1, labels: ['keyword']},
- ansi16: {channels: 1, labels: ['ansi16']},
- ansi256: {channels: 1, labels: ['ansi256']},
- hcg: {channels: 3, labels: ['h', 'c', 'g']},
- apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
- gray: {channels: 1, labels: ['gray']}
-};
-
-// hide .channels and .labels properties
-for (var model in convert) {
- if (convert.hasOwnProperty(model)) {
- if (!('channels' in convert[model])) {
- throw new Error('missing channels property: ' + model);
- }
-
- if (!('labels' in convert[model])) {
- throw new Error('missing channel labels property: ' + model);
- }
-
- if (convert[model].labels.length !== convert[model].channels) {
- throw new Error('channel and label counts mismatch: ' + model);
- }
-
- var channels = convert[model].channels;
- var labels = convert[model].labels;
- delete convert[model].channels;
- delete convert[model].labels;
- Object.defineProperty(convert[model], 'channels', {value: channels});
- Object.defineProperty(convert[model], 'labels', {value: labels});
- }
-}
-
-convert.rgb.hsl = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
- var min = Math.min(r, g, b);
- var max = Math.max(r, g, b);
- var delta = max - min;
- var h;
- var s;
- var l;
-
- if (max === min) {
- h = 0;
- } else if (r === max) {
- h = (g - b) / delta;
- } else if (g === max) {
- h = 2 + (b - r) / delta;
- } else if (b === max) {
- h = 4 + (r - g) / delta;
- }
-
- h = Math.min(h * 60, 360);
-
- if (h < 0) {
- h += 360;
- }
-
- l = (min + max) / 2;
-
- if (max === min) {
- s = 0;
- } else if (l <= 0.5) {
- s = delta / (max + min);
- } else {
- s = delta / (2 - max - min);
- }
-
- return [h, s * 100, l * 100];
-};
-
-convert.rgb.hsv = function (rgb) {
- var rdif;
- var gdif;
- var bdif;
- var h;
- var s;
-
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
- var v = Math.max(r, g, b);
- var diff = v - Math.min(r, g, b);
- var diffc = function (c) {
- return (v - c) / 6 / diff + 1 / 2;
- };
-
- if (diff === 0) {
- h = s = 0;
- } else {
- s = diff / v;
- rdif = diffc(r);
- gdif = diffc(g);
- bdif = diffc(b);
-
- if (r === v) {
- h = bdif - gdif;
- } else if (g === v) {
- h = (1 / 3) + rdif - bdif;
- } else if (b === v) {
- h = (2 / 3) + gdif - rdif;
- }
- if (h < 0) {
- h += 1;
- } else if (h > 1) {
- h -= 1;
- }
- }
-
- return [
- h * 360,
- s * 100,
- v * 100
- ];
-};
-
-convert.rgb.hwb = function (rgb) {
- var r = rgb[0];
- var g = rgb[1];
- var b = rgb[2];
- var h = convert.rgb.hsl(rgb)[0];
- var w = 1 / 255 * Math.min(r, Math.min(g, b));
-
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
-
- return [h, w * 100, b * 100];
-};
-
-convert.rgb.cmyk = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
- var c;
- var m;
- var y;
- var k;
-
- k = Math.min(1 - r, 1 - g, 1 - b);
- c = (1 - r - k) / (1 - k) || 0;
- m = (1 - g - k) / (1 - k) || 0;
- y = (1 - b - k) / (1 - k) || 0;
-
- return [c * 100, m * 100, y * 100, k * 100];
-};
-
-/**
- * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
- * */
-function comparativeDistance(x, y) {
- return (
- Math.pow(x[0] - y[0], 2) +
- Math.pow(x[1] - y[1], 2) +
- Math.pow(x[2] - y[2], 2)
- );
-}
-
-convert.rgb.keyword = function (rgb) {
- var reversed = reverseKeywords[rgb];
- if (reversed) {
- return reversed;
- }
-
- var currentClosestDistance = Infinity;
- var currentClosestKeyword;
-
- for (var keyword in cssKeywords) {
- if (cssKeywords.hasOwnProperty(keyword)) {
- var value = cssKeywords[keyword];
-
- // Compute comparative distance
- var distance = comparativeDistance(rgb, value);
-
- // Check if its less, if so set as closest
- if (distance < currentClosestDistance) {
- currentClosestDistance = distance;
- currentClosestKeyword = keyword;
- }
- }
- }
-
- return currentClosestKeyword;
-};
-
-convert.keyword.rgb = function (keyword) {
- return cssKeywords[keyword];
-};
-
-convert.rgb.xyz = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
-
- // assume sRGB
- r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
- g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
- b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
-
- var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
- var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
- var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
-
- return [x * 100, y * 100, z * 100];
-};
-
-convert.rgb.lab = function (rgb) {
- var xyz = convert.rgb.xyz(rgb);
- var x = xyz[0];
- var y = xyz[1];
- var z = xyz[2];
- var l;
- var a;
- var b;
-
- x /= 95.047;
- y /= 100;
- z /= 108.883;
-
- x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
- y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
- z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
-
- l = (116 * y) - 16;
- a = 500 * (x - y);
- b = 200 * (y - z);
-
- return [l, a, b];
-};
-
-convert.hsl.rgb = function (hsl) {
- var h = hsl[0] / 360;
- var s = hsl[1] / 100;
- var l = hsl[2] / 100;
- var t1;
- var t2;
- var t3;
- var rgb;
- var val;
-
- if (s === 0) {
- val = l * 255;
- return [val, val, val];
- }
-
- if (l < 0.5) {
- t2 = l * (1 + s);
- } else {
- t2 = l + s - l * s;
- }
-
- t1 = 2 * l - t2;
-
- rgb = [0, 0, 0];
- for (var i = 0; i < 3; i++) {
- t3 = h + 1 / 3 * -(i - 1);
- if (t3 < 0) {
- t3++;
- }
- if (t3 > 1) {
- t3--;
- }
-
- if (6 * t3 < 1) {
- val = t1 + (t2 - t1) * 6 * t3;
- } else if (2 * t3 < 1) {
- val = t2;
- } else if (3 * t3 < 2) {
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
- } else {
- val = t1;
- }
-
- rgb[i] = val * 255;
- }
-
- return rgb;
-};
-
-convert.hsl.hsv = function (hsl) {
- var h = hsl[0];
- var s = hsl[1] / 100;
- var l = hsl[2] / 100;
- var smin = s;
- var lmin = Math.max(l, 0.01);
- var sv;
- var v;
-
- l *= 2;
- s *= (l <= 1) ? l : 2 - l;
- smin *= lmin <= 1 ? lmin : 2 - lmin;
- v = (l + s) / 2;
- sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
-
- return [h, sv * 100, v * 100];
-};
-
-convert.hsv.rgb = function (hsv) {
- var h = hsv[0] / 60;
- var s = hsv[1] / 100;
- var v = hsv[2] / 100;
- var hi = Math.floor(h) % 6;
-
- var f = h - Math.floor(h);
- var p = 255 * v * (1 - s);
- var q = 255 * v * (1 - (s * f));
- var t = 255 * v * (1 - (s * (1 - f)));
- v *= 255;
-
- switch (hi) {
- case 0:
- return [v, t, p];
- case 1:
- return [q, v, p];
- case 2:
- return [p, v, t];
- case 3:
- return [p, q, v];
- case 4:
- return [t, p, v];
- case 5:
- return [v, p, q];
- }
-};
-
-convert.hsv.hsl = function (hsv) {
- var h = hsv[0];
- var s = hsv[1] / 100;
- var v = hsv[2] / 100;
- var vmin = Math.max(v, 0.01);
- var lmin;
- var sl;
- var l;
-
- l = (2 - s) * v;
- lmin = (2 - s) * vmin;
- sl = s * vmin;
- sl /= (lmin <= 1) ? lmin : 2 - lmin;
- sl = sl || 0;
- l /= 2;
-
- return [h, sl * 100, l * 100];
-};
-
-// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
-convert.hwb.rgb = function (hwb) {
- var h = hwb[0] / 360;
- var wh = hwb[1] / 100;
- var bl = hwb[2] / 100;
- var ratio = wh + bl;
- var i;
- var v;
- var f;
- var n;
-
- // wh + bl cant be > 1
- if (ratio > 1) {
- wh /= ratio;
- bl /= ratio;
- }
-
- i = Math.floor(6 * h);
- v = 1 - bl;
- f = 6 * h - i;
-
- if ((i & 0x01) !== 0) {
- f = 1 - f;
- }
-
- n = wh + f * (v - wh); // linear interpolation
-
- var r;
- var g;
- var b;
- switch (i) {
- default:
- case 6:
- case 0: r = v; g = n; b = wh; break;
- case 1: r = n; g = v; b = wh; break;
- case 2: r = wh; g = v; b = n; break;
- case 3: r = wh; g = n; b = v; break;
- case 4: r = n; g = wh; b = v; break;
- case 5: r = v; g = wh; b = n; break;
- }
-
- return [r * 255, g * 255, b * 255];
-};
-
-convert.cmyk.rgb = function (cmyk) {
- var c = cmyk[0] / 100;
- var m = cmyk[1] / 100;
- var y = cmyk[2] / 100;
- var k = cmyk[3] / 100;
- var r;
- var g;
- var b;
-
- r = 1 - Math.min(1, c * (1 - k) + k);
- g = 1 - Math.min(1, m * (1 - k) + k);
- b = 1 - Math.min(1, y * (1 - k) + k);
-
- return [r * 255, g * 255, b * 255];
-};
-
-convert.xyz.rgb = function (xyz) {
- var x = xyz[0] / 100;
- var y = xyz[1] / 100;
- var z = xyz[2] / 100;
- var r;
- var g;
- var b;
-
- r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
- g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
- b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
-
- // assume sRGB
- r = r > 0.0031308
- ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
- : r * 12.92;
-
- g = g > 0.0031308
- ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
- : g * 12.92;
-
- b = b > 0.0031308
- ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
- : b * 12.92;
-
- r = Math.min(Math.max(0, r), 1);
- g = Math.min(Math.max(0, g), 1);
- b = Math.min(Math.max(0, b), 1);
-
- return [r * 255, g * 255, b * 255];
-};
-
-convert.xyz.lab = function (xyz) {
- var x = xyz[0];
- var y = xyz[1];
- var z = xyz[2];
- var l;
- var a;
- var b;
-
- x /= 95.047;
- y /= 100;
- z /= 108.883;
-
- x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
- y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
- z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
-
- l = (116 * y) - 16;
- a = 500 * (x - y);
- b = 200 * (y - z);
-
- return [l, a, b];
-};
-
-convert.lab.xyz = function (lab) {
- var l = lab[0];
- var a = lab[1];
- var b = lab[2];
- var x;
- var y;
- var z;
-
- y = (l + 16) / 116;
- x = a / 500 + y;
- z = y - b / 200;
-
- var y2 = Math.pow(y, 3);
- var x2 = Math.pow(x, 3);
- var z2 = Math.pow(z, 3);
- y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
- x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
- z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
-
- x *= 95.047;
- y *= 100;
- z *= 108.883;
-
- return [x, y, z];
-};
-
-convert.lab.lch = function (lab) {
- var l = lab[0];
- var a = lab[1];
- var b = lab[2];
- var hr;
- var h;
- var c;
-
- hr = Math.atan2(b, a);
- h = hr * 360 / 2 / Math.PI;
-
- if (h < 0) {
- h += 360;
- }
-
- c = Math.sqrt(a * a + b * b);
-
- return [l, c, h];
-};
-
-convert.lch.lab = function (lch) {
- var l = lch[0];
- var c = lch[1];
- var h = lch[2];
- var a;
- var b;
- var hr;
-
- hr = h / 360 * 2 * Math.PI;
- a = c * Math.cos(hr);
- b = c * Math.sin(hr);
-
- return [l, a, b];
-};
-
-convert.rgb.ansi16 = function (args) {
- var r = args[0];
- var g = args[1];
- var b = args[2];
- var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
-
- value = Math.round(value / 50);
-
- if (value === 0) {
- return 30;
- }
-
- var ansi = 30
- + ((Math.round(b / 255) << 2)
- | (Math.round(g / 255) << 1)
- | Math.round(r / 255));
-
- if (value === 2) {
- ansi += 60;
- }
-
- return ansi;
-};
-
-convert.hsv.ansi16 = function (args) {
- // optimization here; we already know the value and don't need to get
- // it converted for us.
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
-};
-
-convert.rgb.ansi256 = function (args) {
- var r = args[0];
- var g = args[1];
- var b = args[2];
-
- // we use the extended greyscale palette here, with the exception of
- // black and white. normal palette only has 4 greyscale shades.
- if (r === g && g === b) {
- if (r < 8) {
- return 16;
- }
-
- if (r > 248) {
- return 231;
- }
-
- return Math.round(((r - 8) / 247) * 24) + 232;
- }
-
- var ansi = 16
- + (36 * Math.round(r / 255 * 5))
- + (6 * Math.round(g / 255 * 5))
- + Math.round(b / 255 * 5);
-
- return ansi;
-};
-
-convert.ansi16.rgb = function (args) {
- var color = args % 10;
-
- // handle greyscale
- if (color === 0 || color === 7) {
- if (args > 50) {
- color += 3.5;
- }
-
- color = color / 10.5 * 255;
-
- return [color, color, color];
- }
-
- var mult = (~~(args > 50) + 1) * 0.5;
- var r = ((color & 1) * mult) * 255;
- var g = (((color >> 1) & 1) * mult) * 255;
- var b = (((color >> 2) & 1) * mult) * 255;
-
- return [r, g, b];
-};
-
-convert.ansi256.rgb = function (args) {
- // handle greyscale
- if (args >= 232) {
- var c = (args - 232) * 10 + 8;
- return [c, c, c];
- }
-
- args -= 16;
-
- var rem;
- var r = Math.floor(args / 36) / 5 * 255;
- var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
- var b = (rem % 6) / 5 * 255;
-
- return [r, g, b];
-};
-
-convert.rgb.hex = function (args) {
- var integer = ((Math.round(args[0]) & 0xFF) << 16)
- + ((Math.round(args[1]) & 0xFF) << 8)
- + (Math.round(args[2]) & 0xFF);
-
- var string = integer.toString(16).toUpperCase();
- return '000000'.substring(string.length) + string;
-};
-
-convert.hex.rgb = function (args) {
- var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
- if (!match) {
- return [0, 0, 0];
- }
-
- var colorString = match[0];
-
- if (match[0].length === 3) {
- colorString = colorString.split('').map(function (char) {
- return char + char;
- }).join('');
- }
-
- var integer = parseInt(colorString, 16);
- var r = (integer >> 16) & 0xFF;
- var g = (integer >> 8) & 0xFF;
- var b = integer & 0xFF;
-
- return [r, g, b];
-};
-
-convert.rgb.hcg = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
- var max = Math.max(Math.max(r, g), b);
- var min = Math.min(Math.min(r, g), b);
- var chroma = (max - min);
- var grayscale;
- var hue;
-
- if (chroma < 1) {
- grayscale = min / (1 - chroma);
- } else {
- grayscale = 0;
- }
-
- if (chroma <= 0) {
- hue = 0;
- } else
- if (max === r) {
- hue = ((g - b) / chroma) % 6;
- } else
- if (max === g) {
- hue = 2 + (b - r) / chroma;
- } else {
- hue = 4 + (r - g) / chroma + 4;
- }
-
- hue /= 6;
- hue %= 1;
-
- return [hue * 360, chroma * 100, grayscale * 100];
-};
-
-convert.hsl.hcg = function (hsl) {
- var s = hsl[1] / 100;
- var l = hsl[2] / 100;
- var c = 1;
- var f = 0;
-
- if (l < 0.5) {
- c = 2.0 * s * l;
- } else {
- c = 2.0 * s * (1.0 - l);
- }
-
- if (c < 1.0) {
- f = (l - 0.5 * c) / (1.0 - c);
- }
-
- return [hsl[0], c * 100, f * 100];
-};
-
-convert.hsv.hcg = function (hsv) {
- var s = hsv[1] / 100;
- var v = hsv[2] / 100;
-
- var c = s * v;
- var f = 0;
-
- if (c < 1.0) {
- f = (v - c) / (1 - c);
- }
-
- return [hsv[0], c * 100, f * 100];
-};
-
-convert.hcg.rgb = function (hcg) {
- var h = hcg[0] / 360;
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
-
- if (c === 0.0) {
- return [g * 255, g * 255, g * 255];
- }
-
- var pure = [0, 0, 0];
- var hi = (h % 1) * 6;
- var v = hi % 1;
- var w = 1 - v;
- var mg = 0;
-
- switch (Math.floor(hi)) {
- case 0:
- pure[0] = 1; pure[1] = v; pure[2] = 0; break;
- case 1:
- pure[0] = w; pure[1] = 1; pure[2] = 0; break;
- case 2:
- pure[0] = 0; pure[1] = 1; pure[2] = v; break;
- case 3:
- pure[0] = 0; pure[1] = w; pure[2] = 1; break;
- case 4:
- pure[0] = v; pure[1] = 0; pure[2] = 1; break;
- default:
- pure[0] = 1; pure[1] = 0; pure[2] = w;
- }
-
- mg = (1.0 - c) * g;
-
- return [
- (c * pure[0] + mg) * 255,
- (c * pure[1] + mg) * 255,
- (c * pure[2] + mg) * 255
- ];
-};
-
-convert.hcg.hsv = function (hcg) {
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
-
- var v = c + g * (1.0 - c);
- var f = 0;
-
- if (v > 0.0) {
- f = c / v;
- }
-
- return [hcg[0], f * 100, v * 100];
-};
-
-convert.hcg.hsl = function (hcg) {
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
-
- var l = g * (1.0 - c) + 0.5 * c;
- var s = 0;
-
- if (l > 0.0 && l < 0.5) {
- s = c / (2 * l);
- } else
- if (l >= 0.5 && l < 1.0) {
- s = c / (2 * (1 - l));
- }
-
- return [hcg[0], s * 100, l * 100];
-};
-
-convert.hcg.hwb = function (hcg) {
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
- var v = c + g * (1.0 - c);
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
-};
-
-convert.hwb.hcg = function (hwb) {
- var w = hwb[1] / 100;
- var b = hwb[2] / 100;
- var v = 1 - b;
- var c = v - w;
- var g = 0;
-
- if (c < 1) {
- g = (v - c) / (1 - c);
- }
-
- return [hwb[0], c * 100, g * 100];
-};
-
-convert.apple.rgb = function (apple) {
- return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
-};
-
-convert.rgb.apple = function (rgb) {
- return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
-};
-
-convert.gray.rgb = function (args) {
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
-};
-
-convert.gray.hsl = convert.gray.hsv = function (args) {
- return [0, 0, args[0]];
-};
-
-convert.gray.hwb = function (gray) {
- return [0, 100, gray[0]];
-};
-
-convert.gray.cmyk = function (gray) {
- return [0, 0, 0, gray[0]];
-};
-
-convert.gray.lab = function (gray) {
- return [gray[0], 0, 0];
-};
-
-convert.gray.hex = function (gray) {
- var val = Math.round(gray[0] / 100 * 255) & 0xFF;
- var integer = (val << 16) + (val << 8) + val;
-
- var string = integer.toString(16).toUpperCase();
- return '000000'.substring(string.length) + string;
-};
-
-convert.rgb.gray = function (rgb) {
- var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
- return [val / 255 * 100];
-};
-
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var _Colorpicker = __webpack_require__(8);
-
-var _Colorpicker2 = _interopRequireDefault(_Colorpicker);
-
-var _jquery = __webpack_require__(0);
-
-var _jquery2 = _interopRequireDefault(_jquery);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var plugin = 'colorpicker';
-
-_jquery2.default[plugin] = _Colorpicker2.default;
-
-// Colorpicker jQuery Plugin API
-_jquery2.default.fn[plugin] = function (option) {
- var fnArgs = Array.prototype.slice.call(arguments, 1),
- isSingleElement = this.length === 1,
- returnValue = null;
-
- var $elements = this.each(function () {
- var $this = (0, _jquery2.default)(this),
- inst = $this.data(plugin),
- options = (typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object' ? option : {};
-
- // Create instance if does not exist
- if (!inst) {
- inst = new _Colorpicker2.default(this, options);
- $this.data(plugin, inst);
- }
-
- if (!isSingleElement) {
- return;
- }
-
- returnValue = $this;
-
- if (typeof option === 'string') {
- if (option === 'colorpicker') {
- // Return colorpicker instance: e.g. .colorpicker('colorpicker')
- returnValue = inst;
- } else if (_jquery2.default.isFunction(inst[option])) {
- // Return method call return value: e.g. .colorpicker('isEnabled')
- returnValue = inst[option].apply(inst, fnArgs);
- } else {
- // Return property value: e.g. .colorpicker('element')
- returnValue = inst[option];
- }
- }
- });
-
- return isSingleElement ? returnValue : $elements;
-};
-
-_jquery2.default.fn[plugin].constructor = _Colorpicker2.default;
-
-/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _Extension = __webpack_require__(1);
-
-var _Extension2 = _interopRequireDefault(_Extension);
-
-var _options = __webpack_require__(3);
-
-var _options2 = _interopRequireDefault(_options);
-
-var _extensions = __webpack_require__(9);
-
-var _extensions2 = _interopRequireDefault(_extensions);
-
-var _jquery = __webpack_require__(0);
-
-var _jquery2 = _interopRequireDefault(_jquery);
-
-var _SliderHandler = __webpack_require__(13);
-
-var _SliderHandler2 = _interopRequireDefault(_SliderHandler);
-
-var _PopupHandler = __webpack_require__(14);
-
-var _PopupHandler2 = _interopRequireDefault(_PopupHandler);
-
-var _InputHandler = __webpack_require__(15);
-
-var _InputHandler2 = _interopRequireDefault(_InputHandler);
-
-var _ColorHandler = __webpack_require__(22);
-
-var _ColorHandler2 = _interopRequireDefault(_ColorHandler);
-
-var _PickerHandler = __webpack_require__(23);
-
-var _PickerHandler2 = _interopRequireDefault(_PickerHandler);
-
-var _AddonHandler = __webpack_require__(24);
-
-var _AddonHandler2 = _interopRequireDefault(_AddonHandler);
-
-var _ColorItem = __webpack_require__(2);
-
-var _ColorItem2 = _interopRequireDefault(_ColorItem);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var colorPickerIdCounter = 0;
-
-var root = typeof self !== 'undefined' ? self : undefined; // window
-
-/**
- * Colorpicker widget class
- */
-
-var Colorpicker = function () {
- _createClass(Colorpicker, [{
- key: 'color',
-
-
- /**
- * Internal color object
- *
- * @type {Color|null}
- */
- get: function get() {
- return this.colorHandler.color;
- }
-
- /**
- * Internal color format
- *
- * @type {String|null}
- */
-
- }, {
- key: 'format',
- get: function get() {
- return this.colorHandler.format;
- }
-
- /**
- * Getter of the picker element
- *
- * @returns {jQuery|HTMLElement}
- */
-
- }, {
- key: 'picker',
- get: function get() {
- return this.pickerHandler.picker;
- }
-
- /**
- * @fires Colorpicker#colorpickerCreate
- * @param {Object|String} element
- * @param {Object} options
- * @constructor
- */
-
- }], [{
- key: 'Color',
-
- /**
- * Color class
- *
- * @static
- * @type {Color}
- */
- get: function get() {
- return _ColorItem2.default;
- }
-
- /**
- * Extension class
- *
- * @static
- * @type {Extension}
- */
-
- }, {
- key: 'Extension',
- get: function get() {
- return _Extension2.default;
- }
- }]);
-
- function Colorpicker(element, options) {
- _classCallCheck(this, Colorpicker);
-
- colorPickerIdCounter += 1;
- /**
- * The colorpicker instance number
- * @type {number}
- */
- this.id = colorPickerIdCounter;
-
- /**
- * Latest colorpicker event
- *
- * @type {{name: String, e: *}}
- */
- this.lastEvent = {
- alias: null,
- e: null
- };
-
- /**
- * The element that the colorpicker is bound to
- *
- * @type {*|jQuery}
- */
- this.element = (0, _jquery2.default)(element).addClass('colorpicker-element').attr('data-colorpicker-id', this.id);
-
- /**
- * @type {defaults}
- */
- this.options = _jquery2.default.extend(true, {}, _options2.default, options, this.element.data());
-
- /**
- * @type {boolean}
- * @private
- */
- this.disabled = false;
-
- /**
- * Extensions added to this instance
- *
- * @type {Extension[]}
- */
- this.extensions = [];
-
- /**
- * The element where the
- * @type {*|jQuery}
- */
- this.container = this.options.container === true || this.options.container !== true && this.options.inline === true ? this.element : this.options.container;
-
- this.container = this.container !== false ? (0, _jquery2.default)(this.container) : false;
-
- /**
- * @type {InputHandler}
- */
- this.inputHandler = new _InputHandler2.default(this);
- /**
- * @type {ColorHandler}
- */
- this.colorHandler = new _ColorHandler2.default(this);
- /**
- * @type {SliderHandler}
- */
- this.sliderHandler = new _SliderHandler2.default(this);
- /**
- * @type {PopupHandler}
- */
- this.popupHandler = new _PopupHandler2.default(this, root);
- /**
- * @type {PickerHandler}
- */
- this.pickerHandler = new _PickerHandler2.default(this);
- /**
- * @type {AddonHandler}
- */
- this.addonHandler = new _AddonHandler2.default(this);
-
- this.init();
-
- // Emit a create event
- (0, _jquery2.default)(_jquery2.default.proxy(function () {
- /**
- * (Colorpicker) When the Colorpicker instance has been created and the DOM is ready.
- *
- * @event Colorpicker#colorpickerCreate
- */
- this.trigger('colorpickerCreate');
- }, this));
- }
-
- /**
- * Initializes the plugin
- * @private
- */
-
-
- _createClass(Colorpicker, [{
- key: 'init',
- value: function init() {
- // Init addon
- this.addonHandler.bind();
-
- // Init input
- this.inputHandler.bind();
-
- // Init extensions (before initializing the color)
- this.initExtensions();
-
- // Init color
- this.colorHandler.bind();
-
- // Init picker
- this.pickerHandler.bind();
-
- // Init sliders and popup
- this.sliderHandler.bind();
- this.popupHandler.bind();
-
- // Inject into the DOM (this may make it visible)
- this.pickerHandler.attach();
-
- // Update all components
- this.update();
-
- if (this.inputHandler.isDisabled()) {
- this.disable();
- }
- }
-
- /**
- * Initializes the plugin extensions
- * @private
- */
-
- }, {
- key: 'initExtensions',
- value: function initExtensions() {
- var _this = this;
-
- if (!Array.isArray(this.options.extensions)) {
- this.options.extensions = [];
- }
-
- if (this.options.debug) {
- this.options.extensions.push({ name: 'debugger' });
- }
-
- // Register and instantiate extensions
- this.options.extensions.forEach(function (ext) {
- _this.registerExtension(Colorpicker.extensions[ext.name.toLowerCase()], ext.options || {});
- });
- }
-
- /**
- * Creates and registers the given extension
- *
- * @param {Extension} ExtensionClass The extension class to instantiate
- * @param {Object} [config] Extension configuration
- * @returns {Extension}
- */
-
- }, {
- key: 'registerExtension',
- value: function registerExtension(ExtensionClass) {
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var ext = new ExtensionClass(this, config);
-
- this.extensions.push(ext);
- return ext;
- }
-
- /**
- * Destroys the current instance
- *
- * @fires Colorpicker#colorpickerDestroy
- */
-
- }, {
- key: 'destroy',
- value: function destroy() {
- var color = this.color;
-
- this.sliderHandler.unbind();
- this.inputHandler.unbind();
- this.popupHandler.unbind();
- this.colorHandler.unbind();
- this.addonHandler.unbind();
- this.pickerHandler.unbind();
-
- this.element.removeClass('colorpicker-element').removeData('colorpicker', 'color').off('.colorpicker');
-
- /**
- * (Colorpicker) When the instance is destroyed with all events unbound.
- *
- * @event Colorpicker#colorpickerDestroy
- */
- this.trigger('colorpickerDestroy', color);
- }
-
- /**
- * Shows the colorpicker widget if hidden.
- * If the colorpicker is disabled this call will be ignored.
- *
- * @fires Colorpicker#colorpickerShow
- * @param {Event} [e]
- */
-
- }, {
- key: 'show',
- value: function show(e) {
- this.popupHandler.show(e);
- }
-
- /**
- * Hides the colorpicker widget.
- *
- * @fires Colorpicker#colorpickerHide
- * @param {Event} [e]
- */
-
- }, {
- key: 'hide',
- value: function hide(e) {
- this.popupHandler.hide(e);
- }
-
- /**
- * Toggles the colorpicker between visible and hidden.
- *
- * @fires Colorpicker#colorpickerShow
- * @fires Colorpicker#colorpickerHide
- * @param {Event} [e]
- */
-
- }, {
- key: 'toggle',
- value: function toggle(e) {
- this.popupHandler.toggle(e);
- }
-
- /**
- * Returns the current color value as string
- *
- * @param {String|*} [defaultValue]
- * @returns {String|*}
- */
-
- }, {
- key: 'getValue',
- value: function getValue() {
- var defaultValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
-
- var val = this.colorHandler.color;
-
- val = val instanceof _ColorItem2.default ? val : defaultValue;
-
- if (val instanceof _ColorItem2.default) {
- return val.string(this.format);
- }
-
- return val;
- }
-
- /**
- * Sets the color manually
- *
- * @fires Colorpicker#colorpickerChange
- * @param {String|Color} val
- */
-
- }, {
- key: 'setValue',
- value: function setValue(val) {
- if (this.isDisabled()) {
- return;
- }
- var ch = this.colorHandler;
-
- if (ch.hasColor() && !!val && ch.color.equals(val) || !ch.hasColor() && !val) {
- // same color or still empty
- return;
- }
-
- ch.color = val ? ch.createColor(val, this.options.autoInputFallback) : null;
-
- /**
- * (Colorpicker) When the color is set programmatically with setValue().
- *
- * @event Colorpicker#colorpickerChange
- */
- this.trigger('colorpickerChange', ch.color, val);
-
- // force update if color has changed to empty
- this.update();
- }
-
- /**
- * Updates the UI and the input color according to the internal color.
- *
- * @fires Colorpicker#colorpickerUpdate
- */
-
- }, {
- key: 'update',
- value: function update() {
- if (this.colorHandler.hasColor()) {
- this.inputHandler.update();
- } else {
- this.colorHandler.assureColor();
- }
-
- this.addonHandler.update();
- this.pickerHandler.update();
-
- /**
- * (Colorpicker) Fired when the widget is updated.
- *
- * @event Colorpicker#colorpickerUpdate
- */
- this.trigger('colorpickerUpdate');
- }
-
- /**
- * Enables the widget and the input if any
- *
- * @fires Colorpicker#colorpickerEnable
- * @returns {boolean}
- */
-
- }, {
- key: 'enable',
- value: function enable() {
- this.inputHandler.enable();
- this.disabled = false;
- this.picker.removeClass('colorpicker-disabled');
-
- /**
- * (Colorpicker) When the widget has been enabled.
- *
- * @event Colorpicker#colorpickerEnable
- */
- this.trigger('colorpickerEnable');
- return true;
- }
-
- /**
- * Disables the widget and the input if any
- *
- * @fires Colorpicker#colorpickerDisable
- * @returns {boolean}
- */
-
- }, {
- key: 'disable',
- value: function disable() {
- this.inputHandler.disable();
- this.disabled = true;
- this.picker.addClass('colorpicker-disabled');
-
- /**
- * (Colorpicker) When the widget has been disabled.
- *
- * @event Colorpicker#colorpickerDisable
- */
- this.trigger('colorpickerDisable');
- return true;
- }
-
- /**
- * Returns true if this instance is enabled
- * @returns {boolean}
- */
-
- }, {
- key: 'isEnabled',
- value: function isEnabled() {
- return !this.isDisabled();
- }
-
- /**
- * Returns true if this instance is disabled
- * @returns {boolean}
- */
-
- }, {
- key: 'isDisabled',
- value: function isDisabled() {
- return this.disabled === true;
- }
-
- /**
- * Triggers a Colorpicker event.
- *
- * @param eventName
- * @param color
- * @param value
- */
-
- }, {
- key: 'trigger',
- value: function trigger(eventName) {
- var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
- var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
-
- this.element.trigger({
- type: eventName,
- colorpicker: this,
- color: color ? color : this.color,
- value: value ? value : this.getValue()
- });
- }
- }]);
-
- return Colorpicker;
-}();
-
-/**
- * Colorpicker extension classes, indexed by extension name
- *
- * @static
- * @type {Object} a map between the extension name and its class
- */
-
-
-Colorpicker.extensions = _extensions2.default;
-
-exports.default = Colorpicker;
-module.exports = exports.default;
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.Palette = exports.Swatches = exports.Preview = exports.Debugger = undefined;
-
-var _Debugger = __webpack_require__(10);
-
-var _Debugger2 = _interopRequireDefault(_Debugger);
-
-var _Preview = __webpack_require__(11);
-
-var _Preview2 = _interopRequireDefault(_Preview);
-
-var _Swatches = __webpack_require__(12);
-
-var _Swatches2 = _interopRequireDefault(_Swatches);
-
-var _Palette = __webpack_require__(4);
-
-var _Palette2 = _interopRequireDefault(_Palette);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.Debugger = _Debugger2.default;
-exports.Preview = _Preview2.default;
-exports.Swatches = _Swatches2.default;
-exports.Palette = _Palette2.default;
-exports.default = {
- 'debugger': _Debugger2.default,
- 'preview': _Preview2.default,
- 'swatches': _Swatches2.default,
- 'palette': _Palette2.default
-};
-
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
-
-var _Extension2 = __webpack_require__(1);
-
-var _Extension3 = _interopRequireDefault(_Extension2);
-
-var _jquery = __webpack_require__(0);
-
-var _jquery2 = _interopRequireDefault(_jquery);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-/**
- * Debugger extension class
- * @alias DebuggerExtension
- * @ignore
- */
-var Debugger = function (_Extension) {
- _inherits(Debugger, _Extension);
-
- function Debugger(colorpicker) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- _classCallCheck(this, Debugger);
-
- /**
- * @type {number}
- */
- var _this = _possibleConstructorReturn(this, (Debugger.__proto__ || Object.getPrototypeOf(Debugger)).call(this, colorpicker, options));
-
- _this.eventCounter = 0;
- if (_this.colorpicker.inputHandler.hasInput()) {
- _this.colorpicker.inputHandler.input.on('change.colorpicker-ext', _jquery2.default.proxy(_this.onChangeInput, _this));
- }
- return _this;
- }
-
- /**
- * @fires DebuggerExtension#colorpickerDebug
- * @param {string} eventName
- * @param {*} args
- */
-
-
- _createClass(Debugger, [{
- key: 'log',
- value: function log(eventName) {
- var _console;
-
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- this.eventCounter += 1;
-
- var logMessage = '#' + this.eventCounter + ': Colorpicker#' + this.colorpicker.id + ' [' + eventName + ']';
-
- (_console = console).debug.apply(_console, [logMessage].concat(args));
-
- /**
- * Whenever the debugger logs an event, this other event is emitted.
- *
- * @event DebuggerExtension#colorpickerDebug
- * @type {object} The event object
- * @property {Colorpicker} colorpicker The Colorpicker instance
- * @property {ColorItem} color The color instance
- * @property {{debugger: DebuggerExtension, eventName: String, logArgs: Array, logMessage: String}} debug
- * The debug info
- */
- this.colorpicker.element.trigger({
- type: 'colorpickerDebug',
- colorpicker: this.colorpicker,
- color: this.color,
- value: null,
- debug: {
- debugger: this,
- eventName: eventName,
- logArgs: args,
- logMessage: logMessage
- }
- });
- }
- }, {
- key: 'resolveColor',
- value: function resolveColor(color) {
- var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
-
- this.log('resolveColor()', color, realColor);
- return false;
- }
- }, {
- key: 'onCreate',
- value: function onCreate(event) {
- this.log('colorpickerCreate');
- return _get(Debugger.prototype.__proto__ || Object.getPrototypeOf(Debugger.prototype), 'onCreate', this).call(this, event);
- }
- }, {
- key: 'onDestroy',
- value: function onDestroy(event) {
- this.log('colorpickerDestroy');
- this.eventCounter = 0;
-
- if (this.colorpicker.inputHandler.hasInput()) {
- this.colorpicker.inputHandler.input.off('.colorpicker-ext');
- }
-
- return _get(Debugger.prototype.__proto__ || Object.getPrototypeOf(Debugger.prototype), 'onDestroy', this).call(this, event);
- }
- }, {
- key: 'onUpdate',
- value: function onUpdate(event) {
- this.log('colorpickerUpdate');
- }
-
- /**
- * @listens Colorpicker#change
- * @param {Event} event
- */
-
- }, {
- key: 'onChangeInput',
- value: function onChangeInput(event) {
- this.log('input:change.colorpicker', event.value, event.color);
- }
- }, {
- key: 'onChange',
- value: function onChange(event) {
- this.log('colorpickerChange', event.value, event.color);
- }
- }, {
- key: 'onInvalid',
- value: function onInvalid(event) {
- this.log('colorpickerInvalid', event.value, event.color);
- }
- }, {
- key: 'onHide',
- value: function onHide(event) {
- this.log('colorpickerHide');
- this.eventCounter = 0;
- }
- }, {
- key: 'onShow',
- value: function onShow(event) {
- this.log('colorpickerShow');
- }
- }, {
- key: 'onDisable',
- value: function onDisable(event) {
- this.log('colorpickerDisable');
- }
- }, {
- key: 'onEnable',
- value: function onEnable(event) {
- this.log('colorpickerEnable');
- }
- }]);
-
- return Debugger;
-}(_Extension3.default);
-
-exports.default = Debugger;
-module.exports = exports.default;
-
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
-
-var _Extension2 = __webpack_require__(1);
-
-var _Extension3 = _interopRequireDefault(_Extension2);
-
-var _jquery = __webpack_require__(0);
-
-var _jquery2 = _interopRequireDefault(_jquery);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-/**
- * Color preview extension
- * @ignore
- */
-var Preview = function (_Extension) {
- _inherits(Preview, _Extension);
-
- function Preview(colorpicker) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- _classCallCheck(this, Preview);
-
- var _this = _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).call(this, colorpicker, _jquery2.default.extend(true, {}, {
- template: '
',showText:true,format:colorpicker.format},options)));_this.element=(0,_jquery2.default)(_this.options.template);_this.elementInner=_this.element.find("div");return _this}_createClass(Preview,[{key:"onCreate",value:function onCreate(event){_get(Preview.prototype.__proto__||Object.getPrototypeOf(Preview.prototype),"onCreate",this).call(this,event);this.colorpicker.picker.append(this.element)}},{key:"onUpdate",value:function onUpdate(event){_get(Preview.prototype.__proto__||Object.getPrototypeOf(Preview.prototype),"onUpdate",this).call(this,event);if(!event.color){this.elementInner.css("backgroundColor",null).css("color",null).html("");return}this.elementInner.css("backgroundColor",event.color.toRgbString());if(this.options.showText){this.elementInner.html(event.color.string(this.options.format||this.colorpicker.format));if(event.color.isDark()&&event.color.alpha>.5){this.elementInner.css("color","white")}else{this.elementInner.css("color","black")}}}}]);return Preview}(_Extension3.default);exports.default=Preview;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i\n \n ',swatchTemplate:''};var Swatches=function(_Palette){_inherits(Swatches,_Palette);function Swatches(colorpicker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Swatches);var _this=_possibleConstructorReturn(this,(Swatches.__proto__||Object.getPrototypeOf(Swatches)).call(this,colorpicker,_jquery2.default.extend(true,{},defaults,options)));_this.element=null;return _this}_createClass(Swatches,[{key:"isEnabled",value:function isEnabled(){return this.getLength()>0}},{key:"onCreate",value:function onCreate(event){_get(Swatches.prototype.__proto__||Object.getPrototypeOf(Swatches.prototype),"onCreate",this).call(this,event);if(!this.isEnabled()){return}this.element=(0,_jquery2.default)(this.options.barTemplate);this.load();this.colorpicker.picker.append(this.element)}},{key:"load",value:function load(){var _this2=this;var colorpicker=this.colorpicker,swatchContainer=this.element.find(".colorpicker-swatches--inner"),isAliased=this.options.namesAsValues===true&&!Array.isArray(this.colors);swatchContainer.empty();_jquery2.default.each(this.colors,function(name,value){var $swatch=(0,_jquery2.default)(_this2.options.swatchTemplate).attr("data-name",name).attr("data-value",value).attr("title",isAliased?name+": "+value:value).on("mousedown.colorpicker touchstart.colorpicker",function(e){var $sw=(0,_jquery2.default)(this);colorpicker.setValue(isAliased?$sw.attr("data-name"):$sw.attr("data-value"))});$swatch.find(".colorpicker-swatch--inner").css("background-color",value);swatchContainer.append($swatch)});swatchContainer.append((0,_jquery2.default)(''))}}]);return Swatches}(_Palette3.default);exports.default=Swatches;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0}},{key:"onClickingInside",value:function onClickingInside(e){this.clicking=this.isClickingInside(e)}},{key:"createPopover",value:function createPopover(){var cp=this.colorpicker;this.popoverTarget=this.hasAddon?this.addon:this.input;cp.picker.addClass("colorpicker-bs-popover-content");this.popoverTarget.popover(_jquery2.default.extend(true,{},_options2.default.popover,cp.options.popover,{trigger:"manual",content:cp.picker,html:true}));this.popoverTip=(0,_jquery2.default)(this.popoverTarget.popover("getTipElement").data("bs.popover").tip);this.popoverTip.addClass("colorpicker-bs-popover");this.popoverTarget.on("shown.bs.popover",_jquery2.default.proxy(this.fireShow,this));this.popoverTarget.on("hidden.bs.popover",_jquery2.default.proxy(this.fireHide,this))}},{key:"reposition",value:function reposition(e){if(this.popoverTarget&&this.isVisible()){this.popoverTarget.popover("update")}}},{key:"toggle",value:function toggle(e){if(this.isVisible()){this.hide(e)}else{this.show(e)}}},{key:"show",value:function show(e){if(this.isVisible()||this.showing||this.hidding){return}this.showing=true;this.hidding=false;this.clicking=false;var cp=this.colorpicker;cp.lastEvent.alias="show";cp.lastEvent.e=e;if(e&&(!this.hasInput||this.input.attr("type")==="color")&&e&&e.preventDefault){e.stopPropagation();e.preventDefault()}if(this.isPopover){(0,_jquery2.default)(this.root).on("resize.colorpicker",_jquery2.default.proxy(this.reposition,this))}cp.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden");if(this.popoverTarget){this.popoverTarget.popover("show")}else{this.fireShow()}}},{key:"fireShow",value:function fireShow(){this.hidding=false;this.showing=false;if(this.isPopover){(0,_jquery2.default)(this.root.document).on("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.hide,this));(0,_jquery2.default)(this.root.document).on("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.onClickingInside,this))}this.colorpicker.trigger("colorpickerShow")}},{key:"hide",value:function hide(e){if(this.isHidden()||this.showing||this.hidding){return}var cp=this.colorpicker,clicking=this.clicking||this.isClickingInside(e);this.hidding=true;this.showing=false;this.clicking=false;cp.lastEvent.alias="hide";cp.lastEvent.e=e;if(clicking){this.hidding=false;return}if(this.popoverTarget){this.popoverTarget.popover("hide")}else{this.fireHide()}}},{key:"fireHide",value:function fireHide(){this.hidding=false;this.showing=false;var cp=this.colorpicker;cp.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible");(0,_jquery2.default)(this.root).off("resize.colorpicker",_jquery2.default.proxy(this.reposition,this));(0,_jquery2.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.hide,this));(0,_jquery2.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",_jquery2.default.proxy(this.onClickingInside,this));cp.trigger("colorpickerHide")}},{key:"focus",value:function focus(){if(this.hasAddon){return this.addon.focus()}if(this.hasInput){return this.input.focus()}return false}},{key:"isVisible",value:function isVisible(){return this.colorpicker.picker.hasClass("colorpicker-visible")&&!this.colorpicker.picker.hasClass("colorpicker-hidden")}},{key:"isHidden",value:function isHidden(){return this.colorpicker.picker.hasClass("colorpicker-hidden")&&!this.colorpicker.picker.hasClass("colorpicker-visible")}},{key:"input",get:function get(){return this.colorpicker.inputHandler.input}},{key:"hasInput",get:function get(){return this.colorpicker.inputHandler.hasInput()}},{key:"addon",get:function get(){return this.colorpicker.addonHandler.addon}},{key:"hasAddon",get:function get(){return this.colorpicker.addonHandler.hasAddon()}},{key:"isPopover",get:function get(){return!this.colorpicker.options.inline&&!!this.popoverTip}}]);return PopupHandler}();exports.default=PopupHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:null;val=val?val:this.colorpicker.colorHandler.getColorString();if(!val){return""}val=this.colorpicker.colorHandler.resolveColorDelegate(val,false);if(this.colorpicker.options.useHashPrefix===false){val=val.replace(/^#/g,"")}return val}},{key:"hasInput",value:function hasInput(){return this.input!==false}},{key:"isEnabled",value:function isEnabled(){return this.hasInput()&&!this.isDisabled()}},{key:"isDisabled",value:function isDisabled(){return this.hasInput()&&this.input.prop("disabled")===true}},{key:"disable",value:function disable(){if(this.hasInput()){this.input.prop("disabled",true)}}},{key:"enable",value:function enable(){if(this.hasInput()){this.input.prop("disabled",false)}}},{key:"update",value:function update(){if(!this.hasInput()){return}if(this.colorpicker.options.autoInputFallback===false&&this.colorpicker.colorHandler.isInvalidColor()){return}this.setValue(this.getFormattedColor())}},{key:"onchange",value:function onchange(e){this.colorpicker.lastEvent.alias="input.change";this.colorpicker.lastEvent.e=e;var val=this.getValue();if(val!==e.value){this.colorpicker.setValue(val)}}},{key:"onkeyup",value:function onkeyup(e){this.colorpicker.lastEvent.alias="input.keyup";this.colorpicker.lastEvent.e=e;var val=this.getValue();if(val!==e.value){this.colorpicker.setValue(val)}}}]);return InputHandler}();exports.default=InputHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";var colorString=__webpack_require__(17);var convert=__webpack_require__(20);var _slice=[].slice;var skippedModels=["keyword","gray","hex"];var hashedModelKeys={};Object.keys(convert).forEach(function(model){hashedModelKeys[_slice.call(convert[model].labels).sort().join("")]=model});var limiters={};function Color(obj,model){if(!(this instanceof Color)){return new Color(obj,model)}if(model&&model in skippedModels){model=null}if(model&&!(model in convert)){throw new Error("Unknown model: "+model)}var i;var channels;if(obj==null){this.model="rgb";this.color=[0,0,0];this.valpha=1}else if(obj instanceof Color){this.model=obj.model;this.color=obj.color.slice();this.valpha=obj.valpha}else if(typeof obj==="string"){var result=colorString.get(obj);if(result===null){throw new Error("Unable to parse color from string: "+obj)}this.model=result.model;channels=convert[this.model].channels;this.color=result.value.slice(0,channels);this.valpha=typeof result.value[channels]==="number"?result.value[channels]:1}else if(obj.length){this.model=model||"rgb";channels=convert[this.model].channels;var newArr=_slice.call(obj,0,channels);this.color=zeroArray(newArr,channels);this.valpha=typeof obj[channels]==="number"?obj[channels]:1}else if(typeof obj==="number"){obj&=16777215;this.model="rgb";this.color=[obj>>16&255,obj>>8&255,obj&255];this.valpha=1}else{this.valpha=1;var keys=Object.keys(obj);if("alpha"in obj){keys.splice(keys.indexOf("alpha"),1);this.valpha=typeof obj.alpha==="number"?obj.alpha:0}var hashedKeys=keys.sort().join("");if(!(hashedKeys in hashedModelKeys)){throw new Error("Unable to parse color from object: "+JSON.stringify(obj))}this.model=hashedModelKeys[hashedKeys];var labels=convert[this.model].labels;var color=[];for(i=0;ilum2){return(lum1+.05)/(lum2+.05)}return(lum2+.05)/(lum1+.05)},level:function(color2){var contrastRatio=this.contrast(color2);if(contrastRatio>=7.1){return"AAA"}return contrastRatio>=4.5?"AA":""},isDark:function(){var rgb=this.rgb().color;var yiq=(rgb[0]*299+rgb[1]*587+rgb[2]*114)/1e3;return yiq<128},isLight:function(){return!this.isDark()},negate:function(){var rgb=this.rgb();for(var i=0;i<3;i++){rgb.color[i]=255-rgb.color[i]}return rgb},lighten:function(ratio){var hsl=this.hsl();hsl.color[2]+=hsl.color[2]*ratio;return hsl},darken:function(ratio){var hsl=this.hsl();hsl.color[2]-=hsl.color[2]*ratio;return hsl},saturate:function(ratio){var hsl=this.hsl();hsl.color[1]+=hsl.color[1]*ratio;return hsl},desaturate:function(ratio){var hsl=this.hsl();hsl.color[1]-=hsl.color[1]*ratio;return hsl},whiten:function(ratio){var hwb=this.hwb();hwb.color[1]+=hwb.color[1]*ratio;return hwb},blacken:function(ratio){var hwb=this.hwb();hwb.color[2]+=hwb.color[2]*ratio;return hwb},grayscale:function(){var rgb=this.rgb().color;var val=rgb[0]*.3+rgb[1]*.59+rgb[2]*.11;return Color.rgb(val,val,val)},fade:function(ratio){return this.alpha(this.valpha-this.valpha*ratio)},opaquer:function(ratio){return this.alpha(this.valpha+this.valpha*ratio)},rotate:function(degrees){var hsl=this.hsl();var hue=hsl.color[0];hue=(hue+degrees)%360;hue=hue<0?360+hue:hue;hsl.color[0]=hue;return hsl},mix:function(mixinColor,weight){if(!mixinColor||!mixinColor.rgb){throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof mixinColor)}var color1=mixinColor.rgb();var color2=this.rgb();var p=weight===undefined?.5:weight;var w=2*p-1;var a=color1.alpha()-color2.alpha();var w1=((w*a===-1?w:(w+a)/(1+w*a))+1)/2;var w2=1-w1;return Color.rgb(w1*color1.red()+w2*color2.red(),w1*color1.green()+w2*color2.green(),w1*color1.blue()+w2*color2.blue(),color1.alpha()*p+color2.alpha()*(1-p))}};Object.keys(convert).forEach(function(model){if(skippedModels.indexOf(model)!==-1){return}var channels=convert[model].channels;Color.prototype[model]=function(){if(this.model===model){return new Color(this)}if(arguments.length){return new Color(arguments,model)}var newAlpha=typeof arguments[channels]==="number"?channels:this.valpha;return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha),model)};Color[model]=function(color){if(typeof color==="number"){color=zeroArray(_slice.call(arguments),channels)}return new Color(color,model)}});function roundTo(num,places){return Number(num.toFixed(places))}function roundToPlace(places){return function(num){return roundTo(num,places)}}function getset(model,channel,modifier){model=Array.isArray(model)?model:[model];model.forEach(function(m){(limiters[m]||(limiters[m]=[]))[channel]=modifier});model=model[0];return function(val){var result;if(arguments.length){if(modifier){val=modifier(val)}result=this[model]();result.color[channel]=val;return result}result=this[model]().color[channel];if(modifier){result=modifier(result)}return result}}function maxfn(max){return function(v){return Math.max(0,Math.min(max,v))}}function assertArray(val){return Array.isArray(val)?val:[val]}function zeroArray(arr,length){for(var i=0;i=4&&hwba[3]!==1){a=", "+hwba[3]}return"hwb("+hwba[0]+", "+hwba[1]+"%, "+hwba[2]+"%"+a+")"};cs.to.keyword=function(rgb){return reverseNames[rgb.slice(0,3)]};function clamp(num,min,max){return Math.min(Math.max(min,num),max)}function hexDouble(num){var str=num.toString(16).toUpperCase();return str.length<2?"0"+str:str}},function(module,exports,__webpack_require__){"use strict";var isArrayish=__webpack_require__(19);var concat=Array.prototype.concat;var slice=Array.prototype.slice;var swizzle=module.exports=function swizzle(args){var results=[];for(var i=0,len=args.length;i=0&&obj.splice instanceof Function}},function(module,exports,__webpack_require__){var conversions=__webpack_require__(6);var route=__webpack_require__(21);var convert={};var models=Object.keys(conversions);function wrapRaw(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}var result=fn(args);if(typeof result==="object"){for(var len=result.length,i=0;i1&&arguments[1]!==undefined?arguments[1]:true;var color=new _ColorItem2.default(this.resolveColorDelegate(val),this.format);if(!color.isValid()){if(fallbackOnInvalid){color=this.getFallbackColor()}this.colorpicker.trigger("colorpickerInvalid",color,val)}if(!this.isAlphaEnabled()){color.alpha=1}return color}},{key:"getFallbackColor",value:function getFallbackColor(){if(this.fallback&&this.fallback===this.color){return this.color}var fallback=this.resolveColorDelegate(this.fallback);var color=new _ColorItem2.default(fallback,this.format);if(!color.isValid()){console.warn("The fallback color is invalid. Falling back to the previous color or black if any.");return this.color?this.color:new _ColorItem2.default("#000000",this.format)}return color}},{key:"assureColor",value:function assureColor(){if(!this.hasColor()){this.color=this.getFallbackColor()}return this.color}},{key:"resolveColorDelegate",value:function resolveColorDelegate(color){var realColor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var extResolvedColor=false;_jquery2.default.each(this.colorpicker.extensions,function(name,ext){if(extResolvedColor!==false){return}extResolvedColor=ext.resolveColor(color,realColor)});return extResolvedColor?extResolvedColor:color}},{key:"isInvalidColor",value:function isInvalidColor(){return!this.hasColor()||!this.color.isValid()}},{key:"isAlphaEnabled",value:function isAlphaEnabled(){return this.colorpicker.options.useAlpha!==false}},{key:"hasColor",value:function hasColor(){return this.color instanceof _ColorItem2.default}},{key:"fallback",get:function get(){return this.colorpicker.options.fallbackColor?this.colorpicker.options.fallbackColor:this.hasColor()?this.color:null}},{key:"format",get:function get(){if(this.colorpicker.options.format){return this.colorpicker.options.format}if(this.hasColor()&&this.color.hasTransparency()&&this.color.format.match(/^hex/)){return this.isAlphaEnabled()?"rgba":"hex"}if(this.hasColor()){return this.color.format}return"rgb"}},{key:"color",get:function get(){return this.colorpicker.element.data("color")},set:function set(value){this.colorpicker.element.data("color",value);if(value instanceof _ColorItem2.default&&this.colorpicker.options.format==="auto"){this.colorpicker.options.format=this.color.format}}}]);return ColorHandler}();exports.default=ColorHandler;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){icn.css(styles)}else{this.addon.css(styles)}}}]);return AddonHandler}();exports.default=AddonHandler;module.exports=exports.default}])});
-//# sourceMappingURL=bootstrap-colorpicker.min.js.map
\ No newline at end of file
diff --git a/hal-core/resources/web/js/lib/bootstrap-switch.LICENSE b/hal-core/resources/web/js/lib/bootstrap-switch.LICENSE
deleted file mode 100644
index 31e23cd1..00000000
--- a/hal-core/resources/web/js/lib/bootstrap-switch.LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013-2015 The authors of Bootstrap Switch
-
-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/hal-core/resources/web/js/lib/bootstrap-switch.LICENSE.txt b/hal-core/resources/web/js/lib/bootstrap-switch.LICENSE.txt
deleted file mode 100644
index 31e23cd1..00000000
--- a/hal-core/resources/web/js/lib/bootstrap-switch.LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013-2015 The authors of Bootstrap Switch
-
-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/hal-core/resources/web/js/lib/bootstrap-switch.js b/hal-core/resources/web/js/lib/bootstrap-switch.js
deleted file mode 100644
index 511f08fa..00000000
--- a/hal-core/resources/web/js/lib/bootstrap-switch.js
+++ /dev/null
@@ -1,784 +0,0 @@
-/**
- * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
- *
- * @version v3.3.4
- * @homepage https://bttstrp.github.io/bootstrap-switch
- * @author Mattia Larentis (http://larentis.eu)
- * @license Apache-2.0
- */
-
-(function (global, factory) {
- if (typeof define === "function" && define.amd) {
- define(['jquery'], factory);
- } else if (typeof exports !== "undefined") {
- factory(require('jquery'));
- } else {
- var mod = {
- exports: {}
- };
- factory(global.jquery);
- global.bootstrapSwitch = mod.exports;
- }
-})(this, function (_jquery) {
- 'use strict';
-
- var _jquery2 = _interopRequireDefault(_jquery);
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
-
- var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
- };
-
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
-
- var _createClass = function () {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
-
- return function (Constructor, protoProps, staticProps) {
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
- if (staticProps) defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
-
- var $ = _jquery2.default || window.jQuery || window.$;
-
- var BootstrapSwitch = function () {
- function BootstrapSwitch(element) {
- var _this = this;
-
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- _classCallCheck(this, BootstrapSwitch);
-
- this.$element = $(element);
- this.options = $.extend({}, $.fn.bootstrapSwitch.defaults, this._getElementOptions(), options);
- this.prevOptions = {};
- this.$wrapper = $('