Merge pull request #513 from exodus4d/develop

v1.2.4
This commit is contained in:
Mark Friedrich
2017-07-28 21:38:56 +02:00
committed by GitHub
113 changed files with 1262 additions and 70458 deletions

3
.gitignore vendored
View File

@@ -52,3 +52,6 @@ Temporary Items
*.gz
*.lock
/conf/
/node_modules/
/public/js/vX.X.X/
/vendor/

View File

@@ -66,7 +66,6 @@ Issues should be reported in the [Issue](https://github.com/exodus4d/pathfinder/
CI/CD config files:
--------------------------
|-- .jshintrc --> "JSHint" config (not used for production)
|-- build.js --> "RequireJs Optimizer" config (not used for production)
|-- config.rb --> "Compass" config (not used for production)
|-- gulpfile.js --> "Gulp" task config (not used for production )
|-- package.json --> "Node.js" dependency config (not used for production)

View File

@@ -1,7 +1,7 @@
; Global Framework Config
[SERVER]
SERVER_NAME = PATHFINDER
SERVER_NAME = PATHFINDER
[globals]
; Default Verbosity level of the stack trace.
@@ -23,7 +23,6 @@ CACHE = folder=tmp/cache/
; Callback functions ==============================================================================
ONERROR = Controller\Controller->showError
UNLOAD = Controller\Controller->unload
; Path configurations =============================================================================
@@ -50,11 +49,15 @@ EXPORT = export/
; Default language (overwrites HTTP Accept-Language request header) used for "setlocale()" affects number formatting. (default: en-US)
LANGUAGE = en-US
; custom *.ini file folder, can be used to overwrite default *.ini files
CONF.CUSTOM = conf/
CONF.DEFAULT = app/
; load additional config files
; DO NOT load environment.ini, it is loaded automatically
[configs]
app/routes.ini = true
app/pathfinder.ini = true
conf/pathfinder.ini = true
app/requirements.ini = true
app/cron.ini = true
{{@CONF.DEFAULT}}routes.ini = true
{{@CONF.DEFAULT}}pathfinder.ini = true
{{@CONF.CUSTOM}}pathfinder.ini = true
{{@CONF.DEFAULT}}requirements.ini = true
{{@CONF.DEFAULT}}cron.ini = true

View File

@@ -11,7 +11,7 @@ SERVER = DEVELOP
; -> e.g. set /pathfinder if your URL looks like https://www.[YOUR_DOMAIN]/pathfinder (subfolder)
BASE =
; deployment URL (e.g. http://localhost)
URL = http://local.pathfinder
URL = {{@SCHEME}}://local.pathfinder
; level of debug/error stack trace
DEBUG = 3
; main db
@@ -57,7 +57,7 @@ SMTP_ERROR = pathfinder@localhost.com
; -> e.g. set /pathfinder if your URL looks like https://www.[YOUR_DOMAIN]/pathfinder (subfolder)
BASE =
; deployment URL (e.g. https://www.pathfinder-w.space)
URL = https://www.pathfinder-w.space
URL = {{@SCHEME}}://www.pathfinder-w.space
; level of debug/error stack trace
DEBUG = 0
; main db

View File

@@ -17,6 +17,7 @@ use lib\Config;
class Admin extends Controller{
const ERROR_SSO_CHARACTER_EXISTS = 'No character found. Please login first.';
const ERROR_SSO_CHARACTER_SCOPES = 'Additional ESI scopes are required for "%s". Use the SSO button below.';
const ERROR_SSO_CHARACTER_ROLES = 'Insufficient in-game roles. "%s" requires at least one of these corp roles: %s.';
const LOG_TEXT_KICK_BAN = '%s "%s" from corporation "%s", by "%s"';
@@ -86,13 +87,19 @@ class Admin extends Controller{
if($character->role != 'MEMBER'){
// current character is admin
$adminCharacter = $character;
}elseif( !$character->hasAdminScopes() ){
$f3->set(Sso::SESSION_KEY_SSO_ERROR,
sprintf(
self::ERROR_SSO_CHARACTER_SCOPES,
$character->name
));
}else{
$f3->set(Sso::SESSION_KEY_SSO_ERROR,
sprintf(
self::ERROR_SSO_CHARACTER_ROLES,
$character->name,
implode(', ', CorporationModel::ADMIN_ROLES
)));
implode(', ', CorporationModel::ADMIN_ROLES)
));
}
}else{
$f3->set(Sso::SESSION_KEY_SSO_ERROR, self::ERROR_SSO_CHARACTER_EXISTS);
@@ -107,9 +114,9 @@ class Admin extends Controller{
* @param CharacterModel $character
*/
protected function setCharacterRole(CharacterModel $character){
$character->virtual('role', function($character){
$character->virtual('role', function ($character){
// default role based on roleId (auto-detected)
if( ($role = array_search ($character->roleId, CharacterModel::ROLES)) === false ){
if(($role = array_search($character->roleId, CharacterModel::ROLES)) === false){
$role = 'MEMBER';
}
@@ -119,9 +126,9 @@ class Admin extends Controller{
*/
if($this->getF3()->exists('PATHFINDER.ADMIN.CHARACTER', $globalAdminData)){
foreach((array)$globalAdminData as $adminData){
if($adminData['ID'] === $character->_id){
if( CharacterModel::ROLES[$adminData['ROLE']] ){
$role = $adminData['ROLE'];
if($adminData[ 'ID' ] === $character->_id){
if(CharacterModel::ROLES[ $adminData[ 'ROLE' ] ]){
$role = $adminData[ 'ROLE' ];
}
break;
}

View File

@@ -106,7 +106,7 @@ class User extends Controller\Controller{
* -> return character data (if valid)
* @param \Base $f3
*/
public function getCookieCharacter($f3){
public function getCookieCharacter(\Base $f3){
$data = $f3->get('POST');
$return = (object) [];

View File

@@ -55,7 +55,7 @@ class Sso extends Api\User{
public function requestAdminAuthorization($f3){
$f3->set(self::SESSION_KEY_SSO_FROM, 'admin');
$scopes = $this->getScopesByAuthType('admin');
$scopes = self::getScopesByAuthType('admin');
$this->rerouteAuthorization($f3, $scopes, 'admin');
}
@@ -105,7 +105,7 @@ class Sso extends Api\User{
if($loginCheck){
// set "login" cookie
$this->setLoginCookie($character, $this->generateHashFromScopes($this->getScopesByAuthType()) );
$this->setLoginCookie($character);
// -> pass current character data to target page
$f3->set(Api\User::SESSION_KEY_TEMP_CHARACTER_ID, $character->_id);
@@ -122,7 +122,7 @@ class Sso extends Api\User{
}
// redirect to CCP SSO ----------------------------------------------------------------------
$scopes = $this->getScopesByAuthType();
$scopes = self::getScopesByAuthType();
$this->rerouteAuthorization($f3, $scopes);
}
@@ -207,9 +207,10 @@ class Sso extends Api\User{
if( isset($characterData->character) ){
// add "ownerHash" and SSO tokens
$characterData->character['ownerHash'] = $verificationCharacterData->CharacterOwnerHash;
$characterData->character['crestAccessToken'] = $accessData->accessToken;
$characterData->character['crestRefreshToken'] = $accessData->refreshToken;
$characterData->character['ownerHash'] = $verificationCharacterData->CharacterOwnerHash;
$characterData->character['crestAccessToken'] = $accessData->accessToken;
$characterData->character['crestRefreshToken'] = $accessData->refreshToken;
$characterData->character['esiScopes'] = Lib\Util::convertScopesString($verificationCharacterData->Scopes);
// add/update static character data
$characterModel = $this->updateCharacter($characterData);
@@ -255,7 +256,7 @@ class Sso extends Api\User{
if($loginCheck){
// set "login" cookie
$this->setLoginCookie($characterModel, $this->generateHashFromScopes( explode(' ', $verificationCharacterData->Scopes) ));
$this->setLoginCookie($characterModel);
// -> pass current character data to target page
$f3->set(Api\User::SESSION_KEY_TEMP_CHARACTER_ID, $characterModel->_id);
@@ -569,7 +570,9 @@ class Sso extends Api\User{
*/
$characterModel = Model\BasicModel::getNew('CharacterModel');
$characterModel->getById((int)$characterData->character['id'], 0);
$characterModel->copyfrom($characterData->character, ['id', 'name', 'ownerHash', 'crestAccessToken', 'crestRefreshToken', 'securityStatus']);
$characterModel->copyfrom($characterData->character, [
'id', 'name', 'ownerHash', 'crestAccessToken', 'crestRefreshToken', 'esiScopes', 'securityStatus'
]);
$characterModel->corporationId = $characterData->corporation;
$characterModel->allianceId = $characterData->alliance;
$characterModel = $characterModel->save();

View File

@@ -10,6 +10,7 @@ namespace Controller;
use Controller\Api as Api;
use lib\Config;
use lib\Socket;
use Lib\Util;
use Model;
use DB;
@@ -187,9 +188,8 @@ class Controller {
* set/update logged in cookie by character model
* -> store validation data in DB
* @param Model\CharacterModel $character
* @param string $scopeHash
*/
protected function setLoginCookie(Model\CharacterModel $character, $scopeHash = ''){
protected function setLoginCookie(Model\CharacterModel $character){
if( $this->getCookieState() ){
$expireSeconds = (int) $this->getF3()->get('PATHFINDER.LOGIN.COOKIE_EXPIRE');
@@ -221,8 +221,7 @@ class Controller {
'characterId' => $character,
'selector' => $selector,
'token' => $token,
'expires' => $expireTime->format('Y-m-d H:i:s'),
'scopeHash' => $scopeHash
'expires' => $expireTime->format('Y-m-d H:i:s')
];
$authenticationModel = $character->rel('characterAuthentications');
@@ -276,10 +275,6 @@ class Controller {
// "expire data" and "validate token"
if( !$characterAuth->dry() ){
if(
(
$characterAuth->scopeHash === $this->generateHashFromScopes($this->getScopesByAuthType()) ||
$characterAuth->scopeHash === $this->generateHashFromScopes($this->getScopesByAuthType('admin'))
) &&
strtotime($characterAuth->expires) >= $currentTime->getTimestamp() &&
hash_equals($characterAuth->token, hash('sha256', $data[1]))
){
@@ -297,20 +292,32 @@ class Controller {
$character = $characterAuth->rel('characterId');
$character->getById( $characterAuth->get('characterId', true) );
// check if character still has user (is not the case of "ownerHash" changed
// check if character is still authorized to log in (e.g. corp/ally or config has changed
// -> do NOT remove cookie on failure. This can be a temporary problem (e.g. ESI is down,..)
if( $character->hasUserCharacter() ){
$authStatus = $character->isAuthorized();
// check ESI scopes
$scopeHash = Util::getHashFromScopes($character->esiScopes);
if(
$authStatus == 'OK' ||
!$checkAuthorization
){
$character->virtual( 'authStatus', $authStatus);
if(
$scopeHash === Util::getHashFromScopes(self::getScopesByAuthType()) ||
$scopeHash === Util::getHashFromScopes(self::getScopesByAuthType('admin'))
){
// check if character still has user (is not the case of "ownerHash" changed
// check if character is still authorized to log in (e.g. corp/ally or config has changed
// -> do NOT remove cookie on failure. This can be a temporary problem (e.g. ESI is down,..)
if( $character->hasUserCharacter() ){
$authStatus = $character->isAuthorized();
if(
$authStatus == 'OK' ||
!$checkAuthorization
){
$character->virtual( 'authStatus', $authStatus);
}
$characters[$name] = $character;
}
$characters[$name] = $character;
}else{
// outdated/invalid ESI scopes
$characterAuth->erase();
$invalidCookie = true;
}
}else{
$invalidCookie = true;
@@ -434,35 +441,6 @@ class Controller {
return $user;
}
/**
* get scope array by a "role"
* @param string $authType
* @return array
*/
protected function getScopesByAuthType($authType = ''){
$scopes = (array)self::getEnvironmentData('CCP_ESI_SCOPES');
switch($authType){
case 'admin':
$scopesAdmin = (array)self::getEnvironmentData('CCP_ESI_SCOPES_ADMIN');
$scopes = array_merge($scopes, $scopesAdmin);
break;
}
sort($scopes, SORT_NUMERIC);
return $scopes;
}
/**
* get hash from an array of ESI scopes
* @param array $scopes
* @return string
*/
protected function generateHashFromScopes($scopes){
$scopes = (array)$scopes;
sort($scopes);
return md5(serialize( $scopes ));
}
/**
* log out current character
* @param \Base $f3
@@ -715,6 +693,25 @@ class Controller {
return $controller;
}
/**
* get scope array by a "role"
* @param string $authType
* @return array
*/
static function getScopesByAuthType($authType = ''){
$scopes = (array)self::getEnvironmentData('CCP_ESI_SCOPES');
switch($authType){
case 'admin':
$scopesAdmin = (array)self::getEnvironmentData('CCP_ESI_SCOPES_ADMIN');
$scopes = array_merge($scopes, $scopesAdmin);
break;
}
sort($scopes);
return $scopes;
}
/**
* Helper function to return all headers because
* getallheaders() is not available under nginx

View File

@@ -22,7 +22,7 @@ class Setup extends Controller {
* @var array
*/
protected $environmentVars = [
'TYPE',
'ENVIRONMENT_CONFIG',
'BASE',
'URL',
'DEBUG',
@@ -359,11 +359,11 @@ class Setup extends Controller {
],
'os' => [
'label' => 'OS',
'value' => function_exists('php_uname') ? php_uname('s') : 'unknown'
'value' => function_exists('php_uname') ? php_uname('s') : $_SERVER['OS']
],
'name' => [
'label' => 'Host name',
'value' => function_exists('php_uname') ? php_uname('n') : 'unknown'
'value' => function_exists('php_uname') ? php_uname('n') : $_SERVER['SERVER_NAME']
],
'release' => [
'label' => 'Release name',
@@ -375,7 +375,7 @@ class Setup extends Controller {
],
'machine' => [
'label' => 'Machine type',
'value' => function_exists('php_uname') ? php_uname('m') : 'unknown'
'value' => function_exists('php_uname') ? php_uname('m') : $_SERVER['PROCESSOR_ARCHITECTURE']
],
'root' => [
'label' => 'Document root',
@@ -402,11 +402,9 @@ class Setup extends Controller {
*/
protected function checkRequirements(\Base $f3){
// server type ------------------------------------------------------------------
$serverData = self::getServerData(0);
$checkRequirements = [
'serverType' => [
'label' => 'Server type',
@@ -519,6 +517,16 @@ class Setup extends Controller {
'version' => (class_exists('ZMQ') && defined('ZMQ::LIBZMQ_VER')) ? \ZMQ::LIBZMQ_VER : 'unknown',
'check' => version_compare( (class_exists('ZMQ') && defined('ZMQ::LIBZMQ_VER')) ? \ZMQ::LIBZMQ_VER : 0, $f3->get('REQUIREMENTS.LIBS.ZMQ'), '>='),
'tooltip' => 'ØMQ version. Required for WebSocket configuration.'
],
[
'label' => 'LibEvent library [optional]'
],
'ext_event' => [
'label' => 'Event extension',
'required' => $f3->get('REQUIREMENTS.PHP.EVENT'),
'version' => extension_loaded('event') ? phpversion('event') : 'missing',
'check' => version_compare( phpversion('event'), $f3->get('REQUIREMENTS.PHP.EVENT'), '>='),
'tooltip' => 'LibEvent PHP extension. Optional performance boost for WebSocket configuration.'
]
];

View File

@@ -6,19 +6,22 @@
* Time: 19:35
*/
namespace cron;
namespace Cron;
use DB;
use Model;
class CharacterUpdate {
const CHARACTER_LOG_INACTIVE = 300;
/**
* default character_log time until a log entry get re-checked by cronjob
*/
const CHARACTER_LOG_INACTIVE = 180;
/**
* max count of "inactive" character log data that will be checked for offline status
*/
const CHARACTERS_UPDATE_LOGS_MAX = 20;
const CHARACTERS_UPDATE_LOGS_MAX = 10;
/**
* get "inactive" time for character log data in seconds
@@ -31,12 +34,12 @@ class CharacterUpdate {
}
/**
* delete all character log data that were set to "active = 0" after X seconds of no changes
* delete all character log data that have not changed since X seconds
* -> see deactivateLogData()
* >> php index.php "/cron/deleteLogData"
* @param \Base $f3
*/
public function deleteLogData(\Base $f3){
function deleteLogData(\Base $f3){
DB\Database::instance()->getDB('PF');
$logInactiveTime = $this->getCharacterLogInactiveTime($f3);
@@ -59,11 +62,16 @@ class CharacterUpdate {
/**
* @var $characterLog Model\CharacterLogModel
*/
// force characterLog as "updated" even if no changes were made
$characterLog->characterId->updateLog([
'markUpdated' => true,
'suppressHTTPErrors' => true
]);
if(is_object($characterLog->characterId)){
// force characterLog as "updated" even if no changes were made
$characterLog->characterId->updateLog([
'markUpdated' => true,
'suppressHTTPErrors' => true
]);
}else{
// character_log does not have a character assigned -> delete
$characterLog->erase();
}
}
}
}
@@ -73,7 +81,7 @@ class CharacterUpdate {
* >> php index.php "/cron/cleanUpCharacterData"
* @param \Base $f3
*/
public function cleanUpCharacterData(\Base $f3){
function cleanUpCharacterData(\Base $f3){
DB\Database::instance()->getDB('PF');
/**
@@ -104,7 +112,7 @@ class CharacterUpdate {
* >> php index.php "/cron/deleteAuthenticationData"
* @param \Base $f3
*/
public function deleteAuthenticationData($f3){
function deleteAuthenticationData($f3){
DB\Database::instance()->getDB('PF');
/**

View File

@@ -22,37 +22,41 @@ class Search {
* recursive file filter by mTime
* @param string $dir
* @param int $mTime
* @return \RecursiveIteratorIterator
* @return array|\RecursiveCallbackFilterIterator
*/
static function getFilesByMTime($dir, $mTime = null){
$files = [];
if(is_null($mTime)){
self::$filterTime = time();
}else{
self::$filterTime = (int)$mTime;
if(is_dir($dir)){
if(is_null($mTime)){
self::$filterTime = time();
}else{
self::$filterTime = (int)$mTime;
}
$directory = new \RecursiveDirectoryIterator( $dir, \FilesystemIterator::SKIP_DOTS );
$files = new \RecursiveCallbackFilterIterator($directory, function ($current, $key, $iterator) {
// Check for last modification date
/**
* @var $current \RecursiveDirectoryIterator
*/
if (
!$current->isFile() || // allow recursion
(
strpos($current->getFilename(), '.') !== 0 && // skip e.g. ".gitignore"
$current->getMTime() < self::$filterTime // check last modification date
)
){
return true;
}
return false;
});
$files = new \RecursiveIteratorIterator($files);
}
$directory = new \RecursiveDirectoryIterator( $dir, \FilesystemIterator::SKIP_DOTS );
$files = new \RecursiveCallbackFilterIterator($directory, function ($current, $key, $iterator) {
// Check for last modification date
/**
* @var $current \RecursiveDirectoryIterator
*/
if (
!$current->isFile() || // allow recursion
(
strpos($current->getFilename(), '.') !== 0 && // skip e.g. ".gitignore"
$current->getMTime() < self::$filterTime // check last modification date
)
){
return true;
}
return false;
});
return new \RecursiveIteratorIterator($files);
return $files;
}
}

View File

@@ -15,22 +15,22 @@ class CcpClient extends \Prefab {
private $apiClient;
public function __construct(){
$f3 = \Base::instance();
$this->apiClient = $this->getClient($f3);
public function __construct(\Base $f3){
$this->apiClient = $this->getClient();
$f3->set('ccpClient', $this);
}
protected function getClient($f3){
/**
* get ApiClient instance
* @return ApiClient|null
*/
protected function getClient(){
$client = null;
if( !class_exists(ApiClient::class) ){
LogController::getLogger('ERROR')->write($this->getMissingClientError());
}else{
$client = new ApiClient($f3);
$client = new ApiClient();
$client->setUrl( Config::getEnvironmentData('CCP_ESI_URL') );
$client->setDatasource( Config::getEnvironmentData('CCP_ESI_DATASOURCE') );
$client->setUserAgent($this->getUserAgent());

View File

@@ -33,31 +33,28 @@ class Config extends \Prefab {
*/
private $serverConfigData = [];
public function __construct(){
public function __construct(\Base $f3){
// set server data
// -> CGI params (Nginx)
// -> .htaccess (Apache)
$this->setServerData();
// set environment data
$this->setAllEnvironmentData();
$this->setAllEnvironmentData($f3);
// set hive configuration variables
// -> overwrites default configuration
$this->setHiveVariables();
$this->setHiveVariables($f3);
}
/**
* get environment configuration data
* @param \Base $f3
* @return array|null
*/
protected function getAllEnvironmentData(){
$f3 = \Base::instance();
$environmentData = null;
if( $f3->exists(self::HIVE_KEY_ENVIRONMENT) ){
$environmentData = $f3->get(self::HIVE_KEY_ENVIRONMENT);
}else{
$environmentData = $this->setAllEnvironmentData();
protected function getAllEnvironmentData(\Base $f3){
if( !$f3->exists(self::HIVE_KEY_ENVIRONMENT, $environmentData) ){
$environmentData = $this->setAllEnvironmentData($f3);
}
return $environmentData;
}
@@ -66,9 +63,9 @@ class Config extends \Prefab {
* -> can be overwritten in environments.ini OR ENV-Vars
* -> see: https://github.com/exodus4d/pathfinder/issues/175
* that depend on environment settings
* @param \Base $f3
*/
protected function setHiveVariables(){
$f3 = \Base::instance();
protected function setHiveVariables(\Base $f3){
// hive keys that can be overwritten
$hiveKeys = ['BASE', 'URL', 'DEBUG', 'CACHE'];
@@ -81,11 +78,11 @@ class Config extends \Prefab {
/**
* set all environment configuration data
* @return array|null
* @param \Base $f3
* @return array|mixed|null
*/
protected function setAllEnvironmentData(){
protected function setAllEnvironmentData(\Base $f3){
$environmentData = null;
$f3 = \Base::instance();
if( !empty($this->serverConfigData['ENV']) ){
// get environment config from $_SERVER data
@@ -96,17 +93,24 @@ class Config extends \Prefab {
$item = (in_array($key, self::ARRAY_KEYS)) ? explode(',', $item) : $item;
});
$environmentData['TYPE'] = 'PHP: environment variables';
$environmentData['ENVIRONMENT_CONFIG'] = 'PHP: environment variables';
}else{
// get environment data from *.ini file config
$f3->config('app/environment.ini');
$customConfDir = $f3->get('CONF');
if(
$f3->exists(self::HIVE_KEY_ENVIRONMENT) &&
($environment = $f3->get(self::HIVE_KEY_ENVIRONMENT . '.SERVER')) &&
($environmentData = $f3->get(self::HIVE_KEY_ENVIRONMENT . '.' . $environment))
){
$environmentData['TYPE'] = 'Config: environment.ini';
// check "custom" ini dir, of not found check default ini dir
foreach($customConfDir as $type => $path){
$envConfFile = $path . 'environment.ini';
$f3->config($envConfFile, true);
if(
$f3->exists(self::HIVE_KEY_ENVIRONMENT) &&
($environment = $f3->get(self::HIVE_KEY_ENVIRONMENT . '.SERVER')) &&
($environmentData = $f3->get(self::HIVE_KEY_ENVIRONMENT . '.' . $environment))
){
$environmentData['ENVIRONMENT_CONFIG'] = 'Config: ' . $envConfFile;
break;
}
}
}
@@ -115,6 +119,7 @@ class Config extends \Prefab {
$f3->set(self::HIVE_KEY_ENVIRONMENT, $environmentData);
}
return $environmentData;
}

View File

@@ -119,6 +119,8 @@ class Socket {
];
$this->socket->connect($this->socketUri);
//$this->socket->send(json_encode($send), \ZMQ::MODE_DONTWAIT);
$this->socket->send(json_encode($send));
$this->socket->disconnect($this->socketUri);

View File

@@ -8,7 +8,6 @@
namespace Lib;
class Util {
/**
@@ -38,4 +37,36 @@ class Util {
}, array_keys($arr)), $arr
);
}
/**
* convert a string with multiple scopes into an array
* @param string $scopes
* @return array|null
*/
static function convertScopesString($scopes){
$scopes = array_filter(
array_map('strtolower',
(array)explode(' ', $scopes)
)
);
if($scopes){
sort($scopes);
}else{
$scopes = null;
}
return $scopes;
}
/**
* get hash from an array of ESI scopes
* @param array $scopes
* @return string
*/
static function getHashFromScopes($scopes){
$scopes = (array)$scopes;
sort($scopes);
return md5(serialize($scopes));
}
}

View File

@@ -50,11 +50,6 @@ class CharacterAuthenticationModel extends BasicModel{
'type' => Schema::DT_TIMESTAMP,
'default' => Schema::DF_CURRENT_TIMESTAMP,
'index' => true
],
'scopeHash' => [
'type' => Schema::DT_VARCHAR128,
'nullable' => false,
'default' => ''
]
];

View File

@@ -181,7 +181,10 @@ class CharacterLogModel extends BasicModel {
public function clearCacheData(){
// clear character "LOG" cache
// -> character data without "LOG" has not changed!
$this->characterId->clearCacheDataWithPrefix(CharacterModel::DATA_CACHE_KEY_LOG);
if($this->characterId){
// characterId relation could be deleted by cron therefore check again first...
$this->characterId->clearCacheDataWithPrefix(CharacterModel::DATA_CACHE_KEY_LOG);
}
}
/**

View File

@@ -11,6 +11,7 @@ namespace Model;
use Controller\Ccp\Sso as Sso;
use Controller\Api\User as User;
use DB\SQL\Schema;
use Lib\Util;
class CharacterModel extends BasicModel {
@@ -90,6 +91,9 @@ class CharacterModel extends BasicModel {
'crestRefreshToken' => [
'type' => Schema::DT_VARCHAR256
],
'esiScopes' => [
'type' => self::DT_JSON
],
'corporationId' => [
'type' => Schema::DT_INT,
'index' => true,
@@ -566,14 +570,15 @@ class CharacterModel extends BasicModel {
// check if character alliance is set in whitelist
if(
!$authStatus &&
$authStatus != 'OK' &&
!empty($whitelistAlliance) &&
$this->hasAlliance() &&
in_array((int)$this->get('allianceId', true), $whitelistAlliance)
$this->hasAlliance()
){
$authStatus = 'OK';
}else{
$authStatus = 'ALLIANCE';
if( in_array((int)$this->get('allianceId', true), $whitelistAlliance) ){
$authStatus = 'OK';
}else{
$authStatus = 'ALLIANCE';
}
}
}
}else{
@@ -610,12 +615,16 @@ class CharacterModel extends BasicModel {
*/
protected function requestRoles(){
$rolesData = [];
if( $accessToken = $this->getAccessToken() ){
// check if corporation exists (should never fail)
if( $corporation = $this->getCorporation() ){
$characterRolesData = $corporation->getCharactersRoles($accessToken);
if( !empty($characterRolesData[$this->_id]) ){
$rolesData = $characterRolesData[$this->_id];
// check if character has accepted all admin scopes (one of them is required for "role" request)
if( $this->hasAdminScopes() ){
if( $accessToken = $this->getAccessToken() ){
// check if corporation exists (should never fail)
if( $corporation = $this->getCorporation() ){
$characterRolesData = $corporation->getCharactersRoles($accessToken);
if( !empty($characterRolesData[$this->_id]) ){
$rolesData = $characterRolesData[$this->_id];
}
}
}
}
@@ -623,18 +632,38 @@ class CharacterModel extends BasicModel {
return $rolesData;
}
/**
* check whether this char has accepted all "basic" api scopes
* @return bool
*/
public function hasBasicScopes(){
return empty( array_diff(Sso::getScopesByAuthType(), $this->esiScopes) );
}
/**
* check whether this char has accepted all admin api scopes
* @return bool
*/
public function hasAdminScopes(){
return empty( array_diff(Sso::getScopesByAuthType('admin'), $this->esiScopes) );
}
/**
* update character log (active system, ...)
* -> API request for character log data
* @param array $additionalOptions (optional) request options for cURL request
* @return $this
* @return CharacterModel
*/
public function updateLog($additionalOptions = []){
$deleteLog = false;
$invalidResponse = false;
//check if log update is enabled for this user
if( $this->logLocation ){
//check if log update is enabled for this character
// check if character has accepted all scopes. (This fkt is called by cron as well)
if(
$this->logLocation &&
$this->hasBasicScopes()
){
// Try to pull data from API
if( $accessToken = $this->getAccessToken() ){
$onlineData = self::getF3()->ccpClient->getCharacterOnlineData($this->_id, $accessToken, $additionalOptions);
@@ -650,7 +679,7 @@ class CharacterModel extends BasicModel {
// IDs for "systemId", "stationId and "shipTypeId" that require more data
$lookupIds = [];
if( !$characterLog = $this->getLog() ){
if( !($characterLog = $this->getLog()) ){
// create new log
$characterLog = $this->rel('characterLog');
}
@@ -719,7 +748,7 @@ class CharacterModel extends BasicModel {
}
$characterLog->setData($logData);
$characterLog->characterId = $this;
$characterLog->characterId = $this->id;
$characterLog->save();
$this->characterLog = $characterLog;
@@ -779,7 +808,6 @@ class CharacterModel extends BasicModel {
){
// delete existing log
$this->characterLog->erase();
$this->save();
}
return $this;
@@ -805,8 +833,9 @@ class CharacterModel extends BasicModel {
$characterData = $ssoController->getCharacterData($this->_id);
if( !empty($characterData->character) ){
$characterData->character['ownerHash'] = $verificationCharacterData->CharacterOwnerHash;
$characterData->character['esiScopes'] = Util::convertScopesString($verificationCharacterData->Scopes);
$this->copyfrom($characterData->character, ['ownerHash', 'securityStatus']);
$this->copyfrom($characterData->character, ['ownerHash', 'esiScopes', 'securityStatus']);
$this->corporationId = $characterData->corporation;
$this->allianceId = $characterData->alliance;
$this->save();

View File

@@ -3,7 +3,7 @@
[PATHFINDER]
NAME = Pathfinder
; installed version (used for CSS/JS cache busting)
VERSION = v1.2.3
VERSION = v1.2.4
; contact information [optional]
CONTACT = https://github.com/exodus4d
; public contact email [optional]
@@ -126,8 +126,8 @@ EXECUTION_LIMIT = 50
; CACHE ===========================================================================================
[PATHFINDER.CACHE]
; delete character log data if if nothing (ship/system/...) for X seconds (seconds) (default: 5min)
CHARACTER_LOG_INACTIVE = 300
; delete character log data if if nothing (ship/system/...) for X seconds (seconds) (default: 3min)
CHARACTER_LOG_INACTIVE = 180
; expire time for static system data (seconds) (default: 20d)
CONSTELLATION_SYSTEMS = 1728000
; max expire time. Expired cache files will be deleted by cronjob (seconds) (default: 10d)

View File

@@ -26,6 +26,10 @@ REDIS = 3.0.0
; ZeroMQ (ØMQ) extension (optional) required for WebSocket Server extension (recommended)
ZMQ = 1.1.3
; Event extension (optional) for WebSocket configuration. Better performance
; https://pecl.php.net/package/event
EVENT = 2.3.0
; max execution time for requests
MAX_EXECUTION_TIME = 10

View File

@@ -128,7 +128,7 @@
//build after r1592 (20111114 release).
//The source files will show up in a browser developer tool that supports
//source maps as ".js.src" files.
generateSourceMaps: true,
generateSourceMaps: false,
//Sets the logging level. It is a number. If you want "silent" running,
//set logLevel to 4. From the logger.js file:
@@ -194,7 +194,7 @@
// show module names for each file
if(moduleName === 'mappage'){
// perform transformations on the original source
contents = contents.replace( /#version/i, new Date().toString() );
// contents = contents.replace( /#version/i, new Date().toString() );
}
return contents;

View File

@@ -1,6 +1,5 @@
# Compass 1.0.1 (Polaris)
require 'compass/import-once/activate'
require 'compass/import-once/activate'
# Require any additional compass plugins here.
@@ -26,7 +25,7 @@ relative_assets = true
line_comments = false
# Define the location of a the compass / sass cache directory.
cache_path = '../../.sass-cache'
cache_path = '.sass-cache'
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:

File diff suppressed because it is too large Load Diff

View File

@@ -9,13 +9,13 @@ if(file_exists($composerAutoloader)){
$f3 = require_once('app/lib/base.php');
// load main config
$f3->config('app/config.ini');
$f3->config('app/config.ini', true);
// load environment dependent config
lib\Config::instance();
lib\Config::instance($f3);
// initiate CCP API Client (ESI)
lib\CcpClient::instance();
lib\CcpClient::instance($f3);
// initiate cron-jobs
Cron::instance();

View File

@@ -21,6 +21,7 @@ requirejs.config({
mappage: './app/mappage', // initial start "map page" view
setup: './app/setup', // initial start "setup page" view
admin: './app/admin', // initial start "admin page" view
notification: './app/notification', // "notification" view
jquery: 'lib/jquery-3.1.1.min', // v3.1.1 jQuery
bootstrap: 'lib/bootstrap.min', // v3.3.0 Bootstrap js code - http://getbootstrap.com/javascript

View File

@@ -334,31 +334,31 @@ define(['jquery'], function($) {
// signature groups
signatureGroups: {
1: {
name: 'combat site', //*
name: '(combat site|kampfgebiet|site de combat)', //*
label: 'Combat'
},
2: {
name: 'relic site', //*
name: '(relic site|reliktgebiet|site de reliques)', //*
label: 'Relic'
},
3: {
name: 'data site',
name: '(data site|datengebiet|site de données)',
label: 'Data'
},
4: {
name: 'gas site',
name: '(gas site|gasgebiet|site de collecte de gaz)',
label: 'Gas'
},
5: {
name: 'wormhole',
name: '(wormhole|wurmloch|trou de ver)',
label: 'Wormhole'
},
6: {
name: 'ore site',
name: '(ore site|mineraliengebiet|site de minerai)',
label: 'Ore'
},
7: {
name: 'ghost',
name: '(ghost)',
label: 'Ghost'
}
},

View File

@@ -377,6 +377,14 @@ define([
// initial start of the map update function
triggerMapUpdatePing(true);
// Send map update request on tab close/reload, in order to save map changes that
// haven´t been saved through default update trigger
window.addEventListener('beforeunload', function(e) {
triggerMapUpdatePing();
// IMPORTANT, return false in order to not "abort" ajax request in background!
return false;
});
};
});

View File

@@ -12,7 +12,7 @@ define([
'use strict';
var config = {
let config = {
title: '',
text: '',
type: '', // 'info', 'success', error, 'warning'
@@ -38,13 +38,13 @@ define([
};
// initial page title (cached)
var initialPageTitle = document.title;
let initialPageTitle = document.title;
// global blink timeout cache
var blinkTimer;
let blinkTimer;
// stack container for all notifications
var stack = {
let stack = {
bottomRight: {
stack: {
dir1: 'up',
@@ -76,7 +76,7 @@ define([
* @param customConfig
* @param settings
*/
var showNotify = function(customConfig, settings){
let showNotify = function(customConfig, settings){
customConfig = $.extend(true, {}, config, customConfig );
@@ -140,13 +140,13 @@ define([
* change document.title and make the browsers tab blink
* @param blinkTitle
*/
var startTabBlink = function(blinkTitle){
var initBlink = (function(blinkTitle){
let startTabBlink = function(blinkTitle){
let initBlink = (function(blinkTitle){
// count blinks if tab is currently active
var activeTabBlinkCount = 0;
let activeTabBlinkCount = 0;
var blink = function(){
let blink = function(){
// number of "blinks" should be limited if tab is currently active
if(window.isVisible){
activeTabBlinkCount++;
@@ -173,7 +173,7 @@ define([
/**
* stop blinking document.title
*/
var stopTabBlink = function(){
let stopTabBlink = function(){
if(blinkTimer){
clearInterval(blinkTimer);
document.title = initialPageTitle;

View File

@@ -1005,7 +1005,7 @@ define([
let initTabChangeObserver = function(){
// increase the timer if a user is inactive
let increaseTimer = 10000;
let increaseTimer = 5000;
// timer keys
let mapUpdateKey = 'UPDATE_SERVER_MAP';

View File

@@ -46,7 +46,10 @@ define([
let testWebSocket = () => {
let tcpSocketPanel = $('#pf-setup-tcpSocket');
let webSocketPanel = $('#pf-setup-webSocket');
let WebSocketURI = MapWorker.getWebSocketURL();
let webSocketURI = MapWorker.getWebSocketURL();
let sslIcon = webSocketURI.startsWith('wss:') ?
'<i class="fa fa-fw fa-lock txt-color txt-color-success"></i>' :
'<i class="fa fa-fw fa-unlock txt-color txt-color-warning"></i>';
webSocketPanel.showLoadingAnimation();
@@ -63,7 +66,7 @@ define([
let updateWebSocketPanel = (data) => {
if(data.uri){
let uriRow = webSocketPanel.find('.panel-body table tr');
uriRow.find('td:nth-child(2) kbd').text(data.uri.value);
uriRow.find('td:nth-child(2) kbd').html(data.uri.value);
if(data.uri.status){
let statusIcon = uriRow.find('td:nth-child(3) i');
removeColorClasses(statusIcon);
@@ -82,7 +85,7 @@ define([
// update initial
updateWebSocketPanel({
uri: {
value: WebSocketURI,
value: sslIcon + '&nbsp;' + webSocketURI,
status: true
},
status: {
@@ -92,7 +95,7 @@ define([
});
// try to connect to WebSocket server
let socket = new WebSocket(WebSocketURI);
let socket = new WebSocket(webSocketURI);
socket.onopen = (e) => {
updateWebSocketPanel({
@@ -160,7 +163,7 @@ define([
/**
* main init "setup" page
*/
$(() => {
$(function(){
// show app information in browser console --------
Util.showVersionInfo();

View File

@@ -98,6 +98,10 @@ define([
let validSignatureNames = [ // allowed signature type/names
'Cosmic Anomaly',
'Cosmic Signature',
'Kosmische Anomalie',
'Kosmische Signatur',
'Anomalie cosmique',
'Signature cosmique',
'Космическая аномалия', // == "Cosmic Anomaly"
'Источники сигналов' // == "Cosmic Signature"
];
@@ -658,7 +662,8 @@ define([
// get groupId by groupName
for (let prop in signatureGroupOptions) {
if(signatureGroupOptions.hasOwnProperty(prop)){
if(signatureGroupOptions[prop] === sigGroup){
let reg = new RegExp(signatureGroupOptions[prop], 'i');
if (reg.test(sigGroup)) {
sigGroupId = parseInt( prop );
break;
}
@@ -2453,4 +2458,4 @@ define([
getAllSignatureNamesBySystem: getAllSignatureNamesBySystem
};
});
});

View File

@@ -581,8 +581,9 @@ define([
e.preventDefault();
e.stopPropagation();
let easeEffect = $(this).attr('data-easein');
let popoverData = $(this).data('bs.popover');
let button = $(this);
let easeEffect = button.attr('data-easein');
let popoverData = button.data('bs.popover');
let popoverElement = null;
let velocityOptions = {
@@ -591,8 +592,16 @@ define([
if(popoverData === undefined){
button.on('shown.bs.popover', function (e) {
let tmpPopupElement = $(this).data('bs.popover').tip();
tmpPopupElement.find('.btn').on('click', function(e){
// close popover
$('body').click();
});
});
// init popover and add specific class to it (for styling)
$(this).popover({
button.popover({
html: true,
title: 'select character',
trigger: 'manual',
@@ -602,17 +611,17 @@ define([
animation: false
}).data('bs.popover').tip().addClass('pf-popover');
$(this).popover('show');
button.popover('show');
popoverElement = $(this).data('bs.popover').tip();
popoverElement = button.data('bs.popover').tip();
popoverElement.velocity('transition.' + easeEffect, velocityOptions);
popoverElement.initTooltips();
}else{
popoverElement = $(this).data('bs.popover').tip();
popoverElement = button.data('bs.popover').tip();
if(popoverElement.is(':visible')){
popoverElement.velocity('reverse');
}else{
$(this).popover('show');
button.popover('show');
popoverElement.initTooltips();
popoverElement.velocity('transition.' + easeEffect, velocityOptions);
}
@@ -1025,7 +1034,7 @@ define([
* @param desktop
*/
let showNotify = function(customConfig, desktop){
requirejs(['app/notification'], function(Notification) {
requirejs(['notification'], function(Notification) {
Notification.showNotify(customConfig, desktop);
});
};
@@ -1034,7 +1043,7 @@ define([
* stop browser tab title "blinking"
*/
let stopTabBlink = function(){
requirejs(['app/notification'], function(Notification) {
requirejs(['notification'], function(Notification) {
Notification.stopTabBlink();
});
};

View File

@@ -1,28 +1,39 @@
{
"name": "pathfinder-eve",
"version": "0.0.10",
"version": "1.2.4",
"engines": {
"node": "6.x"
},
"description": "Pathfinder is a system mapping tool for EVE ONLINE",
"main": "index.php",
"dependencies": {
},
"devDependencies": {
"critical": "^0.x",
"gulp": "^3.9.x",
"gulp-clean": "^0.3.x",
"gulp-gzip": "^1.x.x",
"gulp-if": "^2.0.x",
"gulp-jshint": "^2.0.x",
"gulp-notify": "^2.2.x",
"gulp-param": "^1.0.x",
"gulp-plumber": "^1.x.x",
"gulp": "gulpjs/gulp#4.0",
"gulp-util": "3.0.x",
"gulp-requirejs-optimize": "1.2.x",
"gulp-filter": "5.0.x",
"gulp-if": "2.0.x",
"gulp-jshint": "2.0.x",
"gulp-sourcemaps": "2.6.x",
"gulp-gzip": "1.x.x",
"gulp-brotli": "1.2.x",
"gulp-uglify": "^3.0.x",
"gulp-rename": "1.2.x",
"gulp-compass": "2.1.x",
"gulp-clean-css": "3.x.x",
"gulp-bytediff": "1.0.x",
"gulp-debug": "^3.1.x",
"uglify-es": "^3.0.x",
"jshint": "^2.9.x",
"jshint-stylish": "^2.x.x",
"requirejs": "^2.x.x",
"run-sequence": "^1.1.x"
"terminal-table": "0.0.x",
"pretty-bytes": "4.0.x",
"promised-del": "1.0.x",
"flat": "2.0.x",
"lodash.padend": "4.6.x",
"slash": "1.0.x",
"file-extension": "3.1.x"
},
"scripts": {
"gulp": "gulp"

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
var mainScriptPath=document.body.getAttribute("data-script"),jsBaseUrl=document.body.getAttribute("data-js-path");requirejs.config({baseUrl:"js",paths:{layout:"layout",config:"app/config",dialog:"app/ui/dialog",templates:"../../templates",img:"../../img",login:"./app/login",mappage:"./app/mappage",setup:"./app/setup",admin:"./app/admin",jquery:"lib/jquery-3.1.1.min",bootstrap:"lib/bootstrap.min",text:"lib/requirejs/text",mustache:"lib/mustache.min",localForage:"lib/localforage.min",velocity:"lib/velocity.min",velocityUI:"lib/velocity.ui.min",slidebars:"lib/slidebars",jsPlumb:"lib/dom.jsPlumb-1.7.6",farahey:"lib/farahey-0.5",customScrollbar:"lib/jquery.mCustomScrollbar.min",mousewheel:"lib/jquery.mousewheel.min",xEditable:"lib/bootstrap-editable.min",morris:"lib/morris.min",raphael:"lib/raphael-min",bootbox:"lib/bootbox.min",easyPieChart:"lib/jquery.easypiechart.min",peityInlineChart:"lib/jquery.peity.min",dragToSelect:"lib/jquery.dragToSelect",hoverIntent:"lib/jquery.hoverIntent.minified",fullScreen:"lib/jquery.fullscreen.min",select2:"lib/select2.min",validator:"lib/validator.min",lazylinepainter:"lib/jquery.lazylinepainter-1.5.1.min",blueImpGallery:"lib/blueimp-gallery",blueImpGalleryHelper:"lib/blueimp-helper",blueImpGalleryBootstrap:"lib/bootstrap-image-gallery",bootstrapConfirmation:"lib/bootstrap-confirmation",bootstrapToggle:"lib/bootstrap2-toggle.min",lazyload:"lib/jquery.lazyload.min",easePack:"lib/EasePack.min",tweenLite:"lib/TweenLite.min","datatables.net":"lib/datatables/DataTables-1.10.12/js/jquery.dataTables.min","datatables.net-buttons":"lib/datatables/Buttons-1.2.1/js/dataTables.buttons.min","datatables.net-buttons-html":"lib/datatables/Buttons-1.2.1/js/buttons.html5.min","datatables.net-responsive":"lib/datatables/Responsive-2.1.0/js/dataTables.responsive.min","datatables.net-select":"lib/datatables/Select-1.2.0/js/dataTables.select.min",pnotify:"lib/pnotify/pnotify","pnotify.buttons":"lib/pnotify/pnotify.buttons","pnotify.confirm":"lib/pnotify/pnotify.confirm","pnotify.nonblock":"lib/pnotify/pnotify.nonblock","pnotify.desktop":"lib/pnotify/pnotify.desktop","pnotify.history":"lib/pnotify/pnotify.history","pnotify.callbacks":"lib/pnotify/pnotify.callbacks","pnotify.reference":"lib/pnotify/pnotify.reference"},shim:{bootstrap:{deps:["jquery"]},farahey:{deps:["jsPlumb"]},velocity:{deps:["jquery"]},velocityUI:{deps:["velocity"]},slidebars:{deps:["jquery"]},customScrollbar:{deps:["jquery","mousewheel"]},"datatables.net":{deps:["jquery"]},"datatables.net-buttons":{deps:["datatables.net"]},"datatables.net-buttons-html":{deps:["datatables.net-buttons"]},"datatables.net-responsive":{deps:["datatables.net"]},"datatables.net-select":{deps:["datatables.net"]},xEditable:{deps:["bootstrap"]},bootbox:{deps:["jquery","bootstrap"],exports:"bootbox"},morris:{deps:["jquery","raphael"],exports:"Morris"},pnotify:{deps:["jquery"]},easyPieChart:{deps:["jquery"]},peityInlineChart:{deps:["jquery"]},dragToSelect:{deps:["jquery"]},hoverIntent:{deps:["jquery"]},fullScreen:{deps:["jquery"]},select2:{deps:["jquery"],exports:"Select2"},validator:{deps:["jquery","bootstrap"]},lazylinepainter:{deps:["jquery","bootstrap"]},blueImpGallery:{deps:["jquery"]},bootstrapConfirmation:{deps:["bootstrap"]},bootstrapToggle:{deps:["jquery"]},lazyload:{deps:["jquery"]}}});require.config({baseUrl:jsBaseUrl});requirejs([mainScriptPath]);
//# sourceMappingURL=app.js.map

View File

@@ -1 +0,0 @@
{"version":3,"sources":["?"],"names":["mainScriptPath","document","body","getAttribute","jsBaseUrl","requirejs","config","baseUrl","paths","layout","dialog","templates","img","login","mappage","setup","admin","jquery","bootstrap","text","mustache","localForage","velocity","velocityUI","slidebars","jsPlumb","farahey","customScrollbar","mousewheel","xEditable","morris","raphael","bootbox","easyPieChart","peityInlineChart","dragToSelect","hoverIntent","fullScreen","select2","validator","lazylinepainter","blueImpGallery","blueImpGalleryHelper","blueImpGalleryBootstrap","bootstrapConfirmation","bootstrapToggle","lazyload","easePack","tweenLite","datatables.net","datatables.net-buttons","datatables.net-buttons-html","datatables.net-responsive","datatables.net-select","pnotify","pnotify.buttons","pnotify.confirm","pnotify.nonblock","pnotify.desktop","pnotify.history","pnotify.callbacks","pnotify.reference","shim","deps","exports","require"],"mappings":"AACA,GAAIA,gBAAiBC,SAASC,KAAKC,aAAa,eAI5CC,UAAYH,SAASC,KAAKC,aAAa,eAG3CE,WAAUC,QACNC,QAAS,KAETC,OACIC,OAAQ,SACRH,OAAQ,aACRI,OAAQ,gBACRC,UAAW,kBACXC,IAAK,YAGLC,MAAO,cACPC,QAAS,gBACTC,MAAO,cACPC,MAAO,cAEPC,OAAQ,uBACRC,UAAW,oBACXC,KAAM,qBACNC,SAAU,mBACVC,YAAa,sBACbC,SAAU,mBACVC,WAAY,sBACZC,UAAW,gBACXC,QAAS,wBACTC,QAAS,kBACTC,gBAAiB,kCACjBC,WAAY,4BACZC,UAAW,6BACXC,OAAQ,iBACRC,QAAS,kBACTC,QAAS,kBACTC,aAAc,8BACdC,iBAAkB,uBAClBC,aAAc,0BACdC,YAAa,kCACbC,WAAY,4BACZC,QAAS,kBACTC,UAAW,oBACXC,gBAAiB,uCACjBC,eAAgB,sBAChBC,qBAAsB,qBACtBC,wBAAyB,8BACzBC,sBAAuB,6BACvBC,gBAAiB,4BACjBC,SAAU,0BAGVC,SAAU,mBACVC,UAAW,oBAGXC,iBAAkB,6DAClBC,yBAA0B,yDAC1BC,8BAA+B,oDAC/BC,4BAA6B,+DAC7BC,wBAAyB,uDAGzBC,QAAS,sBACTC,kBAAmB,8BACnBC,kBAAmB,8BACnBC,mBAAoB,+BACpBC,kBAAmB,8BACnBC,kBAAmB,8BACnBC,oBAAqB,gCACrBC,oBAAqB,iCAEzBC,MACI5C,WACI6C,MAAO,WAEXrC,SACIqC,MAAO,YAEXzC,UACIyC,MAAO,WAEXxC,YACIwC,MAAO,aAEXvC,WACIuC,MAAO,WAEXpC,iBACIoC,MAAO,SAAU,eAErBd,kBACIc,MAAO,WAEXb,0BACIa,MAAO,mBAEXZ,+BACIY,MAAO,2BAEXX,6BACIW,MAAO,mBAEXV,yBACIU,MAAO,mBAEXlC,WACIkC,MAAO,cAEX/B,SACI+B,MAAO,SAAU,aACjBC,QAAS,WAEblC,QACIiC,MAAO,SAAU,WACjBC,QAAS,UAEbV,SACIS,MAAQ,WAEZ9B,cACI8B,MAAQ,WAEZ7B,kBACI6B,MAAQ,WAEZ5B,cACI4B,MAAQ,WAEZ3B,aACI2B,MAAQ,WAEZ1B,YACI0B,MAAQ,WAEZzB,SACIyB,MAAQ,UACRC,QAAS,WAEbzB,WACIwB,MAAQ,SAAU,cAEtBvB,iBACIuB,MAAQ,SAAU,cAEtBtB,gBACIsB,MAAQ,WAEZnB,uBACImB,MAAQ,cAEZlB,iBACIkB,MAAQ,WAEZjB,UACIiB,MAAQ,aAQpBE,SAAQ3D,QACJC,QAASH,WAIbC,YAAYL","file":"app.js"}

View File

@@ -1,173 +0,0 @@
// main script path
var mainScriptPath = document.body.getAttribute('data-script');
// js baseURL. Depends on the environment.
// e.g. use raw files (develop) or build files (production)
var jsBaseUrl = document.body.getAttribute('data-js-path');
// requireJs configuration
requirejs.config({
baseUrl: 'js', // path for baseUrl - dynamically set !below! ("build_js" | "js")
paths: {
layout: 'layout',
config: 'app/config', // path for "configuration" files dir
dialog: 'app/ui/dialog', // path for "dialog" files dir
templates: '../../templates', // template dir
img: '../../img', // images dir
// main views
login: './app/login', // initial start "login page" view
mappage: './app/mappage', // initial start "map page" view
setup: './app/setup', // initial start "setup page" view
admin: './app/admin', // initial start "admin page" view
jquery: 'lib/jquery-3.1.1.min', // v3.1.1 jQuery
bootstrap: 'lib/bootstrap.min', // v3.3.0 Bootstrap js code - http://getbootstrap.com/javascript
text: 'lib/requirejs/text', // v2.0.12 A RequireJS/AMD loader plugin for loading text resources.
mustache: 'lib/mustache.min', // v1.0.0 Javascript template engine - http://mustache.github.io
localForage: 'lib/localforage.min', // v1.4.2 localStorage library - https://mozilla.github.io/localForage
velocity: 'lib/velocity.min', // v1.4.1 animation engine - http://julian.com/research/velocity
velocityUI: 'lib/velocity.ui.min', // v5.2.0 plugin for velocity - http://julian.com/research/velocity/#uiPack
slidebars: 'lib/slidebars', // v0.10 Slidebars - side menu plugin http://plugins.adchsm.me/slidebars
jsPlumb: 'lib/dom.jsPlumb-1.7.6', // v1.7.6 jsPlumb (Vanilla)- main map draw plugin https://jsplumbtoolkit.com
farahey: 'lib/farahey-0.5', // v0.5 jsPlumb "magnetizing" extension - https://github.com/jsplumb/farahey
customScrollbar: 'lib/jquery.mCustomScrollbar.min', // v3.1.3 Custom scroll bars - http://manos.malihu.gr
mousewheel: 'lib/jquery.mousewheel.min', // v3.1.13 Mousewheel - https://github.com/jquery/jquery-mousewheel
xEditable: 'lib/bootstrap-editable.min', // v1.5.1 X-editable - in placed editing
morris: 'lib/morris.min', // v0.5.1 Morris.js - graphs and charts
raphael: 'lib/raphael-min', // v2.1.2 Raphaël - required for morris (dependency)
bootbox: 'lib/bootbox.min', // v4.4.0 Bootbox.js - custom dialogs - http://bootboxjs.com
easyPieChart: 'lib/jquery.easypiechart.min', // v2.1.6 Easy Pie Chart - HTML 5 pie charts - http://rendro.github.io/easy-pie-chart
peityInlineChart: 'lib/jquery.peity.min', // v3.2.0 Inline Chart - http://benpickles.github.io/peity/
dragToSelect: 'lib/jquery.dragToSelect', // v1.1 Drag to Select - http://andreaslagerkvist.com/jquery/drag-to-select
hoverIntent: 'lib/jquery.hoverIntent.minified', // v1.8.0 Hover intention - http://cherne.net/brian/resources/jquery.hoverIntent.html
fullScreen: 'lib/jquery.fullscreen.min', // v0.6.0 Full screen mode - https://github.com/private-face/jquery.fullscreen
select2: 'lib/select2.min', // v4.0.3 Drop Down customization - https://select2.github.io
validator: 'lib/validator.min', // v0.10.1 Validator for Bootstrap 3 - https://github.com/1000hz/bootstrap-validator
lazylinepainter: 'lib/jquery.lazylinepainter-1.5.1.min', // v1.5.1 SVG line animation plugin - http://lazylinepainter.info
blueImpGallery: 'lib/blueimp-gallery', // v2.21.3 Image Gallery - https://github.com/blueimp/Gallery
blueImpGalleryHelper: 'lib/blueimp-helper', // helper function for Blue Imp Gallery
blueImpGalleryBootstrap: 'lib/bootstrap-image-gallery', // v3.4.2 Bootstrap extension for Blue Imp Gallery - https://blueimp.github.io/Bootstrap-Image-Gallery
bootstrapConfirmation: 'lib/bootstrap-confirmation', // v1.0.5 Bootstrap extension for inline confirm dialog - https://github.com/tavicu/bs-confirmation
bootstrapToggle: 'lib/bootstrap2-toggle.min', // v2.2.0 Bootstrap Toggle (Checkbox) - http://www.bootstraptoggle.com
lazyload: 'lib/jquery.lazyload.min', // v1.9.5 LazyLoader images - http://www.appelsiini.net/projects/lazyload
// header animation
easePack: 'lib/EasePack.min',
tweenLite: 'lib/TweenLite.min',
// datatables // v1.10.12 DataTables - https://datatables.net
'datatables.net': 'lib/datatables/DataTables-1.10.12/js/jquery.dataTables.min',
'datatables.net-buttons': 'lib/datatables/Buttons-1.2.1/js/dataTables.buttons.min',
'datatables.net-buttons-html': 'lib/datatables/Buttons-1.2.1/js/buttons.html5.min',
'datatables.net-responsive': 'lib/datatables/Responsive-2.1.0/js/dataTables.responsive.min',
'datatables.net-select': 'lib/datatables/Select-1.2.0/js/dataTables.select.min',
// notification plugin
pnotify: 'lib/pnotify/pnotify', // v3.0.0 PNotify - notification core file - https://sciactive.com/pnotify/
'pnotify.buttons': 'lib/pnotify/pnotify.buttons', // PNotify - buttons notification extension
'pnotify.confirm': 'lib/pnotify/pnotify.confirm', // PNotify - confirmation notification extension
'pnotify.nonblock': 'lib/pnotify/pnotify.nonblock', // PNotify - notification non-block extension (hover effect)
'pnotify.desktop': 'lib/pnotify/pnotify.desktop', // PNotify - desktop push notification extension
'pnotify.history': 'lib/pnotify/pnotify.history', // PNotify - history push notification history extension
'pnotify.callbacks': 'lib/pnotify/pnotify.callbacks', // PNotify - callbacks push notification extension
'pnotify.reference': 'lib/pnotify/pnotify.reference' // PNotify - reference push notification extension
},
shim: {
bootstrap: {
deps: ['jquery']
},
farahey: {
deps: ['jsPlumb']
},
velocity: {
deps: ['jquery']
},
velocityUI: {
deps: ['velocity']
},
slidebars: {
deps: ['jquery']
},
customScrollbar: {
deps: ['jquery', 'mousewheel']
},
'datatables.net': {
deps: ['jquery']
},
'datatables.net-buttons': {
deps: ['datatables.net']
},
'datatables.net-buttons-html': {
deps: ['datatables.net-buttons']
},
'datatables.net-responsive': {
deps: ['datatables.net']
},
'datatables.net-select': {
deps: ['datatables.net']
},
xEditable: {
deps: ['bootstrap']
},
bootbox: {
deps: ['jquery', 'bootstrap'],
exports: 'bootbox'
},
morris: {
deps: ['jquery', 'raphael'],
exports: 'Morris'
},
pnotify: {
deps : ['jquery']
},
easyPieChart: {
deps : ['jquery']
},
peityInlineChart: {
deps : ['jquery']
},
dragToSelect: {
deps : ['jquery']
},
hoverIntent: {
deps : ['jquery']
},
fullScreen: {
deps : ['jquery']
},
select2: {
deps : ['jquery'],
exports: 'Select2'
},
validator: {
deps : ['jquery', 'bootstrap']
},
lazylinepainter: {
deps : ['jquery', 'bootstrap']
},
blueImpGallery: {
deps : ['jquery']
},
bootstrapConfirmation: {
deps : ['bootstrap']
},
bootstrapToggle: {
deps : ['jquery']
},
lazyload: {
deps : ['jquery']
}
}
});
// switch baseUrl to js "build_js" in production environment
// this has no effect for js build process!
// check build.js for build configuration
require.config({
baseUrl: jsBaseUrl
});
// load the main app module -> initial app start
requirejs( [mainScriptPath] );

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,162 +0,0 @@
// "fake" window object will contain "MsgWorker" after import
let window = {}; // jshint ignore:line
// import "MsgWorker" class
self.importScripts( self.name ); // jshint ignore:line
let MsgWorker = window.MsgWorker;
let socket = null;
let ports = [];
let characterPorts = [];
// init "WebSocket" connection ========================================================================================
let initSocket = (uri) => {
let MsgWorkerOpen = new MsgWorker('ws:open');
if(socket === null){
socket = new WebSocket(uri);
// "WebSocket" open -----------------------------------------------------------------------
socket.onopen = (e) => {
MsgWorkerOpen.meta({
readyState: socket.readyState
});
sendToCurrentPort(MsgWorkerOpen);
};
// "WebSocket message ---------------------------------------------------------------------
socket.onmessage = (e) => {
let response = JSON.parse(e.data);
let MsgWorkerSend = new MsgWorker('ws:send');
MsgWorkerSend.task( response.task );
MsgWorkerSend.meta({
readyState: this.readyState,
characterIds: response.characterIds
});
MsgWorkerSend.data( response.load );
broadcastPorts(MsgWorkerSend);
};
// "WebSocket" close ----------------------------------------------------------------------
socket.onclose = (closeEvent) => {
let MsgWorkerClosed = new MsgWorker('ws:closed');
MsgWorkerClosed.meta({
readyState: socket.readyState,
code: closeEvent.code,
reason: closeEvent.reason,
wasClean: closeEvent.wasClean
});
broadcastPorts(MsgWorkerClosed);
socket = null; // reset WebSocket
};
// "WebSocket" error ----------------------------------------------------------------------
socket.onerror = (e) => {
let MsgWorkerError = new MsgWorker('ws:error');
MsgWorkerError.meta({
readyState: socket.readyState
});
sendToCurrentPort(MsgWorkerError);
};
}else{
// socket still open
MsgWorkerOpen.meta({
readyState: socket.readyState
});
sendToCurrentPort(MsgWorkerOpen);
}
};
// send message to port(s) ============================================================================================
let sendToCurrentPort = (load) => {
ports[ports.length - 1].postMessage(load);
};
let broadcastPorts = (load) => {
// default: sent to all ports
let sentToPorts = ports;
// check if send() is limited to some ports
let meta = load.meta();
if(
meta &&
meta.characterIds &&
meta.characterIds !== 'undefined' &&
meta.characterIds instanceof Array
){
// ... get ports for characterIds
sentToPorts = getPortsByCharacterIds(meta.characterIds);
}
for (let i = 0; i < sentToPorts.length; i++) {
sentToPorts[i].postMessage(load);
}
};
// port functions =====================================================================================================
let addPort = (port, characterId) => {
characterId = parseInt(characterId);
if(characterId > 0){
characterPorts.push({
characterId: characterId,
port: port
});
}else{
ports.push(port);
}
};
let getPortsByCharacterIds = (characterIds) => {
let ports = [];
for(let i = 0; i < characterPorts.length; i++){
for(let j = 0; j < characterIds.length; j++){
if(characterPorts[i].characterId === characterIds[j]){
ports.push(characterPorts[i].port);
}
}
}
return ports;
};
// "SharedWorker" connection ==========================================================================================
self.addEventListener('connect', (event) => { // jshint ignore:line
let port = event.ports[0];
addPort(port);
port.addEventListener('message', (e) => {
let MsgWorkerMessage = e.data;
Object.setPrototypeOf(MsgWorkerMessage, MsgWorker.prototype);
switch(MsgWorkerMessage.command){
case 'ws:init':
let data = MsgWorkerMessage.data();
// add character specific port (for broadcast) to individual ports (tabs)
addPort(port, data.characterId);
initSocket(data.uri);
break;
case 'ws:send':
let MsgSocket = {
task: MsgWorkerMessage.task(),
load: MsgWorkerMessage.data()
};
socket.send(JSON.stringify(MsgSocket));
break;
case 'ws:close':
// closeSocket();
break;
}
}, false);
port.start();
}, false);

View File

@@ -1,55 +0,0 @@
window.MsgWorker = class MessageWorker {
constructor(cmd){
/**
* "command" type (identifies this message)
*/
this.cmd = cmd;
/**
* "task" what should be done with this message
* @type {string}
*/
this.msgTask = '';
/**
* "message" meta data (e.g. error/close data from WebSocket
* @type {null}
*/
this.msgMeta = null;
/**
* "message" body (load)
* @type {null}
*/
this.msgBody = null;
}
get command(){
return this.cmd;
}
task(task) {
if(task){
this.msgTask = task;
}
return this.msgTask;
}
meta(metaData) {
if(metaData){
this.msgMeta = metaData;
}
return this.msgMeta;
}
data(data) {
if(data){
this.msgBody = data;
}
return this.msgBody;
}
};

View File

@@ -1,168 +0,0 @@
app/login.js
----------------
lib/jquery-3.1.1.min.js
app/init.js
app/config/system_effect.js
app/config/signature_type.js
lib/bootstrap.min.js
lib/bootbox.min.js
lib/localforage.min.js
lib/velocity.min.js
lib/velocity.ui.min.js
lib/jquery.mousewheel.min.js
lib/jquery.mCustomScrollbar.min.js
lib/validator.min.js
lib/jquery.easypiechart.min.js
lib/jquery.hoverIntent.minified.js
lib/bootstrap-confirmation.js
lib/bootstrap2-toggle.min.js
app/util.js
lib/mustache.min.js
app/render.js
lib/blueimp-helper.js
lib/blueimp-gallery.js
lib/jquery.lazyload.min.js
lib/EasePack.min.js
lib/TweenLite.min.js
app/ui/header.js
lib/jquery.lazylinepainter-1.5.1.min.js
app/ui/logo.js
app/ui/demo_map.js
app/ui/dialog/account_settings.js
app/ui/dialog/notification.js
app/ui/dialog/manual.js
app/ui/dialog/releases.js
app/ui/dialog/credit.js
app/login.js
lib/requirejs/text.js
app/mappage.js
----------------
lib/jquery-3.1.1.min.js
app/init.js
app/config/system_effect.js
app/config/signature_type.js
lib/bootstrap.min.js
lib/bootbox.min.js
lib/localforage.min.js
lib/velocity.min.js
lib/velocity.ui.min.js
lib/jquery.mousewheel.min.js
lib/jquery.mCustomScrollbar.min.js
lib/validator.min.js
lib/jquery.easypiechart.min.js
lib/jquery.hoverIntent.minified.js
lib/bootstrap-confirmation.js
lib/bootstrap2-toggle.min.js
app/util.js
lib/mustache.min.js
app/render.js
app/logging.js
app/map/util.js
lib/requirejs/text.js
text!img/logo.svg!strip
text!templates/modules/header.html
text!templates/modules/footer.html
app/ui/dialog/notification.js
app/ui/dialog/stats.js
app/ui/dialog/map_info.js
app/ui/dialog/account_settings.js
app/ui/dialog/manual.js
app/key.js
app/ui/dialog/shortcuts.js
app/ui/dialog/map_settings.js
app/ui/dialog/system_effects.js
app/ui/dialog/jump_info.js
app/ui/dialog/delete_account.js
lib/jquery.lazylinepainter-1.5.1.min.js
app/ui/logo.js
app/ui/dialog/credit.js
lib/bootstrap-editable.min.js
lib/slidebars.js
app/map/system.js
lib/dom.jsPlumb-1.7.6.js
lib/farahey-0.5.js
app/map/magnetizing.js
app/map/scrollbar.js
lib/jquery.dragToSelect.js
lib/select2.min.js
app/map/contextmenu.js
app/map/overlay.js
app/map/local.js
app/map/map.js
app/counter.js
app/ui/system_info.js
lib/raphael-min.js
lib/morris.min.js
app/ui/system_graph.js
app/ui/system_signature.js
app/ui/system_route.js
app/ui/system_killboard.js
lib/datatables/DataTables-1.10.12/js/jquery.dataTables.min.js
lib/datatables/Buttons-1.2.1/js/dataTables.buttons.min.js
lib/datatables/Buttons-1.2.1/js/buttons.html5.min.js
lib/datatables/Responsive-2.1.0/js/dataTables.responsive.min.js
lib/datatables/Select-1.2.0/js/dataTables.select.min.js
app/module_map.js
app/page.js
app/map/worker.js
app/ui/form_element.js
app/mappage.js
app/setup.js
----------------
lib/jquery-3.1.1.min.js
app/init.js
app/config/system_effect.js
app/config/signature_type.js
lib/bootstrap.min.js
lib/bootbox.min.js
lib/localforage.min.js
lib/velocity.min.js
lib/velocity.ui.min.js
lib/jquery.mousewheel.min.js
lib/jquery.mCustomScrollbar.min.js
lib/validator.min.js
lib/jquery.easypiechart.min.js
lib/jquery.hoverIntent.minified.js
lib/bootstrap-confirmation.js
lib/bootstrap2-toggle.min.js
app/util.js
app/map/worker.js
app/setup.js
app/admin.js
----------------
lib/jquery-3.1.1.min.js
app/init.js
app/config/system_effect.js
app/config/signature_type.js
lib/bootstrap.min.js
lib/bootbox.min.js
lib/localforage.min.js
lib/velocity.min.js
lib/velocity.ui.min.js
lib/jquery.mousewheel.min.js
lib/jquery.mCustomScrollbar.min.js
lib/validator.min.js
lib/jquery.easypiechart.min.js
lib/jquery.hoverIntent.minified.js
lib/bootstrap-confirmation.js
lib/bootstrap2-toggle.min.js
app/util.js
lib/datatables/DataTables-1.10.12/js/jquery.dataTables.min.js
lib/datatables/Buttons-1.2.1/js/dataTables.buttons.min.js
lib/datatables/Buttons-1.2.1/js/buttons.html5.min.js
lib/datatables/Responsive-2.1.0/js/dataTables.responsive.min.js
lib/datatables/Select-1.2.0/js/dataTables.select.min.js
app/admin.js
app/notification.js
----------------
app/init.js
lib/pnotify/pnotify.js
lib/pnotify/pnotify.nonblock.js
lib/pnotify/pnotify.desktop.js
lib/pnotify/pnotify.callbacks.js
app/notification.js

View File

@@ -1,2 +0,0 @@
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","blueImpGallery"],t):t(window.jQuery,window.blueimp.Gallery)}(function(t,o){"use strict";t.extend(o.prototype.options,{useBootstrapModal:!0});var e=o.prototype.close,i=o.prototype.imageFactory,n=o.prototype.videoFactory,r=o.prototype.textFactory;t.extend(o.prototype,{modalFactory:function(o,e,i,n){if(!this.options.useBootstrapModal||i)return n.call(this,o,e,i);var r=this,a=t(this.container).children(".modal"),c=a.clone().css("display","block").on("click",function(t){if(t.target===c[0]||t.target===c.children()[0]){t.preventDefault();t.stopPropagation();r.close()}}),l=n.call(this,o,function(t){e({type:t.type,target:c[0]});c.addClass("in")},i);c.find(".modal-title").text(l.title||String.fromCharCode(160));c.find(".modal-body").append(l);return c[0]},imageFactory:function(t,o,e){return this.modalFactory(t,o,e,i)},videoFactory:function(t,o,e){return this.modalFactory(t,o,e,n)},textFactory:function(t,o,e){return this.modalFactory(t,o,e,r)},close:function(){this.container.find(".modal").removeClass("in");e.call(this)}})});
//# sourceMappingURL=bootstrap-image-gallery.js.map

View File

@@ -1 +0,0 @@
{"version":3,"sources":["?"],"names":["factory","define","amd","window","jQuery","blueimp","Gallery","$","extend","prototype","options","useBootstrapModal","close","imageFactory","videoFactory","textFactory","modalFactory","obj","callback","factoryInterface","this","call","that","modalTemplate","container","children","modal","clone","css","on","event","target","preventDefault","stopPropagation","element","type","addClass","find","text","title","String","fromCharCode","append","removeClass"],"mappings":"CAaE,SAAUA,GACR,YACsB,mBAAXC,SAAyBA,OAAOC,IACvCD,QACI,SACA,kBACDD,GAEHA,EACIG,OAAOC,OACPD,OAAOE,QAAQC,UAGzB,SAAUC,EAAGD,GACX,YAEAC,GAAEC,OAAOF,EAAQG,UAAUC,SACvBC,mBAAmB,GAGvB,IAAIC,GAAQN,EAAQG,UAAUG,MAC1BC,EAAeP,EAAQG,UAAUI,aACjCC,EAAeR,EAAQG,UAAUK,aACjCC,EAAcT,EAAQG,UAAUM,WAEpCR,GAAEC,OAAOF,EAAQG,WACbO,aAAc,SAAUC,EAAKC,EAAUC,EAAkBnB,GACrD,IAAKoB,KAAKV,QAAQC,mBAAqBQ,EACnC,MAAOnB,GAAQqB,KAAKD,KAAMH,EAAKC,EAAUC,EAE7C,IAAIG,GAAOF,KACPG,EAAgBhB,EAAEa,KAAKI,WAAWC,SAAS,UAC3CC,EAAQH,EAAcI,QAAQC,IAAI,UAAW,SAASC,GAAG,QAAS,SAAUC,GAG5E,GAAIA,EAAMC,SAAWL,EAAM,IACvBI,EAAMC,SAAWL,EAAMD,WAAW,GAAI,CACtCK,EAAME,gBACNF,GAAMG,iBACNX,GAAKV,WAGTsB,EAAUlC,EAAQqB,KAAKD,KAAMH,EAAK,SAAUa,GAC5CZ,GACIiB,KAAML,EAAMK,KACZJ,OAAQL,EAAM,IAElBA,GAAMU,SAAS,OAChBjB,EACHO,GAAMW,KAAK,gBAAgBC,KAAKJ,EAAQK,OAASC,OAAOC,aAAa,KACrEf,GAAMW,KAAK,eAAeK,OAAOR,EAEjC,OAAOR,GAAM,IAGjBb,aAAc,SAAUI,EAAKC,EAAUC,GACnC,MAAOC,MAAKJ,aAAaC,EAAKC,EAAUC,EAAkBN,IAG9DC,aAAc,SAAUG,EAAKC,EAAUC,GACnC,MAAOC,MAAKJ,aAAaC,EAAKC,EAAUC,EAAkBL,IAG9DC,YAAa,SAAUE,EAAKC,EAAUC,GAClC,MAAOC,MAAKJ,aAAaC,EAAKC,EAAUC,EAAkBJ,IAG9DH,MAAO,WACHQ,KAAKI,UAAUa,KAAK,UAAUM,YAAY,KAC1C/B,GAAMS,KAAKD","file":"bootstrap-image-gallery.js"}

View File

@@ -1,87 +0,0 @@
/*
* Bootstrap Image Gallery
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2013, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/*global define, window */
;(function (factory) {
'use strict'
if (typeof define === 'function' && define.amd) {
define([
'jquery',
'blueImpGallery'
], factory)
} else {
factory(
window.jQuery,
window.blueimp.Gallery
)
}
}(function ($, Gallery) {
'use strict'
$.extend(Gallery.prototype.options, {
useBootstrapModal: true
})
var close = Gallery.prototype.close
var imageFactory = Gallery.prototype.imageFactory
var videoFactory = Gallery.prototype.videoFactory
var textFactory = Gallery.prototype.textFactory
$.extend(Gallery.prototype, {
modalFactory: function (obj, callback, factoryInterface, factory) {
if (!this.options.useBootstrapModal || factoryInterface) {
return factory.call(this, obj, callback, factoryInterface)
}
var that = this
var modalTemplate = $(this.container).children('.modal')
var modal = modalTemplate.clone().css('display', 'block').on('click', function (event) {
//var modal = modalTemplate.clone().show().on('click', function (event) {
// Close modal if click is outside of modal-content:
if (event.target === modal[0] ||
event.target === modal.children()[0]) {
event.preventDefault()
event.stopPropagation()
that.close()
}
})
var element = factory.call(this, obj, function (event) {
callback({
type: event.type,
target: modal[0]
})
modal.addClass('in')
}, factoryInterface)
modal.find('.modal-title').text(element.title || String.fromCharCode(160))
modal.find('.modal-body').append(element)
return modal[0]
},
imageFactory: function (obj, callback, factoryInterface) {
return this.modalFactory(obj, callback, factoryInterface, imageFactory)
},
videoFactory: function (obj, callback, factoryInterface) {
return this.modalFactory(obj, callback, factoryInterface, videoFactory)
},
textFactory: function (obj, callback, factoryInterface) {
return this.modalFactory(obj, callback, factoryInterface, textFactory)
},
close: function () {
this.container.find('.modal').removeClass('in')
close.call(this)
}
})
}))

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
!function(t,i,e,n){var r=t.fn.peity=function(i,e){l&&this.each(function(){var n=t(this),h=n.data("_peity");h?(i&&(h.type=i),t.extend(h.opts,e)):(h=new a(n,i,t.extend({},r.defaults[i],n.data("peity"),e)),n.change(function(){h.draw()}).data("_peity",h));h.draw()});return this},a=function(t,i,e){this.$el=t;this.type=i;this.opts=e},h=a.prototype,s=h.svgElement=function(e,n){return t(i.createElementNS("http://www.w3.org/2000/svg",e)).attr(n)},l="createElementNS"in i&&s("svg",{})[0].createSVGRect;h.draw=function(){var t=this.opts;r.graphers[this.type].call(this,t);t.after&&t.after.call(this,t)};h.fill=function(){var i=this.opts.fill;return t.isFunction(i)?i:function(t,e){return i[e%i.length]}};h.prepare=function(t,i){this.$svg||this.$el.hide().after(this.$svg=s("svg",{class:"peity"}));return this.$svg.empty().data("peity",this).attr({height:i,width:t})};h.values=function(){return t.map(this.$el.text().split(this.opts.delimiter),function(t){return parseFloat(t)})};r.defaults={};r.graphers={};r.register=function(t,i,e){this.defaults[t]=i;this.graphers[t]=e};r.register("pie",{fill:["#ff9900","#fff4dd","#ffc66e"],radius:8},function(i){if(!i.delimiter){var n=this.$el.text().match(/[^0-9\.]/);i.delimiter=n?n[0]:","}n=t.map(this.values(),function(t){return 0<t?t:0});if("/"==i.delimiter)var r=n[0],n=[r,e.max(0,n[1]-r)];for(var a=0,r=n.length,h=0;a<r;a++)h+=n[a];h||(r=2,h=1,n=[0,1]);var l=2*i.radius,l=this.prepare(i.width||l,i.height||l),a=l.width(),p=l.height(),o=a/2,f=p/2,p=e.min(o,f),i=i.innerRadius;"donut"==this.type&&!i&&(i=.5*p);for(var c=e.PI,u=this.fill(),d=this.scale=function(t,i){var n=t/h*c*2-c/2;return[i*e.cos(n)+o,i*e.sin(n)+f]},g=0,a=0;a<r;a++){var m=n[a],v=m/h;if(0!=v){if(1==v)if(i)var v=o-.01,y=f-p,w=f-i,v=s("path",{d:["M",o,y,"A",p,p,0,1,1,v,y,"L",v,w,"A",i,i,0,1,0,o,w].join(" ")});else v=s("circle",{cx:o,cy:f,r:p});else y=g+m,w=["M"].concat(d(g,p),"A",p,p,0,.5<v?1:0,1,d(y,p),"L"),i?w=w.concat(d(y,i),"A",i,i,0,.5<v?1:0,0,d(g,i)):w.push(o,f),g+=m,v=s("path",{d:w.join(" ")});v.attr("fill",u.call(this,m,a,n));l.append(v)}}});r.register("donut",t.extend(!0,{},r.defaults.pie),function(t){r.graphers.pie.call(this,t)});r.register("line",{delimiter:",",fill:"#c6d9fd",height:16,min:0,stroke:"#4d89f9",strokeWidth:1,width:32},function(t){var i=this.values();1==i.length&&i.push(i[0]);for(var r=e.max.apply(e,t.max==n?i:i.concat(t.max)),a=e.min.apply(e,t.min==n?i:i.concat(t.min)),h=this.prepare(t.width,t.height),l=t.strokeWidth,p=h.width(),o=h.height()-l,f=r-a,r=this.x=function(t){return t*(p/(i.length-1))},c=this.y=function(t){var i=o;f&&(i-=(t-a)/f*o);return i+l/2},u=c(e.max(a,0)),d=[0,u],g=0;g<i.length;g++)d.push(r(g),c(i[g]));d.push(p,u);t.fill&&h.append(s("polygon",{fill:t.fill,points:d.join(" ")}));l&&h.append(s("polyline",{fill:"none",points:d.slice(2,d.length-2).join(" "),stroke:t.stroke,"stroke-width":l,"stroke-linecap":"square"}))});r.register("bar",{delimiter:",",fill:["#4D89F9"],height:16,min:0,padding:.1,width:32},function(t){for(var i=this.values(),r=e.max.apply(e,t.max==n?i:i.concat(t.max)),a=e.min.apply(e,t.min==n?i:i.concat(t.min)),h=this.prepare(t.width,t.height),l=h.width(),p=h.height(),o=r-a,t=t.padding,f=this.fill(),c=this.x=function(t){return t*l/i.length},u=this.y=function(t){return p-(o?(t-a)/o*p:1)},d=0;d<i.length;d++){var g,m=c(d+t),v=c(d+1-t)-m,y=i[d],w=u(y),x=w;o?0>y?x=u(e.min(r,0)):w=u(e.max(a,0)):g=1;g=w-x;0==g&&(g=1,0<r&&o&&x--);h.append(s("rect",{fill:f.call(this,y,d,i),x:m,y:x,width:v,height:g}))}})}(jQuery,document,Math);
//# sourceMappingURL=jquery.peity.min.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +0,0 @@
// Peity jQuery plugin version 3.2.0
// (c) 2015 Ben Pickles
//
// http://benpickles.github.io/peity
//
// Released under MIT license.
(function(k,w,h,v){var d=k.fn.peity=function(a,b){y&&this.each(function(){var e=k(this),c=e.data("_peity");c?(a&&(c.type=a),k.extend(c.opts,b)):(c=new x(e,a,k.extend({},d.defaults[a],e.data("peity"),b)),e.change(function(){c.draw()}).data("_peity",c));c.draw()});return this},x=function(a,b,e){this.$el=a;this.type=b;this.opts=e},o=x.prototype,q=o.svgElement=function(a,b){return k(w.createElementNS("http://www.w3.org/2000/svg",a)).attr(b)},y="createElementNS"in w&&q("svg",{})[0].createSVGRect;o.draw=
function(){var a=this.opts;d.graphers[this.type].call(this,a);a.after&&a.after.call(this,a)};o.fill=function(){var a=this.opts.fill;return k.isFunction(a)?a:function(b,e){return a[e%a.length]}};o.prepare=function(a,b){this.$svg||this.$el.hide().after(this.$svg=q("svg",{"class":"peity"}));return this.$svg.empty().data("peity",this).attr({height:b,width:a})};o.values=function(){return k.map(this.$el.text().split(this.opts.delimiter),function(a){return parseFloat(a)})};d.defaults={};d.graphers={};d.register=
function(a,b,e){this.defaults[a]=b;this.graphers[a]=e};d.register("pie",{fill:["#ff9900","#fff4dd","#ffc66e"],radius:8},function(a){if(!a.delimiter){var b=this.$el.text().match(/[^0-9\.]/);a.delimiter=b?b[0]:","}b=k.map(this.values(),function(a){return 0<a?a:0});if("/"==a.delimiter)var e=b[0],b=[e,h.max(0,b[1]-e)];for(var c=0,e=b.length,t=0;c<e;c++)t+=b[c];t||(e=2,t=1,b=[0,1]);var l=2*a.radius,l=this.prepare(a.width||l,a.height||l),c=l.width(),f=l.height(),j=c/2,d=f/2,f=h.min(j,d),a=a.innerRadius;
"donut"==this.type&&!a&&(a=0.5*f);for(var r=h.PI,s=this.fill(),g=this.scale=function(a,b){var c=a/t*r*2-r/2;return[b*h.cos(c)+j,b*h.sin(c)+d]},m=0,c=0;c<e;c++){var u=b[c],i=u/t;if(0!=i){if(1==i)if(a)var i=j-0.01,p=d-f,n=d-a,i=q("path",{d:["M",j,p,"A",f,f,0,1,1,i,p,"L",i,n,"A",a,a,0,1,0,j,n].join(" ")});else i=q("circle",{cx:j,cy:d,r:f});else p=m+u,n=["M"].concat(g(m,f),"A",f,f,0,0.5<i?1:0,1,g(p,f),"L"),a?n=n.concat(g(p,a),"A",a,a,0,0.5<i?1:0,0,g(m,a)):n.push(j,d),m+=u,i=q("path",{d:n.join(" ")});
i.attr("fill",s.call(this,u,c,b));l.append(i)}}});d.register("donut",k.extend(!0,{},d.defaults.pie),function(a){d.graphers.pie.call(this,a)});d.register("line",{delimiter:",",fill:"#c6d9fd",height:16,min:0,stroke:"#4d89f9",strokeWidth:1,width:32},function(a){var b=this.values();1==b.length&&b.push(b[0]);for(var e=h.max.apply(h,a.max==v?b:b.concat(a.max)),c=h.min.apply(h,a.min==v?b:b.concat(a.min)),d=this.prepare(a.width,a.height),l=a.strokeWidth,f=d.width(),j=d.height()-l,k=e-c,e=this.x=function(a){return a*
(f/(b.length-1))},r=this.y=function(a){var b=j;k&&(b-=(a-c)/k*j);return b+l/2},s=r(h.max(c,0)),g=[0,s],m=0;m<b.length;m++)g.push(e(m),r(b[m]));g.push(f,s);a.fill&&d.append(q("polygon",{fill:a.fill,points:g.join(" ")}));l&&d.append(q("polyline",{fill:"none",points:g.slice(2,g.length-2).join(" "),stroke:a.stroke,"stroke-width":l,"stroke-linecap":"square"}))});d.register("bar",{delimiter:",",fill:["#4D89F9"],height:16,min:0,padding:0.1,width:32},function(a){for(var b=this.values(),e=h.max.apply(h,a.max==
v?b:b.concat(a.max)),c=h.min.apply(h,a.min==v?b:b.concat(a.min)),d=this.prepare(a.width,a.height),l=d.width(),f=d.height(),j=e-c,a=a.padding,k=this.fill(),r=this.x=function(a){return a*l/b.length},s=this.y=function(a){return f-(j?(a-c)/j*f:1)},g=0;g<b.length;g++){var m=r(g+a),u=r(g+1-a)-m,i=b[g],p=s(i),n=p,o;j?0>i?n=s(h.min(e,0)):p=s(h.max(c,0)):o=1;o=p-n;0==o&&(o=1,0<e&&j&&n--);d.append(q("rect",{fill:k.call(this,i,g,b),x:m,y:n,width:u,height:o}))}})})(jQuery,document,Math);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
{"version":3,"sources":["?"],"names":["root","factory","define","amd","exports","module","require","jQuery","PNotify","this","$","prototype","options","buttons","closer","closer_hover","sticker","sticker_hover","show_on_nonblock","labels","close","stick","unstick","classes","pin_up","pin_down","modules","init","notice","that","elem","on","mouseenter","e","nonblock","trigger","css","mouseleave","class","aria-role","aria-pressed","hide","tabindex","title","cursor","visibility","click","queueRemove","cancelRemove","bind","styles","attr","children","addClass","append","prependTo","container","remove","update","find","extend","styling","brighttheme","jqueryui","bootstrap2","bootstrap3","fontawesome"],"mappings":"CACC,SAAUA,EAAMC,GACS,kBAAXC,SAAyBA,OAAOC,IAEvCD,OAAO,mBAAoB,SAAU,WAAYD,GACvB,gBAAZG,UAA0C,mBAAXC,QAE7CA,OAAOD,QAAUH,EAAQK,QAAQ,UAAWA,QAAQ,cAGpDL,EAAQD,EAAKO,OAAQP,EAAKQ,UAEhCC,KAAM,SAASC,EAAGF,GAChBA,EAAQG,UAAUC,QAAQC,SAEtBC,QAAQ,EAERC,cAAc,EAEdC,SAAS,EAETC,eAAe,EAEfC,kBAAkB,EAElBC,QACIC,MAAO,QACPC,MAAO,QACPC,QAAS,WAGbC,SACIT,OAAQ,KACRU,OAAQ,KACRC,SAAU,MAGlBjB,GAAQG,UAAUe,QAAQb,SACtBC,OAAQ,KACRE,QAAS,KAETW,KAAM,SAASC,EAAQhB,GACnB,GAAIiB,GAAOpB,IACXmB,GAAOE,KAAKC,IACRC,WAAc,SAASC,IAEfJ,EAAKjB,QAAQI,SAAcY,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAaL,EAAKjB,QAAQM,kBACxGW,EAAKb,QAAQmB,QAAQ,+BAA+BC,IAAI,aAAc,YAEtEP,EAAKjB,QAAQE,QAAac,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAaL,EAAKjB,QAAQM,kBACvGW,EAAKf,OAAOsB,IAAI,aAAc,YAGtCC,WAAc,SAASJ,GAEfJ,EAAKjB,QAAQK,eACbY,EAAKb,QAAQoB,IAAI,aAAc,SAE/BP,GAAKjB,QAAQG,cACbc,EAAKf,OAAOsB,IAAI,aAAc,YAM1C3B,MAAKO,QAAUN,EAAE,WACb4B,MAAS,qBACTC,YAAa,SACbC,eAAgBZ,EAAOhB,QAAQ6B,KAAO,QAAU,OAChDC,SAAY,IACZC,MAASf,EAAOhB,QAAQ6B,KAAO7B,EAAQO,OAAOE,MAAQT,EAAQO,OAAOG,QACrEc,KACIQ,OAAU,UACVC,WAAcjC,EAAQK,cAAgB,SAAW,WAErD6B,MAAS,WACLlB,EAAOhB,QAAQ6B,MAAQb,EAAOhB,QAAQ6B,IAClCb,GAAOhB,QAAQ6B,KACfb,EAAOmB,cAEPnB,EAAOoB,cAEXtC,GAAED,MAAM0B,QAAQ,kCAGvBc,KAAK,8BAA+B,WACjC,GAAIzB,GAAyC,OAAhCK,EAAKjB,QAAQW,QAAQC,OAAkBI,EAAOsB,OAAO1B,OAASK,EAAKjB,QAAQW,QAAQC,OAC5FC,EAA6C,OAAlCI,EAAKjB,QAAQW,QAAQE,SAAoBG,EAAOsB,OAAOzB,SAAWI,EAAKjB,QAAQW,QAAQE,QACtGf,GAAED,MACD0C,KAAK,QAASvB,EAAOhB,QAAQ6B,KAAOZ,EAAKjB,QAAQO,OAAOE,MAAQQ,EAAKjB,QAAQO,OAAOG,SACpF8B,WACAD,KAAK,QAAS,IACdE,SAASzB,EAAOhB,QAAQ6B,KAAOjB,EAASC,GACxC0B,KAAK,eAAgBvB,EAAOhB,QAAQ6B,KAAO,QAAU,UAEzDa,OAAO,YACPnB,QAAQ,+BACRoB,UAAU3B,EAAO4B,aACb5C,EAAQI,SAAYY,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAatB,EAAQM,mBAC7FT,KAAKO,QAAQoB,IAAI,UAAW,OAIhC3B,MAAKK,OAASJ,EAAE,WACZ4B,MAAS,oBACTC,YAAa,SACbG,SAAY,IACZC,MAAS/B,EAAQO,OAAOC,MACxBgB,KAAQQ,OAAU,UAAWC,WAAcjC,EAAQG,aAAe,SAAW,WAC7E+B,MAAS,WACLlB,EAAO6B,QAAO,EACd5B,GAAKb,QAAQoB,IAAI,aAAc,SAC/BP,GAAKf,OAAOsB,IAAI,aAAc,aAGrCkB,OAAO5C,EAAE,YAAa4B,MAAoC,OAA3B1B,EAAQW,QAAQT,OAAkBc,EAAOsB,OAAOpC,OAASF,EAAQW,QAAQT,UACxGyC,UAAU3B,EAAO4B,aACb5C,EAAQE,QAAWc,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAatB,EAAQM,mBAC5FT,KAAKK,OAAOsB,IAAI,UAAW,SAGnCsB,OAAQ,SAAS9B,EAAQhB,IAEhBA,EAAQE,QAAWc,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAatB,EAAQM,iBAC5FT,KAAKK,OAAOsB,IAAI,UAAW,QACpBxB,EAAQE,QACfL,KAAKK,OAAOsB,IAAI,UAAW,UAE1BxB,EAAQI,SAAYY,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAatB,EAAQM,iBAC7FT,KAAKO,QAAQoB,IAAI,UAAW,QACrBxB,EAAQI,SACfP,KAAKO,QAAQoB,IAAI,UAAW,QAGhC3B,MAAKO,QAAQmB,QAAQ,8BAErB1B,MAAKK,OAAO6C,KAAK,QAAQR,KAAK,QAAS,IAAIE,SAAoC,OAA3BzC,EAAQW,QAAQT,OAAkBc,EAAOsB,OAAOpC,OAASF,EAAQW,QAAQT,OAEzHF,GAAQK,cACRR,KAAKO,QAAQoB,IAAI,aAAc,UACtBR,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAatB,EAAQM,kBACjFT,KAAKO,QAAQoB,IAAI,aAAc,UAE/BxB,GAAQG,aACRN,KAAKK,OAAOsB,IAAI,aAAc,UACrBR,EAAOhB,QAAQsB,UAAYN,EAAOhB,QAAQsB,SAASA,WAAatB,EAAQM,kBACjFT,KAAKK,OAAOsB,IAAI,aAAc,YAI1C1B,GAAEkD,OAAOpD,EAAQqD,QAAQC,aACrBhD,OAAQ,0BACRU,OAAQ,2BACRC,SAAU,mDAEdf,GAAEkD,OAAOpD,EAAQqD,QAAQE,UACrBjD,OAAQ,wBACRU,OAAQ,wBACRC,SAAU,yBAEdf,GAAEkD,OAAOpD,EAAQqD,QAAQG,YACrBlD,OAAQ,cACRU,OAAQ,aACRC,SAAU,aAEdf,GAAEkD,OAAOpD,EAAQqD,QAAQI,YACrBnD,OAAQ,6BACRU,OAAQ,4BACRC,SAAU,4BAEdf,GAAEkD,OAAOpD,EAAQqD,QAAQK,aACrBpD,OAAQ,cACRU,OAAQ,cACRC,SAAU","file":"pnotify.buttons.js"}

View File

@@ -1,176 +0,0 @@
// Buttons
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as a module.
define('pnotify.buttons', ['jquery', 'pnotify'], factory);
} else if (typeof exports === 'object' && typeof module !== 'undefined') {
// CommonJS
module.exports = factory(require('jquery'), require('./pnotify'));
} else {
// Browser globals
factory(root.jQuery, root.PNotify);
}
}(this, function($, PNotify){
PNotify.prototype.options.buttons = {
// Provide a button for the user to manually close the notice.
closer: true,
// Only show the closer button on hover.
closer_hover: true,
// Provide a button for the user to manually stick the notice.
sticker: true,
// Only show the sticker button on hover.
sticker_hover: true,
// Show the buttons even when the nonblock module is in use.
show_on_nonblock: false,
// The various displayed text, helps facilitating internationalization.
labels: {
close: "Close",
stick: "Stick",
unstick: "Unstick"
},
// The classes to use for button icons. Leave them null to use the classes from the styling you're using.
classes: {
closer: null,
pin_up: null,
pin_down: null
}
};
PNotify.prototype.modules.buttons = {
closer: null,
sticker: null,
init: function(notice, options){
var that = this;
notice.elem.on({
"mouseenter": function(e){
// Show the buttons.
if (that.options.sticker && (!(notice.options.nonblock && notice.options.nonblock.nonblock) || that.options.show_on_nonblock)) {
that.sticker.trigger("pnotify:buttons:toggleStick").css("visibility", "visible");
}
if (that.options.closer && (!(notice.options.nonblock && notice.options.nonblock.nonblock) || that.options.show_on_nonblock)) {
that.closer.css("visibility", "visible");
}
},
"mouseleave": function(e){
// Hide the buttons.
if (that.options.sticker_hover) {
that.sticker.css("visibility", "hidden");
}
if (that.options.closer_hover) {
that.closer.css("visibility", "hidden");
}
}
});
// Provide a button to stick the notice.
this.sticker = $("<div />", {
"class": "ui-pnotify-sticker",
"aria-role": "button",
"aria-pressed": notice.options.hide ? "false" : "true",
"tabindex": "0",
"title": notice.options.hide ? options.labels.stick : options.labels.unstick,
"css": {
"cursor": "pointer",
"visibility": options.sticker_hover ? "hidden" : "visible"
},
"click": function(){
notice.options.hide = !notice.options.hide;
if (notice.options.hide) {
notice.queueRemove();
} else {
notice.cancelRemove();
}
$(this).trigger("pnotify:buttons:toggleStick");
}
})
.bind("pnotify:buttons:toggleStick", function(){
var pin_up = that.options.classes.pin_up === null ? notice.styles.pin_up : that.options.classes.pin_up;
var pin_down = that.options.classes.pin_down === null ? notice.styles.pin_down : that.options.classes.pin_down;
$(this)
.attr("title", notice.options.hide ? that.options.labels.stick : that.options.labels.unstick)
.children()
.attr("class", "")
.addClass(notice.options.hide ? pin_up : pin_down)
.attr("aria-pressed", notice.options.hide ? "false" : "true");
})
.append("<span />")
.trigger("pnotify:buttons:toggleStick")
.prependTo(notice.container);
if (!options.sticker || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
this.sticker.css("display", "none");
}
// Provide a button to close the notice.
this.closer = $("<div />", {
"class": "ui-pnotify-closer",
"aria-role": "button",
"tabindex": "0",
"title": options.labels.close,
"css": {"cursor": "pointer", "visibility": options.closer_hover ? "hidden" : "visible"},
"click": function(){
notice.remove(false);
that.sticker.css("visibility", "hidden");
that.closer.css("visibility", "hidden");
}
})
.append($("<span />", {"class": options.classes.closer === null ? notice.styles.closer : options.classes.closer}))
.prependTo(notice.container);
if (!options.closer || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
this.closer.css("display", "none");
}
},
update: function(notice, options){
// Update the sticker and closer buttons.
if (!options.closer || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
this.closer.css("display", "none");
} else if (options.closer) {
this.closer.css("display", "block");
}
if (!options.sticker || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
this.sticker.css("display", "none");
} else if (options.sticker) {
this.sticker.css("display", "block");
}
// Update the sticker icon.
this.sticker.trigger("pnotify:buttons:toggleStick");
// Update the close icon.
this.closer.find("span").attr("class", "").addClass(options.classes.closer === null ? notice.styles.closer : options.classes.closer);
// Update the hover status of the buttons.
if (options.sticker_hover) {
this.sticker.css("visibility", "hidden");
} else if (!(notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
this.sticker.css("visibility", "visible");
}
if (options.closer_hover) {
this.closer.css("visibility", "hidden");
} else if (!(notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
this.closer.css("visibility", "visible");
}
}
};
$.extend(PNotify.styling.brighttheme, {
closer: "brighttheme-icon-closer",
pin_up: "brighttheme-icon-sticker",
pin_down: "brighttheme-icon-sticker brighttheme-icon-stuck"
});
$.extend(PNotify.styling.jqueryui, {
closer: "ui-icon ui-icon-close",
pin_up: "ui-icon ui-icon-pin-w",
pin_down: "ui-icon ui-icon-pin-s"
});
$.extend(PNotify.styling.bootstrap2, {
closer: "icon-remove",
pin_up: "icon-pause",
pin_down: "icon-play"
});
$.extend(PNotify.styling.bootstrap3, {
closer: "glyphicon glyphicon-remove",
pin_up: "glyphicon glyphicon-pause",
pin_down: "glyphicon glyphicon-play"
});
$.extend(PNotify.styling.fontawesome, {
closer: "fa fa-times",
pin_up: "fa fa-pause",
pin_down: "fa fa-play"
});
}));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,36 +0,0 @@
/*
RequireJS 2.2.0 Copyright jQuery Foundation and other contributors.
Released under MIT license, http://github.com/requirejs/requirejs/LICENSE
*/
var requirejs,require,define;
(function(ga){function ka(b,c,d,g){return g||""}function K(b){return"[object Function]"===Q.call(b)}function L(b){return"[object Array]"===Q.call(b)}function y(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function X(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));--d);}}function x(b,c){return la.call(b,c)}function e(b,c){return x(b,c)&&b[c]}function D(b,c){for(var d in b)if(x(b,d)&&c(b[d],d))break}function Y(b,c,d,g){c&&D(c,function(c,e){if(d||!x(b,e))!g||"object"!==
typeof c||!c||L(c)||K(c)||c instanceof RegExp?b[e]=c:(b[e]||(b[e]={}),Y(b[e],c,d,g))});return b}function z(b,c){return function(){return c.apply(b,arguments)}}function ha(b){throw b;}function ia(b){if(!b)return b;var c=ga;y(b.split("."),function(b){c=c[b]});return c}function F(b,c,d,g){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c}function ma(b){function c(a,n,b){var h,k,f,c,d,l,g,r;n=n&&n.split("/");var q=p.map,m=q&&q["*"];
if(a){a=a.split("/");k=a.length-1;p.nodeIdCompat&&U.test(a[k])&&(a[k]=a[k].replace(U,""));"."===a[0].charAt(0)&&n&&(k=n.slice(0,n.length-1),a=k.concat(a));k=a;for(f=0;f<k.length;f++)c=k[f],"."===c?(k.splice(f,1),--f):".."===c&&0!==f&&(1!==f||".."!==k[2])&&".."!==k[f-1]&&0<f&&(k.splice(f-1,2),f-=2);a=a.join("/")}if(b&&q&&(n||m)){k=a.split("/");f=k.length;a:for(;0<f;--f){d=k.slice(0,f).join("/");if(n)for(c=n.length;0<c;--c)if(b=e(q,n.slice(0,c).join("/")))if(b=e(b,d)){h=b;l=f;break a}!g&&m&&e(m,d)&&
(g=e(m,d),r=f)}!h&&g&&(h=g,l=r);h&&(k.splice(0,l,h),a=k.join("/"))}return(h=e(p.pkgs,a))?h:a}function d(a){E&&y(document.getElementsByTagName("script"),function(n){if(n.getAttribute("data-requiremodule")===a&&n.getAttribute("data-requirecontext")===l.contextName)return n.parentNode.removeChild(n),!0})}function m(a){var n=e(p.paths,a);if(n&&L(n)&&1<n.length)return n.shift(),l.require.undef(a),l.makeRequire(null,{skipMap:!0})([a]),!0}function r(a){var n,b=a?a.indexOf("!"):-1;-1<b&&(n=a.substring(0,
b),a=a.substring(b+1,a.length));return[n,a]}function q(a,n,b,h){var k,f,d=null,g=n?n.name:null,p=a,q=!0,m="";a||(q=!1,a="_@r"+(Q+=1));a=r(a);d=a[0];a=a[1];d&&(d=c(d,g,h),f=e(v,d));a&&(d?m=f&&f.normalize?f.normalize(a,function(a){return c(a,g,h)}):-1===a.indexOf("!")?c(a,g,h):a:(m=c(a,g,h),a=r(m),d=a[0],m=a[1],b=!0,k=l.nameToUrl(m)));b=!d||f||b?"":"_unnormalized"+(T+=1);return{prefix:d,name:m,parentMap:n,unnormalized:!!b,url:k,originalName:p,isDefine:q,id:(d?d+"!"+m:m)+b}}function u(a){var b=a.id,
c=e(t,b);c||(c=t[b]=new l.Module(a));return c}function w(a,b,c){var h=a.id,k=e(t,h);if(!x(v,h)||k&&!k.defineEmitComplete)if(k=u(a),k.error&&"error"===b)c(k.error);else k.on(b,c);else"defined"===b&&c(v[h])}function A(a,b){var c=a.requireModules,h=!1;if(b)b(a);else if(y(c,function(b){if(b=e(t,b))b.error=a,b.events.error&&(h=!0,b.emit("error",a))}),!h)g.onError(a)}function B(){V.length&&(y(V,function(a){var b=a[0];"string"===typeof b&&(l.defQueueMap[b]=!0);G.push(a)}),V=[])}function C(a){delete t[a];
delete Z[a]}function J(a,b,c){var h=a.map.id;a.error?a.emit("error",a.error):(b[h]=!0,y(a.depMaps,function(h,f){var d=h.id,g=e(t,d);!g||a.depMatched[f]||c[d]||(e(b,d)?(a.defineDep(f,v[d]),a.check()):J(g,b,c))}),c[h]=!0)}function H(){var a,b,c=(a=1E3*p.waitSeconds)&&l.startTime+a<(new Date).getTime(),h=[],k=[],f=!1,g=!0;if(!aa){aa=!0;D(Z,function(a){var l=a.map,e=l.id;if(a.enabled&&(l.isDefine||k.push(a),!a.error))if(!a.inited&&c)m(e)?f=b=!0:(h.push(e),d(e));else if(!a.inited&&a.fetched&&l.isDefine&&
(f=!0,!l.prefix))return g=!1});if(c&&h.length)return a=F("timeout","Load timeout for modules: "+h,null,h),a.contextName=l.contextName,A(a);g&&y(k,function(a){J(a,{},{})});c&&!b||!f||!E&&!ja||ba||(ba=setTimeout(function(){ba=0;H()},50));aa=!1}}function I(a){x(v,a[0])||u(q(a[0],null,!0)).init(a[1],a[2])}function O(a){a=a.currentTarget||a.srcElement;var b=l.onScriptLoad;a.detachEvent&&!ca?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=l.onScriptError;a.detachEvent&&!ca||a.removeEventListener("error",
b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function P(){var a;for(B();G.length;){a=G.shift();if(null===a[0])return A(F("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));I(a)}l.defQueueMap={}}var aa,da,l,R,ba,p={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},t={},Z={},ea={},G=[],v={},W={},fa={},Q=1,T=1;R={require:function(a){return a.require?a.require:a.require=l.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?
v[a.map.id]=a.exports:a.exports=v[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return e(p.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};da=function(a){this.events=e(ea,a.id)||{};this.map=a;this.shim=e(p.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};da.prototype={init:function(a,b,c,h){h=h||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&
(c=z(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=h.ignore;h.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,--this.depCount,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;l.startTime=(new Date).getTime();var a=this.map;if(this.shim)l.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],z(this,function(){return a.prefix?this.callPlugin():
this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;W[a]||(W[a]=!0,l.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var h=this.exports,k=this.factory;if(!this.inited)x(l.defQueueMap,c)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(K(k)){if(this.events.error&&this.map.isDefine||g.onError!==
ha)try{h=l.execCb(c,k,b,h)}catch(d){a=d}else h=l.execCb(c,k,b,h);this.map.isDefine&&void 0===h&&((b=this.module)?h=b.exports:this.usingExports&&(h=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",A(this.error=a)}else h=k;this.exports=h;if(this.map.isDefine&&!this.ignore&&(v[c]=h,g.onResourceLoad)){var f=[];y(this.depMaps,function(a){f.push(a.normalizedMap||a)});g.onResourceLoad(l,this.map,f)}C(c);
this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var a=this.map,b=a.id,d=q(a.prefix);this.depMaps.push(d);w(d,"defined",z(this,function(h){var k,f,d=e(fa,this.map.id),M=this.map.name,r=this.map.parentMap?this.map.parentMap.name:null,m=l.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(h.normalize&&(M=h.normalize(M,function(a){return c(a,r,!0)})||
""),f=q(a.prefix+"!"+M,this.map.parentMap),w(f,"defined",z(this,function(a){this.map.normalizedMap=f;this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),h=e(t,f.id)){this.depMaps.push(f);if(this.events.error)h.on("error",z(this,function(a){this.emit("error",a)}));h.enable()}}else d?(this.map.url=l.nameToUrl(d),this.load()):(k=z(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),k.error=z(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];D(t,function(a){0===
a.map.id.indexOf(b+"_unnormalized")&&C(a.map.id)});A(a)}),k.fromText=z(this,function(h,c){var d=a.name,f=q(d),M=S;c&&(h=c);M&&(S=!1);u(f);x(p.config,b)&&(p.config[d]=p.config[b]);try{g.exec(h)}catch(e){return A(F("fromtexteval","fromText eval for "+b+" failed: "+e,e,[b]))}M&&(S=!0);this.depMaps.push(f);l.completeLoad(d);m([d],k)}),h.load(a.name,m,k,p))}));l.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){Z[this.map.id]=this;this.enabling=this.enabled=!0;y(this.depMaps,z(this,function(a,
b){var c,h;if("string"===typeof a){a=q(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=e(R,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;w(a,"defined",z(this,function(a){this.undefed||(this.defineDep(b,a),this.check())}));this.errback?w(a,"error",z(this,this.errback)):this.events.error&&w(a,"error",z(this,function(a){this.emit("error",a)}))}c=a.id;h=t[c];x(R,c)||!h||h.enabled||l.enable(a,this)}));D(this.pluginMaps,z(this,function(a){var b=e(t,a.id);
b&&!b.enabled&&l.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){y(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};l={config:p,contextName:b,registry:t,defined:v,urlFetched:W,defQueue:G,defQueueMap:{},Module:da,makeModuleMap:q,nextTick:g.nextTick,onError:A,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");if("string"===typeof a.urlArgs){var b=
a.urlArgs;a.urlArgs=function(a,c){return(-1===c.indexOf("?")?"?":"&")+b}}var c=p.shim,h={paths:!0,bundles:!0,config:!0,map:!0};D(a,function(a,b){h[b]?(p[b]||(p[b]={}),Y(p[b],a,!0,!0)):p[b]=a});a.bundles&&D(a.bundles,function(a,b){y(a,function(a){a!==b&&(fa[a]=b)})});a.shim&&(D(a.shim,function(a,b){L(a)&&(a={deps:a});!a.exports&&!a.init||a.exportsFn||(a.exportsFn=l.makeShimExports(a));c[b]=a}),p.shim=c);a.packages&&y(a.packages,function(a){var b;a="string"===typeof a?{name:a}:a;b=a.name;a.location&&
(p.paths[b]=a.location);p.pkgs[b]=a.name+"/"+(a.main||"main").replace(na,"").replace(U,"")});D(t,function(a,b){a.inited||a.map.unnormalized||(a.map=q(b,null,!0))});(a.deps||a.callback)&&l.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ga,arguments));return b||a.exports&&ia(a.exports)}},makeRequire:function(a,n){function m(c,d,f){var e,r;n.enableBuildCallback&&d&&K(d)&&(d.__requireJsBuild=!0);if("string"===typeof c){if(K(d))return A(F("requireargs",
"Invalid require call"),f);if(a&&x(R,c))return R[c](t[a.id]);if(g.get)return g.get(l,c,a,m);e=q(c,a,!1,!0);e=e.id;return x(v,e)?v[e]:A(F("notloaded",'Module name "'+e+'" has not been loaded yet for context: '+b+(a?"":". Use require([])")))}P();l.nextTick(function(){P();r=u(q(null,a));r.skipMap=n.skipMap;r.init(c,d,f,{enabled:!0});H()});return m}n=n||{};Y(m,{isBrowser:E,toUrl:function(b){var d,f=b.lastIndexOf("."),g=b.split("/")[0];-1!==f&&("."!==g&&".."!==g||1<f)&&(d=b.substring(f,b.length),b=b.substring(0,
f));return l.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return x(v,q(b,a,!1,!0).id)},specified:function(b){b=q(b,a,!1,!0).id;return x(v,b)||x(t,b)}});a||(m.undef=function(b){B();var c=q(b,a,!0),f=e(t,b);f.undefed=!0;d(b);delete v[b];delete W[c.url];delete ea[b];X(G,function(a,c){a[0]===b&&G.splice(c,1)});delete l.defQueueMap[b];f&&(f.events.defined&&(ea[b]=f.events),C(b))});return m},enable:function(a){e(t,a.id)&&u(a).enable()},completeLoad:function(a){var b,c,d=e(p.shim,a)||{},g=d.exports;
for(B();G.length;){c=G.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);I(c)}l.defQueueMap={};c=e(t,a);if(!b&&!x(v,a)&&c&&!c.inited)if(!p.enforceDefine||g&&ia(g))I([a,d.deps||[],d.exportsFn]);else return m(a)?void 0:A(F("nodefine","No define call for "+a,null,[a]));H()},nameToUrl:function(a,b,c){var d,k,f,m;(d=e(p.pkgs,a))&&(a=d);if(d=e(fa,a))return l.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=a+(b||"");else{d=p.paths;k=a.split("/");for(f=k.length;0<f;--f)if(m=k.slice(0,f).join("/"),
m=e(d,m)){L(m)&&(m=m[0]);k.splice(0,f,m);break}d=k.join("/");d+=b||(/^data\:|^blob\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":p.baseUrl)+d}return p.urlArgs&&!/^blob\:/.test(d)?d+p.urlArgs(a,d):d},load:function(a,b){g.load(l,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||oa.test((a.currentTarget||a.srcElement).readyState))N=null,a=O(a),l.completeLoad(a.id)},onScriptError:function(a){var b=O(a);if(!m(b.id)){var c=[];
D(t,function(a,d){0!==d.indexOf("_@r")&&y(a.depMaps,function(a){if(a.id===b.id)return c.push(d),!0})});return A(F("scripterror",'Script error for "'+b.id+(c.length?'", needed by: '+c.join(", "):'"'),a,[b.id]))}}};l.require=l.makeRequire();return l}function pa(){if(N&&"interactive"===N.readyState)return N;X(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b});return N}var g,B,C,H,O,I,N,P,u,T,qa=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ra=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
U=/\.js$/,na=/^\.\//;B=Object.prototype;var Q=B.toString,la=B.hasOwnProperty,E=!("undefined"===typeof window||"undefined"===typeof navigator||!window.document),ja=!E&&"undefined"!==typeof importScripts,oa=E&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,ca="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),J={},w={},V=[],S=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(K(requirejs))return;w=requirejs;requirejs=void 0}"undefined"===typeof require||
K(require)||(w=require,require=void 0);g=requirejs=function(b,c,d,m){var r,q="_";L(b)||"string"===typeof b||(r=b,L(c)?(b=c,c=d,d=m):b=[]);r&&r.context&&(q=r.context);(m=e(J,q))||(m=J[q]=g.s.newContext(q));r&&m.configure(r);return m.require(b,c,d)};g.config=function(b){return g(b)};g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.2.0";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=E;B=g.s={contexts:J,newContext:ma};g({});y(["toUrl",
"undef","defined","specified"],function(b){g[b]=function(){var c=J._;return c.require[b].apply(c,arguments)}});E&&(C=B.head=document.getElementsByTagName("head")[0],H=document.getElementsByTagName("base")[0])&&(C=B.head=H.parentNode);g.onError=ha;g.createNode=function(b,c,d){c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var m=b&&b.config||
{},e;if(E){e=g.createNode(m,c,d);e.setAttribute("data-requirecontext",b.contextName);e.setAttribute("data-requiremodule",c);!e.attachEvent||e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code")||ca?(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)):(S=!0,e.attachEvent("onreadystatechange",b.onScriptLoad));e.src=d;if(m.onNodeCreated)m.onNodeCreated(e,m,c,d);P=e;H?C.insertBefore(e,H):C.appendChild(e);P=null;return e}if(ja)try{setTimeout(function(){},
0),importScripts(d),b.completeLoad(c)}catch(q){b.onError(F("importscripts","importScripts failed for "+c+" at "+d,q,[c]))}};E&&!w.skipDataMain&&X(document.getElementsByTagName("script"),function(b){C||(C=b.parentNode);if(O=b.getAttribute("data-main"))return u=O,w.baseUrl||-1!==u.indexOf("!")||(I=u.split("/"),u=I.pop(),T=I.length?I.join("/")+"/":"./",w.baseUrl=T),u=u.replace(U,""),g.jsExtRegExp.test(u)&&(u=O),w.deps=w.deps?w.deps.concat(u):[u],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&
(d=c,c=b,b=null);L(c)||(d=c,c=null);!c&&K(d)&&(c=[],d.length&&(d.toString().replace(qa,ka).replace(ra,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));S&&(e=P||pa())&&(b||(b=e.getAttribute("data-requiremodule")),g=J[e.getAttribute("data-requirecontext")]);g?(g.defQueue.push([b,c,d]),g.defQueueMap[b]=!0):V.push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(w)}})(this);

2
public/js/v1.2.4/app.js Normal file
View File

@@ -0,0 +1,2 @@
var mainScriptPath=document.body.getAttribute("data-script"),jsBaseUrl=document.body.getAttribute("data-js-path");requirejs.config({baseUrl:"js",paths:{layout:"layout",config:"app/config",dialog:"app/ui/dialog",templates:"../../templates",img:"../../img",login:"./app/login",mappage:"./app/mappage",setup:"./app/setup",admin:"./app/admin",notification:"./app/notification",jquery:"lib/jquery-3.1.1.min",bootstrap:"lib/bootstrap.min",text:"lib/requirejs/text",mustache:"lib/mustache.min",localForage:"lib/localforage.min",velocity:"lib/velocity.min",velocityUI:"lib/velocity.ui.min",slidebars:"lib/slidebars",jsPlumb:"lib/dom.jsPlumb-1.7.6",farahey:"lib/farahey-0.5",customScrollbar:"lib/jquery.mCustomScrollbar.min",mousewheel:"lib/jquery.mousewheel.min",xEditable:"lib/bootstrap-editable.min",morris:"lib/morris.min",raphael:"lib/raphael-min",bootbox:"lib/bootbox.min",easyPieChart:"lib/jquery.easypiechart.min",peityInlineChart:"lib/jquery.peity.min",dragToSelect:"lib/jquery.dragToSelect",hoverIntent:"lib/jquery.hoverIntent.minified",fullScreen:"lib/jquery.fullscreen.min",select2:"lib/select2.min",validator:"lib/validator.min",lazylinepainter:"lib/jquery.lazylinepainter-1.5.1.min",blueImpGallery:"lib/blueimp-gallery",blueImpGalleryHelper:"lib/blueimp-helper",blueImpGalleryBootstrap:"lib/bootstrap-image-gallery",bootstrapConfirmation:"lib/bootstrap-confirmation",bootstrapToggle:"lib/bootstrap2-toggle.min",lazyload:"lib/jquery.lazyload.min",easePack:"lib/EasePack.min",tweenLite:"lib/TweenLite.min","datatables.net":"lib/datatables/DataTables-1.10.12/js/jquery.dataTables.min","datatables.net-buttons":"lib/datatables/Buttons-1.2.1/js/dataTables.buttons.min","datatables.net-buttons-html":"lib/datatables/Buttons-1.2.1/js/buttons.html5.min","datatables.net-responsive":"lib/datatables/Responsive-2.1.0/js/dataTables.responsive.min","datatables.net-select":"lib/datatables/Select-1.2.0/js/dataTables.select.min",pnotify:"lib/pnotify/pnotify","pnotify.buttons":"lib/pnotify/pnotify.buttons","pnotify.confirm":"lib/pnotify/pnotify.confirm","pnotify.nonblock":"lib/pnotify/pnotify.nonblock","pnotify.desktop":"lib/pnotify/pnotify.desktop","pnotify.history":"lib/pnotify/pnotify.history","pnotify.callbacks":"lib/pnotify/pnotify.callbacks","pnotify.reference":"lib/pnotify/pnotify.reference"},shim:{bootstrap:{deps:["jquery"]},farahey:{deps:["jsPlumb"]},velocity:{deps:["jquery"]},velocityUI:{deps:["velocity"]},slidebars:{deps:["jquery"]},customScrollbar:{deps:["jquery","mousewheel"]},"datatables.net":{deps:["jquery"]},"datatables.net-buttons":{deps:["datatables.net"]},"datatables.net-buttons-html":{deps:["datatables.net-buttons"]},"datatables.net-responsive":{deps:["datatables.net"]},"datatables.net-select":{deps:["datatables.net"]},xEditable:{deps:["bootstrap"]},bootbox:{deps:["jquery","bootstrap"],exports:"bootbox"},morris:{deps:["jquery","raphael"],exports:"Morris"},pnotify:{deps:["jquery"]},easyPieChart:{deps:["jquery"]},peityInlineChart:{deps:["jquery"]},dragToSelect:{deps:["jquery"]},hoverIntent:{deps:["jquery"]},fullScreen:{deps:["jquery"]},select2:{deps:["jquery"],exports:"Select2"},validator:{deps:["jquery","bootstrap"]},lazylinepainter:{deps:["jquery","bootstrap"]},blueImpGallery:{deps:["jquery"]},bootstrapConfirmation:{deps:["bootstrap"]},bootstrapToggle:{deps:["jquery"]},lazyload:{deps:["jquery"]}}}),require.config({baseUrl:jsBaseUrl}),requirejs([mainScriptPath]);
//# sourceMappingURL=app.js.map

BIN
public/js/v1.2.4/app.js.br Normal file

Binary file not shown.

View File

@@ -0,0 +1 @@
{"version":3,"sources":["app.js"],"names":["mainScriptPath","document","body","getAttribute","jsBaseUrl","requirejs","config","baseUrl","paths","layout","dialog","templates","img","login","mappage","setup","admin","notification","jquery","bootstrap","text","mustache","localForage","velocity","velocityUI","slidebars","jsPlumb","farahey","customScrollbar","mousewheel","xEditable","morris","raphael","bootbox","easyPieChart","peityInlineChart","dragToSelect","hoverIntent","fullScreen","select2","validator","lazylinepainter","blueImpGallery","blueImpGalleryHelper","blueImpGalleryBootstrap","bootstrapConfirmation","bootstrapToggle","lazyload","easePack","tweenLite","datatables.net","datatables.net-buttons","datatables.net-buttons-html","datatables.net-responsive","datatables.net-select","pnotify","pnotify.buttons","pnotify.confirm","pnotify.nonblock","pnotify.desktop","pnotify.history","pnotify.callbacks","pnotify.reference","shim","deps","exports","require"],"mappings":"AACA,IAAIA,eAAiBC,SAASC,KAAKC,aAAa,eAI5CC,UAAYH,SAASC,KAAKC,aAAa,gBAG3CE,UAAUC,QACNC,QAAS,KAETC,OACIC,OAAQ,SACRH,OAAQ,aACRI,OAAQ,gBACRC,UAAW,kBACXC,IAAK,YAGLC,MAAO,cACPC,QAAS,gBACTC,MAAO,cACPC,MAAO,cACPC,aAAc,qBAEdC,OAAQ,uBACRC,UAAW,oBACXC,KAAM,qBACNC,SAAU,mBACVC,YAAa,sBACbC,SAAU,mBACVC,WAAY,sBACZC,UAAW,gBACXC,QAAS,wBACTC,QAAS,kBACTC,gBAAiB,kCACjBC,WAAY,4BACZC,UAAW,6BACXC,OAAQ,iBACRC,QAAS,kBACTC,QAAS,kBACTC,aAAc,8BACdC,iBAAkB,uBAClBC,aAAc,0BACdC,YAAa,kCACbC,WAAY,4BACZC,QAAS,kBACTC,UAAW,oBACXC,gBAAiB,uCACjBC,eAAgB,sBAChBC,qBAAsB,qBACtBC,wBAAyB,8BACzBC,sBAAuB,6BACvBC,gBAAiB,4BACjBC,SAAU,0BAGVC,SAAU,mBACVC,UAAW,oBAGXC,iBAAkB,6DAClBC,yBAA0B,yDAC1BC,8BAA+B,oDAC/BC,4BAA6B,+DAC7BC,wBAAyB,uDAGzBC,QAAS,sBACTC,kBAAmB,8BACnBC,kBAAmB,8BACnBC,mBAAoB,+BACpBC,kBAAmB,8BACnBC,kBAAmB,8BACnBC,oBAAqB,gCACrBC,oBAAqB,iCAEzBC,MACI5C,WACI6C,MAAO,WAEXrC,SACIqC,MAAO,YAEXzC,UACIyC,MAAO,WAEXxC,YACIwC,MAAO,aAEXvC,WACIuC,MAAO,WAEXpC,iBACIoC,MAAO,SAAU,eAErBd,kBACIc,MAAO,WAEXb,0BACIa,MAAO,mBAEXZ,+BACIY,MAAO,2BAEXX,6BACIW,MAAO,mBAEXV,yBACIU,MAAO,mBAEXlC,WACIkC,MAAO,cAEX/B,SACI+B,MAAO,SAAU,aACjBC,QAAS,WAEblC,QACIiC,MAAO,SAAU,WACjBC,QAAS,UAEbV,SACIS,MAAQ,WAEZ9B,cACI8B,MAAQ,WAEZ7B,kBACI6B,MAAQ,WAEZ5B,cACI4B,MAAQ,WAEZ3B,aACI2B,MAAQ,WAEZ1B,YACI0B,MAAQ,WAEZzB,SACIyB,MAAQ,UACRC,QAAS,WAEbzB,WACIwB,MAAQ,SAAU,cAEtBvB,iBACIuB,MAAQ,SAAU,cAEtBtB,gBACIsB,MAAQ,WAEZnB,uBACImB,MAAQ,cAEZlB,iBACIkB,MAAQ,WAEZjB,UACIiB,MAAQ,cAQpBE,QAAQ5D,QACJC,QAASH,YAIbC,WAAYL","file":"app.js","sourceRoot":"/js"}

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
"use strict";let window={};self.importScripts(self.name);let MsgWorker=window.MsgWorker,socket=null,ports=[],characterPorts=[],initSocket=e=>{let t=new MsgWorker("ws:open");null===socket?((socket=new WebSocket(e)).onopen=(e=>{t.meta({readyState:socket.readyState}),sendToCurrentPort(t)}),socket.onmessage=(e=>{let t=JSON.parse(e.data),r=new MsgWorker("ws:send");r.task(t.task),r.meta({readyState:this.readyState,characterIds:t.characterIds}),r.data(t.load),broadcastPorts(r)}),socket.onclose=(e=>{let t=new MsgWorker("ws:closed");t.meta({readyState:socket.readyState,code:e.code,reason:e.reason,wasClean:e.wasClean}),broadcastPorts(t),socket=null}),socket.onerror=(e=>{let t=new MsgWorker("ws:error");t.meta({readyState:socket.readyState}),sendToCurrentPort(t)})):(t.meta({readyState:socket.readyState}),sendToCurrentPort(t))},sendToCurrentPort=e=>{ports[ports.length-1].postMessage(e)},broadcastPorts=e=>{let t=ports,r=e.meta();r&&r.characterIds&&"undefined"!==r.characterIds&&r.characterIds instanceof Array&&(t=getPortsByCharacterIds(r.characterIds));for(let r=0;r<t.length;r++)t[r].postMessage(e)},addPort=(e,t)=>{(t=parseInt(t))>0?characterPorts.push({characterId:t,port:e}):ports.push(e)},getPortsByCharacterIds=e=>{let t=[];for(let r=0;r<characterPorts.length;r++)for(let a=0;a<e.length;a++)characterPorts[r].characterId===e[a]&&t.push(characterPorts[r].port);return t};self.addEventListener("connect",e=>{let t=e.ports[0];addPort(t),t.addEventListener("message",e=>{let r=e.data;switch(Object.setPrototypeOf(r,MsgWorker.prototype),r.command){case"ws:init":let e=r.data();addPort(t,e.characterId),initSocket(e.uri);break;case"ws:send":let a={task:r.task(),load:r.data()};socket.send(JSON.stringify(a))}},!1),t.start()},!1);
//# sourceMappingURL=map.js.map

Binary file not shown.

View File

@@ -0,0 +1 @@
{"version":3,"sources":["app/worker/map.js"],"names":["window","self","importScripts","name","MsgWorker","socket","ports","characterPorts","initSocket","uri","MsgWorkerOpen","WebSocket","onopen","e","meta","readyState","sendToCurrentPort","onmessage","response","JSON","parse","data","MsgWorkerSend","task","this","characterIds","load","broadcastPorts","onclose","closeEvent","MsgWorkerClosed","code","reason","wasClean","onerror","MsgWorkerError","length","postMessage","sentToPorts","Array","getPortsByCharacterIds","i","addPort","port","characterId","parseInt","push","j","addEventListener","event","MsgWorkerMessage","Object","setPrototypeOf","prototype","command","MsgSocket","send","stringify","start"],"mappings":"AAAA,aAGA,IAAIA,UAGJC,KAAKC,cAAeD,KAAKE,MAEzB,IAAIC,UAAYJ,OAAOI,UACnBC,OAAS,KACTC,SACAC,kBAGAC,WAAcC,IACd,IAAIC,EAAgB,IAAIN,UAAU,WAEpB,OAAXC,SACCA,OAAS,IAAIM,UAAUF,IAGhBG,OAAS,CAACC,IACbH,EAAcI,MACVC,WAAYV,OAAOU,aAGvBC,kBAAkBN,KAItBL,OAAOY,UAAY,CAACJ,IAChB,IAAIK,EAAWC,KAAKC,MAAMP,EAAEQ,MAExBC,EAAgB,IAAIlB,UAAU,WAClCkB,EAAcC,KAAML,EAASK,MAC7BD,EAAcR,MACVC,WAAYS,KAAKT,WACjBU,aAAcP,EAASO,eAE3BH,EAAcD,KAAMH,EAASQ,MAE7BC,eAAeL,KAInBjB,OAAOuB,QAAU,CAACC,IACd,IAAIC,EAAkB,IAAI1B,UAAU,aACpC0B,EAAgBhB,MACZC,WAAYV,OAAOU,WACnBgB,KAAMF,EAAWE,KACjBC,OAAQH,EAAWG,OACnBC,SAAUJ,EAAWI,WAGzBN,eAAeG,GACfzB,OAAS,OAIbA,OAAO6B,QAAU,CAACrB,IACd,IAAIsB,EAAiB,IAAI/B,UAAU,YACnC+B,EAAerB,MACXC,WAAYV,OAAOU,aAGvBC,kBAAkBmB,OAItBzB,EAAcI,MACVC,WAAYV,OAAOU,aAEvBC,kBAAkBN,KAKtBM,kBAAqBU,IACrBpB,MAAMA,MAAM8B,OAAS,GAAGC,YAAYX,IAGpCC,eAAkBD,IAElB,IAAIY,EAAchC,MAGdQ,EAAOY,EAAKZ,OAEZA,GACAA,EAAKW,cACiB,cAAtBX,EAAKW,cACLX,EAAKW,wBAAwBc,QAG7BD,EAAcE,uBAAuB1B,EAAKW,eAG9C,IAAK,IAAIgB,EAAI,EAAGA,EAAIH,EAAYF,OAAQK,IACpCH,EAAYG,GAAGJ,YAAYX,IAK/BgB,QAAU,CAACC,EAAMC,MACjBA,EAAcC,SAASD,IAEN,EACbrC,eAAeuC,MACXF,YAAaA,EACbD,KAAMA,IAGVrC,MAAMwC,KAAKH,IAIfH,uBAA0Bf,IAC1B,IAAInB,KAEJ,IAAI,IAAImC,EAAI,EAAGA,EAAIlC,eAAe6B,OAAQK,IACtC,IAAI,IAAIM,EAAI,EAAGA,EAAItB,EAAaW,OAAQW,IACjCxC,eAAekC,GAAGG,cAAgBnB,EAAasB,IAC9CzC,EAAMwC,KAAKvC,eAAekC,GAAGE,MAKzC,OAAOrC,GAIXL,KAAK+C,iBAAiB,UAAYC,IAC9B,IAAIN,EAAOM,EAAM3C,MAAM,GACvBoC,QAAQC,GAERA,EAAKK,iBAAiB,UAAYnC,IAC9B,IAAIqC,EAAmBrC,EAAEQ,KAGzB,OAFA8B,OAAOC,eAAeF,EAAkB9C,UAAUiD,WAE3CH,EAAiBI,SACpB,IAAK,UACD,IAAIjC,EAAO6B,EAAiB7B,OAE5BqB,QAAQC,EAAMtB,EAAKuB,aACnBpC,WAAWa,EAAKZ,KAChB,MACJ,IAAK,UACD,IAAI8C,GACAhC,KAAM2B,EAAiB3B,OACvBG,KAAMwB,EAAiB7B,QAG3BhB,OAAOmD,KAAKrC,KAAKsC,UAAUF,OAMpC,GAEHZ,EAAKe,UACN","file":"map.js","sourceRoot":"/js"}

View File

@@ -0,0 +1,2 @@
window.MsgWorker=class{constructor(s){this.cmd=s,this.msgTask="",this.msgMeta=null,this.msgBody=null}get command(){return this.cmd}task(s){return s&&(this.msgTask=s),this.msgTask}meta(s){return s&&(this.msgMeta=s),this.msgMeta}data(s){return s&&(this.msgBody=s),this.msgBody}};
//# sourceMappingURL=message.js.map

Binary file not shown.

View File

@@ -0,0 +1 @@
{"version":3,"sources":["app/worker/message.js"],"names":["window","MsgWorker","[object Object]","cmd","this","msgTask","msgMeta","msgBody","command","task","metaData","data"],"mappings":"AAAAA,OAAOC,gBAEHC,YAAYC,GAIRC,KAAKD,IAAMA,EAMXC,KAAKC,QAAU,GAMfD,KAAKE,QAAU,KAMfF,KAAKG,QAAU,KAGnBC,cACI,OAAOJ,KAAKD,IAGhBD,KAAKO,GAKD,OAJGA,IACCL,KAAKC,QAAUI,GAGZL,KAAKC,QAGhBH,KAAKQ,GAKD,OAJGA,IACCN,KAAKE,QAAUI,GAGZN,KAAKE,QAGhBJ,KAAKS,GAKD,OAJGA,IACCP,KAAKG,QAAUI,GAGZP,KAAKG","file":"message.js","sourceRoot":"/js"}

View File

@@ -0,0 +1,2 @@
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","blueImpGallery"],t):t(window.jQuery,window.blueimp.Gallery)}(function(t,o){"use strict";t.extend(o.prototype.options,{useBootstrapModal:!0});var e=o.prototype.close,n=o.prototype.imageFactory,i=o.prototype.videoFactory,r=o.prototype.textFactory;t.extend(o.prototype,{modalFactory:function(o,e,n,i){if(!this.options.useBootstrapModal||n)return i.call(this,o,e,n);var r=this,a=t(this.container).children(".modal").clone().css("display","block").on("click",function(t){t.target!==a[0]&&t.target!==a.children()[0]||(t.preventDefault(),t.stopPropagation(),r.close())}),c=i.call(this,o,function(t){e({type:t.type,target:a[0]}),a.addClass("in")},n);return a.find(".modal-title").text(c.title||String.fromCharCode(160)),a.find(".modal-body").append(c),a[0]},imageFactory:function(t,o,e){return this.modalFactory(t,o,e,n)},videoFactory:function(t,o,e){return this.modalFactory(t,o,e,i)},textFactory:function(t,o,e){return this.modalFactory(t,o,e,r)},close:function(){this.container.find(".modal").removeClass("in"),e.call(this)}})});
//# sourceMappingURL=bootstrap-image-gallery.js.map

Binary file not shown.

View File

@@ -0,0 +1 @@
{"version":3,"sources":["lib/bootstrap-image-gallery.js"],"names":["factory","define","amd","window","jQuery","blueimp","Gallery","$","extend","prototype","options","useBootstrapModal","close","imageFactory","videoFactory","textFactory","modalFactory","obj","callback","factoryInterface","this","call","that","modal","container","children","clone","css","on","event","target","preventDefault","stopPropagation","element","type","addClass","find","text","title","String","fromCharCode","append","removeClass"],"mappings":"CAaE,SAAUA,GACR,aACsB,mBAAXC,QAAyBA,OAAOC,IACvCD,QACI,SACA,kBACDD,GAEHA,EACIG,OAAOC,OACPD,OAAOE,QAAQC,UAGzB,SAAUC,EAAGD,GACX,aAEAC,EAAEC,OAAOF,EAAQG,UAAUC,SACvBC,mBAAmB,IAGvB,IAAIC,EAAQN,EAAQG,UAAUG,MAC1BC,EAAeP,EAAQG,UAAUI,aACjCC,EAAeR,EAAQG,UAAUK,aACjCC,EAAcT,EAAQG,UAAUM,YAEpCR,EAAEC,OAAOF,EAAQG,WACbO,aAAc,SAAUC,EAAKC,EAAUC,EAAkBnB,GACrD,IAAKoB,KAAKV,QAAQC,mBAAqBQ,EACnC,OAAOnB,EAAQqB,KAAKD,KAAMH,EAAKC,EAAUC,GAE7C,IAAIG,EAAOF,KAEPG,EADgBhB,EAAEa,KAAKI,WAAWC,SAAS,UACrBC,QAAQC,IAAI,UAAW,SAASC,GAAG,QAAS,SAAUC,GAGxEA,EAAMC,SAAWP,EAAM,IACvBM,EAAMC,SAAWP,EAAME,WAAW,KAClCI,EAAME,iBACNF,EAAMG,kBACNV,EAAKV,WAGTqB,EAAUjC,EAAQqB,KAAKD,KAAMH,EAAK,SAAUY,GAC5CX,GACIgB,KAAML,EAAMK,KACZJ,OAAQP,EAAM,KAElBA,EAAMY,SAAS,OAChBhB,GAIH,OAHAI,EAAMa,KAAK,gBAAgBC,KAAKJ,EAAQK,OAASC,OAAOC,aAAa,MACrEjB,EAAMa,KAAK,eAAeK,OAAOR,GAE1BV,EAAM,IAGjBV,aAAc,SAAUI,EAAKC,EAAUC,GACnC,OAAOC,KAAKJ,aAAaC,EAAKC,EAAUC,EAAkBN,IAG9DC,aAAc,SAAUG,EAAKC,EAAUC,GACnC,OAAOC,KAAKJ,aAAaC,EAAKC,EAAUC,EAAkBL,IAG9DC,YAAa,SAAUE,EAAKC,EAAUC,GAClC,OAAOC,KAAKJ,aAAaC,EAAKC,EAAUC,EAAkBJ,IAG9DH,MAAO,WACHQ,KAAKI,UAAUY,KAAK,UAAUM,YAAY,MAC1C9B,EAAMS,KAAKD","file":"bootstrap-image-gallery.js","sourceRoot":"/js"}

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
!function(t,i,e,n){var r=t.fn.peity=function(i,e){return l&&this.each(function(){var n=t(this),h=n.data("_peity");h?(i&&(h.type=i),t.extend(h.opts,e)):(h=new a(n,i,t.extend({},r.defaults[i],n.data("peity"),e)),n.change(function(){h.draw()}).data("_peity",h)),h.draw()}),this},a=function(t,i,e){this.$el=t,this.type=i,this.opts=e},h=a.prototype,s=h.svgElement=function(e,n){return t(i.createElementNS("http://www.w3.org/2000/svg",e)).attr(n)},l="createElementNS"in i&&s("svg",{})[0].createSVGRect;h.draw=function(){var t=this.opts;r.graphers[this.type].call(this,t),t.after&&t.after.call(this,t)},h.fill=function(){var i=this.opts.fill;return t.isFunction(i)?i:function(t,e){return i[e%i.length]}},h.prepare=function(t,i){return this.$svg||this.$el.hide().after(this.$svg=s("svg",{class:"peity"})),this.$svg.empty().data("peity",this).attr({height:i,width:t})},h.values=function(){return t.map(this.$el.text().split(this.opts.delimiter),function(t){return parseFloat(t)})},r.defaults={},r.graphers={},r.register=function(t,i,e){this.defaults[t]=i,this.graphers[t]=e},r.register("pie",{fill:["#ff9900","#fff4dd","#ffc66e"],radius:8},function(i){if(!i.delimiter){r=this.$el.text().match(/[^0-9\.]/);i.delimiter=r?r[0]:","}if(r=t.map(this.values(),function(t){return 0<t?t:0}),"/"==i.delimiter)var n=r[0],r=[n,e.max(0,r[1]-n)];for(var a=0,n=r.length,h=0;a<n;a++)h+=r[a];h||(n=2,h=1,r=[0,1]);var l=2*i.radius,p=(a=(l=this.prepare(i.width||l,i.height||l)).width())/2,o=(f=l.height())/2,f=e.min(p,o),i=i.innerRadius;"donut"==this.type&&!i&&(i=.5*f);for(var c=e.PI,u=this.fill(),d=this.scale=function(t,i){var n=t/h*c*2-c/2;return[i*e.cos(n)+p,i*e.sin(n)+o]},g=0,a=0;a<n;a++){var m=r[a];if(0!=(v=m/h)){if(1==v)if(i)var v=p-.01,y=o-f,w=o-i,v=s("path",{d:["M",p,y,"A",f,f,0,1,1,v,y,"L",v,w,"A",i,i,0,1,0,p,w].join(" ")});else v=s("circle",{cx:p,cy:o,r:f});else y=g+m,w=["M"].concat(d(g,f),"A",f,f,0,.5<v?1:0,1,d(y,f),"L"),i?w=w.concat(d(y,i),"A",i,i,0,.5<v?1:0,0,d(g,i)):w.push(p,o),g+=m,v=s("path",{d:w.join(" ")});v.attr("fill",u.call(this,m,a,r)),l.append(v)}}}),r.register("donut",t.extend(!0,{},r.defaults.pie),function(t){r.graphers.pie.call(this,t)}),r.register("line",{delimiter:",",fill:"#c6d9fd",height:16,min:0,stroke:"#4d89f9",strokeWidth:1,width:32},function(t){var i=this.values();1==i.length&&i.push(i[0]);for(var r=e.max.apply(e,t.max==n?i:i.concat(t.max)),a=e.min.apply(e,t.min==n?i:i.concat(t.min)),h=this.prepare(t.width,t.height),l=t.strokeWidth,p=h.width(),o=h.height()-l,f=r-a,r=this.x=function(t){return t*(p/(i.length-1))},c=this.y=function(t){var i=o;return f&&(i-=(t-a)/f*o),i+l/2},u=c(e.max(a,0)),d=[0,u],g=0;g<i.length;g++)d.push(r(g),c(i[g]));d.push(p,u),t.fill&&h.append(s("polygon",{fill:t.fill,points:d.join(" ")})),l&&h.append(s("polyline",{fill:"none",points:d.slice(2,d.length-2).join(" "),stroke:t.stroke,"stroke-width":l,"stroke-linecap":"square"}))}),r.register("bar",{delimiter:",",fill:["#4D89F9"],height:16,min:0,padding:.1,width:32},function(t){for(var i=this.values(),r=e.max.apply(e,t.max==n?i:i.concat(t.max)),a=e.min.apply(e,t.min==n?i:i.concat(t.min)),h=this.prepare(t.width,t.height),l=h.width(),p=h.height(),o=r-a,t=t.padding,f=this.fill(),c=this.x=function(t){return t*l/i.length},u=this.y=function(t){return p-(o?(t-a)/o*p:1)},d=0;d<i.length;d++){var g,m=c(d+t),v=c(d+1-t)-m,y=i[d],w=u(y),x=w;o?0>y?x=u(e.min(r,0)):w=u(e.max(a,0)):g=1,0==(g=w-x)&&(g=1,0<r&&o&&x--),h.append(s("rect",{fill:f.call(this,y,d,i),x:m,y:x,width:v,height:g}))}})}(jQuery,document,Math);
//# sourceMappingURL=jquery.peity.min.js.map

Some files were not shown because too many files have changed in this diff Show More