diff --git a/autoload/admin/controls/class.Articles.php b/autoload/admin/controls/class.Articles.php
index b5d8380..376df2d 100644
--- a/autoload/admin/controls/class.Articles.php
+++ b/autoload/admin/controls/class.Articles.php
@@ -27,17 +27,7 @@ class Articles
public static function article_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania artykułu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\Articles::article_save(
$values['id'], $values['title'], $values['main_image'], $values['entry'], $values['text'], $values['table_of_contents'], $values['status'], $values['show_title'], $values['show_table_of_contents'], $values['show_date_add'], $values['date_add'], $values['show_date_modify'], $values['date_modify'], $values['seo_link'], $values['meta_title'],
diff --git a/autoload/admin/controls/class.Banners.php b/autoload/admin/controls/class.Banners.php
index 54ec06d..4914355 100644
--- a/autoload/admin/controls/class.Banners.php
+++ b/autoload/admin/controls/class.Banners.php
@@ -15,17 +15,7 @@ class Banners
public static function banner_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania baneru wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $banner_id = \admin\factory\Banners::banner_save( $values['id'], $values['name'], $values['status'], $values['date_start'], $values['date_end'],
$values['home_page'], $values['src'], $values['url'], $values['html'], $values['text'] ) )
diff --git a/autoload/admin/controls/class.Dictionaries.php b/autoload/admin/controls/class.Dictionaries.php
index 7f47ae9..365795f 100644
--- a/autoload/admin/controls/class.Dictionaries.php
+++ b/autoload/admin/controls/class.Dictionaries.php
@@ -18,17 +18,7 @@ class Dictionaries {
static public function unit_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania jednostki miary wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\Dictionaries::unit_save( $values['id'], $values['text']) )
$response = [ 'status' => 'ok', 'msg' => 'Jednostka miary została zapisana.', 'id' => $id ];
diff --git a/autoload/admin/controls/class.Languages.php b/autoload/admin/controls/class.Languages.php
index ef3c8e3..e282212 100644
--- a/autoload/admin/controls/class.Languages.php
+++ b/autoload/admin/controls/class.Languages.php
@@ -14,17 +14,7 @@ class Languages
public static function language_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania języka wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( \admin\factory\Languages::language_save(
$values['id'], $values['name'], $values['status'],
@@ -60,17 +50,7 @@ class Languages
public static function translation_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania tłumaczenia wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
$languages_list = \admin\factory\Languages::languages_list();
if ( is_array( $languages_list ) and !empty( $languages_list ) ) foreach ( $languages_list as $language )
diff --git a/autoload/admin/controls/class.Layouts.php b/autoload/admin/controls/class.Layouts.php
index a8ed88a..9325906 100644
--- a/autoload/admin/controls/class.Layouts.php
+++ b/autoload/admin/controls/class.Layouts.php
@@ -14,17 +14,7 @@ class Layouts
public static function layout_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania szablonu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\Layouts::layout_save( $values['id'], $values['name'], $values['status'], $values['pages'], $values['html'], $values['css'], $values['js'], $values['m_html'],
$values['m_css'], $values['m_js'], $values['categories'], $values['categories_default'] )
diff --git a/autoload/admin/controls/class.Newsletter.php b/autoload/admin/controls/class.Newsletter.php
index 242a80c..17ebe58 100644
--- a/autoload/admin/controls/class.Newsletter.php
+++ b/autoload/admin/controls/class.Newsletter.php
@@ -27,17 +27,7 @@ class Newsletter
public static function settings_save()
{
$settings = \admin\factory\Settings::settings_details();
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
\admin\factory\Settings::settings_update( 'newsletter_footer', $values['newsletter_footer'] );
\admin\factory\Settings::settings_update( 'newsletter_header', $values['newsletter_header'] );
@@ -91,17 +81,7 @@ class Newsletter
public static function template_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\Newsletter::template_save( $values['id'], $values['name'], $values['text'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Zmiany zostały zapisane.', 'id' => $id ];
diff --git a/autoload/admin/controls/class.Pages.php b/autoload/admin/controls/class.Pages.php
index 9ed6105..4ec7b89 100644
--- a/autoload/admin/controls/class.Pages.php
+++ b/autoload/admin/controls/class.Pages.php
@@ -46,17 +46,7 @@ class Pages
public static function page_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania strony wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\Pages::page_save(
$values['id'], $values['title'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['menu_id'], $values['parent_id'], $values['page_type'],
@@ -84,17 +74,7 @@ class Pages
public static function menu_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania menu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( \admin\factory\Pages::menu_save( $values['id'], $values['name'], $values['status'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Menu zostało zapisane.' ];
diff --git a/autoload/admin/controls/class.Scontainers.php b/autoload/admin/controls/class.Scontainers.php
index 7163f53..3fa2279 100644
--- a/autoload/admin/controls/class.Scontainers.php
+++ b/autoload/admin/controls/class.Scontainers.php
@@ -14,17 +14,7 @@ class Scontainers
public static function container_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kontenera wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\Scontainers::container_save( $values['id'], $values['title'], $values['text'], $values['status'], $values['show_title'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Kontener został zapisany.', 'id' => $id ];
diff --git a/autoload/admin/controls/class.Settings.php b/autoload/admin/controls/class.Settings.php
index 4e35bd0..23fbdbc 100644
--- a/autoload/admin/controls/class.Settings.php
+++ b/autoload/admin/controls/class.Settings.php
@@ -5,17 +5,7 @@ class Settings
{
public static function settings_save()
{
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
$settings = \admin\factory\Settings::settings_details( true );
diff --git a/autoload/admin/controls/class.ShopAttribute.php b/autoload/admin/controls/class.ShopAttribute.php
index db14345..ec7e043 100644
--- a/autoload/admin/controls/class.ShopAttribute.php
+++ b/autoload/admin/controls/class.ShopAttribute.php
@@ -17,18 +17,8 @@ class ShopAttribute
static public function values_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania wartości atrybutu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
+ $values = json_decode( \S::get( 'values' ), true );
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
-;
if ( $id = \admin\factory\ShopAttribute::values_save( (int) \S::get( 'attribute_id' ), $values['name'], $values['value'], $values['ids'], $values['default_value'], $values['impact_on_the_price'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Wartości atrybutu zostały zapisane.', 'id' => $id ];
@@ -57,17 +47,7 @@ class ShopAttribute
public static function attribute_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania atrybutu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopAttribute::attribute_save( (int) $values['id'], $values['name'], $values['status'] == 'on' ? 1 : 0, (int) $values['type'], (int) $values['o'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Atrybut został zapisany.', 'id' => $id ];
diff --git a/autoload/admin/controls/class.ShopCategory.php b/autoload/admin/controls/class.ShopCategory.php
index 61c0fcf..f3dd42f 100644
--- a/autoload/admin/controls/class.ShopCategory.php
+++ b/autoload/admin/controls/class.ShopCategory.php
@@ -32,17 +32,7 @@ class ShopCategory
static public function save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kategorii wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopCategory::save(
$values['id'], $values['title'], $values['text'], $values['text_hidden'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['parent_id'], $values['status'],
diff --git a/autoload/admin/controls/class.ShopCoupon.php b/autoload/admin/controls/class.ShopCoupon.php
index 19f8cc5..2ce1ea2 100644
--- a/autoload/admin/controls/class.ShopCoupon.php
+++ b/autoload/admin/controls/class.ShopCoupon.php
@@ -15,17 +15,7 @@ class ShopCoupon
public static function coupon_save()
{
$response = ['status' => 'error', 'msg' => 'Podczas zapisywania kuponu wystąpił błąd. Proszę spróbować ponownie.'];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $values['categories'] != null )
$categories = is_array( $values['categories'] ) ? json_encode( $values['categories'] ) : json_encode( [ $values['categories'] ] );
diff --git a/autoload/admin/controls/class.ShopProducer.php b/autoload/admin/controls/class.ShopProducer.php
index 31182ce..932cbc1 100644
--- a/autoload/admin/controls/class.ShopProducer.php
+++ b/autoload/admin/controls/class.ShopProducer.php
@@ -13,17 +13,7 @@ class ShopProducer
static public function save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania producenta wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $producer_id = \admin\factory\ShopProducer::save( $values['id'], $values['name'], $values['status'] == 'on' ? 1 : 0, $values['img'], $values['description'], $values['meta_title'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Producent został zapisany.', 'id' => $producer_id ];
diff --git a/autoload/admin/controls/class.ShopProduct.php b/autoload/admin/controls/class.ShopProduct.php
index 7373090..71e2ba4 100644
--- a/autoload/admin/controls/class.ShopProduct.php
+++ b/autoload/admin/controls/class.ShopProduct.php
@@ -180,17 +180,7 @@ class ShopProduct
public static function save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania produktu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopProduct::save(
$values['id'], $values['name'], $values['short_description'], $values['description'], $values['status'], $values['meta_description'], $values['meta_keywords'], $values['seo_link'],
diff --git a/autoload/admin/controls/class.ShopProductSets.php b/autoload/admin/controls/class.ShopProductSets.php
index 4514bc4..757a2d5 100644
--- a/autoload/admin/controls/class.ShopProductSets.php
+++ b/autoload/admin/controls/class.ShopProductSets.php
@@ -16,17 +16,7 @@ class ShopProductSets
static public function save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kompletu produktów wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopProductSet::save(
(int)$values['id'], $values['name'], (string) $values['status'], $values['set_products_id']
diff --git a/autoload/admin/controls/class.ShopPromotion.php b/autoload/admin/controls/class.ShopPromotion.php
index 3ce3e67..ae27a20 100644
--- a/autoload/admin/controls/class.ShopPromotion.php
+++ b/autoload/admin/controls/class.ShopPromotion.php
@@ -17,17 +17,7 @@ class ShopPromotion
static public function save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania promocji wystąpił błąd. Proszę spróbować ponownie' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopPromotion::save(
$values['id'],
diff --git a/autoload/admin/controls/class.ShopStatuses.php b/autoload/admin/controls/class.ShopStatuses.php
index 23331b4..fa14645 100644
--- a/autoload/admin/controls/class.ShopStatuses.php
+++ b/autoload/admin/controls/class.ShopStatuses.php
@@ -7,17 +7,7 @@ class ShopStatuses {
public static function status_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania statusu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopStatuses::status_save( $values['id'], $values['color'], $values['apilo_status_id'], $values['sellasist_status_id'], $values['baselinker_status_id'] ) )
$response = [ 'status' => 'ok', 'msg' => 'Status został zapisany.', 'id' => $id ];
diff --git a/autoload/admin/controls/class.ShopTransport.php b/autoload/admin/controls/class.ShopTransport.php
index 443dcf5..cbe05fb 100644
--- a/autoload/admin/controls/class.ShopTransport.php
+++ b/autoload/admin/controls/class.ShopTransport.php
@@ -5,17 +5,7 @@ class ShopTransport
public static function transport_save()
{
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania rodzaju transportu wystąpił błąd. Proszę spróbować ponownie.' ];
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
if ( $id = \admin\factory\ShopTransport::transport_save(
$values['id'], $values['name'], $values['name_visible'], $values['description'], $values['status'], $values['cost'], $values['payment_methods'], $values['max_wp'], $values['default'], $values['apilo_carrier_account_id'], $values['sellasist_shipment_method_id'], $values['delivery_free']
diff --git a/autoload/admin/controls/class.Users.php b/autoload/admin/controls/class.Users.php
index 25a1af0..45e6994 100644
--- a/autoload/admin/controls/class.Users.php
+++ b/autoload/admin/controls/class.Users.php
@@ -13,17 +13,7 @@ class Users
public static function user_save()
{
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
$response = \admin\factory\Users::user_save( $values['id'], $values['login'], $values['status'], $values['password'], $values['password_re'], $values['admin'] );
echo json_encode( $response );
diff --git a/autoload/admin/factory/class.ShopProduct.php b/autoload/admin/factory/class.ShopProduct.php
index c372c3f..0c57f4a 100644
--- a/autoload/admin/factory/class.ShopProduct.php
+++ b/autoload/admin/factory/class.ShopProduct.php
@@ -1108,11 +1108,12 @@ class ShopProduct
{
$order = self::max_order() + 1;
- $mdb -> insert('pp_shop_products_categories', [
- 'product_id' => (int) $product_id,
- 'category_id' => (int) $category,
- 'o' => (int) $order,
- ]);
+ if ( $product_id and $category )
+ $mdb -> insert( 'pp_shop_products_categories', [
+ 'product_id' => (int)$product_id,
+ 'category_id' => (int)$category,
+ 'o' => (int) $order,
+ ] );
}
}
diff --git a/autoload/front/controls/class.ShopProduct.php b/autoload/front/controls/class.ShopProduct.php
index ffe7e2a..26e55bb 100644
--- a/autoload/front/controls/class.ShopProduct.php
+++ b/autoload/front/controls/class.ShopProduct.php
@@ -26,17 +26,7 @@ class ShopProduct
{
global $lang_id;
- $values_tmp = json_decode( \S::get( 'values' ), true );
-
- $values = [];
-
- foreach ( $values_tmp as $item )
- {
- $name = $item['name'];
- $value = $item['value'];
- $keys = \S::parse_name( $name );
- \S::set_array_value( $values, $keys, $value );
- }
+ $values = json_decode( \S::get( 'values' ), true );
foreach( $values as $key => $val )
{
diff --git a/libraries/filemanager-9.12.1/UploadHandler.php b/libraries/filemanager-9.12.1/UploadHandler.php
deleted file mode 100644
index b9424ea..0000000
--- a/libraries/filemanager-9.12.1/UploadHandler.php
+++ /dev/null
@@ -1,1543 +0,0 @@
- 'The uploaded file exceeds the upload_max_filesize directive in php.ini',
- 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
- 3 => 'The uploaded file was only partially uploaded',
- 4 => 'No file was uploaded',
- 6 => 'Missing a temporary folder',
- 7 => 'Failed to write file to disk',
- 8 => 'A PHP extension stopped the file upload',
- 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini',
- 'max_file_size' => 'File is too big',
- 'min_file_size' => 'File is too small',
- 'accept_file_types' => 'Filetype not allowed',
- 'max_number_of_files' => 'Maximum number of files exceeded',
- 'max_width' => 'Image exceeds maximum width',
- 'min_width' => 'Image requires a minimum width',
- 'max_height' => 'Image exceeds maximum height',
- 'min_height' => 'Image requires a minimum height',
- 'abort' => 'File upload aborted',
- 'image_resize' => 'Failed to resize image'
- );
-
- protected $image_objects = array();
-
- public function __construct($options = null, $initialize = true, $error_messages = null) {
- $this->response = array();
- $this->options = array(
- 'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')),
- 'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/',
- 'upload_url' => $this->get_full_url().'/files/',
- 'input_stream' => 'php://input',
- 'user_dirs' => false,
- 'mkdir_mode' => 0777,
- 'param_name' => 'files',
- // Set the following option to 'POST', if your server does not support
- // DELETE requests. This is a parameter sent to the client:
- 'delete_type' => 'DELETE',
- 'access_control_allow_origin' => '*',
- 'access_control_allow_credentials' => false,
- 'access_control_allow_methods' => array(
- 'OPTIONS',
- 'HEAD',
- 'GET',
- 'POST',
- 'PUT',
- 'PATCH',
- 'DELETE'
- ),
- 'access_control_allow_headers' => array(
- 'Content-Type',
- 'Content-Range',
- 'Content-Disposition'
- ),
- // By default, allow redirects to the referer protocol+host:
- 'redirect_allow_target' => '/^'.preg_quote(
- parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_SCHEME)
- .'://'
- .parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_HOST)
- .'/', // Trailing slash to not match subdomains by mistake
- '/' // preg_quote delimiter param
- ).'/',
- // Enable to provide file downloads via GET requests to the PHP script:
- // 1. Set to 1 to download files via readfile method through PHP
- // 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache
- // 3. Set to 3 to send a X-Accel-Redirect header for nginx
- // If set to 2 or 3, adjust the upload_url option to the base path of
- // the redirect parameter, e.g. '/files/'.
- 'download_via_php' => false,
- // Read files in chunks to avoid memory limits when download_via_php
- // is enabled, set to 0 to disable chunked reading of files:
- 'readfile_chunk_size' => 2 * 1024 * 1024, // 10 MiB
- // Defines which files can be displayed inline when downloaded:
- 'inline_file_types' => '/\.(gif|jpe?g|png)$/i',
- // Defines which files (based on their names) are accepted for upload:
- 'accept_file_types' => '/.+$/i',
- // The php.ini settings upload_max_filesize and post_max_size
- // take precedence over the following max_file_size setting:
- 'max_file_size' => null,
- 'min_file_size' => 1,
- // The maximum number of files for the upload directory:
- 'max_number_of_files' => null,
- // Defines which files are handled as image files:
- 'image_file_types' => '/\.(gif|jpe?g|png)$/i',
- // Use exif_imagetype on all files to correct file extensions:
- 'correct_image_extensions' => true,
- // Image resolution restrictions:
- 'max_width' => null,
- 'max_height' => null,
- 'min_width' => 1,
- 'min_height' => 1,
- // Set the following option to false to enable resumable uploads:
- 'discard_aborted_uploads' => true,
- // Set to 0 to use the GD library to scale and orient images,
- // set to 1 to use imagick (if installed, falls back to GD),
- // set to 2 to use the ImageMagick convert binary directly:
- 'image_library' => 1,
- // Uncomment the following to define an array of resource limits
- // for imagick:
- /*
- 'imagick_resource_limits' => array(
- imagick::RESOURCETYPE_MAP => 32,
- imagick::RESOURCETYPE_MEMORY => 32
- ),
- */
- // Command or path for to the ImageMagick convert binary:
- 'convert_bin' => 'convert',
- // Uncomment the following to add parameters in front of each
- // ImageMagick convert call (the limit constraints seem only
- // to have an effect if put in front):
- /*
- 'convert_params' => '-limit memory 32MiB -limit map 32MiB',
- */
- // Command or path for to the ImageMagick identify binary:
- 'identify_bin' => 'identify',
- 'image_versions' => array(
- // The empty image version key defines options for the original image:
- // Keep in mind that these options are inherited by all other image versions!
- '' => array(
- // Automatically rotate images based on EXIF meta data:
- 'auto_orient' => true
- ),
- // Uncomment the following to create medium sized images:
- /*
- 'medium' => array(
- 'max_width' => 800,
- 'max_height' => 600
- ),
- 'thumbnail' => array(
- // Uncomment the following to use a defined directory for the thumbnails
- // instead of a subdirectory based on the version identifier.
- // Make sure that this directory doesn't allow execution of files if you
- // don't pose any restrictions on the type of uploaded files, e.g. by
- // copying the .htaccess file from the files directory for Apache:
- //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/',
- 'upload_url' => $this->get_full_url().'/thumb/',
- // Uncomment the following to force the max
- // dimensions and e.g. create square thumbnails:
- 'crop' => true,
- 'max_width' => 80,
- 'max_height' => 80
- )
- */
- ),
- 'print_response' => true
- );
- if ($options) {
- $this->options = $options + $this->options;
- }
- if ($error_messages) {
- $this->error_messages = $error_messages + $this->error_messages;
- }
- if ($initialize) {
- $this->initialize();
- }
- }
-
- protected function initialize() {
- switch ($this->get_server_var('REQUEST_METHOD')) {
- case 'OPTIONS':
- case 'HEAD':
- $this->head();
- break;
- case 'GET':
- $this->get($this->options['print_response']);
- break;
- case 'PATCH':
- case 'PUT':
- case 'POST':
- $this->post($this->options['print_response']);
- break;
- case 'DELETE':
- $this->delete($this->options['print_response']);
- break;
- default:
- $this->header('HTTP/1.1 405 Method Not Allowed');
- }
- }
-
- protected function get_full_url() {
- $https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 ||
- !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
- strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
- return
- ($https ? 'https://' : 'http://').
- (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : '').
- (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME'].
- ($https && $_SERVER['SERVER_PORT'] === 443 ||
- $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
- substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
- }
-
- protected function get_user_id() {
- @session_start();
- return session_id();
- }
-
- protected function get_user_path() {
- if ($this->options['user_dirs']) {
- return $this->get_user_id().'/';
- }
- return '';
- }
-
- protected function get_upload_path($file_name = null, $version = null) {
- $file_name = $file_name ? $file_name : '';
- if (empty($version)) {
- $version_path = '';
- } else {
- $version_dir = @$this->options['image_versions'][$version]['upload_dir'];
- if ($version_dir) {
- return $version_dir.$this->get_user_path().$file_name;
- }
- $version_path = $version.'/';
- }
- return $this->options['upload_dir'].$this->get_user_path()
- .$version_path.$file_name;
- }
-
- protected function get_query_separator($url) {
- return strpos($url, '?') === false ? '?' : '&';
- }
-
- protected function get_download_url($file_name, $version = null, $direct = false) {
- if (!$direct && $this->options['download_via_php']) {
- $url = $this->options['script_url']
- .$this->get_query_separator($this->options['script_url'])
- .$this->get_singular_param_name()
- .'='.rawurlencode($file_name);
- if ($version) {
- $url .= '&version='.rawurlencode($version);
- }
- return $url.'&download=1';
- }
- if (empty($version)) {
- $version_path = '';
- } else {
- $version_url = @$this->options['image_versions'][$version]['upload_url'];
- if ($version_url) {
- return $version_url.$this->get_user_path().rawurlencode($file_name);
- }
- $version_path = rawurlencode($version).'/';
- }
- return $this->options['upload_url'].$this->get_user_path()
- .$version_path.rawurlencode($file_name);
- }
-
- protected function set_additional_file_properties($file) {
- $file->deleteUrl = $this->options['script_url']
- .$this->get_query_separator($this->options['script_url'])
- .$this->get_singular_param_name()
- .'='.rawurlencode($file->name);
- $file->deleteType = $this->options['delete_type'];
- if ($file->deleteType !== 'DELETE') {
- $file->deleteUrl .= '&_method=DELETE';
- }
- if ($this->options['access_control_allow_credentials']) {
- $file->deleteWithCredentials = true;
- }
- }
-
- // Fix for overflowing signed 32 bit integers,
- // works for sizes up to 2^32-1 bytes (4 GiB - 1):
- protected function fix_integer_overflow($size) {
- if ($size < 0) {
- $size += 2.0 * (PHP_INT_MAX + 1);
- }
- return $size;
- }
-
- protected function get_file_size($file_path, $clear_stat_cache = false) {
- if ($clear_stat_cache) {
- if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
- clearstatcache(true, $file_path);
- } else {
- clearstatcache();
- }
- }
- return $this->fix_integer_overflow(filesize($file_path));
- }
-
- protected function is_valid_file_object($file_name) {
- $file_path = $this->get_upload_path($file_name);
- if (is_file($file_path) && $file_name[0] !== '.') {
- return true;
- }
- return false;
- }
-
- protected function get_file_object($file_name) {
- if ($this->is_valid_file_object($file_name)) {
- $file = new \stdClass();
- $file->name = $file_name;
- $file->size = $this->get_file_size(
- $this->get_upload_path($file_name)
- );
- $file->url = $this->get_download_url($file->name);
- foreach ($this->options['image_versions'] as $version => $options) {
- if (!empty($version)) {
- if (is_file($this->get_upload_path($file_name, $version))) {
- $file->{$version.'Url'} = $this->get_download_url(
- $file->name,
- $version
- );
- }
- }
- }
- $this->set_additional_file_properties($file);
- return $file;
- }
- return null;
- }
-
- protected function get_file_objects($iteration_method = 'get_file_object') {
- $upload_dir = $this->get_upload_path();
- if (!is_dir($upload_dir)) {
- return array();
- }
- return array_values(array_filter(array_map(
- array($this, $iteration_method),
- scandir($upload_dir)
- )));
- }
-
- protected function count_file_objects() {
- return count($this->get_file_objects('is_valid_file_object'));
- }
-
- protected function get_error_message($error) {
- return isset($this->error_messages[$error]) ?
- $this->error_messages[$error] : $error;
- }
-
- public function get_config_bytes($val) {
- $val = trim($val);
- $last = strtolower($val[strlen($val)-1]);
- $val = (int)$val;
- switch ($last) {
- case 'g':
- $val *= 1024;
- case 'm':
- $val *= 1024;
- case 'k':
- $val *= 1024;
- }
- return $this->fix_integer_overflow($val);
- }
-
- protected function validate($uploaded_file, $file, $error, $index) {
- if ($error) {
- $file->error = $this->get_error_message($error);
- return false;
- }
- $content_length = $this->fix_integer_overflow(
- (int)$this->get_server_var('CONTENT_LENGTH')
- );
- $post_max_size = $this->get_config_bytes(ini_get('post_max_size'));
- if ($post_max_size && ($content_length > $post_max_size)) {
- $file->error = $this->get_error_message('post_max_size');
- return false;
- }
- if (!preg_match($this->options['accept_file_types'], $file->name)) {
- $file->error = $this->get_error_message('accept_file_types');
- return false;
- }
- if ($uploaded_file && is_uploaded_file($uploaded_file)) {
- $file_size = $this->get_file_size($uploaded_file);
- } else {
- $file_size = $content_length;
- }
- if ($this->options['max_file_size'] && (
- $file_size > $this->options['max_file_size'] ||
- $file->size > $this->options['max_file_size'])
- ) {
- $file->error = $this->get_error_message('max_file_size');
- return false;
- }
- if ($this->options['min_file_size'] &&
- $file_size < $this->options['min_file_size']) {
- $file->error = $this->get_error_message('min_file_size');
- return false;
- }
- if (is_int($this->options['max_number_of_files']) &&
- ($this->count_file_objects() >= $this->options['max_number_of_files']) &&
- // Ignore additional chunks of existing files:
- !is_file($this->get_upload_path($file->name))) {
- $file->error = $this->get_error_message('max_number_of_files');
- return false;
- }
- $max_width = @$this->options['max_width'];
- $max_height = @$this->options['max_height'];
- $min_width = @$this->options['min_width'];
- $min_height = @$this->options['min_height'];
- if (($max_width || $max_height || $min_width || $min_height)
- && preg_match($this->options['image_file_types'], $file->name)) {
- list($img_width, $img_height) = $this->get_image_size($uploaded_file);
-
- // If we are auto rotating the image by default, do the checks on
- // the correct orientation
- if (
- @$this->options['image_versions']['']['auto_orient'] &&
- function_exists('exif_read_data') &&
- ($exif = @exif_read_data($uploaded_file)) &&
- (((int) @$exif['Orientation']) >= 5)
- ) {
- $tmp = $img_width;
- $img_width = $img_height;
- $img_height = $tmp;
- unset($tmp);
- }
-
- }
- if (!empty($img_width)) {
- if ($max_width && $img_width > $max_width) {
- $file->error = $this->get_error_message('max_width');
- return false;
- }
- if ($max_height && $img_height > $max_height) {
- $file->error = $this->get_error_message('max_height');
- return false;
- }
- if ($min_width && $img_width < $min_width) {
- $file->error = $this->get_error_message('min_width');
- return false;
- }
- if ($min_height && $img_height < $min_height) {
- $file->error = $this->get_error_message('min_height');
- return false;
- }
- }
- return true;
- }
-
- protected function upcount_name_callback($matches) {
- $index = isset($matches[1]) ? ((int)$matches[1]) + 1 : 1;
- $ext = isset($matches[2]) ? $matches[2] : '';
- return ' ('.$index.')'.$ext;
- }
-
- protected function upcount_name($name) {
- return preg_replace_callback(
- '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/',
- array($this, 'upcount_name_callback'),
- $name,
- 1
- );
- }
-
- protected function get_unique_filename($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- while(is_dir($this->get_upload_path($name))) {
- $name = $this->upcount_name($name);
- }
- // Keep an existing filename if this is part of a chunked upload:
- $uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]);
- while (is_file($this->get_upload_path($name))) {
- if ($uploaded_bytes === $this->get_file_size(
- $this->get_upload_path($name))) {
- break;
- }
- $name = $this->upcount_name($name);
- }
- return $name;
- }
-
- protected function fix_file_extension($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- // Add missing file extension for known image types:
- if (strpos($name, '.') === false &&
- preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) {
- $name .= '.'.$matches[1];
- }
- if ($this->options['correct_image_extensions'] &&
- function_exists('exif_imagetype')) {
- switch (@exif_imagetype($file_path)){
- case IMAGETYPE_JPEG:
- $extensions = array('jpg', 'jpeg');
- break;
- case IMAGETYPE_PNG:
- $extensions = array('png');
- break;
- case IMAGETYPE_GIF:
- $extensions = array('gif');
- break;
- }
- // Adjust incorrect image file extensions:
- if (!empty($extensions)) {
- $parts = explode('.', $name);
- $extIndex = count($parts) - 1;
- $ext = strtolower(@$parts[$extIndex]);
- if (!in_array($ext, $extensions)) {
- $parts[$extIndex] = $extensions[0];
- $name = implode('.', $parts);
- }
- }
- }
- return $name;
- }
-
- protected function trim_file_name($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- // Remove path information and dots around the filename, to prevent uploading
- // into different directories or replacing hidden system files.
- // Also remove control characters and spaces (\x00..\x20) around the filename:
- $name = trim($this->basename(stripslashes($name)), ".\x00..\x20");
- // Use a timestamp for empty filenames:
- if (!$name) {
- $name = str_replace('.', '-', microtime(true));
- }
- return $name;
- }
-
- protected function get_file_name($file_path, $name, $size, $type, $error,
- $index, $content_range) {
- $name = $this->trim_file_name($file_path, $name, $size, $type, $error,
- $index, $content_range);
- return $this->get_unique_filename(
- $file_path,
- $this->fix_file_extension($file_path, $name, $size, $type, $error,
- $index, $content_range),
- $size,
- $type,
- $error,
- $index,
- $content_range
- );
- }
-
- protected function get_scaled_image_file_paths($file_name, $version) {
- $file_path = $this->get_upload_path($file_name);
- if (!empty($version)) {
- $version_dir = $this->get_upload_path(null, $version);
- if (!is_dir($version_dir)) {
- mkdir($version_dir, $this->options['mkdir_mode'], true);
- }
- $new_file_path = $version_dir.'/'.$file_name;
- } else {
- $new_file_path = $file_path;
- }
- return array($file_path, $new_file_path);
- }
-
- protected function gd_get_image_object($file_path, $func, $no_cache = false) {
- if (empty($this->image_objects[$file_path]) || $no_cache) {
- $this->gd_destroy_image_object($file_path);
- $this->image_objects[$file_path] = $func($file_path);
- }
- return $this->image_objects[$file_path];
- }
-
- protected function gd_set_image_object($file_path, $image) {
- $this->gd_destroy_image_object($file_path);
- $this->image_objects[$file_path] = $image;
- }
-
- protected function gd_destroy_image_object($file_path) {
- $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ;
- return $image && imagedestroy($image);
- }
-
- protected function gd_imageflip($image, $mode) {
- if (function_exists('imageflip')) {
- return imageflip($image, $mode);
- }
- $new_width = $src_width = imagesx($image);
- $new_height = $src_height = imagesy($image);
- $new_img = imagecreatetruecolor($new_width, $new_height);
- $src_x = 0;
- $src_y = 0;
- switch ($mode) {
- case '1': // flip on the horizontal axis
- $src_y = $new_height - 1;
- $src_height = -$new_height;
- break;
- case '2': // flip on the vertical axis
- $src_x = $new_width - 1;
- $src_width = -$new_width;
- break;
- case '3': // flip on both axes
- $src_y = $new_height - 1;
- $src_height = -$new_height;
- $src_x = $new_width - 1;
- $src_width = -$new_width;
- break;
- default:
- return $image;
- }
- imagecopyresampled(
- $new_img,
- $image,
- 0,
- 0,
- $src_x,
- $src_y,
- $new_width,
- $new_height,
- $src_width,
- $src_height
- );
- return $new_img;
- }
-
- protected function gd_orient_image($file_path, $src_img) {
- if (!function_exists('exif_read_data')) {
- return false;
- }
- $exif = @exif_read_data($file_path);
- if ($exif === false) {
- return false;
- }
- $orientation = (int)@$exif['Orientation'];
- if ($orientation < 2 || $orientation > 8) {
- return false;
- }
- switch ($orientation) {
- case 2:
- $new_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2
- );
- break;
- case 3:
- $new_img = imagerotate($src_img, 180, 0);
- break;
- case 4:
- $new_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1
- );
- break;
- case 5:
- $tmp_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1
- );
- $new_img = imagerotate($tmp_img, 270, 0);
- imagedestroy($tmp_img);
- break;
- case 6:
- $new_img = imagerotate($src_img, 270, 0);
- break;
- case 7:
- $tmp_img = $this->gd_imageflip(
- $src_img,
- defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2
- );
- $new_img = imagerotate($tmp_img, 270, 0);
- imagedestroy($tmp_img);
- break;
- case 8:
- $new_img = imagerotate($src_img, 90, 0);
- break;
- default:
- return false;
- }
- $this->gd_set_image_object($file_path, $new_img);
- return true;
- }
-
- protected function gd_create_scaled_image($file_name, $version, $options) {
- if (!function_exists('imagecreatetruecolor')) {
- error_log('Function not found: imagecreatetruecolor');
- return false;
- }
- list($file_path, $new_file_path) =
- $this->get_scaled_image_file_paths($file_name, $version);
- $type = strtolower(substr(strrchr($file_name, '.'), 1));
- switch ($type) {
- case 'jpg':
- case 'jpeg':
- $src_func = 'imagecreatefromjpeg';
- $write_func = 'imagejpeg';
- $image_quality = isset($options['jpeg_quality']) ?
- $options['jpeg_quality'] : 75;
- break;
- case 'gif':
- $src_func = 'imagecreatefromgif';
- $write_func = 'imagegif';
- $image_quality = null;
- break;
- case 'png':
- $src_func = 'imagecreatefrompng';
- $write_func = 'imagepng';
- $image_quality = isset($options['png_quality']) ?
- $options['png_quality'] : 9;
- break;
- default:
- return false;
- }
- $src_img = $this->gd_get_image_object(
- $file_path,
- $src_func,
- !empty($options['no_cache'])
- );
- $image_oriented = false;
- if (!empty($options['auto_orient']) && $this->gd_orient_image(
- $file_path,
- $src_img
- )) {
- $image_oriented = true;
- $src_img = $this->gd_get_image_object(
- $file_path,
- $src_func
- );
- }
- $max_width = $img_width = imagesx($src_img);
- $max_height = $img_height = imagesy($src_img);
- if (!empty($options['max_width'])) {
- $max_width = $options['max_width'];
- }
- if (!empty($options['max_height'])) {
- $max_height = $options['max_height'];
- }
- $scale = min(
- $max_width / $img_width,
- $max_height / $img_height
- );
- if ($scale >= 1) {
- if ($image_oriented) {
- return $write_func($src_img, $new_file_path, $image_quality);
- }
- if ($file_path !== $new_file_path) {
- return copy($file_path, $new_file_path);
- }
- return true;
- }
- if (empty($options['crop'])) {
- $new_width = $img_width * $scale;
- $new_height = $img_height * $scale;
- $dst_x = 0;
- $dst_y = 0;
- $new_img = imagecreatetruecolor($new_width, $new_height);
- } else {
- if (($img_width / $img_height) >= ($max_width / $max_height)) {
- $new_width = $img_width / ($img_height / $max_height);
- $new_height = $max_height;
- } else {
- $new_width = $max_width;
- $new_height = $img_height / ($img_width / $max_width);
- }
- $dst_x = 0 - ($new_width - $max_width) / 2;
- $dst_y = 0 - ($new_height - $max_height) / 2;
- $new_img = imagecreatetruecolor($max_width, $max_height);
- }
- // Handle transparency in GIF and PNG images:
- switch ($type) {
- case 'gif':
- case 'png':
- imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
- case 'png':
- imagealphablending($new_img, false);
- imagesavealpha($new_img, true);
- break;
- }
- $success = imagecopyresampled(
- $new_img,
- $src_img,
- $dst_x,
- $dst_y,
- 0,
- 0,
- $new_width,
- $new_height,
- $img_width,
- $img_height
- ) && $write_func($new_img, $new_file_path, $image_quality);
- $this->gd_set_image_object($file_path, $new_img);
- return $success;
- }
-
- protected function imagick_get_image_object($file_path, $no_cache = false) {
- if (empty($this->image_objects[$file_path]) || $no_cache) {
- $this->imagick_destroy_image_object($file_path);
- $image = new \Imagick();
- if (!empty($this->options['imagick_resource_limits'])) {
- foreach ($this->options['imagick_resource_limits'] as $type => $limit) {
- $image->setResourceLimit($type, $limit);
- }
- }
- $image->readImage($file_path);
- $this->image_objects[$file_path] = $image;
- }
- return $this->image_objects[$file_path];
- }
-
- protected function imagick_set_image_object($file_path, $image) {
- $this->imagick_destroy_image_object($file_path);
- $this->image_objects[$file_path] = $image;
- }
-
- protected function imagick_destroy_image_object($file_path) {
- $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ;
- return $image && $image->destroy();
- }
-
- protected function imagick_orient_image($image) {
- $orientation = $image->getImageOrientation();
- $background = new \ImagickPixel('none');
- switch ($orientation) {
- case \imagick::ORIENTATION_TOPRIGHT: // 2
- $image->flopImage(); // horizontal flop around y-axis
- break;
- case \imagick::ORIENTATION_BOTTOMRIGHT: // 3
- $image->rotateImage($background, 180);
- break;
- case \imagick::ORIENTATION_BOTTOMLEFT: // 4
- $image->flipImage(); // vertical flip around x-axis
- break;
- case \imagick::ORIENTATION_LEFTTOP: // 5
- $image->flopImage(); // horizontal flop around y-axis
- $image->rotateImage($background, 270);
- break;
- case \imagick::ORIENTATION_RIGHTTOP: // 6
- $image->rotateImage($background, 90);
- break;
- case \imagick::ORIENTATION_RIGHTBOTTOM: // 7
- $image->flipImage(); // vertical flip around x-axis
- $image->rotateImage($background, 270);
- break;
- case \imagick::ORIENTATION_LEFTBOTTOM: // 8
- $image->rotateImage($background, 270);
- break;
- default:
- return false;
- }
- $image->setImageOrientation(\imagick::ORIENTATION_TOPLEFT); // 1
- return true;
- }
-
- protected function imagick_create_scaled_image($file_name, $version, $options) {
- list($file_path, $new_file_path) =
- $this->get_scaled_image_file_paths($file_name, $version);
- $image = $this->imagick_get_image_object(
- $file_path,
- !empty($options['crop']) || !empty($options['no_cache'])
- );
- if ($image->getImageFormat() === 'GIF') {
- // Handle animated GIFs:
- $images = $image->coalesceImages();
- foreach ($images as $frame) {
- $image = $frame;
- $this->imagick_set_image_object($file_name, $image);
- break;
- }
- }
- $image_oriented = false;
- if (!empty($options['auto_orient'])) {
- $image_oriented = $this->imagick_orient_image($image);
- }
- $new_width = $max_width = $img_width = $image->getImageWidth();
- $new_height = $max_height = $img_height = $image->getImageHeight();
- if (!empty($options['max_width'])) {
- $new_width = $max_width = $options['max_width'];
- }
- if (!empty($options['max_height'])) {
- $new_height = $max_height = $options['max_height'];
- }
- $image_strip = false;
- if( !empty($options["strip"]) ) {
- $image_strip = $options["strip"];
- }
- if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) {
- if ($file_path !== $new_file_path) {
- return copy($file_path, $new_file_path);
- }
- return true;
- }
- $crop = !empty($options['crop']);
- if ($crop) {
- $x = 0;
- $y = 0;
- if (($img_width / $img_height) >= ($max_width / $max_height)) {
- $new_width = 0; // Enables proportional scaling based on max_height
- $x = ($img_width / ($img_height / $max_height) - $max_width) / 2;
- } else {
- $new_height = 0; // Enables proportional scaling based on max_width
- $y = ($img_height / ($img_width / $max_width) - $max_height) / 2;
- }
- }
- $success = $image->resizeImage(
- $new_width,
- $new_height,
- isset($options['filter']) ? $options['filter'] : \imagick::FILTER_LANCZOS,
- isset($options['blur']) ? $options['blur'] : 1,
- $new_width && $new_height // fit image into constraints if not to be cropped
- );
- if ($success && $crop) {
- $success = $image->cropImage(
- $max_width,
- $max_height,
- $x,
- $y
- );
- if ($success) {
- $success = $image->setImagePage($max_width, $max_height, 0, 0);
- }
- }
- $type = strtolower(substr(strrchr($file_name, '.'), 1));
- switch ($type) {
- case 'jpg':
- case 'jpeg':
- if (!empty($options['jpeg_quality'])) {
- $image->setImageCompression(\imagick::COMPRESSION_JPEG);
- $image->setImageCompressionQuality($options['jpeg_quality']);
- }
- break;
- }
- if ( $image_strip ) {
- $image->stripImage();
- }
- return $success && $image->writeImage($new_file_path);
- }
-
- protected function imagemagick_create_scaled_image($file_name, $version, $options) {
- list($file_path, $new_file_path) =
- $this->get_scaled_image_file_paths($file_name, $version);
- $resize = @$options['max_width']
- .(empty($options['max_height']) ? '' : 'X'.$options['max_height']);
- if (!$resize && empty($options['auto_orient'])) {
- if ($file_path !== $new_file_path) {
- return copy($file_path, $new_file_path);
- }
- return true;
- }
- $cmd = $this->options['convert_bin'];
- if (!empty($this->options['convert_params'])) {
- $cmd .= ' '.$this->options['convert_params'];
- }
- $cmd .= ' '.escapeshellarg($file_path);
- if (!empty($options['auto_orient'])) {
- $cmd .= ' -auto-orient';
- }
- if ($resize) {
- // Handle animated GIFs:
- $cmd .= ' -coalesce';
- if (empty($options['crop'])) {
- $cmd .= ' -resize '.escapeshellarg($resize.'>');
- } else {
- $cmd .= ' -resize '.escapeshellarg($resize.'^');
- $cmd .= ' -gravity center';
- $cmd .= ' -crop '.escapeshellarg($resize.'+0+0');
- }
- // Make sure the page dimensions are correct (fixes offsets of animated GIFs):
- $cmd .= ' +repage';
- }
- if (!empty($options['convert_params'])) {
- $cmd .= ' '.$options['convert_params'];
- }
- $cmd .= ' '.escapeshellarg($new_file_path);
- exec($cmd, $output, $error);
- if ($error) {
- error_log(implode('\n', $output));
- return false;
- }
- return true;
- }
-
- protected function get_image_size($file_path) {
- if ($this->options['image_library']) {
- if (extension_loaded('imagick')) {
- $image = new \Imagick();
- try {
- if (@$image->pingImage($file_path)) {
- $dimensions = array($image->getImageWidth(), $image->getImageHeight());
- $image->destroy();
- return $dimensions;
- }
- return false;
- } catch (\Exception $e) {
- error_log($e->getMessage());
- }
- }
- if ($this->options['image_library'] === 2) {
- $cmd = $this->options['identify_bin'];
- $cmd .= ' -ping '.escapeshellarg($file_path);
- exec($cmd, $output, $error);
- if (!$error && !empty($output)) {
- // image.jpg JPEG 1920x1080 1920x1080+0+0 8-bit sRGB 465KB 0.000u 0:00.000
- $infos = preg_split('/\s+/', substr($output[0], strlen($file_path)));
- $dimensions = preg_split('/x/', $infos[2]);
- return $dimensions;
- }
- return false;
- }
- }
- if (!function_exists('getimagesize')) {
- error_log('Function not found: getimagesize');
- return false;
- }
- return @getimagesize($file_path);
- }
-
- protected function create_scaled_image($file_name, $version, $options) {
- if ($this->options['image_library'] === 2) {
- return $this->imagemagick_create_scaled_image($file_name, $version, $options);
- }
- if ($this->options['image_library'] && extension_loaded('imagick')) {
- return $this->imagick_create_scaled_image($file_name, $version, $options);
- }
- return $this->gd_create_scaled_image($file_name, $version, $options);
- }
-
- protected function destroy_image_object($file_path) {
- if ($this->options['image_library'] && extension_loaded('imagick')) {
- return $this->imagick_destroy_image_object($file_path);
- }
- }
-
- protected function is_valid_image_file($file_path) {
- if (!preg_match($this->options['image_file_types'], $file_path)) {
- return false;
- }
- if (function_exists('exif_imagetype')) {
- return @exif_imagetype($file_path);
- }
- $image_info = $this->get_image_size($file_path);
- return $image_info && $image_info[0] && $image_info[1];
- }
-
- protected function handle_image_file($file_path, $file) {
- $failed_versions = array();
- foreach ($this->options['image_versions'] as $version => $options) {
- if ($this->create_scaled_image($file->name, $version, $options)) {
- if (!empty($version)) {
- $file->{$version.'Url'} = $this->get_download_url(
- $file->name,
- $version
- );
- } else {
- $file->size = $this->get_file_size($file_path, true);
- }
- } else {
- $failed_versions[] = $version ? $version : 'original';
- }
- }
- if (count($failed_versions)) {
- $file->error = $this->get_error_message('image_resize')
- .' ('.implode($failed_versions, ', ').')';
- }
- // Free memory:
- $this->destroy_image_object($file_path);
- }
-
- protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) {
- $file = new \stdClass();
- $file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error,
- $index, $content_range);
- $file->size = $this->fix_integer_overflow((int)$size);
- $file->type = $type;
- if ($this->validate($uploaded_file, $file, $error, $index)) {
- $this->handle_form_data($file, $index);
- $upload_dir = $this->get_upload_path();
- if (!$this->options['ftp'] && !is_dir($upload_dir)) {
- mkdir($upload_dir, $this->options['mkdir_mode'], true);
- }
- $file_path = $this->get_upload_path($file->name);
- $append_file = $content_range && is_file($file_path) &&
- $file->size > $this->get_file_size($file_path);
- if ($uploaded_file && is_uploaded_file($uploaded_file)) {
- // multipart/formdata uploads (POST method uploads)
- if ($append_file) {
- file_put_contents(
- $file_path,
- fopen($uploaded_file, 'r'),
- FILE_APPEND
- );
- } else {
- move_uploaded_file($uploaded_file, $file_path);
- }
- } else {
- if($this->get_file_size($uploaded_file) == $file->size){
- copy($uploaded_file, $file_path);
- }else{
-
- // Non-multipart uploads (PUT method support)
- file_put_contents(
- $file_path,
- fopen($this->options['input_stream'], 'r'),
- $append_file ? FILE_APPEND : 0
- );
- }
- }
- $file_size = $this->get_file_size($file_path, $append_file);
- $file->path = $file_path;
- if ($file_size === $file->size) {
- $file->url = $this->get_download_url($file->name);
- if ($this->is_valid_image_file($file_path)) {
- $this->handle_image_file($file_path, $file);
- }
- } else {
- $file->size = $file_size;
- if (!$content_range && $this->options['discard_aborted_uploads']) {
- unlink($file_path);
- $file->error = $this->get_error_message('abort');
- }
- }
- $this->set_additional_file_properties($file);
- }
- return $file;
- }
-
- protected function readfile($file_path) {
- $file_size = $this->get_file_size($file_path);
- $chunk_size = $this->options['readfile_chunk_size'];
- if ($chunk_size && $file_size > $chunk_size) {
- $handle = fopen($file_path, 'rb');
- while (!feof($handle)) {
- echo fread($handle, $chunk_size);
- @ob_flush();
- @flush();
- }
- fclose($handle);
- return $file_size;
- }
- return readfile($file_path);
- }
-
- protected function body($str) {
- echo $str;
- }
-
- protected function header($str) {
- header($str);
- }
-
- protected function get_upload_data($id) {
- return @$_FILES[$id];
- }
-
- protected function get_post_param($id) {
- return @$_POST[$id];
- }
-
- protected function get_query_param($id) {
- return @$_GET[$id];
- }
-
- protected function get_server_var($id) {
- return @$_SERVER[$id];
- }
-
- protected function handle_form_data($file, $index) {
- // Handle form data, e.g. $_POST['description'][$index]
- }
-
- protected function get_version_param() {
- return $this->basename(stripslashes($this->get_query_param('version')));
- }
-
- protected function get_singular_param_name() {
- return substr($this->options['param_name'], 0, -1);
- }
-
- protected function get_file_name_param() {
- $name = $this->get_singular_param_name();
- return $this->basename(stripslashes($this->get_query_param($name)));
- }
-
- protected function get_file_names_params() {
- $params = $this->get_query_param($this->options['param_name']);
- if (!$params) {
- return null;
- }
- foreach ($params as $key => $value) {
- $params[$key] = $this->basename(stripslashes($value));
- }
- return $params;
- }
-
- protected function get_file_type($file_path) {
- switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) {
- case 'jpeg':
- case 'jpg':
- return 'image/jpeg';
- case 'png':
- return 'image/png';
- case 'gif':
- return 'image/gif';
- default:
- return '';
- }
- }
-
- protected function download() {
- switch ($this->options['download_via_php']) {
- case 1:
- $redirect_header = null;
- break;
- case 2:
- $redirect_header = 'X-Sendfile';
- break;
- case 3:
- $redirect_header = 'X-Accel-Redirect';
- break;
- default:
- return $this->header('HTTP/1.1 403 Forbidden');
- }
- $file_name = $this->get_file_name_param();
- if (!$this->is_valid_file_object($file_name)) {
- return $this->header('HTTP/1.1 404 Not Found');
- }
- if ($redirect_header) {
- return $this->header(
- $redirect_header.': '.$this->get_download_url(
- $file_name,
- $this->get_version_param(),
- true
- )
- );
- }
- $file_path = $this->get_upload_path($file_name, $this->get_version_param());
- // Prevent browsers from MIME-sniffing the content-type:
- $this->header('X-Content-Type-Options: nosniff');
- if (!preg_match($this->options['inline_file_types'], $file_name)) {
- $this->header('Content-Type: application/octet-stream');
- $this->header('Content-Disposition: attachment; filename="'.$file_name.'"');
- } else {
- $this->header('Content-Type: '.$this->get_file_type($file_path));
- $this->header('Content-Disposition: inline; filename="'.$file_name.'"');
- }
- $this->header('Content-Length: '.$this->get_file_size($file_path));
- $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path)));
- $this->readfile($file_path);
- }
-
- protected function send_content_type_header() {
- $this->header('Vary: Accept');
- if (strpos($this->get_server_var('HTTP_ACCEPT'), 'application/json') !== false) {
- $this->header('Content-type: application/json');
- } else {
- $this->header('Content-type: text/plain');
- }
- }
-
- protected function send_access_control_headers() {
- $this->header('Access-Control-Allow-Origin: '.$this->options['access_control_allow_origin']);
- $this->header('Access-Control-Allow-Credentials: '
- .($this->options['access_control_allow_credentials'] ? 'true' : 'false'));
- $this->header('Access-Control-Allow-Methods: '
- .implode(', ', $this->options['access_control_allow_methods']));
- $this->header('Access-Control-Allow-Headers: '
- .implode(', ', $this->options['access_control_allow_headers']));
- }
-
- public function generate_response($content, $print_response = true) {
- $this->response = $content;
- if ($print_response) {
- $json = json_encode($content);
- $redirect = stripslashes($this->get_post_param('redirect'));
- if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) {
- $this->header('Location: '.sprintf($redirect, rawurlencode($json)));
- return;
- }
- $this->head();
- if ($this->get_server_var('HTTP_CONTENT_RANGE')) {
- $files = isset($content[$this->options['param_name']]) ?
- $content[$this->options['param_name']] : null;
- if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) {
- $this->header('Range: 0-'.(
- $this->fix_integer_overflow((int)$files[0]->size) - 1
- ));
- }
- }
- $this->body($json);
- }
- return $content;
- }
-
- public function get_response () {
- return $this->response;
- }
-
- public function head() {
- $this->header('Pragma: no-cache');
- $this->header('Cache-Control: no-store, no-cache, must-revalidate');
- $this->header('Content-Disposition: inline; filename="files.json"');
- // Prevent Internet Explorer from MIME-sniffing the content-type:
- $this->header('X-Content-Type-Options: nosniff');
- if ($this->options['access_control_allow_origin']) {
- $this->send_access_control_headers();
- }
- $this->send_content_type_header();
- }
-
- public function get($print_response = true) {
- if ($print_response && $this->get_query_param('download')) {
- return $this->download();
- }
- $file_name = $this->get_file_name_param();
- if ($file_name) {
- $response = array(
- $this->get_singular_param_name() => $this->get_file_object($file_name)
- );
- } else {
- $response = array(
- $this->options['param_name'] => $this->get_file_objects()
- );
- }
-
- return $this->generate_response($response, $print_response);
- }
-
- public function post($print_response = true) {
- if ($this->get_query_param('_method') === 'DELETE') {
- return $this->delete($print_response);
- }
- $upload = $this->get_upload_data($this->options['param_name']);
- // Parse the Content-Disposition header, if available:
- $content_disposition_header = $this->get_server_var('HTTP_CONTENT_DISPOSITION');
- $file_name = $content_disposition_header ?
- rawurldecode(preg_replace(
- '/(^[^"]+")|("$)/',
- '',
- $content_disposition_header
- )) : null;
- // Parse the Content-Range header, which has the following form:
- // Content-Range: bytes 0-524287/2000000
- $content_range_header = $this->get_server_var('HTTP_CONTENT_RANGE');
- $content_range = $content_range_header ?
- preg_split('/[^0-9]+/', $content_range_header) : null;
- $size = $content_range ? $content_range[3] : null;
- $files = array();
- if ($upload) {
- if (is_array($upload['tmp_name'])) {
- // param_name is an array identifier like "files[]",
- // $upload is a multi-dimensional array:
- foreach ($upload['tmp_name'] as $index => $value) {
- if(!isset($upload['error'][$index])){
- $upload['error'][$index] = null;
- }
- $files[] = $this->handle_file_upload(
- $upload['tmp_name'][$index],
- $file_name ? $file_name : $upload['name'][$index],
- $size ? $size : $upload['size'][$index],
- $upload['type'][$index],
- $upload['error'][$index],
- $index,
- $content_range
- );
- }
- } else {
- // param_name is a single object identifier like "file",
- // $upload is a one-dimensional array:
- $files[] = $this->handle_file_upload(
- isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
- $file_name ? $file_name : (isset($upload['name']) ?
- $upload['name'] : null),
- $size ? $size : (isset($upload['size']) ?
- $upload['size'] : $this->get_server_var('CONTENT_LENGTH')),
- isset($upload['type']) ?
- $upload['type'] : $this->get_server_var('CONTENT_TYPE'),
- isset($upload['error']) ? $upload['error'] : null,
- null,
- $content_range
- );
- }
- }
- $response = array($this->options['param_name'] => $files);
- $name = $file_name ? $file_name : $upload['name'][0];
- $res = $this->generate_response($response, $print_response);
- if(is_file($this->get_upload_path($name))){
- $uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]);
- $totalSize = $this->get_file_size($this->get_upload_path($name));
- if ($totalSize - $uploaded_bytes - $this->options['readfile_chunk_size'] < 0) {
- $this->onUploadEnd($res);
- }else{
- $this->head();
- $this->body(json_encode($res));
- }
- }else{
- $this->head();
- $this->body(json_encode($res));
- }
- return $res;
- }
-
- public function onUploadEnd ($res){
- $targetPath = $this->options['storeFolder'];
- $targetPathThumb = $this->options['storeFolderThumb'];
-
- if(!$this->options['ftp']){
- $targetFile = $targetPath. $res['files'][0]->name;
- $targetFileThumb = $targetPathThumb. $res['files'][0]->name;
- if (!is_dir($targetPathThumb)) {
- mkdir($targetPathThumb, $this->options['mkdir_mode'], true);
- }
- if(is_file($targetFile)) {
- chmod($targetFile, $this->options['config']['filePermission']);
- }else{
- chmod($targetFile, $this->options['config']['folderPermission']);
- }
- }else{
- $targetFile = $this->options['config']['ftp_temp_folder'].$res['files'][0]->name;
- $targetFileThumb = $this->options['config']['ftp_temp_folder']."thumbs/". $res['files'][0]->name;
- }
-
- //check if image (and supported)
- $is_img = FALSE;
- if ($this->is_valid_image_file($targetFile)){
- $is_img = TRUE;
- }
-
- if ($is_img)
- {
- if(isset($this->options['config']['image_watermark']) && $this->options['config']['image_watermark']){
- require_once('include/php_image_magician.php');
-
- $magicianObj = new imageLib($targetFile);
- $magicianObj -> addWatermark($this->options['config']['image_watermark'], $this->options['config']['image_watermark_position'], $this->options['config']['image_watermark_padding']);
-
- $magicianObj -> saveImage($targetFile);
- }
-
- $thumbResult = create_img($targetFile, $targetFileThumb, 122, 91);
-
- if ( $thumbResult!==true)
- {
- if($thumbResult === false){
- $res['files'][0]->error = trans("Not enough Memory");
- }else{
- $res['files'][0]->error = $thumbResult;
- }
- }
- else
- {
- if( !$this->options['ftp'] && ! new_thumbnails_creation($targetPath,$targetFile,$_FILES['files']['name'][0],$this->options['config']['current_path'],$this->options['config']))
- {
- $res['files'][0]->error = trans("Not enough Memory");
- }
- else
- {
- $imginfo = getimagesize($targetFile);
- $srcWidth = $imginfo[0];
- $srcHeight = $imginfo[1];
-
- // resize images if set
- if ($this->options['config']['image_resizing'])
- {
- if ($this->options['config']['image_resizing_width'] == 0) // if width not set
- {
- if ($this->options['config']['image_resizing_height'] == 0)
- {
- $this->options['config']['image_resizing_width'] = $srcWidth;
- $this->options['config']['image_resizing_height'] = $srcHeight;
- }
- else
- {
- $this->options['config']['image_resizing_width'] = $this->options['config']['image_resizing_height']*$srcWidth/$srcHeight;
- }
- }
- elseif ($this->options['config']['image_resizing_height'] == 0) // if height not set
- {
- $this->options['config']['image_resizing_height'] = $this->options['config']['image_resizing_width']*$srcHeight/$srcWidth;
- }
-
- // new dims and create
- $srcWidth = $this->options['config']['image_resizing_width'];
- $srcHeight = $this->options['config']['image_resizing_height'];
- create_img($targetFile, $targetFile, $this->options['config']['image_resizing_width'], $this->options['config']['image_resizing_height'], $this->options['config']['image_resizing_mode']);
- }
-
- //max resizing limit control
- $resize = FALSE;
- if ($this->options['config']['image_max_width'] != 0 && $srcWidth > $this->options['config']['image_max_width'] && $this->options['config']['image_resizing_override'] === FALSE)
- {
- $resize = TRUE;
- $srcWidth = $this->options['config']['image_max_width'];
-
- if ($this->options['config']['image_max_height'] == 0) $srcHeight = $this->options['config']['image_max_width']*$srcHeight/$srcWidth;
- }
-
- if ($this->options['config']['image_max_height'] != 0 && $srcHeight > $this->options['config']['image_max_height'] && $this->options['config']['image_resizing_override'] === FALSE){
- $resize = TRUE;
- $srcHeight = $this->options['config']['image_max_height'];
-
- if ($this->options['config']['image_max_width'] == 0) $srcWidth = $this->options['config']['image_max_height']*$srcWidth/$srcHeight;
- }
-
- if ($resize){ create_img($targetFile, $targetFile, $srcWidth, $srcHeight, $this->options['config']['image_max_mode']); }
- }
- }
- }
-
- if($this->options['ftp']){
-
- $this->options['ftp']->put($targetPath. $res['files'][0]->name, $targetFile, FTP_BINARY);
- unlink($targetFile);
- if ($is_img)
- {
- $this->options['ftp']->put($targetPathThumb. $res['files'][0]->name, $targetFileThumb, FTP_BINARY);
- unlink($targetFileThumb);
- }
- }
- $this->head();
- $this->body(json_encode($res));
- }
-
- public function delete($print_response = true) {
- $file_names = $this->get_file_names_params();
- if (empty($file_names)) {
- $file_names = array($this->get_file_name_param());
- }
- $response = array();
- foreach ($file_names as $file_name) {
- $file_path = $this->get_upload_path($file_name);
- $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path);
- if ($success) {
- foreach ($this->options['image_versions'] as $version => $options) {
- if (!empty($version)) {
- $file = $this->get_upload_path($file_name, $version);
- if (is_file($file)) {
- unlink($file);
- }
- }
- }
- }
- $response[$file_name] = $success;
- }
- return $this->generate_response($response, $print_response);
- }
-
- protected function basename($filepath, $suffix = null) {
- $splited = preg_split('/\//', rtrim ($filepath, '/ '));
- return substr(basename('X'.$splited[count($splited)-1], $suffix), 1);
- }
-}
diff --git a/libraries/filemanager-9.12.1/ajax_calls.php b/libraries/filemanager-9.12.1/ajax_calls.php
deleted file mode 100644
index 025d5cf..0000000
--- a/libraries/filemanager-9.12.1/ajax_calls.php
+++ /dev/null
@@ -1,703 +0,0 @@
-send();
- exit;
-}
-$languages = include 'lang/languages.php';
-
-if (isset($_SESSION['RF']['language']) && file_exists('lang/' . basename($_SESSION['RF']['language']) . '.php'))
-{
- if(array_key_exists($_SESSION['RF']['language'],$languages)){
- include 'lang/' . basename($_SESSION['RF']['language']) . '.php';
- }else{
- response(trans('Lang_Not_Found').AddErrorLocation())->send();
- exit;
- }
-} else {
- response(trans('Lang_Not_Found').AddErrorLocation())->send();
- exit;
-}
-$ftp = ftp_con($config);
-
-if(isset($_GET['action']))
-{
- switch($_GET['action'])
- {
- case 'new_file_form':
- echo trans('Filename') . ':
'.$data.'';
- } else {
- $ret .= ''.$data.''; - } - - } - elseif ($preview_mode == 'google') { - if($ftp){ - $url_file = $selected_file; - }else{ - $url_file = $base_url . $upload_dir . str_replace($current_path, '', $_GET["file"]); - } - - $googledoc_url = urlencode($url_file); - $googledoc_html = ""; - $ret = $googledoc_html; - } - } else { - $data = stripslashes(htmlspecialchars(file_get_contents($selected_file))); - $ret = ''; - } - - response($ret)->send(); - exit; - - break; - default: - response(trans('no action passed').AddErrorLocation())->send(); - exit; - } -} else { - response(trans('no action passed').AddErrorLocation())->send(); - exit; -} -?> \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/config/.htaccess b/libraries/filemanager-9.12.1/config/.htaccess deleted file mode 100644 index 14249c5..0000000 --- a/libraries/filemanager-9.12.1/config/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/config/config.php b/libraries/filemanager-9.12.1/config/config.php deleted file mode 100644 index 5c22119..0000000 --- a/libraries/filemanager-9.12.1/config/config.php +++ /dev/null @@ -1,450 +0,0 @@ - -| in tinymce a new parameter added: filemanager_access_key:"myPrivateKey" -| example tinymce config: -| -| tiny init ... -| external_filemanager_path:"../filemanager/", -| filemanager_title:"Filemanager" , -| filemanager_access_key:"myPrivateKey" , -| ... -| -*/ - -define('USE_ACCESS_KEYS', false); // TRUE or FALSE - -/* -|-------------------------------------------------------------------------- -| DON'T COPY THIS VARIABLES IN FOLDERS config.php FILES -|-------------------------------------------------------------------------- -*/ - -define('DEBUG_ERROR_MESSAGE', true); // TRUE or FALSE - -/* -|-------------------------------------------------------------------------- -| Path configuration -|-------------------------------------------------------------------------- -| In this configuration the folder tree is -| root -| |- source <- upload folder -| |- thumbs <- thumbnail folder [must have write permission (755)] -| |- filemanager -| |- js -| | |- tinymce -| | | |- plugins -| | | | |- responsivefilemanager -| | | | | |- plugin.min.js -*/ - -$config = array( - - /* - |-------------------------------------------------------------------------- - | DON'T TOUCH (base url (only domain) of site). - |-------------------------------------------------------------------------- - | - | without final / (DON'T TOUCH) - | - */ - 'base_url' => '', //((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"). "://". @$_SERVER['HTTP_HOST'], - /* - |-------------------------------------------------------------------------- - | path from base_url to base of upload folder - |-------------------------------------------------------------------------- - | - | with start and final / - | - */ - 'upload_dir' => '/upload/filemanager/', - /* - |-------------------------------------------------------------------------- - | relative path from filemanager folder to upload folder - |-------------------------------------------------------------------------- - | - | with final / - | - */ - 'current_path' => '../../upload/filemanager/', - - /* - |-------------------------------------------------------------------------- - | relative path from filemanager folder to thumbs folder - |-------------------------------------------------------------------------- - | - | with final / - | DO NOT put inside upload folder - | - */ - 'thumbs_base_path' => '../../temp/', - - - /* - |-------------------------------------------------------------------------- - | FTP configuration BETA VERSION - |-------------------------------------------------------------------------- - | - | If you want enable ftp use write these parametres otherwise leave empty - | Remember to set base_url properly to point in the ftp server domain and - | upload dir will be ftp_base_folder + upload_dir so without final / - | - */ - 'ftp_host' => false, //put the FTP host - 'ftp_user' => "user", - 'ftp_pass' => "pass", - 'ftp_base_folder' => "base_folder", - 'ftp_base_url' => "http://site to ftp root", - // Directory where place files before to send to FTP with final / - 'ftp_temp_folder' => "../temp/", - /* - |--------------------------------------------------------------------------- - | path from ftp_base_folder to base of thumbs folder with start and final / - |--------------------------------------------------------------------------- - */ - 'ftp_thumbs_dir' => '/thumbs/', - 'ftp_ssl' => false, - 'ftp_port' => 21, - - /* EXAMPLE - 'ftp_host' => "host.com", - 'ftp_user' => "test@host.com", - 'ftp_pass' => "pass.1", - 'ftp_base_folder' => "", - 'ftp_base_url' => "http://host.com/testFTP", - */ - - - /* - |-------------------------------------------------------------------------- - | Access keys - |-------------------------------------------------------------------------- - | - | add access keys eg: array('myPrivateKey', 'someoneElseKey'); - | keys should only containt (a-z A-Z 0-9 \ . _ -) characters - | if you are integrating lets say to a cms for admins, i recommend making keys randomized something like this: - | $username = 'Admin'; - | $salt = 'dsflFWR9u2xQa' (a hard coded string) - | $akey = md5($username.$salt); - | DO NOT use 'key' as access key! - | Keys are CASE SENSITIVE! - | - */ - - 'access_keys' => array( 'c3cb2537d25c0efc9e573d059d79c3b8' ), - - //-------------------------------------------------------------------------------------------------------- - // YOU CAN COPY AND CHANGE THESE VARIABLES INTO FOLDERS config.php FILES TO CUSTOMIZE EACH FOLDER OPTIONS - //-------------------------------------------------------------------------------------------------------- - - /* - |-------------------------------------------------------------------------- - | Maximum size of all files in source folder - |-------------------------------------------------------------------------- - | - | in Megabytes - | - */ - 'MaxSizeTotal' => true, - - /* - |-------------------------------------------------------------------------- - | Maximum upload size - |-------------------------------------------------------------------------- - | - | in Megabytes - | - */ - 'MaxSizeUpload' => 100, - - /* - |-------------------------------------------------------------------------- - | File and Folder permission - |-------------------------------------------------------------------------- - | - */ - 'filePermission' => 0755, - 'folderPermission' => 0777, - - - /* - |-------------------------------------------------------------------------- - | default language file name - |-------------------------------------------------------------------------- - */ - 'default_language' => "pl", - - /* - |-------------------------------------------------------------------------- - | Icon theme - |-------------------------------------------------------------------------- - | - | Default available: ico and ico_dark - | Can be set to custom icon inside filemanager/img - | - */ - 'icon_theme' => "ico", - - - //Show or not total size in filemanager (is possible to greatly increase the calculations) - 'show_total_size' => false, - //Show or not show folder size in list view feature in filemanager (is possible, if there is a large folder, to greatly increase the calculations) - 'show_folder_size' => false, - //Show or not show sorting feature in filemanager - 'show_sorting_bar' => true, - //Show or not show filters button in filemanager - 'show_filter_buttons' => true, - //Show or not language selection feature in filemanager - 'show_language_selection' => true, - //active or deactive the transliteration (mean convert all strange characters in A..Za..z0..9 characters) - 'transliteration' => true, - //convert all spaces on files name and folders name with $replace_with variable - 'convert_spaces' => true, - //convert all spaces on files name and folders name this value - 'replace_with' => "-", - //convert to lowercase the files and folders name - 'lower_case' => true, - - //Add ?484899493349 (time value) to returned images to prevent cache - 'add_time_to_img' => false, - - - //******************************************* - //Images limit and resizing configuration - //******************************************* - - // set maximum pixel width and/or maximum pixel height for all images - // If you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected - // if you don't need a limit set both to 0 - 'image_max_width' => 1920, - 'image_max_height' => 1080, - 'image_max_mode' => 'auto', - /* - # $option: 0 / exact = defined size; - # 1 / portrait = keep aspect set height; - # 2 / landscape = keep aspect set width; - # 3 / auto = auto; - # 4 / crop= resize and crop; - */ - - //Automatic resizing // - // If you set $image_resizing to TRUE the script converts all uploaded images exactly to image_resizing_width x image_resizing_height dimension - // If you set width or height to 0 the script automatically calculates the other dimension - // Is possible that if you upload very big images the script not work to overcome this increase the php configuration of memory and time limit - 'image_resizing' => true, - 'image_resizing_width' => 0, - 'image_resizing_height' => 0, - 'image_resizing_mode' => 'auto', // same as $image_max_mode - 'image_resizing_override' => false, - // If set to TRUE then you can specify bigger images than $image_max_width & height otherwise if image_resizing is - // bigger than $image_max_width or height then it will be converted to those values - - - //****************** - // - // WATERMARK IMAGE - // - //Watermark url or false - 'image_watermark' => false, - # Could be a pre-determined position such as: - # tl = top left, - # t = top (middle), - # tr = top right, - # l = left, - # m = middle, - # r = right, - # bl = bottom left, - # b = bottom (middle), - # br = bottom right - # Or, it could be a co-ordinate position such as: 50x100 - 'image_watermark_position' => 'br', - # padding: If using a pre-determined position you can - # adjust the padding from the edges by passing an amount - # in pixels. If using co-ordinates, this value is ignored. - 'image_watermark_padding' => 0, - - //****************** - // Default layout setting - // - // 0 => boxes - // 1 => detailed list (1 column) - // 2 => columns list (multiple columns depending on the width of the page) - // YOU CAN ALSO PASS THIS PARAMETERS USING SESSION VAR => $_SESSION['RF']["VIEW"]= - // - //****************** - 'default_view' => 0, - - //set if the filename is truncated when overflow first row - 'ellipsis_title_after_first_row' => true, - - //************************* - //Permissions configuration - //****************** - 'delete_files' => true, - 'create_folders' => true, - 'delete_folders' => true, - 'upload_files' => true, - 'rename_files' => true, - 'rename_folders' => true, - 'duplicate_files' => true, - 'copy_cut_files' => true, // for copy/cut files - 'copy_cut_dirs' => true, // for copy/cut directories - 'chmod_files' => true, // change file permissions - 'chmod_dirs' => true, // change folder permissions - 'preview_text_files' => true, // eg.: txt, log etc. - 'edit_text_files' => true, // eg.: txt, log etc. - 'create_text_files' => true, // only create files with exts. defined in $editable_text_file_exts - - // you can preview these type of files if $preview_text_files is true - 'previewable_text_file_exts' => array( "bsh", "c","css", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml","xsl" ), - 'previewable_text_file_exts_no_prettify' => array( 'txt', 'log' ), - - // you can edit these type of files if $edit_text_files is true (only text based files) - // you can create these type of files if $create_text_files is true (only text based files) - // if you want you can add html,css etc. - // but for security reasons it's NOT RECOMMENDED! - 'editable_text_file_exts' => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js' ), - - // Preview with Google Documents - 'googledoc_enabled' => true, - 'googledoc_file_exts' => array( 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx' , 'pdf', 'odt', 'odp', 'ods'), - - // defines size limit for paste in MB / operation - // set 'FALSE' for no limit - 'copy_cut_max_size' => 100, - // defines file count limit for paste / operation - // set 'FALSE' for no limit - 'copy_cut_max_count' => 200, - //IF any of these limits reached, operation won't start and generate warning - - //********************** - //Allowed extensions (lowercase insert) - //********************** - 'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg' ), //Images - 'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm'), //Files - 'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', "flv", "webm" ), //Video - 'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio - 'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives - - /****************** - * AVIARY config - *******************/ - 'aviary_active' => true, - 'aviary_apiKey' => "2444282ef4344e3dacdedc7a78f8877d", - 'aviary_language' => "en", - 'aviary_theme' => "light", - 'aviary_tools' => "all", - 'aviary_maxSize' => "1400", - // Add or modify the Aviary options below as needed - they will be json encoded when added to the configuration so arrays can be utilized as needed - - //The filter and sorter are managed through both javascript and php scripts because if you have a lot of - //file in a folder the javascript script can't sort all or filter all, so the filemanager switch to php script. - //The plugin automatic swich javascript to php when the current folder exceeds the below limit of files number - 'file_number_limit_js' => 500, - - //********************** - // Hidden files and folders - //********************** - // set the names of any folders you want hidden (eg "hidden_folder1", "hidden_folder2" ) Remember all folders with these names will be hidden (you can set any exceptions in config.php files on folders) - 'hidden_folders' => array(), - // set the names of any files you want hidden. Remember these names will be hidden in all folders (eg "this_document.pdf", "that_image.jpg" ) - 'hidden_files' => array( 'config.php' ), - - /******************* - * URL upload - *******************/ - 'url_upload' => true, - - - //************************************ - //Thumbnail for external use creation - //************************************ - - - // New image resized creation with fixed path from filemanager folder after uploading (thumbnails in fixed mode) - // If you want create images resized out of upload folder for use with external script you can choose this method, - // You can create also more than one image at a time just simply add a value in the array - // Remember than the image creation respect the folder hierarchy so if you are inside source/test/test1/ the new image will create at - // path_from_filemanager/test/test1/ - // PS if there isn't write permission in your destination folder you must set it - // - 'fixed_image_creation' => false, //activate or not the creation of one or more image resized with fixed path from filemanager folder - 'fixed_path_from_filemanager' => array( '../test/', '../test1/' ), //fixed path of the image folder from the current position on upload folder - 'fixed_image_creation_name_to_prepend' => array( '', 'test_' ), //name to prepend on filename - 'fixed_image_creation_to_append' => array( '_test', '' ), //name to appendon filename - 'fixed_image_creation_width' => array( 300, 400 ), //width of image (you can leave empty if you set height) - 'fixed_image_creation_height' => array( 200, '' ), //height of image (you can leave empty if you set width) - /* - # $option: 0 / exact = defined size; - # 1 / portrait = keep aspect set height; - # 2 / landscape = keep aspect set width; - # 3 / auto = auto; - # 4 / crop= resize and crop; - */ - 'fixed_image_creation_option' => array( 'crop', 'auto' ), //set the type of the crop - - - // New image resized creation with relative path inside to upload folder after uploading (thumbnails in relative mode) - // With Responsive filemanager you can create automatically resized image inside the upload folder, also more than one at a time - // just simply add a value in the array - // The image creation path is always relative so if i'm inside source/test/test1 and I upload an image, the path start from here - // - 'relative_image_creation' => false, //activate or not the creation of one or more image resized with relative path from upload folder - 'relative_path_from_current_pos' => array( './', './' ), //relative path of the image folder from the current position on upload folder - 'relative_image_creation_name_to_prepend' => array( '', '' ), //name to prepend on filename - 'relative_image_creation_name_to_append' => array( '_thumb', '_thumb1' ), //name to append on filename - 'relative_image_creation_width' => array( 300, 400 ), //width of image (you can leave empty if you set height) - 'relative_image_creation_height' => array( 200, '' ), //height of image (you can leave empty if you set width) - /* - # $option: 0 / exact = defined size; - # 1 / portrait = keep aspect set height; - # 2 / landscape = keep aspect set width; - # 3 / auto = auto; - # 4 / crop= resize and crop; - */ - 'relative_image_creation_option' => array( 'crop', 'crop' ), //set the type of the crop - - - // Remember text filter after close filemanager for future session - 'remember_text_filter' => false, - -); - -return array_merge( - $config, - array( - 'ext'=> array_merge( - $config['ext_img'], - $config['ext_file'], - $config['ext_misc'], - $config['ext_video'], - $config['ext_music'] - ), - // For a list of options see: https://developers.aviary.com/docs/web/setup-guide#constructor-config - 'aviary_defaults_config' => array( - 'apiKey' => $config['aviary_apiKey'], - 'language' => $config['aviary_language'], - 'theme' => $config['aviary_theme'], - 'tools' => $config['aviary_tools'], - 'maxSize' => $config['aviary_maxSize'] - ), - ) -); -?> diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload-noscript.css b/libraries/filemanager-9.12.1/css/jquery.fileupload-noscript.css deleted file mode 100644 index 2409bfb..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload-noscript.css +++ /dev/null @@ -1,22 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload Plugin NoScript CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileinput-button input { - position: static; - opacity: 1; - filter: none; - font-size: inherit !important; - direction: inherit; -} -.fileinput-button span { - display: none; -} diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui-noscript.css b/libraries/filemanager-9.12.1/css/jquery.fileupload-ui-noscript.css deleted file mode 100644 index 30651ac..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui-noscript.css +++ /dev/null @@ -1,17 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload UI Plugin NoScript CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2012, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileinput-button i, -.fileupload-buttonbar .delete, -.fileupload-buttonbar .toggle { - display: none; -} diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui.css b/libraries/filemanager-9.12.1/css/jquery.fileupload-ui.css deleted file mode 100644 index 5bb9e42..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui.css +++ /dev/null @@ -1,53 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload UI Plugin CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2010, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileupload-buttonbar .btn, -.fileupload-buttonbar .toggle { - margin-bottom: 5px; -} - -.fileupload-process { - float: right; - display: none; -} -.fileupload-processing .fileupload-process, -.files .processing .preview { - display: block; - width: 32px; - height: 32px; - background: url("../img/loading.gif") center no-repeat; - background-size: contain; -} -.files audio, -.files video { - max-width: 300px; -} - -@media (max-width: 767px) { - .fileupload-buttonbar .toggle, - .files .toggle, - .files .btn span { - display: none; - } - .files .name { - width: 80px; - word-wrap: break-word; - } - .files audio, - .files video { - max-width: 80px; - } - .files img, - .files canvas { - max-width: 100%; - } -} diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload.css b/libraries/filemanager-9.12.1/css/jquery.fileupload.css deleted file mode 100644 index 8ae3b09..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload.css +++ /dev/null @@ -1,37 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload Plugin CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileinput-button { - position: relative; - overflow: hidden; - display: inline-block; -} -.fileinput-button input { - position: absolute; - top: 0; - right: 0; - margin: 0; - opacity: 0; - -ms-filter: 'alpha(opacity=0)'; - font-size: 200px !important; - direction: ltr; - cursor: pointer; -} - -/* Fixes for IE < 8 */ -@media screen\9 { - .fileinput-button input { - filter: alpha(opacity=0); - font-size: 100%; - height: 100%; - } -} diff --git a/libraries/filemanager-9.12.1/css/rtl-style.css b/libraries/filemanager-9.12.1/css/rtl-style.css deleted file mode 100644 index eb67f80..0000000 Binary files a/libraries/filemanager-9.12.1/css/rtl-style.css and /dev/null differ diff --git a/libraries/filemanager-9.12.1/css/style.css b/libraries/filemanager-9.12.1/css/style.css deleted file mode 100644 index b4a7bd9..0000000 --- a/libraries/filemanager-9.12.1/css/style.css +++ /dev/null @@ -1,40 +0,0 @@ -/*! - * Bootstrap v2.3.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:active,a:hover{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{max-width:100%;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button,input[type=button],input[type=checkbox],input[type=radio],input[type=reset],input[type=submit],label,select{cursor:pointer}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}@media print{*{text-shadow:none!important;color:#000!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]: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}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:focus,a:hover{color:#005580;text-decoration:underline}.img-rounded{border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.1)}.img-circle{border-radius:500px}.row{margin-left:-20px}.row:after,.row:before{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:2.12765957%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.12765957%}.row-fluid .span12{width:100%}.row-fluid .span11{width:91.4893617%}.row-fluid .span10{width:82.9787234%}.row-fluid .span9{width:74.46808511%}.row-fluid .span8{width:65.95744681%}.row-fluid .span7{width:57.44680851%}.row-fluid .span6{width:48.93617021%}.row-fluid .span5{width:40.42553191%}.row-fluid .span4{width:31.91489362%}.row-fluid .span3{width:23.40425532%}.row-fluid .span2{width:14.89361702%}.row-fluid .span1{width:6.38297872%}.row-fluid .offset12{margin-left:104.25531915%}.row-fluid .offset12:first-child{margin-left:102.12765957%}.row-fluid .offset11{margin-left:95.74468085%}.row-fluid .offset11:first-child{margin-left:93.61702128%}.row-fluid .offset10{margin-left:87.23404255%}.row-fluid .offset10:first-child{margin-left:85.10638298%}.row-fluid .offset9{margin-left:78.72340426%}.row-fluid .offset9:first-child{margin-left:76.59574468%}.row-fluid .offset8{margin-left:70.21276596%}.row-fluid .offset8:first-child{margin-left:68.08510638%}.row-fluid .offset7{margin-left:61.70212766%}.row-fluid .offset7:first-child{margin-left:59.57446809%}.row-fluid .offset6{margin-left:53.19148936%}.row-fluid .offset6:first-child{margin-left:51.06382979%}.row-fluid .offset5{margin-left:44.68085106%}.row-fluid .offset5:first-child{margin-left:42.55319149%}.row-fluid .offset4{margin-left:36.17021277%}.row-fluid .offset4:first-child{margin-left:34.04255319%}.row-fluid .offset3{margin-left:27.65957447%}.row-fluid .offset3:first-child{margin-left:25.53191489%}.row-fluid .offset2{margin-left:19.14893617%}.row-fluid .offset2:first-child{margin-left:17.0212766%}.row-fluid .offset1{margin-left:10.63829787%}.row-fluid .offset1:first-child{margin-left:8.5106383%}.row-fluid [class*=span].hide,[class*=span].hide{display:none}.row-fluid [class*=span].pull-right,[class*=span].pull-right{float:right}.container{margin-right:auto;margin-left:auto}.container:after,.container:before{display:table;content:"";line-height:0}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px}.container-fluid:after,.container-fluid:before{display:table;content:"";line-height:0}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:700}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:focus,a.muted:hover{color:grey}.text-warning{color:#c09853}a.text-warning:focus,a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:focus,a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:focus,a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:focus,a.text-success:hover{color:#356635}.text-left{text-align:left}.text-right{text-align:right}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small,h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ol,ul{padding:0;margin:0 0 10px 25px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}li{line-height:20px}ol.inline,ol.unstyled,ul.inline,ul.unstyled{margin-left:0;list-style:none}ol.inline>li,ul.inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-bottom:20px}dd,dt{line-height:20px}dt{font-weight:700}dd{margin-left:10px}.dl-horizontal:after,.dl-horizontal:before{display:table;content:"";line-height:0}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:"\2014 \00A0"}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:""}blockquote.pull-right small:after{content:"\00A0 \2014"}blockquote:after,blockquote:before,q:after,q:before{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,Courier New,monospace;font-size:12px;color:#333;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:20px}button,input,select,textarea{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;border-radius:4px;vertical-align:middle}.uneditable-input,input,textarea{width:206px}textarea{height:auto}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],textarea{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border .2s linear,box-shadow .2s linear}.uneditable-input:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,textarea:focus{border-color:rgba(82,168,236,.8);outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=button],input[type=checkbox],input[type=file],input[type=image],input[type=radio],input[type=reset],input[type=submit]{width:auto}input[type=file],select{height:30px;line-height:30px}select{width:220px;border:1px solid #ccc;background-color:#fff}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;background-color:#fcfcfc;border-color:#ccc;box-shadow:inset 0 1px 2px rgba(0,0,0,.025);cursor:not-allowed}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.checkbox,.radio{min-height:20px;padding-left:20px}.checkbox input[type=checkbox],.radio input[type=radio]{float:left;margin-left:-20px}.controls>.checkbox:first-child,.controls>.radio:first-child{padding-top:5px}.checkbox.inline,.radio.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.checkbox.inline+.checkbox.inline,.radio.inline+.radio.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.uneditable-input[class*=span],input[class*=span],select[class*=span],textarea[class*=span]{float:none;margin-left:0}.input-append .uneditable-input[class*=span],.input-append input[class*=span],.input-prepend .uneditable-input[class*=span],.input-prepend input[class*=span],.row-fluid .input-append [class*=span],.row-fluid .input-prepend [class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span]{display:inline-block}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:926px}.uneditable-input.span11,input.span11,textarea.span11{width:846px}.uneditable-input.span10,input.span10,textarea.span10{width:766px}.uneditable-input.span9,input.span9,textarea.span9{width:686px}.uneditable-input.span8,input.span8,textarea.span8{width:606px}.uneditable-input.span7,input.span7,textarea.span7{width:526px}.uneditable-input.span6,input.span6,textarea.span6{width:446px}.uneditable-input.span5,input.span5,textarea.span5{width:366px}.uneditable-input.span4,input.span4,textarea.span4{width:286px}.uneditable-input.span3,input.span3,textarea.span3{width:206px}.uneditable-input.span2,input.span2,textarea.span2{width:126px}.uneditable-input.span1,input.span1,textarea.span1{width:46px}.controls-row:after,.controls-row:before{display:table;content:"";line-height:0}.controls-row:after{clear:both}.controls-row [class*=span],.row-fluid .controls-row [class*=span]{float:left}.controls-row .checkbox[class*=span],.controls-row .radio[class*=span]{padding-top:5px}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=checkbox][disabled],input[type=checkbox][readonly],input[type=radio][disabled],input[type=radio][readonly]{background-color:transparent}.control-group.warning .checkbox,.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-append .add-on,.control-group.warning .input-prepend .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .checkbox,.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-append .add-on,.control-group.error .input-prepend .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .checkbox,.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-append .add-on,.control-group.success .input-prepend .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .checkbox,.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-append .add-on,.control-group.info .input-prepend .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5}.form-actions:after,.form-actions:before{display:table;content:"";line-height:0}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{padding-left:5px}.help-inline,.input-append,.input-prepend{display:inline-block;vertical-align:middle}.input-append,.input-prepend{margin-bottom:10px;font-size:0;white-space:nowrap}.input-append .dropdown-menu,.input-append .popover,.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .dropdown-menu,.input-prepend .popover,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{font-size:14px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{position:relative;margin-bottom:0;vertical-align:top;border-radius:0 4px 4px 0}.input-append .uneditable-input:focus,.input-append input:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-prepend input:focus,.input-prepend select:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-append .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .add-on,.input-prepend .btn,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .add-on:first-child,.input-prepend .btn:first-child{border-radius:4px 0 0 4px}.input-append .uneditable-input+.btn-group .btn:last-child,.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child{border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{border-radius:0 4px 4px 0}.input-prepend.input-append .uneditable-input,.input-prepend.input-append input,.input-prepend.input-append select{border-radius:0}.input-prepend.input-append .uneditable-input+.btn-group .btn,.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn{border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-left:14px;margin-bottom:0;border-radius:15px}.form-search .input-append .search-query{border-radius:14px 0 0 14px}.form-search .input-append .btn,.form-search .input-prepend .search-query{border-radius:0 14px 14px 0}.form-search .input-prepend .btn{border-radius:14px 0 0 14px}.form-horizontal .help-inline,.form-horizontal .input-append,.form-horizontal .input-prepend,.form-horizontal .uneditable-input,.form-horizontal input,.form-horizontal select,.form-horizontal textarea,.form-inline .help-inline,.form-inline .input-append,.form-inline .input-prepend,.form-inline .uneditable-input,.form-inline input,.form-inline select,.form-inline textarea,.form-search .help-inline,.form-search .input-append,.form-search .input-prepend,.form-search .uneditable-input,.form-search input,.form-search select,.form-search textarea{display:inline-block;margin-bottom:0;vertical-align:middle}.form-horizontal .hide,.form-inline .hide,.form-search .hide{display:none}.form-inline .btn-group,.form-inline label,.form-search .btn-group,.form-search label{display:inline-block}.form-inline .input-append,.form-inline .input-prepend,.form-search .input-append,.form-search .input-prepend{margin-bottom:0}.form-inline .checkbox,.form-inline .radio,.form-search .checkbox,.form-search .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.form-search .checkbox input[type=checkbox],.form-search .radio input[type=radio]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px}.form-horizontal .control-group:after,.form-horizontal .control-group:before{display:table;content:"";line-height:0}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{margin-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal .input-append+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table td,.table th{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:700}.table thead th{vertical-align:bottom}.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 td,.table-condensed th{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;border-left:0;border-radius:4px}.table-bordered td,.table-bordered th{border-left:1px solid #ddd}.table-bordered caption+tbody tr:first-child td,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+thead tr:first-child th,.table-bordered tbody:first-child tr:first-child td,.table-bordered tbody:first-child tr:first-child th,.table-bordered thead:first-child tr:first-child th{border-top:0}.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child,.table-bordered thead:first-child tr:first-child>th:first-child{border-top-left-radius:4px}.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child,.table-bordered thead:first-child tr:first-child>th:last-child{border-top-right-radius:4px}.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child,.table-bordered thead:last-child tr:last-child>th:first-child{border-bottom-left-radius:4px}.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child,.table-bordered thead:last-child tr:last-child>th:last-child{border-bottom-right-radius:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{border-bottom-left-radius:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{border-bottom-right-radius:0}.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered caption+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child{border-top-left-radius:4px}.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered caption+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child{border-top-right-radius:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}.row-fluid table td[class*=span],.row-fluid table th[class*=span],table td[class*=span],table th[class*=span]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class*=" icon-"],[class^=icon-]{display:inline-block;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat;margin-top:1px}.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>li>a:focus>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-submenu:focus>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.icon-white,.nav-list>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-]{background-image:url(../img/glyphicons-halflings-white.png)}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{background-position:-216px -120px;width:16px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px;width:16px}.icon-folder-open{background-position:-408px -120px;width:16px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropdown,.dropup{position:relative}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover,.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{text-decoration:none;color:#fff;background-color:#0081c2;background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff0088cc",endColorstr="#ff0077b3",GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:default}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px}.typeahead{z-index:1051;margin-top:2px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;border-radius:6px}.well-small{padding:9px;border-radius:3px}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.btn{display:inline-block;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px hsla(0,0%,100%,.75);background-color:#f5f5f5;background-image:linear-gradient(180deg,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;border-bottom-color:#b3b3b3;border-radius:4px;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:linear-gradient(180deg,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:linear-gradient(180deg,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:linear-gradient(180deg,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:linear-gradient(180deg,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:focus,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:linear-gradient(180deg,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:focus,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:linear-gradient(180deg,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:focus,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#08c;border-radius:0}.btn-link:focus,.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;font-size:0;vertical-align:middle;white-space:nowrap}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn{margin-left:5px}.btn-group>.btn{position:relative;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{border-top-right-radius:4px;border-bottom-right-radius:4px}.btn-group>.btn.large:first-child{margin-left:0;border-top-left-radius:6px;border-bottom-left-radius:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{border-top-right-radius:6px;border-bottom-right-radius:6px}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;box-shadow:inset 1px 0 0 hsla(0,0%,100%,.125),inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px}.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px;border-left-width:5px;border-right-width:5px;border-top-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-danger .caret,.btn-info .caret,.btn-inverse .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;border-radius:0}.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px}.btn-group-vertical>.btn:first-child{border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 hsla(0,0%,100%,.5);background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success h4{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-info,.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-left:0;margin-bottom:20px;list-style:none}.nav>li>a{display:block}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0}.nav-list .nav-header,.nav-list>li>a{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:focus,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.2);background-color:#08c}.nav-list [class*=" icon-"],.nav-list [class^=icon-]{margin-right:2px}.nav-list .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-pills:after,.nav-pills:before,.nav-tabs:after,.nav-tabs:before{display:table;content:"";line-height:0}.nav-pills:after,.nav-tabs:after{clear:both}.nav-pills>li,.nav-tabs>li{float:left}.nav-pills>li>a,.nav-tabs>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:focus,.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:focus,.nav-tabs>.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:focus,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{border-top-right-radius:4px;border-top-left-radius:4px}.nav-tabs.nav-stacked>li:last-child>a{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.nav-tabs.nav-stacked>li>a:focus,.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{border-radius:6px}.nav .dropdown-toggle .caret{border-top-color:#08c;border-bottom-color:#08c;margin-top:6px}.nav .dropdown-toggle:focus .caret,.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:focus,.nav>.dropdown.active>a:hover{cursor:pointer}.nav-pills .open .dropdown-toggle,.nav-tabs .open .dropdown-toggle,.nav>li.dropdown.open.active>a:focus,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open.active .caret,.nav li.dropdown.open .caret,.nav li.dropdown.open a:focus .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:focus,.tabs-stacked .open>a:hover{border-color:#999}.tabbable:after,.tabbable:before{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-left>.nav-tabs,.tabs-right>.nav-tabs{border-bottom:0}.pill-content>.pill-pane,.tab-content>.tab-pane{display:none}.pill-content>.active,.tab-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:focus,.tabs-below>.nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:focus,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:focus,.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:focus,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:focus,.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:focus,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent}.nav>.disabled>a{color:#999}.nav>.disabled>a:focus,.nav>.disabled>a:hover{text-decoration:none;background-color:transparent;cursor:default}.navbar{overflow:visible;margin-bottom:20px}.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:linear-gradient(180deg,#fff,#f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffffff",endColorstr="#fff2f2f2",GradientType=0);border:1px solid #d4d4d4;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.065)}.navbar-inner:after,.navbar-inner:before{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{float:left;display:block;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:focus,.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:focus,.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-append .btn,.navbar .input-append .btn-group,.navbar .input-prepend .btn,.navbar .input-prepend .btn-group{margin-top:0}.navbar-form{margin-bottom:0}.navbar-form:after,.navbar-form:before{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form .checkbox,.navbar-form .radio,.navbar-form input,.navbar-form select{margin-top:5px}.navbar-form .btn,.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type=checkbox],.navbar-form input[type=image],.navbar-form input[type=radio]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{border-radius:0}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;border-radius:0}.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333;text-decoration:none}.navbar .nav>.active>a,.navbar .nav>.active>a:focus,.navbar .nav>.active>a:hover{color:#555;text-decoration:none;background-color:#e5e5e5;box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#ededed;background-image:linear-gradient(180deg,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.075)}.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar:active,.navbar .btn-navbar:focus,.navbar .btn-navbar:hover,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;border-radius:1px;box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{content:"";display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:9px}.navbar .nav>li>.dropdown-menu:after{content:"";display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:10px}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);border-bottom:0;bottom:-7px;top:auto}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #fff;border-bottom:0;bottom:-6px;top:auto}.navbar .nav li.dropdown>a:focus .caret,.navbar .nav li.dropdown>a:hover .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle,.navbar .nav li.dropdown.open>.dropdown-toggle{background-color:#e5e5e5;color:#555}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav>li>.dropdown-menu.pull-right,.navbar .pull-right>li>.dropdown-menu{left:auto;right:0}.navbar .nav>li>.dropdown-menu.pull-right:before,.navbar .pull-right>li>.dropdown-menu:before{left:auto;right:12px}.navbar .nav>li>.dropdown-menu.pull-right:after,.navbar .pull-right>li>.dropdown-menu:after{left:auto;right:13px}.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu,.navbar .pull-right>li>.dropdown-menu .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:linear-gradient(180deg,#222,#111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff222222",endColorstr="#ff111111",GradientType=0);border-color:#252525}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:focus,.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .brand,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#fff}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:focus,.navbar-inverse .nav .active>a:hover{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:focus,.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-left-color:#111;border-right-color:#222}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle{background-color:#111;color:#fff}.navbar-inverse .nav li.dropdown>a:focus .caret,.navbar-inverse .nav li.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 hsla(0,0%,100%,.15);transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query.focused,.navbar-inverse .navbar-search .search-query:focus{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;box-shadow:0 0 3px rgba(0,0,0,.15);outline:0}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:linear-gradient(180deg,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block;text-shadow:0 1px 0 #fff}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;margin-left:0;margin-bottom:0;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>.active>a,.pagination ul>.active>span,.pagination ul>li>a:focus,.pagination ul>li>a:hover{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>a,.pagination ul>.disabled>a:focus,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>span{color:#999;background-color:transparent;cursor:default}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-mini ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>a,.pagination-small ul>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-mini ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>a,.pagination-small ul>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;list-style:none;text-align:center}.pager:after,.pager:before{display:table;content:"";line-height:0}.pager:after{clear:both}.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:#f5f5f5}.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:#999;background-color:#fff;cursor:default}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);border-radius:6px;box-shadow:0 3px 7px rgba(0,0,0,.3);background-clip:padding-box;outline:0}.modal.fade{transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px}.modal-footer,.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;border-radius:0 0 6px 6px;box-shadow:inset 0 1px 0 #fff}.modal-footer:after,.modal-footer:before{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;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.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}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{top:1px;margin-left:-10px;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;border-right-width:0;border-left-color:#fff;bottom:-10px}.thumbnails{margin-left:-20px;list-style:none}.thumbnails:after,.thumbnails:before{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.055);transition:all .2s ease-in-out}a.thumbnail:focus,a.thumbnail:hover{border-color:#08c;box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.badge,.label{display:inline-block;padding:2px 4px;font-size:11.84px;font-weight:700;line-height:14px;color:#fff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#999}.label{border-radius:3px}.badge{padding-left:9px;padding-right:9px;border-radius:9px}.badge:empty,.label:empty{display:none}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.badge-important,.label-important{background-color:#b94a48}.badge-important[href],.label-important[href]{background-color:#953b39}.badge-warning,.label-warning{background-color:#f89406}.badge-warning[href],.label-warning[href]{background-color:#c67605}.badge-success,.label-success{background-color:#468847}.badge-success[href],.label-success[href]{background-color:#356635}.badge-info,.label-info{background-color:#3a87ad}.badge-info[href],.label-info[href]{background-color:#2d6987}.badge-inverse,.label-inverse{background-color:#333}.badge-inverse[href],.label-inverse[href]{background-color:#1a1a1a}.btn .badge,.btn .label{position:relative;top:-1px}.btn-mini .badge,.btn-mini .label{top:0}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:linear-gradient(180deg,#f5f5f5,#f9f9f9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fff5f5f5",endColorstr="#fff9f9f9",GradientType=0);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border-radius:4px}.progress,.progress .bar{background-repeat:repeat-x}.progress .bar{width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-image:linear-gradient(180deg,#149bdf,#0480be);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff149bdf",endColorstr="#ff0480be",GradientType=0);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-sizing:border-box;transition:width .6s ease}.progress .bar+.bar{box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:linear-gradient(180deg,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffee5f5b",endColorstr="#ffc43c35",GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:linear-gradient(180deg,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff62c462",endColorstr="#ff57a957",GradientType=0)}.progress-striped .bar-success,.progress-success.progress-striped .bar{background-color:#62c462;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:linear-gradient(180deg,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff5bc0de",endColorstr="#ff339bb9",GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:linear-gradient(180deg,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fffbb450",endColorstr="#fff89406",GradientType=0)}.progress-striped .bar-warning,.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{overflow:hidden;width:100%;position:relative}.carousel-inner>.item{display:none;position:relative;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;line-height:1}.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:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{left:auto;right:15px}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:hsla(0,0%,100%,.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{color:#fff;line-height:20px}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} -/*! - * Bootstrap Responsive v2.3.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.hidden-desktop,.visible-phone,.visible-tablet{display:none!important}.visible-desktop{display:inherit!important}@media (min-width:768px) and (max-width:839px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media (max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media (min-width:1200px){.row{margin-left:-30px}.row:after,.row:before{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:30px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:2.56410256%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.56410256%}.row-fluid .span12{width:100%}.row-fluid .span11{width:91.45299145%}.row-fluid .span10{width:82.90598291%}.row-fluid .span9{width:74.35897436%}.row-fluid .span8{width:65.81196581%}.row-fluid .span7{width:57.26495726%}.row-fluid .span6{width:48.71794872%}.row-fluid .span5{width:40.17094017%}.row-fluid .span4{width:31.62393162%}.row-fluid .span3{width:23.07692308%}.row-fluid .span2{width:14.52991453%}.row-fluid .span1{width:5.98290598%}.row-fluid .offset12{margin-left:105.12820513%}.row-fluid .offset12:first-child{margin-left:102.56410256%}.row-fluid .offset11{margin-left:96.58119658%}.row-fluid .offset11:first-child{margin-left:94.01709402%}.row-fluid .offset10{margin-left:88.03418803%}.row-fluid .offset10:first-child{margin-left:85.47008547%}.row-fluid .offset9{margin-left:79.48717949%}.row-fluid .offset9:first-child{margin-left:76.92307692%}.row-fluid .offset8{margin-left:70.94017094%}.row-fluid .offset8:first-child{margin-left:68.37606838%}.row-fluid .offset7{margin-left:62.39316239%}.row-fluid .offset7:first-child{margin-left:59.82905983%}.row-fluid .offset6{margin-left:53.84615385%}.row-fluid .offset6:first-child{margin-left:51.28205128%}.row-fluid .offset5{margin-left:45.2991453%}.row-fluid .offset5:first-child{margin-left:42.73504274%}.row-fluid .offset4{margin-left:36.75213675%}.row-fluid .offset4:first-child{margin-left:34.18803419%}.row-fluid .offset3{margin-left:28.20512821%}.row-fluid .offset3:first-child{margin-left:25.64102564%}.row-fluid .offset2{margin-left:19.65811966%}.row-fluid .offset2:first-child{margin-left:17.09401709%}.row-fluid .offset1{margin-left:11.11111111%}.row-fluid .offset1:first-child{margin-left:8.54700855%}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:30px}.uneditable-input.span12,input.span12,textarea.span12{width:1156px}.uneditable-input.span11,input.span11,textarea.span11{width:1056px}.uneditable-input.span10,input.span10,textarea.span10{width:956px}.uneditable-input.span9,input.span9,textarea.span9{width:856px}.uneditable-input.span8,input.span8,textarea.span8{width:756px}.uneditable-input.span7,input.span7,textarea.span7{width:656px}.uneditable-input.span6,input.span6,textarea.span6{width:556px}.uneditable-input.span5,input.span5,textarea.span5{width:456px}.uneditable-input.span4,input.span4,textarea.span4{width:356px}.uneditable-input.span3,input.span3,textarea.span3{width:256px}.uneditable-input.span2,input.span2,textarea.span2{width:156px}.uneditable-input.span1,input.span1,textarea.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media (min-width:768px) and (max-width:839px){.row{margin-left:-20px}.row:after,.row:before{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:2.76243094%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.76243094%}.row-fluid .span12{width:100%}.row-fluid .span11{width:91.43646409%}.row-fluid .span10{width:82.87292818%}.row-fluid .span9{width:74.30939227%}.row-fluid .span8{width:65.74585635%}.row-fluid .span7{width:57.18232044%}.row-fluid .span6{width:48.61878453%}.row-fluid .span5{width:40.05524862%}.row-fluid .span4{width:31.49171271%}.row-fluid .span3{width:22.9281768%}.row-fluid .span2{width:14.36464088%}.row-fluid .span1{width:5.80110497%}.row-fluid .offset12{margin-left:105.52486188%}.row-fluid .offset12:first-child{margin-left:102.76243094%}.row-fluid .offset11{margin-left:96.96132597%}.row-fluid .offset11:first-child{margin-left:94.19889503%}.row-fluid .offset10{margin-left:88.39779006%}.row-fluid .offset10:first-child{margin-left:85.63535912%}.row-fluid .offset9{margin-left:79.83425414%}.row-fluid .offset9:first-child{margin-left:77.0718232%}.row-fluid .offset8{margin-left:71.27071823%}.row-fluid .offset8:first-child{margin-left:68.50828729%}.row-fluid .offset7{margin-left:62.70718232%}.row-fluid .offset7:first-child{margin-left:59.94475138%}.row-fluid .offset6{margin-left:54.14364641%}.row-fluid .offset6:first-child{margin-left:51.38121547%}.row-fluid .offset5{margin-left:45.5801105%}.row-fluid .offset5:first-child{margin-left:42.81767956%}.row-fluid .offset4{margin-left:37.01657459%}.row-fluid .offset4:first-child{margin-left:34.25414365%}.row-fluid .offset3{margin-left:28.45303867%}.row-fluid .offset3:first-child{margin-left:25.69060773%}.row-fluid .offset2{margin-left:19.88950276%}.row-fluid .offset2:first-child{margin-left:17.12707182%}.row-fluid .offset1{margin-left:11.32596685%}.row-fluid .offset1:first-child{margin-left:8.56353591%}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:710px}.uneditable-input.span11,input.span11,textarea.span11{width:648px}.uneditable-input.span10,input.span10,textarea.span10{width:586px}.uneditable-input.span9,input.span9,textarea.span9{width:524px}.uneditable-input.span8,input.span8,textarea.span8{width:462px}.uneditable-input.span7,input.span7,textarea.span7{width:400px}.uneditable-input.span6,input.span6,textarea.span6{width:338px}.uneditable-input.span5,input.span5,textarea.span5{width:276px}.uneditable-input.span4,input.span4,textarea.span4{width:214px}.uneditable-input.span3,input.span3,textarea.span3{width:152px}.uneditable-input.span2,input.span2,textarea.span2{width:90px}.uneditable-input.span1,input.span1,textarea.span1{width:28px}}@media (max-width:767px){body{padding-left:20px;padding-right:20px}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{margin-left:-20px;margin-right:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;clear:none;width:auto;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}.row-fluid [class*=span],.uneditable-input[class*=span],[class*=span]{float:none;display:block;width:100%;margin-left:0;box-sizing:border-box}.row-fluid .span12,.span12{width:100%;box-sizing:border-box}.row-fluid [class*=offset]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,.uneditable-input,input[class*=span],select[class*=span],textarea[class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box}.input-append input,.input-append input[class*=span],.input-prepend input,.input-prepend input[class*=span]{display:inline-block;width:auto}.controls-row [class*=span]+[class*=span]{margin-left:0}.modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media (max-width:480px){.nav-collapse{-webkit-transform:translateZ(0)}.page-header h1 small{display:block;line-height:20px}input[type=checkbox],input[type=radio]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-left:10px;padding-right:10px}.media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;left:10px;right:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media (max-width:839px){body{padding-top:0}.navbar-fixed-bottom,.navbar-fixed-top{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .dropdown-menu a,.nav-collapse .nav>li>a{padding:9px 15px;font-weight:700;color:#777;border-radius:3px}.nav-collapse .btn{padding:4px 10px;font-weight:400;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .dropdown-menu a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .nav>li>a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .dropdown-menu a,.navbar-inverse .nav-collapse .nav>li>a{color:#999}.navbar-inverse .nav-collapse .dropdown-menu a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .nav>li>a:hover{background-color:#111}.nav-collapse.in .btn-group{margin-top:5px;padding:0}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:none;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;border-radius:0;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu .divider,.nav-collapse .dropdown-menu:after,.nav-collapse .dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after,.nav-collapse .nav>li>.dropdown-menu:before{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-left:10px;padding-right:10px}}@media (min-width:839px + 1){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}.lightbox{background-color:transparent;text-align:center;line-height:0;z-index:1050;position:relative;top:70px;outline:0}.lightbox .hide{display:none}.lightbox .in{display:block}.lightbox-content{display:inline-block;padding:10px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);border-radius:6px;box-shadow:0 3px 7px rgba(0,0,0,.3);background-clip:padding-box}.lightbox-content .lightbox-caption{padding:2%;position:absolute;left:11px;right:12px;bottom:11px;background:#000;background:rgba(0,0,0,.6);color:#fff;text-align:center;text-shadow:0 -1px 0 #000;text-shadow:0 -1px 0 rgba(0,0,0,.3);font-size:14px;line-height:18px}.lightbox-header .close{color:#fff;margin-right:-16px;margin-top:-16px;font-size:2em;opacity:.8;filter:alpha(opacity=80)}.lightbox-header .close :hover{opacity:.4;filter:alpha(opacity=40)} -/*! - * Bootstrap Modal - * - * Copyright Jordan Schroter - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - */.modal-open{overflow:hidden}.modal-open.page-overflow .modal-scrollable,.modal-open.page-overflow .page-container,.modal-open.page-overflow .page-container .navbar-fixed-bottom,.modal-open.page-overflow .page-container .navbar-fixed-top{overflow-y:scroll}@media (max-width:979px){.modal-open.page-overflow .page-container .navbar-fixed-bottom,.modal-open.page-overflow .page-container .navbar-fixed-top{overflow-y:visible}}.modal-scrollable{position:fixed;top:0;bottom:0;left:0;right:0;overflow:auto}.modal{outline:none;position:absolute;margin-top:0;top:50%;overflow:visible}.modal.fade{top:-100%;-webkit-transition:opacity .3s linear,top .3s ease-out,bottom .3s ease-out,margin-top .3s ease-out;transition:opacity .3s linear,top .3s ease-out,bottom .3s ease-out,margin-top .3s ease-out}.modal.fade.in{top:50%}.modal-body{max-height:none;overflow:visible}.modal.modal-absolute{position:absolute;z-index:950}.modal .loading-mask{position:absolute;top:0;bottom:0;left:0;right:0;background:#fff;border-radius:6px}.modal-backdrop.modal-absolute{position:absolute;z-index:940}.modal-backdrop,.modal-backdrop.fade.in{opacity:.7;filter:alpha(opacity=70);background:#fff}.modal.container{width:940px;margin-left:-470px}.modal-overflow.modal{top:1%}.modal-overflow.modal.fade{top:-100%}.modal-overflow.modal.fade.in{top:1%}.modal-overflow .modal-body{overflow:auto;-webkit-overflow-scrolling:touch}@media (min-width:1200px){.modal.container{width:1170px;margin-left:-585px}}@media (max-width:979px){.modal,.modal.container,.modal.modal-overflow{top:1%;right:1%;left:1%;bottom:auto;width:auto!important;height:auto!important;margin:0!important;padding:0!important}.modal.container.fade.in,.modal.fade.in,.modal.modal-overflow.fade.in{top:1%;bottom:auto}.modal-body,.modal-overflow .modal-body{position:static;margin:0;height:auto!important;max-height:none!important;overflow:visible!important}.modal-footer,.modal-overflow .modal-footer{position:static}}.loading-spinner{position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes shake{0%,to{-webkit-transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px)}}@keyframes shake{0%,to{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}.shake{-webkit-animation-name:shake;animation-name:shake} - -/*! - * jQuery contextMenu - Plugin for simple contextMenu handling - * - * Version: 1.6.6 - * - * Authors: Rodney Rehm, Addy Osmani (patches for FF) - * Web: http://medialize.github.com/jQuery-contextMenu/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * GPL v3 http://opensource.org/licenses/GPL-3.0 - * - */.context-menu-list{margin:0;padding:0;min-width:120px;max-width:250px;display:inline-block;position:absolute;list-style-type:none;border:1px solid #ddd;background:#eee;-ms-box-shadow:0 2px 5px rgba(0,0,0,.5);-o-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.context-menu-item{padding:2px 2px 2px 24px;background-color:#eee;position:relative;-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.hover{cursor:pointer;background-color:#39f}.context-menu-item.disabled{color:#666}.context-menu-submenu:after{content:">";color:#666;position:absolute;top:0;right:3px;z-index:1}.context-menu-item.icon{min-height:18px;background-repeat:no-repeat;background-position:4px 2px}.context-menu-item.icon-edit{background-image:url(images/page_white_edit.png)}.context-menu-item.icon-cut{background-image:url(images/cut.png)}.context-menu-item.icon-copy{background-image:url(images/page_white_copy.png)}.context-menu-item.icon-paste{background-image:url(images/page_white_paste.png)}.context-menu-item.icon-delete{background-image:url(images/page_white_delete.png)}.context-menu-item.icon-add{background-image:url(images/page_white_add.png)}.context-menu-item.icon-quit{background-image:url(images/door.png)}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{margin-left:-17px}.context-menu-input>label>span{margin-left:5px}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:100px}.context-menu-item>.context-menu-list{display:none;right:-5px;top:5px}.context-menu-item.hover>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}*,:after,:before{box-sizing:border-box}body,html{font-family:Open Sans,sans-serif;font-size:100%;padding:0;margin:0;height:100%}body{padding-top:32px;font-weight:200;background:#ececec;overflow:-moz-scrollbars-vertical}.btn{background-image:none!important;text-shadow:none!important;border-color:none!important;box-shadow:none!important}.btn:focus{outline:none}.btn-inverse{background-image:none!important;background:#333}pre.no-prettify,pre.prettyprint{height:300px;margin:0!important;width:100%!important;overflow:scroll;border-radius:0!important;margin-top:4px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{border-radius:0!important}[class*=" rficon-"],[class^=rficon-]{display:inline-block;width:16px;height:16px;margin-top:1px;*margin-right:.3em;line-height:16px;vertical-align:text-top;background-position:0 0;background-repeat:no-repeat}.rficon-clipboard-apply{background-image:url(../img/clipboard_apply.png)}.rficon-clipboard-clear{background-image:url(../img/clipboard_clear.png)}.rficon-upload{background-image:url(../img/upload.png)}.btn{border-radius:0}.container-fluid{padding-right:0!important;margin-top:10px!important}.img-precontainer{width:100%;background:#fff}.img-container,.img-precontainer{margin:auto;text-align:center;border:none}.img-container{height:91px;width:122px;padding:0;overflow:hidden;display:table-cell;vertical-align:middle;background-image:url(../img/trans.jpg);background-size:13px}.img-container img{max-width:122px;max-height:91px}ul.breadcrumb{margin-bottom:5px;border-radius:0;padding-bottom:4px;padding-top:6px;background:#f0f0f0;box-shadow:0 1px 4px rgba(0,0,0,.065);border-bottom:1px solid #bbb}ul.breadcrumb .pull-left i{margin-top:2px}.alert{padding:8px 35px 8px 14px;margin-bottom:2px;border:1px solid #aaa;color:#666;font-weight:200;font-size:13px;border-radius:0;background:#fff}.img-container *,.img-container-mini *{vertical-align:middle}#help{display:none}.text-center{text-align:center}iframe{overflow:auto;-webkit-overflow-scrolling:touch}.uploader{position:fixed;top:6px;left:6px;right:6px;bottom:6px;z-index:9999;background:#eee;border:1px solid #ccc;display:none;box-shadow:0 0 10px 0 rgba(1,1,1,.5)}.uploader .flex{padding:10px;position:relative}.uploader .container1,.uploader .container2,.uploader .flex{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.uploader .upload-help{font-size:11px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff;text-align:center}.uploader .upload-tabbable{padding:2px;height:100%;overflow:hidden}.uploader .upload-tabbable .nav{margin:0}.uploader .upload-tabbable .nav li a{font-size:13px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.uploader .upload-tabbable #urlUpload{padding:5px 10px}.uploader .upload-tabbable .tab-content{padding:5px;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #ddd;background:#fff;-ms-flex-positive:2;flex-grow:2;position:relative}.uploader .upload-tabbable .tab-content .tab-pane{position:absolute;top:0;bottom:0;left:0;right:0;padding:5px}.uploader .upload-tabbable .tab-content form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.uploader .upload-tabbable .tab-content form #filesTable{-ms-flex-positive:2;flex-grow:2;overflow-y:scroll;background:#fff;font-size:.95em}.uploader .upload-tabbable .tab-content form #filesTable .progress{margin-bottom:4px}input#filter-input{margin:0;width:84px;height:26px;vertical-align:bottom;margin-bottom:2px;border-radius:0;font-size:12px;font-weight:200;position:relative;left:1px}.qq-uploader .span9{margin-left:14px!important;width:690px!important}.space10{clear:both;height:10px}h4{font-size:12px;margin:0;text-align:center;padding:0;margin-top:6px;line-height:18px}h3,h4{font-weight:200}h3{font-size:14px}.boxes{border:1px solid #ccc;word-wrap:break-word;background:#fff;box-shadow:1px 1px 2px 0 rgba(0,0,0,.2);min-height:115px;text-align:center}.container-fluid{padding:0 10px!important}body .avpw .avpw_primary_button,body .avpw .avpw_primary_button:active,body .avpw .avpw_primary_button:link,body .avpw .avpw_primary_button:visited{color:#fff;background:#999;border:none}body .avpw .avpw_primary_button:hover{border:none;background:#666}.download-form{margin-bottom:25px}.grid li i{margin-left:2px;margin-right:2px;z-index:0}.box,.boxx{text-align:center;word-wrap:break-word;vertical-align:top;text-align:left;position:relative;z-index:100;padding:4px}.box,.box .btn,.boxx{border:none;box-shadow:none}.box .btn{width:100%;background:none;z-index:200}.navbar{margin-bottom:0;border-bottom:1px solid #bbb}.navbar .navbar-inner{border:none;min-height:35px;border-radius:0;padding-bottom:2px;margin:0;padding-right:8px;padding-left:8px}.navbar .navbar-inner .container-fluid{margin:0;margin-top:0!important;padding:0}.navbar .navbar-inner .container-fluid .brand{display:none}.navbar .navbar-inner .container-fluid .filters span{margin-top:0;font-size:13px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}ul.sorting{position:absolute;left:-25px;top:20px;min-width:0;background:#eee}ul.sorting li a:hover{background:#aaa}.btn-group .dropdown-toggle.sorting-btn{position:relative;top:-5px;font-size:13px}.btn-group .dropdown-toggle.sorting-btn,.btn-group .dropdown-toggle.sorting-btn:hover{background:none;border:none;box-shadow:none;-webkit-box-shadow:none}ul.sorting.dropdown-menu>li>a{font-size:12px;text-shadow:none}ul.sorting.dropdown-menu>li>a.descending{background-image:url(../img/down.png);background-repeat:no-repeat;background-position:6px 8px}ul.sorting.dropdown-menu>li>a.ascending{background-image:url(../img/up.png);background-repeat:no-repeat;background-position:6px 8px}.sorter-container{margin-top:5px;margin-bottom:0;border-radius:0;padding-bottom:4px;padding-top:6px;box-shadow:0 1px 4px rgba(0,0,0,.065);background-color:#f5f5f5;position:relative;border-bottom:1px solid #bbb;height:24px}.sorter-container a.sorter{color:#000}.sorter-container a.descending{padding-left:9px;background-image:url(../img/down.png);background-repeat:no-repeat;background-position:0 3px}.sorter-container a.ascending{padding-left:9px;background-image:url(../img/up.png);background-repeat:no-repeat;background-position:0 4px}.sorter-container .file-date,.sorter-container .file-extension,.sorter-container .file-name,.sorter-container .file-operations,.sorter-container .file-size,.sorter-container .img-dimension{display:block;position:absolute;top:0;z-index:100;box-shadow:none;text-align:left;font-size:13px;margin-top:1px;color:#999}.sorter-container .file-operations{width:110px;right:0}.sorter-container .img-dimension{width:65px;right:123px}.sorter-container .file-date{width:70px;right:188px}.sorter-container .file-size{width:55px;right:258px}.sorter-container .file-extension{width:40px;right:313px}.sorter-container .file-name{width:50px;left:52px}.file-date,.file-extension,.file-name,.file-operations,.file-size,.img-dimension{font-size:12px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff;display:none}.view-controller{text-align:left}.view-controller .btn-group>.btn:first-child,.view-controller .btn-group>.btn:last-child{border-radius:0}.navbar .filters .btn{margin-bottom:2px;padding:2px 8px;margin-top:5px}.filters .types{text-align:right}.fileupload-buttonbar{margin-bottom:10px}.fileupload-buttonbar .progress{margin:0}@media (max-width:780px){#view2{display:none}}@media (min-width:840px){.mobile-inline-visible{display:none!important}}@media (max-width:839px){body{padding-top:0}.mobile-inline-visible{display:inline!important}.filters .types{text-align:left}.navbar .navbar-inner .container-fluid .brand{display:block}.navbar .navbar-inner{padding-bottom:4px}.filters div.span2.half,.filters div.span3.half,.filters div.span4.half{float:left;width:auto;margin-right:10px}.filters div.entire{float:none;width:100%;clear:both}.container-fluid{margin:0!important;padding:0}#qLbar{height:50px!important}}@media (min-width:400px) and (max-width:839px){.filters .row-fluid .half{width:48.61878453038674%;*width:48.56559304102504%;float:left}}.tooltip.in{opacity:1;filter:alpha(opacity=1)}.tooltip,.tooltip.in{z-index:10000;font-weight:700}.grid{padding:0;margin:0 auto;list-style:none;-webkit-overflow-scrolling:touch}.ui-draggable-helper{z-index:10}.grid li{display:inline-block;width:124px;border:none;margin:4px;margin-bottom:8px;padding:0;vertical-align:top}.grid figure{margin:0;position:relative;display:block;width:122px;margin:auto}.grid figure:hover{background:#e0e0e0!important}.list-view1.grid li,.list-view1.grid li figure{width:100%}.grid figcaption{text-align:center;padding:2px;padding-top:8px;color:#fff;height:30px;width:122px;margin-left:0;margin-right:0;position:absolute;top:auto;bottom:0;box-shadow:inset 0 0 8px 0 rgba(41,41,41,.5)}.grid figcaption a{margin:0;padding:3px}.grid figcaption h3{margin:0;padding:0;color:#fff}.grid h4{text-align:center;color:#000;padding:0;margin-bottom:4px;margin-top:4px}.grid figure .box{box-sizing:content-box;cursor:pointer}.list-view0.grid figure .box,.list-view1.grid figure .box,.list-view2.grid figure .box{max-width:100%;display:block;position:relative;overflow:hidden;z-index:1}.list-view0.grid figure .box h4.ellipsis,.list-view1.grid figure .box h4.ellipsis,.list-view2.grid figure .box h4.ellipsis{height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-view0.grid figure .box h4,.list-view0.grid figure .box h4 a,.list-view1.grid figure .box h4,.list-view1.grid figure .box h4 a,.list-view2.grid figure .box h4,.list-view2.grid figure .box h4 a{z-index:1}.no-touch .list-view0 figure .box{z-index:1;transition:transform .3s}.list-view0.grid .ui-state-highlight .img-precontainer{background:grey!important}.list-view0.grid .ui-state-highlight .img-precontainer .img-container{background:repeating-linear-gradient(45deg,transparent,transparent 5px,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.3) 10px);border:none;overflow:hidden}.list-view0.grid .ui-state-hover .img-precontainer .img-container{background:#666}.list-view1.grid .ui-state-highlight:nth-child(odd) figure,.list-view2.grid .ui-state-highlight:nth-child(odd) figure{background:#ddd!important;border-bottom-color:#444!important}.list-view1.grid .ui-state-highlight:nth-child(2n) figure,.list-view2.grid .ui-state-highlight:nth-child(2n) figure{background:#ccc!important;border-bottom-color:#aaa!important}.list-view1.grid .ui-state-highlight.ui-state-hover figure,.list-view2.grid .ui-state-highlight.ui-state-hover figure{background-color:#aaa!important}.no-touch .list-view0 figure.cs-hover .box,.no-touch .list-view0 figure:hover .box{box-shadow:0 0 4px 0 rgba(1,1,1,.5);transform:translateY(-26px)}.list-view0 figure.cs-hover .box.no-effect,.list-view0 figure:hover .box.no-effect,.no-effect{box-shadow:none;transform:none}.list-view0 .img-precontainer-mini{display:none;background:none}a,a:hover{color:#000;text-decoration:none}.back-directory .box,.back-directory .img-precontainer,.back-directory .img-precontainer-mini{background:none}form{margin:0;padding:0}.google-iframe,.viewer-iframe{width:100%;height:500px;border:none}.modal{width:60%;margin-left:-30%}.modal-body{padding:6px}.modal-body form,.modal-body input,.modal-body textarea{margin:0;border-radius:0}.modal-body .text-center{padding-bottom:6px}.modal-footer{padding:7px}.modal-header{padding:7px 8px!important}.modal-header h3{font-weight:300;font-size:20px}.list-view1.sorter-container{display:block}.list-view0.sorter-container,.list-view2.sorter-container{display:none}.list-view0.grid .img-precontainer .img-container img{max-width:122px!important;max-height:91px!important}.list-view0.grid .img-precontainer .img-container img.icon{width:122px;margin-top:0}.list-view0.grid .img-precontainer .filetype{position:absolute;top:0;width:122px;text-align:center;color:#fff;font-size:13px;line-height:22px}.list-view0.grid .cover{background:hsla(0,0%,100%,.25);width:122px;position:absolute;top:22px;right:0;height:69px}.list-view0.grid .box{background:#fff}.list-view0.grid .directory{background:#ddd}.list-view0.grid figure.back-directory .directory{background:#bbb}.list-view0.grid figcaption{background:#fff}.list-view0.grid .selected figure{border:none;height:126px}.list-view0.grid .selected figure .box,.list-view0.grid .selected figure>a,.list-view0.grid .selected figure figcaption{display:none}.list-view1.grid li,.list-view2.grid li{margin:0}.list-view1.grid li.back figure.back-directory,.list-view2.grid li.back figure.back-directory{height:34px}.list-view1.grid li:nth-child(odd) figure,.list-view2.grid li:nth-child(odd) figure{background:#f9f9f9}.list-view1.grid li:nth-child(odd) figure.directory,.list-view2.grid li:nth-child(odd) figure.directory{background:#eaeaea}.list-view1.grid li figure,.list-view2.grid li figure{border-bottom:1px solid #aaa;background:#fff}.list-view1.grid li figure.back-directory,.list-view2.grid li figure.back-directory{background:#bbb}.list-view1.grid li figure.back-directory .box,.list-view2.grid li figure.back-directory .box{background:none}.list-view1.grid li figure.directory,.list-view2.grid li figure.directory{background:#efefef}.list-view1.grid li figure.directory box,.list-view2.grid li figure.directory box{padding:0;min-height:10px}.list-view1.grid li figure .box,.list-view2.grid li figure .box{margin-left:50px;transition:none}.list-view1.grid li figure .box h4,.list-view2.grid li figure .box h4{padding-top:1px;font-size:13px;text-align:left}.list-view1.grid .img-precontainer-mini,.list-view2.grid .img-precontainer-mini{display:block;position:absolute;width:45px;height:34px;overflow:hidden;text-align:center}.list-view1.grid .img-precontainer-mini img,.list-view2.grid .img-precontainer-mini img{max-width:45px}.list-view1.grid .img-precontainer-mini .filetype,.list-view2.grid .img-precontainer-mini .filetype{position:absolute;top:1px;text-align:center;left:0;padding:1px 2px;font-size:13px;line-height:32px;width:45px;height:32px;color:#fff;background:#333}.list-view1.grid .cover,.list-view2.grid .cover{display:none}.list-view1.grid .img-container-mini,.list-view2.grid .img-container-mini{width:45px;height:34px;border:none;overflow:hidden;display:table-cell;text-align:center;vertical-align:middle;margin:auto}.list-view1.grid .img-precontainer-mini.original-thumb,.list-view2.grid .img-precontainer-mini.original-thumb{padding:0}.list-view1.grid .img-precontainer-mini.original-thumb img,.list-view2.grid .img-precontainer-mini.original-thumb img{width:auto;max-height:32px}.list-view1.grid .img-precontainer-mini.original-thumb img.original,.list-view2.grid .img-precontainer-mini.original-thumb img.original{width:auto;height:auto}.list-view1.grid .img-precontainer,.list-view2.grid .img-precontainer{display:none}.list-view1.grid figcaption,.list-view2.grid figcaption{background:none;width:120px;position:absolute;right:0;top:0;z-index:1;bottom:0;box-shadow:none;text-align:right}.list-view1.grid .selected figure,.list-view2.grid .selected figure{background:#ccc!important}.list-view1.grid .file-date,.list-view1.grid .file-extension,.list-view1.grid .file-size,.list-view1.grid .img-dimension{overflow:hidden;display:block;position:absolute;top:0;z-index:1;box-shadow:none;text-align:left;margin-top:7px}.list-view1.grid .img-dimension{width:65px;right:120px}.list-view1.grid .file-date{width:70px;right:185px}.list-view1.grid .file-size{width:55px;right:255px}.list-view1.grid .file-extension{width:40px;right:310px}.list-view1.grid figure .box{padding-right:352px}.list-view2.grid figure .box{padding-right:115px}@media (max-width:610px){.list-view1.grid figure .box{padding-right:312px}.list-view1.grid figure .file-extension,.sorter-container .file-extension{display:none}}@media (max-width:565px){.list-view1.grid figure .box{padding-right:257px}.list-view1.grid figure .file-size,.sorter-container .file-size{display:none}}@media (max-width:495px){.list-view1.grid figure .box{padding-right:187px}.list-view1.grid figure .file-date,.sorter-container .file-date{display:none}}@media (max-width:430px){.list-view1.grid figure .box{padding-right:115px}.list-view1.grid figure .img-dimension,.sorter-container .img-dimension{display:none}.breadcrumb{margin-left:0;margin-right:0}}.list-view1.grid .img-precontainer-mini .filetype.pdf,.list-view2.grid .img-precontainer-mini .filetype.pdf{background:#cb0011}.list-view1.grid .img-precontainer-mini .filetype.css,.list-view2.grid .img-precontainer-mini .filetype.css{background:#d10698}.list-view1.grid .img-precontainer-mini .filetype.ai,.list-view2.grid .img-precontainer-mini .filetype.ai{background:#d6772f}.list-view1.grid .img-precontainer-mini .filetype.psd,.list-view2.grid .img-precontainer-mini .filetype.psd{background:#0960a4}.list-view1.grid .img-precontainer-mini .filetype.html,.list-view1.grid .img-precontainer-mini .filetype.xhtml,.list-view2.grid .img-precontainer-mini .filetype.html,.list-view2.grid .img-precontainer-mini .filetype.xhtml{background:#035bc4}.list-view1.grid .img-precontainer-mini .filetype.fla,.list-view1.grid .img-precontainer-mini .filetype.flv,.list-view2.grid .img-precontainer-mini .filetype.fla,.list-view2.grid .img-precontainer-mini .filetype.flv{background:#cf302e}.list-view1.grid .img-precontainer-mini .filetype.ppt,.list-view1.grid .img-precontainer-mini .filetype.pptx,.list-view2.grid .img-precontainer-mini .filetype.ppt,.list-view2.grid .img-precontainer-mini .filetype.pptx{background:#da5b00}.list-view1.grid .img-precontainer-mini .filetype.css,.list-view1.grid .img-precontainer-mini .filetype.xls,.list-view1.grid .img-precontainer-mini .filetype.xlsx,.list-view2.grid .img-precontainer-mini .filetype.css,.list-view2.grid .img-precontainer-mini .filetype.xls,.list-view2.grid .img-precontainer-mini .filetype.xlsx{background:#1a712c}.list-view1.grid .img-precontainer-mini .filetype.doc,.list-view1.grid .img-precontainer-mini .filetype.docx,.list-view1.grid .img-precontainer-mini .filetype.rts,.list-view2.grid .img-precontainer-mini .filetype.doc,.list-view2.grid .img-precontainer-mini .filetype.docx,.list-view2.grid .img-precontainer-mini .filetype.rts{background:#002093}.list-view1.grid .img-precontainer-mini .filetype.gzip,.list-view1.grid .img-precontainer-mini .filetype.rar,.list-view1.grid .img-precontainer-mini .filetype.zip,.list-view2.grid .img-precontainer-mini .filetype.gzip,.list-view2.grid .img-precontainer-mini .filetype.rar,.list-view2.grid .img-precontainer-mini .filetype.zip{background:#fe9221}.list-view1.grid .img-precontainer-mini .filetype.avi,.list-view1.grid .img-precontainer-mini .filetype.mov,.list-view1.grid .img-precontainer-mini .filetype.mp4,.list-view1.grid .img-precontainer-mini .filetype.mpeg,.list-view1.grid .img-precontainer-mini .filetype.mpg,.list-view1.grid .img-precontainer-mini .filetype.webm,.list-view1.grid .img-precontainer-mini .filetype.wma,.list-view2.grid .img-precontainer-mini .filetype.avi,.list-view2.grid .img-precontainer-mini .filetype.mov,.list-view2.grid .img-precontainer-mini .filetype.mp4,.list-view2.grid .img-precontainer-mini .filetype.mpeg,.list-view2.grid .img-precontainer-mini .filetype.mpg,.list-view2.grid .img-precontainer-mini .filetype.webm,.list-view2.grid .img-precontainer-mini .filetype.wma{background:#31231e}.list-view1.grid .img-precontainer-mini .filetype.ac3,.list-view1.grid .img-precontainer-mini .filetype.aiff,.list-view1.grid .img-precontainer-mini .filetype.m4a,.list-view1.grid .img-precontainer-mini .filetype.mid,.list-view1.grid .img-precontainer-mini .filetype.mp3,.list-view1.grid .img-precontainer-mini .filetype.ogg,.list-view1.grid .img-precontainer-mini .filetype.wav,.list-view2.grid .img-precontainer-mini .filetype.ac3,.list-view2.grid .img-precontainer-mini .filetype.aiff,.list-view2.grid .img-precontainer-mini .filetype.m4a,.list-view2.grid .img-precontainer-mini .filetype.mid,.list-view2.grid .img-precontainer-mini .filetype.mp3,.list-view2.grid .img-precontainer-mini .filetype.ogg,.list-view2.grid .img-precontainer-mini .filetype.wav{background:#9f008b}.list-view1.grid .img-precontainer-mini .filetype.odb,.list-view1.grid .img-precontainer-mini .filetype.odf,.list-view1.grid .img-precontainer-mini .filetype.odg,.list-view1.grid .img-precontainer-mini .filetype.odp,.list-view1.grid .img-precontainer-mini .filetype.ods,.list-view1.grid .img-precontainer-mini .filetype.odt,.list-view1.grid .img-precontainer-mini .filetype.otg,.list-view1.grid .img-precontainer-mini .filetype.otp,.list-view1.grid .img-precontainer-mini .filetype.ots,.list-view1.grid .img-precontainer-mini .filetype.ott,.list-view2.grid .img-precontainer-mini .filetype.odb,.list-view2.grid .img-precontainer-mini .filetype.odf,.list-view2.grid .img-precontainer-mini .filetype.odg,.list-view2.grid .img-precontainer-mini .filetype.odp,.list-view2.grid .img-precontainer-mini .filetype.ods,.list-view2.grid .img-precontainer-mini .filetype.odt,.list-view2.grid .img-precontainer-mini .filetype.otg,.list-view2.grid .img-precontainer-mini .filetype.otp,.list-view2.grid .img-precontainer-mini .filetype.ots,.list-view2.grid .img-precontainer-mini .filetype.ott{background:#367bbe}.list-view1.grid .img-precontainer-mini .filetype.bmp,.list-view1.grid .img-precontainer-mini .filetype.gif,.list-view1.grid .img-precontainer-mini .filetype.jpeg,.list-view1.grid .img-precontainer-mini .filetype.jpg,.list-view1.grid .img-precontainer-mini .filetype.png,.list-view1.grid .img-precontainer-mini .filetype.svg,.list-view1.grid .img-precontainer-mini .filetype.tiff,.list-view2.grid .img-precontainer-mini .filetype.bmp,.list-view2.grid .img-precontainer-mini .filetype.gif,.list-view2.grid .img-precontainer-mini .filetype.jpeg,.list-view2.grid .img-precontainer-mini .filetype.jpg,.list-view2.grid .img-precontainer-mini .filetype.png,.list-view2.grid .img-precontainer-mini .filetype.svg,.list-view2.grid .img-precontainer-mini .filetype.tiff{background:#cfa554}.list-view1.grid .img-precontainer-mini .filetype.dmg,.list-view1.grid .img-precontainer-mini .filetype.iso,.list-view1.grid .img-precontainer-mini .filetype.log,.list-view1.grid .img-precontainer-mini .filetype.sql,.list-view1.grid .img-precontainer-mini .filetype.txt,.list-view1.grid .img-precontainer-mini .filetype.xml,.list-view2.grid .img-precontainer-mini .filetype.dmg,.list-view2.grid .img-precontainer-mini .filetype.iso,.list-view2.grid .img-precontainer-mini .filetype.log,.list-view2.grid .img-precontainer-mini .filetype.sql,.list-view2.grid .img-precontainer-mini .filetype.txt,.list-view2.grid .img-precontainer-mini .filetype.xml{background:#cacaca}.list-view1.grid .img-precontainer-mini .filetype.accdb,.list-view1.grid .img-precontainer-mini .filetype.ade,.list-view1.grid .img-precontainer-mini .filetype.adp,.list-view1.grid .img-precontainer-mini .filetype.mdb,.list-view2.grid .img-precontainer-mini .filetype.accdb,.list-view2.grid .img-precontainer-mini .filetype.ade,.list-view2.grid .img-precontainer-mini .filetype.adp,.list-view2.grid .img-precontainer-mini .filetype.mdb{background:#b61c19}.lightbox-content{overflow:hidden;padding:0;background:none;box-shadow:none;border-radius:0;border:0}.context-menu-list{font-family:Open Sans,sans-serif;width:200px;background:#fff;font-size:12px;margin:0;padding:5px}.context-menu-item{background-color:#fff;position:relative;height:auto;word-wrap:break-word;-webkit-user-select:none;-moz-user-select:0;-ms-user-select:none;user-select:none;padding:5px 5px 5px 30px}.context-menu-item:last-child{border:none}.context-menu-separator{padding-bottom:0;border-bottom:1px solid #ddd}.context-menu-item.hover{background-color:#ddd}.context-menu-input.hover,.context-menu-item.disabled.hover{cursor:default;background-color:#eee}.context-menu-item.icon{vertical-align:middle;background-position:4px 5px;width:auto;display:list-item}.context-menu-item.icon-edit{background-image:url(../img/file_edit.png)}.context-menu-item.icon-cut{background-image:url(../img/cut.png)}.context-menu-item.icon-copy{background-image:url(../img/copy.png)}.context-menu-item.icon-rename{background-image:url(../img/rename.png)}.context-menu-item.icon-preview{background-image:url(../img/preview.png)}.context-menu-item.icon-dimension{background-image:url(../img/dimension.png)}.context-menu-item.icon-date{background-image:url(../img/date.png)}.context-menu-item.icon-label{background-image:url(../img/label.png)}.context-menu-item.icon-size{background-image:url(../img/size.png)}.context-menu-item.icon-download{background-image:url(../img/download.png)}.context-menu-item.icon-paste{background-image:url(../img/page_white_paste.png)}.context-menu-item.icon-clipboard-apply{background-image:url(../img/clipboard_apply.png)}.context-menu-item.icon-delete{background-image:url(../img/page_white_delete.png)}.context-menu-item.icon-add{background-image:url(../img/page_white_add.png)}.context-menu-item.icon-quit{background-image:url(../img/door.png)}.context-menu-item.icon-info{background-image:url(../img/info.png)}.context-menu-item.icon-extract{background-image:url(../img/zip.png)}.context-menu-item.icon-url{background-image:url(../img/url.png)}.context-menu-item.icon-edit_img{background-image:url(../img/edit_img.png)}.context-menu-item.icon-duplicate{background-image:url(../img/duplicate.png)}.context-menu-item.icon-key{background-image:url(../img/key.png)}.dropzone{border:1px solid rgba(0,0,0,.03);min-height:360px;border-radius:3px;background:rgba(0,0,0,.03);padding:23px}.dropzone .dz-success *{cursor:pointer!important}.dropzone .dz-default.dz-message{opacity:1;-ms-filter:none;filter:none;transition:opacity .3s ease-in-out;background-repeat:no-repeat;background-position:0 0;position:absolute;width:428px;height:123px;margin-left:-214px;margin-top:-61.5px;top:50%;left:50%}.btn-primary,.btn-primary.disabled,.btn-primary[disabled]{background-color:#333}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover{background-color:#222} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/dialog.php b/libraries/filemanager-9.12.1/dialog.php deleted file mode 100644 index 425af26..0000000 --- a/libraries/filemanager-9.12.1/dialog.php +++ /dev/null @@ -1,1204 +0,0 @@ -isDir($ftp_base_folder.$upload_dir.$rfm_subfolder.$subdir)) || (!$ftp && !file_exists($current_path.$rfm_subfolder.$subdir))) -{ - $subdir = ''; - $rfm_subfolder = ""; -} - - -$cur_dir = $upload_dir.$rfm_subfolder.$subdir; -$cur_path = $current_path.$rfm_subfolder.$subdir; -$thumbs_path = $thumbs_base_path.$rfm_subfolder; -$parent = $rfm_subfolder.$subdir; - -if($ftp){ - $cur_dir = $ftp_base_folder.$cur_dir; - $cur_path = str_replace(array('/..','..'),'',$cur_dir); - $thumbs_path = str_replace(array('/..','..'),'',$ftp_base_folder.$ftp_thumbs_dir.$rfm_subfolder); - $parent = $ftp_base_folder.$parent; -} - -if(!$ftp){ - $cycle = TRUE; - $max_cycles = 50; - $i = 0; - while($cycle && $i < $max_cycles){ - $i++; - if ($parent=="./") $parent=""; - - if (file_exists($current_path.$parent."config.php")) - { - $configTemp = include $current_path.$parent.'config.php'; - $config = $config + $configTemp; - extract($config, EXTR_OVERWRITE); - $cycle = FALSE; - } - - if ($parent == "") $cycle = FALSE; - else $parent = fix_dirname($parent)."/"; - } - - if (!is_dir($thumbs_path.$subdir)) - { - create_folder(FALSE, $thumbs_path.$subdir); - } -} -if (isset($_GET['callback'])) -{ - $callback = strip_tags($_GET['callback']); -} -else $callback=0; -if (isset($_GET['popup'])) -{ - $popup = strip_tags($_GET['popup']); -} else $popup=0; -//Sanitize popup -$popup=!!$popup; - -if (isset($_GET['crossdomain'])) -{ - $crossdomain = strip_tags($_GET['crossdomain']); -} else $crossdomain=0; - -//Sanitize crossdomain -$crossdomain=!!$crossdomain; - -//view type -if(!isset($_SESSION['RF']["view_type"])) -{ - $view = $default_view; - $_SESSION['RF']["view_type"] = $view; -} - -if (isset($_GET['view'])) -{ - $view = fix_get_params($_GET['view']); - $_SESSION['RF']["view_type"] = $view; -} - -$view = $_SESSION['RF']["view_type"]; - -//filter -$filter = ""; -if(isset($_SESSION['RF']["filter"])) -{ - $filter = $_SESSION['RF']["filter"]; -} - -if(isset($_GET["filter"])) -{ - $filter = fix_get_params($_GET["filter"]); -} - -if (!isset($_SESSION['RF']['sort_by'])) -{ - $_SESSION['RF']['sort_by'] = 'name'; -} - -if (isset($_GET["sort_by"])) -{ - $sort_by = $_SESSION['RF']['sort_by'] = fix_get_params($_GET["sort_by"]); -} else $sort_by = $_SESSION['RF']['sort_by']; - - -if (!isset($_SESSION['RF']['descending'])) -{ - $_SESSION['RF']['descending'] = TRUE; -} - -if (isset($_GET["descending"])) -{ - $descending = $_SESSION['RF']['descending'] = fix_get_params($_GET["descending"])==1; -} else { - $descending = $_SESSION['RF']['descending']; -} - -$boolarray = Array(false => 'false', true => 'true'); - -$return_relative_url = isset($_GET['relative_url']) && $_GET['relative_url'] == "1" ? true : false; - -if (!isset($_GET['type'])){ - $_GET['type'] = 0; -} - -$extensions=null; -if (isset($_GET['extensions'])){ - $extensions = json_decode(urldecode($_GET['extensions'])); - if($extensions){ - $ext = $extensions; - $show_filter_buttons = false; - } -} - -if (isset($_GET['editor'])) -{ - $editor = strip_tags($_GET['editor']); -} else { - if($_GET['type']==0){ - $editor=false; - } else { - $editor='tinymce'; - } -} - -if (!isset($_GET['field_id'])) $_GET['field_id'] = ''; - -$field_id = isset($_GET['field_id']) ? fix_get_params($_GET['field_id']) : ''; -$type_param = fix_get_params($_GET['type']); - -if ($type_param==1) $apply = 'apply_img'; -elseif($type_param==2) $apply = 'apply_link'; -elseif($type_param==0 && $_GET['field_id']=='') $apply = 'apply_none'; -elseif($type_param==3) $apply = 'apply_video'; -else $apply = 'apply'; - -$get_params = array( - 'editor' => $editor, - 'type' => $type_param, - 'lang' => $lang, - 'popup' => $popup, - 'crossdomain' => $crossdomain, - 'extensions' => ($extensions) ? urlencode(json_encode($extensions)) : null , - 'field_id' => $field_id, - 'relative_url' => $return_relative_url, - 'akey' => (isset($_GET['akey']) && $_GET['akey'] != '' ? $_GET['akey'] : 'key') -); -if(isset($_GET['CKEditorFuncNum'])){ - $get_params['CKEditorFuncNum'] = $_GET['CKEditorFuncNum']; - $get_params['CKEditor'] = (isset($_GET['CKEditor'])? $_GET['CKEditor'] : ''); -} -$get_params['fldr'] =''; - -$get_params = http_build_query($get_params); -?> - - - - - - - -
"; - var_dump($input); - echo ""; - - if ($trace) - { - if (is_php('5.3.6')) - { - $debug = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - } - else - { - $debug = debug_backtrace(false); - } - - echo "
"; - var_dump($debug); - echo ""; - } - - echo ""; - echo "---------------------------

RESPONSIVE filemanager v.'+k+'
responsivefilemanager.com
Copyright © Tecrail - Alberto Peripolli. All rights reserved.
License
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
jPlayer events that have occurred over the past 1 second:'
- + '
(Backgrounds: Never occurred Occurred before Occurred Multiple occurrences reset)
Update jPlayer Inspector
' - + '' - + 'This jPlayer instance is running in your browser where:
"
-
- for(i = 0; i < $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions.length; i++) {
- var solution = $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions[i];
- jPlayerInfo += " jPlayer's " + solution + " solution is";
- if($(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].used) {
- jPlayerInfo += " being used and will support:";
- for(format in $(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].support) {
- if($(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].support[format]) {
- jPlayerInfo += " " + format;
- }
- }
- jPlayerInfo += "
";
- } else {
- jPlayerInfo += " not required
";
- }
- }
- jPlayerInfo += "
status.formatType = '" + formatType + "'
";
- if(formatType) {
- jPlayerInfo += "Browser canPlay('" + $.jPlayer.prototype.format[formatType].codec + "')";
- } else {
- jPlayerInfo += "
status.src = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src + "'
status.media = {
";
- for(prop in $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media) {
- jPlayerInfo += " " + prop + ": " + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media[prop] + "
"; // Some are strings
- }
- jPlayerInfo += "};
";
- jPlayerInfo += "status.videoWidth = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoWidth + "'";
- jPlayerInfo += " | status.videoHeight = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoHeight + "'";
- jPlayerInfo += "status.width = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.width + "'";
- jPlayerInfo += " | status.height = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.height + "'";
- jPlayerInfo += "
Raw browser test for HTML5 support. Should equal a function if HTML5 is available.
";
- if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.audio.available) {
- jPlayerInfo += "htmlElement.audio.canPlayType = " + (typeof $(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.audio.canPlayType) +"
"
- }
- if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.video.available) {
- jPlayerInfo += "htmlElement.video.canPlayType = " + (typeof $(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.video.canPlayType) +"";
- }
- jPlayerInfo += "
This instance is using the constructor options:
"
- + "$('#" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").internal.self.id + "').jPlayer({
"
-
- + " swfPath: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "swfPath") + "',
"
-
- + " solution: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "solution") + "',
"
-
- + " supplied: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "supplied") + "',
"
-
- + " preload: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "preload") + "',
"
-
- + " volume: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "volume") + ",
"
-
- + " muted: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "muted") + ",
"
-
- + " backgroundColor: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "backgroundColor") + "',
"
-
- + " cssSelectorAncestor: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelectorAncestor") + "',
"
-
- + " cssSelector: {";
-
- var cssSelector = $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector");
- for(prop in cssSelector) {
-
- // jPlayerInfo += "
" + prop + ": '" + cssSelector[prop] + "'," // This works too of course, but want to use option method for deep keys.
- jPlayerInfo += "
" + prop + ": '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector." + prop) + "',"
- }
-
- jPlayerInfo = jPlayerInfo.slice(0, -1); // Because the sloppy comma was bugging me.
-
- jPlayerInfo += "
},
"
-
- + " errorAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "errorAlerts") + ",
"
-
- + " warningAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "warningAlerts") + "
"
-
- + "});
jPlayer is " + - ($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.paused ? "paused" : "playing") + - " at time: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentTime*10)/10 + "s." + - " (d: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.duration*10)/10 + "s" + - ", sp: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.seekPercent) + "%" + - ", cpr: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentRelative) + "%" + - ", cpa: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentAbsolute) + "%)
" - ); - return this; - } - }; - $.fn.jPlayerInspector = function( method ) { - // Method calling logic - if ( methods[method] ) { - return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); - } else if ( typeof method === 'object' || ! method ) { - return methods.init.apply( this, arguments ); - } else { - $.error( 'Method ' + method + ' does not exist on jQuery.jPlayerInspector' ); - } - }; -})(jQuery); diff --git a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jquery.jplayer.inspector.min.js b/libraries/filemanager-9.12.1/js/jPlayer/add-on/jquery.jplayer.inspector.min.js deleted file mode 100644 index 69925c8..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jquery.jplayer.inspector.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jPlayerInspector for jPlayer 2.9.2 ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ -!function(a,b){a.jPlayerInspector={},a.jPlayerInspector.i=0,a.jPlayerInspector.defaults={jPlayer:b,idPrefix:"jplayer_inspector_",visible:!1};var c={init:function(b){var c=a(this),d=a.extend({},a.jPlayerInspector.defaults,b);a(this).data("jPlayerInspector",d),d.id=a(this).attr("id"),d.jPlayerId=d.jPlayer.attr("id"),d.windowId=d.idPrefix+"window_"+a.jPlayerInspector.i,d.statusId=d.idPrefix+"status_"+a.jPlayerInspector.i,d.configId=d.idPrefix+"config_"+a.jPlayerInspector.i,d.toggleId=d.idPrefix+"toggle_"+a.jPlayerInspector.i,d.eventResetId=d.idPrefix+"event_reset_"+a.jPlayerInspector.i,d.updateId=d.idPrefix+"update_"+a.jPlayerInspector.i,d.eventWindowId=d.idPrefix+"event_window_"+a.jPlayerInspector.i,d.eventId={},d.eventJq={},d.eventTimeout={},d.eventOccurrence={},a.each(a.jPlayer.event,function(b,c){d.eventId[c]=d.idPrefix+"event_"+b+"_"+a.jPlayerInspector.i,d.eventOccurrence[c]=0});var e=''+(d.visible?"Hide":"Show")+' jPlayer Inspector
jPlayer events that have occurred over the past 1 second:
(Backgrounds: Never occurred Occurred before Occurred Multiple occurrences reset)
Update jPlayer Inspector
This jPlayer instance is running in your browser where:
";for(i=0;i"+c+" solution is",a(this).data("jPlayerInspector").jPlayer.data("jPlayer")[c].used){b+=" being used and will support:";for(format in a(this).data("jPlayerInspector").jPlayer.data("jPlayer")[c].support)a(this).data("jPlayerInspector").jPlayer.data("jPlayer")[c].support[format]&&(b+=" "+format);b+="
"}else b+=" not required
"}b+="
status.formatType = '"+d+"'
",b+=d?"Browser canPlay('"+a.jPlayer.prototype.format[d].codec+"')":"
status.src = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src+"'
status.media = {
";for(prop in a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media)b+=" "+prop+": "+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media[prop]+"
";b+="};
",b+="status.videoWidth = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoWidth+"'",b+=" | status.videoHeight = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoHeight+"'",b+="status.width = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.width+"'",b+=" | status.height = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.height+"'",b+="
htmlElement.audio.canPlayType = "+typeof a(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.audio.canPlayType+"htmlElement.video.canPlayType = "+typeof a(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.video.canPlayType+""),b+="",b+="This instance is using the constructor options:$('#"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").internal.self.id+"').jPlayer({
swfPath: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","swfPath")+"',
solution: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","solution")+"',
supplied: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","supplied")+"',
preload: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","preload")+"',
volume: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","volume")+",
muted: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","muted")+",
backgroundColor: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","backgroundColor")+"',
cssSelectorAncestor: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelectorAncestor")+"',
cssSelector: {";var e=a(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector");for(prop in e)b+="
"+prop+": '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector."+prop)+"',";return b=b.slice(0,-1),b+="
},
errorAlerts: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","errorAlerts")+",
warningAlerts: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","warningAlerts")+"
});
jPlayer is "+(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.paused?"paused":"playing")+" at time: "+Math.floor(10*a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentTime)/10+"s. (d: "+Math.floor(10*a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.duration)/10+"s, sp: "+Math.floor(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.seekPercent)+"%, cpr: "+Math.floor(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentRelative)+"%, cpa: "+Math.floor(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentAbsolute)+"%)
"),this}};a.fn.jPlayerInspector=function(b){return c[b]?c[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.jPlayerInspector"):c.init.apply(this,arguments)}}(jQuery); \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jplayer.jquery.json b/libraries/filemanager-9.12.1/js/jPlayer/jplayer.jquery.json deleted file mode 100644 index 3b7b437..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/jplayer.jquery.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "jplayer", - "title": "jPlayer : HTML5 Audio & Video", - "description": "jPlayer allows you to create a media player with a consistent interface and experience across all browsers.", - "keywords": [ - "audio", - "video", - "media", - "player", - "jplayer", - "html5", - "streaming" - ], - "version": "2.4.0", - "author": { - "name": "Mark J Panaghiston", - "url": "http://happyworm.com/" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/happyworm/jPlayer/blob/master/MIT-LICENSE.txt" - } - ], - "dependencies": { - "jquery": ">=1.7" - }, - "homepage": "http://jplayer.org/", - "demo": "http://jplayer.org/latest/demos/", - "docs": "http://jplayer.org/latest/developer-guide/", - "download": "http://jplayer.org/download/", - "bugs": "https://github.com/happyworm/jPlayer/issues" -} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.js b/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.js deleted file mode 100644 index 842f31b..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.js +++ /dev/null @@ -1,3506 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2014 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Version: 2.9.2 - * Date: 14th December 2014 - */ - -/* Support for Zepto 1.0 compiled with optional data module. - * For AMD or NODE/CommonJS support, you will need to manually switch the related 2 lines in the code below. - * Search terms: "jQuery Switch" and "Zepto Switch" - */ - -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], factory); // jQuery Switch - // define(['zepto'], factory); // Zepto Switch - } else if (typeof exports === 'object') { - // Node/CommonJS - factory(require('jquery')); // jQuery Switch - //factory(require('zepto')); // Zepto Switch - } else { - // Browser globals - if(root.jQuery) { // Use jQuery if available - factory(root.jQuery); - } else { // Otherwise, use Zepto - factory(root.Zepto); - } - } -}(this, function ($, undefined) { - - // Adapted from jquery.ui.widget.js (1.8.7): $.widget.bridge - Tweaked $.data(this,XYZ) to $(this).data(XYZ) for Zepto - $.fn.jPlayer = function( options ) { - var name = "jPlayer"; - var isMethodCall = typeof options === "string", - args = Array.prototype.slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.extend.apply( null, [ true, options ].concat(args) ) : - options; - - // prevent calls to internal methods - if ( isMethodCall && options.charAt( 0 ) === "_" ) { - return returnValue; - } - - if ( isMethodCall ) { - this.each(function() { - var instance = $(this).data( name ), - methodValue = instance && $.isFunction( instance[options] ) ? - instance[ options ].apply( instance, args ) : - instance; - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $(this).data( name ); - if ( instance ) { - // instance.option( options || {} )._init(); // Orig jquery.ui.widget.js code: Not recommend for jPlayer. ie., Applying new options to an existing instance (via the jPlayer constructor) and performing the _init(). The _init() is what concerns me. It would leave a lot of event handlers acting on jPlayer instance and the interface. - instance.option( options || {} ); // The new constructor only changes the options. Changing options only has basic support atm. - } else { - $(this).data( name, new $.jPlayer( options, this ) ); - } - }); - } - - return returnValue; - }; - - $.jPlayer = function( options, element ) { - // allow instantiation without initializing for simple inheritance - if ( arguments.length ) { - this.element = $(element); - this.options = $.extend(true, {}, - this.options, - options - ); - var self = this; - this.element.bind( "remove.jPlayer", function() { - self.destroy(); - }); - this._init(); - } - }; - // End of: (Adapted from jquery.ui.widget.js (1.8.7)) - - // Zepto is missing one of the animation methods. - if(typeof $.fn.stop !== 'function') { - $.fn.stop = function() {}; - } - - // Emulated HTML5 methods and properties - $.jPlayer.emulateMethods = "load play pause"; - $.jPlayer.emulateStatus = "src readyState networkState currentTime duration paused ended playbackRate"; - $.jPlayer.emulateOptions = "muted volume"; - - // Reserved event names generated by jPlayer that are not part of the HTML5 Media element spec - $.jPlayer.reservedEvent = "ready flashreset resize repeat error warning"; - - // Events generated by jPlayer - $.jPlayer.event = {}; - $.each( - [ - 'ready', - 'setmedia', // Fires when the media is set - 'flashreset', // Similar to the ready event if the Flash solution is set to display:none and then shown again or if it's reloaded for another reason by the browser. For example, using CSS position:fixed on Firefox for the full screen feature. - 'resize', // Occurs when the size changes through a full/restore screen operation or if the size/sizeFull options are changed. - 'repeat', // Occurs when the repeat status changes. Usually through clicks on the repeat button of the interface. - 'click', // Occurs when the user clicks on one of the following: poster image, html video, flash video. - 'error', // Event error code in event.jPlayer.error.type. See $.jPlayer.error - 'warning', // Event warning code in event.jPlayer.warning.type. See $.jPlayer.warning - - // Other events match HTML5 spec. - 'loadstart', - 'progress', - 'suspend', - 'abort', - 'emptied', - 'stalled', - 'play', - 'pause', - 'loadedmetadata', - 'loadeddata', - 'waiting', - 'playing', - 'canplay', - 'canplaythrough', - 'seeking', - 'seeked', - 'timeupdate', - 'ended', - 'ratechange', - 'durationchange', - 'volumechange' - ], - function() { - $.jPlayer.event[ this ] = 'jPlayer_' + this; - } - ); - - $.jPlayer.htmlEvent = [ // These HTML events are bubbled through to the jPlayer event, without any internal action. - "loadstart", - // "progress", // jPlayer uses internally before bubbling. - // "suspend", // jPlayer uses internally before bubbling. - "abort", - // "error", // jPlayer uses internally before bubbling. - "emptied", - "stalled", - // "play", // jPlayer uses internally before bubbling. - // "pause", // jPlayer uses internally before bubbling. - "loadedmetadata", - // "loadeddata", // jPlayer uses internally before bubbling. - // "waiting", // jPlayer uses internally before bubbling. - // "playing", // jPlayer uses internally before bubbling. - "canplay", - "canplaythrough" - // "seeking", // jPlayer uses internally before bubbling. - // "seeked", // jPlayer uses internally before bubbling. - // "timeupdate", // jPlayer uses internally before bubbling. - // "ended", // jPlayer uses internally before bubbling. - // "ratechange" // jPlayer uses internally before bubbling. - // "durationchange" // jPlayer uses internally before bubbling. - // "volumechange" // jPlayer uses internally before bubbling. - ]; - - $.jPlayer.pause = function() { - $.jPlayer.prototype.destroyRemoved(); - $.each($.jPlayer.prototype.instances, function(i, element) { - if(element.data("jPlayer").status.srcSet) { // Check that media is set otherwise would cause error event. - element.jPlayer("pause"); - } - }); - }; - - // Default for jPlayer option.timeFormat - $.jPlayer.timeFormat = { - showHour: false, - showMin: true, - showSec: true, - padHour: false, - padMin: true, - padSec: true, - sepHour: ":", - sepMin: ":", - sepSec: "" - }; - var ConvertTime = function() { - this.init(); - }; - ConvertTime.prototype = { - init: function() { - this.options = { - timeFormat: $.jPlayer.timeFormat - }; - }, - time: function(s) { // function used on jPlayer.prototype._convertTime to enable per instance options. - s = (s && typeof s === 'number') ? s : 0; - - var myTime = new Date(s * 1000), - hour = myTime.getUTCHours(), - min = this.options.timeFormat.showHour ? myTime.getUTCMinutes() : myTime.getUTCMinutes() + hour * 60, - sec = this.options.timeFormat.showMin ? myTime.getUTCSeconds() : myTime.getUTCSeconds() + min * 60, - strHour = (this.options.timeFormat.padHour && hour < 10) ? "0" + hour : hour, - strMin = (this.options.timeFormat.padMin && min < 10) ? "0" + min : min, - strSec = (this.options.timeFormat.padSec && sec < 10) ? "0" + sec : sec, - strTime = ""; - - strTime += this.options.timeFormat.showHour ? strHour + this.options.timeFormat.sepHour : ""; - strTime += this.options.timeFormat.showMin ? strMin + this.options.timeFormat.sepMin : ""; - strTime += this.options.timeFormat.showSec ? strSec + this.options.timeFormat.sepSec : ""; - - return strTime; - } - }; - var myConvertTime = new ConvertTime(); - $.jPlayer.convertTime = function(s) { - return myConvertTime.time(s); - }; - - // Adapting jQuery 1.4.4 code for jQuery.browser. Required since jQuery 1.3.2 does not detect Chrome as webkit. - $.jPlayer.uaBrowser = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rwebkit = /(webkit)[ \/]([\w.]+)/; - var ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/; - var rmsie = /(msie) ([\w.]+)/; - var rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/; - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }; - - // Platform sniffer for detecting mobile devices - $.jPlayer.uaPlatform = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rplatform = /(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/; - var rtablet = /(ipad|playbook)/; - var randroid = /(android)/; - var rmobile = /(mobile)/; - - var platform = rplatform.exec( ua ) || []; - var tablet = rtablet.exec( ua ) || - !rmobile.exec( ua ) && randroid.exec( ua ) || - []; - - if(platform[1]) { - platform[1] = platform[1].replace(/\s/g, "_"); // Change whitespace to underscore. Enables dot notation. - } - - return { platform: platform[1] || "", tablet: tablet[1] || "" }; - }; - - $.jPlayer.browser = { - }; - $.jPlayer.platform = { - }; - - var browserMatch = $.jPlayer.uaBrowser(navigator.userAgent); - if ( browserMatch.browser ) { - $.jPlayer.browser[ browserMatch.browser ] = true; - $.jPlayer.browser.version = browserMatch.version; - } - var platformMatch = $.jPlayer.uaPlatform(navigator.userAgent); - if ( platformMatch.platform ) { - $.jPlayer.platform[ platformMatch.platform ] = true; - $.jPlayer.platform.mobile = !platformMatch.tablet; - $.jPlayer.platform.tablet = !!platformMatch.tablet; - } - - // Internet Explorer (IE) Browser Document Mode Sniffer. Based on code at: - // http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx#GetMode - $.jPlayer.getDocMode = function() { - var docMode; - if ($.jPlayer.browser.msie) { - if (document.documentMode) { // IE8 or later - docMode = document.documentMode; - } else { // IE 5-7 - docMode = 5; // Assume quirks mode unless proven otherwise - if (document.compatMode) { - if (document.compatMode === "CSS1Compat") { - docMode = 7; // standards mode - } - } - } - } - return docMode; - }; - $.jPlayer.browser.documentMode = $.jPlayer.getDocMode(); - - $.jPlayer.nativeFeatures = { - init: function() { - - /* Fullscreen function naming influenced by W3C naming. - * No support for: Mozilla Proposal: https://wiki.mozilla.org/Gecko:FullScreenAPI - */ - - var d = document, - v = d.createElement('video'), - spec = { - // http://www.w3.org/TR/fullscreen/ - w3c: [ - 'fullscreenEnabled', - 'fullscreenElement', - 'requestFullscreen', - 'exitFullscreen', - 'fullscreenchange', - 'fullscreenerror' - ], - // https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode - moz: [ - 'mozFullScreenEnabled', - 'mozFullScreenElement', - 'mozRequestFullScreen', - 'mozCancelFullScreen', - 'mozfullscreenchange', - 'mozfullscreenerror' - ], - // http://developer.apple.com/library/safari/#documentation/WebKit/Reference/ElementClassRef/Element/Element.html - // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html - webkit: [ - '', - 'webkitCurrentFullScreenElement', - 'webkitRequestFullScreen', - 'webkitCancelFullScreen', - 'webkitfullscreenchange', - '' - ], - // http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html - // https://developer.apple.com/library/safari/samplecode/HTML5VideoEventFlow/Listings/events_js.html#//apple_ref/doc/uid/DTS40010085-events_js-DontLinkElementID_5 - // Events: 'webkitbeginfullscreen' and 'webkitendfullscreen' - webkitVideo: [ - 'webkitSupportsFullscreen', - 'webkitDisplayingFullscreen', - 'webkitEnterFullscreen', - 'webkitExitFullscreen', - '', - '' - ], - ms: [ - '', - 'msFullscreenElement', - 'msRequestFullscreen', - 'msExitFullscreen', - 'MSFullscreenChange', - 'MSFullscreenError' - ] - }, - specOrder = [ - 'w3c', - 'moz', - 'webkit', - 'webkitVideo', - 'ms' - ], - fs, i, il; - - this.fullscreen = fs = { - support: { - w3c: !!d[spec.w3c[0]], - moz: !!d[spec.moz[0]], - webkit: typeof d[spec.webkit[3]] === 'function', - webkitVideo: typeof v[spec.webkitVideo[2]] === 'function', - ms: typeof v[spec.ms[2]] === 'function' - }, - used: {} - }; - - // Store the name of the spec being used and as a handy boolean. - for(i = 0, il = specOrder.length; i < il; i++) { - var n = specOrder[i]; - if(fs.support[n]) { - fs.spec = n; - fs.used[n] = true; - break; - } - } - - if(fs.spec) { - var s = spec[fs.spec]; - fs.api = { - fullscreenEnabled: true, - fullscreenElement: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[1]]; - }, - requestFullscreen: function(elem) { - return elem[s[2]](); // Chrome and Opera want parameter (Element.ALLOW_KEYBOARD_INPUT) but Safari fails if flag used. - }, - exitFullscreen: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[3]](); - } - }; - fs.event = { - fullscreenchange: s[4], - fullscreenerror: s[5] - }; - } else { - fs.api = { - fullscreenEnabled: false, - fullscreenElement: function() { - return null; - }, - requestFullscreen: function() {}, - exitFullscreen: function() {} - }; - fs.event = {}; - } - } - }; - $.jPlayer.nativeFeatures.init(); - - // The keyboard control system. - - // The current jPlayer instance in focus. - $.jPlayer.focus = null; - - // The list of element node names to ignore with key controls. - $.jPlayer.keyIgnoreElementNames = "A INPUT TEXTAREA SELECT BUTTON"; - - // The function that deals with key presses. - var keyBindings = function(event) { - var f = $.jPlayer.focus, - ignoreKey; - - // A jPlayer instance must be in focus. ie., keyEnabled and the last one played. - if(f) { - // What generated the key press? - $.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) { - // The strings should already be uppercase. - if(event.target.nodeName.toUpperCase() === name.toUpperCase()) { - ignoreKey = true; - return false; // exit each. - } - }); - if(!ignoreKey) { - // See if the key pressed matches any of the bindings. - $.each(f.options.keyBindings, function(action, binding) { - // The binding could be a null when the default has been disabled. ie., 1st clause in if() - if( - (binding && $.isFunction(binding.fn)) && - ((typeof binding.key === 'number' && event.which === binding.key) || - (typeof binding.key === 'string' && event.key === binding.key)) - ) { - event.preventDefault(); // Key being used by jPlayer, so prevent default operation. - binding.fn(f); - return false; // exit each. - } - }); - } - } - }; - - $.jPlayer.keys = function(en) { - var event = "keydown.jPlayer"; - // Remove any binding, just in case enabled more than once. - $(document.documentElement).unbind(event); - if(en) { - $(document.documentElement).bind(event, keyBindings); - } - }; - - // Enable the global key control handler ready for any jPlayer instance with the keyEnabled option enabled. - $.jPlayer.keys(true); - - $.jPlayer.prototype = { - count: 0, // Static Variable: Change it via prototype. - version: { // Static Object - script: "2.9.2", - needFlash: "2.9.0", - flash: "unknown" - }, - options: { // Instanced in $.jPlayer() constructor - swfPath: "js", // Path to jquery.jplayer.swf. Can be relative, absolute or server root relative. - solution: "html, flash", // Valid solutions: html, flash, aurora. Order defines priority. 1st is highest, - supplied: "mp3", // Defines which formats jPlayer will try and support and the priority by the order. 1st is highest, - auroraFormats: "wav", // List the aurora.js codecs being loaded externally. Its core supports "wav". Specify format in jPlayer context. EG., The aac.js codec gives the "m4a" format. - preload: 'metadata', // HTML5 Spec values: none, metadata, auto. - volume: 0.8, // The volume. Number 0 to 1. - muted: false, - remainingDuration: false, // When true, the remaining time is shown in the duration GUI element. - toggleDuration: false, // When true, clicks on the duration toggle between the duration and remaining display. - captureDuration: true, // When true, clicks on the duration are captured and no longer propagate up the DOM. - playbackRate: 1, - defaultPlaybackRate: 1, - minPlaybackRate: 0.5, - maxPlaybackRate: 4, - wmode: "opaque", // Valid wmode: window, transparent, opaque, direct, gpu. - backgroundColor: "#000000", // To define the jPlayer div and Flash background color. - cssSelectorAncestor: "#jp_container_1", - cssSelector: { // * denotes properties that should only be required when video media type required. _cssSelector() would require changes to enable splitting these into Audio and Video defaults. - videoPlay: ".jp-video-play", // * - play: ".jp-play", - pause: ".jp-pause", - stop: ".jp-stop", - seekBar: ".jp-seek-bar", - playBar: ".jp-play-bar", - mute: ".jp-mute", - unmute: ".jp-unmute", - volumeBar: ".jp-volume-bar", - volumeBarValue: ".jp-volume-bar-value", - volumeMax: ".jp-volume-max", - playbackRateBar: ".jp-playback-rate-bar", - playbackRateBarValue: ".jp-playback-rate-bar-value", - currentTime: ".jp-current-time", - duration: ".jp-duration", - title: ".jp-title", - fullScreen: ".jp-full-screen", // * - restoreScreen: ".jp-restore-screen", // * - repeat: ".jp-repeat", - repeatOff: ".jp-repeat-off", - gui: ".jp-gui", // The interface used with autohide feature. - noSolution: ".jp-no-solution" // For error feedback when jPlayer cannot find a solution. - }, - stateClass: { // Classes added to the cssSelectorAncestor to indicate the state. - playing: "jp-state-playing", - seeking: "jp-state-seeking", - muted: "jp-state-muted", - looped: "jp-state-looped", - fullScreen: "jp-state-full-screen", - noVolume: "jp-state-no-volume" - }, - useStateClassSkin: false, // A state class skin relies on the state classes to change the visual appearance. The single control toggles the effect, for example: play then pause, mute then unmute. - autoBlur: true, // GUI control handlers will drop focus after clicks. - smoothPlayBar: false, // Smooths the play bar transitions, which affects clicks and short media with big changes per second. - fullScreen: false, // Native Full Screen - fullWindow: false, - autohide: { - restored: false, // Controls the interface autohide feature. - full: true, // Controls the interface autohide feature. - fadeIn: 200, // Milliseconds. The period of the fadeIn anim. - fadeOut: 600, // Milliseconds. The period of the fadeOut anim. - hold: 1000 // Milliseconds. The period of the pause before autohide beings. - }, - loop: false, - repeat: function(event) { // The default jPlayer repeat event handler - if(event.jPlayer.options.loop) { - $(this).unbind(".jPlayerRepeat").bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() { - $(this).jPlayer("play"); - }); - } else { - $(this).unbind(".jPlayerRepeat"); - } - }, - nativeVideoControls: { - // Works well on standard browsers. - // Phone and tablet browsers can have problems with the controls disappearing. - }, - noFullWindow: { - msie: /msie [0-6]\./, - ipad: /ipad.*?os [0-4]\./, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android [0-3]\.(?!.*?mobile)/, - android_phone: /(?=.*android)(?!.*chrome)(?=.*mobile)/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/ - }, - noVolume: { - ipad: /ipad/, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android(?!.*?mobile)/, - android_phone: /android.*?mobile/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/, - playbook: /playbook/ - }, - timeFormat: { - // Specific time format for this instance. The supported options are defined in $.jPlayer.timeFormat - // For the undefined options we use the default from $.jPlayer.timeFormat - }, - keyEnabled: false, // Enables keyboard controls. - audioFullScreen: false, // Enables keyboard controls to enter full screen with audio media. - keyBindings: { // The key control object, defining the key codes and the functions to execute. - // The parameter, f = $.jPlayer.focus, will be checked truethy before attempting to call any of these functions. - // Properties may be added to this object, in key/fn pairs, to enable other key controls. EG, for the playlist add-on. - play: { - key: 80, // p - fn: function(f) { - if(f.status.paused) { - f.play(); - } else { - f.pause(); - } - } - }, - fullScreen: { - key: 70, // f - fn: function(f) { - if(f.status.video || f.options.audioFullScreen) { - f._setOption("fullScreen", !f.options.fullScreen); - } - } - }, - muted: { - key: 77, // m - fn: function(f) { - f._muted(!f.options.muted); - } - }, - volumeUp: { - key: 190, // . - fn: function(f) { - f.volume(f.options.volume + 0.1); - } - }, - volumeDown: { - key: 188, // , - fn: function(f) { - f.volume(f.options.volume - 0.1); - } - }, - loop: { - key: 76, // l - fn: function(f) { - f._loop(!f.options.loop); - } - } - }, - verticalVolume: false, // Calculate volume from the bottom of the volume bar. Default is from the left. Also volume affects either width or height. - verticalPlaybackRate: false, - globalVolume: false, // Set to make volume and muted changes affect all jPlayer instances with this option enabled - idPrefix: "jp", // Prefix for the ids of html elements created by jPlayer. For flash, this must not include characters: . - + * / \ - noConflict: "jQuery", - emulateHtml: false, // Emulates the HTML5 Media element on the jPlayer element. - consoleAlerts: true, // Alerts are sent to the console.log() instead of alert(). - errorAlerts: false, - warningAlerts: false - }, - optionsAudio: { - size: { - width: "0px", - height: "0px", - cssClass: "" - }, - sizeFull: { - width: "0px", - height: "0px", - cssClass: "" - } - }, - optionsVideo: { - size: { - width: "480px", - height: "270px", - cssClass: "jp-video-270p" - }, - sizeFull: { - width: "100%", - height: "100%", - cssClass: "jp-video-full" - } - }, - instances: {}, // Static Object - status: { // Instanced in _init() - src: "", - media: {}, - paused: true, - format: {}, - formatType: "", - waitForPlay: true, // Same as waitForLoad except in case where preloading. - waitForLoad: true, - srcSet: false, - video: false, // True if playing a video - seekPercent: 0, - currentPercentRelative: 0, - currentPercentAbsolute: 0, - currentTime: 0, - duration: 0, - remaining: 0, - videoWidth: 0, // Intrinsic width of the video in pixels. - videoHeight: 0, // Intrinsic height of the video in pixels. - readyState: 0, - networkState: 0, - playbackRate: 1, // Warning - Now both an option and a status property - ended: 0 - -/* Persistant status properties created dynamically at _init(): - width - height - cssClass - nativeVideoControls - noFullWindow - noVolume - playbackRateEnabled // Warning - Technically, we can have both Flash and HTML, so this might not be correct if the Flash is active. That is a niche case. -*/ - }, - - internal: { // Instanced in _init() - ready: false - // instance: undefined - // domNode: undefined - // htmlDlyCmdId: undefined - // autohideId: undefined - // mouse: undefined - // cmdsIgnored - }, - solution: { // Static Object: Defines the solutions built in jPlayer. - html: true, - aurora: true, - flash: true - }, - // 'MPEG-4 support' : canPlayType('video/mp4; codecs="mp4v.20.8"') - format: { // Static Object - mp3: { - codec: 'audio/mpeg', - flashCanPlay: true, - media: 'audio' - }, - m4a: { // AAC / MP4 - codec: 'audio/mp4; codecs="mp4a.40.2"', - flashCanPlay: true, - media: 'audio' - }, - m3u8a: { // AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="mp4a.40.2"', - flashCanPlay: false, - media: 'audio' - }, - m3ua: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'audio' - }, - oga: { // OGG - codec: 'audio/ogg; codecs="vorbis, opus"', - flashCanPlay: false, - media: 'audio' - }, - flac: { // FLAC - codec: 'audio/x-flac', - flashCanPlay: false, - media: 'audio' - }, - wav: { // PCM - codec: 'audio/wav; codecs="1"', - flashCanPlay: false, - media: 'audio' - }, - webma: { // WEBM - codec: 'audio/webm; codecs="vorbis"', - flashCanPlay: false, - media: 'audio' - }, - fla: { // FLV / F4A - codec: 'audio/x-flv', - flashCanPlay: true, - media: 'audio' - }, - rtmpa: { // RTMP AUDIO - codec: 'audio/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'audio' - }, - m4v: { // H.264 / MP4 - codec: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: true, - media: 'video' - }, - m3u8v: { // H.264 / AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: false, - media: 'video' - }, - m3uv: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'video' - }, - ogv: { // OGG - codec: 'video/ogg; codecs="theora, vorbis"', - flashCanPlay: false, - media: 'video' - }, - webmv: { // WEBM - codec: 'video/webm; codecs="vorbis, vp8"', - flashCanPlay: false, - media: 'video' - }, - flv: { // FLV / F4V - codec: 'video/x-flv', - flashCanPlay: true, - media: 'video' - }, - rtmpv: { // RTMP VIDEO - codec: 'video/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'video' - } - }, - _init: function() { - var self = this; - - this.element.empty(); - - this.status = $.extend({}, this.status); // Copy static to unique instance. - this.internal = $.extend({}, this.internal); // Copy static to unique instance. - - // Initialize the time format - this.options.timeFormat = $.extend({}, $.jPlayer.timeFormat, this.options.timeFormat); - - // On iOS, assume commands will be ignored before user initiates them. - this.internal.cmdsIgnored = $.jPlayer.platform.ipad || $.jPlayer.platform.iphone || $.jPlayer.platform.ipod; - - this.internal.domNode = this.element.get(0); - - // Add key bindings focus to 1st jPlayer instanced with key control enabled. - if(this.options.keyEnabled && !$.jPlayer.focus) { - $.jPlayer.focus = this; - } - - // A fix for Android where older (2.3) and even some 4.x devices fail to work when changing the *audio* SRC and then playing immediately. - this.androidFix = { - setMedia: false, // True when media set - play: false, // True when a progress event will instruct the media to play - pause: false, // True when a progress event will instruct the media to pause at a time. - time: NaN // The play(time) parameter - }; - if($.jPlayer.platform.android) { - this.options.preload = this.options.preload !== 'auto' ? 'metadata' : 'auto'; // Default to metadata, but allow auto. - } - - this.formats = []; // Array based on supplied string option. Order defines priority. - this.solutions = []; // Array based on solution string option. Order defines priority. - this.require = {}; // Which media types are required: video, audio. - - this.htmlElement = {}; // DOM elements created by jPlayer - this.html = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - this.html.audio = {}; - this.html.video = {}; - this.aurora = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - this.aurora.formats = []; - this.aurora.properties = []; - this.flash = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - - this.css = {}; - this.css.cs = {}; // Holds the css selector strings - this.css.jq = {}; // Holds jQuery selectors. ie., $(css.cs.method) - - this.ancestorJq = []; // Holds jQuery selector of cssSelectorAncestor. Init would use $() instead of [], but it is only 1.4+ - - this.options.volume = this._limitValue(this.options.volume, 0, 1); // Limit volume value's bounds. - - // Create the formats array, with prority based on the order of the supplied formats string - $.each(this.options.supplied.toLowerCase().split(","), function(index1, value1) { - var format = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.format[format]) { // Check format is valid. - var dupFound = false; - $.each(self.formats, function(index2, value2) { // Check for duplicates - if(format === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.formats.push(format); - } - } - }); - - // Create the solutions array, with prority based on the order of the solution string - $.each(this.options.solution.toLowerCase().split(","), function(index1, value1) { - var solution = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.solution[solution]) { // Check solution is valid. - var dupFound = false; - $.each(self.solutions, function(index2, value2) { // Check for duplicates - if(solution === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.solutions.push(solution); - } - } - }); - - // Create Aurora.js formats array - $.each(this.options.auroraFormats.toLowerCase().split(","), function(index1, value1) { - var format = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.format[format]) { // Check format is valid. - var dupFound = false; - $.each(self.aurora.formats, function(index2, value2) { // Check for duplicates - if(format === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.aurora.formats.push(format); - } - } - }); - - this.internal.instance = "jp_" + this.count; - this.instances[this.internal.instance] = this.element; - - // Check the jPlayer div has an id and create one if required. Important for Flash to know the unique id for comms. - if(!this.element.attr("id")) { - this.element.attr("id", this.options.idPrefix + "_jplayer_" + this.count); - } - - this.internal.self = $.extend({}, { - id: this.element.attr("id"), - jq: this.element - }); - this.internal.audio = $.extend({}, { - id: this.options.idPrefix + "_audio_" + this.count, - jq: undefined - }); - this.internal.video = $.extend({}, { - id: this.options.idPrefix + "_video_" + this.count, - jq: undefined - }); - this.internal.flash = $.extend({}, { - id: this.options.idPrefix + "_flash_" + this.count, - jq: undefined, - swf: this.options.swfPath + (this.options.swfPath.toLowerCase().slice(-4) !== ".swf" ? (this.options.swfPath && this.options.swfPath.slice(-1) !== "/" ? "/" : "") + "jquery.jplayer.swf" : "") - }); - this.internal.poster = $.extend({}, { - id: this.options.idPrefix + "_poster_" + this.count, - jq: undefined - }); - - // Register listeners defined in the constructor - $.each($.jPlayer.event, function(eventName,eventType) { - if(self.options[eventName] !== undefined) { - self.element.bind(eventType + ".jPlayer", self.options[eventName]); // With .jPlayer namespace. - self.options[eventName] = undefined; // Destroy the handler pointer copy on the options. Reason, events can be added/removed in other ways so this could be obsolete and misleading. - } - }); - - // Determine if we require solutions for audio, video or both media types. - this.require.audio = false; - this.require.video = false; - $.each(this.formats, function(priority, format) { - self.require[self.format[format].media] = true; - }); - - // Now required types are known, finish the options default settings. - if(this.require.video) { - this.options = $.extend(true, {}, - this.optionsVideo, - this.options - ); - } else { - this.options = $.extend(true, {}, - this.optionsAudio, - this.options - ); - } - this._setSize(); // update status and jPlayer element size - - // Determine the status for Blocklisted options. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - - // Create event handlers if native fullscreen is supported - if($.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled) { - this._fullscreenAddEventListeners(); - } - - // The native controls are only for video and are disabled when audio is also used. - this._restrictNativeVideoControls(); - - // Create the poster image. - this.htmlElement.poster = document.createElement('img'); - this.htmlElement.poster.id = this.internal.poster.id; - this.htmlElement.poster.onload = function() { // Note that this did not work on Firefox 3.6: poster.addEventListener("onload", function() {}, false); Did not investigate x-browser. - if(!self.status.video || self.status.waitForPlay) { - self.internal.poster.jq.show(); - } - }; - this.element.append(this.htmlElement.poster); - this.internal.poster.jq = $("#" + this.internal.poster.id); - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - this.internal.poster.jq.hide(); - this.internal.poster.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - - // Generate the required media elements - this.html.audio.available = false; - if(this.require.audio) { // If a supplied format is audio - this.htmlElement.audio = document.createElement('audio'); - this.htmlElement.audio.id = this.internal.audio.id; - this.html.audio.available = !!this.htmlElement.audio.canPlayType && this._testCanPlayType(this.htmlElement.audio); // Test is for IE9 on Win Server 2008. - } - this.html.video.available = false; - if(this.require.video) { // If a supplied format is video - this.htmlElement.video = document.createElement('video'); - this.htmlElement.video.id = this.internal.video.id; - this.html.video.available = !!this.htmlElement.video.canPlayType && this._testCanPlayType(this.htmlElement.video); // Test is for IE9 on Win Server 2008. - } - - this.flash.available = this._checkForFlash(10.1); - - this.html.canPlay = {}; - this.aurora.canPlay = {}; - this.flash.canPlay = {}; - $.each(this.formats, function(priority, format) { - self.html.canPlay[format] = self.html[self.format[format].media].available && "" !== self.htmlElement[self.format[format].media].canPlayType(self.format[format].codec); - self.aurora.canPlay[format] = ($.inArray(format, self.aurora.formats) > -1); - self.flash.canPlay[format] = self.format[format].flashCanPlay && self.flash.available; - }); - this.html.desired = false; - this.aurora.desired = false; - this.flash.desired = false; - $.each(this.solutions, function(solutionPriority, solution) { - if(solutionPriority === 0) { - self[solution].desired = true; - } else { - var audioCanPlay = false; - var videoCanPlay = false; - $.each(self.formats, function(formatPriority, format) { - if(self[self.solutions[0]].canPlay[format]) { // The other solution can play - if(self.format[format].media === 'video') { - videoCanPlay = true; - } else { - audioCanPlay = true; - } - } - }); - self[solution].desired = (self.require.audio && !audioCanPlay) || (self.require.video && !videoCanPlay); - } - }); - // This is what jPlayer will support, based on solution and supplied. - this.html.support = {}; - this.aurora.support = {}; - this.flash.support = {}; - $.each(this.formats, function(priority, format) { - self.html.support[format] = self.html.canPlay[format] && self.html.desired; - self.aurora.support[format] = self.aurora.canPlay[format] && self.aurora.desired; - self.flash.support[format] = self.flash.canPlay[format] && self.flash.desired; - }); - // If jPlayer is supporting any format in a solution, then the solution is used. - this.html.used = false; - this.aurora.used = false; - this.flash.used = false; - $.each(this.solutions, function(solutionPriority, solution) { - $.each(self.formats, function(formatPriority, format) { - if(self[solution].support[format]) { - self[solution].used = true; - return false; - } - }); - }); - - // Init solution active state and the event gates to false. - this._resetActive(); - this._resetGate(); - - // Set up the css selectors for the control and feedback entities. - this._cssSelectorAncestor(this.options.cssSelectorAncestor); - - // If neither html nor aurora nor flash are being used by this browser, then media playback is not possible. Trigger an error event. - if(!(this.html.used || this.aurora.used || this.flash.used)) { - this._error( { - type: $.jPlayer.error.NO_SOLUTION, - context: "{solution:'" + this.options.solution + "', supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SOLUTION, - hint: $.jPlayer.errorHint.NO_SOLUTION - }); - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.show(); - } - } else { - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.hide(); - } - } - - // Add the flash solution if it is being used. - if(this.flash.used) { - var htmlObj, - flashVars = 'jQuery=' + encodeURI(this.options.noConflict) + '&id=' + encodeURI(this.internal.self.id) + '&vol=' + this.options.volume + '&muted=' + this.options.muted; - - // Code influenced by SWFObject 2.2: http://code.google.com/p/swfobject/ - // Non IE browsers have an initial Flash size of 1 by 1 otherwise the wmode affected the Flash ready event. - - if($.jPlayer.browser.msie && (Number($.jPlayer.browser.version) < 9 || $.jPlayer.browser.documentMode < 9)) { - var objStr = ''; - - var paramStr = [ - '', - '', - '', - '', - '' - ]; - - htmlObj = document.createElement(objStr); - for(var i=0; i < paramStr.length; i++) { - htmlObj.appendChild(document.createElement(paramStr[i])); - } - } else { - var createParam = function(el, n, v) { - var p = document.createElement("param"); - p.setAttribute("name", n); - p.setAttribute("value", v); - el.appendChild(p); - }; - - htmlObj = document.createElement("object"); - htmlObj.setAttribute("id", this.internal.flash.id); - htmlObj.setAttribute("name", this.internal.flash.id); - htmlObj.setAttribute("data", this.internal.flash.swf); - htmlObj.setAttribute("type", "application/x-shockwave-flash"); - htmlObj.setAttribute("width", "1"); // Non-zero - htmlObj.setAttribute("height", "1"); // Non-zero - htmlObj.setAttribute("tabindex", "-1"); - createParam(htmlObj, "flashvars", flashVars); - createParam(htmlObj, "allowscriptaccess", "always"); - createParam(htmlObj, "bgcolor", this.options.backgroundColor); - createParam(htmlObj, "wmode", this.options.wmode); - } - - this.element.append(htmlObj); - this.internal.flash.jq = $(htmlObj); - } - - // Setup playbackRate ability before using _addHtmlEventListeners() - if(this.html.used && !this.flash.used) { // If only HTML - // Using the audio element capabilities for playbackRate. ie., Assuming video element is the same. - this.status.playbackRateEnabled = this._testPlaybackRate('audio'); - } else { - this.status.playbackRateEnabled = false; - } - - this._updatePlaybackRate(); - - // Add the HTML solution if being used. - if(this.html.used) { - - // The HTML Audio handlers - if(this.html.audio.available) { - this._addHtmlEventListeners(this.htmlElement.audio, this.html.audio); - this.element.append(this.htmlElement.audio); - this.internal.audio.jq = $("#" + this.internal.audio.id); - } - - // The HTML Video handlers - if(this.html.video.available) { - this._addHtmlEventListeners(this.htmlElement.video, this.html.video); - this.element.append(this.htmlElement.video); - this.internal.video.jq = $("#" + this.internal.video.id); - if(this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); // Using size 0x0 since a .hide() causes issues in iOS - } - this.internal.video.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - } - } - - // Add the Aurora.js solution if being used. - if(this.aurora.used) { - // Aurora.js player need to be created for each media, see setMedia function. - } - - // Create the bridge that emulates the HTML Media element on the jPlayer DIV - if( this.options.emulateHtml ) { - this._emulateHtmlBridge(); - } - - if((this.html.used || this.aurora.used) && !this.flash.used) { // If only HTML, then emulate flash ready() call after 100ms. - setTimeout( function() { - self.internal.ready = true; - self.version.flash = "n/a"; - self._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - self._trigger($.jPlayer.event.ready); - }, 100); - } - - // Initialize the interface components with the options. - this._updateNativeVideoControls(); - // The other controls are now setup in _cssSelectorAncestor() - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - - $.jPlayer.prototype.count++; // Change static variable via prototype. - }, - destroy: function() { - // MJP: The background change remains. Would need to store the original to restore it correctly. - // MJP: The jPlayer element's size change remains. - - // Clear the media to reset the GUI and stop any downloads. Streams on some browsers had persited. (Chrome) - this.clearMedia(); - // Remove the size/sizeFull cssClass from the cssSelectorAncestor - this._removeUiClass(); - // Remove the times from the GUI - if(this.css.jq.currentTime.length) { - this.css.jq.currentTime.text(""); - } - if(this.css.jq.duration.length) { - this.css.jq.duration.text(""); - } - // Remove any bindings from the interface controls. - $.each(this.css.jq, function(fn, jq) { - // Check selector is valid before trying to execute method. - if(jq.length) { - jq.unbind(".jPlayer"); - } - }); - // Remove the click handlers for $.jPlayer.event.click - this.internal.poster.jq.unbind(".jPlayer"); - if(this.internal.video.jq) { - this.internal.video.jq.unbind(".jPlayer"); - } - // Remove the fullscreen event handlers - this._fullscreenRemoveEventListeners(); - // Remove key bindings - if(this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - // Destroy the HTML bridge. - if(this.options.emulateHtml) { - this._destroyHtmlBridge(); - } - this.element.removeData("jPlayer"); // Remove jPlayer data - this.element.unbind(".jPlayer"); // Remove all event handlers created by the jPlayer constructor - this.element.empty(); // Remove the inserted child elements - - delete this.instances[this.internal.instance]; // Clear the instance on the static instance object - }, - destroyRemoved: function() { // Destroy any instances that have gone away. - var self = this; - $.each(this.instances, function(i, element) { - if(self.element !== element) { // Do not destroy this instance. - if(!element.data("jPlayer")) { // Check that element is a real jPlayer. - element.jPlayer("destroy"); - delete self.instances[i]; - } - } - }); - }, - enable: function() { // Plan to implement - // options.disabled = false - }, - disable: function () { // Plan to implement - // options.disabled = true - }, - _testCanPlayType: function(elem) { - // IE9 on Win Server 2008 did not implement canPlayType(), but it has the property. - try { - elem.canPlayType(this.format.mp3.codec); // The type is irrelevant. - return true; - } catch(err) { - return false; - } - }, - _testPlaybackRate: function(type) { - // type: String 'audio' or 'video' - var el, rate = 0.5; - type = typeof type === 'string' ? type : 'audio'; - el = document.createElement(type); - // Wrapping in a try/catch, just in case older HTML5 browsers throw and error. - try { - if('playbackRate' in el) { - el.playbackRate = rate; - return el.playbackRate === rate; - } else { - return false; - } - } catch(err) { - return false; - } - }, - _uaBlocklist: function(list) { - // list : object with properties that are all regular expressions. Property names are irrelevant. - // Returns true if the user agent is matched in list. - var ua = navigator.userAgent.toLowerCase(), - block = false; - - $.each(list, function(p, re) { - if(re && re.test(ua)) { - block = true; - return false; // exit $.each. - } - }); - return block; - }, - _restrictNativeVideoControls: function() { - // Fallback to noFullWindow when nativeVideoControls is true and audio media is being used. Affects when both media types are used. - if(this.require.audio) { - if(this.status.nativeVideoControls) { - this.status.nativeVideoControls = false; - this.status.noFullWindow = true; - } - } - }, - _updateNativeVideoControls: function() { - if(this.html.video.available && this.html.used) { - // Turn the HTML Video controls on/off - this.htmlElement.video.controls = this.status.nativeVideoControls; - // Show/hide the jPlayer GUI. - this._updateAutohide(); - // For when option changed. The poster image is not updated, as it is dealt with in setMedia(). Acceptable degradation since seriously doubt these options will change on the fly. Can again review later. - if(this.status.nativeVideoControls && this.require.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else if(this.status.waitForPlay && this.status.video) { - this.internal.poster.jq.show(); - this.internal.video.jq.css({'width': '0px', 'height': '0px'}); - } - } - }, - _addHtmlEventListeners: function(mediaElement, entity) { - var self = this; - mediaElement.preload = this.options.preload; - mediaElement.muted = this.options.muted; - mediaElement.volume = this.options.volume; - - if(this.status.playbackRateEnabled) { - mediaElement.defaultPlaybackRate = this.options.defaultPlaybackRate; - mediaElement.playbackRate = this.options.playbackRate; - } - - // Create the event listeners - // Only want the active entity to affect jPlayer and bubble events. - // Using entity.gate so that object is referenced and gate property always current - - mediaElement.addEventListener("progress", function() { - if(entity.gate) { - if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command - self.internal.cmdsIgnored = false; - } - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.progress); - } - }, false); - mediaElement.addEventListener("loadeddata", function() { - if(entity.gate) { - self.androidFix.setMedia = false; // Disable the fix after the first progress event. - if(self.androidFix.play) { // Play Android audio - performing the fix. - self.androidFix.play = false; - self.play(self.androidFix.time); - } - if(self.androidFix.pause) { // Pause Android audio at time - performing the fix. - self.androidFix.pause = false; - self.pause(self.androidFix.time); - } - self._trigger($.jPlayer.event.loadeddata); - } - }, false); - mediaElement.addEventListener("timeupdate", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.timeupdate); - } - }, false); - mediaElement.addEventListener("durationchange", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.durationchange); - } - }, false); - mediaElement.addEventListener("play", function() { - if(entity.gate) { - self._updateButtons(true); - self._html_checkWaitForPlay(); // So the native controls update this variable and puts the hidden interface in the correct state. Affects toggling native controls. - self._trigger($.jPlayer.event.play); - } - }, false); - mediaElement.addEventListener("playing", function() { - if(entity.gate) { - self._updateButtons(true); - self._seeked(); - self._trigger($.jPlayer.event.playing); - } - }, false); - mediaElement.addEventListener("pause", function() { - if(entity.gate) { - self._updateButtons(false); - self._trigger($.jPlayer.event.pause); - } - }, false); - mediaElement.addEventListener("waiting", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.waiting); - } - }, false); - mediaElement.addEventListener("seeking", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.seeking); - } - }, false); - mediaElement.addEventListener("seeked", function() { - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.seeked); - } - }, false); - mediaElement.addEventListener("volumechange", function() { - if(entity.gate) { - // Read the values back from the element as the Blackberry PlayBook shares the volume with the physical buttons master volume control. - // However, when tested 6th July 2011, those buttons do not generate an event. The physical play/pause button does though. - self.options.volume = mediaElement.volume; - self.options.muted = mediaElement.muted; - self._updateMute(); - self._updateVolume(); - self._trigger($.jPlayer.event.volumechange); - } - }, false); - mediaElement.addEventListener("ratechange", function() { - if(entity.gate) { - self.options.defaultPlaybackRate = mediaElement.defaultPlaybackRate; - self.options.playbackRate = mediaElement.playbackRate; - self._updatePlaybackRate(); - self._trigger($.jPlayer.event.ratechange); - } - }, false); - mediaElement.addEventListener("suspend", function() { // Seems to be the only way of capturing that the iOS4 browser did not actually play the media from the page code. ie., It needs a user gesture. - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.suspend); - } - }, false); - mediaElement.addEventListener("ended", function() { - if(entity.gate) { - // Order of the next few commands are important. Change the time and then pause. - // Solves a bug in Firefox, where issuing pause 1st causes the media to play from the start. ie., The pause is ignored. - if(!$.jPlayer.browser.webkit) { // Chrome crashes if you do this in conjunction with a setMedia command in an ended event handler. ie., The playlist demo. - self.htmlElement.media.currentTime = 0; // Safari does not care about this command. ie., It works with or without this line. (Both Safari and Chrome are Webkit.) - } - self.htmlElement.media.pause(); // Pause otherwise a click on the progress bar will play from that point, when it shouldn't, since it stopped playback. - self._updateButtons(false); - self._getHtmlStatus(mediaElement, true); // With override true. Otherwise Chrome leaves progress at full. - self._updateInterface(); - self._trigger($.jPlayer.event.ended); - } - }, false); - mediaElement.addEventListener("error", function() { - if(entity.gate) { - self._updateButtons(false); - self._seeked(); - if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event. - clearTimeout(self.internal.htmlDlyCmdId); // Clears any delayed commands used in the HTML solution. - self.status.waitForLoad = true; // Allows the load operation to try again. - self.status.waitForPlay = true; // Reset since a play was captured. - if(self.status.video && !self.status.nativeVideoControls) { - self.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) { - self.internal.poster.jq.show(); - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self._error( { - type: $.jPlayer.error.URL, - context: self.status.src, // this.src shows absolute urls. Want context to show the url given. - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - } - } - }, false); - // Create all the other event listeners that bubble up to a jPlayer event from html, without being used by jPlayer. - $.each($.jPlayer.htmlEvent, function(i, eventType) { - mediaElement.addEventListener(this, function() { - if(entity.gate) { - self._trigger($.jPlayer.event[eventType]); - } - }, false); - }); - }, - _addAuroraEventListeners : function(player, entity) { - var self = this; - //player.preload = this.options.preload; - //player.muted = this.options.muted; - player.volume = this.options.volume * 100; - - // Create the event listeners - // Only want the active entity to affect jPlayer and bubble events. - // Using entity.gate so that object is referenced and gate property always current - - player.on("progress", function() { - if(entity.gate) { - if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command - self.internal.cmdsIgnored = false; - } - self._getAuroraStatus(player); - self._updateInterface(); - self._trigger($.jPlayer.event.progress); - // Progress with song duration, we estimate timeupdate need to be triggered too. - if (player.duration > 0) { - self._trigger($.jPlayer.event.timeupdate); - } - } - }, false); - player.on("ready", function() { - if(entity.gate) { - self._trigger($.jPlayer.event.loadeddata); - } - }, false); - player.on("duration", function() { - if(entity.gate) { - self._getAuroraStatus(player); - self._updateInterface(); - self._trigger($.jPlayer.event.durationchange); - } - }, false); - player.on("end", function() { - if(entity.gate) { - // Order of the next few commands are important. Change the time and then pause. - self._updateButtons(false); - self._getAuroraStatus(player, true); - self._updateInterface(); - self._trigger($.jPlayer.event.ended); - } - }, false); - player.on("error", function() { - if(entity.gate) { - self._updateButtons(false); - self._seeked(); - if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event. - self.status.waitForLoad = true; // Allows the load operation to try again. - self.status.waitForPlay = true; // Reset since a play was captured. - if(self.status.video && !self.status.nativeVideoControls) { - self.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) { - self.internal.poster.jq.show(); - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self._error( { - type: $.jPlayer.error.URL, - context: self.status.src, // this.src shows absolute urls. Want context to show the url given. - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - } - } - }, false); - }, - _getHtmlStatus: function(media, override) { - var ct = 0, cpa = 0, sp = 0, cpr = 0; - - // Fixes the duration bug in iOS, where the durationchange event occurs when media.duration is not always correct. - // Fixes the initial duration bug in BB OS7, where the media.duration is infinity and displays as NaN:NaN due to Date() using inifity. - if(isFinite(media.duration)) { - this.status.duration = media.duration; - } - - ct = media.currentTime; - cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0; - if((typeof media.seekable === "object") && (media.seekable.length > 0)) { - sp = (this.status.duration > 0) ? 100 * media.seekable.end(media.seekable.length-1) / this.status.duration : 100; - cpr = (this.status.duration > 0) ? 100 * media.currentTime / media.seekable.end(media.seekable.length-1) : 0; // Duration conditional for iOS duration bug. ie., seekable.end is a NaN in that case. - } else { - sp = 100; - cpr = cpa; - } - - if(override) { - ct = 0; - cpr = 0; - cpa = 0; - } - - this.status.seekPercent = sp; - this.status.currentPercentRelative = cpr; - this.status.currentPercentAbsolute = cpa; - this.status.currentTime = ct; - - this.status.remaining = this.status.duration - this.status.currentTime; - - this.status.videoWidth = media.videoWidth; - this.status.videoHeight = media.videoHeight; - - this.status.readyState = media.readyState; - this.status.networkState = media.networkState; - this.status.playbackRate = media.playbackRate; - this.status.ended = media.ended; - }, - _getAuroraStatus: function(player, override) { - var ct = 0, cpa = 0, sp = 0, cpr = 0; - - this.status.duration = player.duration / 1000; - - ct = player.currentTime / 1000; - cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0; - if(player.buffered > 0) { - sp = (this.status.duration > 0) ? (player.buffered * this.status.duration) / this.status.duration : 100; - cpr = (this.status.duration > 0) ? ct / (player.buffered * this.status.duration) : 0; - } else { - sp = 100; - cpr = cpa; - } - - if(override) { - ct = 0; - cpr = 0; - cpa = 0; - } - - this.status.seekPercent = sp; - this.status.currentPercentRelative = cpr; - this.status.currentPercentAbsolute = cpa; - this.status.currentTime = ct; - - this.status.remaining = this.status.duration - this.status.currentTime; - - this.status.readyState = 4; // status.readyState; - this.status.networkState = 0; // status.networkState; - this.status.playbackRate = 1; // status.playbackRate; - this.status.ended = false; // status.ended; - }, - _resetStatus: function() { - this.status = $.extend({}, this.status, $.jPlayer.prototype.status); // Maintains the status properties that persist through a reset. - }, - _trigger: function(eventType, error, warning) { // eventType always valid as called using $.jPlayer.event.eventType - var event = $.Event(eventType); - event.jPlayer = {}; - event.jPlayer.version = $.extend({}, this.version); - event.jPlayer.options = $.extend(true, {}, this.options); // Deep copy - event.jPlayer.status = $.extend(true, {}, this.status); // Deep copy - event.jPlayer.html = $.extend(true, {}, this.html); // Deep copy - event.jPlayer.aurora = $.extend(true, {}, this.aurora); // Deep copy - event.jPlayer.flash = $.extend(true, {}, this.flash); // Deep copy - if(error) { - event.jPlayer.error = $.extend({}, error); - } - if(warning) { - event.jPlayer.warning = $.extend({}, warning); - } - this.element.trigger(event); - }, - jPlayerFlashEvent: function(eventType, status) { // Called from Flash - if(eventType === $.jPlayer.event.ready) { - if(!this.internal.ready) { - this.internal.ready = true; - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Once Flash generates the ready event, minimise to zero as it is not affected by wmode anymore. - - this.version.flash = status.version; - if(this.version.needFlash !== this.version.flash) { - this._error( { - type: $.jPlayer.error.VERSION, - context: this.version.flash, - message: $.jPlayer.errorMsg.VERSION + this.version.flash, - hint: $.jPlayer.errorHint.VERSION - }); - } - this._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - this._trigger(eventType); - } else { - // This condition occurs if the Flash is hidden and then shown again. - // Firefox also reloads the Flash if the CSS position changes. position:fixed is used for full screen. - - // Only do this if the Flash is the solution being used at the moment. Affects Media players where both solution may be being used. - if(this.flash.gate) { - - // Send the current status to the Flash now that it is ready (available) again. - if(this.status.srcSet) { - - // Need to read original status before issuing the setMedia command. - var currentTime = this.status.currentTime, - paused = this.status.paused; - - this.setMedia(this.status.media); - this.volumeWorker(this.options.volume); - if(currentTime > 0) { - if(paused) { - this.pause(currentTime); - } else { - this.play(currentTime); - } - } - } - this._trigger($.jPlayer.event.flashreset); - } - } - } - if(this.flash.gate) { - switch(eventType) { - case $.jPlayer.event.progress: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.timeupdate: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.play: - this._seeked(); - this._updateButtons(true); - this._trigger(eventType); - break; - case $.jPlayer.event.pause: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.ended: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.click: - this._trigger(eventType); // This could be dealt with by the default - break; - case $.jPlayer.event.error: - this.status.waitForLoad = true; // Allows the load operation to try again. - this.status.waitForPlay = true; // Reset since a play was captured. - if(this.status.video) { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); - } - if(this._validString(this.status.media.poster)) { - this.internal.poster.jq.show(); - } - if(this.css.jq.videoPlay.length && this.status.video) { - this.css.jq.videoPlay.show(); - } - if(this.status.video) { // Set up for another try. Execute before error event. - this._flash_setVideo(this.status.media); - } else { - this._flash_setAudio(this.status.media); - } - this._updateButtons(false); - this._error( { - type: $.jPlayer.error.URL, - context:status.src, - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - break; - case $.jPlayer.event.seeking: - this._seeking(); - this._trigger(eventType); - break; - case $.jPlayer.event.seeked: - this._seeked(); - this._trigger(eventType); - break; - case $.jPlayer.event.ready: - // The ready event is handled outside the switch statement. - // Captured here otherwise 2 ready events would be generated if the ready event handler used setMedia. - break; - default: - this._trigger(eventType); - } - } - return false; - }, - _getFlashStatus: function(status) { - this.status.seekPercent = status.seekPercent; - this.status.currentPercentRelative = status.currentPercentRelative; - this.status.currentPercentAbsolute = status.currentPercentAbsolute; - this.status.currentTime = status.currentTime; - this.status.duration = status.duration; - this.status.remaining = status.duration - status.currentTime; - - this.status.videoWidth = status.videoWidth; - this.status.videoHeight = status.videoHeight; - - // The Flash does not generate this information in this release - this.status.readyState = 4; // status.readyState; - this.status.networkState = 0; // status.networkState; - this.status.playbackRate = 1; // status.playbackRate; - this.status.ended = false; // status.ended; - }, - _updateButtons: function(playing) { - if(playing === undefined) { - playing = !this.status.paused; - } else { - this.status.paused = !playing; - } - // Apply the state classes. (For the useStateClassSkin:true option) - if(playing) { - this.addStateClass('playing'); - } else { - this.removeStateClass('playing'); - } - if(!this.status.noFullWindow && this.options.fullWindow) { - this.addStateClass('fullScreen'); - } else { - this.removeStateClass('fullScreen'); - } - if(this.options.loop) { - this.addStateClass('looped'); - } else { - this.removeStateClass('looped'); - } - // Toggle the GUI element pairs. (For the useStateClassSkin:false option) - if(this.css.jq.play.length && this.css.jq.pause.length) { - if(playing) { - this.css.jq.play.hide(); - this.css.jq.pause.show(); - } else { - this.css.jq.play.show(); - this.css.jq.pause.hide(); - } - } - if(this.css.jq.restoreScreen.length && this.css.jq.fullScreen.length) { - if(this.status.noFullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.hide(); - } else if(this.options.fullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.show(); - } else { - this.css.jq.fullScreen.show(); - this.css.jq.restoreScreen.hide(); - } - } - if(this.css.jq.repeat.length && this.css.jq.repeatOff.length) { - if(this.options.loop) { - this.css.jq.repeat.hide(); - this.css.jq.repeatOff.show(); - } else { - this.css.jq.repeat.show(); - this.css.jq.repeatOff.hide(); - } - } - }, - _updateInterface: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.width(this.status.seekPercent+"%"); - } - if(this.css.jq.playBar.length) { - if(this.options.smoothPlayBar) { - this.css.jq.playBar.stop().animate({ - width: this.status.currentPercentAbsolute+"%" - }, 250, "linear"); - } else { - this.css.jq.playBar.width(this.status.currentPercentRelative+"%"); - } - } - var currentTimeText = ''; - if(this.css.jq.currentTime.length) { - currentTimeText = this._convertTime(this.status.currentTime); - if(currentTimeText !== this.css.jq.currentTime.text()) { - this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)); - } - } - var durationText = '', - duration = this.status.duration, - remaining = this.status.remaining; - if(this.css.jq.duration.length) { - if(typeof this.status.media.duration === 'string') { - durationText = this.status.media.duration; - } else { - if(typeof this.status.media.duration === 'number') { - duration = this.status.media.duration; - remaining = duration - this.status.currentTime; - } - if(this.options.remainingDuration) { - durationText = (remaining > 0 ? '-' : '') + this._convertTime(remaining); - } else { - durationText = this._convertTime(duration); - } - } - if(durationText !== this.css.jq.duration.text()) { - this.css.jq.duration.text(durationText); - } - } - }, - _convertTime: ConvertTime.prototype.time, - _seeking: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.addClass("jp-seeking-bg"); - } - this.addStateClass('seeking'); - }, - _seeked: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.removeClass("jp-seeking-bg"); - } - this.removeStateClass('seeking'); - }, - _resetGate: function() { - this.html.audio.gate = false; - this.html.video.gate = false; - this.aurora.gate = false; - this.flash.gate = false; - }, - _resetActive: function() { - this.html.active = false; - this.aurora.active = false; - this.flash.active = false; - }, - _escapeHtml: function(s) { - return s.split('&').join('&').split('<').join('<').split('>').join('>').split('"').join('"'); - }, - _qualifyURL: function(url) { - var el = document.createElement('div'); - el.innerHTML= 'x'; - return el.firstChild.href; - }, - _absoluteMediaUrls: function(media) { - var self = this; - $.each(media, function(type, url) { - if(url && self.format[type] && url.substr(0, 5) !== "data:") { - media[type] = self._qualifyURL(url); - } - }); - return media; - }, - addStateClass: function(state) { - if(this.ancestorJq.length) { - this.ancestorJq.addClass(this.options.stateClass[state]); - } - }, - removeStateClass: function(state) { - if(this.ancestorJq.length) { - this.ancestorJq.removeClass(this.options.stateClass[state]); - } - }, - setMedia: function(media) { - - /* media[format] = String: URL of format. Must contain all of the supplied option's video or audio formats. - * media.poster = String: Video poster URL. - * media.track = Array: Of objects defining the track element: kind, src, srclang, label, def. - * media.stream = Boolean: * NOT IMPLEMENTED * Designating actual media streams. ie., "false/undefined" for files. Plan to refresh the flash every so often. - */ - - var self = this, - supported = false, - posterChanged = this.status.media.poster !== media.poster; // Compare before reset. Important for OSX Safari as this.htmlElement.poster.src is absolute, even if original poster URL was relative. - - this._resetMedia(); - this._resetGate(); - this._resetActive(); - - // Clear the Android Fix. - this.androidFix.setMedia = false; - this.androidFix.play = false; - this.androidFix.pause = false; - - // Convert all media URLs to absolute URLs. - media = this._absoluteMediaUrls(media); - - $.each(this.formats, function(formatPriority, format) { - var isVideo = self.format[format].media === 'video'; - $.each(self.solutions, function(solutionPriority, solution) { - if(self[solution].support[format] && self._validString(media[format])) { // Format supported in solution and url given for format. - var isHtml = solution === 'html'; - var isAurora = solution === 'aurora'; - - if(isVideo) { - if(isHtml) { - self.html.video.gate = true; - self._html_setVideo(media); - self.html.active = true; - } else { - self.flash.gate = true; - self._flash_setVideo(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self.status.video = true; - } else { - if(isHtml) { - self.html.audio.gate = true; - self._html_setAudio(media); - self.html.active = true; - - // Setup the Android Fix - Only for HTML audio. - if($.jPlayer.platform.android) { - self.androidFix.setMedia = true; - } - } else if(isAurora) { - self.aurora.gate = true; - self._aurora_setAudio(media); - self.aurora.active = true; - } else { - self.flash.gate = true; - self._flash_setAudio(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.hide(); - } - self.status.video = false; - } - - supported = true; - return false; // Exit $.each - } - }); - if(supported) { - return false; // Exit $.each - } - }); - - if(supported) { - if(!(this.status.nativeVideoControls && this.html.video.gate)) { - // Set poster IMG if native video controls are not being used - // Note: With IE the IMG onload event occurs immediately when cached. - // Note: Poster hidden by default in _resetMedia() - if(this._validString(media.poster)) { - if(posterChanged) { // Since some browsers do not generate img onload event. - this.htmlElement.poster.src = media.poster; - } else { - this.internal.poster.jq.show(); - } - } - } - if(typeof media.title === 'string') { - if(this.css.jq.title.length) { - this.css.jq.title.html(media.title); - } - if(this.htmlElement.audio) { - this.htmlElement.audio.setAttribute('title', media.title); - } - if(this.htmlElement.video) { - this.htmlElement.video.setAttribute('title', media.title); - } - } - this.status.srcSet = true; - this.status.media = $.extend({}, media); - this._updateButtons(false); - this._updateInterface(); - this._trigger($.jPlayer.event.setmedia); - } else { // jPlayer cannot support any formats provided in this browser - // Send an error event - this._error( { - type: $.jPlayer.error.NO_SUPPORT, - context: "{supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SUPPORT, - hint: $.jPlayer.errorHint.NO_SUPPORT - }); - } - }, - _resetMedia: function() { - this._resetStatus(); - this._updateButtons(false); - this._updateInterface(); - this._seeked(); - this.internal.poster.jq.hide(); - - clearTimeout(this.internal.htmlDlyCmdId); - - if(this.html.active) { - this._html_resetMedia(); - } else if(this.aurora.active) { - this._aurora_resetMedia(); - } else if(this.flash.active) { - this._flash_resetMedia(); - } - }, - clearMedia: function() { - this._resetMedia(); - - if(this.html.active) { - this._html_clearMedia(); - } else if(this.aurora.active) { - this._aurora_clearMedia(); - } else if(this.flash.active) { - this._flash_clearMedia(); - } - - this._resetGate(); - this._resetActive(); - }, - load: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_load(); - } else if(this.aurora.active) { - this._aurora_load(); - } else if(this.flash.active) { - this._flash_load(); - } - } else { - this._urlNotSetError("load"); - } - }, - focus: function() { - if(this.options.keyEnabled) { - $.jPlayer.focus = this; - } - }, - play: function(time) { - var guiAction = typeof time === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && !this.status.paused) { - this.pause(time); // The time would be the click event, but passing it over so info is not lost. - } else { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - this.focus(); - if(this.html.active) { - this._html_play(time); - } else if(this.aurora.active) { - this._aurora_play(time); - } else if(this.flash.active) { - this._flash_play(time); - } - } else { - this._urlNotSetError("play"); - } - } - }, - videoPlay: function() { // Handles clicks on the play button over the video poster - this.play(); - }, - pause: function(time) { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(time); - } else if(this.aurora.active) { - this._aurora_pause(time); - } else if(this.flash.active) { - this._flash_pause(time); - } - } else { - this._urlNotSetError("pause"); - } - }, - tellOthers: function(command, conditions) { - var self = this, - hasConditions = typeof conditions === 'function', - args = Array.prototype.slice.call(arguments); // Convert arguments to an Array. - - if(typeof command !== 'string') { // Ignore, since no command. - return; // Return undefined to maintain chaining. - } - if(hasConditions) { - args.splice(1, 1); // Remove the conditions from the arguments - } - - $.jPlayer.prototype.destroyRemoved(); - $.each(this.instances, function() { - // Remember that "this" is the instance's "element" in the $.each() loop. - if(self.element !== this) { // Do not tell my instance. - if(!hasConditions || conditions.call(this.data("jPlayer"), self)) { - this.jPlayer.apply(this, args); - } - } - }); - }, - pauseOthers: function(time) { - this.tellOthers("pause", function() { - // In the conditions function, the "this" context is the other instance's jPlayer object. - return this.status.srcSet; - }, time); - }, - stop: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(0); - } else if(this.aurora.active) { - this._aurora_pause(0); - } else if(this.flash.active) { - this._flash_pause(0); - } - } else { - this._urlNotSetError("stop"); - } - }, - playHead: function(p) { - p = this._limitValue(p, 0, 100); - if(this.status.srcSet) { - if(this.html.active) { - this._html_playHead(p); - } else if(this.aurora.active) { - this._aurora_playHead(p); - } else if(this.flash.active) { - this._flash_playHead(p); - } - } else { - this._urlNotSetError("playHead"); - } - }, - _muted: function(muted) { - this.mutedWorker(muted); - if(this.options.globalVolume) { - this.tellOthers("mutedWorker", function() { - // Check the other instance has global volume enabled. - return this.options.globalVolume; - }, muted); - } - }, - mutedWorker: function(muted) { - this.options.muted = muted; - if(this.html.used) { - this._html_setProperty('muted', muted); - } - if(this.aurora.used) { - this._aurora_mute(muted); - } - if(this.flash.used) { - this._flash_mute(muted); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateMute(muted); - this._updateVolume(this.options.volume); - this._trigger($.jPlayer.event.volumechange); - } - }, - mute: function(mute) { // mute is either: undefined (true), an event object (true) or a boolean (muted). - var guiAction = typeof mute === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.muted) { - this._muted(false); - } else { - mute = mute === undefined ? true : !!mute; - this._muted(mute); - } - }, - unmute: function(unmute) { // unmute is either: undefined (true), an event object (true) or a boolean (!muted). - unmute = unmute === undefined ? true : !!unmute; - this._muted(!unmute); - }, - _updateMute: function(mute) { - if(mute === undefined) { - mute = this.options.muted; - } - if(mute) { - this.addStateClass('muted'); - } else { - this.removeStateClass('muted'); - } - if(this.css.jq.mute.length && this.css.jq.unmute.length) { - if(this.status.noVolume) { - this.css.jq.mute.hide(); - this.css.jq.unmute.hide(); - } else if(mute) { - this.css.jq.mute.hide(); - this.css.jq.unmute.show(); - } else { - this.css.jq.mute.show(); - this.css.jq.unmute.hide(); - } - } - }, - volume: function(v) { - this.volumeWorker(v); - if(this.options.globalVolume) { - this.tellOthers("volumeWorker", function() { - // Check the other instance has global volume enabled. - return this.options.globalVolume; - }, v); - } - }, - volumeWorker: function(v) { - v = this._limitValue(v, 0, 1); - this.options.volume = v; - - if(this.html.used) { - this._html_setProperty('volume', v); - } - if(this.aurora.used) { - this._aurora_volume(v); - } - if(this.flash.used) { - this._flash_volume(v); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateVolume(v); - this._trigger($.jPlayer.event.volumechange); - } - }, - volumeBar: function(e) { // Handles clicks on the volumeBar - if(this.css.jq.volumeBar.length) { - // Using $(e.currentTarget) to enable multiple volume bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - y = $bar.height() - e.pageY + offset.top, - h = $bar.height(); - if(this.options.verticalVolume) { - this.volume(y/h); - } else { - this.volume(x/w); - } - } - if(this.options.muted) { - this._muted(false); - } - }, - _updateVolume: function(v) { - if(v === undefined) { - v = this.options.volume; - } - v = this.options.muted ? 0 : v; - - if(this.status.noVolume) { - this.addStateClass('noVolume'); - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.hide(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.hide(); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.hide(); - } - } else { - this.removeStateClass('noVolume'); - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.show(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.show(); - this.css.jq.volumeBarValue[this.options.verticalVolume ? "height" : "width"]((v*100)+"%"); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.show(); - } - } - }, - volumeMax: function() { // Handles clicks on the volume max - this.volume(1); - if(this.options.muted) { - this._muted(false); - } - }, - _cssSelectorAncestor: function(ancestor) { - var self = this; - this.options.cssSelectorAncestor = ancestor; - this._removeUiClass(); - this.ancestorJq = ancestor ? $(ancestor) : []; // Would use $() instead of [], but it is only 1.4+ - if(ancestor && this.ancestorJq.length !== 1) { // So empty strings do not generate the warning. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: ancestor, - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.ancestorJq.length + " found for cssSelectorAncestor.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - this._addUiClass(); - $.each(this.options.cssSelector, function(fn, cssSel) { - self._cssSelector(fn, cssSel); - }); - - // Set the GUI to the current state. - this._updateInterface(); - this._updateButtons(); - this._updateAutohide(); - this._updateVolume(); - this._updateMute(); - }, - _cssSelector: function(fn, cssSel) { - var self = this; - if(typeof cssSel === 'string') { - if($.jPlayer.prototype.options.cssSelector[fn]) { - if(this.css.jq[fn] && this.css.jq[fn].length) { - this.css.jq[fn].unbind(".jPlayer"); - } - this.options.cssSelector[fn] = cssSel; - this.css.cs[fn] = this.options.cssSelectorAncestor + " " + cssSel; - - if(cssSel) { // Checks for empty string - this.css.jq[fn] = $(this.css.cs[fn]); - } else { - this.css.jq[fn] = []; // To comply with the css.jq[fn].length check before its use. As of jQuery 1.4 could have used $() for an empty set. - } - - if(this.css.jq[fn].length && this[fn]) { - var handler = function(e) { - e.preventDefault(); - self[fn](e); - if(self.options.autoBlur) { - $(this).blur(); - } else { - $(this).focus(); // Force focus for ARIA. - } - }; - this.css.jq[fn].bind("click.jPlayer", handler); // Using jPlayer namespace - } - - if(cssSel && this.css.jq[fn].length !== 1) { // So empty strings do not generate the warning. ie., they just remove the old one. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: this.css.cs[fn], - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.css.jq[fn].length + " found for " + fn + " method.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_METHOD, - context: fn, - message: $.jPlayer.warningMsg.CSS_SELECTOR_METHOD, - hint: $.jPlayer.warningHint.CSS_SELECTOR_METHOD - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_STRING, - context: cssSel, - message: $.jPlayer.warningMsg.CSS_SELECTOR_STRING, - hint: $.jPlayer.warningHint.CSS_SELECTOR_STRING - }); - } - }, - duration: function(e) { - if(this.options.toggleDuration) { - if(this.options.captureDuration) { - e.stopPropagation(); - } - this._setOption("remainingDuration", !this.options.remainingDuration); - } - }, - seekBar: function(e) { // Handles clicks on the seekBar - if(this.css.jq.seekBar.length) { - // Using $(e.currentTarget) to enable multiple seek bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - p = 100 * x / w; - this.playHead(p); - } - }, - playbackRate: function(pbr) { - this._setOption("playbackRate", pbr); - }, - playbackRateBar: function(e) { // Handles clicks on the playbackRateBar - if(this.css.jq.playbackRateBar.length) { - // Using $(e.currentTarget) to enable multiple playbackRate bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - y = $bar.height() - e.pageY + offset.top, - h = $bar.height(), - ratio, pbr; - if(this.options.verticalPlaybackRate) { - ratio = y/h; - } else { - ratio = x/w; - } - pbr = ratio * (this.options.maxPlaybackRate - this.options.minPlaybackRate) + this.options.minPlaybackRate; - this.playbackRate(pbr); - } - }, - _updatePlaybackRate: function() { - var pbr = this.options.playbackRate, - ratio = (pbr - this.options.minPlaybackRate) / (this.options.maxPlaybackRate - this.options.minPlaybackRate); - if(this.status.playbackRateEnabled) { - if(this.css.jq.playbackRateBar.length) { - this.css.jq.playbackRateBar.show(); - } - if(this.css.jq.playbackRateBarValue.length) { - this.css.jq.playbackRateBarValue.show(); - this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate ? "height" : "width"]((ratio*100)+"%"); - } - } else { - if(this.css.jq.playbackRateBar.length) { - this.css.jq.playbackRateBar.hide(); - } - if(this.css.jq.playbackRateBarValue.length) { - this.css.jq.playbackRateBarValue.hide(); - } - } - }, - repeat: function(event) { // Handle clicks on the repeat button - var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.loop) { - this._loop(false); - } else { - this._loop(true); - } - }, - repeatOff: function() { // Handle clicks on the repeatOff button - this._loop(false); - }, - _loop: function(loop) { - if(this.options.loop !== loop) { - this.options.loop = loop; - this._updateButtons(); - this._trigger($.jPlayer.event.repeat); - } - }, - - // Options code adapted from ui.widget.js (1.8.7). Made changes so the key can use dot notation. To match previous getData solution in jPlayer 1. - option: function(key, value) { - var options = key; - - // Enables use: options(). Returns a copy of options object - if ( arguments.length === 0 ) { - return $.extend( true, {}, this.options ); - } - - if(typeof key === "string") { - var keys = key.split("."); - - // Enables use: options("someOption") Returns a copy of the option. Supports dot notation. - if(value === undefined) { - - var opt = $.extend(true, {}, this.options); - for(var i = 0; i < keys.length; i++) { - if(opt[keys[i]] !== undefined) { - opt = opt[keys[i]]; - } else { - this._warning( { - type: $.jPlayer.warning.OPTION_KEY, - context: key, - message: $.jPlayer.warningMsg.OPTION_KEY, - hint: $.jPlayer.warningHint.OPTION_KEY - }); - return undefined; - } - } - return opt; - } - - // Enables use: options("someOptionObject", someObject}). Creates: {someOptionObject:someObject} - // Enables use: options("someOption", someValue). Creates: {someOption:someValue} - // Enables use: options("someOptionObject.someOption", someValue). Creates: {someOptionObject:{someOption:someValue}} - - options = {}; - var opts = options; - - for(var j = 0; j < keys.length; j++) { - if(j < keys.length - 1) { - opts[keys[j]] = {}; - opts = opts[keys[j]]; - } else { - opts[keys[j]] = value; - } - } - } - - // Otherwise enables use: options(optionObject). Uses original object (the key) - - this._setOptions(options); - - return this; - }, - _setOptions: function(options) { - var self = this; - $.each(options, function(key, value) { // This supports the 2 level depth that the options of jPlayer has. Would review if we ever need more depth. - self._setOption(key, value); - }); - - return this; - }, - _setOption: function(key, value) { - var self = this; - - // The ability to set options is limited at this time. - - switch(key) { - case "volume" : - this.volume(value); - break; - case "muted" : - this._muted(value); - break; - case "globalVolume" : - this.options[key] = value; - break; - case "cssSelectorAncestor" : - this._cssSelectorAncestor(value); // Set and refresh all associations for the new ancestor. - break; - case "cssSelector" : - $.each(value, function(fn, cssSel) { - self._cssSelector(fn, cssSel); // NB: The option is set inside this function, after further validity checks. - }); - break; - case "playbackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate); - if(this.html.used) { - this._html_setProperty('playbackRate', value); - } - this._updatePlaybackRate(); - break; - case "defaultPlaybackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate); - if(this.html.used) { - this._html_setProperty('defaultPlaybackRate', value); - } - this._updatePlaybackRate(); - break; - case "minPlaybackRate" : - this.options[key] = value = this._limitValue(value, 0.1, this.options.maxPlaybackRate - 0.1); - this._updatePlaybackRate(); - break; - case "maxPlaybackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate + 0.1, 16); - this._updatePlaybackRate(); - break; - case "fullScreen" : - if(this.options[key] !== value) { // if changed - var wkv = $.jPlayer.nativeFeatures.fullscreen.used.webkitVideo; - if(!wkv || wkv && !this.status.waitForPlay) { - if(!wkv) { // No sensible way to unset option on these devices. - this.options[key] = value; - } - if(value) { - this._requestFullscreen(); - } else { - this._exitFullscreen(); - } - if(!wkv) { - this._setOption("fullWindow", value); - } - } - } - break; - case "fullWindow" : - if(this.options[key] !== value) { // if changed - this._removeUiClass(); - this.options[key] = value; - this._refreshSize(); - } - break; - case "size" : - if(!this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "sizeFull" : - if(this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "autohide" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._updateAutohide(); - break; - case "loop" : - this._loop(value); - break; - case "remainingDuration" : - this.options[key] = value; - this._updateInterface(); - break; - case "toggleDuration" : - this.options[key] = value; - break; - case "nativeVideoControls" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this._restrictNativeVideoControls(); - this._updateNativeVideoControls(); - break; - case "noFullWindow" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); // Need to check again as noFullWindow can depend on this flag and the restrict() can override it. - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this._restrictNativeVideoControls(); - this._updateButtons(); - break; - case "noVolume" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - this._updateVolume(); - this._updateMute(); - break; - case "emulateHtml" : - if(this.options[key] !== value) { // To avoid multiple event handlers being created, if true already. - this.options[key] = value; - if(value) { - this._emulateHtmlBridge(); - } else { - this._destroyHtmlBridge(); - } - } - break; - case "timeFormat" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - break; - case "keyEnabled" : - this.options[key] = value; - if(!value && this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - break; - case "keyBindings" : - this.options[key] = $.extend(true, {}, this.options[key], value); // store a merged DEEP copy of it, incase not all properties changed. - break; - case "audioFullScreen" : - this.options[key] = value; - break; - case "autoBlur" : - this.options[key] = value; - break; - } - - return this; - }, - // End of: (Options code adapted from ui.widget.js) - - _refreshSize: function() { - this._setSize(); // update status and jPlayer element size - this._addUiClass(); // update the ui class - this._updateSize(); // update internal sizes - this._updateButtons(); - this._updateAutohide(); - this._trigger($.jPlayer.event.resize); - }, - _setSize: function() { - // Determine the current size from the options - if(this.options.fullWindow) { - this.status.width = this.options.sizeFull.width; - this.status.height = this.options.sizeFull.height; - this.status.cssClass = this.options.sizeFull.cssClass; - } else { - this.status.width = this.options.size.width; - this.status.height = this.options.size.height; - this.status.cssClass = this.options.size.cssClass; - } - - // Set the size of the jPlayer area. - this.element.css({'width': this.status.width, 'height': this.status.height}); - }, - _addUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.addClass(this.status.cssClass); - } - }, - _removeUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.removeClass(this.status.cssClass); - } - }, - _updateSize: function() { - // The poster uses show/hide so can simply resize it. - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - - // Video html or flash resized if necessary at this time, or if native video controls being used. - if(!this.status.waitForPlay && this.html.active && this.status.video || this.html.video.available && this.html.used && this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - else if(!this.status.waitForPlay && this.flash.active && this.status.video) { - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - }, - _updateAutohide: function() { - var self = this, - event = "mousemove.jPlayer", - namespace = ".jPlayerAutohide", - eventType = event + namespace, - handler = function(event) { - var moved = false, - deltaX, deltaY; - if(typeof self.internal.mouse !== "undefined") { - //get the change from last position to this position - deltaX = self.internal.mouse.x - event.pageX; - deltaY = self.internal.mouse.y - event.pageY; - moved = (Math.floor(deltaX) > 0) || (Math.floor(deltaY)>0); - } else { - moved = true; - } - // store current position for next method execution - self.internal.mouse = { - x : event.pageX, - y : event.pageY - }; - // if mouse has been actually moved, do the gui fadeIn/fadeOut - if (moved) { - self.css.jq.gui.fadeIn(self.options.autohide.fadeIn, function() { - clearTimeout(self.internal.autohideId); - self.internal.autohideId = setTimeout( function() { - self.css.jq.gui.fadeOut(self.options.autohide.fadeOut); - }, self.options.autohide.hold); - }); - } - }; - - if(this.css.jq.gui.length) { - - // End animations first so that its callback is executed now. - // Otherwise an in progress fadeIn animation still has the callback to fadeOut again. - this.css.jq.gui.stop(true, true); - - // Removes the fadeOut operation from the fadeIn callback. - clearTimeout(this.internal.autohideId); - // undefine mouse - delete this.internal.mouse; - - this.element.unbind(namespace); - this.css.jq.gui.unbind(namespace); - - if(!this.status.nativeVideoControls) { - if(this.options.fullWindow && this.options.autohide.full || !this.options.fullWindow && this.options.autohide.restored) { - this.element.bind(eventType, handler); - this.css.jq.gui.bind(eventType, handler); - this.css.jq.gui.hide(); - } else { - this.css.jq.gui.show(); - } - } else { - this.css.jq.gui.hide(); - } - } - }, - fullScreen: function(event) { - var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.fullScreen) { - this._setOption("fullScreen", false); - } else { - this._setOption("fullScreen", true); - } - }, - restoreScreen: function() { - this._setOption("fullScreen", false); - }, - _fullscreenAddEventListeners: function() { - var self = this, - fs = $.jPlayer.nativeFeatures.fullscreen; - - if(fs.api.fullscreenEnabled) { - if(fs.event.fullscreenchange) { - // Create the event handler function and store it for removal. - if(typeof this.internal.fullscreenchangeHandler !== 'function') { - this.internal.fullscreenchangeHandler = function() { - self._fullscreenchange(); - }; - } - document.addEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - // No point creating handler for fullscreenerror. - // Either logic avoids fullscreen occurring (w3c/moz), or their is no event on the browser (webkit). - } - }, - _fullscreenRemoveEventListeners: function() { - var fs = $.jPlayer.nativeFeatures.fullscreen; - if(this.internal.fullscreenchangeHandler) { - document.removeEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - }, - _fullscreenchange: function() { - // If nothing is fullscreen, then we cannot be in fullscreen mode. - if(this.options.fullScreen && !$.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()) { - this._setOption("fullScreen", false); - } - }, - _requestFullscreen: function() { - // Either the container or the jPlayer div - var e = this.ancestorJq.length ? this.ancestorJq[0] : this.element[0], - fs = $.jPlayer.nativeFeatures.fullscreen; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.requestFullscreen(e); - } - }, - _exitFullscreen: function() { - - var fs = $.jPlayer.nativeFeatures.fullscreen, - e; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.exitFullscreen(e); - } - }, - _html_initMedia: function(media) { - // Remove any existing track elements - var $media = $(this.htmlElement.media).empty(); - - // Create any track elements given with the media, as an Array of track Objects. - $.each(media.track || [], function(i,v) { - var track = document.createElement('track'); - track.setAttribute("kind", v.kind ? v.kind : ""); - track.setAttribute("src", v.src ? v.src : ""); - track.setAttribute("srclang", v.srclang ? v.srclang : ""); - track.setAttribute("label", v.label ? v.label : ""); - if(v.def) { - track.setAttribute("default", v.def); - } - $media.append(track); - }); - - this.htmlElement.media.src = this.status.src; - - if(this.options.preload !== 'none') { - this._html_load(); // See function for comments - } - this._trigger($.jPlayer.event.timeupdate); // The flash generates this event for its solution. - }, - _html_setFormat: function(media) { - var self = this; - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.html.support[format] && media[format]) { - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - }, - _html_setAudio: function(media) { - this._html_setFormat(media); - this.htmlElement.media = this.htmlElement.audio; - this._html_initMedia(media); - }, - _html_setVideo: function(media) { - this._html_setFormat(media); - if(this.status.nativeVideoControls) { - this.htmlElement.video.poster = this._validString(media.poster) ? media.poster : ""; - } - this.htmlElement.media = this.htmlElement.video; - this._html_initMedia(media); - }, - _html_resetMedia: function() { - if(this.htmlElement.media) { - if(this.htmlElement.media.id === this.internal.video.id && !this.status.nativeVideoControls) { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - this.htmlElement.media.pause(); - } - }, - _html_clearMedia: function() { - if(this.htmlElement.media) { - this.htmlElement.media.src = "about:blank"; - // The following load() is only required for Firefox 3.6 (PowerMacs). - // Recent HTMl5 browsers only require the src change. Due to changes in W3C spec and load() effect. - this.htmlElement.media.load(); // Stops an old, "in progress" download from continuing the download. Triggers the loadstart, error and emptied events, due to the empty src. Also an abort event if a download was in progress. - } - }, - _html_load: function() { - // This function remains to allow the early HTML5 browsers to work, such as Firefox 3.6 - // A change in the W3C spec for the media.load() command means that this is no longer necessary. - // This command should be removed and actually causes minor undesirable effects on some browsers. Such as loading the whole file and not only the metadata. - if(this.status.waitForLoad) { - this.status.waitForLoad = false; - this.htmlElement.media.load(); - } - clearTimeout(this.internal.htmlDlyCmdId); - }, - _html_play: function(time) { - var self = this, - media = this.htmlElement.media; - - this.androidFix.pause = false; // Cancel the pause fix. - - this._html_load(); // Loads if required and clears any delayed commands. - - // Setup the Android Fix. - if(this.androidFix.setMedia) { - this.androidFix.play = true; - this.androidFix.time = time; - - } else if(!isNaN(time)) { - - // Attempt to play it, since iOS has been ignoring commands - if(this.internal.cmdsIgnored) { - media.play(); - } - - try { - // !media.seekable is for old HTML5 browsers, like Firefox 3.6. - // Checking seekable.length is important for iOS6 to work with setMedia().play(time) - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - media.play(); - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.play(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } else { - media.play(); - } - this._html_checkWaitForPlay(); - }, - _html_pause: function(time) { - var self = this, - media = this.htmlElement.media; - - this.androidFix.play = false; // Cancel the play fix. - - if(time > 0) { // We do not want the stop() command, which does pause(0), causing a load operation. - this._html_load(); // Loads if required and clears any delayed commands. - } else { - clearTimeout(this.internal.htmlDlyCmdId); - } - - // Order of these commands is important for Safari (Win) and IE9. Pause then change currentTime. - media.pause(); - - // Setup the Android Fix. - if(this.androidFix.setMedia) { - this.androidFix.pause = true; - this.androidFix.time = time; - - } else if(!isNaN(time)) { - try { - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.pause(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this._html_checkWaitForPlay(); - } - }, - _html_playHead: function(percent) { - var self = this, - media = this.htmlElement.media; - - this._html_load(); // Loads if required and clears any delayed commands. - - // This playHead() method needs a refactor to apply the android fix. - - try { - if(typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = percent * media.seekable.end(media.seekable.length-1) / 100; - } else if(media.duration > 0 && !isNaN(media.duration)) { - media.currentTime = percent * media.duration / 100; - } else { - throw "e"; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.playHead(percent); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - if(!this.status.waitForLoad) { - this._html_checkWaitForPlay(); - } - }, - _html_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _html_setProperty: function(property, value) { - if(this.html.audio.available) { - this.htmlElement.audio[property] = value; - } - if(this.html.video.available) { - this.htmlElement.video[property] = value; - } - }, - _aurora_setAudio: function(media) { - var self = this; - - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.aurora.support[format] && media[format]) { - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - - return false; - } - }); - - this.aurora.player = new AV.Player.fromURL(this.status.src); - this._addAuroraEventListeners(this.aurora.player, this.aurora); - - if(this.options.preload === 'auto') { - this._aurora_load(); - this.status.waitForLoad = false; - } - }, - _aurora_resetMedia: function() { - if (this.aurora.player) { - this.aurora.player.stop(); - } - }, - _aurora_clearMedia: function() { - // Nothing to clear. - }, - _aurora_load: function() { - if(this.status.waitForLoad) { - this.status.waitForLoad = false; - this.aurora.player.preload(); - } - }, - _aurora_play: function(time) { - if (!this.status.waitForLoad) { - if (!isNaN(time)) { - this.aurora.player.seek(time); - } - } - if (!this.aurora.player.playing) { - this.aurora.player.play(); - } - this.status.waitForLoad = false; - this._aurora_checkWaitForPlay(); - - // No event from the player, update UI now. - this._updateButtons(true); - this._trigger($.jPlayer.event.play); - }, - _aurora_pause: function(time) { - if (!isNaN(time)) { - this.aurora.player.seek(time * 1000); - } - this.aurora.player.pause(); - - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this._aurora_checkWaitForPlay(); - } - - // No event from the player, update UI now. - this._updateButtons(false); - this._trigger($.jPlayer.event.pause); - }, - _aurora_playHead: function(percent) { - if(this.aurora.player.duration > 0) { - // The seek() sould be in milliseconds, but the only codec that works with seek (aac.js) uses seconds. - this.aurora.player.seek(percent * this.aurora.player.duration / 100); // Using seconds - } - - if(!this.status.waitForLoad) { - this._aurora_checkWaitForPlay(); - } - }, - _aurora_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - } - }, - _aurora_volume: function(v) { - this.aurora.player.volume = v * 100; - }, - _aurora_mute: function(m) { - if (m) { - this.aurora.properties.lastvolume = this.aurora.player.volume; - this.aurora.player.volume = 0; - } else { - this.aurora.player.volume = this.aurora.properties.lastvolume; - } - this.aurora.properties.muted = m; - }, - _flash_setAudio: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4a" : - case "fla" : - self._getMovie().fl_setAudio_m4a(media[format]); - break; - case "mp3" : - self._getMovie().fl_setAudio_mp3(media[format]); - break; - case "rtmpa": - self._getMovie().fl_setAudio_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_setVideo: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4v" : - case "flv" : - self._getMovie().fl_setVideo_m4v(media[format]); - break; - case "rtmpv": - self._getMovie().fl_setVideo_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_resetMedia: function() { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Must do via CSS as setting attr() to zero causes a jQuery error in IE. - this._flash_pause(NaN); - }, - _flash_clearMedia: function() { - try { - this._getMovie().fl_clearMedia(); - } catch(err) { this._flashError(err); } - }, - _flash_load: function() { - try { - this._getMovie().fl_load(); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - }, - _flash_play: function(time) { - try { - this._getMovie().fl_play(time); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - }, - _flash_pause: function(time) { - try { - this._getMovie().fl_pause(time); - } catch(err) { this._flashError(err); } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - } - }, - _flash_playHead: function(p) { - try { - this._getMovie().fl_play_head(p); - } catch(err) { this._flashError(err); } - if(!this.status.waitForLoad) { - this._flash_checkWaitForPlay(); - } - }, - _flash_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _flash_volume: function(v) { - try { - this._getMovie().fl_volume(v); - } catch(err) { this._flashError(err); } - }, - _flash_mute: function(m) { - try { - this._getMovie().fl_mute(m); - } catch(err) { this._flashError(err); } - }, - _getMovie: function() { - return document[this.internal.flash.id]; - }, - _getFlashPluginVersion: function() { - - // _getFlashPluginVersion() code influenced by: - // - FlashReplace 1.01: http://code.google.com/p/flashreplace/ - // - SWFObject 2.2: http://code.google.com/p/swfobject/ - - var version = 0, - flash; - if(window.ActiveXObject) { - try { - flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - if (flash) { // flash will return null when ActiveX is disabled - var v = flash.GetVariable("$version"); - if(v) { - v = v.split(" ")[1].split(","); - version = parseInt(v[0], 10) + "." + parseInt(v[1], 10); - } - } - } catch(e) {} - } - else if(navigator.plugins && navigator.mimeTypes.length > 0) { - flash = navigator.plugins["Shockwave Flash"]; - if(flash) { - version = navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/, "$1"); - } - } - return version * 1; // Converts to a number - }, - _checkForFlash: function (version) { - var flashOk = false; - if(this._getFlashPluginVersion() >= version) { - flashOk = true; - } - return flashOk; - }, - _validString: function(url) { - return (url && typeof url === "string"); // Empty strings return false - }, - _limitValue: function(value, min, max) { - return (value < min) ? min : ((value > max) ? max : value); - }, - _urlNotSetError: function(context) { - this._error( { - type: $.jPlayer.error.URL_NOT_SET, - context: context, - message: $.jPlayer.errorMsg.URL_NOT_SET, - hint: $.jPlayer.errorHint.URL_NOT_SET - }); - }, - _flashError: function(error) { - var errorType; - if(!this.internal.ready) { - errorType = "FLASH"; - } else { - errorType = "FLASH_DISABLED"; - } - this._error( { - type: $.jPlayer.error[errorType], - context: this.internal.flash.swf, - message: $.jPlayer.errorMsg[errorType] + error.message, - hint: $.jPlayer.errorHint[errorType] - }); - // Allow the audio player to recover if display:none and then shown again, or with position:fixed on Firefox. - // This really only affects audio in a media player, as an audio player could easily move the jPlayer element away from such issues. - this.internal.flash.jq.css({'width':'1px', 'height':'1px'}); - }, - _error: function(error) { - this._trigger($.jPlayer.event.error, error); - if(this.options.errorAlerts) { - this._alert("Error!" + (error.message ? "\n" + error.message : "") + (error.hint ? "\n" + error.hint : "") + "\nContext: " + error.context); - } - }, - _warning: function(warning) { - this._trigger($.jPlayer.event.warning, undefined, warning); - if(this.options.warningAlerts) { - this._alert("Warning!" + (warning.message ? "\n" + warning.message : "") + (warning.hint ? "\n" + warning.hint : "") + "\nContext: " + warning.context); - } - }, - _alert: function(message) { - var msg = "jPlayer " + this.version.script + " : id='" + this.internal.self.id +"' : " + message; - if(!this.options.consoleAlerts) { - alert(msg); - } else if(window.console && window.console.log) { - window.console.log(msg); - } - }, - _emulateHtmlBridge: function() { - var self = this; - - // Emulate methods on jPlayer's DOM element. - $.each( $.jPlayer.emulateMethods.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = function(arg) { - self[name](arg); - }; - - }); - - // Bubble jPlayer events to its DOM element. - $.each($.jPlayer.event, function(eventName,eventType) { - var nativeEvent = true; - $.each( $.jPlayer.reservedEvent.split(/\s+/g), function(i, name) { - if(name === eventName) { - nativeEvent = false; - return false; - } - }); - if(nativeEvent) { - self.element.bind(eventType + ".jPlayer.jPlayerHtml", function() { // With .jPlayer & .jPlayerHtml namespaces. - self._emulateHtmlUpdate(); - var domEvent = document.createEvent("Event"); - domEvent.initEvent(eventName, false, true); - self.internal.domNode.dispatchEvent(domEvent); - }); - } - // The error event would require a special case - }); - - // IE9 has a readyState property on all elements. The document should have it, but all (except media) elements inherit it in IE9. This conflicts with Popcorn, which polls the readyState. - }, - _emulateHtmlUpdate: function() { - var self = this; - - $.each( $.jPlayer.emulateStatus.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.status[name]; - }); - $.each( $.jPlayer.emulateOptions.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.options[name]; - }); - }, - _destroyHtmlBridge: function() { - var self = this; - - // Bridge event handlers are also removed by destroy() through .jPlayer namespace. - this.element.unbind(".jPlayerHtml"); // Remove all event handlers created by the jPlayer bridge. So you can change the emulateHtml option. - - // Remove the methods and properties - var emulated = $.jPlayer.emulateMethods + " " + $.jPlayer.emulateStatus + " " + $.jPlayer.emulateOptions; - $.each( emulated.split(/\s+/g), function(i, name) { - delete self.internal.domNode[name]; - }); - } - }; - - $.jPlayer.error = { - FLASH: "e_flash", - FLASH_DISABLED: "e_flash_disabled", - NO_SOLUTION: "e_no_solution", - NO_SUPPORT: "e_no_support", - URL: "e_url", - URL_NOT_SET: "e_url_not_set", - VERSION: "e_version" - }; - - $.jPlayer.errorMsg = { - FLASH: "jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ", // Used in: _flashError() - FLASH_DISABLED: "jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ", // Used in: _flashError() - NO_SOLUTION: "No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", // Used in: _init() - NO_SUPPORT: "It is not possible to play any media format provided in setMedia() on this browser using your current options.", // Used in: setMedia() - URL: "Media URL could not be loaded.", // Used in: jPlayerFlashEvent() and _addHtmlEventListeners() - URL_NOT_SET: "Attempt to issue media playback commands, while no media url is set.", // Used in: load(), play(), pause(), stop() and playHead() - VERSION: "jPlayer " + $.jPlayer.prototype.version.script + " needs Jplayer.swf version " + $.jPlayer.prototype.version.needFlash + " but found " // Used in: jPlayerReady() - }; - - $.jPlayer.errorHint = { - FLASH: "Check your swfPath option and that Jplayer.swf is there.", - FLASH_DISABLED: "Check that you have not display:none; the jPlayer entity or any ancestor.", - NO_SOLUTION: "Review the jPlayer options: support and supplied.", - NO_SUPPORT: "Video or audio formats defined in the supplied option are missing.", - URL: "Check media URL is valid.", - URL_NOT_SET: "Use setMedia() to set the media URL.", - VERSION: "Update jPlayer files." - }; - - $.jPlayer.warning = { - CSS_SELECTOR_COUNT: "e_css_selector_count", - CSS_SELECTOR_METHOD: "e_css_selector_method", - CSS_SELECTOR_STRING: "e_css_selector_string", - OPTION_KEY: "e_option_key" - }; - - $.jPlayer.warningMsg = { - CSS_SELECTOR_COUNT: "The number of css selectors found did not equal one: ", - CSS_SELECTOR_METHOD: "The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.", - CSS_SELECTOR_STRING: "The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.", - OPTION_KEY: "The option requested in jPlayer('option') is undefined." - }; - - $.jPlayer.warningHint = { - CSS_SELECTOR_COUNT: "Check your css selector and the ancestor.", - CSS_SELECTOR_METHOD: "Check your method name.", - CSS_SELECTOR_STRING: "Check your css selector is a string.", - OPTION_KEY: "Check your option name." - }; -})); diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.min.js b/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.min.js deleted file mode 100644 index 99f64d7..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! jPlayer 2.9.2 for jQuery ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b("object"==typeof exports?require("jquery"):a.jQuery?a.jQuery:a.Zepto)}(this,function(a,b){a.fn.jPlayer=function(c){var d="jPlayer",e="string"==typeof c,f=Array.prototype.slice.call(arguments,1),g=this;return c=!e&&f.length?a.extend.apply(null,[!0,c].concat(f)):c,e&&"_"===c.charAt(0)?g:(this.each(e?function(){var e=a(this).data(d),h=e&&a.isFunction(e[c])?e[c].apply(e,f):e;return h!==e&&h!==b?(g=h,!1):void 0}:function(){var b=a(this).data(d);b?b.option(c||{}):a(this).data(d,new a.jPlayer(c,this))}),g)},a.jPlayer=function(b,c){if(arguments.length){this.element=a(c),this.options=a.extend(!0,{},this.options,b);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()}),this._init()}},"function"!=typeof a.fn.stop&&(a.fn.stop=function(){}),a.jPlayer.emulateMethods="load play pause",a.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",a.jPlayer.emulateOptions="muted volume",a.jPlayer.reservedEvent="ready flashreset resize repeat error warning",a.jPlayer.event={},a.each(["ready","setmedia","flashreset","resize","repeat","click","error","warning","loadstart","progress","suspend","abort","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"],function(){a.jPlayer.event[this]="jPlayer_"+this}),a.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"],a.jPlayer.pause=function(){a.jPlayer.prototype.destroyRemoved(),a.each(a.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})},a.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var c=function(){this.init()};c.prototype={init:function(){this.options={timeFormat:a.jPlayer.timeFormat}},time:function(a){a=a&&"number"==typeof a?a:0;var b=new Date(1e3*a),c=b.getUTCHours(),d=this.options.timeFormat.showHour?b.getUTCMinutes():b.getUTCMinutes()+60*c,e=this.options.timeFormat.showMin?b.getUTCSeconds():b.getUTCSeconds()+60*d,f=this.options.timeFormat.padHour&&10>c?"0"+c:c,g=this.options.timeFormat.padMin&&10>d?"0"+d:d,h=this.options.timeFormat.padSec&&10>e?"0"+e:e,i="";return i+=this.options.timeFormat.showHour?f+this.options.timeFormat.sepHour:"",i+=this.options.timeFormat.showMin?g+this.options.timeFormat.sepMin:"",i+=this.options.timeFormat.showSec?h+this.options.timeFormat.sepSec:""}};var d=new c;a.jPlayer.convertTime=function(a){return d.time(a)},a.jPlayer.uaBrowser=function(a){var b=a.toLowerCase(),c=/(webkit)[ \/]([\w.]+)/,d=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/,g=c.exec(b)||d.exec(b)||e.exec(b)||b.indexOf("compatible")<0&&f.exec(b)||[];return{browser:g[1]||"",version:g[2]||"0"}},a.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),c=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/,d=/(ipad|playbook)/,e=/(android)/,f=/(mobile)/,g=c.exec(b)||[],h=d.exec(b)||!f.exec(b)&&e.exec(b)||[];return g[1]&&(g[1]=g[1].replace(/\s/g,"_")),{platform:g[1]||"",tablet:h[1]||""}},a.jPlayer.browser={},a.jPlayer.platform={};var e=a.jPlayer.uaBrowser(navigator.userAgent);e.browser&&(a.jPlayer.browser[e.browser]=!0,a.jPlayer.browser.version=e.version);var f=a.jPlayer.uaPlatform(navigator.userAgent);f.platform&&(a.jPlayer.platform[f.platform]=!0,a.jPlayer.platform.mobile=!f.tablet,a.jPlayer.platform.tablet=!!f.tablet),a.jPlayer.getDocMode=function(){var b;return a.jPlayer.browser.msie&&(document.documentMode?b=document.documentMode:(b=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(b=7))),b},a.jPlayer.browser.documentMode=a.jPlayer.getDocMode(),a.jPlayer.nativeFeatures={init:function(){var a,b,c,d=document,e=d.createElement("video"),f={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange","fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""],ms:["","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError"]},g=["w3c","moz","webkit","webkitVideo","ms"];for(this.fullscreen=a={support:{w3c:!!d[f.w3c[0]],moz:!!d[f.moz[0]],webkit:"function"==typeof d[f.webkit[3]],webkitVideo:"function"==typeof e[f.webkitVideo[2]],ms:"function"==typeof e[f.ms[2]]},used:{}},b=0,c=g.length;c>b;b++){var h=g[b];if(a.support[h]){a.spec=h,a.used[h]=!0;break}}if(a.spec){var i=f[a.spec];a.api={fullscreenEnabled:!0,fullscreenElement:function(a){return a=a?a:d,a[i[1]]},requestFullscreen:function(a){return a[i[2]]()},exitFullscreen:function(a){return a=a?a:d,a[i[3]]()}},a.event={fullscreenchange:i[4],fullscreenerror:i[5]}}else a.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},a.event={}}},a.jPlayer.nativeFeatures.init(),a.jPlayer.focus=null,a.jPlayer.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var g=function(b){var c,d=a.jPlayer.focus;d&&(a.each(a.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(a,d){return b.target.nodeName.toUpperCase()===d.toUpperCase()?(c=!0,!1):void 0}),c||a.each(d.options.keyBindings,function(c,e){return e&&a.isFunction(e.fn)&&("number"==typeof e.key&&b.which===e.key||"string"==typeof e.key&&b.key===e.key)?(b.preventDefault(),e.fn(d),!1):void 0}))};a.jPlayer.keys=function(b){var c="keydown.jPlayer";a(document.documentElement).unbind(c),b&&a(document.documentElement).bind(c,g)},a.jPlayer.keys(!0),a.jPlayer.prototype={count:0,version:{script:"2.9.2",needFlash:"2.9.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",auroraFormats:"wav",preload:"metadata",volume:.8,muted:!1,remainingDuration:!1,toggleDuration:!1,captureDuration:!0,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",title:".jp-title",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},stateClass:{playing:"jp-state-playing",seeking:"jp-state-seeking",muted:"jp-state-muted",looped:"jp-state-looped",fullScreen:"jp-state-full-screen",noVolume:"jp-state-no-volume"},useStateClassSkin:!1,autoBlur:!0,smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1e3},loop:!1,repeat:function(b){b.jPlayer.options.loop?a(this).unbind(".jPlayerRepeat").bind(a.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){a(this).jPlayer("play")}):a(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,android_phone:/(?=.*android)(?!.*chrome)(?=.*mobile)/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:!1,audioFullScreen:!1,keyBindings:{play:{key:80,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:70,fn:function(a){(a.status.video||a.options.audioFullScreen)&&a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:77,fn:function(a){a._muted(!a.options.muted)}},volumeUp:{key:190,fn:function(a){a.volume(a.options.volume+.1)}},volumeDown:{key:188,fn:function(a){a.volume(a.options.volume-.1)}},loop:{key:76,fn:function(a){a._loop(!a.options.loop)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,aurora:!0,flash:!0},format:{mp3:{codec:"audio/mpeg",flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var c=this;if(this.element.empty(),this.status=a.extend({},this.status),this.internal=a.extend({},this.internal),this.options.timeFormat=a.extend({},a.jPlayer.timeFormat,this.options.timeFormat),this.internal.cmdsIgnored=a.jPlayer.platform.ipad||a.jPlayer.platform.iphone||a.jPlayer.platform.ipod,this.internal.domNode=this.element.get(0),this.options.keyEnabled&&!a.jPlayer.focus&&(a.jPlayer.focus=this),this.androidFix={setMedia:!1,play:!1,pause:!1,time:0/0},a.jPlayer.platform.android&&(this.options.preload="auto"!==this.options.preload?"metadata":"auto"),this.formats=[],this.solutions=[],this.require={},this.htmlElement={},this.html={},this.html.audio={},this.html.video={},this.aurora={},this.aurora.formats=[],this.aurora.properties=[],this.flash={},this.css={},this.css.cs={},this.css.jq={},this.ancestorJq=[],this.options.volume=this._limitValue(this.options.volume,0,1),a.each(this.options.supplied.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.formats.push(e)}}),a.each(this.options.solution.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.solution[e]){var f=!1;a.each(c.solutions,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.solutions.push(e)}}),a.each(this.options.auroraFormats.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.aurora.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.aurora.formats.push(e)}}),this.internal.instance="jp_"+this.count,this.instances[this.internal.instance]=this.element,this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count),this.internal.self=a.extend({},{id:this.element.attr("id"),jq:this.element}),this.internal.audio=a.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:b}),this.internal.video=a.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:b}),this.internal.flash=a.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:b,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"jquery.jplayer.swf":"")}),this.internal.poster=a.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:b}),a.each(a.jPlayer.event,function(a,d){c.options[a]!==b&&(c.element.bind(d+".jPlayer",c.options[a]),c.options[a]=b)}),this.require.audio=!1,this.require.video=!1,a.each(this.formats,function(a,b){c.require[c.format[b].media]=!0}),this.options=this.require.video?a.extend(!0,{},this.optionsVideo,this.options):a.extend(!0,{},this.optionsAudio,this.options),this._setSize(),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow),this.status.noVolume=this._uaBlocklist(this.options.noVolume),a.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners(),this._restrictNativeVideoControls(),this.htmlElement.poster=document.createElement("img"),this.htmlElement.poster.id=this.internal.poster.id,this.htmlElement.poster.onload=function(){(!c.status.video||c.status.waitForPlay)&&c.internal.poster.jq.show()},this.element.append(this.htmlElement.poster),this.internal.poster.jq=a("#"+this.internal.poster.id),this.internal.poster.jq.css({width:this.status.width,height:this.status.height}),this.internal.poster.jq.hide(),this.internal.poster.jq.bind("click.jPlayer",function(){c._trigger(a.jPlayer.event.click)}),this.html.audio.available=!1,this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),this.htmlElement.audio.id=this.internal.audio.id,this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)),this.html.video.available=!1,this.require.video&&(this.htmlElement.video=document.createElement("video"),this.htmlElement.video.id=this.internal.video.id,this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)),this.flash.available=this._checkForFlash(10.1),this.html.canPlay={},this.aurora.canPlay={},this.flash.canPlay={},a.each(this.formats,function(b,d){c.html.canPlay[d]=c.html[c.format[d].media].available&&""!==c.htmlElement[c.format[d].media].canPlayType(c.format[d].codec),c.aurora.canPlay[d]=a.inArray(d,c.aurora.formats)>-1,c.flash.canPlay[d]=c.format[d].flashCanPlay&&c.flash.available}),this.html.desired=!1,this.aurora.desired=!1,this.flash.desired=!1,a.each(this.solutions,function(b,d){if(0===b)c[d].desired=!0;else{var e=!1,f=!1;a.each(c.formats,function(a,b){c[c.solutions[0]].canPlay[b]&&("video"===c.format[b].media?f=!0:e=!0)}),c[d].desired=c.require.audio&&!e||c.require.video&&!f}}),this.html.support={},this.aurora.support={},this.flash.support={},a.each(this.formats,function(a,b){c.html.support[b]=c.html.canPlay[b]&&c.html.desired,c.aurora.support[b]=c.aurora.canPlay[b]&&c.aurora.desired,c.flash.support[b]=c.flash.canPlay[b]&&c.flash.desired}),this.html.used=!1,this.aurora.used=!1,this.flash.used=!1,a.each(this.solutions,function(b,d){a.each(c.formats,function(a,b){return c[d].support[b]?(c[d].used=!0,!1):void 0})}),this._resetActive(),this._resetGate(),this._cssSelectorAncestor(this.options.cssSelectorAncestor),this.html.used||this.aurora.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:a.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SOLUTION,hint:a.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show()),this.flash.used){var d,e="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(a.jPlayer.browser.msie&&(Number(a.jPlayer.browser.version)<9||a.jPlayer.browser.documentMode<9)){var f='',g=['','','','',''];d=document.createElement(f);for(var h=0;h