Location: PHPKode > scripts > Genghis > genghis-1.1.0/genghis-1.1.0/genghis.php
<?php

/**
 * Genghis v1.1.0
 *
 * The single-file MongoDB admin app
 *
 * http://genghisapp.com
 *
 * @author Justin Hileman <hide@address.com>
 */
class Api extends App { const ROUTE_PATTERN = '~^/?servers(?:/(?P<server>[^/]+)(?P<databases>/databases(?:/(?P<database>[^/]+)(?P<collections>/collections(?:/(?P<collection>[^/]+)(?P<documents>/documents(?:/(?P<document>[^/]+))?)?)?)?)?)?)?/?$~'; const CONVERT_JSON_ROUTE = '~/?convert-json/?$~'; const CHECK_STATUS_ROUTE = '~/?check-status/?$~'; const PAGE_LIMIT = 50; protected $servers; public function run() { try { return parent::run(); } catch (HttpException $e) { $msg = $e->getMessage() ? $e->getMessage() : Response::getStatusText($e->getStatus()); $response = new JsonResponse(array('error' => $msg), $e->getStatus()); $response->render(); } } public function route($method, $path) { if (preg_match(self::CHECK_STATUS_ROUTE, $path)) { return $this->checkStatus(); } if (preg_match(self::CONVERT_JSON_ROUTE, $path)) { $decoder = new JsonDecoder(); return new JsonResponse($decoder->decode(file_get_contents('php://input'))); } $p = array(); if (preg_match(self::ROUTE_PATTERN, $path, $p)) { foreach ($p as $i => $val) { if (is_numeric($i) || empty($val)) { unset($p[$i]); } } if (isset($p['documents'])) { if (isset($p['document'])) { switch ($method) { case 'GET': return $this->findDocument($p['server'], $p['database'], $p['collection'], $p['document']); case 'PUT': return $this->updateDocument($p['server'], $p['database'], $p['collection'], $p['document'], $this->getRequestData()); case 'DELETE': return $this->removeDocument($p['server'], $p['database'], $p['collection'], $p['document']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->findDocuments( $p['server'], $p['database'], $p['collection'], (string) $this->getQueryParam('q', ''), (int) $this->getQueryParam('page', 1) ); case 'POST': return $this->insertDocument($p['server'], $p['database'], $p['collection'], $this->getRequestData()); case 'DELETE': return $this->truncateCollection($p['server'], $p['database'], $p['collection']); default: throw new HttpException(405); } } } elseif (isset($p['collections'])) { if (isset($p['collection'])) { switch ($method) { case 'GET': return $this->selectCollection($p['server'], $p['database'], $p['collection']); case 'DELETE': return $this->dropCollection($p['server'], $p['database'], $p['collection']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->listCollections($p['server'], $p['database']); case 'POST': return $this->createCollection($p['server'], $p['database'], $this->getRequestData()); default: throw new HttpException(405); } } } elseif (isset($p['databases'])) { if (isset($p['database'])) { switch ($method) { case 'GET': return $this->selectDatabase($p['server'], $p['database']); case 'DELETE': return $this->dropDatabase($p['server'], $p['database']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->listDatabases($p['server']); case 'POST': return $this->createDatabase($p['server'], $this->getRequestData()); default: throw new HttpException(405); } } } else { if (isset($p['server'])) { switch ($method) { case 'GET': return $this->showServer($p['server']); case 'DELETE': return $this->removeServer($p['server']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->listServers(); case 'POST': return $this->addServer($this->getRequestData()); default: throw new HttpException(405); } } } } throw new HttpException(404); } protected function checkStatus() { $alerts = array(); if (!class_exists('Mongo', false)) { $alerts[] = array( 'level' => 'error', 'msg' => '<strong>Mongo PHP class not found.</strong> ' . 'Have you installed and enabled the PECL Mongo drivers?', ); } return new JsonResponse(compact('alerts')); } protected function listServers() { $this->initServers(); $servers = array(); foreach (array_keys($this->servers) as $name) { $servers[] = $this->dumpServer($name); } return new JsonResponse($servers); } protected function addServer(array $data) { if (!isset($data['name'])) { throw new HttpException(400, 'Server name must be specified'); } $dsn = $data['name']; if (strpos($dsn, '://') === false) { $dsn = 'mongodb://'.$dsn; } else if (strpos($dsn, 'mongodb://') !== 0) { throw new HttpException(400, 'Malformed server dsn'); } $chunks = parse_url($dsn); if ($chunks === false || isset($chunks['query']) || isset($chunks['fragment']) || !isset($chunks['host'])) { throw new HttpException(400, 'Malformed server dsn'); } $name = $chunks['host']; if (isset($chunks['user'])) { $name = $chunks['user'].'@'.$name; } if (isset($chunks['port']) && $chunks['port'] !== 27017) { $name .= ':'.$chunks['port']; } $this->initServers(); $this->servers[$name] = $dsn; $this->saveServers(); return $this->showServer($name); } protected function removeServer($name) { $this->initServers(); if (isset($this->servers[$name])) { unset($this->servers[$name]); $this->saveServers(); return new JsonResponse(array('success' => true)); } throw new HttpException(404); } protected function showServer($name) { $this->initServers(); if (isset($this->servers[$name])) { return new JsonResponse($this->dumpServer($name)); } else { throw new HttpException(404); } } protected function dumpServer($name) { try { $res = $this->getMongo($name)->listDBs(); $dbs = array_map(function($db) { return $db['name']; }, $res['databases']); return array( 'id' => $name, 'name' => $name, 'size' => $res['totalSize'], 'count' => count($dbs), 'databases' => $dbs, ); } catch (Exception $e) { return array( 'id' => $name, 'name' => $name, 'error' => 'Unable to connect to Mongo server at "'.$name.'".', ); } } protected function initServers() { if (!isset($this->servers)) { if (isset($_COOKIE['genghis_servers']) && $servers = json_decode($_COOKIE['genghis_servers'], true)) { $this->servers = $servers; } else { $this->servers = array('localhost' => 'localhost:27017'); } } } protected function saveServers() { setcookie('genghis_servers', json_encode($this->servers), time()+60*60*24*365, '/'); } protected function dumpDatabase($server, $database) { $dbs = $this->getMongo($server)->listDBs(); foreach ($dbs['databases'] as $db) { if ($db['name'] == $database) { $colls = array(); foreach ($this->getDatabase($server, $database)->listCollections() as $coll) { $colls[] = $coll->getName(); } return array( 'id' => $db['name'], 'name' => $db['name'], 'count' => count($colls), 'collections' => $colls, 'size' => $db['sizeOnDisk'], ); } } } protected function selectDatabase($server, $database) { if ($db = $this->dumpDatabase($server, $database)) { return new JsonResponse($db); } throw new HttpException(404); } protected function dropDatabase($server, $database) { $this->getDatabase($server, $database)->drop(); return new JsonResponse(array('success' => true)); } protected function listDatabases($server) { $dbs = array(); $mongo = $this->getMongo($server); $res = $this->getMongo($server)->listDBs(); foreach ($res['databases'] as $db) { $dbs[] = $this->dumpDatabase($server, $db['name']); } return new JsonResponse($dbs); } protected function createDatabase($server, array $data) { if (!isset($data['name'])) { throw new HttpException(400, 'Database name must be specified'); } $this->getCollection($server, $data['name'], '__genghis_tmp_collection__')->drop(); return $this->selectDatabase($server, $data['name']); } protected function dumpCollection($server, $database, $collection) { foreach ($this->getDatabase($server, $database)->listCollections() as $coll) { if ($coll->getName() == $collection) { return array( 'id' => $coll->getName(), 'name' => $coll->getName(), 'count' => $coll->count(), 'indexes' => $coll->getIndexInfo(), ); } } } public function selectCollection($server, $database, $collection) { if ($coll = $this->dumpCollection($server, $database, $collection)) { return new JsonResponse($coll); } throw new HttpException(404); } public function truncateCollection($server, $database, $collection) { if ($coll = $this->getCollection($server, $database, $collection)) { $coll->remove(array()); return $this->selectCollection($server, $database, $collection); } throw new HttpException(404); } public function dropCollection($server, $database, $collection) { if ($coll = $this->getCollection($server, $database, $collection)) { $coll->drop(); return new JsonResponse(array('success' => true)); } throw new HttpException(404); } public function listCollections($server, $database) { $colls = array(); foreach ($this->getDatabase($server, $database)->listCollections() as $coll) { $colls[] = $this->dumpCollection($server, $database, $coll->getName()); } return new JsonResponse($colls); } public function createCollection($server, $database, array $data = array()) { if (!isset($data['name'])) { throw new HttpException(400, 'Database name must be specified'); } $this->getDatabase($server, $database)->createCollection($data['name']); return $this->selectCollection($server, $database, $data['name']); } public function findDocument($server, $database, $collection, $document) { $doc = $this->getCollection($server, $database, $collection)->findOne(array( '_id' => new MongoId($document), )); if ($doc) { return new JsonResponse($doc); } throw new HttpException(404); } public function updateDocument($server, $database, $collection, $document, array $data) { $coll = $this->getCollection($server, $database, $collection); $query = array('_id' => new MongoId($document)); if ($coll->findOne($query)) { $result = $coll->update($query, $data, array('safe' => true)); if (isset($result['ok']) && $result['ok']) { return $this->findDocument($server, $database, $collection, $document); } else { throw new HttpException(); } } else { throw new HttpException(404); } } public function removeDocument($server, $database, $collection, $document) { $coll = $this->getCollection($server, $database, $collection); $query = array('_id' => new MongoId($document)); if ($coll->findOne($query)) { $result = $coll->remove($query, array('safe' => true)); if (isset($result['ok']) && $result['ok']) { return new JsonResponse(array('success' => true)); } else { throw new HttpException(); } } else { throw new HttpException(404); } } public function findDocuments($server, $database, $collection, $query = null, $page = 1) { $offset = self::PAGE_LIMIT * ($page - 1); $cursor = $this->getCollection($server, $database, $collection) ->find($query ? $this->decodeJson($query) : array()) ->limit(self::PAGE_LIMIT) ->skip($offset); $count = $cursor->count(); return new JsonResponse(array( 'count' => $count, 'page' => $page, 'pages' => max(1, ceil($count / self::PAGE_LIMIT)), 'per_page' => self::PAGE_LIMIT, 'offset' => $offset, 'documents' => array_values(iterator_to_array($cursor)), )); } public function insertDocument($server, $database, $collection, array $data = null) { if (empty($data)) { throw new HttpException(400, 'Malformed document'); } $result = $this->getCollection($server, $database, $collection) ->insert($data, array('safe' => true)); if (isset($result['ok']) && $result['ok']) { return new JsonResponse($data); } else { throw new HttpException(); } } protected function decodeJson($data) { try { $decoder = new JsonDecoder(); return $this->thunkMongoQuery($decoder->decode($data)); } catch (JsonException $e) { throw new HttpException(400, 'Malformed document'); } } protected function thunkMongoQuery(array $query) { foreach ($query as $key => $val) { if (is_array($val)) { if (isset($val['$id']) && count($val) == 1) { $query[$key] = new MongoId($val['$id']); } else if(count($val) == 2 && isset($val['sec']) && isset($val['usec'])) { $query[$key] = new MongoDate($val['sec'], $val['usec']); } else { $query[$key] = $this->thunkMongoQuery($val); } } else if ($val instanceof JsonRegex) { $query[$key] = new MongoRegex($val->pattern); } } return $query; } protected function getRequestData() { return $this->decodeJson(file_get_contents('php://input')); } protected function getMongo($server) { $this->initServers(); if (isset($this->servers[$server])) { return new Mongo($this->servers[$server]); } } protected function getDatabase($server, $database) { return $this->getMongo($server)->selectDB($database); } protected function getCollection($server, $database, $collection) { return $this->getDatabase($server, $database)->selectCollection($collection); } }
class App { protected $assets = array(); protected $assetEtags = array(); protected $baseUrl; public function run() { try { $response = $this->route($this->getRequestMethod(), $this->getRequestPath()); if ($response instanceof Response) { $response->render(); } else { throw new HttpException(500); } } catch (HttpException $e) { $errorResponse = $this->renderTemplate( 'error.html.mustache', $e->getStatus(), array( 'message' => $e->getMessage(), 'status' => $e->getStatus(), ) ); $errorResponse->render(); } } public function route($method, $path) { if ($this->isJsonRequest()) { try { $api = new Api(); return $api->route($method, $path); } catch (HttpException $e) { $msg = $e->getMessage() ? $e->getMessage() : Response::getStatusText($e->getStatus()); return new JsonResponse(array('error' => $msg, 'status' => $e->getStatus()), $e->getStatus()); } } else { if (strpos($path, '/assets/') === 0) { return $this->getAsset(substr($path, 8)); } else { return $this->renderTemplate('index.html.mustache'); } break; } } protected function isJsonRequest() { if (in_array($this->getRequestMethod(), array('POST', 'PUT'))) { $type = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : 'x-www-form-urlencoded'; } else { $type = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : 'text/html'; } return strpos($type, 'application/json') !== false || strpos($type, 'application/javascript') !== false; } protected function getBaseUrl() { if (!isset($this->baseUrl)) { $this->baseUrl = $this->prepareBaseUrl(); } return $this->baseUrl; } protected function prepareBaseUrl() { $filename = basename($_SERVER['SCRIPT_FILENAME']); foreach (array('SCRIPT_NAME', 'PHP_SELF', 'ORIG_SCRIPT_NAME') as $key) { if (isset($_SERVER[$key]) && basename($_SERVER[$key]) == $filename) { $baseUrl = $_SERVER[$key]; break; } } if (!isset($baseUrl)) { $path = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''; $file = isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : ''; $chunks = array_reverse(explode('/', trim($file, '/'))); $index = 0; $last = count($chunks); $baseUrl = ''; do { $seg = $segs[$index]; $baseUrl = '/'.$seg.$baseUrl; ++$index; } while (($last > $index) && (false !== ($pos = strpos($path, $baseUrl))) && (0 != $pos)); } $requestUri = $_SERVER['REQUEST_URI']; if ($baseUrl && 0 === strpos($requestUri, $baseUrl)) { return $baseUrl; } if ($baseUrl && 0 === strpos($requestUri, dirname($baseUrl))) { return rtrim(dirname($baseUrl), '/'); } $truncatedRequestUri = $requestUri; if (($pos = strpos($requestUri, '?')) !== false) { $truncatedRequestUri = substr($requestUri, 0, $pos); } $basename = basename($baseUrl); if (empty($basename) || !strpos($truncatedRequestUri, $basename)) { return ''; } if ((strlen($requestUri) >= strlen($baseUrl)) && ((false !== ($pos = strpos($requestUri, $baseUrl))) && ($pos !== 0))) { $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); } return rtrim($baseUrl, '/'); } protected function getRequestMethod() { return $_SERVER['REQUEST_METHOD']; } protected function getRequestPath() { return isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/'; } protected function getQueryParams() { global $_GET; return $_GET; } protected function getQueryParam($name, $default = null) { $params = $this->getQueryParams(); if (isset($params[$name])) { return $params[$name]; } else { return $default; } } protected function renderTemplate($name, $status = 200, array $vars = array()) { $this->initAssets(); $defaults = array( 'base_url' => $this->getBaseUrl(), ); return new Response(strtr($this->assets[$name], $this->prepareVars(array_merge($defaults, $vars))), $status); } protected function prepareVars($vars) { $ret = array(); foreach ($vars as $name => $var) { $ret['{{ '.$name.' }}'] = $var; } return $ret; } protected function getAsset($name) { $this->initAssets(); if (isset($this->assets[$name])) { return new AssetResponse($name, $this->assets[$name], array( 'Last-Modified' => gmdate("D, d M Y H:i:s", filemtime(__FILE__))." GMT", 'Etag' => sprintf('"%s"', $this->assetEtags[$name]), )); } throw new HttpException(404); } protected function initAssets() { if (empty($this->assets)) { $data = file_get_contents(__FILE__, false, null, __COMPILER_HALT_OFFSET__); foreach (preg_split("/^@@(?=[\w\d\.]+( [\w\d\.]+)?$)/m", $data, -1) as $asset) { if (trim($asset)) { list($line, $content) = explode("\n", $asset, 2); list($name, $etag) = explode(" ", $line, 2); $this->assets[$name] = trim($content); $this->assetEtags[$name] = $etag; } } } } }
class AssetResponse extends Response { protected $headers; public function __construct($name, $content, $headers = array()) { parent::__construct($content); $this->name = $name; $this->headers = array_merge(array('Content-type' => $this->getContentType()), $headers); } protected function getContentType() { $parts = explode('.', $this->name); $ext = array_pop($parts); switch ($ext) { case "js": return "application/x-javascript"; case "json": return "application/json"; case "css": return "text/css"; case "html": case "htm": case "php": return "text/html"; case "txt": return "text/plain"; default: return "unknown/" . trim($ext); } } }
class HttpException extends Exception { protected $status; public function __construct($status = 500, $msg = '') { $this->status = $status; parent::__construct(empty($msg) ? Response::getStatusText($status) : $msg); } public function getStatus() { return $this->status; } }
class JsonDecoder { const SLICE = 1; const IN_STR = 2; const IN_ARR = 3; const IN_OBJ = 4; const IN_CMT = 5; const IN_REGEX = 6; function __construct() { $this->_mb_strlen = function_exists('mb_strlen'); $this->_mb_convert_encoding = function_exists('mb_convert_encoding'); $this->_mb_substr = function_exists('mb_substr'); } var $_mb_strlen = false; var $_mb_substr = false; var $_mb_convert_encoding = false; function utf162utf8($utf16) { if($this->_mb_convert_encoding) { return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); } $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); switch(true) { case ((0x7F & $bytes) == $bytes): return chr(0x7F & $bytes); case (0x07FF & $bytes) == $bytes: return chr(0xC0 | (($bytes >> 6) & 0x1F)) . chr(0x80 | ($bytes & 0x3F)); case (0xFFFF & $bytes) == $bytes: return chr(0xE0 | (($bytes >> 12) & 0x0F)) . chr(0x80 | (($bytes >> 6) & 0x3F)) . chr(0x80 | ($bytes & 0x3F)); } return ''; } function utf82utf16($utf8) { if($this->_mb_convert_encoding) { return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); } switch($this->strlen8($utf8)) { case 1: return $utf8; case 2: return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1}))); case 3: return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2}))); } return ''; } function reduce_string($str) { $str = preg_replace(array( '#^\s*//(.+)$#m', '#^\s*/\*(.+)\*/#Us', '#/\*(.+)\*/\s*$#Us' ), '', $str); return trim($str); } function decode($str) { $str = $this->reduce_string($str); switch (strtolower($str)) { case 'true': return true; case 'false': return false; case 'null': return null; default: $m = array(); if (is_numeric($str)) { return ((float)$str == (integer)$str) ? (integer)$str : (float)$str; } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { $delim = $this->substr8($str, 0, 1); $chrs = $this->substr8($str, 1, -1); $utf8 = ''; $strlen_chrs = $this->strlen8($chrs); for ($c = 0; $c < $strlen_chrs; ++$c) { $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); $ord_chrs_c = ord($chrs{$c}); switch (true) { case $substr_chrs_c_2 == '\b': $utf8 .= chr(0x08); ++$c; break; case $substr_chrs_c_2 == '\t': $utf8 .= chr(0x09); ++$c; break; case $substr_chrs_c_2 == '\n': $utf8 .= chr(0x0A); ++$c; break; case $substr_chrs_c_2 == '\f': $utf8 .= chr(0x0C); ++$c; break; case $substr_chrs_c_2 == '\r': $utf8 .= chr(0x0D); ++$c; break; case $substr_chrs_c_2 == '\\"': case $substr_chrs_c_2 == '\\\'': case $substr_chrs_c_2 == '\\\\': case $substr_chrs_c_2 == '\\/': if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || ($delim == "'" && $substr_chrs_c_2 != '\\"')) { $utf8 .= $chrs{++$c}; } break; case preg_match('/\\\u[0-9A-F]{4}/i', $this->substr8($chrs, $c, 6)): $utf16 = chr(hexdec($this->substr8($chrs, ($c + 2), 2))) . chr(hexdec($this->substr8($chrs, ($c + 4), 2))); $utf8 .= $this->utf162utf8($utf16); $c += 5; break; case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): $utf8 .= $chrs{$c}; break; case ($ord_chrs_c & 0xE0) == 0xC0: $utf8 .= $this->substr8($chrs, $c, 2); ++$c; break; case ($ord_chrs_c & 0xF0) == 0xE0: $utf8 .= $this->substr8($chrs, $c, 3); $c += 2; break; case ($ord_chrs_c & 0xF8) == 0xF0: $utf8 .= $this->substr8($chrs, $c, 4); $c += 3; break; case ($ord_chrs_c & 0xFC) == 0xF8: $utf8 .= $this->substr8($chrs, $c, 5); $c += 4; break; case ($ord_chrs_c & 0xFE) == 0xFC: $utf8 .= $this->substr8($chrs, $c, 6); $c += 5; break; } } return $utf8; } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { if ($str{0} == '[') { $stk = array(self::IN_ARR); $arr = array(); } else { $stk = array(self::IN_OBJ); $obj = array(); } array_push($stk, array('what' => self::SLICE, 'where' => 0, 'delim' => false)); $chrs = $this->substr8($str, 1, -1); $chrs = $this->reduce_string($chrs); if ($chrs == '') { if (reset($stk) == self::IN_ARR) { return $arr; } else { return $obj; } } $strlen_chrs = $this->strlen8($chrs); for ($c = 0; $c <= $strlen_chrs; ++$c) { $top = end($stk); $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == self::SLICE))) { $slice = $this->substr8($chrs, $top['where'], ($c - $top['where'])); array_push($stk, array('what' => self::SLICE, 'where' => ($c + 1), 'delim' => false)); if (reset($stk) == self::IN_ARR) { array_push($arr, $this->decode($slice)); } elseif (reset($stk) == self::IN_OBJ) { $parts = array(); if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:/Uis', $slice, $parts)) { $key = $this->decode($parts[1]); $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); $obj[$key] = $val; } elseif (preg_match('/^\s*([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*)\s*:/Uis', $slice, $parts)) { $key = $parts[1]; $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); $obj[$key] = $val; } else { throw new JsonException(); } } } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != self::IN_STR)) { array_push($stk, array('what' => self::IN_STR, 'where' => $c, 'delim' => $chrs{$c})); } elseif (($chrs{$c} == $top['delim']) && ($top['what'] == self::IN_STR) && (($this->strlen8($this->substr8($chrs, 0, $c)) - $this->strlen8(rtrim($this->substr8($chrs, 0, $c), '\\'))) % 2 != 1)) { array_pop($stk); } elseif (($chrs{$c} == '[') && in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) { array_push($stk, array('what' => self::IN_ARR, 'where' => $c, 'delim' => false)); } elseif (($chrs{$c} == ']') && ($top['what'] == self::IN_ARR)) { array_pop($stk); } elseif (($chrs{$c} == '{') && in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) { array_push($stk, array('what' => self::IN_OBJ, 'where' => $c, 'delim' => false)); } elseif (($chrs{$c} == '}') && ($top['what'] == self::IN_OBJ)) { array_pop($stk); } elseif (($substr_chrs_c_2 == '/*') && in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) { array_push($stk, array('what' => self::IN_CMT, 'where' => $c, 'delim' => false)); $c++; } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == self::IN_CMT)) { array_pop($stk); $c++; for ($i = $top['where']; $i <= $c; ++$i) $chrs = substr_replace($chrs, ' ', $i, 1); } } if (in_array($top['what'], array(self::IN_CMT, self::IN_STR))) { throw new JsonException(); } if (reset($stk) == self::IN_ARR) { return $arr; } elseif (reset($stk) == self::IN_OBJ) { return $obj; } } elseif (preg_match('/^\/.*\/$/s', $str)) { return new JsonRegex($str); } else { throw new JsonException(); } } } function strlen8( $str ) { if ( $this->_mb_strlen ) { return mb_strlen( $str, "8bit" ); } return strlen( $str ); } function substr8( $string, $start, $length=false ) { if ( $length === false ) { $length = $this->strlen8( $string ) - $start; } if ( $this->_mb_substr ) { return mb_substr( $string, $start, $length, "8bit" ); } return substr( $string, $start, $length ); } } class JsonRegex { public $pattern; public function __construct($pattern) { $this->pattern = $pattern; } public function __toString() { return $this->getPattern(); } } class JsonException extends Exception {}
class JsonResponse extends Response { public function renderHeaders() { $this->headers['Content-type'] = 'application/json'; $this->headers['Cache-Control'] = 'no-cache, must-revalidate'; $this->headers['Expires'] = 'Wed, 04 Aug 1982 00:00:00 GMT'; parent::renderHeaders(); } public function renderContent() { print(json_encode($this->data)); } }
class RedirectResponse extends Response { public function __construct($url, $status = 301) { parent::__construct($url, $status); } public function render() { header(sprintf('Location: %s', $this->data), $this->status); } }
class Response { protected static $statusCodes = array( 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 204 => 'No Content', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 400 => 'Bad Request', 401 => 'Unauthorized', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 412 => 'Precondition Failed', 415 => 'Unsupported Media Type', 417 => 'Expectation Failed', 500 => 'Internal Server Error', 501 => 'Not Implemented', ); protected $data = ''; protected $status = 200; protected $headers = array(); public function __construct($data, $status = 200, $headers = array()) { $this->data = $data; $this->status = $status; $this->headers = $headers; } public function render() { $this->renderHeaders(); $this->renderContent(); } public static function getStatusText($status) { if (isset(self::$statusCodes[$status])) { return self::$statusCodes[$status]; } } protected function renderHeaders() { header(sprintf('HTTP/1.0 %s %s', $this->status, self::$statusCodes[$this->status])); foreach ($this->headers as $name => $val) { header(sprintf('%s: %s', $name, $val)); } } protected function renderContent() { print((string) $this->data); } }


$app = new App;
$app->run();

__halt_compiler();

@@index.html.mustache caa75029a0fcc9e6a65517129d3ff6e6
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Genghis</title> <link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADL0lEQVRYw8VW r1fbQBy/P2X8SNpcAsgZYHJ7o0zyUhRvRS6ojap1ap1hGFaTIgCzGmqKADME NTU1MRVFVGwiIqIVERWfJYHA5Zq7lO5ty3ufd9f7fu/z+eT6vcuRlZUV/E+Q 5eXlqBO2syCeGxM+lY9kEf9tkH8hkmlgaWlpIpA2xsfCNg2y+fxcIiOb1gAv mMXJ5hJRggiGTqHl81BVBYqiBq0atblgjOo6jCjPANU0aAGobkg5iUzsQdQw AmENytwrfLTP0XH6cL0RRiMPrutF7c++g9bpAbbmVWjURKvTRbfbRau2J+Um sQArxifpmor3p214mObx0G514N//8ntndy9wD15DaCCeoGs5HHXcVKmxP4IX rIQ/FtsZOccJAzyILGgYFB/O+7wsbq8bKG+/SORulw/R7rlM1owG9LCQ7lu6 8Q3Jdx+hWV6PYizYeXvHnYkVEOVGBkRkelDt1XZSvnO4mUqSnKfjy/Wvx5Xg amBiBXgDjzDRGTLq7jXeCAQnUcRxo4lms4lauSjJ0yUGNuuJqu+d7UqJZgWh lIJF9N+H/QJrYIyrT5tCkrt5FPngMEoDpfoEf8LAgyjTL1QuGAMe6gUdvFl2 jrb6Dke2DZvHqY3PbwvTG3iAeRbUfPwM0ShpUgNm3RGeBWEhiuYSUYAW64wB wKmb0dkene9BPG5jFGtd8dnYrYkNsIQsKN1Hb8zuZxt5jQqJKF3HrmXBsnZh mlUMBOZ5EFEgRKPnMzRD2FtKYEKcHyP32k7soPbhYw3wLyw1sFa5Sq6le4Od BSX49ErE1UUcdRl534El0YgMhFslLRiON2+5L43n4GDnOeYXFqEEd4FcLgdV Ce8Gi5h79hL2j0Ei3amXpKtFYvF4z/J9TQtqwZ8srKHbx81lC99PTvD9/DK6 I4w4r+PBBVYF/AkDWdDW9tEe+HjK4zlNbKRxTWsgXFp+zPragDPwIP78j+EN HDSqJWTxhm0Iwg+IxJNYhVmyUKlUUK1Wo9YqmdFyp4nIuEiWw2mQZVqWS7KI ZzU1LRdR462k3l2x475obNa4KCZdgTgpC7yBLM6EARGpEhwu0xr4E/wGQ3S1 MEjLIesAAAAASUVORK5CYII="> <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Rokkitt:400,700"> <link type="text/css" rel="stylesheet" href="{{ base_url }}/assets/style.css"> <script type="text/template" id="alert-template"><div class="alert-message<% if (block) { %> block-message<% } %> <%= level %>"> <a class="close" href="#">×</a> <% if (block) { %> <p><%= msg %></p> <% } else { %> <%= msg %> <% } %> </div></script> <script type="text/template" id="collection-row-template"><td> <a href="<%= obj.url() %>" class="name value"><%= obj.get('name') %></a> </td> <td> <span class="documents value"><%= obj.get('count') %></span> </td> <td> <span class="indexes has-details value"><%= obj.get('indexes').length %></span> <div class="details" title="<%= obj.get('indexes').length %> Index<% if (obj.get('indexes').length != 1) { %>es<% } %>"> <% if (obj.get('indexes').length> 0) { %> <ul class="index-details"> <% _.each(obj.get('indexes'), function(index) { %> <li><%= Genghis.Util.formatJSON(index.key) %></li> <% }); %> </ul> <% } else { %> <em>None.</em> <% } %> </div> </td> <td class="action-column"> <button class="btn small danger destroy">Remove</button> </td></script> <script type="text/template" id="collections-template"><header><h2>Collections</h2></header> <div class="content"> <table class="zebra-striped bordered-table"> <thead> <tr> <th>name</th> <th>documents</th> <th>indexes</th> <th></th> </tr> </thead> <tbody> </tbody> </table> </div> <div class="add-form inactive"> <input class="name span4" type="text" size="30"> <button class="show btn">Add collection</button> <button class="add btn primary">Add collection</button> <button class="cancel btn">Cancel</button> </div></script> <script type="text/template" id="database-row-template"><td> <a href="<%= obj.url() %>" class="name value"><%= obj.get('name') %></a> </td> <td> <span class="collections has-details value"><%= obj.get('count') %></span> <div class="details" title="<%= obj.get('count') %> Collection<% if (obj.get('count') != 1) { %>s<% } %>"> <% if (obj.get('count')> 0) { %> <ul> <% _.each(_.first(obj.get('collections'), 15), function(collection) { %> <li><%= collection %></li> <% }); %> <% if (obj.get('count')> 15) { %> <li>&hellip;</li> <% } %> </ul> <% } else { %> <em>None.</em> <% } %> </div> </td> <td> <span class="size value"><%= Genghis.Util.humanizeSize(obj.get('size')) %></span> </td> <td class="action-column"> <button class="btn small danger destroy">Remove</button> </td></script> <script type="text/template" id="databases-template"><header><h2>Databases</h2></header> <div class="content"> <table class="zebra-striped bordered-table"> <thead> <tr> <th>name</th> <th>collections</th> <th>size</th> <th></th> </tr> </thead> <tbody> </tbody> </table> </div> <div class="add-form inactive"> <input class="name span4" type="text" size="30"> <button class="show btn">Add database</button> <button class="add btn primary">Add database</button> <button class="cancel btn">Cancel</button> </div></script> <script type="text/template" id="document-view-template"><div class="well"> <div class="document-actions"> <button class="save btn small primary">Save</button> <button class="cancel btn small">Cancel</button> <button class="edit btn small">Edit</button> <button class="destroy btn small danger">Delete</button> </div> <h3> <a class="id" href="<%= obj.url() %>"><%= obj.id %></a> </h3> <div class="document"><%= obj.prettyPrint() %></div> </div></script> <script type="text/template" id="document-template"><header><h2><%= model.id %></h2></header> <div class="content document-wrapper"></div></script> <script type="text/template" id="documents-template"><header><h2>Documents</h2></header> <div class="controls"> <button class="add-document btn large">Add document</button> <div class="pagination-wrapper top"></div> </div> <div class="content document-wrapper"></div> <div class="controls"> <button class="add-document btn large">Add document</button> <div class="pagination-wrapper top"></div> </div></script> <script type="text/template" id="nav-section-menu-template"><% _.each(collection.toArray().slice(0, 10), function(m) { %> <li<% if (m.id == model.id) { %> class="active"<% } %>><a href="<%= m.url() %>"> <%= m.id %> <span><%= Genghis.Util.humanizeCount(m.get('count') || 0) %></span> </a></li> <% }); %> <% if (collection.size()> 10) { %> <li class="divider"></li> <li><a href="<%= collection.url %>">More &raquo;</a></li> <% } %></script> <script type="text/template" id="nav-section-template"><a href="#" class="dropdown-toggle"><%= model.id %></a> <ul class="menu-dropdown"></ul></script> <script type="text/template" id="nav-template"><ul class="nav"> <li class="dropdown server"></li> <li class="dropdown database"></li> <li class="dropdown collection"></li> </ul> <form><input id="navbar-query" name="q" type="text" value="<%= Genghis.Util.escape(query) %>" /></form></script> <script type="text/template" id="new-document-template"><div id="new-document" class="modal editor"> <div class="modal-header"> <a href="#" class="close">×</a> <h3>New Document</h3> </div> <div class="modal-body"> <div class="wrapper"> <div id="editor-new" class="genghis-document-editor"></div> </div> </div> <div class="modal-footer"> <button class="btn primary save">Save</button> <button class="btn secondary cancel">Cancel</button> </div> </div></script> <script type="text/template" id="pagination-template"><div class="pagination"> <ul> <li class="prev<% if (page == 1) print(' disabled'); %>"> <a<% if (page != 1) { %> href="<%= url(prev) %>"<% } %>>&larr; Previous</a> </li> <% if (start> 1) { %> <li class="first"><a href="<%= url(1) %>">1</a></li> <li class="disabled"><a>&hellip;</a></li> <% } %> <% for (var i = start; i <= end; i++) { %> <li<% if (page == i) print(' class="active"'); %>><a href="<%= url(i) %>"><%= i %></a></li> <% } %> <% if (end < pages) { %> <li class="disabled"><a>&hellip;</a></li> <li class="last"><a href="<%= url(pages) %>"><%= pages %></a></li> <% } %> <li class="next<% if (page == pages) print(' disabled'); %>"> <a<% if (page != pages) { %> href="<%= url(next) %>"<% } %>>Next &rarr;</a> </li> </ul> </div></script> <script type="text/template" id="popover-template"><div class="popover below"> <div class="arrow"></div> <div class="inner"> <h3 class="title"><%= title %></h3> <div class="content"><%= content %></div> </div> </div></script> <script type="text/template" id="server-row-template"><% if (obj.get('error')) { %> <td> <span class="value"><%= obj.get('name') %></span> <span class="label important" title="<%= Genghis.Util.escape(obj.get('error')) %>">Error</span> </td> <td></td> <td></td> <% } else { %> <td> <a href="<%= obj.url() %>" class="name value"><%= obj.get('name') %></a> </td> <td> <span class="databases has-details value"><%= obj.get('count') %></span> <div class="details" title="<%= obj.get('count') %> Database<% if (obj.get('count') != 1) { %>s<% } %>"> <% if (obj.get('count')> 0) { %> <ul> <% _.each(_.first(obj.get('databases'), 15), function(database) { %> <li><%= database %></li> <% }); %> <% if (obj.get('count')> 15) { %> <li>&hellip;</li> <% } %> </ul> <% } else { %> <em>None.</em> <% } %> </div> </td> <td> <span class="size value"><%= Genghis.Util.humanizeSize(obj.get('size')) %></span> </td> <% } %> <td class="action-column"> <button class="btn small danger destroy">Remove</button> </td></script> <script type="text/template" id="servers-template"><header><h2>Servers</h2></header> <div class="content"> <table class="zebra-striped bordered-table"> <thead> <tr> <th>name</th> <th>databases</th> <th>size</th> <th></th> </tr> </thead> <tbody> </tbody> </table> </div> <div class="add-form inactive"> <span class="input-append"> <input class="name span4" type="text" size="30"> <span class="add-on help" title="user:hide@address.com:27017">?</span> </span> <button class="show btn">Add server</button> <button class="add btn primary">Add server</button> <button class="cancel btn">Cancel</button> </div></script> <script type="text/javascript" src="{{ base_url }}/assets/script.js"></script> <script type="text/javascript">jQuery(function() { Genghis.boot('{{ base_url }}'); });</script> </head> <body> <header class="topbar"> <div class="topbar-inner"> <div class="container fixed"> <h3><a class="magic logo" href="{{ base_url }}">Genghis</a></h3> <nav></nav> </div> </div> </header> <noscript><h1>You won&#146;t get far in life without JavaScript&hellip;</h1></noscript> <section id="genghis" class="container fluid"> <aside id="alerts"></aside> <section id="servers"></section> <section id="databases"></section> <section id="collections"></section> <section id="documents"></section> <section id="document"><header></header></section> <section id="error"></section> </section> <footer class="container"><p>Genghis, by <a href="http://justinhileman.info">Justin Hileman</a>.</p></footer> </body> </html>

@@error.html.mustache c6620e6f79543e4134d2576d29f4be21
<!DOCTYPE html> <html> <head> <title>Genghis &mdash; {{ status }}: {{ message }}</title> <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Rokkitt:400,700"> <link type="text/css" rel="stylesheet" href="{{ base_url }}/assets/style.css"> </head> <body> <div class="topbar"> <div class="fill"> <div class="container fixed"> <h3><a class="magic logo" href="{{ base_url }}">Genghis</a></h3> <nav></nav> </div> </div> </div> <section id="genghis" class="container fluid"> <section id="error" style="display:block;"> <header><h2>{{ status }}: {{ message }}</h2></header> <div class="content"> <p> If you think you've reached this message in error, please press <strong>0</strong> to speak with an operator. Otherwise, hang up and try again. </p> </div> </section> </section> <footer class="container"><p>Genghis, by <a href="http://justinhileman.info">Justin Hileman</a>.</p></footer> </body> </html>

@@style.css ec79253e7d3c053c6e8864cc9348cf27
/**
 * Genghis v1.1.0
 *
 * The single-file MongoDB admin app
 *
 * http://genghisapp.com
 *
 * @author Justin Hileman <hide@address.com>
 */
html,body{margin:0;padding:0}h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:400;font-style:normal;font-size:100%;line-height:1;font-family:inherit}table{border-collapse:collapse;border-spacing:0}ol,ul{list-style:none}q:before,q:after,blockquote:before,blockquote:after{content:""}html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted}a:hover,a:active{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0;-ms-interpolation-mode:bicubic}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}body{background-color:#fff;margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:18px;color:#404040}.container{width:940px;margin-left:auto;margin-right:auto;zoom:1}.container:before,.container:after{display:table;content:"";zoom:1}.container:after{clear:both}.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1}.container-fluid:after{clear:both}.container-fluid > .sidebar{position:absolute;top:0;left:20px;width:220px}.container-fluid > .content{margin-left:240px}a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit}a:hover{color:#00438a;text-decoration:underline}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.row{zoom:1;margin-left:-20px}.row:before,.row:after{display:table;content:"";zoom:1}.row:after{clear:both}.row > [class*="span"]{display:inline;float:left;margin-left:20px}.span1{width:40px}.span2{width:100px}.span3{width:160px}.span4{width:220px}.span5{width:280px}.span6{width:340px}.span7{width:400px}.span8{width:460px}.span9{width:520px}.span10{width:580px}.span11{width:640px}.span12{width:700px}.span13{width:760px}.span14{width:820px}.span15{width:880px}.span16{width:940px}.span17{width:1000px}.span18{width:1060px}.span19{width:1120px}.span20{width:1180px}.span21{width:1240px}.span22{width:1300px}.span23{width:1360px}.span24{width:1420px}.row > .offset1{margin-left:80px}.row > .offset2{margin-left:140px}.row > .offset3{margin-left:200px}.row > .offset4{margin-left:260px}.row > .offset5{margin-left:320px}.row > .offset6{margin-left:380px}.row > .offset7{margin-left:440px}.row > .offset8{margin-left:500px}.row > .offset9{margin-left:560px}.row > .offset10{margin-left:620px}.row > .offset11{margin-left:680px}.row > .offset12{margin-left:740px}.span-one-third{width:300px}.span-two-thirds{width:620px}.offset-one-third{margin-left:340px}.offset-two-thirds{margin-left:660px}p{font-size:13px;font-weight:400;line-height:18px;margin-bottom:9px}p small{font-size:11px;color:#bfbfbf}h1,h2,h3,h4,h5,h6{font-weight:700;color:#404040}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf}h1{margin-bottom:18px;font-size:30px;line-height:36px}h1 small{font-size:18px}h2{font-size:24px;line-height:36px}h2 small{font-size:14px}h3,h4,h5,h6{line-height:36px}h3{font-size:18px}h3 small{font-size:14px}h4{font-size:16px}h4 small{font-size:12px}h5{font-size:14px}h6{font-size:13px;color:#bfbfbf;text-transform:uppercase}ul,ol{margin:0 0 18px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}ul{list-style:disc}ol{list-style:decimal}li{line-height:18px;color:#808080}ul.unstyled{list-style:none;margin-left:0}dl{margin-bottom:18px}dl dt,dl dd{line-height:18px}dl dt{font-weight:700}dl dd{margin-left:9px}hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee}strong{font-style:inherit;font-weight:700}em{font-style:italic;font-weight:inherit;line-height:inherit}.muted{color:#bfbfbf}blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0}blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf}blockquote small:before{content:'\2014 \00A0'}address{display:block;line-height:18px;margin-bottom:18px}code,pre{padding:0 3px 2px;font-family:Monaco,Andale Mono,Courier New,monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{background-color:#fee9cc;color:rgba(0,0,0,0.75);padding:1px 3px}pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word}form{margin-bottom:18px}fieldset{margin-bottom:18px;padding-top:18px}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5}form .clearfix{margin-bottom:18px;zoom:1}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1}form .clearfix:after{clear:both}label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:normal}label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040}form .input{margin-left:150px}input[type=checkbox],input[type=radio]{cursor:pointer}input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}select{padding:initial}input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none}input[type=file]{background-color:#fff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto}select,input[type=file]{height:27px;*height:auto;line-height:27px;*margin-top:4px}select[multiple]{height:inherit;background-color:#fff}textarea{height:auto}.uneditable-input{background-color:#fff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);cursor:not-allowed}:-moz-placeholder{color:#bfbfbf}::-webkit-input-placeholder{color:#bfbfbf}input,textarea{-webkit-transform-style:preserve-3d;-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-ms-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1)}input:focus,textarea:focus{outline:0;border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6)}input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666}form .clearfix.error > label,form .clearfix.error .help-block,form .clearfix.error .help-inline{color:#b94a48}form .clearfix.error input,form .clearfix.error textarea{color:#b94a48;border-color:#ee5f5b}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}form .clearfix.error .input-prepend .add-on,form .clearfix.error .input-append .add-on{color:#b94a48;background-color:#fce6e6;border-color:#b94a48}form .clearfix.warning > label,form .clearfix.warning .help-block,form .clearfix.warning .help-inline{color:#c09853}form .clearfix.warning input,form .clearfix.warning textarea{color:#c09853;border-color:#ccae64}form .clearfix.warning input:focus,form .clearfix.warning textarea:focus{border-color:#be9a3f;-webkit-box-shadow:0 0 6px #e5d6b1;-moz-box-shadow:0 0 6px #e5d6b1;box-shadow:0 0 6px #e5d6b1}form .clearfix.warning .input-prepend .add-on,form .clearfix.warning .input-append .add-on{color:#c09853;background-color:#d2b877;border-color:#c09853}form .clearfix.success > label,form .clearfix.success .help-block,form .clearfix.success .help-inline{color:#468847}form .clearfix.success input,form .clearfix.success textarea{color:#468847;border-color:#57a957}form .clearfix.success input:focus,form .clearfix.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a}form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847}.input-mini,input.mini,textarea.mini,select.mini{width:60px}.input-small,input.small,textarea.small,select.small{width:90px}.input-medium,input.medium,textarea.medium,select.medium{width:150px}.input-large,input.large,textarea.large,select.large{width:210px}.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px}.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px}textarea.xxlarge{overflow-y:auto}input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0}input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0}input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0}input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0}input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0}input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0}input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0}input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0}input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0}input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0}input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0}input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0}input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0}input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0}input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0}input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed}.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.actions .secondary-action{float:right}.actions .secondary-action a{line-height:30px}.actions .secondary-action a:hover{text-decoration:underline}.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf}.help-inline{padding-left:5px;*position:relative;*top:-5px}.help-block{display:block;max-width:600px}.inline-inputs{color:#808080}.inline-inputs span{padding:0 2px 0 1px}.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:400;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0#fff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546}.input-prepend .add-on{*margin-top:1px}.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px}.inputs-list{margin:0 0 5px;width:100%}.inputs-list li{display:block;padding:0;width:100%}.inputs-list label{display:block;float:none;width:auto;padding:0;margin-left:20px;line-height:18px;text-align:left;white-space:normal}.inputs-list label strong{color:#808080}.inputs-list label small{font-size:11px;font-weight:400}.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0}.inputs-list:first-child{padding-top:6px}.inputs-list li + li{padding-top:2px}.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;margin-left:-20px;float:left}.form-stacked{padding-left:20px}.form-stacked fieldset{padding-top:9px}.form-stacked legend{padding-left:0}.form-stacked label{display:block;float:none;width:auto;font-weight:700;text-align:left;line-height:20px;padding-top:0}.form-stacked .clearfix{margin-bottom:9px}.form-stacked .clearfix div.input{margin-left:0}.form-stacked .inputs-list{margin-bottom:0}.form-stacked .inputs-list li{padding-top:0}.form-stacked .inputs-list li label{font-weight:400;padding-top:0}.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px}.form-stacked .actions{margin-left:-20px;padding-left:20px}table{width:100%;margin-bottom:18px;padding:0;font-size:13px;border-collapse:collapse}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left}table th{padding-top:9px;font-weight:700;vertical-align:middle}table td{vertical-align:top;border-top:1px solid #ddd}table tbody th{border-top:1px solid #ddd;vertical-align:top}.condensed-table th,.condensed-table td{padding:5px 5px 4px}.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bordered-table th + th,.bordered-table td + td,.bordered-table th + td{border-left:1px solid #ddd}.bordered-table thead tr:first-child th:first-child,.bordered-table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0}.bordered-table thead tr:first-child th:last-child,.bordered-table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0}.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px}.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0}table .span1{width:20px}table .span2{width:60px}table .span3{width:100px}table .span4{width:140px}table .span5{width:180px}table .span6{width:220px}table .span7{width:260px}table .span8{width:300px}table .span9{width:340px}table .span10{width:380px}table .span11{width:420px}table .span12{width:460px}table .span13{width:500px}table .span14{width:540px}table .span15{width:580px}table .span16{width:620px}.zebra-striped tbody tr:nth-child(odd) td,.zebra-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.zebra-striped tbody tr:hover td,.zebra-striped tbody tr:hover th{background-color:#f5f5f5}table .header{cursor:pointer}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden}table .headerSortUp,table .headerSortDown{background-color:rgba(141,192,219,0.25);text-shadow:0 1px 1px rgba(255,255,255,0.75)}table .header:hover:after{visibility:visible}table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}table .blue{color:#049cdb;border-bottom-color:#049cdb}table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe}table .green{color:#46a546;border-bottom-color:#46a546}table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd}table .red{color:#9d261d;border-bottom-color:#9d261d}table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5}table .yellow{color:#ffc40d;border-bottom-color:#ffc40d}table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9}table .orange{color:#f89406;border-bottom-color:#f89406}table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc}table .purple{color:#7a43b6;border-bottom-color:#7a43b6}table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0}.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.topbar h3 a:hover,.topbar .brand:hover,.topbar ul .active > a{background-color:#333;background-color:rgba(255,255,255,0.05);color:#fff;text-decoration:none}.topbar h3{position:relative}.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#fff;font-size:20px;font-weight:200;line-height:1}.topbar p{margin:0;line-height:40px}.topbar p a:hover{background-color:transparent;color:#fff}.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1}.topbar form.pull-right{float:right}.topbar input{background-color:#444;background-color:rgba(255,255,255,0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#fff;color:rgba(255,255,255,0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.25);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.25);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.25);-webkit-transform-style:preserve-3d;-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.topbar input:-moz-placeholder{color:#e6e6e6}.topbar input::-webkit-input-placeholder{color:#e6e6e6}.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255,255,255,0.5);color:#fff}.topbar input:focus,.topbar input.focused{outline:0;background-color:#fff;color:#404040;text-shadow:0 1px 0#fff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.topbar-inner,.topbar .fill{background-color:#222;background-color:#222;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#333),to(#222));background-image:-moz-linear-gradient(top,#333,#222);background-image:-ms-linear-gradient(top,#333,#222);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#333),color-stop(100%,#222));background-image:-webkit-linear-gradient(top,#333,#222);background-image:-o-linear-gradient(top,#333,#222);background-image:linear-gradient(top,#333,#222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333',endColorstr='#222222',GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1)}.topbar div > ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0}.topbar div > ul > li,.nav > li{display:block;float:left}.topbar div > ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none}.topbar div > ul a:hover,.nav a:hover{color:#fff;text-decoration:none}.topbar div > ul .active > a,.nav .active > a{background-color:#222;background-color:rgba(0,0,0,0.5)}.topbar div > ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0}.topbar div > ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div > ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0}.topbar div > ul a.menu:hover,.nav a.menu:hover,.topbar div > ul li.open .menu,.nav li.open .menu,.topbar div > ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div > ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255,255,255,0.05)}.topbar div > ul .menu-dropdown,.nav .menu-dropdown,.topbar div > ul .dropdown-menu,.nav .dropdown-menu{background-color:#333}.topbar div > ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div > ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div > ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div > ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#fff}.topbar div > ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div > ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div > ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div > ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255,255,255,0.05)}.topbar div > ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div > ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0,0,0,0.5)}.topbar div > ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div > ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#292929),to(#191919));background-image:-moz-linear-gradient(top,#292929,#191919);background-image:-ms-linear-gradient(top,#292929,#191919);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#292929),color-stop(100%,#191919));background-image:-webkit-linear-gradient(top,#292929,#191919);background-image:-o-linear-gradient(top,#292929,#191919);background-image:linear-gradient(top,#292929,#191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929',endColorstr='#191919',GradientType=0);color:#fff}.topbar div > ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div > ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#fff}.topbar div > ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div > ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444}.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px}li.menu,.dropdown{position:relative}a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"&darr;";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid#fff;filter:alpha(opacity=50);-khtml-opacity:.5;-moz-opacity:.5;opacity:.5}.menu-dropdown,.dropdown-menu{background-color:#fff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0,0,0,0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,0.2);box-shadow:0 2px 4px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none}.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid#fff}.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:400;line-height:18px;color:#808080;text-shadow:0 1px 0#fff}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover,.topbar .dropdown-menu a.hover,.dropdown-menu a.hover{background-color:#ddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background-image:-moz-linear-gradient(top,#eee,#ddd);background-image:-ms-linear-gradient(top,#eee,#ddd);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#eee),color-stop(100%,#ddd));background-image:-webkit-linear-gradient(top,#eee,#ddd);background-image:-o-linear-gradient(top,#eee,#ddd);background-image:linear-gradient(top,#eee,#ddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#dddddd',GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.025),inset 0 -1px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.025),inset 0 -1px rgba(0,0,0,0.025);box-shadow:inset 0 1px 0 rgba(0,0,0,0.025),inset 0 -1px rgba(0,0,0,0.025)}.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#fff;background:#ccc;background:rgba(0,0,0,0.3)}.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block}.tabs,.pills{margin:0 0 18px;padding:0;list-style:none;zoom:1}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1}.tabs:after,.pills:after{clear:both}.tabs > li,.pills > li{float:left}.tabs > li > a,.pills > li > a{display:block}.tabs{border-color:#ddd;border-style:solid;border-width:0 0 1px}.tabs > li{position:relative;margin-bottom:-1px}.tabs > li > a{padding:0 15px;margin-right:2px;line-height:34px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.tabs > li > a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd}.tabs .active > a,.tabs .active > a:hover{color:#808080;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px}.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999}.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555}.pills a{margin:5px 3px 5px 0;padding:0 15px;line-height:30px;text-shadow:0 1px 1px#fff;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pills a:hover{color:#fff;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,0.25);background-color:#00438a}.pills .active a{color:#fff;text-shadow:0 1px 1px rgba(0,0,0,0.25);background-color:#0069d6}.pills-vertical > li{float:none}.tab-content > .tab-pane,.pill-content > .pill-pane{display:none}.tab-content > .active,.pill-content > .active{display:block}.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#fff),to(#f5f5f5));background-image:-moz-linear-gradient(top,#fff,#f5f5f5);background-image:-ms-linear-gradient(top,#fff,#f5f5f5);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#fff),color-stop(100%,#f5f5f5));background-image:-webkit-linear-gradient(top,#fff,#f5f5f5);background-image:-o-linear-gradient(top,#fff,#f5f5f5);background-image:linear-gradient(top,#fff,#f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#f5f5f5',GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0#fff;-moz-box-shadow:inset 0 1px 0#fff;box-shadow:inset 0 1px 0#fff}.breadcrumb li{display:inline;text-shadow:0 1px 0#fff}.breadcrumb .divider{padding:0 5px;color:#bfbfbf}.breadcrumb .active a{color:#404040}.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px}.hero-unit p{font-size:18px;font-weight:200;line-height:27px}footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee}.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255,255,255,0.5);-moz-box-shadow:0 1px 0 rgba(255,255,255,0.5);box-shadow:0 1px 0 rgba(255,255,255,0.5)}.page-header h1{margin-bottom:8px}.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#fff}.btn .close,.alert-message .close{font-family:Arial,sans-serif;line-height:18px}.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#ee5f5b),to(#c43c35));background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-ms-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ee5f5b),color-stop(100%,#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(top,#ee5f5b,#c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#c43c35',GradientType=0);text-shadow:0 -1px 0 rgba(0,0,0,0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#62c462),to(#57a957));background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-ms-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#62c462),color-stop(100%,#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(top,#62c462,#57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462',endColorstr='#57a957',GradientType=0);text-shadow:0 -1px 0 rgba(0,0,0,0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#5bc0de),to(#339bb9));background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-ms-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#5bc0de),color-stop(100%,#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(top,#5bc0de,#339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de',endColorstr='#339bb9',GradientType=0);text-shadow:0 -1px 0 rgba(0,0,0,0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),color-stop(25%,#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(#fff,#fff 25%,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#fff 25%,#e6e6e6);background-image:-ms-linear-gradient(#fff,#fff 25%,#e6e6e6);background-image:-o-linear-gradient(#fff,#fff 25%,#e6e6e6);background-image:linear-gradient(#fff,#fff 25%,#e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255,255,255,0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-webkit-transform-style:preserve-3d;-webkit-transition:.1s linear all;-moz-transition:.1s linear all;-ms-transition:.1s linear all;-o-transition:.1s linear all;transition:.1s linear all}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none}.btn:focus{outline:1px dotted #666}.btn.primary{color:#fff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#049cdb),to(#0064cd));background-image:-moz-linear-gradient(top,#049cdb,#0064cd);background-image:-ms-linear-gradient(top,#049cdb,#0064cd);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#049cdb),color-stop(100%,#0064cd));background-image:-webkit-linear-gradient(top,#049cdb,#0064cd);background-image:-o-linear-gradient(top,#049cdb,#0064cd);background-image:linear-gradient(top,#049cdb,#0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb',endColorstr='#0064cd',GradientType=0);text-shadow:0 -1px 0 rgba(0,0,0,0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.btn.active,.btn:active{-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.25),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.25),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.25),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:.65;-moz-opacity:.65;opacity:.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:.65;-moz-opacity:.65;opacity:.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn.small{padding:7px 9px 7px;font-size:11px}:root .alert-message,:root .btn{border-radius:0 \0}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}.close{float:right;color:#000;font-size:20px;font-weight:700;line-height:13.5px;text-shadow:0 1px 0#fff;filter:alpha(opacity=25);-khtml-opacity:.25;-moz-opacity:.25;opacity:.25}.close:hover{color:#000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4}.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear,left top,left bottom,from(#fceec1),to(#eedc94));background-image:-moz-linear-gradient(top,#fceec1,#eedc94);background-image:-ms-linear-gradient(top,#fceec1,#eedc94);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#fceec1),color-stop(100%,#eedc94));background-image:-webkit-linear-gradient(top,#fceec1,#eedc94);background-image:-o-linear-gradient(top,#fceec1,#eedc94);background-image:linear-gradient(top,#fceec1,#eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1',endColorstr='#eedc94',GradientType=0);text-shadow:0 -1px 0 rgba(0,0,0,0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);text-shadow:0 1px 0 rgba(255,255,255,0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25)}.alert-message .close{margin-top:1px;*margin-top:0}.alert-message a{font-weight:700;color:#404040}.alert-message.danger p a,.alert-message.error p a,.alert-message.success p a,.alert-message.info p a{color:#fff}.alert-message h5{line-height:18px}.alert-message p{margin-bottom:0}.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px}.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255,255,255,0.25);-moz-box-shadow:0 1px 0 rgba(255,255,255,0.25);box-shadow:0 1px 0 rgba(255,255,255,0.25)}.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px}.alert-message.block-message ul{margin-bottom:0}.alert-message.block-message li{color:#404040}.alert-message.block-message .alert-actions{margin-top:5px}.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6}.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf}.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9}.alert-message.block-message.danger p a,.alert-message.block-message.error p a,.alert-message.block-message.success p a,.alert-message.block-message.info p a{color:#404040}.pagination{height:36px;margin:18px 0}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination li{display:inline}.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0,0,0,0.15);*border-right-color:#ddd;text-decoration:none}.pagination a:hover,.pagination .active a{background-color:#c7eefe}.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf}.pagination .next a{border:0}.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0,0,0,0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.modal-backdrop{background-color:#000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:.8;-moz-opacity:.8;opacity:.8}.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal .close{margin-top:7px}.modal.fade{-webkit-transform-style:preserve-3d;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-ms-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:50%}.modal-header{border-bottom:1px solid #eee;padding:5px 15px}.modal-body{padding:15px}.modal-body form{margin-bottom:0}.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0#fff;-moz-box-shadow:inset 0 1px 0#fff;box-shadow:inset 0 1px 0#fff;zoom:1;margin-bottom:0}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1}.modal-footer:after{clear:both}.modal-footer .btn{float:right;margin-left:5px}.modal .popover,.modal .twipsy{z-index:12000}.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:.8;-moz-opacity:.8;opacity:.8}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:.8;-moz-opacity:.8;opacity:.8}.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid#000}.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid#000}.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid#000}.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid#000}.twipsy-inner{padding:3px 8px;background-color:#000;color:#fff;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.twipsy-arrow{position:absolute;width:0;height:0}.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid#000}.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid#000}.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid#000}.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid#000}.popover .arrow{position:absolute;width:0;height:0}.popover .inner{background:#000;background:rgba(0,0,0,0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee}.popover .content{background-color:#fff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0}.fade{-webkit-transform-style:preserve-3d;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-ms-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear;opacity:0}.fade.in{opacity:1}.label{padding:1px 3px 2px;font-size:9.75px;font-weight:700;color:#fff;text-transform:uppercase;white-space:nowrap;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.label.important{background-color:#c43c35}.label.warning{background-color:#f89406}.label.success{background-color:#46a546}.label.notice{background-color:#62cffc}.media-grid{margin-left:-20px;margin-bottom:0;zoom:1}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1}.media-grid:after{clear:both}.media-grid li{display:inline}.media-grid a{float:left;padding:4px;margin:0 0 18px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.075);box-shadow:0 1px 1px rgba(0,0,0,0.075)}.media-grid a img{display:block}.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.container{padding-left:20px;padding-right:20px;width:auto;min-width:480px;max-width:1400px}.topbar{height:60px}.topbar h3 a{font-size:32px;padding:16px 20px 12px}.topbar ul .menu-dropdown li a{padding-right:45px;position:relative}.topbar ul .menu-dropdown li a span{padding:0 6px;display:inline-block;position:absolute;top:50%;right:10px;margin-top:-8px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;line-height:16px;color:#666;background-color:rgba(0,0,0,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.3),0 1px 0 rgba(255,255,255,0.2);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.3),0 1px 0 rgba(255,255,255,0.2);box-shadow:inset 0 1px 0 rgba(0,0,0,0.3),0 1px 0 rgba(255,255,255,0.2)}.topbar ul .menu-dropdown li a:hover span{color:#CCC}.topbar form{padding-left:20px;margin:15px 0 15px -10px}.nav .dropdown-toggle,.nav .dropdown-toggle:hover,.nav .dropdown.open .dropdown-toggle,.topbar form{background:transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAiCAQAAADMxIBtAAABLUlEQVQoz2NgYPzPxMDEgAaY/7OrsGMIruJs4GFAE2aU4vooxCCCrpb7pbiaNAMbqiBblfhsRQYpNAN4xH5qcuuju0Fwj5qfIYMYqiB7gPI+cwYjdMvk3lmLuzBwoQoKzTMqdGHQQhVkNdG55s3sw8CIKqx4wc0ojEEGVVC4wa4jgsEJzQAlk9sx/CnolilvC/BNR3eYcJrbkiy2GFTLhLM8FmUzRKKqVN0f4prBoIMSVtpm1+K4klGDUHyiY3kEgxWa5ic+8lEMgshCnIH6+7wYXFHVie8183NlkEMJe36lz3bsrgzMKFHXrDrJjEEDVbPYc205YwZOZCEmbYlnmqiOBmreJhOlyiCEKsj/X5ZDES0tJfFuE0VXx/6WT0EA1THAEP/PgR7aDNgSLQDySzbpQ/g6wQAAAABJRU5ErkJggg==') center left no-repeat}.nav > li > a{padding:20px 10px 21px 20px;height:19px;line-height:19px;white-space:nowrap;color:#EEE}.nav > li > a:hover{background-color:transparent}.nav > li > a:after{display:none}.nav .menu-dropdown{background-color:rgba(41,41,41,0.95);top:60px;max-width:350px}footer{border-top:none}html,body{margin:0;padding:0;color:#111;background-color:#D3D3D3;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAADmCAYAAADx5uiaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFiklEQVR4nO3csY4bRxRE0ddc/v8fi+NAWsCZbeEVrEadkyhZNMiZuSNGdWbma2Zes+/H8nlnZj7LZ34tnzfz81o+gXObr+f255zZv56J+75+PROhA38owUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUORMz+jP4Fzt+d+tj/j95mJz3nDmTP701Gpe5Q4c/t6PnPBZNj7eZ71vbBzTuolsi1xk27Zikv4PM+zGtI558z+vY/8sg189+3dPT/poYngoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgocj712bYttSLJDEOmdjeS1zTbd8DpruHnnPLgOe2xGdcv0fvvx38p0sMTiZeTM9kFlG3z0x899dkHvwbFmYT1rv0kx6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KvOdn9NvbWa+5YzNsJvPdE2duO7N/jxLbiIkRy8Q9mnPOj+0zt6VGLBMjgbesl85kgr9lHHJb6p6nXk7bVl8iftJDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDke9Nu8RI4Psf/+q/SYwuJsY2E/tziT2/M/sv/NTn3PbMHdfz+9w17/n5wN+w3HoCZyYkHqbPLI8Zzj3DmJ/JDKJun/m1fF6En/RQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQ5D2ZbbPEVlpi0+6WgcSUxPdP7M8l7vsNG3Trw5jvyQz6fWb/oU/coMTK6jN3DE5GYn+eZ/W7n3NuedHP7N/39WfeT3ooIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngo8r1pt72dlRhyTA1jJiQ22BJnrg9OnnMS24M3jIImOlq/lu8JXczneVbPPedsDwTO3PUS2faZ/eBfc8cSbuI/pK/JvJRXP6ef9FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FAktml30ZjhDbt2t+zkJT7nLd995oJn6T0zn8DgZGLQb2b/gia+e2JhNrXamlgWviHQ9XHIyYyCrj9LftJDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDkffMfJ1zfvzfH+RfOBN4QZ1zbhnG3HZmZnto9DV3fPfEZ3zNBeOl7wkM5f2y/RJJrOC+Zn94cAJnPrP/kN4yNPrM/rOUejElrufqs+QnPRQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBR5//o3Ef72vldigyyxZ5cYh0xs2t2y6ZY4N7HjeGb/eYqMWN6wMjoz83meZ/WznnMSNz7yqynw3RNLxTe9RLZ95oLxUj/poYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgocj7n//kt7wmsEV2zkmMBN6w6Zfaiku88BNjmzfcoyuu5/eI5fYFTQSfGjNMPKCJNdxt11zP0IDnFeOlY8QS+F2ChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyLvmfkKnPua/V23M5mdvBv2/L532P50kSHHc05ixPKWYczVPv8CiVTGPJBHFUsAAAAASUVORK5CYII=")}body{padding-top:60px}h1,h2,h3,body > footer{font-family:"Rokkitt",serif;font-weight:700}body > footer{font-weight:400;text-align:center}a:link,a:visited{color:#0058e1}a:hover,a:active{color:#111}noscript h1{font-size:2.2em;text-align:center;margin:80px 40px}.document-wrapper article h3{line-height:1;margin-bottom:10px}.document-wrapper .document{color:#111;position:relative}.document-wrapper .document .prop:after{content:':';color:#998;padding-right:.5em}.document-wrapper .document .null,.document-wrapper .document .bool{color:#0086b3}.document-wrapper .document .num{color:#40A070}.document-wrapper .document .string{color:#D20}.document-wrapper .document .string .value{color:#D14}.document-wrapper .document .string a:link .value,.document-wrapper .document .string a:visited .value{text-decoration:underline}.document-wrapper .document .string a:hover .value,.document-wrapper .document .string a:active .value{color:#0058E1}.document-wrapper .document .db-ref .db-ref-ref .string .value,.document-wrapper .document .db-ref .db-ref-id .string .value,.document-wrapper .document .db-ref .db-ref-db .string .value{cursor:pointer;border-bottom:1px dotted #D14}.document-wrapper .document .db-ref .db-ref-ref .string .value:hover,.document-wrapper .document .db-ref .db-ref-id .string .value:hover,.document-wrapper .document .db-ref .db-ref-db .string .value:hover{color:#0058E1;border-bottom:1px solid #0058E1}.document-wrapper .document .collapser{position:absolute;left:-1.5em;padding:0 .5em;color:#998;cursor:pointer}.document-wrapper .document .ellipsis{color:#998;cursor:pointer}.document-wrapper .document .ellipsis .summary{padding-left:5px;font-style:italic}.document-wrapper .document .fn{color:#458}.document-wrapper .document ul{list-style:none;margin:0 0 0 2em;padding:0}.document-wrapper .document li{position:relative;color:#111}.document-wrapper .document li:after{content:','}.document-wrapper .document li:last-of-type:after{content:''}aside#alerts{margin-top:20px}body > section{min-height:150px}body > section section{background-color:#fff;margin:20px 0;padding:20px;border:1px solid #AAA;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,0.1),inset 0 1px 0 white}body > section section > header{background-color:#d8d8d8;min-height:40px;margin:-20px -20px 20px;padding:0 20px;border-top-left-radius:4px;border-top-right-radius:4px;background-image:-moz-linear-gradient(-90deg,#e4e4e4,#d8d8d8);background-image:-webkit-gradient(linear,0 top,0 bottom,from(#e4e4e4),to(#d8d8d8));box-shadow:inset 0 1px 0 rgba(255,255,255,0.6)}body > section section > header h2{margin:0;line-height:40px}body > section section > .content{min-height:100px;-webkit-transition:.1s linear all;-moz-transition:.1s linear all;-ms-transition:.1s linear all;-o-transition:.1s linear all;transition:.1s linear all}body > section section > p:first-child{margin-top:0}body > section section > p:last-child{margin-bottom:0}body > section section.spinning{height:180px}body > section section.spinning header h2{background:transparent url('data:image/gif;base64,R0lGODlhEAALAPQAAN7e3oiIiNHR0c3NzdbW1omJiYiIiJeXl7Ozs6enp8bGxpKSkqCgoLa2tqmpqcjIyJSUlIiIiKKiotXV1dDQ0Nra2pqamtLS0tnZ2cXFxb29vcvLy9jY2AAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA') left center no-repeat;text-indent:-10000em}body > section section.spinning .controls,body > section section.spinning .add-form,body > section section.spinning .content{display:none}body > section section .details{display:none}body > section section .has-details{border-bottom:1px dotted#998;cursor:default}.add-form button.show{display:none}.add-form.inactive button,.add-form.inactive input,.add-form.inactive .input-append{display:none}.add-form.inactive button.show{display:inherit}.add-form.inactive .help{display:none}.add-form span.input-append .add-on{margin-right:4px}.add-form .help{cursor:default}#query-editor{width:888px;height:100px;position:relative;-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);margin:0 0 10px;padding:4px;border:1px solid #CCC;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}tr td.action-column{padding:5px 10px 0;text-align:right}tr td.action-column button{visibility:hidden;-o-transition-property:color,background,box-shadow;-moz-transition-property:color,background,box-shadow;-webkit-transition-property:color,background,box-shadow;transition-property:color,background,box-shadow}tr:hover td.action-column button{visibility:inherit}section#servers .alert-message.error{padding:3px 10px;font-weight:700}section#servers tr.spinning td:first-child{padding-left:35px;background:transparent url('data:image/gif;base64,R0lGODlhEAALAPQAAP///zMzM+Hh4dnZ2e7u7jc3NzMzM1dXV5qamn9/f8fHx05OTm5ubqGhoYKCgsrKylFRUTY2NnFxcerq6t/f3/b29l9fX+Li4vT09MTExLKystTU1PHx8QAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA') 10px center no-repeat}section#servers tr input{display:none}section#servers tr.editing span.name{display:none}section#servers tr.editing input{display:inherit}.index-details{color:#111;list-style:none;margin:0}.index-details > li{display:block;margin-bottom:5px}.index-details > li ul,.index-details > li li{display:inline-block;list-style:none;margin:0;padding:0}.index-details > li li{color:#111}.index-details > li li:after{content:',';padding-right:.25em}.index-details > li li:last-of-type:after{content:'';padding-right:0}.index-details > li .prop:after{content:':';color:#998;padding-right:.25em}.index-details > li .num{color:#40A070}.document-wrapper div.well{overflow-x:auto}.document-wrapper div.well h3 a{color:#333}.document-wrapper div.well h3 a:hover,.document-wrapper div.well h3 a:active{color:#0058e1}.document-wrapper article{position:relative}.document-wrapper article div.document-actions{position:absolute;right:20px;z-index:10}.document-wrapper article div.document-actions button.save,.document-wrapper article div.document-actions button.cancel{display:none}.document-wrapper article div.document-actions button.edit,.document-wrapper article div.document-actions button.destroy{visibility:hidden}.document-wrapper article:hover div.document-actions button.edit,.document-wrapper article:hover div.document-actions button.destroy{visibility:inherit}.document-wrapper article div.well{-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-ms-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.document-wrapper article.edit div.document-actions{margin-top:20px}.document-wrapper article.edit div.document-actions button.edit,.document-wrapper article.edit div.document-actions button.destroy{display:none}.document-wrapper article.edit div.document-actions button.save,.document-wrapper article.edit div.document-actions button.cancel{display:inline-block}.document-wrapper article.edit div.well{padding:0;height:400px;border-color:rgba(82,168,236,0.8);background-color:#fff;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);zoom:1}.document-wrapper article.edit div.well h3{display:none}.document-wrapper article.edit div.well:before,.document-wrapper article.edit div.well:after{display:table;content:"";zoom:1}.document-wrapper article.edit div.well:after{clear:both}.document-wrapper article.edit div.well .genghis-document-editor{position:relative;left:1px;