diff --git a/conf/nginx/awesome b/conf/nginx/awesome new file mode 100644 index 0000000..1f569f3 --- /dev/null +++ b/conf/nginx/awesome @@ -0,0 +1,33 @@ +server { + listen 80; + + root /srv/awesome/www; + access_log /srv/awesome/log/access_log; + error_log /srv/awesome/log/error_log; + + # server_name awesome.liaoxuefeng.com; + + client_max_body_size 1m; + + gzip on; + gzip_min_length 1024; + gzip_buffers 4 8k; + gzip_types text/css application/x-javascript application/json; + + sendfile on; + + location /favicon.ico { + root /srv/awesome/www; + } + + location ~ ^\/static\/.*$ { + root /srv/awesome/www; + } + + location / { + proxy_pass http://127.0.0.1:9000; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } +} diff --git a/conf/supervisor/awesome.conf b/conf/supervisor/awesome.conf new file mode 100644 index 0000000..e050784 --- /dev/null +++ b/conf/supervisor/awesome.conf @@ -0,0 +1,11 @@ +[program:awesome] + +command = /usr/bin/gunicorn --bind 127.0.0.1:9000 --workers 1 --worker-class gevent wsgiapp:application +directory = /srv/awesome/www +user = www-data +startsecs = 3 + +redirect_stderr = true +stdout_logfile_maxbytes = 50MB +stdout_logfile_backups = 10 +stdout_logfile = /srv/awesome/log/app.log diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..e2cecd0 --- /dev/null +++ b/fabfile.py @@ -0,0 +1,169 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +''' +Deployment toolkit. +''' + +import os, re + +from datetime import datetime +from fabric.api import * + +env.user = 'michael' +env.sudo_user = 'root' +env.hosts = ['192.168.0.3'] + +db_user = 'www-data' +db_password = 'www-data' + +_TAR_FILE = 'dist-awesome.tar.gz' + +_REMOTE_TMP_TAR = '/tmp/%s' % _TAR_FILE + +_REMOTE_BASE_DIR = '/srv/awesome' + +def _current_path(): + return os.path.abspath('.') + +def _now(): + return datetime.now().strftime('%y-%m-%d_%H.%M.%S') + +def backup(): + ''' + Dump entire database on server and backup to local. + ''' + dt = _now() + f = 'backup-awesome-%s.sql' % dt + with cd('/tmp'): + run('mysqldump --user=%s --password=%s --skip-opt --add-drop-table --default-character-set=utf8 --quick awesome > %s' % (db_user, db_password, f)) + run('tar -czvf %s.tar.gz %s' % (f, f)) + get('%s.tar.gz' % f, '%s/backup/' % _current_path()) + run('rm -f %s' % f) + run('rm -f %s.tar.gz' % f) + +def build(): + ''' + Build dist package. + ''' + includes = ['static', 'templates', 'transwarp', 'favicon.ico', '*.py'] + excludes = ['test', '.*', '*.pyc', '*.pyo'] + local('rm -f dist/%s' % _TAR_FILE) + with lcd(os.path.join(_current_path(), 'www')): + cmd = ['tar', '--dereference', '-czvf', '../dist/%s' % _TAR_FILE] + cmd.extend(['--exclude=\'%s\'' % ex for ex in excludes]) + cmd.extend(includes) + local(' '.join(cmd)) + +def deploy(): + newdir = 'www-%s' % _now() + run('rm -f %s' % _REMOTE_TMP_TAR) + put('dist/%s' % _TAR_FILE, _REMOTE_TMP_TAR) + with cd(_REMOTE_BASE_DIR): + sudo('mkdir %s' % newdir) + with cd('%s/%s' % (_REMOTE_BASE_DIR, newdir)): + sudo('tar -xzvf %s' % _REMOTE_TMP_TAR) + with cd(_REMOTE_BASE_DIR): + sudo('rm -f www') + sudo('ln -s %s www' % newdir) + sudo('chown www-data:www-data www') + sudo('chown -R www-data:www-data %s' % newdir) + with settings(warn_only=True): + sudo('supervisorctl stop awesome') + sudo('supervisorctl start awesome') + sudo('/etc/init.d/nginx reload') + +RE_FILES = re.compile('\r?\n') + +def rollback(): + ''' + rollback to previous version + ''' + with cd(_REMOTE_BASE_DIR): + r = run('ls -p -1') + files = [s[:-1] for s in RE_FILES.split(r) if s.startswith('www-') and s.endswith('/')] + files.sort(cmp=lambda s1, s2: 1 if s1 < s2 else -1) + r = run('ls -l www') + ss = r.split(' -> ') + if len(ss) != 2: + print ('ERROR: \'www\' is not a symbol link.') + return + current = ss[1] + print ('Found current symbol link points to: %s\n' % current) + try: + index = files.index(current) + except ValueError, e: + print ('ERROR: symbol link is invalid.') + return + if len(files) == index + 1: + print ('ERROR: already the oldest version.') + old = files[index + 1] + print ('==================================================') + for f in files: + if f == current: + print (' Current ---> %s' % current) + elif f == old: + print (' Rollback to ---> %s' % old) + else: + print (' %s' % f) + print ('==================================================') + print ('') + yn = raw_input ('continue? y/N ') + if yn != 'y' and yn != 'Y': + print ('Rollback cancelled.') + return + print ('Start rollback...') + sudo('rm -f www') + sudo('ln -s %s www' % old) + sudo('chown www-data:www-data www') + with settings(warn_only=True): + sudo('supervisorctl stop awesome') + sudo('supervisorctl start awesome') + sudo('/etc/init.d/nginx reload') + print ('ROLLBACKED OK.') + +def restore2local(): + ''' + Restore db to local + ''' + backup_dir = os.path.join(_current_path(), 'backup') + fs = os.listdir(backup_dir) + files = [f for f in fs if f.startswith('backup-') and f.endswith('.sql.tar.gz')] + files.sort(cmp=lambda s1, s2: 1 if s1 < s2 else -1) + if len(files)==0: + print 'No backup files found.' + return + print ('Found %s backup files:' % len(files)) + print ('==================================================') + n = 0 + for f in files: + print ('%s: %s' % (n, f)) + n = n + 1 + print ('==================================================') + print ('') + try: + num = int(raw_input ('Restore file: ')) + except ValueError: + print ('Invalid file number.') + return + restore_file = files[num] + yn = raw_input('Restore file %s: %s? y/N ' % (num, restore_file)) + if yn != 'y' and yn != 'Y': + print ('Restore cancelled.') + return + print ('Start restore to local database...') + p = raw_input('Input mysql root password: ') + sqls = [ + 'drop database if exists awesome;', + 'create database awesome;', + 'grant select, insert, update, delete on awesome.* to \'%s\'@\'localhost\' identified by \'%s\';' % (db_user, db_password) + ] + for sql in sqls: + local(r'mysql -uroot -p%s -e "%s"' % (p, sql)) + with lcd(backup_dir): + local('tar zxvf %s' % restore_file) + local(r'mysql -uroot -p%s awesome < backup/%s' % (p, restore_file[:-7])) + with lcd(backup_dir): + local('rm -f %s' % restore_file[:-7]) diff --git a/ios/AwsomeApp.xcodeproj/project.pbxproj b/ios/AwsomeApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c04bd1f --- /dev/null +++ b/ios/AwsomeApp.xcodeproj/project.pbxproj @@ -0,0 +1,494 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4CC282A1194003BD00A48681 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC282A0194003BD00A48681 /* Foundation.framework */; }; + 4CC282A3194003BD00A48681 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC282A2194003BD00A48681 /* CoreGraphics.framework */; }; + 4CC282A5194003BD00A48681 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC282A4194003BD00A48681 /* UIKit.framework */; }; + 4CC282AB194003BD00A48681 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4CC282A9194003BD00A48681 /* InfoPlist.strings */; }; + 4CC282AD194003BD00A48681 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC282AC194003BD00A48681 /* main.m */; }; + 4CC282B1194003BD00A48681 /* APAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC282B0194003BD00A48681 /* APAppDelegate.m */; }; + 4CC282B4194003BD00A48681 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4CC282B2194003BD00A48681 /* Main.storyboard */; }; + 4CC282B9194003BD00A48681 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4CC282B8194003BD00A48681 /* Images.xcassets */; }; + 4CC282C0194003BD00A48681 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC282BF194003BD00A48681 /* XCTest.framework */; }; + 4CC282C1194003BD00A48681 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC282A0194003BD00A48681 /* Foundation.framework */; }; + 4CC282C2194003BD00A48681 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC282A4194003BD00A48681 /* UIKit.framework */; }; + 4CC282CA194003BD00A48681 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4CC282C8194003BD00A48681 /* InfoPlist.strings */; }; + 4CC282CC194003BD00A48681 /* AwsomeAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC282CB194003BD00A48681 /* AwsomeAppTests.m */; }; + 4CC282E21940171800A48681 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC282D81940171800A48681 /* MainViewController.m */; }; + 4CC282E31940171800A48681 /* MenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC282DA1940171800A48681 /* MenuViewController.m */; }; + 4CC58279194098D0000E6BD5 /* APBlog.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC58278194098D0000E6BD5 /* APBlog.m */; }; + 4CC5827C19409FEE000E6BD5 /* htmlFooter.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4CC5827A19409FEE000E6BD5 /* htmlFooter.txt */; }; + 4CC5827D19409FEE000E6BD5 /* htmlHeader.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4CC5827B19409FEE000E6BD5 /* htmlHeader.txt */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4CC282C3194003BD00A48681 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4CC28295194003BD00A48681 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4CC2829C194003BD00A48681; + remoteInfo = AwsomeApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 4CC2829D194003BD00A48681 /* AwsomeApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AwsomeApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CC282A0194003BD00A48681 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 4CC282A2194003BD00A48681 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 4CC282A4194003BD00A48681 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 4CC282A8194003BD00A48681 /* AwsomeApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AwsomeApp-Info.plist"; sourceTree = ""; }; + 4CC282AA194003BD00A48681 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 4CC282AC194003BD00A48681 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 4CC282AE194003BD00A48681 /* AwsomeApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AwsomeApp-Prefix.pch"; sourceTree = ""; }; + 4CC282AF194003BD00A48681 /* APAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APAppDelegate.h; sourceTree = ""; }; + 4CC282B0194003BD00A48681 /* APAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = APAppDelegate.m; sourceTree = ""; }; + 4CC282B3194003BD00A48681 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 4CC282B8194003BD00A48681 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 4CC282BE194003BD00A48681 /* AwsomeAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AwsomeAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CC282BF194003BD00A48681 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 4CC282C7194003BD00A48681 /* AwsomeAppTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AwsomeAppTests-Info.plist"; sourceTree = ""; }; + 4CC282C9194003BD00A48681 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 4CC282CB194003BD00A48681 /* AwsomeAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AwsomeAppTests.m; sourceTree = ""; }; + 4CC282D71940171800A48681 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; + 4CC282D81940171800A48681 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; + 4CC282D91940171800A48681 /* MenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuViewController.h; sourceTree = ""; }; + 4CC282DA1940171800A48681 /* MenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuViewController.m; sourceTree = ""; }; + 4CC58277194098D0000E6BD5 /* APBlog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APBlog.h; sourceTree = ""; }; + 4CC58278194098D0000E6BD5 /* APBlog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APBlog.m; sourceTree = ""; }; + 4CC5827A19409FEE000E6BD5 /* htmlFooter.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = htmlFooter.txt; sourceTree = ""; }; + 4CC5827B19409FEE000E6BD5 /* htmlHeader.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = htmlHeader.txt; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4CC2829A194003BD00A48681 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CC282A3194003BD00A48681 /* CoreGraphics.framework in Frameworks */, + 4CC282A5194003BD00A48681 /* UIKit.framework in Frameworks */, + 4CC282A1194003BD00A48681 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4CC282BB194003BD00A48681 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CC282C0194003BD00A48681 /* XCTest.framework in Frameworks */, + 4CC282C2194003BD00A48681 /* UIKit.framework in Frameworks */, + 4CC282C1194003BD00A48681 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4CC28294194003BD00A48681 = { + isa = PBXGroup; + children = ( + 4CC282A6194003BD00A48681 /* AwsomeApp */, + 4CC282C5194003BD00A48681 /* AwsomeAppTests */, + 4CC2829F194003BD00A48681 /* Frameworks */, + 4CC2829E194003BD00A48681 /* Products */, + ); + sourceTree = ""; + }; + 4CC2829E194003BD00A48681 /* Products */ = { + isa = PBXGroup; + children = ( + 4CC2829D194003BD00A48681 /* AwsomeApp.app */, + 4CC282BE194003BD00A48681 /* AwsomeAppTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 4CC2829F194003BD00A48681 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 4CC282A0194003BD00A48681 /* Foundation.framework */, + 4CC282A2194003BD00A48681 /* CoreGraphics.framework */, + 4CC282A4194003BD00A48681 /* UIKit.framework */, + 4CC282BF194003BD00A48681 /* XCTest.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4CC282A6194003BD00A48681 /* AwsomeApp */ = { + isa = PBXGroup; + children = ( + 4CC5827A19409FEE000E6BD5 /* htmlFooter.txt */, + 4CC5827B19409FEE000E6BD5 /* htmlHeader.txt */, + 4CC282D71940171800A48681 /* MainViewController.h */, + 4CC282D81940171800A48681 /* MainViewController.m */, + 4CC282D91940171800A48681 /* MenuViewController.h */, + 4CC282DA1940171800A48681 /* MenuViewController.m */, + 4CC282AF194003BD00A48681 /* APAppDelegate.h */, + 4CC282B0194003BD00A48681 /* APAppDelegate.m */, + 4CC282B2194003BD00A48681 /* Main.storyboard */, + 4CC282B8194003BD00A48681 /* Images.xcassets */, + 4CC282A7194003BD00A48681 /* Supporting Files */, + 4CC58277194098D0000E6BD5 /* APBlog.h */, + 4CC58278194098D0000E6BD5 /* APBlog.m */, + ); + path = AwsomeApp; + sourceTree = ""; + }; + 4CC282A7194003BD00A48681 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 4CC282A8194003BD00A48681 /* AwsomeApp-Info.plist */, + 4CC282A9194003BD00A48681 /* InfoPlist.strings */, + 4CC282AC194003BD00A48681 /* main.m */, + 4CC282AE194003BD00A48681 /* AwsomeApp-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 4CC282C5194003BD00A48681 /* AwsomeAppTests */ = { + isa = PBXGroup; + children = ( + 4CC282CB194003BD00A48681 /* AwsomeAppTests.m */, + 4CC282C6194003BD00A48681 /* Supporting Files */, + ); + path = AwsomeAppTests; + sourceTree = ""; + }; + 4CC282C6194003BD00A48681 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 4CC282C7194003BD00A48681 /* AwsomeAppTests-Info.plist */, + 4CC282C8194003BD00A48681 /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4CC2829C194003BD00A48681 /* AwsomeApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4CC282CF194003BD00A48681 /* Build configuration list for PBXNativeTarget "AwsomeApp" */; + buildPhases = ( + 4CC28299194003BD00A48681 /* Sources */, + 4CC2829A194003BD00A48681 /* Frameworks */, + 4CC2829B194003BD00A48681 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AwsomeApp; + productName = AwsomeApp; + productReference = 4CC2829D194003BD00A48681 /* AwsomeApp.app */; + productType = "com.apple.product-type.application"; + }; + 4CC282BD194003BD00A48681 /* AwsomeAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4CC282D2194003BD00A48681 /* Build configuration list for PBXNativeTarget "AwsomeAppTests" */; + buildPhases = ( + 4CC282BA194003BD00A48681 /* Sources */, + 4CC282BB194003BD00A48681 /* Frameworks */, + 4CC282BC194003BD00A48681 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 4CC282C4194003BD00A48681 /* PBXTargetDependency */, + ); + name = AwsomeAppTests; + productName = AwsomeAppTests; + productReference = 4CC282BE194003BD00A48681 /* AwsomeAppTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 4CC28295194003BD00A48681 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = AP; + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = iTranswarp; + TargetAttributes = { + 4CC282BD194003BD00A48681 = { + TestTargetID = 4CC2829C194003BD00A48681; + }; + }; + }; + buildConfigurationList = 4CC28298194003BD00A48681 /* Build configuration list for PBXProject "AwsomeApp" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 4CC28294194003BD00A48681; + productRefGroup = 4CC2829E194003BD00A48681 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4CC2829C194003BD00A48681 /* AwsomeApp */, + 4CC282BD194003BD00A48681 /* AwsomeAppTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4CC2829B194003BD00A48681 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CC5827D19409FEE000E6BD5 /* htmlHeader.txt in Resources */, + 4CC5827C19409FEE000E6BD5 /* htmlFooter.txt in Resources */, + 4CC282B9194003BD00A48681 /* Images.xcassets in Resources */, + 4CC282AB194003BD00A48681 /* InfoPlist.strings in Resources */, + 4CC282B4194003BD00A48681 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4CC282BC194003BD00A48681 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CC282CA194003BD00A48681 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4CC28299194003BD00A48681 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CC282AD194003BD00A48681 /* main.m in Sources */, + 4CC282E31940171800A48681 /* MenuViewController.m in Sources */, + 4CC282E21940171800A48681 /* MainViewController.m in Sources */, + 4CC58279194098D0000E6BD5 /* APBlog.m in Sources */, + 4CC282B1194003BD00A48681 /* APAppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4CC282BA194003BD00A48681 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CC282CC194003BD00A48681 /* AwsomeAppTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4CC282C4194003BD00A48681 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4CC2829C194003BD00A48681 /* AwsomeApp */; + targetProxy = 4CC282C3194003BD00A48681 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 4CC282A9194003BD00A48681 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 4CC282AA194003BD00A48681 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 4CC282B2194003BD00A48681 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 4CC282B3194003BD00A48681 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 4CC282C8194003BD00A48681 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 4CC282C9194003BD00A48681 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 4CC282CD194003BD00A48681 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 4CC282CE194003BD00A48681 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4CC282D0194003BD00A48681 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AwsomeApp/AwsomeApp-Prefix.pch"; + INFOPLIST_FILE = "AwsomeApp/AwsomeApp-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 4CC282D1194003BD00A48681 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AwsomeApp/AwsomeApp-Prefix.pch"; + INFOPLIST_FILE = "AwsomeApp/AwsomeApp-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 4CC282D3194003BD00A48681 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/AwsomeApp.app/AwsomeApp"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AwsomeApp/AwsomeApp-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "AwsomeAppTests/AwsomeAppTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 4CC282D4194003BD00A48681 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/AwsomeApp.app/AwsomeApp"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "AwsomeApp/AwsomeApp-Prefix.pch"; + INFOPLIST_FILE = "AwsomeAppTests/AwsomeAppTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4CC28298194003BD00A48681 /* Build configuration list for PBXProject "AwsomeApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4CC282CD194003BD00A48681 /* Debug */, + 4CC282CE194003BD00A48681 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4CC282CF194003BD00A48681 /* Build configuration list for PBXNativeTarget "AwsomeApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4CC282D0194003BD00A48681 /* Debug */, + 4CC282D1194003BD00A48681 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4CC282D2194003BD00A48681 /* Build configuration list for PBXNativeTarget "AwsomeAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4CC282D3194003BD00A48681 /* Debug */, + 4CC282D4194003BD00A48681 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 4CC28295194003BD00A48681 /* Project object */; +} diff --git a/ios/AwsomeApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/AwsomeApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..bad252a --- /dev/null +++ b/ios/AwsomeApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/AwsomeApp/APAppDelegate.h b/ios/AwsomeApp/APAppDelegate.h new file mode 100644 index 0000000..632f9fb --- /dev/null +++ b/ios/AwsomeApp/APAppDelegate.h @@ -0,0 +1,15 @@ +// +// APAppDelegate.h +// AwsomeApp +// +// Created by Michael Liao on 6/5/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import + +@interface APAppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/ios/AwsomeApp/APAppDelegate.m b/ios/AwsomeApp/APAppDelegate.m new file mode 100644 index 0000000..3a5c5e0 --- /dev/null +++ b/ios/AwsomeApp/APAppDelegate.m @@ -0,0 +1,46 @@ +// +// APAppDelegate.m +// AwsomeApp +// +// Created by Michael Liao on 6/5/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import "APAppDelegate.h" + +@implementation APAppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/ios/AwsomeApp/APBlog.h b/ios/AwsomeApp/APBlog.h new file mode 100644 index 0000000..4329cca --- /dev/null +++ b/ios/AwsomeApp/APBlog.h @@ -0,0 +1,29 @@ +// +// APBlog.h +// AwsomeApp +// +// Created by Michael on 14-6-5. +// Copyright (c) 2014年 iTranswarp. All rights reserved. +// + +#import + +@interface APBlog : NSObject + +@property (strong) NSString* id; + +@property (strong) NSString* name; + +@property (strong) NSString* summary; + +@property (strong) NSString* content; + +@property (strong) NSString* user_id; + +@property (strong) NSString* user_name; + +@property NSNumber* created_at; + ++ (APBlog*) blogWithDictionary:(NSDictionary*) dictionary; + +@end diff --git a/ios/AwsomeApp/APBlog.m b/ios/AwsomeApp/APBlog.m new file mode 100644 index 0000000..6a84ed3 --- /dev/null +++ b/ios/AwsomeApp/APBlog.m @@ -0,0 +1,26 @@ +// +// APBlog.m +// AwsomeApp +// +// Created by Michael on 14-6-5. +// Copyright (c) 2014年 iTranswarp. All rights reserved. +// + +#import "APBlog.h" + +@implementation APBlog + ++ (APBlog*) blogWithDictionary:(NSDictionary*) dictionary +{ + APBlog* blog = [[APBlog alloc] init]; + blog.id = dictionary[@"id"]; + blog.name = dictionary[@"name"]; + blog.summary = dictionary[@"summary"]; + blog.content = dictionary[@"content"]; + blog.user_id = dictionary[@"user_id"]; + blog.user_name = dictionary[@"user_name"]; + blog.created_at = dictionary[@"created_at"]; + return blog; +} + +@end diff --git a/ios/AwsomeApp/AwsomeApp-Info.plist b/ios/AwsomeApp/AwsomeApp-Info.plist new file mode 100644 index 0000000..a455e5e --- /dev/null +++ b/ios/AwsomeApp/AwsomeApp-Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.itranswarp.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/ios/AwsomeApp/AwsomeApp-Prefix.pch b/ios/AwsomeApp/AwsomeApp-Prefix.pch new file mode 100644 index 0000000..82a2bb4 --- /dev/null +++ b/ios/AwsomeApp/AwsomeApp-Prefix.pch @@ -0,0 +1,16 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#import + +#ifndef __IPHONE_5_0 +#warning "This project uses features only available in iOS SDK 5.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/ios/AwsomeApp/Base.lproj/Main.storyboard b/ios/AwsomeApp/Base.lproj/Main.storyboard new file mode 100644 index 0000000..59b5e5f --- /dev/null +++ b/ios/AwsomeApp/Base.lproj/Main.storyboard @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/AwsomeApp/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/AwsomeApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a396706 --- /dev/null +++ b/ios/AwsomeApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/AwsomeApp/Images.xcassets/LaunchImage.launchimage/Contents.json b/ios/AwsomeApp/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..c79ebd3 --- /dev/null +++ b/ios/AwsomeApp/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/AwsomeApp/MainViewController.h b/ios/AwsomeApp/MainViewController.h new file mode 100644 index 0000000..c0c91a5 --- /dev/null +++ b/ios/AwsomeApp/MainViewController.h @@ -0,0 +1,16 @@ +// +// MainViewController.h +// LearnGit +// +// Created by Michael Liao on 4/22/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import +#import "APBlog.h" + +@interface MainViewController : UIViewController + +- (void)initBlog:(APBlog*) blog; + +@end diff --git a/ios/AwsomeApp/MainViewController.m b/ios/AwsomeApp/MainViewController.m new file mode 100644 index 0000000..e65b886 --- /dev/null +++ b/ios/AwsomeApp/MainViewController.m @@ -0,0 +1,83 @@ +// +// MainViewController.m +// +// Created by Michael Liao on 5/22/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import "MainViewController.h" + +@interface MainViewController () + +@property (weak, nonatomic) IBOutlet UINavigationBar *navigationBar; + +@property (weak, nonatomic) IBOutlet UIWebView *webView; + +@property (strong) NSString* html; + +@end + +@implementation MainViewController + +- (void)initBlog:(APBlog*) blog +{ + [self setHTML:blog.content]; +} + +- (void)setHTML:(NSString*) html +{ + NSString* header = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"htmlHeader" ofType:@"txt"] encoding:NSUTF8StringEncoding error:nil]; + NSString* footer = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"htmlFooter" ofType:@"txt"] encoding:NSUTF8StringEncoding error:nil]; + NSString* s = [NSString stringWithFormat:@"%@%@%@", header, html, footer]; + NSLog(@"HTML: %@", s); + self.html = html; +} + + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType +{ + if (navigationType==UIWebViewNavigationTypeLinkClicked) { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:request.URL.absoluteString]]; + return NO; + } + NSURL* url = request.URL; + NSString* s = url.absoluteString; + NSLog(@"absoluteString: %@", s); + NSLog(@"shouldStartLoadWithRequest: %@ %@ %@", request.URL.host, request.URL.path, request.URL.pathExtension); + NSLog(@"shouldStartLoadWithRequest: %@", request.URL.absoluteString); + return YES; +} + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + [self.webView loadHTMLString:self.html baseURL:[NSURL URLWithString:@"http://awesome.liaoxuefeng.com/"]]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/ios/AwsomeApp/MenuViewController.h b/ios/AwsomeApp/MenuViewController.h new file mode 100644 index 0000000..50d2d45 --- /dev/null +++ b/ios/AwsomeApp/MenuViewController.h @@ -0,0 +1,12 @@ +// +// MenuViewController.h +// +// Created by Michael Liao on 5/22/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import + +@interface MenuViewController : UIViewController + +@end diff --git a/ios/AwsomeApp/MenuViewController.m b/ios/AwsomeApp/MenuViewController.m new file mode 100644 index 0000000..87efe53 --- /dev/null +++ b/ios/AwsomeApp/MenuViewController.m @@ -0,0 +1,184 @@ +// +// MenuViewController.m +// +// Created by Michael Liao on 5/22/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import "MenuViewController.h" +#import "MainViewController.h" +#import "APBlog.h" + +@interface MenuViewController () + +@property (strong) NSArray* blogs; + +@property (strong, nonatomic) NSURLConnection* networkConnection; + +@property (strong, nonatomic) NSMutableData* networkData; + +@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *indicator; + +@property (weak, nonatomic) IBOutlet UITableView *tableView; + +@end + +@implementation MenuViewController + +- (void)cleanupNetworkConnection +{ + self.networkData = nil; + self.networkConnection = nil; +} + +- (void)requestMenuFromNetwork +{ + [self showNetworkError:NO showIndicator:NO]; + NSURL* theURL = [NSURL URLWithString:@"http://awesome.liaoxuefeng.com/api/blogs?format=html"]; + NSURLRequest* request = [NSURLRequest requestWithURL:theURL cachePolicy:NSURLCacheStorageAllowed timeoutInterval:10]; + NSURLConnection* conn = [NSURLConnection connectionWithRequest:request delegate:self]; + if (conn) { + self.networkConnection = conn; + [self showNetworkError:NO showIndicator:YES]; + } + else { + [self connection:nil didFailWithError:nil]; + } +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error +{ + NSLog(@"FAILED:didFailWithError"); + if (self.networkConnection!=connection) { + return; + } + [self cleanupNetworkConnection]; + [self showNetworkError:YES showIndicator:NO]; +} + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response +{ + if (self.networkConnection!=connection) { + return; + } + self.networkData = [NSMutableData dataWithCapacity:1024]; +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data +{ + if (self.networkConnection!=connection) { + return; + } + [self.networkData appendData:data]; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection +{ + if (self.networkConnection!=connection) { + return; + } + NSLog(@"connectionDidFinishLoading"); + NSUInteger len = [self.networkData length]; + if (len==0) { + [self connection:connection didFailWithError:nil]; + return; + } + // try parse json: + NSError* err = nil; + NSDictionary* json = [NSJSONSerialization JSONObjectWithData:self.networkData options:0 error:&err]; + if (err!=nil) { + [self connection:connection didFailWithError:err]; + return; + } + // save: + NSMutableArray* array = [NSMutableArray arrayWithCapacity:32]; + NSArray* blogs = json[@"blogs"]; + for (NSDictionary* c in blogs) { + [array addObject:[APBlog blogWithDictionary:c]]; + } + self.blogs = array; + [self cleanupNetworkConnection]; + [self showNetworkError:NO showIndicator:NO]; + [self.tableView reloadData]; +} + +- (void)showNetworkError:(BOOL)showError showIndicator:(BOOL)showIndicator +{ + NSLog(@"showNetworkError: %d, showIndicator: %d", showError, showIndicator); + if (showIndicator) { + [self.indicator startAnimating]; + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; + } + else { + [self.indicator stopAnimating]; + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; + } +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + APBlog* selected = [self.blogs objectAtIndex:indexPath.row]; + MainViewController* mainVC = [self.storyboard instantiateViewControllerWithIdentifier:@"blogVC"]; + mainVC.title = selected.name; + [mainVC initBlog:selected]; + [self.navigationController pushViewController:mainVC animated:YES]; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + if (self.blogs==nil) { + return 0; + } + return [self.blogs count]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + + NSInteger row = indexPath.row; + APBlog* blog = [self.blogs objectAtIndex:row]; + UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"menuCell"]; + // Configure the cell: + cell.textLabel.text = blog.name; + return cell; +} + +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath +{ + return NO; +} + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. + [self requestMenuFromNetwork]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/ios/AwsomeApp/en.lproj/InfoPlist.strings b/ios/AwsomeApp/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/ios/AwsomeApp/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/ios/AwsomeApp/htmlFooter.txt b/ios/AwsomeApp/htmlFooter.txt new file mode 100644 index 0000000..9943ff0 --- /dev/null +++ b/ios/AwsomeApp/htmlFooter.txt @@ -0,0 +1,3 @@ + + + diff --git a/ios/AwsomeApp/htmlHeader.txt b/ios/AwsomeApp/htmlHeader.txt new file mode 100644 index 0000000..5fb2996 --- /dev/null +++ b/ios/AwsomeApp/htmlHeader.txt @@ -0,0 +1,73 @@ + + + + + + + + +
diff --git a/ios/AwsomeApp/main.m b/ios/AwsomeApp/main.m new file mode 100644 index 0000000..1feb748 --- /dev/null +++ b/ios/AwsomeApp/main.m @@ -0,0 +1,18 @@ +// +// main.m +// AwsomeApp +// +// Created by Michael Liao on 6/5/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import + +#import "APAppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([APAppDelegate class])); + } +} diff --git a/ios/AwsomeAppTests/AwsomeAppTests-Info.plist b/ios/AwsomeAppTests/AwsomeAppTests-Info.plist new file mode 100644 index 0000000..76c13ac --- /dev/null +++ b/ios/AwsomeAppTests/AwsomeAppTests-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.itranswarp.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/ios/AwsomeAppTests/AwsomeAppTests.m b/ios/AwsomeAppTests/AwsomeAppTests.m new file mode 100644 index 0000000..f9e1ecc --- /dev/null +++ b/ios/AwsomeAppTests/AwsomeAppTests.m @@ -0,0 +1,34 @@ +// +// AwsomeAppTests.m +// AwsomeAppTests +// +// Created by Michael Liao on 6/5/14. +// Copyright (c) 2014 iTranswarp. All rights reserved. +// + +#import + +@interface AwsomeAppTests : XCTestCase + +@end + +@implementation AwsomeAppTests + +- (void)setUp +{ + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown +{ + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample +{ + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); +} + +@end diff --git a/ios/AwsomeAppTests/en.lproj/InfoPlist.strings b/ios/AwsomeAppTests/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/ios/AwsomeAppTests/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/schema.sql b/schema.sql new file mode 100644 index 0000000..d86c58b --- /dev/null +++ b/schema.sql @@ -0,0 +1,52 @@ +-- init database + +drop database if exists awesome; + +create database awesome; + +use awesome; + +grant select, insert, update, delete on awesome.* to 'www-data'@'localhost' identified by 'www-data'; + +create table users ( + `id` varchar(50) not null, + `email` varchar(50) not null, + `password` varchar(50) not null, + `admin` bool not null, + `name` varchar(50) not null, + `image` varchar(500) not null, + `created_at` real not null, + unique key `idx_email` (`email`), + key `idx_created_at` (`created_at`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table blogs ( + `id` varchar(50) not null, + `user_id` varchar(50) not null, + `user_name` varchar(50) not null, + `user_image` varchar(500) not null, + `name` varchar(50) not null, + `summary` varchar(200) not null, + `content` mediumtext not null, + `created_at` real not null, + key `idx_created_at` (`created_at`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table comments ( + `id` varchar(50) not null, + `blog_id` varchar(50) not null, + `user_id` varchar(50) not null, + `user_name` varchar(50) not null, + `user_image` varchar(500) not null, + `content` mediumtext not null, + `created_at` real not null, + key `idx_created_at` (`created_at`), + primary key (`id`) +) engine=innodb default charset=utf8; + +-- email / password: +-- admin@example.com / password + +insert into users (`id`, `email`, `password`, `admin`, `name`, `created_at`) values ('0010018336417540987fff4508f43fbaed718e263442526000', 'admin@example.com', '5f4dcc3b5aa765d61d8327deb882cf99', 1, 'Administrator', 1402909113.628); diff --git a/www/apis.py b/www/apis.py new file mode 100644 index 0000000..c2ac0c0 --- /dev/null +++ b/www/apis.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +''' +JSON API definition. +''' + +import re, json, logging, functools + +from transwarp.web import ctx + +class Page(object): + ''' + Page object for display pages. + ''' + + def __init__(self, item_count, page_index=1, page_size=15): + ''' + Init Pagination by item_count, page_index and page_size. + + >>> p1 = Page(100, 1) + >>> p1.page_count + 10 + >>> p1.offset + 0 + >>> p1.limit + 10 + >>> p2 = Page(90, 9, 10) + >>> p2.page_count + 9 + >>> p2.offset + 80 + >>> p2.limit + 10 + >>> p3 = Page(91, 10, 10) + >>> p3.page_count + 10 + >>> p3.offset + 90 + >>> p3.limit + 10 + ''' + self.item_count = item_count + self.page_size = page_size + self.page_count = item_count // page_size + (1 if item_count % page_size > 0 else 0) + if (item_count == 0) or (page_index < 1) or (page_index > self.page_count): + self.offset = 0 + self.limit = 0 + self.page_index = 1 + else: + self.page_index = page_index + self.offset = self.page_size * (page_index - 1) + self.limit = self.page_size + self.has_next = self.page_index < self.page_count + self.has_previous = self.page_index > 1 + + def __str__(self): + return 'item_count: %s, page_count: %s, page_index: %s, page_size: %s, offset: %s, limit: %s' % (self.item_count, self.page_count, self.page_index, self.page_size, self.offset, self.limit) + + __repr__ = __str__ + +def _dump(obj): + if isinstance(obj, Page): + return { + 'page_index': obj.page_index, + 'page_count': obj.page_count, + 'item_count': obj.item_count, + 'has_next': obj.has_next, + 'has_previous': obj.has_previous + } + raise TypeError('%s is not JSON serializable' % obj) + +def dumps(obj): + return json.dumps(obj, default=_dump) + +class APIError(StandardError): + ''' + the base APIError which contains error(required), data(optional) and message(optional). + ''' + def __init__(self, error, data='', message=''): + super(APIError, self).__init__(message) + self.error = error + self.data = data + self.message = message + +class APIValueError(APIError): + ''' + Indicate the input value has error or invalid. The data specifies the error field of input form. + ''' + def __init__(self, field, message=''): + super(APIValueError, self).__init__('value:invalid', field, message) + +class APIResourceNotFoundError(APIError): + ''' + Indicate the resource was not found. The data specifies the resource name. + ''' + def __init__(self, field, message=''): + super(APIResourceNotFoundError, self).__init__('value:notfound', field, message) + +class APIPermissionError(APIError): + ''' + Indicate the api has no permission. + ''' + def __init__(self, message=''): + super(APIPermissionError, self).__init__('permission:forbidden', 'permission', message) + +def api(func): + ''' + A decorator that makes a function to json api, makes the return value as json. + + @app.route('/api/test') + @api + def api_test(): + return dict(result='123', items=[]) + ''' + @functools.wraps(func) + def _wrapper(*args, **kw): + try: + r = dumps(func(*args, **kw)) + except APIError, e: + r = json.dumps(dict(error=e.error, data=e.data, message=e.message)) + except Exception, e: + logging.exception(e) + r = json.dumps(dict(error='internalerror', data=e.__class__.__name__, message=e.message)) + ctx.response.content_type = 'application/json' + return r + return _wrapper + +if __name__=='__main__': + import doctest + doctest.testmod() diff --git a/www/config.py b/www/config.py new file mode 100644 index 0000000..78c16d6 --- /dev/null +++ b/www/config.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +''' +Configuration +''' + +__author__ = 'Michael Liao' + +import config_default + +class Dict(dict): + ''' + Simple dict but support access as x.y style. + ''' + def __init__(self, names=(), values=(), **kw): + super(Dict, self).__init__(**kw) + for k, v in zip(names, values): + self[k] = v + + def __getattr__(self, key): + try: + return self[key] + except KeyError: + raise AttributeError(r"'Dict' object has no attribute '%s'" % key) + + def __setattr__(self, key, value): + self[key] = value + +def merge(defaults, override): + r = {} + for k, v in defaults.iteritems(): + if k in override: + if isinstance(v, dict): + r[k] = merge(v, override[k]) + else: + r[k] = override[k] + else: + r[k] = v + return r + +def toDict(d): + D = Dict() + for k, v in d.iteritems(): + D[k] = toDict(v) if isinstance(v, dict) else v + return D + +configs = config_default.configs + +try: + import config_override + configs = merge(configs, config_override.configs) +except ImportError: + pass + +configs = toDict(configs) diff --git a/www/config_default.py b/www/config_default.py new file mode 100644 index 0000000..a6f9fee --- /dev/null +++ b/www/config_default.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +''' +Default configurations. +''' + +configs = { + 'db': { + 'host': '127.0.0.1', + 'port': 3306, + 'user': 'www-data', + 'password': 'www-data', + 'database': 'awesome' + }, + 'session': { + 'secret': 'AwEsOmE' + } +} diff --git a/www/config_override.py b/www/config_override.py new file mode 100644 index 0000000..b914e61 --- /dev/null +++ b/www/config_override.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +''' +Override configurations. +''' + +__author__ = 'Michael Liao' + +configs = { + 'db': { + 'host': '127.0.0.1' + } +} diff --git a/www/favicon.ico b/www/favicon.ico new file mode 100644 index 0000000..5f9ba4a Binary files /dev/null and b/www/favicon.ico differ diff --git a/www/markdown2.py b/www/markdown2.py new file mode 100755 index 0000000..44b9e2d --- /dev/null +++ b/www/markdown2.py @@ -0,0 +1,2317 @@ +#!/usr/bin/env python +# Copyright (c) 2012 Trent Mick. +# Copyright (c) 2007-2008 ActiveState Corp. +# License: MIT (http://www.opensource.org/licenses/mit-license.php) + +from __future__ import generators + +r"""A fast and complete Python implementation of Markdown. + +[from http://daringfireball.net/projects/markdown/] +> Markdown is a text-to-HTML filter; it translates an easy-to-read / +> easy-to-write structured text format into HTML. Markdown's text +> format is most similar to that of plain text email, and supports +> features such as headers, *emphasis*, code blocks, blockquotes, and +> links. +> +> Markdown's syntax is designed not as a generic markup language, but +> specifically to serve as a front-end to (X)HTML. You can use span-level +> HTML tags anywhere in a Markdown document, and you can use block level +> HTML tags (like
and as well). + +Module usage: + + >>> import markdown2 + >>> markdown2.markdown("*boo!*") # or use `html = markdown_path(PATH)` + u'

boo!

\n' + + >>> markdowner = Markdown() + >>> markdowner.convert("*boo!*") + u'

boo!

\n' + >>> markdowner.convert("**boom!**") + u'

boom!

\n' + +This implementation of Markdown implements the full "core" syntax plus a +number of extras (e.g., code syntax coloring, footnotes) as described on +. +""" + +cmdln_desc = """A fast and complete Python implementation of Markdown, a +text-to-HTML conversion tool for web writers. + +Supported extra syntax options (see -x|--extras option below and +see for details): + +* code-friendly: Disable _ and __ for em and strong. +* cuddled-lists: Allow lists to be cuddled to the preceding paragraph. +* fenced-code-blocks: Allows a code block to not have to be indented + by fencing it with '```' on a line before and after. Based on + with support for + syntax highlighting. +* footnotes: Support footnotes as in use on daringfireball.net and + implemented in other Markdown processors (tho not in Markdown.pl v1.0.1). +* header-ids: Adds "id" attributes to headers. The id value is a slug of + the header text. +* html-classes: Takes a dict mapping html tag names (lowercase) to a + string to use for a "class" tag attribute. Currently only supports + "pre" and "code" tags. Add an issue if you require this for other tags. +* markdown-in-html: Allow the use of `markdown="1"` in a block HTML tag to + have markdown processing be done on its contents. Similar to + but with + some limitations. +* metadata: Extract metadata from a leading '---'-fenced block. + See for details. +* nofollow: Add `rel="nofollow"` to add `` tags with an href. See + . +* pyshell: Treats unindented Python interactive shell sessions as + blocks. +* link-patterns: Auto-link given regex patterns in text (e.g. bug number + references, revision number references). +* smarty-pants: Replaces ' and " with curly quotation marks or curly + apostrophes. Replaces --, ---, ..., and . . . with en dashes, em dashes, + and ellipses. +* toc: The returned HTML string gets a new "toc_html" attribute which is + a Table of Contents for the document. (experimental) +* xml: Passes one-liner processing instructions and namespaced XML tags. +* wiki-tables: Google Code Wiki-style tables. See + . +""" + +# Dev Notes: +# - Python's regex syntax doesn't have '\z', so I'm using '\Z'. I'm +# not yet sure if there implications with this. Compare 'pydoc sre' +# and 'perldoc perlre'. + +__version_info__ = (2, 1, 0) +__version__ = '.'.join(map(str, __version_info__)) +__author__ = "Trent Mick" + +import os +import sys +from pprint import pprint +import re +import logging +try: + from hashlib import md5 +except ImportError: + from md5 import md5 +import optparse +from random import random, randint +import codecs + + +#---- Python version compat + +try: + from urllib.parse import quote # python3 +except ImportError: + from urllib import quote # python2 + +if sys.version_info[:2] < (2,4): + from sets import Set as set + def reversed(sequence): + for i in sequence[::-1]: + yield i + +# Use `bytes` for byte strings and `unicode` for unicode strings (str in Py3). +if sys.version_info[0] <= 2: + py3 = False + try: + bytes + except NameError: + bytes = str + base_string_type = basestring +elif sys.version_info[0] >= 3: + py3 = True + unicode = str + base_string_type = str + + + +#---- globals + +DEBUG = False +log = logging.getLogger("markdown") + +DEFAULT_TAB_WIDTH = 4 + + +SECRET_SALT = bytes(randint(0, 1000000)) +def _hash_text(s): + return 'md5-' + md5(SECRET_SALT + s.encode("utf-8")).hexdigest() + +# Table of hash values for escaped characters: +g_escape_table = dict([(ch, _hash_text(ch)) + for ch in '\\`*_{}[]()>#+-.!']) + + + +#---- exceptions + +class MarkdownError(Exception): + pass + + + +#---- public api + +def markdown_path(path, encoding="utf-8", + html4tags=False, tab_width=DEFAULT_TAB_WIDTH, + safe_mode=None, extras=None, link_patterns=None, + use_file_vars=False): + fp = codecs.open(path, 'r', encoding) + text = fp.read() + fp.close() + return Markdown(html4tags=html4tags, tab_width=tab_width, + safe_mode=safe_mode, extras=extras, + link_patterns=link_patterns, + use_file_vars=use_file_vars).convert(text) + +def markdown(text, html4tags=False, tab_width=DEFAULT_TAB_WIDTH, + safe_mode=None, extras=None, link_patterns=None, + use_file_vars=False): + return Markdown(html4tags=html4tags, tab_width=tab_width, + safe_mode=safe_mode, extras=extras, + link_patterns=link_patterns, + use_file_vars=use_file_vars).convert(text) + +class Markdown(object): + # The dict of "extras" to enable in processing -- a mapping of + # extra name to argument for the extra. Most extras do not have an + # argument, in which case the value is None. + # + # This can be set via (a) subclassing and (b) the constructor + # "extras" argument. + extras = None + + urls = None + titles = None + html_blocks = None + html_spans = None + html_removed_text = "[HTML_REMOVED]" # for compat with markdown.py + + # Used to track when we're inside an ordered or unordered list + # (see _ProcessListItems() for details): + list_level = 0 + + _ws_only_line_re = re.compile(r"^[ \t]+$", re.M) + + def __init__(self, html4tags=False, tab_width=4, safe_mode=None, + extras=None, link_patterns=None, use_file_vars=False): + if html4tags: + self.empty_element_suffix = ">" + else: + self.empty_element_suffix = " />" + self.tab_width = tab_width + + # For compatibility with earlier markdown2.py and with + # markdown.py's safe_mode being a boolean, + # safe_mode == True -> "replace" + if safe_mode is True: + self.safe_mode = "replace" + else: + self.safe_mode = safe_mode + + # Massaging and building the "extras" info. + if self.extras is None: + self.extras = {} + elif not isinstance(self.extras, dict): + self.extras = dict([(e, None) for e in self.extras]) + if extras: + if not isinstance(extras, dict): + extras = dict([(e, None) for e in extras]) + self.extras.update(extras) + assert isinstance(self.extras, dict) + if "toc" in self.extras and not "header-ids" in self.extras: + self.extras["header-ids"] = None # "toc" implies "header-ids" + self._instance_extras = self.extras.copy() + + self.link_patterns = link_patterns + self.use_file_vars = use_file_vars + self._outdent_re = re.compile(r'^(\t|[ ]{1,%d})' % tab_width, re.M) + + self._escape_table = g_escape_table.copy() + if "smarty-pants" in self.extras: + self._escape_table['"'] = _hash_text('"') + self._escape_table["'"] = _hash_text("'") + + def reset(self): + self.urls = {} + self.titles = {} + self.html_blocks = {} + self.html_spans = {} + self.list_level = 0 + self.extras = self._instance_extras.copy() + if "footnotes" in self.extras: + self.footnotes = {} + self.footnote_ids = [] + if "header-ids" in self.extras: + self._count_from_header_id = {} # no `defaultdict` in Python 2.4 + if "metadata" in self.extras: + self.metadata = {} + + # Per "rel" + # should only be used in tags with an "href" attribute. + _a_nofollow = re.compile(r"<(a)([^>]*href=)", re.IGNORECASE) + + def convert(self, text): + """Convert the given text.""" + # Main function. The order in which other subs are called here is + # essential. Link and image substitutions need to happen before + # _EscapeSpecialChars(), so that any *'s or _'s in the + # and tags get encoded. + + # Clear the global hashes. If we don't clear these, you get conflicts + # from other articles when generating a page which contains more than + # one article (e.g. an index page that shows the N most recent + # articles): + self.reset() + + if not isinstance(text, unicode): + #TODO: perhaps shouldn't presume UTF-8 for string input? + text = unicode(text, 'utf-8') + + if self.use_file_vars: + # Look for emacs-style file variable hints. + emacs_vars = self._get_emacs_vars(text) + if "markdown-extras" in emacs_vars: + splitter = re.compile("[ ,]+") + for e in splitter.split(emacs_vars["markdown-extras"]): + if '=' in e: + ename, earg = e.split('=', 1) + try: + earg = int(earg) + except ValueError: + pass + else: + ename, earg = e, None + self.extras[ename] = earg + + # Standardize line endings: + text = re.sub("\r\n|\r", "\n", text) + + # Make sure $text ends with a couple of newlines: + text += "\n\n" + + # Convert all tabs to spaces. + text = self._detab(text) + + # Strip any lines consisting only of spaces and tabs. + # This makes subsequent regexen easier to write, because we can + # match consecutive blank lines with /\n+/ instead of something + # contorted like /[ \t]*\n+/ . + text = self._ws_only_line_re.sub("", text) + + # strip metadata from head and extract + if "metadata" in self.extras: + text = self._extract_metadata(text) + + text = self.preprocess(text) + + if self.safe_mode: + text = self._hash_html_spans(text) + + # Turn block-level HTML blocks into hash entries + text = self._hash_html_blocks(text, raw=True) + + # Strip link definitions, store in hashes. + if "footnotes" in self.extras: + # Must do footnotes first because an unlucky footnote defn + # looks like a link defn: + # [^4]: this "looks like a link defn" + text = self._strip_footnote_definitions(text) + text = self._strip_link_definitions(text) + + text = self._run_block_gamut(text) + + if "footnotes" in self.extras: + text = self._add_footnotes(text) + + text = self.postprocess(text) + + text = self._unescape_special_chars(text) + + if self.safe_mode: + text = self._unhash_html_spans(text) + + if "nofollow" in self.extras: + text = self._a_nofollow.sub(r'<\1 rel="nofollow"\2', text) + + text += "\n" + + rv = UnicodeWithAttrs(text) + if "toc" in self.extras: + rv._toc = self._toc + if "metadata" in self.extras: + rv.metadata = self.metadata + return rv + + def postprocess(self, text): + """A hook for subclasses to do some postprocessing of the html, if + desired. This is called before unescaping of special chars and + unhashing of raw HTML spans. + """ + return text + + def preprocess(self, text): + """A hook for subclasses to do some preprocessing of the Markdown, if + desired. This is called after basic formatting of the text, but prior + to any extras, safe mode, etc. processing. + """ + return text + + # Is metadata if the content starts with '---'-fenced `key: value` + # pairs. E.g. (indented for presentation): + # --- + # foo: bar + # another-var: blah blah + # --- + _metadata_pat = re.compile("""^---[ \t]*\n((?:[ \t]*[^ \t:]+[ \t]*:[^\n]*\n)+)---[ \t]*\n""") + + def _extract_metadata(self, text): + # fast test + if not text.startswith("---"): + return text + match = self._metadata_pat.match(text) + if not match: + return text + + tail = text[len(match.group(0)):] + metadata_str = match.group(1).strip() + for line in metadata_str.split('\n'): + key, value = line.split(':', 1) + self.metadata[key.strip()] = value.strip() + + return tail + + + _emacs_oneliner_vars_pat = re.compile(r"-\*-\s*([^\r\n]*?)\s*-\*-", re.UNICODE) + # This regular expression is intended to match blocks like this: + # PREFIX Local Variables: SUFFIX + # PREFIX mode: Tcl SUFFIX + # PREFIX End: SUFFIX + # Some notes: + # - "[ \t]" is used instead of "\s" to specifically exclude newlines + # - "(\r\n|\n|\r)" is used instead of "$" because the sre engine does + # not like anything other than Unix-style line terminators. + _emacs_local_vars_pat = re.compile(r"""^ + (?P(?:[^\r\n|\n|\r])*?) + [\ \t]*Local\ Variables:[\ \t]* + (?P.*?)(?:\r\n|\n|\r) + (?P.*?\1End:) + """, re.IGNORECASE | re.MULTILINE | re.DOTALL | re.VERBOSE) + + def _get_emacs_vars(self, text): + """Return a dictionary of emacs-style local variables. + + Parsing is done loosely according to this spec (and according to + some in-practice deviations from this): + http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables + """ + emacs_vars = {} + SIZE = pow(2, 13) # 8kB + + # Search near the start for a '-*-'-style one-liner of variables. + head = text[:SIZE] + if "-*-" in head: + match = self._emacs_oneliner_vars_pat.search(head) + if match: + emacs_vars_str = match.group(1) + assert '\n' not in emacs_vars_str + emacs_var_strs = [s.strip() for s in emacs_vars_str.split(';') + if s.strip()] + if len(emacs_var_strs) == 1 and ':' not in emacs_var_strs[0]: + # While not in the spec, this form is allowed by emacs: + # -*- Tcl -*- + # where the implied "variable" is "mode". This form + # is only allowed if there are no other variables. + emacs_vars["mode"] = emacs_var_strs[0].strip() + else: + for emacs_var_str in emacs_var_strs: + try: + variable, value = emacs_var_str.strip().split(':', 1) + except ValueError: + log.debug("emacs variables error: malformed -*- " + "line: %r", emacs_var_str) + continue + # Lowercase the variable name because Emacs allows "Mode" + # or "mode" or "MoDe", etc. + emacs_vars[variable.lower()] = value.strip() + + tail = text[-SIZE:] + if "Local Variables" in tail: + match = self._emacs_local_vars_pat.search(tail) + if match: + prefix = match.group("prefix") + suffix = match.group("suffix") + lines = match.group("content").splitlines(0) + #print "prefix=%r, suffix=%r, content=%r, lines: %s"\ + # % (prefix, suffix, match.group("content"), lines) + + # Validate the Local Variables block: proper prefix and suffix + # usage. + for i, line in enumerate(lines): + if not line.startswith(prefix): + log.debug("emacs variables error: line '%s' " + "does not use proper prefix '%s'" + % (line, prefix)) + return {} + # Don't validate suffix on last line. Emacs doesn't care, + # neither should we. + if i != len(lines)-1 and not line.endswith(suffix): + log.debug("emacs variables error: line '%s' " + "does not use proper suffix '%s'" + % (line, suffix)) + return {} + + # Parse out one emacs var per line. + continued_for = None + for line in lines[:-1]: # no var on the last line ("PREFIX End:") + if prefix: line = line[len(prefix):] # strip prefix + if suffix: line = line[:-len(suffix)] # strip suffix + line = line.strip() + if continued_for: + variable = continued_for + if line.endswith('\\'): + line = line[:-1].rstrip() + else: + continued_for = None + emacs_vars[variable] += ' ' + line + else: + try: + variable, value = line.split(':', 1) + except ValueError: + log.debug("local variables error: missing colon " + "in local variables entry: '%s'" % line) + continue + # Do NOT lowercase the variable name, because Emacs only + # allows "mode" (and not "Mode", "MoDe", etc.) in this block. + value = value.strip() + if value.endswith('\\'): + value = value[:-1].rstrip() + continued_for = variable + else: + continued_for = None + emacs_vars[variable] = value + + # Unquote values. + for var, val in list(emacs_vars.items()): + if len(val) > 1 and (val.startswith('"') and val.endswith('"') + or val.startswith('"') and val.endswith('"')): + emacs_vars[var] = val[1:-1] + + return emacs_vars + + # Cribbed from a post by Bart Lateur: + # + _detab_re = re.compile(r'(.*?)\t', re.M) + def _detab_sub(self, match): + g1 = match.group(1) + return g1 + (' ' * (self.tab_width - len(g1) % self.tab_width)) + def _detab(self, text): + r"""Remove (leading?) tabs from a file. + + >>> m = Markdown() + >>> m._detab("\tfoo") + ' foo' + >>> m._detab(" \tfoo") + ' foo' + >>> m._detab("\t foo") + ' foo' + >>> m._detab(" foo") + ' foo' + >>> m._detab(" foo\n\tbar\tblam") + ' foo\n bar blam' + """ + if '\t' not in text: + return text + return self._detab_re.subn(self._detab_sub, text)[0] + + # I broke out the html5 tags here and add them to _block_tags_a and + # _block_tags_b. This way html5 tags are easy to keep track of. + _html5tags = '|article|aside|header|hgroup|footer|nav|section|figure|figcaption' + + _block_tags_a = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del' + _block_tags_a += _html5tags + + _strict_tag_block_re = re.compile(r""" + ( # save in \1 + ^ # start of line (with re.M) + <(%s) # start tag = \2 + \b # word break + (.*\n)*? # any number of lines, minimally matching + # the matching end tag + [ \t]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + ) + """ % _block_tags_a, + re.X | re.M) + + _block_tags_b = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math' + _block_tags_b += _html5tags + + _liberal_tag_block_re = re.compile(r""" + ( # save in \1 + ^ # start of line (with re.M) + <(%s) # start tag = \2 + \b # word break + (.*\n)*? # any number of lines, minimally matching + .* # the matching end tag + [ \t]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + ) + """ % _block_tags_b, + re.X | re.M) + + _html_markdown_attr_re = re.compile( + r'''\s+markdown=("1"|'1')''') + def _hash_html_block_sub(self, match, raw=False): + html = match.group(1) + if raw and self.safe_mode: + html = self._sanitize_html(html) + elif 'markdown-in-html' in self.extras and 'markdown=' in html: + first_line = html.split('\n', 1)[0] + m = self._html_markdown_attr_re.search(first_line) + if m: + lines = html.split('\n') + middle = '\n'.join(lines[1:-1]) + last_line = lines[-1] + first_line = first_line[:m.start()] + first_line[m.end():] + f_key = _hash_text(first_line) + self.html_blocks[f_key] = first_line + l_key = _hash_text(last_line) + self.html_blocks[l_key] = last_line + return ''.join(["\n\n", f_key, + "\n\n", middle, "\n\n", + l_key, "\n\n"]) + key = _hash_text(html) + self.html_blocks[key] = html + return "\n\n" + key + "\n\n" + + def _hash_html_blocks(self, text, raw=False): + """Hashify HTML blocks + + We only want to do this for block-level HTML tags, such as headers, + lists, and tables. That's because we still want to wrap

s around + "paragraphs" that are wrapped in non-block-level tags, such as anchors, + phrase emphasis, and spans. The list of tags we're looking for is + hard-coded. + + @param raw {boolean} indicates if these are raw HTML blocks in + the original source. It makes a difference in "safe" mode. + """ + if '<' not in text: + return text + + # Pass `raw` value into our calls to self._hash_html_block_sub. + hash_html_block_sub = _curry(self._hash_html_block_sub, raw=raw) + + # First, look for nested blocks, e.g.: + #

+ #
+ # tags for inner block must be indented. + #
+ #
+ # + # The outermost tags must start at the left margin for this to match, and + # the inner nested divs must be indented. + # We need to do this before the next, more liberal match, because the next + # match will start at the first `
` and stop at the first `
`. + text = self._strict_tag_block_re.sub(hash_html_block_sub, text) + + # Now match more liberally, simply from `\n` to `\n` + text = self._liberal_tag_block_re.sub(hash_html_block_sub, text) + + # Special case just for
. It was easier to make a special + # case than to make the other regex more complicated. + if "", start_idx) + 3 + except ValueError: + break + + # Start position for next comment block search. + start = end_idx + + # Validate whitespace before comment. + if start_idx: + # - Up to `tab_width - 1` spaces before start_idx. + for i in range(self.tab_width - 1): + if text[start_idx - 1] != ' ': + break + start_idx -= 1 + if start_idx == 0: + break + # - Must be preceded by 2 newlines or hit the start of + # the document. + if start_idx == 0: + pass + elif start_idx == 1 and text[0] == '\n': + start_idx = 0 # to match minute detail of Markdown.pl regex + elif text[start_idx-2:start_idx] == '\n\n': + pass + else: + break + + # Validate whitespace after comment. + # - Any number of spaces and tabs. + while end_idx < len(text): + if text[end_idx] not in ' \t': + break + end_idx += 1 + # - Must be following by 2 newlines or hit end of text. + if text[end_idx:end_idx+2] not in ('', '\n', '\n\n'): + continue + + # Escape and hash (must match `_hash_html_block_sub`). + html = text[start_idx:end_idx] + if raw and self.safe_mode: + html = self._sanitize_html(html) + key = _hash_text(html) + self.html_blocks[key] = html + text = text[:start_idx] + "\n\n" + key + "\n\n" + text[end_idx:] + + if "xml" in self.extras: + # Treat XML processing instructions and namespaced one-liner + # tags as if they were block HTML tags. E.g., if standalone + # (i.e. are their own paragraph), the following do not get + # wrapped in a

tag: + # + # + # + _xml_oneliner_re = _xml_oneliner_re_from_tab_width(self.tab_width) + text = _xml_oneliner_re.sub(hash_html_block_sub, text) + + return text + + def _strip_link_definitions(self, text): + # Strips link definitions from text, stores the URLs and titles in + # hash references. + less_than_tab = self.tab_width - 1 + + # Link defs are in the form: + # [id]: url "optional title" + _link_def_re = re.compile(r""" + ^[ ]{0,%d}\[(.+)\]: # id = \1 + [ \t]* + \n? # maybe *one* newline + [ \t]* + ? # url = \2 + [ \t]* + (?: + \n? # maybe one newline + [ \t]* + (?<=\s) # lookbehind for whitespace + ['"(] + ([^\n]*) # title = \3 + ['")] + [ \t]* + )? # title is optional + (?:\n+|\Z) + """ % less_than_tab, re.X | re.M | re.U) + return _link_def_re.sub(self._extract_link_def_sub, text) + + def _extract_link_def_sub(self, match): + id, url, title = match.groups() + key = id.lower() # Link IDs are case-insensitive + self.urls[key] = self._encode_amps_and_angles(url) + if title: + self.titles[key] = title + return "" + + def _extract_footnote_def_sub(self, match): + id, text = match.groups() + text = _dedent(text, skip_first_line=not text.startswith('\n')).strip() + normed_id = re.sub(r'\W', '-', id) + # Ensure footnote text ends with a couple newlines (for some + # block gamut matches). + self.footnotes[normed_id] = text + "\n\n" + return "" + + def _strip_footnote_definitions(self, text): + """A footnote definition looks like this: + + [^note-id]: Text of the note. + + May include one or more indented paragraphs. + + Where, + - The 'note-id' can be pretty much anything, though typically it + is the number of the footnote. + - The first paragraph may start on the next line, like so: + + [^note-id]: + Text of the note. + """ + less_than_tab = self.tab_width - 1 + footnote_def_re = re.compile(r''' + ^[ ]{0,%d}\[\^(.+)\]: # id = \1 + [ \t]* + ( # footnote text = \2 + # First line need not start with the spaces. + (?:\s*.*\n+) + (?: + (?:[ ]{%d} | \t) # Subsequent lines must be indented. + .*\n+ + )* + ) + # Lookahead for non-space at line-start, or end of doc. + (?:(?=^[ ]{0,%d}\S)|\Z) + ''' % (less_than_tab, self.tab_width, self.tab_width), + re.X | re.M) + return footnote_def_re.sub(self._extract_footnote_def_sub, text) + + + _hr_data = [ + ('*', re.compile(r"^[ ]{0,3}\*(.*?)$", re.M)), + ('-', re.compile(r"^[ ]{0,3}\-(.*?)$", re.M)), + ('_', re.compile(r"^[ ]{0,3}\_(.*?)$", re.M)), + ] + + def _run_block_gamut(self, text): + # These are all the transformations that form block-level + # tags like paragraphs, headers, and list items. + + if "fenced-code-blocks" in self.extras: + text = self._do_fenced_code_blocks(text) + + text = self._do_headers(text) + + # Do Horizontal Rules: + # On the number of spaces in horizontal rules: The spec is fuzzy: "If + # you wish, you may use spaces between the hyphens or asterisks." + # Markdown.pl 1.0.1's hr regexes limit the number of spaces between the + # hr chars to one or two. We'll reproduce that limit here. + hr = "\n tags around block-level tags. + text = self._hash_html_blocks(text) + + text = self._form_paragraphs(text) + + return text + + def _pyshell_block_sub(self, match): + lines = match.group(0).splitlines(0) + _dedentlines(lines) + indent = ' ' * self.tab_width + s = ('\n' # separate from possible cuddled paragraph + + indent + ('\n'+indent).join(lines) + + '\n\n') + return s + + def _prepare_pyshell_blocks(self, text): + """Ensure that Python interactive shell sessions are put in + code blocks -- even if not properly indented. + """ + if ">>>" not in text: + return text + + less_than_tab = self.tab_width - 1 + _pyshell_block_re = re.compile(r""" + ^([ ]{0,%d})>>>[ ].*\n # first line + ^(\1.*\S+.*\n)* # any number of subsequent lines + ^\n # ends with a blank line + """ % less_than_tab, re.M | re.X) + + return _pyshell_block_re.sub(self._pyshell_block_sub, text) + + def _wiki_table_sub(self, match): + ttext = match.group(0).strip() + #print 'wiki table: %r' % match.group(0) + rows = [] + for line in ttext.splitlines(0): + line = line.strip()[2:-2].strip() + row = [c.strip() for c in re.split(r'(?', '

'] + for row in rows: + hrow = [''] + for cell in row: + hrow.append('') + hrow.append('') + hlines.append(''.join(hrow)) + hlines += ['', '
') + hrow.append(self._run_span_gamut(cell)) + hrow.append('
'] + return '\n'.join(hlines) + '\n' + + def _do_wiki_tables(self, text): + # Optimization. + if "||" not in text: + return text + + less_than_tab = self.tab_width - 1 + wiki_table_re = re.compile(r''' + (?:(?<=\n\n)|\A\n?) # leading blank line + ^([ ]{0,%d})\|\|.+?\|\|[ ]*\n # first line + (^\1\|\|.+?\|\|\n)* # any number of subsequent lines + ''' % less_than_tab, re.M | re.X) + return wiki_table_re.sub(self._wiki_table_sub, text) + + def _run_span_gamut(self, text): + # These are all the transformations that occur *within* block-level + # tags like paragraphs, headers, and list items. + + text = self._do_code_spans(text) + + text = self._escape_special_chars(text) + + # Process anchor and image tags. + text = self._do_links(text) + + # Make links out of things like `` + # Must come after _do_links(), because you can use < and > + # delimiters in inline links like [this](). + text = self._do_auto_links(text) + + if "link-patterns" in self.extras: + text = self._do_link_patterns(text) + + text = self._encode_amps_and_angles(text) + + text = self._do_italics_and_bold(text) + + if "smarty-pants" in self.extras: + text = self._do_smart_punctuation(text) + + # Do hard breaks: + text = re.sub(r" {2,}\n", " + | + # auto-link (e.g., ) + <\w+[^>]*> + | + # comment + | + <\?.*?\?> # processing instruction + ) + """, re.X) + + def _escape_special_chars(self, text): + # Python markdown note: the HTML tokenization here differs from + # that in Markdown.pl, hence the behaviour for subtle cases can + # differ (I believe the tokenizer here does a better job because + # it isn't susceptible to unmatched '<' and '>' in HTML tags). + # Note, however, that '>' is not allowed in an auto-link URL + # here. + escaped = [] + is_html_markup = False + for token in self._sorta_html_tokenize_re.split(text): + if is_html_markup: + # Within tags/HTML-comments/auto-links, encode * and _ + # so they don't conflict with their use in Markdown for + # italics and strong. We're replacing each such + # character with its corresponding MD5 checksum value; + # this is likely overkill, but it should prevent us from + # colliding with the escape values by accident. + escaped.append(token.replace('*', self._escape_table['*']) + .replace('_', self._escape_table['_'])) + else: + escaped.append(self._encode_backslash_escapes(token)) + is_html_markup = not is_html_markup + return ''.join(escaped) + + def _hash_html_spans(self, text): + # Used for safe_mode. + + def _is_auto_link(s): + if ':' in s and self._auto_link_re.match(s): + return True + elif '@' in s and self._auto_email_link_re.match(s): + return True + return False + + tokens = [] + is_html_markup = False + for token in self._sorta_html_tokenize_re.split(text): + if is_html_markup and not _is_auto_link(token): + sanitized = self._sanitize_html(token) + key = _hash_text(sanitized) + self.html_spans[key] = sanitized + tokens.append(key) + else: + tokens.append(token) + is_html_markup = not is_html_markup + return ''.join(tokens) + + def _unhash_html_spans(self, text): + for key, sanitized in list(self.html_spans.items()): + text = text.replace(key, sanitized) + return text + + def _sanitize_html(self, s): + if self.safe_mode == "replace": + return self.html_removed_text + elif self.safe_mode == "escape": + replacements = [ + ('&', '&'), + ('<', '<'), + ('>', '>'), + ] + for before, after in replacements: + s = s.replace(before, after) + return s + else: + raise MarkdownError("invalid value for 'safe_mode': %r (must be " + "'escape' or 'replace')" % self.safe_mode) + + _tail_of_inline_link_re = re.compile(r''' + # Match tail of: [text](/url/) or [text](/url/ "title") + \( # literal paren + [ \t]* + (?P # \1 + <.*?> + | + .*? + ) + [ \t]* + ( # \2 + (['"]) # quote char = \3 + (?P.*?) + \3 # matching quote + )? # title is optional + \) + ''', re.X | re.S) + _tail_of_reference_link_re = re.compile(r''' + # Match tail of: [text][id] + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + \[ + (?P<id>.*?) + \] + ''', re.X | re.S) + + def _do_links(self, text): + """Turn Markdown link shortcuts into XHTML <a> and <img> tags. + + This is a combination of Markdown.pl's _DoAnchors() and + _DoImages(). They are done together because that simplified the + approach. It was necessary to use a different approach than + Markdown.pl because of the lack of atomic matching support in + Python's regex engine used in $g_nested_brackets. + """ + MAX_LINK_TEXT_SENTINEL = 3000 # markdown2 issue 24 + + # `anchor_allowed_pos` is used to support img links inside + # anchors, but not anchors inside anchors. An anchor's start + # pos must be `>= anchor_allowed_pos`. + anchor_allowed_pos = 0 + + curr_pos = 0 + while True: # Handle the next link. + # The next '[' is the start of: + # - an inline anchor: [text](url "title") + # - a reference anchor: [text][id] + # - an inline img: ![text](url "title") + # - a reference img: ![text][id] + # - a footnote ref: [^id] + # (Only if 'footnotes' extra enabled) + # - a footnote defn: [^id]: ... + # (Only if 'footnotes' extra enabled) These have already + # been stripped in _strip_footnote_definitions() so no + # need to watch for them. + # - a link definition: [id]: url "title" + # These have already been stripped in + # _strip_link_definitions() so no need to watch for them. + # - not markup: [...anything else... + try: + start_idx = text.index('[', curr_pos) + except ValueError: + break + text_length = len(text) + + # Find the matching closing ']'. + # Markdown.pl allows *matching* brackets in link text so we + # will here too. Markdown.pl *doesn't* currently allow + # matching brackets in img alt text -- we'll differ in that + # regard. + bracket_depth = 0 + for p in range(start_idx+1, min(start_idx+MAX_LINK_TEXT_SENTINEL, + text_length)): + ch = text[p] + if ch == ']': + bracket_depth -= 1 + if bracket_depth < 0: + break + elif ch == '[': + bracket_depth += 1 + else: + # Closing bracket not found within sentinel length. + # This isn't markup. + curr_pos = start_idx + 1 + continue + link_text = text[start_idx+1:p] + + # Possibly a footnote ref? + if "footnotes" in self.extras and link_text.startswith("^"): + normed_id = re.sub(r'\W', '-', link_text[1:]) + if normed_id in self.footnotes: + self.footnote_ids.append(normed_id) + result = '<sup class="footnote-ref" id="fnref-%s">' \ + '<a href="#fn-%s">%s</a></sup>' \ + % (normed_id, normed_id, len(self.footnote_ids)) + text = text[:start_idx] + result + text[p+1:] + else: + # This id isn't defined, leave the markup alone. + curr_pos = p+1 + continue + + # Now determine what this is by the remainder. + p += 1 + if p == text_length: + return text + + # Inline anchor or img? + if text[p] == '(': # attempt at perf improvement + match = self._tail_of_inline_link_re.match(text, p) + if match: + # Handle an inline anchor or img. + is_img = start_idx > 0 and text[start_idx-1] == "!" + if is_img: + start_idx -= 1 + + url, title = match.group("url"), match.group("title") + if url and url[0] == '<': + url = url[1:-1] # '<url>' -> 'url' + # We've got to encode these to avoid conflicting + # with italics/bold. + url = url.replace('*', self._escape_table['*']) \ + .replace('_', self._escape_table['_']) + if title: + title_str = ' title="%s"' % ( + _xml_escape_attr(title) + .replace('*', self._escape_table['*']) + .replace('_', self._escape_table['_'])) + else: + title_str = '' + if is_img: + result = '<img src="%s" alt="%s"%s%s' \ + % (url.replace('"', '"'), + _xml_escape_attr(link_text), + title_str, self.empty_element_suffix) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + curr_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + elif start_idx >= anchor_allowed_pos: + result_head = '<a href="%s"%s>' % (url, title_str) + result = '%s%s</a>' % (result_head, link_text) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + # <img> allowed from curr_pos on, <a> from + # anchor_allowed_pos on. + curr_pos = start_idx + len(result_head) + anchor_allowed_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + else: + # Anchor not allowed here. + curr_pos = start_idx + 1 + continue + + # Reference anchor or img? + else: + match = self._tail_of_reference_link_re.match(text, p) + if match: + # Handle a reference-style anchor or img. + is_img = start_idx > 0 and text[start_idx-1] == "!" + if is_img: + start_idx -= 1 + link_id = match.group("id").lower() + if not link_id: + link_id = link_text.lower() # for links like [this][] + if link_id in self.urls: + url = self.urls[link_id] + # We've got to encode these to avoid conflicting + # with italics/bold. + url = url.replace('*', self._escape_table['*']) \ + .replace('_', self._escape_table['_']) + title = self.titles.get(link_id) + if title: + before = title + title = _xml_escape_attr(title) \ + .replace('*', self._escape_table['*']) \ + .replace('_', self._escape_table['_']) + title_str = ' title="%s"' % title + else: + title_str = '' + if is_img: + result = '<img src="%s" alt="%s"%s%s' \ + % (url.replace('"', '"'), + link_text.replace('"', '"'), + title_str, self.empty_element_suffix) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + curr_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + elif start_idx >= anchor_allowed_pos: + result = '<a href="%s"%s>%s</a>' \ + % (url, title_str, link_text) + result_head = '<a href="%s"%s>' % (url, title_str) + result = '%s%s</a>' % (result_head, link_text) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + # <img> allowed from curr_pos on, <a> from + # anchor_allowed_pos on. + curr_pos = start_idx + len(result_head) + anchor_allowed_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + else: + # Anchor not allowed here. + curr_pos = start_idx + 1 + else: + # This id isn't defined, leave the markup alone. + curr_pos = match.end() + continue + + # Otherwise, it isn't markup. + curr_pos = start_idx + 1 + + return text + + def header_id_from_text(self, text, prefix, n): + """Generate a header id attribute value from the given header + HTML content. + + This is only called if the "header-ids" extra is enabled. + Subclasses may override this for different header ids. + + @param text {str} The text of the header tag + @param prefix {str} The requested prefix for header ids. This is the + value of the "header-ids" extra key, if any. Otherwise, None. + @param n {int} The <hN> tag number, i.e. `1` for an <h1> tag. + @returns {str} The value for the header tag's "id" attribute. Return + None to not have an id attribute and to exclude this header from + the TOC (if the "toc" extra is specified). + """ + header_id = _slugify(text) + if prefix and isinstance(prefix, base_string_type): + header_id = prefix + '-' + header_id + if header_id in self._count_from_header_id: + self._count_from_header_id[header_id] += 1 + header_id += '-%s' % self._count_from_header_id[header_id] + else: + self._count_from_header_id[header_id] = 1 + return header_id + + _toc = None + def _toc_add_entry(self, level, id, name): + if self._toc is None: + self._toc = [] + self._toc.append((level, id, self._unescape_special_chars(name))) + + _setext_h_re = re.compile(r'^(.+)[ \t]*\n(=+|-+)[ \t]*\n+', re.M) + def _setext_h_sub(self, match): + n = {"=": 1, "-": 2}[match.group(2)[0]] + demote_headers = self.extras.get("demote-headers") + if demote_headers: + n = min(n + demote_headers, 6) + header_id_attr = "" + if "header-ids" in self.extras: + header_id = self.header_id_from_text(match.group(1), + self.extras["header-ids"], n) + if header_id: + header_id_attr = ' id="%s"' % header_id + html = self._run_span_gamut(match.group(1)) + if "toc" in self.extras and header_id: + self._toc_add_entry(n, header_id, html) + return "<h%d%s>%s</h%d>\n\n" % (n, header_id_attr, html, n) + + _atx_h_re = re.compile(r''' + ^(\#{1,6}) # \1 = string of #'s + [ \t]+ + (.+?) # \2 = Header text + [ \t]* + (?<!\\) # ensure not an escaped trailing '#' + \#* # optional closing #'s (not counted) + \n+ + ''', re.X | re.M) + def _atx_h_sub(self, match): + n = len(match.group(1)) + demote_headers = self.extras.get("demote-headers") + if demote_headers: + n = min(n + demote_headers, 6) + header_id_attr = "" + if "header-ids" in self.extras: + header_id = self.header_id_from_text(match.group(2), + self.extras["header-ids"], n) + if header_id: + header_id_attr = ' id="%s"' % header_id + html = self._run_span_gamut(match.group(2)) + if "toc" in self.extras and header_id: + self._toc_add_entry(n, header_id, html) + return "<h%d%s>%s</h%d>\n\n" % (n, header_id_attr, html, n) + + def _do_headers(self, text): + # Setext-style headers: + # Header 1 + # ======== + # + # Header 2 + # -------- + text = self._setext_h_re.sub(self._setext_h_sub, text) + + # atx-style headers: + # # Header 1 + # ## Header 2 + # ## Header 2 with closing hashes ## + # ... + # ###### Header 6 + text = self._atx_h_re.sub(self._atx_h_sub, text) + + return text + + + _marker_ul_chars = '*+-' + _marker_any = r'(?:[%s]|\d+\.)' % _marker_ul_chars + _marker_ul = '(?:[%s])' % _marker_ul_chars + _marker_ol = r'(?:\d+\.)' + + def _list_sub(self, match): + lst = match.group(1) + lst_type = match.group(3) in self._marker_ul_chars and "ul" or "ol" + result = self._process_list_items(lst) + if self.list_level: + return "<%s>\n%s</%s>\n" % (lst_type, result, lst_type) + else: + return "<%s>\n%s</%s>\n\n" % (lst_type, result, lst_type) + + def _do_lists(self, text): + # Form HTML ordered (numbered) and unordered (bulleted) lists. + + # Iterate over each *non-overlapping* list match. + pos = 0 + while True: + # Find the *first* hit for either list style (ul or ol). We + # match ul and ol separately to avoid adjacent lists of different + # types running into each other (see issue #16). + hits = [] + for marker_pat in (self._marker_ul, self._marker_ol): + less_than_tab = self.tab_width - 1 + whole_list = r''' + ( # \1 = whole list + ( # \2 + [ ]{0,%d} + (%s) # \3 = first list item marker + [ \t]+ + (?!\ *\3\ ) # '- - - ...' isn't a list. See 'not_quite_a_list' test case. + ) + (?:.+?) + ( # \4 + \Z + | + \n{2,} + (?=\S) + (?! # Negative lookahead for another list item marker + [ \t]* + %s[ \t]+ + ) + ) + ) + ''' % (less_than_tab, marker_pat, marker_pat) + if self.list_level: # sub-list + list_re = re.compile("^"+whole_list, re.X | re.M | re.S) + else: + list_re = re.compile(r"(?:(?<=\n\n)|\A\n?)"+whole_list, + re.X | re.M | re.S) + match = list_re.search(text, pos) + if match: + hits.append((match.start(), match)) + if not hits: + break + hits.sort() + match = hits[0][1] + start, end = match.span() + text = text[:start] + self._list_sub(match) + text[end:] + pos = end + + return text + + _list_item_re = re.compile(r''' + (\n)? # leading line = \1 + (^[ \t]*) # leading whitespace = \2 + (?P<marker>%s) [ \t]+ # list marker = \3 + ((?:.+?) # list item text = \4 + (\n{1,2})) # eols = \5 + (?= \n* (\Z | \2 (?P<next_marker>%s) [ \t]+)) + ''' % (_marker_any, _marker_any), + re.M | re.X | re.S) + + _last_li_endswith_two_eols = False + def _list_item_sub(self, match): + item = match.group(4) + leading_line = match.group(1) + leading_space = match.group(2) + if leading_line or "\n\n" in item or self._last_li_endswith_two_eols: + item = self._run_block_gamut(self._outdent(item)) + else: + # Recursion for sub-lists: + item = self._do_lists(self._outdent(item)) + if item.endswith('\n'): + item = item[:-1] + item = self._run_span_gamut(item) + self._last_li_endswith_two_eols = (len(match.group(5)) == 2) + return "<li>%s</li>\n" % item + + def _process_list_items(self, list_str): + # Process the contents of a single ordered or unordered list, + # splitting it into individual list items. + + # The $g_list_level global keeps track of when we're inside a list. + # Each time we enter a list, we increment it; when we leave a list, + # we decrement. If it's zero, we're not in a list anymore. + # + # We do this because when we're not inside a list, we want to treat + # something like this: + # + # I recommend upgrading to version + # 8. Oops, now this line is treated + # as a sub-list. + # + # As a single paragraph, despite the fact that the second line starts + # with a digit-period-space sequence. + # + # Whereas when we're inside a list (or sub-list), that line will be + # treated as the start of a sub-list. What a kludge, huh? This is + # an aspect of Markdown's syntax that's hard to parse perfectly + # without resorting to mind-reading. Perhaps the solution is to + # change the syntax rules such that sub-lists must start with a + # starting cardinal number; e.g. "1." or "a.". + self.list_level += 1 + self._last_li_endswith_two_eols = False + list_str = list_str.rstrip('\n') + '\n' + list_str = self._list_item_re.sub(self._list_item_sub, list_str) + self.list_level -= 1 + return list_str + + def _get_pygments_lexer(self, lexer_name): + try: + from pygments import lexers, util + except ImportError: + return None + try: + return lexers.get_lexer_by_name(lexer_name) + except util.ClassNotFound: + return None + + def _color_with_pygments(self, codeblock, lexer, **formatter_opts): + import pygments + import pygments.formatters + + class HtmlCodeFormatter(pygments.formatters.HtmlFormatter): + def _wrap_code(self, inner): + """A function for use in a Pygments Formatter which + wraps in <code> tags. + """ + yield 0, "<code>" + for tup in inner: + yield tup + yield 0, "</code>" + + def wrap(self, source, outfile): + """Return the source with a code, pre, and div.""" + return self._wrap_div(self._wrap_pre(self._wrap_code(source))) + + formatter_opts.setdefault("cssclass", "codehilite") + formatter = HtmlCodeFormatter(**formatter_opts) + return pygments.highlight(codeblock, lexer, formatter) + + def _code_block_sub(self, match, is_fenced_code_block=False): + lexer_name = None + if is_fenced_code_block: + lexer_name = match.group(1) + if lexer_name: + formatter_opts = self.extras['fenced-code-blocks'] or {} + codeblock = match.group(2) + codeblock = codeblock[:-1] # drop one trailing newline + else: + codeblock = match.group(1) + codeblock = self._outdent(codeblock) + codeblock = self._detab(codeblock) + codeblock = codeblock.lstrip('\n') # trim leading newlines + codeblock = codeblock.rstrip() # trim trailing whitespace + + # Note: "code-color" extra is DEPRECATED. + if "code-color" in self.extras and codeblock.startswith(":::"): + lexer_name, rest = codeblock.split('\n', 1) + lexer_name = lexer_name[3:].strip() + codeblock = rest.lstrip("\n") # Remove lexer declaration line. + formatter_opts = self.extras['code-color'] or {} + + if lexer_name: + lexer = self._get_pygments_lexer(lexer_name) + if lexer: + colored = self._color_with_pygments(codeblock, lexer, + **formatter_opts) + return "\n\n%s\n\n" % colored + + codeblock = self._encode_code(codeblock) + pre_class_str = self._html_class_str_from_tag("pre") + code_class_str = self._html_class_str_from_tag("code") + return "\n\n<pre%s><code%s>%s\n</code></pre>\n\n" % ( + pre_class_str, code_class_str, codeblock) + + def _html_class_str_from_tag(self, tag): + """Get the appropriate ' class="..."' string (note the leading + space), if any, for the given tag. + """ + if "html-classes" not in self.extras: + return "" + try: + html_classes_from_tag = self.extras["html-classes"] + except TypeError: + return "" + else: + if tag in html_classes_from_tag: + return ' class="%s"' % html_classes_from_tag[tag] + return "" + + def _do_code_blocks(self, text): + """Process Markdown `<pre><code>` blocks.""" + code_block_re = re.compile(r''' + (?:\n\n|\A\n?) + ( # $1 = the code block -- one or more lines, starting with a space/tab + (?: + (?:[ ]{%d} | \t) # Lines must start with a tab or a tab-width of spaces + .*\n+ + )+ + ) + ((?=^[ ]{0,%d}\S)|\Z) # Lookahead for non-space at line-start, or end of doc + ''' % (self.tab_width, self.tab_width), + re.M | re.X) + return code_block_re.sub(self._code_block_sub, text) + + _fenced_code_block_re = re.compile(r''' + (?:\n\n|\A\n?) + ^```([\w+-]+)?[ \t]*\n # opening fence, $1 = optional lang + (.*?) # $2 = code block content + ^```[ \t]*\n # closing fence + ''', re.M | re.X | re.S) + + def _fenced_code_block_sub(self, match): + return self._code_block_sub(match, is_fenced_code_block=True); + + def _do_fenced_code_blocks(self, text): + """Process ```-fenced unindented code blocks ('fenced-code-blocks' extra).""" + return self._fenced_code_block_re.sub(self._fenced_code_block_sub, text) + + # Rules for a code span: + # - backslash escapes are not interpreted in a code span + # - to include one or or a run of more backticks the delimiters must + # be a longer run of backticks + # - cannot start or end a code span with a backtick; pad with a + # space and that space will be removed in the emitted HTML + # See `test/tm-cases/escapes.text` for a number of edge-case + # examples. + _code_span_re = re.compile(r''' + (?<!\\) + (`+) # \1 = Opening run of ` + (?!`) # See Note A test/tm-cases/escapes.text + (.+?) # \2 = The code block + (?<!`) + \1 # Matching closer + (?!`) + ''', re.X | re.S) + + def _code_span_sub(self, match): + c = match.group(2).strip(" \t") + c = self._encode_code(c) + return "<code>%s</code>" % c + + def _do_code_spans(self, text): + # * Backtick quotes are used for <code></code> spans. + # + # * You can use multiple backticks as the delimiters if you want to + # include literal backticks in the code span. So, this input: + # + # Just type ``foo `bar` baz`` at the prompt. + # + # Will translate to: + # + # <p>Just type <code>foo `bar` baz</code> at the prompt.</p> + # + # There's no arbitrary limit to the number of backticks you + # can use as delimters. If you need three consecutive backticks + # in your code, use four for delimiters, etc. + # + # * You can use spaces to get literal backticks at the edges: + # + # ... type `` `bar` `` ... + # + # Turns to: + # + # ... type <code>`bar`</code> ... + return self._code_span_re.sub(self._code_span_sub, text) + + def _encode_code(self, text): + """Encode/escape certain characters inside Markdown code runs. + The point is that in code, these characters are literals, + and lose their special Markdown meanings. + """ + replacements = [ + # Encode all ampersands; HTML entities are not + # entities within a Markdown code span. + ('&', '&'), + # Do the angle bracket song and dance: + ('<', '<'), + ('>', '>'), + ] + for before, after in replacements: + text = text.replace(before, after) + hashed = _hash_text(text) + self._escape_table[text] = hashed + return hashed + + _strong_re = re.compile(r"(\*\*|__)(?=\S)(.+?[*_]*)(?<=\S)\1", re.S) + _em_re = re.compile(r"(\*|_)(?=\S)(.+?)(?<=\S)\1", re.S) + _code_friendly_strong_re = re.compile(r"\*\*(?=\S)(.+?[*_]*)(?<=\S)\*\*", re.S) + _code_friendly_em_re = re.compile(r"\*(?=\S)(.+?)(?<=\S)\*", re.S) + def _do_italics_and_bold(self, text): + # <strong> must go first: + if "code-friendly" in self.extras: + text = self._code_friendly_strong_re.sub(r"<strong>\1</strong>", text) + text = self._code_friendly_em_re.sub(r"<em>\1</em>", text) + else: + text = self._strong_re.sub(r"<strong>\2</strong>", text) + text = self._em_re.sub(r"<em>\2</em>", text) + return text + + # "smarty-pants" extra: Very liberal in interpreting a single prime as an + # apostrophe; e.g. ignores the fact that "round", "bout", "twer", and + # "twixt" can be written without an initial apostrophe. This is fine because + # using scare quotes (single quotation marks) is rare. + _apostrophe_year_re = re.compile(r"'(\d\d)(?=(\s|,|;|\.|\?|!|$))") + _contractions = ["tis", "twas", "twer", "neath", "o", "n", + "round", "bout", "twixt", "nuff", "fraid", "sup"] + def _do_smart_contractions(self, text): + text = self._apostrophe_year_re.sub(r"’\1", text) + for c in self._contractions: + text = text.replace("'%s" % c, "’%s" % c) + text = text.replace("'%s" % c.capitalize(), + "’%s" % c.capitalize()) + return text + + # Substitute double-quotes before single-quotes. + _opening_single_quote_re = re.compile(r"(?<!\S)'(?=\S)") + _opening_double_quote_re = re.compile(r'(?<!\S)"(?=\S)') + _closing_single_quote_re = re.compile(r"(?<=\S)'") + _closing_double_quote_re = re.compile(r'(?<=\S)"(?=(\s|,|;|\.|\?|!|$))') + def _do_smart_punctuation(self, text): + """Fancifies 'single quotes', "double quotes", and apostrophes. + Converts --, ---, and ... into en dashes, em dashes, and ellipses. + + Inspiration is: <http://daringfireball.net/projects/smartypants/> + See "test/tm-cases/smarty_pants.text" for a full discussion of the + support here and + <http://code.google.com/p/python-markdown2/issues/detail?id=42> for a + discussion of some diversion from the original SmartyPants. + """ + if "'" in text: # guard for perf + text = self._do_smart_contractions(text) + text = self._opening_single_quote_re.sub("‘", text) + text = self._closing_single_quote_re.sub("’", text) + + if '"' in text: # guard for perf + text = self._opening_double_quote_re.sub("“", text) + text = self._closing_double_quote_re.sub("”", text) + + text = text.replace("---", "—") + text = text.replace("--", "–") + text = text.replace("...", "…") + text = text.replace(" . . . ", "…") + text = text.replace(". . .", "…") + return text + + _block_quote_re = re.compile(r''' + ( # Wrap whole match in \1 + ( + ^[ \t]*>[ \t]? # '>' at the start of a line + .+\n # rest of the first line + (.+\n)* # subsequent consecutive lines + \n* # blanks + )+ + ) + ''', re.M | re.X) + _bq_one_level_re = re.compile('^[ \t]*>[ \t]?', re.M); + + _html_pre_block_re = re.compile(r'(\s*<pre>.+?</pre>)', re.S) + def _dedent_two_spaces_sub(self, match): + return re.sub(r'(?m)^ ', '', match.group(1)) + + def _block_quote_sub(self, match): + bq = match.group(1) + bq = self._bq_one_level_re.sub('', bq) # trim one level of quoting + bq = self._ws_only_line_re.sub('', bq) # trim whitespace-only lines + bq = self._run_block_gamut(bq) # recurse + + bq = re.sub('(?m)^', ' ', bq) + # These leading spaces screw with <pre> content, so we need to fix that: + bq = self._html_pre_block_re.sub(self._dedent_two_spaces_sub, bq) + + return "<blockquote>\n%s\n</blockquote>\n\n" % bq + + def _do_block_quotes(self, text): + if '>' not in text: + return text + return self._block_quote_re.sub(self._block_quote_sub, text) + + def _form_paragraphs(self, text): + # Strip leading and trailing lines: + text = text.strip('\n') + + # Wrap <p> tags. + grafs = [] + for i, graf in enumerate(re.split(r"\n{2,}", text)): + if graf in self.html_blocks: + # Unhashify HTML blocks + grafs.append(self.html_blocks[graf]) + else: + cuddled_list = None + if "cuddled-lists" in self.extras: + # Need to put back trailing '\n' for `_list_item_re` + # match at the end of the paragraph. + li = self._list_item_re.search(graf + '\n') + # Two of the same list marker in this paragraph: a likely + # candidate for a list cuddled to preceding paragraph + # text (issue 33). Note the `[-1]` is a quick way to + # consider numeric bullets (e.g. "1." and "2.") to be + # equal. + if (li and len(li.group(2)) <= 3 and li.group("next_marker") + and li.group("marker")[-1] == li.group("next_marker")[-1]): + start = li.start() + cuddled_list = self._do_lists(graf[start:]).rstrip("\n") + assert cuddled_list.startswith("<ul>") or cuddled_list.startswith("<ol>") + graf = graf[:start] + + # Wrap <p> tags. + graf = self._run_span_gamut(graf) + grafs.append("<p>" + graf.lstrip(" \t") + "</p>") + + if cuddled_list: + grafs.append(cuddled_list) + + return "\n\n".join(grafs) + + def _add_footnotes(self, text): + if self.footnotes: + footer = [ + '<div class="footnotes">', + '<hr' + self.empty_element_suffix, + '<ol>', + ] + for i, id in enumerate(self.footnote_ids): + if i != 0: + footer.append('') + footer.append('<li id="fn-%s">' % id) + footer.append(self._run_block_gamut(self.footnotes[id])) + backlink = ('<a href="#fnref-%s" ' + 'class="footnoteBackLink" ' + 'title="Jump back to footnote %d in the text.">' + '↩</a>' % (id, i+1)) + if footer[-1].endswith("</p>"): + footer[-1] = footer[-1][:-len("</p>")] \ + + ' ' + backlink + "</p>" + else: + footer.append("\n<p>%s</p>" % backlink) + footer.append('</li>') + footer.append('</ol>') + footer.append('</div>') + return text + '\n\n' + '\n'.join(footer) + else: + return text + + # Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: + # http://bumppo.net/projects/amputator/ + _ampersand_re = re.compile(r'&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)') + _naked_lt_re = re.compile(r'<(?![a-z/?\$!])', re.I) + _naked_gt_re = re.compile(r'''(?<![a-z0-9?!/'"-])>''', re.I) + + def _encode_amps_and_angles(self, text): + # Smart processing for ampersands and angle brackets that need + # to be encoded. + text = self._ampersand_re.sub('&', text) + + # Encode naked <'s + text = self._naked_lt_re.sub('<', text) + + # Encode naked >'s + # Note: Other markdown implementations (e.g. Markdown.pl, PHP + # Markdown) don't do this. + text = self._naked_gt_re.sub('>', text) + return text + + def _encode_backslash_escapes(self, text): + for ch, escape in list(self._escape_table.items()): + text = text.replace("\\"+ch, escape) + return text + + _auto_link_re = re.compile(r'<((https?|ftp):[^\'">\s]+)>', re.I) + def _auto_link_sub(self, match): + g1 = match.group(1) + return '<a href="%s">%s</a>' % (g1, g1) + + _auto_email_link_re = re.compile(r""" + < + (?:mailto:)? + ( + [-.\w]+ + \@ + [-\w]+(\.[-\w]+)*\.[a-z]+ + ) + > + """, re.I | re.X | re.U) + def _auto_email_link_sub(self, match): + return self._encode_email_address( + self._unescape_special_chars(match.group(1))) + + def _do_auto_links(self, text): + text = self._auto_link_re.sub(self._auto_link_sub, text) + text = self._auto_email_link_re.sub(self._auto_email_link_sub, text) + return text + + def _encode_email_address(self, addr): + # Input: an email address, e.g. "foo@example.com" + # + # Output: the email address as a mailto link, with each character + # of the address encoded as either a decimal or hex entity, in + # the hopes of foiling most address harvesting spam bots. E.g.: + # + # <a href="mailto:foo@e + # xample.com">foo + # @example.com</a> + # + # Based on a filter by Matthew Wickline, posted to the BBEdit-Talk + # mailing list: <http://tinyurl.com/yu7ue> + chars = [_xml_encode_email_char_at_random(ch) + for ch in "mailto:" + addr] + # Strip the mailto: from the visible part. + addr = '<a href="%s">%s</a>' \ + % (''.join(chars), ''.join(chars[7:])) + return addr + + def _do_link_patterns(self, text): + """Caveat emptor: there isn't much guarding against link + patterns being formed inside other standard Markdown links, e.g. + inside a [link def][like this]. + + Dev Notes: *Could* consider prefixing regexes with a negative + lookbehind assertion to attempt to guard against this. + """ + link_from_hash = {} + for regex, repl in self.link_patterns: + replacements = [] + for match in regex.finditer(text): + if hasattr(repl, "__call__"): + href = repl(match) + else: + href = match.expand(repl) + replacements.append((match.span(), href)) + for (start, end), href in reversed(replacements): + escaped_href = ( + href.replace('"', '"') # b/c of attr quote + # To avoid markdown <em> and <strong>: + .replace('*', self._escape_table['*']) + .replace('_', self._escape_table['_'])) + link = '<a href="%s">%s</a>' % (escaped_href, text[start:end]) + hash = _hash_text(link) + link_from_hash[hash] = link + text = text[:start] + hash + text[end:] + for hash, link in list(link_from_hash.items()): + text = text.replace(hash, link) + return text + + def _unescape_special_chars(self, text): + # Swap back in all the special characters we've hidden. + for ch, hash in list(self._escape_table.items()): + text = text.replace(hash, ch) + return text + + def _outdent(self, text): + # Remove one level of line-leading tabs or spaces + return self._outdent_re.sub('', text) + + +class MarkdownWithExtras(Markdown): + """A markdowner class that enables most extras: + + - footnotes + - code-color (only has effect if 'pygments' Python module on path) + + These are not included: + - pyshell (specific to Python-related documenting) + - code-friendly (because it *disables* part of the syntax) + - link-patterns (because you need to specify some actual + link-patterns anyway) + """ + extras = ["footnotes", "code-color"] + + +#---- internal support functions + +class UnicodeWithAttrs(unicode): + """A subclass of unicode used for the return value of conversion to + possibly attach some attributes. E.g. the "toc_html" attribute when + the "toc" extra is used. + """ + metadata = None + _toc = None + def toc_html(self): + """Return the HTML for the current TOC. + + This expects the `_toc` attribute to have been set on this instance. + """ + if self._toc is None: + return None + + def indent(): + return ' ' * (len(h_stack) - 1) + lines = [] + h_stack = [0] # stack of header-level numbers + for level, id, name in self._toc: + if level > h_stack[-1]: + lines.append("%s<ul>" % indent()) + h_stack.append(level) + elif level == h_stack[-1]: + lines[-1] += "</li>" + else: + while level < h_stack[-1]: + h_stack.pop() + if not lines[-1].endswith("</li>"): + lines[-1] += "</li>" + lines.append("%s</ul></li>" % indent()) + lines.append('%s<li><a href="#%s">%s</a>' % ( + indent(), id, name)) + while len(h_stack) > 1: + h_stack.pop() + if not lines[-1].endswith("</li>"): + lines[-1] += "</li>" + lines.append("%s</ul>" % indent()) + return '\n'.join(lines) + '\n' + toc_html = property(toc_html) + +## {{{ http://code.activestate.com/recipes/577257/ (r1) +_slugify_strip_re = re.compile(r'[^\w\s-]') +_slugify_hyphenate_re = re.compile(r'[-\s]+') +def _slugify(value): + """ + Normalizes string, converts to lowercase, removes non-alpha characters, + and converts spaces to hyphens. + + From Django's "django/template/defaultfilters.py". + """ + import unicodedata + value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode() + value = _slugify_strip_re.sub('', value).strip().lower() + return _slugify_hyphenate_re.sub('-', value) +## end of http://code.activestate.com/recipes/577257/ }}} + + +# From http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52549 +def _curry(*args, **kwargs): + function, args = args[0], args[1:] + def result(*rest, **kwrest): + combined = kwargs.copy() + combined.update(kwrest) + return function(*args + rest, **combined) + return result + +# Recipe: regex_from_encoded_pattern (1.0) +def _regex_from_encoded_pattern(s): + """'foo' -> re.compile(re.escape('foo')) + '/foo/' -> re.compile('foo') + '/foo/i' -> re.compile('foo', re.I) + """ + if s.startswith('/') and s.rfind('/') != 0: + # Parse it: /PATTERN/FLAGS + idx = s.rfind('/') + pattern, flags_str = s[1:idx], s[idx+1:] + flag_from_char = { + "i": re.IGNORECASE, + "l": re.LOCALE, + "s": re.DOTALL, + "m": re.MULTILINE, + "u": re.UNICODE, + } + flags = 0 + for char in flags_str: + try: + flags |= flag_from_char[char] + except KeyError: + raise ValueError("unsupported regex flag: '%s' in '%s' " + "(must be one of '%s')" + % (char, s, ''.join(list(flag_from_char.keys())))) + return re.compile(s[1:idx], flags) + else: # not an encoded regex + return re.compile(re.escape(s)) + +# Recipe: dedent (0.1.2) +def _dedentlines(lines, tabsize=8, skip_first_line=False): + """_dedentlines(lines, tabsize=8, skip_first_line=False) -> dedented lines + + "lines" is a list of lines to dedent. + "tabsize" is the tab width to use for indent width calculations. + "skip_first_line" is a boolean indicating if the first line should + be skipped for calculating the indent width and for dedenting. + This is sometimes useful for docstrings and similar. + + Same as dedent() except operates on a sequence of lines. Note: the + lines list is modified **in-place**. + """ + DEBUG = False + if DEBUG: + print("dedent: dedent(..., tabsize=%d, skip_first_line=%r)"\ + % (tabsize, skip_first_line)) + indents = [] + margin = None + for i, line in enumerate(lines): + if i == 0 and skip_first_line: continue + indent = 0 + for ch in line: + if ch == ' ': + indent += 1 + elif ch == '\t': + indent += tabsize - (indent % tabsize) + elif ch in '\r\n': + continue # skip all-whitespace lines + else: + break + else: + continue # skip all-whitespace lines + if DEBUG: print("dedent: indent=%d: %r" % (indent, line)) + if margin is None: + margin = indent + else: + margin = min(margin, indent) + if DEBUG: print("dedent: margin=%r" % margin) + + if margin is not None and margin > 0: + for i, line in enumerate(lines): + if i == 0 and skip_first_line: continue + removed = 0 + for j, ch in enumerate(line): + if ch == ' ': + removed += 1 + elif ch == '\t': + removed += tabsize - (removed % tabsize) + elif ch in '\r\n': + if DEBUG: print("dedent: %r: EOL -> strip up to EOL" % line) + lines[i] = lines[i][j:] + break + else: + raise ValueError("unexpected non-whitespace char %r in " + "line %r while removing %d-space margin" + % (ch, line, margin)) + if DEBUG: + print("dedent: %r: %r -> removed %d/%d"\ + % (line, ch, removed, margin)) + if removed == margin: + lines[i] = lines[i][j+1:] + break + elif removed > margin: + lines[i] = ' '*(removed-margin) + lines[i][j+1:] + break + else: + if removed: + lines[i] = lines[i][removed:] + return lines + +def _dedent(text, tabsize=8, skip_first_line=False): + """_dedent(text, tabsize=8, skip_first_line=False) -> dedented text + + "text" is the text to dedent. + "tabsize" is the tab width to use for indent width calculations. + "skip_first_line" is a boolean indicating if the first line should + be skipped for calculating the indent width and for dedenting. + This is sometimes useful for docstrings and similar. + + textwrap.dedent(s), but don't expand tabs to spaces + """ + lines = text.splitlines(1) + _dedentlines(lines, tabsize=tabsize, skip_first_line=skip_first_line) + return ''.join(lines) + + +class _memoized(object): + """Decorator that caches a function's return value each time it is called. + If called later with the same arguments, the cached value is returned, and + not re-evaluated. + + http://wiki.python.org/moin/PythonDecoratorLibrary + """ + def __init__(self, func): + self.func = func + self.cache = {} + def __call__(self, *args): + try: + return self.cache[args] + except KeyError: + self.cache[args] = value = self.func(*args) + return value + except TypeError: + # uncachable -- for instance, passing a list as an argument. + # Better to not cache than to blow up entirely. + return self.func(*args) + def __repr__(self): + """Return the function's docstring.""" + return self.func.__doc__ + + +def _xml_oneliner_re_from_tab_width(tab_width): + """Standalone XML processing instruction regex.""" + return re.compile(r""" + (?: + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in $1 + [ ]{0,%d} + (?: + <\?\w+\b\s+.*?\?> # XML processing instruction + | + <\w+:\w+\b\s+.*?/> # namespaced single tag + ) + [ \t]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + ) + """ % (tab_width - 1), re.X) +_xml_oneliner_re_from_tab_width = _memoized(_xml_oneliner_re_from_tab_width) + +def _hr_tag_re_from_tab_width(tab_width): + return re.compile(r""" + (?: + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in \1 + [ ]{0,%d} + <(hr) # start tag = \2 + \b # word break + ([^<>])*? # + /?> # the matching end tag + [ \t]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + ) + """ % (tab_width - 1), re.X) +_hr_tag_re_from_tab_width = _memoized(_hr_tag_re_from_tab_width) + + +def _xml_escape_attr(attr, skip_single_quote=True): + """Escape the given string for use in an HTML/XML tag attribute. + + By default this doesn't bother with escaping `'` to `'`, presuming that + the tag attribute is surrounded by double quotes. + """ + escaped = (attr + .replace('&', '&') + .replace('"', '"') + .replace('<', '<') + .replace('>', '>')) + if not skip_single_quote: + escaped = escaped.replace("'", "'") + return escaped + + +def _xml_encode_email_char_at_random(ch): + r = random() + # Roughly 10% raw, 45% hex, 45% dec. + # '@' *must* be encoded. I [John Gruber] insist. + # Issue 26: '_' must be encoded. + if r > 0.9 and ch not in "@_": + return ch + elif r < 0.45: + # The [1:] is to drop leading '0': 0x63 -> x63 + return '&#%s;' % hex(ord(ch))[1:] + else: + return '&#%s;' % ord(ch) + + + +#---- mainline + +class _NoReflowFormatter(optparse.IndentedHelpFormatter): + """An optparse formatter that does NOT reflow the description.""" + def format_description(self, description): + return description or "" + +def _test(): + import doctest + doctest.testmod() + +def main(argv=None): + if argv is None: + argv = sys.argv + if not logging.root.handlers: + logging.basicConfig() + + usage = "usage: %prog [PATHS...]" + version = "%prog "+__version__ + parser = optparse.OptionParser(prog="markdown2", usage=usage, + version=version, description=cmdln_desc, + formatter=_NoReflowFormatter()) + parser.add_option("-v", "--verbose", dest="log_level", + action="store_const", const=logging.DEBUG, + help="more verbose output") + parser.add_option("--encoding", + help="specify encoding of text content") + parser.add_option("--html4tags", action="store_true", default=False, + help="use HTML 4 style for empty element tags") + parser.add_option("-s", "--safe", metavar="MODE", dest="safe_mode", + help="sanitize literal HTML: 'escape' escapes " + "HTML meta chars, 'replace' replaces with an " + "[HTML_REMOVED] note") + parser.add_option("-x", "--extras", action="append", + help="Turn on specific extra features (not part of " + "the core Markdown spec). See above.") + parser.add_option("--use-file-vars", + help="Look for and use Emacs-style 'markdown-extras' " + "file var to turn on extras. See " + "<https://github.com/trentm/python-markdown2/wiki/Extras>") + parser.add_option("--link-patterns-file", + help="path to a link pattern file") + parser.add_option("--self-test", action="store_true", + help="run internal self-tests (some doctests)") + parser.add_option("--compare", action="store_true", + help="run against Markdown.pl as well (for testing)") + parser.set_defaults(log_level=logging.INFO, compare=False, + encoding="utf-8", safe_mode=None, use_file_vars=False) + opts, paths = parser.parse_args() + log.setLevel(opts.log_level) + + if opts.self_test: + return _test() + + if opts.extras: + extras = {} + for s in opts.extras: + splitter = re.compile("[,;: ]+") + for e in splitter.split(s): + if '=' in e: + ename, earg = e.split('=', 1) + try: + earg = int(earg) + except ValueError: + pass + else: + ename, earg = e, None + extras[ename] = earg + else: + extras = None + + if opts.link_patterns_file: + link_patterns = [] + f = open(opts.link_patterns_file) + try: + for i, line in enumerate(f.readlines()): + if not line.strip(): continue + if line.lstrip().startswith("#"): continue + try: + pat, href = line.rstrip().rsplit(None, 1) + except ValueError: + raise MarkdownError("%s:%d: invalid link pattern line: %r" + % (opts.link_patterns_file, i+1, line)) + link_patterns.append( + (_regex_from_encoded_pattern(pat), href)) + finally: + f.close() + else: + link_patterns = None + + from os.path import join, dirname, abspath, exists + markdown_pl = join(dirname(dirname(abspath(__file__))), "test", + "Markdown.pl") + if not paths: + paths = ['-'] + for path in paths: + if path == '-': + text = sys.stdin.read() + else: + fp = codecs.open(path, 'r', opts.encoding) + text = fp.read() + fp.close() + if opts.compare: + from subprocess import Popen, PIPE + print("==== Markdown.pl ====") + p = Popen('perl %s' % markdown_pl, shell=True, stdin=PIPE, stdout=PIPE, close_fds=True) + p.stdin.write(text.encode('utf-8')) + p.stdin.close() + perl_html = p.stdout.read().decode('utf-8') + if py3: + sys.stdout.write(perl_html) + else: + sys.stdout.write(perl_html.encode( + sys.stdout.encoding or "utf-8", 'xmlcharrefreplace')) + print("==== markdown2.py ====") + html = markdown(text, + html4tags=opts.html4tags, + safe_mode=opts.safe_mode, + extras=extras, link_patterns=link_patterns, + use_file_vars=opts.use_file_vars) + if py3: + sys.stdout.write(html) + else: + sys.stdout.write(html.encode( + sys.stdout.encoding or "utf-8", 'xmlcharrefreplace')) + if extras and "toc" in extras: + log.debug("toc_html: " + + html.toc_html.encode(sys.stdout.encoding or "utf-8", 'xmlcharrefreplace')) + if opts.compare: + test_dir = join(dirname(dirname(abspath(__file__))), "test") + if exists(join(test_dir, "test_markdown2.py")): + sys.path.insert(0, test_dir) + from test_markdown2 import norm_html_from_html + norm_html = norm_html_from_html(html) + norm_perl_html = norm_html_from_html(perl_html) + else: + norm_html = html + norm_perl_html = perl_html + print("==== match? %r ====" % (norm_perl_html == norm_html)) + + +if __name__ == "__main__": + sys.exit( main(sys.argv) ) diff --git a/www/models.py b/www/models.py new file mode 100644 index 0000000..e2f0d23 --- /dev/null +++ b/www/models.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +''' +Models for user, blog, comment. +''' + +import time, uuid + +from transwarp.db import next_id +from transwarp.orm import Model, StringField, BooleanField, FloatField, TextField + +def next_id(): + return '%015d%s000' % (int(time.time() * 1000), uuid.uuid4().hex) + +class User(Model): + __table__ = 'users' + + id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') + email = StringField(updatable=False, ddl='varchar(50)') + password = StringField(ddl='varchar(50)') + admin = BooleanField() + name = StringField(ddl='varchar(50)') + image = StringField(ddl='varchar(500)') + created_at = FloatField(updatable=False, default=time.time) + +class Blog(Model): + __table__ = 'blogs' + + id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') + user_id = StringField(updatable=False, ddl='varchar(50)') + user_name = StringField(ddl='varchar(50)') + user_image = StringField(ddl='varchar(500)') + name = StringField(ddl='varchar(50)') + summary = StringField(ddl='varchar(200)') + content = TextField() + created_at = FloatField(updatable=False, default=time.time) + +class Comment(Model): + __table__ = 'comments' + + id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') + blog_id = StringField(updatable=False, ddl='varchar(50)') + user_id = StringField(updatable=False, ddl='varchar(50)') + user_name = StringField(ddl='varchar(50)') + user_image = StringField(ddl='varchar(500)') + content = TextField() + created_at = FloatField(updatable=False, default=time.time) diff --git a/www/pymonitor.py b/www/pymonitor.py new file mode 100755 index 0000000..b65ebf2 --- /dev/null +++ b/www/pymonitor.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +import os, sys, time, subprocess + +from watchdog.observers import Observer +from watchdog.events import FileSystemEventHandler + +def log(s): + print '[Monitor] %s' % s + +class MyFileSystemEventHander(FileSystemEventHandler): + + def __init__(self, fn): + super(MyFileSystemEventHander, self).__init__() + self.restart = fn + + def on_any_event(self, event): + if event.src_path.endswith('.py'): + log('Python source file changed: %s' % event.src_path) + self.restart() + +command = ['echo', 'ok'] +process = None + +def kill_process(): + global process + if process: + log('Kill process [%s]...' % process.pid) + process.kill() + process.wait() + log('Process ended with code %s.' % process.returncode) + process = None + +def start_process(): + global process, command + log('Start process %s...' % ' '.join(command)) + process = subprocess.Popen(command, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr) + +def restart_process(): + kill_process() + start_process() + +def start_watch(path, callback): + observer = Observer() + observer.schedule(MyFileSystemEventHander(restart_process), path, recursive=True) + observer.start() + log('Watching directory %s...' % path) + start_process() + try: + while True: + time.sleep(0.5) + except KeyboardInterrupt: + observer.stop() + observer.join() + +if __name__ == '__main__': + argv = sys.argv[1:] + if not argv: + print('Usage: ./pymonitor your-script.py') + exit(0) + if argv[0]!='python': + argv.insert(0, 'python') + command = argv + path = os.path.abspath('.') + start_watch(path, None) diff --git a/www/static/css/addons/uikit.addons.min.css b/www/static/css/addons/uikit.addons.min.css new file mode 100755 index 0000000..1a32f90 --- /dev/null +++ b/www/static/css/addons/uikit.addons.min.css @@ -0,0 +1,3 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +.uk-dotnav{padding:0;list-style:none;font-size:0}.uk-dotnav>li{display:inline-block;font-size:1rem;vertical-align:top}.uk-dotnav>li:nth-child(n+2){margin-left:15px}.uk-dotnav>li>a{display:inline-block;-moz-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;border-radius:50%;background:rgba(50,50,50,.1);vertical-align:top;overflow:hidden;text-indent:-999%}.uk-dotnav>li>a:hover,.uk-dotnav>li>a:focus{background:rgba(50,50,50,.4);outline:0}.uk-dotnav>li>a:active{background:rgba(50,50,50,.6)}.uk-dotnav>li.uk-active>a{background:rgba(50,50,50,.4)}.uk-dotnav-vertical>li{display:block}.uk-dotnav-vertical>li:nth-child(n+2){margin-left:0;margin-top:15px}.uk-slidenav{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:hover,.uk-slidenav:focus{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-form-file{position:relative;display:inline-block;vertical-align:middle;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;bottom:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-form-password{position:relative;display:inline-block;max-width:100%}.uk-form-password-toggle{display:block;position:absolute;top:50%;right:10px;margin-top:-6px;font-size:13px;line-height:13px;color:#999}.uk-form-password-toggle:hover{color:#999;text-decoration:none}.uk-form-password>input{padding-right:50px!important}.uk-placeholder{margin-bottom:15px;padding:20px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}.uk-autocomplete{display:inline-block;vertical-align:middle;position:relative}.uk-nav-autocomplete>li>a{color:#444}.uk-nav-autocomplete>li.uk-active>a{background:#00a8e6;color:#fff;outline:0}.uk-nav-autocomplete .uk-nav-header{color:#999}.uk-nav-autocomplete .uk-nav-divider{border-top:1px solid #ddd}.uk-datepicker{width:auto}.uk-datepicker-nav{margin-bottom:15px;text-align:center;line-height:20px}.uk-datepicker-nav:before,.uk-datepicker-nav:after{content:" ";display:table}.uk-datepicker-nav:after{clear:both}.uk-datepicker-nav a{color:#444;text-decoration:none}.uk-datepicker-nav a:hover{color:#444}.uk-datepicker-previous{float:left}.uk-datepicker-next{float:right}.uk-datepicker-previous:after,.uk-datepicker-next:after{width:20px;font-family:FontAwesome}.uk-datepicker-previous:after{content:"\f053"}.uk-datepicker-next:after{content:"\f054"}.uk-datepicker-table{width:100%}.uk-datepicker-table th,.uk-datepicker-table td{padding:2px}.uk-datepicker-table th{font-size:12px}.uk-datepicker-table a{display:block;width:26px;line-height:24px;text-align:center;color:#444;text-decoration:none}a.uk-datepicker-table-muted{color:#999}.uk-datepicker-table a:hover,.uk-datepicker-table a:focus{background-color:#ddd;color:#444;outline:0}.uk-datepicker-table a:active{background-color:#ccc;color:#444}.uk-datepicker-table a.uk-active{background:#00a8e6;color:#fff}.uk-markdownarea-navbar{background:#eee}.uk-markdownarea-navbar:before,.uk-markdownarea-navbar:after{content:" ";display:table}.uk-markdownarea-navbar:after{clear:both}.uk-markdownarea-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-markdownarea-navbar-nav>li{float:left}.uk-markdownarea-navbar-nav>li>a{display:block;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;height:40px;padding:0 15px;line-height:40px;color:#444;font-size:11px;cursor:pointer}.uk-markdownarea-navbar-nav>li:hover>a,.uk-markdownarea-navbar-nav>li>a:focus{background-color:#f5f5f5;color:#444;outline:0}.uk-markdownarea-navbar-nav>li>a:active{background-color:#ddd;color:#444}.uk-markdownarea-navbar-nav>li.uk-active>a{background-color:#f5f5f5;color:#444}.uk-markdownarea-navbar-flip{float:right}[data-mode=split] .uk-markdown-button-markdown,[data-mode=split] .uk-markdown-button-preview{display:none}.uk-markdownarea-content{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background:#fff}.uk-markdownarea-content:before,.uk-markdownarea-content:after{content:" ";display:table}.uk-markdownarea-content:after{clear:both}.uk-markdownarea-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:990}.uk-markdownarea-fullscreen .uk-markdownarea-content{position:absolute;top:40px;left:0;right:0;bottom:0}.uk-markdownarea-fullscreen .uk-icon-expand:before{content:"\f066"}.uk-markdownarea-code,.uk-markdownarea-preview{-moz-box-sizing:border-box;box-sizing:border-box}.uk-markdownarea-preview{padding:20px;overflow-y:scroll}[data-mode=tab][data-active-tab=code] .uk-markdownarea-preview,[data-mode=tab][data-active-tab=preview] .uk-markdownarea-code{display:none}[data-mode=split] .uk-markdownarea-code,[data-mode=split] .uk-markdownarea-preview{float:left;width:50%}[data-mode=split] .uk-markdownarea-code{border-right:1px solid #eee}.uk-markdownarea .CodeMirror{padding:10px;-moz-box-sizing:border-box;box-sizing:border-box}.uk-notify{position:fixed;top:10px;left:10px;z-index:980;-moz-box-sizing:border-box;box-sizing:border-box;width:350px}.uk-notify-top-right,.uk-notify-bottom-right{left:auto;right:10px}.uk-notify-top-center,.uk-notify-bottom-center{left:50%;margin-left:-175px}.uk-notify-bottom-left,.uk-notify-bottom-right,.uk-notify-bottom-center{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:16px;line-height:22px;cursor:pointer}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091}.uk-notify-message-success{background:#f2fae3;color:#659f13}.uk-notify-message-warning{background:#fffceb;color:#e28327}.uk-notify-message-danger{background:#fff1f0;color:#d85030}.uk-search{display:inline-block;position:relative;margin:0}.uk-search:before{content:"\f002";position:absolute;top:0;left:0;width:30px;line-height:30px;text-align:center;font-family:FontAwesome;font-size:14px;color:rgba(0,0,0,.2)}.uk-search-field{width:120px;height:30px;padding:0 30px;border:1px solid rgba(0,0,0,0);background:rgba(0,0,0,0);color:#444;-webkit-transition:all linear .2s;transition:all linear .2s;border-radius:0}input.uk-search-field{-webkit-appearance:none}.uk-search-field:-ms-input-placeholder{color:#999}.uk-search-field::-moz-placeholder{color:#999}.uk-search-field::-webkit-input-placeholder{color:#999}.uk-search-field::-ms-clear{display:none}.uk-search-field:focus{outline:0}.uk-search-field:focus,.uk-active .uk-search-field{width:180px}.uk-search-close{display:none;position:absolute;top:0;right:0;width:30px;line-height:30px;text-align:center;font-size:14px;color:rgba(0,0,0,.2);padding:0;border:0;-webkit-appearance:none;background:0 0}.uk-loading>.uk-search-close,.uk-active>.uk-search-close{display:block}.uk-search-close:after{display:block;content:"\f00d";font-family:FontAwesome}.uk-loading>.uk-search-close:after{content:"\f110";-webkit-animation:uk-spin 2s infinite linear;animation:uk-spin 2s infinite linear}.uk-dropdown-search{width:300px;margin-top:0;background:#f5f5f5;color:#444}.uk-open>.uk-dropdown-search{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-navbar-flip .uk-dropdown-search{margin-top:5px;margin-right:-15px}.uk-nav-search>li>a{color:#444}.uk-nav-search>li.uk-active>a{background:#00a8e6;color:#fff;outline:0}.uk-nav-search .uk-nav-header{color:#999}.uk-nav-search .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-search ul a{color:#07d}.uk-nav-search ul a:hover{color:#059}.uk-offcanvas .uk-search{display:block;margin:20px 15px}.uk-offcanvas .uk-search:before{color:#777}.uk-offcanvas .uk-search-field{width:100%;border-color:rgba(0,0,0,0);background:#1a1a1a;color:#ccc}.uk-offcanvas .uk-search-field:-ms-input-placeholder{color:#777}.uk-offcanvas .uk-search-field::-moz-placeholder{color:#777}.uk-offcanvas .uk-search-field::-webkit-input-placeholder{color:#777}.uk-sortable{padding:0;list-style:none}.uk-sortable-list{margin:0;padding-left:40px;list-style:none}.uk-sortable-list-dragged{position:absolute;z-index:1050;padding-left:0;pointer-events:none}.uk-sortable-item{margin-bottom:10px;padding:5px;background:#f5f5f5}.uk-sortable-placeholder{-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:10px;border:1px dashed #ddd}.uk-sortable-empty{min-height:40px}.uk-sortable-handle{display:inline-block;font-size:18px;color:#ddd}.uk-sortable-handle:hover{cursor:move}.uk-sortable-handle:after{content:"\f0c9";font-family:FontAwesome}.uk-sortable-moving,.uk-sortable-moving *{cursor:move}[data-sortable-action=toggle]{display:inline-block;color:#999;visibility:hidden}[data-sortable-action=toggle]:hover{color:#444;cursor:pointer}[data-sortable-action=toggle]:after{content:"\f147";font-family:FontAwesome}.uk-parent>.uk-sortable-item [data-sortable-action=toggle]{visibility:visible}.uk-collapsed>.uk-sortable-item [data-sortable-action=toggle]:after{content:"\f196"}.uk-collapsed .uk-sortable-list{display:none}.uk-sticky{z-index:980}.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)} \ No newline at end of file diff --git a/www/static/css/addons/uikit.almost-flat.addons.min.css b/www/static/css/addons/uikit.almost-flat.addons.min.css new file mode 100755 index 0000000..5f52d02 --- /dev/null +++ b/www/static/css/addons/uikit.almost-flat.addons.min.css @@ -0,0 +1,3 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +.uk-dotnav{padding:0;list-style:none;font-size:0}.uk-dotnav>li{display:inline-block;font-size:1rem;vertical-align:top}.uk-dotnav>li:nth-child(n+2){margin-left:15px}.uk-dotnav>li>a{display:inline-block;-moz-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;border-radius:50%;background:rgba(50,50,50,.1);vertical-align:top;overflow:hidden;text-indent:-999%;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.uk-dotnav>li>a:hover,.uk-dotnav>li>a:focus{background:rgba(50,50,50,.4);outline:0}.uk-dotnav>li>a:active{background:rgba(50,50,50,.6)}.uk-dotnav>li.uk-active>a{background:rgba(50,50,50,.4);-webkit-transform:scale(1.3);transform:scale(1.3)}.uk-dotnav-vertical>li{display:block}.uk-dotnav-vertical>li:nth-child(n+2){margin-left:0;margin-top:15px}.uk-slidenav{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:hover,.uk-slidenav:focus{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-form-file{position:relative;display:inline-block;vertical-align:middle;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;bottom:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-form-password{position:relative;display:inline-block;max-width:100%}.uk-form-password-toggle{display:block;position:absolute;top:50%;right:10px;margin-top:-6px;font-size:13px;line-height:13px;color:#999}.uk-form-password-toggle:hover{color:#999;text-decoration:none}.uk-form-password>input{padding-right:50px!important}.uk-placeholder{margin-bottom:15px;padding:20px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}.uk-autocomplete{display:inline-block;vertical-align:middle;position:relative}.uk-nav-autocomplete>li>a{color:#444}.uk-nav-autocomplete>li.uk-active>a{background:#00a8e6;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-autocomplete .uk-nav-header{color:#999}.uk-nav-autocomplete .uk-nav-divider{border-top:1px solid #ddd}.uk-datepicker{width:auto}.uk-datepicker-nav{margin-bottom:15px;text-align:center;line-height:20px}.uk-datepicker-nav:before,.uk-datepicker-nav:after{content:" ";display:table}.uk-datepicker-nav:after{clear:both}.uk-datepicker-nav a{color:#444;text-decoration:none}.uk-datepicker-nav a:hover{color:#444}.uk-datepicker-previous{float:left}.uk-datepicker-next{float:right}.uk-datepicker-previous:after,.uk-datepicker-next:after{width:20px;font-family:FontAwesome}.uk-datepicker-previous:after{content:"\f053"}.uk-datepicker-next:after{content:"\f054"}.uk-datepicker-table{width:100%}.uk-datepicker-table th,.uk-datepicker-table td{padding:2px}.uk-datepicker-table th{font-size:12px}.uk-datepicker-table a{display:block;width:26px;line-height:24px;text-align:center;color:#444;text-decoration:none;border:1px solid transparent;border-radius:4px}a.uk-datepicker-table-muted{color:#999}.uk-datepicker-table a:hover,.uk-datepicker-table a:focus{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.16);text-shadow:0 1px 0 #fff}.uk-datepicker-table a:active{background-color:#eee;color:#444}.uk-datepicker-table a.uk-active{background:#00a8e6;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-markdownarea-navbar{background:#f5f5f5;border:1px solid rgba(0,0,0,.06);border-top-left-radius:4px;border-top-right-radius:4px}.uk-markdownarea-navbar:before,.uk-markdownarea-navbar:after{content:" ";display:table}.uk-markdownarea-navbar:after{clear:both}.uk-markdownarea-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-markdownarea-navbar-nav>li{float:left}.uk-markdownarea-navbar-nav>li>a{display:block;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:11px;cursor:pointer;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-markdownarea-navbar-nav>li:hover>a,.uk-markdownarea-navbar-nav>li>a:focus{background-color:#fafafa;color:#444;outline:0;position:relative;z-index:1;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-markdownarea-navbar-nav>li>a:active{background-color:#eee;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.2)}.uk-markdownarea-navbar-nav>li.uk-active>a{background-color:#fafafa;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-markdownarea-navbar-flip{float:right}[data-mode=split] .uk-markdown-button-markdown,[data-mode=split] .uk-markdown-button-preview{display:none}.uk-markdownarea-content{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.uk-markdownarea-content:before,.uk-markdownarea-content:after{content:" ";display:table}.uk-markdownarea-content:after{clear:both}.uk-markdownarea-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:990}.uk-markdownarea-fullscreen .uk-markdownarea-content{position:absolute;top:41px;left:0;right:0;bottom:0}.uk-markdownarea-fullscreen .uk-icon-expand:before{content:"\f066"}.uk-markdownarea-code,.uk-markdownarea-preview{-moz-box-sizing:border-box;box-sizing:border-box}.uk-markdownarea-preview{padding:20px;overflow-y:scroll}[data-mode=tab][data-active-tab=code] .uk-markdownarea-preview,[data-mode=tab][data-active-tab=preview] .uk-markdownarea-code{display:none}[data-mode=split] .uk-markdownarea-code,[data-mode=split] .uk-markdownarea-preview{float:left;width:50%}[data-mode=split] .uk-markdownarea-code{border-right:1px solid #eee}.uk-markdownarea .CodeMirror{padding:10px;-moz-box-sizing:border-box;box-sizing:border-box}.uk-markdownarea-navbar-nav:first-child>li:first-child>a{border-top-left-radius:4px}.uk-markdownarea-navbar-flip .uk-markdownarea-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-markdownarea-navbar-flip .uk-markdownarea-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0}.uk-markdownarea-navbar-flip .uk-markdownarea-navbar-nav:last-child>li:last-child>a{border-top-right-radius:4px}.uk-markdownarea-fullscreen .uk-markdownarea-navbar{border-top:none;border-left:none;border-right:none;border-radius:0}.uk-markdownarea-fullscreen .uk-markdownarea-content{border:none;border-radius:0}.uk-markdownarea-fullscreen .uk-markdownarea-navbar-nav>li>a{border-radius:0!important}.uk-notify{position:fixed;top:10px;left:10px;z-index:980;-moz-box-sizing:border-box;box-sizing:border-box;width:350px}.uk-notify-top-right,.uk-notify-bottom-right{left:auto;right:10px}.uk-notify-top-center,.uk-notify-bottom-center{left:50%;margin-left:-175px}.uk-notify-bottom-left,.uk-notify-bottom-right,.uk-notify-bottom-center{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:16px;line-height:22px;cursor:pointer;border:1px solid #444;border-radius:4px}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-notify-message-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-notify-message-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-notify-message-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)}.uk-search{display:inline-block;position:relative;margin:0}.uk-search:before{content:"\f002";position:absolute;top:0;left:0;width:30px;line-height:30px;text-align:center;font-family:FontAwesome;font-size:14px;color:rgba(0,0,0,.2)}.uk-search-field{width:120px;height:30px;padding:0 30px;border:1px solid rgba(0,0,0,0);background:rgba(0,0,0,0);color:#444;-webkit-transition:all linear .2s;transition:all linear .2s;border-radius:0}input.uk-search-field{-webkit-appearance:none}.uk-search-field:-ms-input-placeholder{color:#999}.uk-search-field::-moz-placeholder{color:#999}.uk-search-field::-webkit-input-placeholder{color:#999}.uk-search-field::-ms-clear{display:none}.uk-search-field:focus{outline:0}.uk-search-field:focus,.uk-active .uk-search-field{width:180px}.uk-search-close{display:none;position:absolute;top:0;right:0;width:30px;line-height:30px;text-align:center;font-size:14px;color:rgba(0,0,0,.2);padding:0;border:0;-webkit-appearance:none;background:0 0}.uk-loading>.uk-search-close,.uk-active>.uk-search-close{display:block}.uk-search-close:after{display:block;content:"\f00d";font-family:FontAwesome}.uk-loading>.uk-search-close:after{content:"\f110";-webkit-animation:uk-spin 2s infinite linear;animation:uk-spin 2s infinite linear}.uk-dropdown-search{width:300px;margin-top:0;background:#fff;color:#444}.uk-open>.uk-dropdown-search{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-navbar-flip .uk-dropdown-search{margin-top:12px;margin-right:-16px}.uk-nav-search>li>a{color:#444}.uk-nav-search>li.uk-active>a{background:#00a8e6;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-search .uk-nav-header{color:#999}.uk-nav-search .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-search ul a{color:#07d}.uk-nav-search ul a:hover{color:#059}.uk-offcanvas .uk-search{display:block;margin:20px 15px}.uk-offcanvas .uk-search:before{color:#777}.uk-offcanvas .uk-search-field{width:100%;border-color:rgba(0,0,0,0);background:#1a1a1a;color:#ccc}.uk-offcanvas .uk-search-field:-ms-input-placeholder{color:#777}.uk-offcanvas .uk-search-field::-moz-placeholder{color:#777}.uk-offcanvas .uk-search-field::-webkit-input-placeholder{color:#777}.uk-sortable{padding:0;list-style:none}.uk-sortable-list{margin:0;padding-left:40px;list-style:none}.uk-sortable-list-dragged{position:absolute;z-index:1050;padding-left:0;pointer-events:none}.uk-sortable-item{margin-bottom:10px;padding:5px;background:#f5f5f5;border-radius:4px;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}.uk-sortable-placeholder{-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:10px;border:1px dashed #ddd}.uk-sortable-empty{min-height:40px}.uk-sortable-handle{display:inline-block;font-size:18px;color:#ddd}.uk-sortable-handle:hover{cursor:move}.uk-sortable-handle:after{content:"\f0c9";font-family:FontAwesome}.uk-sortable-moving,.uk-sortable-moving *{cursor:move}[data-sortable-action=toggle]{display:inline-block;color:#999;visibility:hidden}[data-sortable-action=toggle]:hover{color:#444;cursor:pointer}[data-sortable-action=toggle]:after{content:"\f147";font-family:FontAwesome}.uk-parent>.uk-sortable-item [data-sortable-action=toggle]{visibility:visible}.uk-collapsed>.uk-sortable-item [data-sortable-action=toggle]:after{content:"\f196"}.uk-collapsed .uk-sortable-list{display:none}.uk-sticky{z-index:980}.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)} \ No newline at end of file diff --git a/www/static/css/addons/uikit.gradient.addons.min.css b/www/static/css/addons/uikit.gradient.addons.min.css new file mode 100755 index 0000000..12f9256 --- /dev/null +++ b/www/static/css/addons/uikit.gradient.addons.min.css @@ -0,0 +1,3 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +.uk-dotnav{padding:0;list-style:none;font-size:0}.uk-dotnav>li{display:inline-block;font-size:1rem;vertical-align:top}.uk-dotnav>li:nth-child(n+2){margin-left:15px}.uk-dotnav>li>a{display:inline-block;-moz-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;border-radius:50%;background:rgba(50,50,50,.1);vertical-align:top;overflow:hidden;text-indent:-999%;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.uk-dotnav>li>a:hover,.uk-dotnav>li>a:focus{background:rgba(50,50,50,.4);outline:0}.uk-dotnav>li>a:active{background:rgba(50,50,50,.6)}.uk-dotnav>li.uk-active>a{background:rgba(50,50,50,.4);-webkit-transform:scale(1.3);transform:scale(1.3)}.uk-dotnav-vertical>li{display:block}.uk-dotnav-vertical>li:nth-child(n+2){margin-left:0;margin-top:15px}.uk-slidenav{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:hover,.uk-slidenav:focus{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-form-file{position:relative;display:inline-block;vertical-align:middle;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;bottom:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-form-password{position:relative;display:inline-block;max-width:100%}.uk-form-password-toggle{display:block;position:absolute;top:50%;right:10px;margin-top:-6px;font-size:13px;line-height:13px;color:#999}.uk-form-password-toggle:hover{color:#999;text-decoration:none}.uk-form-password>input{padding-right:50px!important}.uk-placeholder{margin-bottom:15px;padding:20px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}.uk-autocomplete{display:inline-block;vertical-align:middle;position:relative}.uk-nav-autocomplete>li>a{color:#444}.uk-nav-autocomplete>li.uk-active>a{background:#009dd8;color:#fff;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.2);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-nav-autocomplete .uk-nav-header{color:#999}.uk-nav-autocomplete .uk-nav-divider{border-top:1px solid #ddd}.uk-datepicker{width:auto}.uk-datepicker-nav{margin-bottom:15px;text-align:center;line-height:20px}.uk-datepicker-nav:before,.uk-datepicker-nav:after{content:" ";display:table}.uk-datepicker-nav:after{clear:both}.uk-datepicker-nav a{color:#444;text-decoration:none}.uk-datepicker-nav a:hover{color:#444}.uk-datepicker-previous{float:left}.uk-datepicker-next{float:right}.uk-datepicker-previous:after,.uk-datepicker-next:after{width:20px;font-family:FontAwesome}.uk-datepicker-previous:after{content:"\f053"}.uk-datepicker-next:after{content:"\f054"}.uk-datepicker-table{width:100%}.uk-datepicker-table th,.uk-datepicker-table td{padding:2px}.uk-datepicker-table th{font-size:12px}.uk-datepicker-table a{display:block;width:26px;line-height:24px;text-align:center;color:#444;text-decoration:none;border:1px solid transparent;border-radius:4px;background-origin:border-box}a.uk-datepicker-table-muted{color:#999}.uk-datepicker-table a:hover,.uk-datepicker-table a:focus{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.3);text-shadow:0 1px 0 #fff}.uk-datepicker-table a:active{background-color:#f5f5f5;color:#444;border-color:rgba(0,0,0,.2);border-top-color:rgba(0,0,0,.3);background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-datepicker-table a.uk-active{background:#009dd8;color:#fff;border:1px solid rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.4);background-origin:border-box;background-image:-webkit-linear-gradient(top,#00b4f5,#008dc5);background-image:linear-gradient(to bottom,#00b4f5,#008dc5);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-markdownarea-navbar{background:#f7f7f7;border:1px solid rgba(0,0,0,.1);border-bottom-color:rgba(0,0,0,.2);border-top-left-radius:4px;border-top-right-radius:4px;background-origin:border-box;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee)}.uk-markdownarea-navbar:before,.uk-markdownarea-navbar:after{content:" ";display:table}.uk-markdownarea-navbar:after{clear:both}.uk-markdownarea-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-markdownarea-navbar-nav>li{float:left}.uk-markdownarea-navbar-nav>li>a{display:block;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:11px;cursor:pointer;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-markdownarea-navbar-nav>li:hover>a,.uk-markdownarea-navbar-nav>li>a:focus{background-color:transparent;color:#444;outline:0;position:relative;z-index:1;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1);box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-markdownarea-navbar-nav>li>a:active{background-color:#f5f5f5;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.2);box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-markdownarea-navbar-nav>li.uk-active>a{background-color:#fafafa;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.2);box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-markdownarea-navbar-flip{float:right}[data-mode=split] .uk-markdown-button-markdown,[data-mode=split] .uk-markdown-button-preview{display:none}.uk-markdownarea-content{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.uk-markdownarea-content:before,.uk-markdownarea-content:after{content:" ";display:table}.uk-markdownarea-content:after{clear:both}.uk-markdownarea-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:990}.uk-markdownarea-fullscreen .uk-markdownarea-content{position:absolute;top:41px;left:0;right:0;bottom:0}.uk-markdownarea-fullscreen .uk-icon-expand:before{content:"\f066"}.uk-markdownarea-code,.uk-markdownarea-preview{-moz-box-sizing:border-box;box-sizing:border-box}.uk-markdownarea-preview{padding:20px;overflow-y:scroll}[data-mode=tab][data-active-tab=code] .uk-markdownarea-preview,[data-mode=tab][data-active-tab=preview] .uk-markdownarea-code{display:none}[data-mode=split] .uk-markdownarea-code,[data-mode=split] .uk-markdownarea-preview{float:left;width:50%}[data-mode=split] .uk-markdownarea-code{border-right:1px solid #eee}.uk-markdownarea .CodeMirror{padding:10px;-moz-box-sizing:border-box;box-sizing:border-box}.uk-markdownarea-navbar-nav:first-child>li:first-child>a{border-top-left-radius:4px}.uk-markdownarea-navbar-flip .uk-markdownarea-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-markdownarea-navbar-flip .uk-markdownarea-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0}.uk-markdownarea-navbar-flip .uk-markdownarea-navbar-nav:last-child>li:last-child>a{border-top-right-radius:4px}.uk-markdownarea-fullscreen .uk-markdownarea-navbar{border-top:none;border-left:none;border-right:none;border-radius:0}.uk-markdownarea-fullscreen .uk-markdownarea-content{border:none;border-radius:0}.uk-markdownarea-fullscreen .uk-markdownarea-navbar-nav>li>a{border-radius:0!important}.uk-notify{position:fixed;top:10px;left:10px;z-index:980;-moz-box-sizing:border-box;box-sizing:border-box;width:350px}.uk-notify-top-right,.uk-notify-bottom-right{left:auto;right:10px}.uk-notify-top-center,.uk-notify-bottom-center{left:50%;margin-left:-175px}.uk-notify-bottom-left,.uk-notify-bottom-right,.uk-notify-bottom-center{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:16px;line-height:22px;cursor:pointer;border:1px solid #444;border-radius:4px}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-notify-message-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-notify-message-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-notify-message-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)}.uk-search{display:inline-block;position:relative;margin:0}.uk-search:before{content:"\f002";position:absolute;top:0;left:0;width:30px;line-height:30px;text-align:center;font-family:FontAwesome;font-size:14px;color:rgba(0,0,0,.2)}.uk-search-field{width:120px;height:30px;padding:0 30px;border:1px solid rgba(0,0,0,0);background:rgba(0,0,0,0);color:#444;-webkit-transition:all linear .2s;transition:all linear .2s;border-radius:0}input.uk-search-field{-webkit-appearance:none}.uk-search-field:-ms-input-placeholder{color:#999}.uk-search-field::-moz-placeholder{color:#999}.uk-search-field::-webkit-input-placeholder{color:#999}.uk-search-field::-ms-clear{display:none}.uk-search-field:focus{outline:0}.uk-search-field:focus,.uk-active .uk-search-field{width:180px}.uk-search-close{display:none;position:absolute;top:0;right:0;width:30px;line-height:30px;text-align:center;font-size:14px;color:rgba(0,0,0,.2);padding:0;border:0;-webkit-appearance:none;background:0 0}.uk-loading>.uk-search-close,.uk-active>.uk-search-close{display:block}.uk-search-close:after{display:block;content:"\f00d";font-family:FontAwesome}.uk-loading>.uk-search-close:after{content:"\f110";-webkit-animation:uk-spin 2s infinite linear;animation:uk-spin 2s infinite linear}.uk-dropdown-search{width:300px;margin-top:0;background:#fff;color:#444}.uk-open>.uk-dropdown-search{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-navbar-flip .uk-dropdown-search{margin-top:12px;margin-right:-16px}.uk-nav-search>li>a{color:#444}.uk-nav-search>li.uk-active>a{background:#009dd8;color:#fff;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.2);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-nav-search .uk-nav-header{color:#999}.uk-nav-search .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-search ul a{color:#07d}.uk-nav-search ul a:hover{color:#059}.uk-offcanvas .uk-search{display:block;margin:20px 15px}.uk-offcanvas .uk-search:before{color:#777}.uk-offcanvas .uk-search-field{width:100%;border-color:rgba(0,0,0,0);background:#1a1a1a;color:#ccc}.uk-offcanvas .uk-search-field:-ms-input-placeholder{color:#777}.uk-offcanvas .uk-search-field::-moz-placeholder{color:#777}.uk-offcanvas .uk-search-field::-webkit-input-placeholder{color:#777}.uk-sortable{padding:0;list-style:none}.uk-sortable-list{margin:0;padding-left:40px;list-style:none}.uk-sortable-list-dragged{position:absolute;z-index:1050;padding-left:0;pointer-events:none}.uk-sortable-item{margin-bottom:10px;padding:5px;background:#f7f7f7;border-radius:4px;border:1px solid rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.3);background-origin:border-box;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 0 #fff}.uk-sortable-placeholder{-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:10px;border:1px dashed #ddd}.uk-sortable-empty{min-height:40px}.uk-sortable-handle{display:inline-block;font-size:18px;color:#ddd}.uk-sortable-handle:hover{cursor:move}.uk-sortable-handle:after{content:"\f0c9";font-family:FontAwesome}.uk-sortable-moving,.uk-sortable-moving *{cursor:move}[data-sortable-action=toggle]{display:inline-block;color:#999;visibility:hidden}[data-sortable-action=toggle]:hover{color:#444;cursor:pointer}[data-sortable-action=toggle]:after{content:"\f147";font-family:FontAwesome}.uk-parent>.uk-sortable-item [data-sortable-action=toggle]{visibility:visible}.uk-collapsed>.uk-sortable-item [data-sortable-action=toggle]:after{content:"\f196"}.uk-collapsed .uk-sortable-list{display:none}.uk-sticky{z-index:980}.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)} \ No newline at end of file diff --git a/www/static/css/awesome.css b/www/static/css/awesome.css new file mode 100644 index 0000000..b4c22bb --- /dev/null +++ b/www/static/css/awesome.css @@ -0,0 +1,6 @@ +/* + * custom css + */ +a:hover, a:active { + text-decoration: none; +} diff --git a/www/static/css/uikit.almost-flat.min.css b/www/static/css/uikit.almost-flat.min.css new file mode 100755 index 0000000..e407448 --- /dev/null +++ b/www/static/css/uikit.almost-flat.min.css @@ -0,0 +1,3 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-size:1em;font-family:Consolas,monospace,serif}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}optgroup{font-weight:700}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button:disabled,html input:disabled{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{padding:0;cursor:pointer}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:none;margin:0;padding:0}legend{border:0;padding:0}textarea{overflow:auto;vertical-align:top}::-moz-placeholder{opacity:1}table{border-collapse:collapse;border-spacing:0}html{font-size:14px}body{background:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:20px;color:#444}@media (max-width:767px){body{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}}a,.uk-link{color:#07d;text-decoration:none;cursor:pointer}a:hover,.uk-link:hover{color:#059;text-decoration:underline}em{color:#d05}ins{background:#ffa;color:#444;text-decoration:none}mark{background:#ffa;color:#444}::-moz-selection{background:#39f;color:#fff;text-shadow:none}::selection{background:#39f;color:#fff;text-shadow:none}abbr[title],dfn[title]{cursor:help}dfn[title]{border-bottom:1px dotted;font-style:normal}img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;vertical-align:middle}.uk-img-preserve,.uk-img-preserve img,img[src*="maps.gstatic.com"],img[src*="googleapis.com"]{max-width:none}p,hr,ul,ol,dl,blockquote,pre,address,fieldset,figure{margin:0 0 15px}*+p,*+hr,*+ul,*+ol,*+dl,*+blockquote,*+pre,*+address,*+fieldset,*+figure{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}h1,.uk-h1{font-size:36px;line-height:42px}h2,.uk-h2{font-size:24px;line-height:30px}h3,.uk-h3{font-size:18px;line-height:24px}h4,.uk-h4{font-size:16px;line-height:22px}h5,.uk-h5{font-size:14px;line-height:20px}h6,.uk-h6{font-size:12px;line-height:18px}ul,ol{padding-left:30px}ul>li>ul,ul>li>ol,ol>li>ol,ol>li>ul{margin:0}dt{font-weight:700}dd{margin-left:0}hr{display:block;padding:0;border:0;border-top:1px solid #ddd}address{font-style:normal}q,blockquote{font-style:italic}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:16px;line-height:22px}blockquote small{display:block;color:#999;font-style:normal}blockquote p:last-of-type{margin-bottom:5px}code{color:#d05;font-size:12px;white-space:nowrap;padding:0 4px;border:1px solid #ddd;border-radius:3px;background:#fafafa}pre code{color:inherit;white-space:pre-wrap;padding:0;border:0;background:0 0}pre{padding:10px;background:#fafafa;color:#444;font-size:12px;line-height:18px;-moz-tab-size:4;tab-size:4;border:1px solid #ddd;border-radius:3px}button,input:not([type=radio]):not([type=checkbox]),select{vertical-align:middle}iframe{border:0}@media screen and (max-width:400px){@-ms-viewport{width:device-width}}.uk-grid:before,.uk-grid:after{content:" ";display:table}.uk-grid:after{clear:both}.uk-grid{margin:0 0 0 -25px;padding:0;list-style:none}.uk-grid>*{margin:0;padding-left:25px;float:left}.uk-grid>*>:last-child{margin-bottom:0}.uk-grid+.uk-grid{margin-top:25px}.uk-grid>.uk-grid-margin{margin-top:25px}.uk-grid>*>.uk-panel+.uk-panel{margin-top:25px}@media (min-width:1220px){.uk-grid:not(.uk-grid-preserve){margin-left:-35px}.uk-grid:not(.uk-grid-preserve)>*{padding-left:35px}.uk-grid:not(.uk-grid-preserve)+.uk-grid{margin-top:35px}.uk-grid:not(.uk-grid-preserve)>.uk-grid-margin{margin-top:35px}.uk-grid:not(.uk-grid-preserve)>*>.uk-panel+.uk-panel{margin-top:35px}}.uk-grid.uk-grid-small{margin-left:-10px}.uk-grid.uk-grid-small>*{padding-left:10px}.uk-grid.uk-grid-small+.uk-grid-small{margin-top:10px}.uk-grid.uk-grid-small>.uk-grid-margin{margin-top:10px}.uk-grid.uk-grid-small>*>.uk-panel+.uk-panel{margin-top:10px}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider>*{padding-left:25px;padding-right:25px}.uk-grid-divider>[class*=uk-width-1-]:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider>[class*=uk-width-2-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-3-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-4-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-5-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-6-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-7-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-8-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-9-]:nth-child(n+2){border-left:1px solid #ddd}@media (min-width:768px){.uk-grid-divider>[class*=uk-width-medium-]:not(.uk-width-medium-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:960px){.uk-grid-divider>[class*=uk-width-large-]:not(.uk-width-large-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:1220px){.uk-grid-divider:not(.uk-grid-preserve):not(:empty){margin-left:-35px;margin-right:-35px}.uk-grid-divider:not(.uk-grid-preserve)>*{padding-left:35px;padding-right:35px}.uk-grid-divider:not(.uk-grid-preserve):empty{margin-top:35px;margin-bottom:35px}}.uk-grid-divider:empty{margin-top:25px;margin-bottom:25px;border-top:1px solid #ddd}[class*=uk-grid-width]>*{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.uk-grid-width-1-2>*{width:50%}.uk-grid-width-1-3>*{width:33.333%}.uk-grid-width-1-4>*{width:25%}.uk-grid-width-1-5>*{width:20%}.uk-grid-width-1-6>*{width:16.666%}.uk-grid-width-1-10>*{width:10%}@media (min-width:480px){.uk-grid-width-small-1-2>*{width:50%}.uk-grid-width-small-1-3>*{width:33.333%}.uk-grid-width-small-1-4>*{width:25%}.uk-grid-width-small-1-5>*{width:20%}.uk-grid-width-small-1-6>*{width:16.666%}.uk-grid-width-small-1-10>*{width:10%}}@media (min-width:768px){.uk-grid-width-medium-1-2>*{width:50%}.uk-grid-width-medium-1-3>*{width:33.333%}.uk-grid-width-medium-1-4>*{width:25%}.uk-grid-width-medium-1-5>*{width:20%}.uk-grid-width-medium-1-6>*{width:16.666%}.uk-grid-width-medium-1-10>*{width:10%}}@media (min-width:960px){.uk-grid-width-large-1-2>*{width:50%}.uk-grid-width-large-1-3>*{width:33.333%}.uk-grid-width-large-1-4>*{width:25%}.uk-grid-width-large-1-5>*{width:20%}.uk-grid-width-large-1-6>*{width:16.666%}.uk-grid-width-large-1-10>*{width:10%}}@media (min-width:1220px){.uk-grid-width-xlarge-1-2>*{width:50%}.uk-grid-width-xlarge-1-3>*{width:33.333%}.uk-grid-width-xlarge-1-4>*{width:25%}.uk-grid-width-xlarge-1-5>*{width:20%}.uk-grid-width-xlarge-1-6>*{width:16.666%}.uk-grid-width-xlarge-1-10>*{width:10%}}[class*=uk-width]{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.uk-width-1-1{width:100%}.uk-width-1-2,.uk-width-2-4,.uk-width-3-6,.uk-width-5-10{width:50%}.uk-width-1-3,.uk-width-2-6{width:33.333%}.uk-width-2-3,.uk-width-4-6{width:66.666%}.uk-width-1-4{width:25%}.uk-width-3-4{width:75%}.uk-width-1-5,.uk-width-2-10{width:20%}.uk-width-2-5,.uk-width-4-10{width:40%}.uk-width-3-5,.uk-width-6-10{width:60%}.uk-width-4-5,.uk-width-8-10{width:80%}.uk-width-1-6{width:16.666%}.uk-width-5-6{width:83.333%}.uk-width-1-10{width:10%}.uk-width-3-10{width:30%}.uk-width-7-10{width:70%}.uk-width-9-10{width:90%}@media (min-width:480px){.uk-width-small-1-1{width:100%}.uk-width-small-1-2,.uk-width-small-2-4,.uk-width-small-3-6,.uk-width-small-5-10{width:50%}.uk-width-small-1-3,.uk-width-small-2-6{width:33.333%}.uk-width-small-2-3,.uk-width-small-4-6{width:66.666%}.uk-width-small-1-4{width:25%}.uk-width-small-3-4{width:75%}.uk-width-small-1-5,.uk-width-small-2-10{width:20%}.uk-width-small-2-5,.uk-width-small-4-10{width:40%}.uk-width-small-3-5,.uk-width-small-6-10{width:60%}.uk-width-small-4-5,.uk-width-small-8-10{width:80%}.uk-width-small-1-6{width:16.666%}.uk-width-small-5-6{width:83.333%}.uk-width-small-1-10{width:10%}.uk-width-small-3-10{width:30%}.uk-width-small-7-10{width:70%}.uk-width-small-9-10{width:90%}}@media (min-width:768px){.uk-width-medium-1-1{width:100%}.uk-width-medium-1-2,.uk-width-medium-2-4,.uk-width-medium-3-6,.uk-width-medium-5-10{width:50%}.uk-width-medium-1-3,.uk-width-medium-2-6{width:33.333%}.uk-width-medium-2-3,.uk-width-medium-4-6{width:66.666%}.uk-width-medium-1-4{width:25%}.uk-width-medium-3-4{width:75%}.uk-width-medium-1-5,.uk-width-medium-2-10{width:20%}.uk-width-medium-2-5,.uk-width-medium-4-10{width:40%}.uk-width-medium-3-5,.uk-width-medium-6-10{width:60%}.uk-width-medium-4-5,.uk-width-medium-8-10{width:80%}.uk-width-medium-1-6{width:16.666%}.uk-width-medium-5-6{width:83.333%}.uk-width-medium-1-10{width:10%}.uk-width-medium-3-10{width:30%}.uk-width-medium-7-10{width:70%}.uk-width-medium-9-10{width:90%}}@media (min-width:960px){.uk-width-large-1-1{width:100%}.uk-width-large-1-2,.uk-width-large-2-4,.uk-width-large-3-6,.uk-width-large-5-10{width:50%}.uk-width-large-1-3,.uk-width-large-2-6{width:33.333%}.uk-width-large-2-3,.uk-width-large-4-6{width:66.666%}.uk-width-large-1-4{width:25%}.uk-width-large-3-4{width:75%}.uk-width-large-1-5,.uk-width-large-2-10{width:20%}.uk-width-large-2-5,.uk-width-large-4-10{width:40%}.uk-width-large-3-5,.uk-width-large-6-10{width:60%}.uk-width-large-4-5,.uk-width-large-8-10{width:80%}.uk-width-large-1-6{width:16.666%}.uk-width-large-5-6{width:83.333%}.uk-width-large-1-10{width:10%}.uk-width-large-3-10{width:30%}.uk-width-large-7-10{width:70%}.uk-width-large-9-10{width:90%}}@media (min-width:768px){[class*=uk-push-],[class*=uk-pull-]{position:relative}.uk-push-1-2,.uk-push-2-4,.uk-push-3-6,.uk-push-5-10{left:50%}.uk-push-1-3,.uk-push-2-6{left:33.333%}.uk-push-2-3,.uk-push-4-6{left:66.666%}.uk-push-1-4{left:25%}.uk-push-3-4{left:75%}.uk-push-1-5,.uk-push-2-10{left:20%}.uk-push-2-5,.uk-push-4-10{left:40%}.uk-push-3-5,.uk-push-6-10{left:60%}.uk-push-4-5,.uk-push-8-10{left:80%}.uk-push-1-6{left:16.666%}.uk-push-5-6{left:83.333%}.uk-push-1-10{left:10%}.uk-push-3-10{left:30%}.uk-push-7-10{left:70%}.uk-push-9-10{left:90%}.uk-pull-1-2,.uk-pull-2-4,.uk-pull-3-6,.uk-pull-5-10{left:-50%}.uk-pull-1-3,.uk-pull-2-6{left:-33.333%}.uk-pull-2-3,.uk-pull-4-6{left:-66.666%}.uk-pull-1-4{left:-25%}.uk-pull-3-4{left:-75%}.uk-pull-1-5,.uk-pull-2-10{left:-20%}.uk-pull-2-5,.uk-pull-4-10{left:-40%}.uk-pull-3-5,.uk-pull-6-10{left:-60%}.uk-pull-4-5,.uk-pull-8-10{left:-80%}.uk-pull-1-6{left:-16.666%}.uk-pull-5-6{left:-83.333%}.uk-pull-1-10{left:-10%}.uk-pull-3-10{left:-30%}.uk-pull-7-10{left:-70%}.uk-pull-9-10{left:-90%}}.uk-panel{display:block;position:relative}.uk-panel:before,.uk-panel:after{content:" ";display:table}.uk-panel:after{clear:both}.uk-panel>:not(.uk-panel-title):last-child{margin-bottom:0}.uk-panel-title{margin-top:0;margin-bottom:15px;font-size:18px;line-height:24px;font-weight:400;text-transform:none;color:#444}.uk-panel-badge{position:absolute;top:0;right:0;z-index:1}.uk-panel-box{padding:15px;background:#fafafa;color:#444;border:1px solid #ddd;border-radius:4px}.uk-panel-box .uk-panel-title{color:#444}.uk-panel-box .uk-panel-badge{top:10px;right:10px}.uk-panel-box .uk-panel-teaser{margin:-16px -16px 15px -16px}.uk-panel-box>.uk-nav-side{margin:0 -15px}.uk-panel-box-primary{background-color:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-panel-box-primary .uk-panel-title{color:#2d7091}.uk-panel-box-secondary{background-color:#fff;color:#444}.uk-panel-box-secondary .uk-panel-title{color:#444}.uk-panel-header .uk-panel-title{padding-bottom:10px;border-bottom:1px solid #ddd;color:#444}.uk-panel-space{padding:30px}.uk-panel-space .uk-panel-badge{top:30px;right:30px}.uk-panel+.uk-panel-divider{margin-top:50px!important}.uk-panel+.uk-panel-divider:before{content:"";display:block;position:absolute;top:-25px;left:0;right:0;border-top:1px solid #ddd}@media (min-width:1220px){.uk-panel+.uk-panel-divider{margin-top:70px!important}.uk-panel+.uk-panel-divider:before{top:-35px}}.uk-panel-box .uk-panel-teaser>*{border-top-left-radius:4px;border-top-right-radius:4px}.uk-article:before,.uk-article:after{content:" ";display:table}.uk-article:after{clear:both}.uk-article>:last-child{margin-bottom:0}.uk-article+.uk-article{margin-top:25px}.uk-article-title{font-size:36px;line-height:42px;font-weight:400;text-transform:none}.uk-article-title a{color:inherit;text-decoration:none}.uk-article-meta{font-size:12px;line-height:18px;color:#999}.uk-article-lead{color:#444;font-size:18px;line-height:24px;font-weight:400}.uk-article-divider{margin-bottom:25px;border-color:#ddd}*+.uk-article-divider{margin-top:25px}.uk-article+.uk-article{padding-top:25px;border-top:1px solid #ddd}.uk-comment-header{margin-bottom:15px;padding:10px;border:1px solid #ddd;border-radius:4px;background:#fafafa}.uk-comment-header:before,.uk-comment-header:after{content:" ";display:table}.uk-comment-header:after{clear:both}.uk-comment-avatar{margin-right:15px;float:left}.uk-comment-title{margin:5px 0 0;font-size:16px;line-height:22px}.uk-comment-meta{margin:2px 0 0;font-size:11px;line-height:16px;color:#999}.uk-comment-body{padding-left:10px;padding-right:10px}.uk-comment-body>:last-child{margin-bottom:0}.uk-comment-list{padding:0;list-style:none}.uk-comment-list .uk-comment+ul{margin:25px 0 0;list-style:none}.uk-comment-list>li:nth-child(n+2),.uk-comment-list .uk-comment+ul>li:nth-child(n+2){margin-top:25px}@media (min-width:768px){.uk-comment-list .uk-comment+ul{padding-left:100px}}.uk-comment-primary .uk-comment-header{border-color:rgba(45,112,145,.3);background-color:#ebf7fd;color:#2d7091;text-shadow:0 1px 0 #fff}.uk-nav,.uk-nav ul{margin:0;padding:0;list-style:none}.uk-nav li>a{display:block;text-decoration:none}.uk-nav>li>a{padding:5px 15px}.uk-nav ul{padding-left:15px}.uk-nav ul a{padding:2px 0}.uk-nav li>a>div{font-size:12px;line-height:18px}.uk-nav-header{padding:5px 15px;text-transform:uppercase;font-weight:700;font-size:12px}.uk-nav-header:not(:first-child){margin-top:15px}.uk-nav-divider{margin:9px 15px}ul.uk-nav-sub{padding:5px 0 5px 15px}.uk-nav-parent-icon>.uk-parent>a:after{content:"\f104";width:20px;margin-right:-10px;float:right;font-family:FontAwesome;text-align:center}.uk-nav-parent-icon>.uk-parent.uk-open>a:after{content:"\f107"}.uk-nav-side>li>a{color:#444}.uk-nav-side>li>a:hover,.uk-nav-side>li>a:focus{background:rgba(0,0,0,.03);color:#444;outline:0;box-shadow:inset 0 0 1px rgba(0,0,0,.06);text-shadow:0 -1px 0 #fff}.uk-nav-side>li.uk-active>a{background:#00a8e6;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-side .uk-nav-header{color:#444}.uk-nav-side .uk-nav-divider{border-top:1px solid #ddd;box-shadow:0 1px 0 #fff}.uk-nav-side ul a{color:#07d}.uk-nav-side ul a:hover{color:#059}.uk-nav-dropdown>li>a{color:#444}.uk-nav-dropdown>li>a:hover,.uk-nav-dropdown>li>a:focus{background:#00a8e6;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-dropdown .uk-nav-header{color:#999}.uk-nav-dropdown .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-dropdown ul a{color:#07d}.uk-nav-dropdown ul a:hover{color:#059}.uk-nav-navbar>li>a{color:#444}.uk-nav-navbar>li>a:hover,.uk-nav-navbar>li>a:focus{background:#00a8e6;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-navbar .uk-nav-header{color:#999}.uk-nav-navbar .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-navbar ul a{color:#07d}.uk-nav-navbar ul a:hover{color:#059}.uk-nav-offcanvas>li>a{color:#ccc;padding:10px 15px;border-top:1px solid rgba(0,0,0,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-nav-offcanvas>.uk-open>a,html:not(.uk-touch) .uk-nav-offcanvas>li>a:hover,html:not(.uk-touch) .uk-nav-offcanvas>li>a:focus{background:#404040;color:#fff;outline:0}html .uk-nav.uk-nav-offcanvas>li.uk-active>a{background:#1a1a1a;color:#fff;box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas .uk-nav-header{color:#777;margin-top:0;border-top:1px solid rgba(0,0,0,.3);background:#404040;box-shadow:inset 0 1px 0 rgba(255,255,255,.05);text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-nav-offcanvas .uk-nav-divider{border-top:1px solid rgba(255,255,255,.01);margin:0;height:4px;background:rgba(0,0,0,.2);box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas ul a{color:#ccc}html:not(.uk-touch) .uk-nav-offcanvas ul a:hover{color:#fff}.uk-nav-offcanvas{border-bottom:1px solid rgba(0,0,0,.3);box-shadow:0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-sub{border-top:1px solid rgba(0,0,0,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-navbar{background:#f5f5f5;color:#444;border:1px solid rgba(0,0,0,.06);border-radius:4px}.uk-navbar:before,.uk-navbar:after{content:" ";display:table}.uk-navbar:after{clear:both}.uk-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-navbar-nav>li{float:left;position:relative}.uk-navbar-nav>li>a{display:block;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-navbar-nav>li>a[href='#']{cursor:text}.uk-navbar-nav>li:hover>a,.uk-navbar-nav>li>a:focus,.uk-navbar-nav>li.uk-open>a{background-color:#fafafa;color:#444;outline:0;position:relative;z-index:1;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav>li>a:active{background-color:#eee;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.2)}.uk-navbar-nav>li.uk-active>a{background-color:#fafafa;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav .uk-navbar-nav-subtitle{line-height:28px}.uk-navbar-nav-subtitle>div{margin-top:-6px;font-size:10px;line-height:12px}.uk-navbar-content,.uk-navbar-brand,.uk-navbar-toggle{-moz-box-sizing:border-box;box-sizing:border-box;display:block;height:41px;padding:0 15px;float:left;margin-top:-1px;text-shadow:0 1px 0 #fff}.uk-navbar-content:before,.uk-navbar-brand:before,.uk-navbar-toggle:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-navbar-content+.uk-navbar-content:not(.uk-navbar-center){padding-left:0}.uk-navbar-content>a:not([class]){color:#07d}.uk-navbar-content>a:not([class]):hover{color:#059}.uk-navbar-brand{font-size:18px;color:#444}.uk-navbar-brand:hover,.uk-navbar-brand:focus{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle{font-size:18px;color:#444}.uk-navbar-toggle:hover,.uk-navbar-toggle:focus{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle:after{content:"\f0c9";font-family:FontAwesome;vertical-align:middle}.uk-navbar-toggle-alt:after{content:"\f002"}.uk-navbar-center{float:none;text-align:center;max-width:50%;margin-left:auto;margin-right:auto}.uk-navbar-flip{float:right}.uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:4px;border-bottom-left-radius:4px}.uk-navbar-flip .uk-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-navbar-flip .uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0;border-bottom-left-radius:0}.uk-navbar-flip .uk-navbar-nav:last-child>li:last-child>a{border-top-right-radius:4px;border-bottom-right-radius:4px}.uk-navbar-attached{border-top-color:transparent;border-left-color:transparent;border-right-color:transparent;border-radius:0}.uk-navbar-attached .uk-navbar-nav>li>a{border-radius:0!important}.uk-subnav{padding:0;list-style:none;font-size:0}.uk-subnav>li{position:relative;font-size:1rem;vertical-align:top}.uk-subnav>li,.uk-subnav>li>a,.uk-subnav>li>span{display:inline-block}.uk-subnav>li:nth-child(n+2){margin-left:10px}.uk-subnav>li>a{color:#07d}.uk-subnav>li>a:hover{color:#059}.uk-subnav>li>span{color:#999}.uk-subnav-line>li:nth-child(n+2):before{content:"";display:inline-block;height:10px;margin-right:10px;border-left:1px solid #ddd}.uk-subnav-pill>li>a,.uk-subnav-pill>li>span{padding:3px 9px;text-decoration:none;border-radius:4px}.uk-subnav-pill>li>a:hover,.uk-subnav-pill>li>a:focus{background:#fafafa;color:#444;outline:0;box-shadow:0 0 0 1px rgba(0,0,0,.15)}.uk-subnav-pill>li.uk-active>a{background:#00a8e6;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05)}.uk-breadcrumb{padding:0;list-style:none;font-size:0}.uk-breadcrumb>li{font-size:1rem;vertical-align:top}.uk-breadcrumb>li,.uk-breadcrumb>li>a,.uk-breadcrumb>li>span{display:inline-block}.uk-breadcrumb>li:nth-child(n+2):before{content:"/";display:inline-block;margin:0 8px}.uk-breadcrumb>li:not(.uk-active)>span{color:#999}.uk-pagination{padding:0;list-style:none;text-align:center;font-size:0}.uk-pagination:before,.uk-pagination:after{content:" ";display:table}.uk-pagination:after{clear:both}.uk-pagination>li{display:inline-block;font-size:1rem;vertical-align:top}.uk-pagination>li:nth-child(n+2){margin-left:5px}.uk-pagination>li>a,.uk-pagination>li>span{display:inline-block;min-width:16px;padding:3px 5px;line-height:20px;text-decoration:none;-moz-box-sizing:content-box;box-sizing:content-box;text-align:center;border-radius:4px}.uk-pagination>li>a{background:#f5f5f5;color:#444;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}.uk-pagination>li>a:hover,.uk-pagination>li>a:focus{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.16)}.uk-pagination>li>a:active{background-color:#eee;color:#444}.uk-pagination>.uk-active>span{background:#00a8e6;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-pagination>.uk-disabled>span{background-color:#fafafa;color:#999;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}.uk-pagination-previous{float:left}.uk-pagination-next{float:right}.uk-pagination-left{text-align:left}.uk-pagination-right{text-align:right}.uk-tab{margin:0;padding:0;list-style:none;border-bottom:1px solid #ddd}.uk-tab:before,.uk-tab:after{content:" ";display:table}.uk-tab:after{clear:both}.uk-tab>li{margin-bottom:-1px;float:left;position:relative}.uk-tab>li>a{display:block;padding:8px 12px;border:1px solid transparent;border-bottom-width:0;color:#07d;text-decoration:none;border-radius:4px 4px 0 0;text-shadow:0 1px 0 #fff}.uk-tab>li:nth-child(n+2)>a{margin-left:5px}.uk-tab>li>a:hover,.uk-tab>li>a:focus,.uk-tab>li.uk-open>a{border-color:rgba(0,0,0,.06);background:#f5f5f5;color:#059;outline:0}.uk-tab>li:not(.uk-active)>a:hover,.uk-tab>li:not(.uk-active)>a:focus,.uk-tab>li.uk-open:not(.uk-active)>a{margin-bottom:1px;padding-bottom:7px}.uk-tab>li.uk-active>a{border-color:#ddd;border-bottom-color:transparent;background:#fff;color:#444}.uk-tab>li.uk-disabled>a{color:#999;cursor:auto}.uk-tab>li.uk-disabled>a:hover,.uk-tab>li.uk-disabled>a:focus,.uk-tab>li.uk-disabled.uk-active>a{background:0 0;border-color:transparent}.uk-tab-flip>li{float:right}.uk-tab-flip>li:nth-child(n+2)>a{margin-left:0;margin-right:5px}.uk-tab-responsive{display:none}.uk-tab-responsive>a:before{content:"\f0c9\00a0";font-family:FontAwesome}@media (max-width:767px){[data-uk-tab]>li{display:none}[data-uk-tab]>li.uk-tab-responsive{display:block}[data-uk-tab]>li.uk-tab-responsive>a{margin-left:0;margin-right:0}}.uk-tab-center{border-bottom:1px solid #ddd}.uk-tab-center-bottom{border-bottom:none;border-top:1px solid #ddd}.uk-tab-center:before,.uk-tab-center:after{content:" ";display:table}.uk-tab-center:after{clear:both}.uk-tab-center .uk-tab{position:relative;right:50%;border:none;float:right}.uk-tab-center .uk-tab>li{position:relative;right:-50%}.uk-tab-center .uk-tab>li>a{text-align:center}.uk-tab-bottom{border-top:1px solid #ddd;border-bottom:none}.uk-tab-bottom>li{margin-top:-1px;margin-bottom:0}.uk-tab-bottom>li>a{padding-top:8px;padding-bottom:8px;border-bottom-width:1px;border-top-width:0}.uk-tab-bottom>li:not(.uk-active)>a:hover,.uk-tab-bottom>li:not(.uk-active)>a:focus,.uk-tab-bottom>li.uk-open:not(.uk-active)>a{margin-bottom:0;margin-top:1px;padding-bottom:8px;padding-top:7px}.uk-tab-bottom>li.uk-active>a{border-top-color:transparent;border-bottom-color:#ddd}.uk-tab-grid{margin-left:-5px;border-bottom:none;position:relative;z-index:0}.uk-tab-grid:before{display:block;position:absolute;left:5px;right:0;bottom:-1px;border-top:1px solid #ddd;z-index:-1}.uk-tab-grid>li:first-child>a{margin-left:5px}.uk-tab-grid>li>a{text-align:center}.uk-tab-grid.uk-tab-bottom{border-top:none}.uk-tab-grid.uk-tab-bottom:before{top:-1px;bottom:auto}@media (min-width:768px){.uk-tab-left,.uk-tab-right{border-bottom:none}.uk-tab-left>li,.uk-tab-right>li{margin-bottom:0;float:none}.uk-tab-left>li>a,.uk-tab-right>li>a{padding-top:8px;padding-bottom:8px}.uk-tab-left>li:nth-child(n+2)>a,.uk-tab-right>li:nth-child(n+2)>a{margin-left:0;margin-top:5px}.uk-tab-left>li.uk-active>a,.uk-tab-right>li.uk-active>a{border-color:#ddd}.uk-tab-left{border-right:1px solid #ddd}.uk-tab-left>li{margin-right:-1px}.uk-tab-left>li>a{border-bottom-width:1px;border-right-width:0}.uk-tab-left>li:not(.uk-active)>a:hover,.uk-tab-left>li:not(.uk-active)>a:focus{margin-bottom:0;margin-right:1px;padding-bottom:8px;padding-right:11px}.uk-tab-left>li.uk-active>a{border-right-color:transparent}.uk-tab-right{border-left:1px solid #ddd}.uk-tab-right>li{margin-left:-1px}.uk-tab-right>li>a{border-bottom-width:1px;border-left-width:0}.uk-tab-right>li:not(.uk-active)>a:hover,.uk-tab-right>li:not(.uk-active)>a:focus{margin-bottom:0;margin-left:1px;padding-bottom:8px;padding-left:11px}.uk-tab-right>li.uk-active>a{border-left-color:transparent}}.uk-tab-bottom>li>a{border-radius:0 0 4px 4px}@media (min-width:768px){.uk-tab-left>li>a{border-radius:4px 0 0 4px}.uk-tab-right>li>a{border-radius:0 4px 4px 0}}.uk-list{padding:0;list-style:none}.uk-list>li:before,.uk-list>li:after{content:" ";display:table}.uk-list>li:after{clear:both}.uk-list>li>:last-child{margin-bottom:0}.uk-list ul{margin:0;padding-left:20px;list-style:none}.uk-list-line>li:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-list-striped>li{padding:5px;border-bottom:1px solid #ddd}.uk-list-striped>li:nth-of-type(odd){background:#fafafa}.uk-list-space>li:nth-child(n+2){margin-top:10px}.uk-list-striped>li:first-child{border-top:1px solid #ddd}@media (min-width:768px){.uk-description-list-horizontal{overflow:hidden}.uk-description-list-horizontal>dt{width:160px;float:left;clear:both;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-description-list-horizontal>dd{margin-left:180px}}.uk-description-list-line>dt{font-weight:400}.uk-description-list-line>dt:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-description-list-line>dd{color:#999}.uk-table{width:100%;margin-bottom:15px}*+.uk-table{margin-top:15px}.uk-table th,.uk-table td{padding:8px;border-bottom:1px solid #ddd}.uk-table th{text-align:left}.uk-table td{vertical-align:top}.uk-table thead th{vertical-align:bottom}.uk-table caption,.uk-table tfoot{font-size:12px;font-style:italic}.uk-table caption{text-align:left;color:#999}.uk-table-middle,.uk-table-middle td{vertical-align:middle!important}.uk-table-striped tbody tr:nth-of-type(odd){background:#fafafa}.uk-table-condensed td{padding:4px 8px}.uk-table-hover tbody tr:hover{background:#f0f0f0}.uk-form>:last-child{margin-bottom:0}.uk-form select,.uk-form textarea,.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=datetime],.uk-form input[type=datetime-local],.uk-form input[type=date],.uk-form input[type=month],.uk-form input[type=time],.uk-form input[type=week],.uk-form input[type=number],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=color]{height:30px;max-width:100%;padding:4px 6px;border:1px solid #ddd;background:#fff;color:#444;-webkit-transition:all linear .2s;transition:all linear .2s;border-radius:4px}.uk-form select:focus,.uk-form textarea:focus,.uk-form input:not([type]):focus,.uk-form input[type=text]:focus,.uk-form input[type=password]:focus,.uk-form input[type=datetime]:focus,.uk-form input[type=datetime-local]:focus,.uk-form input[type=date]:focus,.uk-form input[type=month]:focus,.uk-form input[type=time]:focus,.uk-form input[type=week]:focus,.uk-form input[type=number]:focus,.uk-form input[type=email]:focus,.uk-form input[type=url]:focus,.uk-form input[type=search]:focus,.uk-form input[type=tel]:focus,.uk-form input[type=color]:focus{border-color:#99baca;outline:0;background:#f5fbfe;color:#444}.uk-form select:disabled,.uk-form textarea:disabled,.uk-form input:not([type]):disabled,.uk-form input[type=text]:disabled,.uk-form input[type=password]:disabled,.uk-form input[type=datetime]:disabled,.uk-form input[type=datetime-local]:disabled,.uk-form input[type=date]:disabled,.uk-form input[type=month]:disabled,.uk-form input[type=time]:disabled,.uk-form input[type=week]:disabled,.uk-form input[type=number]:disabled,.uk-form input[type=email]:disabled,.uk-form input[type=url]:disabled,.uk-form input[type=search]:disabled,.uk-form input[type=tel]:disabled,.uk-form input[type=color]:disabled{border-color:#ddd;background-color:#fafafa;color:#999}.uk-form :-ms-input-placeholder{color:#999!important}.uk-form ::-moz-placeholder{color:#999}.uk-form ::-webkit-input-placeholder{color:#999}.uk-form :disabled:-ms-input-placeholder{color:#999!important}.uk-form :disabled::-moz-placeholder{color:#999}.uk-form :disabled::-webkit-input-placeholder{color:#999}.uk-form textarea,.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel]{-webkit-appearance:none}.uk-form :invalid{box-shadow:none}.uk-form legend{width:100%;padding-bottom:15px;font-size:18px;line-height:30px}.uk-form legend:after{content:"";display:block;border-bottom:1px solid #ddd}select.uk-form-small,textarea.uk-form-small,input[type].uk-form-small,input:not([type]).uk-form-small{height:25px;padding:3px;font-size:12px}select.uk-form-large,textarea.uk-form-large,input[type].uk-form-large,input:not([type]).uk-form-large{height:40px;padding:8px 6px;font-size:16px}.uk-form textarea,.uk-form select[multiple],.uk-form select[size]{height:auto}.uk-form-danger{border-color:#dc8d99!important;background:#fff7f8!important;color:#c91032!important}.uk-form-success{border-color:#8ec73b!important;background:#fafff2!important;color:#539022!important}.uk-form-blank{border-color:transparent!important;border-style:dashed!important;background:none!important}.uk-form-blank:focus{border-color:#ddd!important}input.uk-form-width-mini{width:40px}select.uk-form-width-mini{width:65px}.uk-form-width-small{width:130px}.uk-form-width-medium{width:200px}.uk-form-width-large{width:500px}.uk-form-row:before,.uk-form-row:after{content:" ";display:table}.uk-form-row:after{clear:both}.uk-form-row+.uk-form-row{margin-top:15px}.uk-form-help-inline{display:inline-block;margin:0 0 0 10px}.uk-form-help-block{margin:5px 0 0}.uk-form-controls>:first-child{margin-top:0}.uk-form-controls>:last-child{margin-bottom:0}.uk-form-controls-condensed{margin:5px 0}.uk-form-stacked .uk-form-label{display:block;margin-bottom:5px;font-weight:700}@media (max-width:959px){.uk-form-horizontal .uk-form-label{display:block;margin-bottom:5px;font-weight:700}}@media (min-width:960px){.uk-form-horizontal .uk-form-label{width:200px;margin-top:5px;float:left}.uk-form-horizontal .uk-form-controls{margin-left:215px}.uk-form-horizontal .uk-form-controls-text{padding-top:5px}}.uk-form-icon{position:relative;display:inline-block;max-width:100%}.uk-form-icon>[class*=uk-icon-]{position:absolute;top:50%;width:30px;margin-top:-7px;font-size:14px;color:#999;text-align:center}.uk-form-icon:not(.uk-form-icon-flip)>input{padding-left:30px!important}.uk-form-icon-flip>[class*=uk-icon-]{right:0}.uk-form-icon-flip>input{padding-right:30px!important}.uk-button{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;text-decoration:none;text-align:center;border:none;line-height:28px;min-height:30px;font-size:1rem;padding:0 12px;background:#f5f5f5;color:#444;border:1px solid rgba(0,0,0,.06);border-radius:4px;text-shadow:0 1px 0 #fff}.uk-button:hover,.uk-button:focus{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:rgba(0,0,0,.16)}.uk-button:active,.uk-button.uk-active{background-color:#eee;color:#444}.uk-button-primary{background-color:#00a8e6;color:#fff}.uk-button-primary:hover,.uk-button-primary:focus{background-color:#35b3ee;color:#fff}.uk-button-primary:active,.uk-button-primary.uk-active{background-color:#0091ca;color:#fff}.uk-button-success{background-color:#8cc14c;color:#fff}.uk-button-success:hover,.uk-button-success:focus{background-color:#8ec73b;color:#fff}.uk-button-success:active,.uk-button-success.uk-active{background-color:#72ae41;color:#fff}.uk-button-danger{background-color:#da314b;color:#fff}.uk-button-danger:hover,.uk-button-danger:focus{background-color:#e4354f;color:#fff}.uk-button-danger:active,.uk-button-danger.uk-active{background-color:#c91032;color:#fff}.uk-button:disabled{background-color:#fafafa;color:#999;border-color:rgba(0,0,0,.06);box-shadow:none;text-shadow:0 1px 0 #fff}.uk-button-link,.uk-button-link:hover,.uk-button-link:focus,.uk-button-link:active,.uk-button-link.uk-active,.uk-button-link:disabled{border-color:transparent;background:0 0;box-shadow:none;text-shadow:none}.uk-button-link{color:#07d}.uk-button-link:hover,.uk-button-link:focus,.uk-button-link:active,.uk-button-link.uk-active{color:#059;text-decoration:underline}.uk-button-link:disabled{color:#999}.uk-button-link:focus{outline:1px dotted}.uk-button-mini{min-height:20px;padding:0 6px;line-height:18px;font-size:11px}.uk-button-small{min-height:25px;padding:0 10px;line-height:23px;font-size:12px}.uk-button-large{min-height:40px;padding:0 15px;line-height:38px;font-size:16px;border-radius:5px}.uk-button-group{display:inline-block;vertical-align:middle;position:relative;font-size:0;white-space:nowrap}.uk-button-group>*{display:inline-block}.uk-button-group .uk-button{vertical-align:top}.uk-button-dropdown{display:inline-block;vertical-align:middle;position:relative}.uk-button-primary,.uk-button-success,.uk-button-danger{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-button-primary:hover,.uk-button-primary:focus,.uk-button-success:hover,.uk-button-success:focus,.uk-button-danger:hover,.uk-button-danger:focus{border-color:rgba(0,0,0,.21)}.uk-button-group>.uk-button:not(:first-child):not(:last-child),.uk-button-group>div:not(:first-child):not(:last-child) .uk-button{border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-radius:0}.uk-button-group>.uk-button:first-child,.uk-button-group>div:first-child .uk-button{border-right-color:rgba(0,0,0,.1);border-top-right-radius:0;border-bottom-right-radius:0}.uk-button-group>.uk-button:last-child,.uk-button-group>div:last-child .uk-button{border-left-color:rgba(0,0,0,.1);border-top-left-radius:0;border-bottom-left-radius:0}.uk-button-group>.uk-button:nth-child(n+2),.uk-button-group>div:nth-child(n+2) .uk-button{margin-left:-1px}.uk-button-group .uk-button:hover,.uk-button-group .uk-button:active{position:relative}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot);src:url(../fonts/fontawesome-webfont.eot?#iefix) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff) format("woff"),url(../fonts/fontawesome-webfont.ttf) format("truetype");font-weight:400;font-style:normal}[class*=uk-icon-]{font-family:FontAwesome;display:inline-block;font-weight:400;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.uk-icon-small:before{font-size:150%;vertical-align:-10%}.uk-icon-medium:before{font-size:200%;vertical-align:-16%}.uk-icon-large:before{font-size:250%;vertical-align:-22%}.uk-icon-spin{display:inline-block;-webkit-animation:uk-spin 2s infinite linear;animation:uk-spin 2s infinite linear}.uk-icon-button{-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:35px;height:35px;border-radius:100%;background:#f5f5f5;line-height:35px;color:#444;font-size:18px;text-align:center;border:1px solid #e7e7e7;text-shadow:0 1px 0 #fff}.uk-icon-button:hover,.uk-icon-button:focus{background-color:#fafafa;color:#444;text-decoration:none;outline:0;border-color:#d3d3d3}.uk-icon-button:active{background-color:#eee;color:#444}.uk-icon-glass:before{content:"\f000"}.uk-icon-music:before{content:"\f001"}.uk-icon-search:before{content:"\f002"}.uk-icon-envelope-o:before{content:"\f003"}.uk-icon-heart:before{content:"\f004"}.uk-icon-star:before{content:"\f005"}.uk-icon-star-o:before{content:"\f006"}.uk-icon-user:before{content:"\f007"}.uk-icon-film:before{content:"\f008"}.uk-icon-th-large:before{content:"\f009"}.uk-icon-th:before{content:"\f00a"}.uk-icon-th-list:before{content:"\f00b"}.uk-icon-check:before{content:"\f00c"}.uk-icon-times:before{content:"\f00d"}.uk-icon-search-plus:before{content:"\f00e"}.uk-icon-search-minus:before{content:"\f010"}.uk-icon-power-off:before{content:"\f011"}.uk-icon-signal:before{content:"\f012"}.uk-icon-gear:before,.uk-icon-cog:before{content:"\f013"}.uk-icon-trash-o:before{content:"\f014"}.uk-icon-home:before{content:"\f015"}.uk-icon-file-o:before{content:"\f016"}.uk-icon-clock-o:before{content:"\f017"}.uk-icon-road:before{content:"\f018"}.uk-icon-download:before{content:"\f019"}.uk-icon-arrow-circle-o-down:before{content:"\f01a"}.uk-icon-arrow-circle-o-up:before{content:"\f01b"}.uk-icon-inbox:before{content:"\f01c"}.uk-icon-play-circle-o:before{content:"\f01d"}.uk-icon-rotate-right:before,.uk-icon-repeat:before{content:"\f01e"}.uk-icon-refresh:before{content:"\f021"}.uk-icon-list-alt:before{content:"\f022"}.uk-icon-lock:before{content:"\f023"}.uk-icon-flag:before{content:"\f024"}.uk-icon-headphones:before{content:"\f025"}.uk-icon-volume-off:before{content:"\f026"}.uk-icon-volume-down:before{content:"\f027"}.uk-icon-volume-up:before{content:"\f028"}.uk-icon-qrcode:before{content:"\f029"}.uk-icon-barcode:before{content:"\f02a"}.uk-icon-tag:before{content:"\f02b"}.uk-icon-tags:before{content:"\f02c"}.uk-icon-book:before{content:"\f02d"}.uk-icon-bookmark:before{content:"\f02e"}.uk-icon-print:before{content:"\f02f"}.uk-icon-camera:before{content:"\f030"}.uk-icon-font:before{content:"\f031"}.uk-icon-bold:before{content:"\f032"}.uk-icon-italic:before{content:"\f033"}.uk-icon-text-height:before{content:"\f034"}.uk-icon-text-width:before{content:"\f035"}.uk-icon-align-left:before{content:"\f036"}.uk-icon-align-center:before{content:"\f037"}.uk-icon-align-right:before{content:"\f038"}.uk-icon-align-justify:before{content:"\f039"}.uk-icon-list:before{content:"\f03a"}.uk-icon-dedent:before,.uk-icon-outdent:before{content:"\f03b"}.uk-icon-indent:before{content:"\f03c"}.uk-icon-video-camera:before{content:"\f03d"}.uk-icon-picture-o:before{content:"\f03e"}.uk-icon-pencil:before{content:"\f040"}.uk-icon-map-marker:before{content:"\f041"}.uk-icon-adjust:before{content:"\f042"}.uk-icon-tint:before{content:"\f043"}.uk-icon-edit:before,.uk-icon-pencil-square-o:before{content:"\f044"}.uk-icon-share-square-o:before{content:"\f045"}.uk-icon-check-square-o:before{content:"\f046"}.uk-icon-arrows:before{content:"\f047"}.uk-icon-step-backward:before{content:"\f048"}.uk-icon-fast-backward:before{content:"\f049"}.uk-icon-backward:before{content:"\f04a"}.uk-icon-play:before{content:"\f04b"}.uk-icon-pause:before{content:"\f04c"}.uk-icon-stop:before{content:"\f04d"}.uk-icon-forward:before{content:"\f04e"}.uk-icon-fast-forward:before{content:"\f050"}.uk-icon-step-forward:before{content:"\f051"}.uk-icon-eject:before{content:"\f052"}.uk-icon-chevron-left:before{content:"\f053"}.uk-icon-chevron-right:before{content:"\f054"}.uk-icon-plus-circle:before{content:"\f055"}.uk-icon-minus-circle:before{content:"\f056"}.uk-icon-times-circle:before{content:"\f057"}.uk-icon-check-circle:before{content:"\f058"}.uk-icon-question-circle:before{content:"\f059"}.uk-icon-info-circle:before{content:"\f05a"}.uk-icon-crosshairs:before{content:"\f05b"}.uk-icon-times-circle-o:before{content:"\f05c"}.uk-icon-check-circle-o:before{content:"\f05d"}.uk-icon-ban:before{content:"\f05e"}.uk-icon-arrow-left:before{content:"\f060"}.uk-icon-arrow-right:before{content:"\f061"}.uk-icon-arrow-up:before{content:"\f062"}.uk-icon-arrow-down:before{content:"\f063"}.uk-icon-mail-forward:before,.uk-icon-share:before{content:"\f064"}.uk-icon-expand:before{content:"\f065"}.uk-icon-compress:before{content:"\f066"}.uk-icon-plus:before{content:"\f067"}.uk-icon-minus:before{content:"\f068"}.uk-icon-asterisk:before{content:"\f069"}.uk-icon-exclamation-circle:before{content:"\f06a"}.uk-icon-gift:before{content:"\f06b"}.uk-icon-leaf:before{content:"\f06c"}.uk-icon-fire:before{content:"\f06d"}.uk-icon-eye:before{content:"\f06e"}.uk-icon-eye-slash:before{content:"\f070"}.uk-icon-warning:before,.uk-icon-exclamation-triangle:before{content:"\f071"}.uk-icon-plane:before{content:"\f072"}.uk-icon-calendar:before{content:"\f073"}.uk-icon-random:before{content:"\f074"}.uk-icon-comment:before{content:"\f075"}.uk-icon-magnet:before{content:"\f076"}.uk-icon-chevron-up:before{content:"\f077"}.uk-icon-chevron-down:before{content:"\f078"}.uk-icon-retweet:before{content:"\f079"}.uk-icon-shopping-cart:before{content:"\f07a"}.uk-icon-folder:before{content:"\f07b"}.uk-icon-folder-open:before{content:"\f07c"}.uk-icon-arrows-v:before{content:"\f07d"}.uk-icon-arrows-h:before{content:"\f07e"}.uk-icon-bar-chart-o:before{content:"\f080"}.uk-icon-twitter-square:before{content:"\f081"}.uk-icon-facebook-square:before{content:"\f082"}.uk-icon-camera-retro:before{content:"\f083"}.uk-icon-key:before{content:"\f084"}.uk-icon-gears:before,.uk-icon-cogs:before{content:"\f085"}.uk-icon-comments:before{content:"\f086"}.uk-icon-thumbs-o-up:before{content:"\f087"}.uk-icon-thumbs-o-down:before{content:"\f088"}.uk-icon-star-half:before{content:"\f089"}.uk-icon-heart-o:before{content:"\f08a"}.uk-icon-sign-out:before{content:"\f08b"}.uk-icon-linkedin-square:before{content:"\f08c"}.uk-icon-thumb-tack:before{content:"\f08d"}.uk-icon-external-link:before{content:"\f08e"}.uk-icon-sign-in:before{content:"\f090"}.uk-icon-trophy:before{content:"\f091"}.uk-icon-github-square:before{content:"\f092"}.uk-icon-upload:before{content:"\f093"}.uk-icon-lemon-o:before{content:"\f094"}.uk-icon-phone:before{content:"\f095"}.uk-icon-square-o:before{content:"\f096"}.uk-icon-bookmark-o:before{content:"\f097"}.uk-icon-phone-square:before{content:"\f098"}.uk-icon-twitter:before{content:"\f099"}.uk-icon-facebook:before{content:"\f09a"}.uk-icon-github:before{content:"\f09b"}.uk-icon-unlock:before{content:"\f09c"}.uk-icon-credit-card:before{content:"\f09d"}.uk-icon-rss:before{content:"\f09e"}.uk-icon-hdd-o:before{content:"\f0a0"}.uk-icon-bullhorn:before{content:"\f0a1"}.uk-icon-bell:before{content:"\f0f3"}.uk-icon-certificate:before{content:"\f0a3"}.uk-icon-hand-o-right:before{content:"\f0a4"}.uk-icon-hand-o-left:before{content:"\f0a5"}.uk-icon-hand-o-up:before{content:"\f0a6"}.uk-icon-hand-o-down:before{content:"\f0a7"}.uk-icon-arrow-circle-left:before{content:"\f0a8"}.uk-icon-arrow-circle-right:before{content:"\f0a9"}.uk-icon-arrow-circle-up:before{content:"\f0aa"}.uk-icon-arrow-circle-down:before{content:"\f0ab"}.uk-icon-globe:before{content:"\f0ac"}.uk-icon-wrench:before{content:"\f0ad"}.uk-icon-tasks:before{content:"\f0ae"}.uk-icon-filter:before{content:"\f0b0"}.uk-icon-briefcase:before{content:"\f0b1"}.uk-icon-arrows-alt:before{content:"\f0b2"}.uk-icon-group:before,.uk-icon-users:before{content:"\f0c0"}.uk-icon-chain:before,.uk-icon-link:before{content:"\f0c1"}.uk-icon-cloud:before{content:"\f0c2"}.uk-icon-flask:before{content:"\f0c3"}.uk-icon-cut:before,.uk-icon-scissors:before{content:"\f0c4"}.uk-icon-copy:before,.uk-icon-files-o:before{content:"\f0c5"}.uk-icon-paperclip:before{content:"\f0c6"}.uk-icon-save:before,.uk-icon-floppy-o:before{content:"\f0c7"}.uk-icon-square:before{content:"\f0c8"}.uk-icon-bars:before{content:"\f0c9"}.uk-icon-list-ul:before{content:"\f0ca"}.uk-icon-list-ol:before{content:"\f0cb"}.uk-icon-strikethrough:before{content:"\f0cc"}.uk-icon-underline:before{content:"\f0cd"}.uk-icon-table:before{content:"\f0ce"}.uk-icon-magic:before{content:"\f0d0"}.uk-icon-truck:before{content:"\f0d1"}.uk-icon-pinterest:before{content:"\f0d2"}.uk-icon-pinterest-square:before{content:"\f0d3"}.uk-icon-google-plus-square:before{content:"\f0d4"}.uk-icon-google-plus:before{content:"\f0d5"}.uk-icon-money:before{content:"\f0d6"}.uk-icon-caret-down:before{content:"\f0d7"}.uk-icon-caret-up:before{content:"\f0d8"}.uk-icon-caret-left:before{content:"\f0d9"}.uk-icon-caret-right:before{content:"\f0da"}.uk-icon-columns:before{content:"\f0db"}.uk-icon-unsorted:before,.uk-icon-sort:before{content:"\f0dc"}.uk-icon-sort-down:before,.uk-icon-sort-asc:before{content:"\f0dd"}.uk-icon-sort-up:before,.uk-icon-sort-desc:before{content:"\f0de"}.uk-icon-envelope:before{content:"\f0e0"}.uk-icon-linkedin:before{content:"\f0e1"}.uk-icon-rotate-left:before,.uk-icon-undo:before{content:"\f0e2"}.uk-icon-legal:before,.uk-icon-gavel:before{content:"\f0e3"}.uk-icon-dashboard:before,.uk-icon-tachometer:before{content:"\f0e4"}.uk-icon-comment-o:before{content:"\f0e5"}.uk-icon-comments-o:before{content:"\f0e6"}.uk-icon-flash:before,.uk-icon-bolt:before{content:"\f0e7"}.uk-icon-sitemap:before{content:"\f0e8"}.uk-icon-umbrella:before{content:"\f0e9"}.uk-icon-paste:before,.uk-icon-clipboard:before{content:"\f0ea"}.uk-icon-lightbulb-o:before{content:"\f0eb"}.uk-icon-exchange:before{content:"\f0ec"}.uk-icon-cloud-download:before{content:"\f0ed"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-user-md:before{content:"\f0f0"}.uk-icon-stethoscope:before{content:"\f0f1"}.uk-icon-suitcase:before{content:"\f0f2"}.uk-icon-bell-o:before{content:"\f0a2"}.uk-icon-coffee:before{content:"\f0f4"}.uk-icon-cutlery:before{content:"\f0f5"}.uk-icon-file-text-o:before{content:"\f0f6"}.uk-icon-building-o:before{content:"\f0f7"}.uk-icon-hospital-o:before{content:"\f0f8"}.uk-icon-ambulance:before{content:"\f0f9"}.uk-icon-medkit:before{content:"\f0fa"}.uk-icon-fighter-jet:before{content:"\f0fb"}.uk-icon-beer:before{content:"\f0fc"}.uk-icon-h-square:before{content:"\f0fd"}.uk-icon-plus-square:before{content:"\f0fe"}.uk-icon-angle-double-left:before{content:"\f100"}.uk-icon-angle-double-right:before{content:"\f101"}.uk-icon-angle-double-up:before{content:"\f102"}.uk-icon-angle-double-down:before{content:"\f103"}.uk-icon-angle-left:before{content:"\f104"}.uk-icon-angle-right:before{content:"\f105"}.uk-icon-angle-up:before{content:"\f106"}.uk-icon-angle-down:before{content:"\f107"}.uk-icon-desktop:before{content:"\f108"}.uk-icon-laptop:before{content:"\f109"}.uk-icon-tablet:before{content:"\f10a"}.uk-icon-mobile-phone:before,.uk-icon-mobile:before{content:"\f10b"}.uk-icon-circle-o:before{content:"\f10c"}.uk-icon-quote-left:before{content:"\f10d"}.uk-icon-quote-right:before{content:"\f10e"}.uk-icon-spinner:before{content:"\f110"}.uk-icon-circle:before{content:"\f111"}.uk-icon-mail-reply:before,.uk-icon-reply:before{content:"\f112"}.uk-icon-github-alt:before{content:"\f113"}.uk-icon-folder-o:before{content:"\f114"}.uk-icon-folder-open-o:before{content:"\f115"}.uk-icon-smile-o:before{content:"\f118"}.uk-icon-frown-o:before{content:"\f119"}.uk-icon-meh-o:before{content:"\f11a"}.uk-icon-gamepad:before{content:"\f11b"}.uk-icon-keyboard-o:before{content:"\f11c"}.uk-icon-flag-o:before{content:"\f11d"}.uk-icon-flag-checkered:before{content:"\f11e"}.uk-icon-terminal:before{content:"\f120"}.uk-icon-code:before{content:"\f121"}.uk-icon-reply-all:before{content:"\f122"}.uk-icon-mail-reply-all:before{content:"\f122"}.uk-icon-star-half-empty:before,.uk-icon-star-half-full:before,.uk-icon-star-half-o:before{content:"\f123"}.uk-icon-location-arrow:before{content:"\f124"}.uk-icon-crop:before{content:"\f125"}.uk-icon-code-fork:before{content:"\f126"}.uk-icon-unlink:before,.uk-icon-chain-broken:before{content:"\f127"}.uk-icon-question:before{content:"\f128"}.uk-icon-info:before{content:"\f129"}.uk-icon-exclamation:before{content:"\f12a"}.uk-icon-superscript:before{content:"\f12b"}.uk-icon-subscript:before{content:"\f12c"}.uk-icon-eraser:before{content:"\f12d"}.uk-icon-puzzle-piece:before{content:"\f12e"}.uk-icon-microphone:before{content:"\f130"}.uk-icon-microphone-slash:before{content:"\f131"}.uk-icon-shield:before{content:"\f132"}.uk-icon-calendar-o:before{content:"\f133"}.uk-icon-fire-extinguisher:before{content:"\f134"}.uk-icon-rocket:before{content:"\f135"}.uk-icon-maxcdn:before{content:"\f136"}.uk-icon-chevron-circle-left:before{content:"\f137"}.uk-icon-chevron-circle-right:before{content:"\f138"}.uk-icon-chevron-circle-up:before{content:"\f139"}.uk-icon-chevron-circle-down:before{content:"\f13a"}.uk-icon-html5:before{content:"\f13b"}.uk-icon-css3:before{content:"\f13c"}.uk-icon-anchor:before{content:"\f13d"}.uk-icon-unlock-alt:before{content:"\f13e"}.uk-icon-bullseye:before{content:"\f140"}.uk-icon-ellipsis-h:before{content:"\f141"}.uk-icon-ellipsis-v:before{content:"\f142"}.uk-icon-rss-square:before{content:"\f143"}.uk-icon-play-circle:before{content:"\f144"}.uk-icon-ticket:before{content:"\f145"}.uk-icon-minus-square:before{content:"\f146"}.uk-icon-minus-square-o:before{content:"\f147"}.uk-icon-level-up:before{content:"\f148"}.uk-icon-level-down:before{content:"\f149"}.uk-icon-check-square:before{content:"\f14a"}.uk-icon-pencil-square:before{content:"\f14b"}.uk-icon-external-link-square:before{content:"\f14c"}.uk-icon-share-square:before{content:"\f14d"}.uk-icon-compass:before{content:"\f14e"}.uk-icon-toggle-down:before,.uk-icon-caret-square-o-down:before{content:"\f150"}.uk-icon-toggle-up:before,.uk-icon-caret-square-o-up:before{content:"\f151"}.uk-icon-toggle-right:before,.uk-icon-caret-square-o-right:before{content:"\f152"}.uk-icon-euro:before,.uk-icon-eur:before{content:"\f153"}.uk-icon-gbp:before{content:"\f154"}.uk-icon-dollar:before,.uk-icon-usd:before{content:"\f155"}.uk-icon-rupee:before,.uk-icon-inr:before{content:"\f156"}.uk-icon-cny:before,.uk-icon-rmb:before,.uk-icon-yen:before,.uk-icon-jpy:before{content:"\f157"}.uk-icon-ruble:before,.uk-icon-rouble:before,.uk-icon-rub:before{content:"\f158"}.uk-icon-won:before,.uk-icon-krw:before{content:"\f159"}.uk-icon-bitcoin:before,.uk-icon-btc:before{content:"\f15a"}.uk-icon-file:before{content:"\f15b"}.uk-icon-file-text:before{content:"\f15c"}.uk-icon-sort-alpha-asc:before{content:"\f15d"}.uk-icon-sort-alpha-desc:before{content:"\f15e"}.uk-icon-sort-amount-asc:before{content:"\f160"}.uk-icon-sort-amount-desc:before{content:"\f161"}.uk-icon-sort-numeric-asc:before{content:"\f162"}.uk-icon-sort-numeric-desc:before{content:"\f163"}.uk-icon-thumbs-up:before{content:"\f164"}.uk-icon-thumbs-down:before{content:"\f165"}.uk-icon-youtube-square:before{content:"\f166"}.uk-icon-youtube:before{content:"\f167"}.uk-icon-xing:before{content:"\f168"}.uk-icon-xing-square:before{content:"\f169"}.uk-icon-youtube-play:before{content:"\f16a"}.uk-icon-dropbox:before{content:"\f16b"}.uk-icon-stack-overflow:before{content:"\f16c"}.uk-icon-instagram:before{content:"\f16d"}.uk-icon-flickr:before{content:"\f16e"}.uk-icon-adn:before{content:"\f170"}.uk-icon-bitbucket:before{content:"\f171"}.uk-icon-bitbucket-square:before{content:"\f172"}.uk-icon-tumblr:before{content:"\f173"}.uk-icon-tumblr-square:before{content:"\f174"}.uk-icon-long-arrow-down:before{content:"\f175"}.uk-icon-long-arrow-up:before{content:"\f176"}.uk-icon-long-arrow-left:before{content:"\f177"}.uk-icon-long-arrow-right:before{content:"\f178"}.uk-icon-apple:before{content:"\f179"}.uk-icon-windows:before{content:"\f17a"}.uk-icon-android:before{content:"\f17b"}.uk-icon-linux:before{content:"\f17c"}.uk-icon-dribbble:before{content:"\f17d"}.uk-icon-skype:before{content:"\f17e"}.uk-icon-foursquare:before{content:"\f180"}.uk-icon-trello:before{content:"\f181"}.uk-icon-female:before{content:"\f182"}.uk-icon-male:before{content:"\f183"}.uk-icon-gittip:before{content:"\f184"}.uk-icon-sun-o:before{content:"\f185"}.uk-icon-moon-o:before{content:"\f186"}.uk-icon-archive:before{content:"\f187"}.uk-icon-bug:before{content:"\f188"}.uk-icon-vk:before{content:"\f189"}.uk-icon-weibo:before{content:"\f18a"}.uk-icon-renren:before{content:"\f18b"}.uk-icon-pagelines:before{content:"\f18c"}.uk-icon-stack-exchange:before{content:"\f18d"}.uk-icon-arrow-circle-o-right:before{content:"\f18e"}.uk-icon-arrow-circle-o-left:before{content:"\f190"}.uk-icon-toggle-left:before,.uk-icon-caret-square-o-left:before{content:"\f191"}.uk-icon-dot-circle-o:before{content:"\f192"}.uk-icon-wheelchair:before{content:"\f193"}.uk-icon-vimeo-square:before{content:"\f194"}.uk-icon-turkish-lira:before,.uk-icon-try:before{content:"\f195"}.uk-icon-plus-square-o:before{content:"\f196"}.uk-close{-moz-box-sizing:content-box;box-sizing:content-box;display:inline-block;width:20px;line-height:20px;text-align:center;color:inherit;opacity:.3;padding:0;border:0;-webkit-appearance:none;background:0 0}.uk-close:after{display:block;content:"\f00d";font-family:FontAwesome}.uk-close:hover,.uk-close:focus{opacity:.5;outline:0;color:inherit;text-decoration:none;cursor:pointer}.uk-close-alt{padding:2px;border-radius:50%;background:#fff;opacity:1;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 0 6px rgba(0,0,0,.3)}.uk-close-alt:hover,.uk-close-alt:focus{opacity:1}.uk-close-alt:after{opacity:.5}.uk-close-alt:hover:after,.uk-close-alt:focus:after{opacity:.8}.uk-badge{display:inline-block;padding:0 5px;background:#00a8e6;font-size:10px;font-weight:700;line-height:14px;color:#fff;text-align:center;vertical-align:middle;text-transform:none;border:1px solid rgba(0,0,0,.06);border-radius:2px;text-shadow:0 1px 0 rgba(0,0,0,.1)}.uk-badge-notification{-moz-box-sizing:border-box;box-sizing:border-box;min-width:18px;border-radius:500px;font-size:12px;line-height:18px}.uk-badge-success{background-color:#8cc14c}.uk-badge-warning{background-color:#faa732}.uk-badge-danger{background-color:#da314b}.uk-alert{margin-bottom:15px;padding:10px;background:#ebf7fd;color:#2d7091;border:1px solid rgba(45,112,145,.3);border-radius:4px;text-shadow:0 1px 0 #fff}*+.uk-alert{margin-top:15px}.uk-alert>:last-child{margin-bottom:0}.uk-alert h1,.uk-alert h2,.uk-alert h3,.uk-alert h4,.uk-alert h5,.uk-alert h6{color:inherit}.uk-alert>.uk-close:first-child{float:right}.uk-alert>.uk-close:first-child+*{margin-top:0}.uk-alert-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-alert-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-alert-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)}.uk-alert-large{padding:20px}.uk-alert-large>.uk-close:first-child{margin:-10px -10px 0 0}.uk-thumbnail{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;margin:0;padding:4px;border:1px solid #ddd;background:#fff;border-radius:4px}a.uk-thumbnail:hover,a.uk-thumbnail:focus{border-color:#aaa;background-color:#fff;text-decoration:none;outline:0}.uk-thumbnail-caption{padding-top:4px;text-align:center;color:#444}.uk-thumbnail-mini{width:150px}.uk-thumbnail-small{width:200px}.uk-thumbnail-medium{width:300px}.uk-thumbnail-large{width:400px}.uk-thumbnail-expand,.uk-thumbnail-expand>img{width:100%}.uk-overlay{display:inline-block;position:relative;max-width:100%;vertical-align:middle}.uk-overlay>img:first-child{display:block}.uk-overlay-area{position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.3);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0)}.uk-overlay:hover .uk-overlay-area,.uk-overlay-toggle:hover .uk-overlay-area{opacity:1}.uk-overlay-area:empty:before{content:"\f002";position:absolute;top:50%;left:50%;width:50px;height:50px;margin-top:-25px;margin-left:-25px;font-size:50px;line-height:1;font-family:FontAwesome;text-align:center;color:#fff}.uk-overlay-area:not(:empty){font-size:0}.uk-overlay-area:not(:empty):before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-overlay-area-content{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;vertical-align:middle;font-size:1rem;text-align:center;padding:0 15px;color:#fff}.uk-overlay-area-content>:last-child{margin-bottom:0}.uk-overlay-area-content a:not([class]),.uk-overlay-area-content a:not([class]):hover{color:inherit}.uk-overlay-caption{position:absolute;bottom:0;left:0;right:0;padding:15px;background:rgba(0,0,0,.5);color:#fff;opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0)}.uk-overlay:hover .uk-overlay-caption,.uk-overlay-toggle:hover .uk-overlay-caption{opacity:1}.uk-progress{-moz-box-sizing:border-box;box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}[class*=uk-animation-]{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}[data-uk-scrollspy*=uk-animation-]{opacity:0}.uk-animation-fade{-webkit-animation-name:uk-fade;animation-name:uk-fade;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-timing-function:linear;animation-timing-function:linear}.uk-animation-scale-up{-webkit-animation-name:uk-scale-up;animation-name:uk-scale-up}.uk-animation-scale-down{-webkit-animation-name:uk-scale-down;animation-name:uk-scale-down}.uk-animation-slide-top{-webkit-animation-name:uk-slide-top;animation-name:uk-slide-top}.uk-animation-slide-bottom{-webkit-animation-name:uk-slide-bottom;animation-name:uk-slide-bottom}.uk-animation-slide-left{-webkit-animation-name:uk-slide-left;animation-name:uk-slide-left}.uk-animation-slide-right{-webkit-animation-name:uk-slide-right;animation-name:uk-slide-right}.uk-animation-shake{-webkit-animation-name:uk-shake;animation-name:uk-shake}.uk-animation-reverse{-webkit-animation-direction:reverse;animation-direction:reverse}@-webkit-keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes uk-scale-up{0%{opacity:0;-webkit-transform:scale(0.2)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-scale-up{0%{opacity:0;transform:scale(0.2)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-scale-down{0%{opacity:0;-webkit-transform:scale(1.8)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-scale-down{0%{opacity:0;transform:scale(1.8)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-slide-top{0%{opacity:0;-webkit-transform:translateY(-100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom{0%{opacity:0;-webkit-transform:translateY(100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-left{0%{opacity:0;-webkit-transform:translateX(-100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-slide-left{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-slide-right{0%{opacity:0;-webkit-transform:translateX(100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-slide-right{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-shake{0%,100%{-webkit-transform:translateX(0)}10%{-webkit-transform:translateX(-9px)}20%{-webkit-transform:translateX(8px)}30%{-webkit-transform:translateX(-7px)}40%{-webkit-transform:translateX(6px)}50%{-webkit-transform:translateX(-5px)}60%{-webkit-transform:translateX(4px)}70%{-webkit-transform:translateX(-3px)}80%{-webkit-transform:translateX(2px)}90%{-webkit-transform:translateX(-1px)}}@keyframes uk-shake{0%,100%{transform:translateX(0)}10%{transform:translateX(-9px)}20%{transform:translateX(8px)}30%{transform:translateX(-7px)}40%{transform:translateX(6px)}50%{transform:translateX(-5px)}60%{transform:translateX(4px)}70%{transform:translateX(-3px)}80%{transform:translateX(2px)}90%{transform:translateX(-1px)}}@-webkit-keyframes uk-slide-top-fixed{0%{opacity:0;-webkit-transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top-fixed{0%{opacity:0;transform:translateY(-10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom-fixed{0%{opacity:0;-webkit-transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom-fixed{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@keyframes uk-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.uk-dropdown{display:none;position:absolute;top:100%;left:0;z-index:1020;-moz-box-sizing:border-box;box-sizing:border-box;width:200px;margin-top:5px;padding:15px;background:#fff;color:#444;font-size:1rem;vertical-align:top;border:1px solid #ddd;border-radius:4px}.uk-open>.uk-dropdown{display:block;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-dropdown-flip{left:auto;right:0}.uk-dropdown-up{top:auto;bottom:100%;margin-top:auto;margin-bottom:5px}.uk-dropdown .uk-nav{margin:0 -15px}.uk-dropdown>.uk-grid+.uk-grid{margin-top:15px}.uk-dropdown>.uk-grid>[class*=uk-width-]>.uk-panel+.uk-panel{margin-top:15px}@media (min-width:768px){.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid{margin-left:-15px;margin-right:-15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid>[class*=uk-width-]{padding-left:15px;padding-right:15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid>[class*=uk-width-]:nth-child(n+2){border-left:1px solid #ddd}.uk-dropdown-width-2:not(.uk-dropdown-stack){width:400px}.uk-dropdown-width-3:not(.uk-dropdown-stack){width:600px}.uk-dropdown-width-4:not(.uk-dropdown-stack){width:800px}.uk-dropdown-width-5:not(.uk-dropdown-stack){width:1000px}}@media (max-width:767px){.uk-dropdown>.uk-grid>[class*=uk-width-]{width:100%}.uk-dropdown>.uk-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}}.uk-dropdown-stack>.uk-grid>[class*=uk-width-]{width:100%}.uk-dropdown-stack>.uk-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}.uk-dropdown-small{min-width:150px;width:auto;padding:5px;white-space:nowrap}.uk-dropdown-small .uk-nav{margin:0 -5px}.uk-dropdown-navbar{margin-top:6px;background:#fff;color:#444;left:-1px;border:1px solid #ddd;border-radius:4px}.uk-open>.uk-dropdown-navbar{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-dropdown-navbar.uk-dropdown-flip{left:auto}.uk-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1010;overflow-y:auto;-webkit-overflow-scrolling:touch;background:rgba(0,0,0,.6);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translateZ(0)}.uk-modal.uk-open{opacity:1}.uk-modal-page,.uk-modal-page body{overflow:hidden}.uk-modal-dialog{position:relative;-moz-box-sizing:border-box;box-sizing:border-box;margin:50px auto;padding:20px;width:600px;max-width:100%;max-width:calc(100% - 20px);background:#fff;opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out;border-radius:4px;box-shadow:0 0 10px rgba(0,0,0,.3)}@media (max-width:767px){.uk-modal-dialog{width:auto;margin:10px}}.uk-open .uk-modal-dialog{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.uk-modal-dialog>:last-child{margin-bottom:0}.uk-modal-dialog>.uk-close:first-child{margin:-10px -10px 0 0;float:right}.uk-modal-dialog>.uk-close:first-child+*{margin-top:0}.uk-modal-dialog-frameless{padding:0}.uk-modal-dialog-frameless>.uk-close:first-child{position:absolute;top:-12px;right:-12px;margin:0;float:none}@media (max-width:767px){.uk-modal-dialog-frameless>.uk-close:first-child{top:-7px;right:-7px}}@media (min-width:768px){.uk-modal-dialog-large{width:930px}}@media (min-width:1220px){.uk-modal-dialog-large{width:1130px}}.uk-offcanvas{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:rgba(0,0,0,.1)}.uk-offcanvas.uk-active{display:block}.uk-offcanvas-page{position:fixed;-webkit-transition:margin-left .3s ease-in-out 50ms;transition:margin-left .3s ease-in-out 50ms}.uk-offcanvas-bar{position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%);z-index:1001;width:270px;max-width:100%;background:#333;overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}.uk-offcanvas.uk-active .uk-offcanvas-bar.uk-offcanvas-bar-show{-webkit-transform:translateX(0%);transform:translateX(0%)}.uk-offcanvas-bar-flip{left:auto;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas .uk-panel{margin:20px 15px;color:#777;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-offcanvas .uk-panel-title{color:#ccc}.uk-offcanvas .uk-panel a:not([class]){color:#ccc}.uk-offcanvas .uk-panel a:not([class]):hover{color:#fff}.uk-offcanvas-bar:after{content:"";display:block;position:absolute;top:0;bottom:0;right:0;width:1px;background:rgba(0,0,0,.6);box-shadow:0 0 5px 2px rgba(0,0,0,.6)}.uk-offcanvas-bar-flip:after{right:auto;left:0;width:1px;background:rgba(0,0,0,.6);box-shadow:0 0 5px 2px rgba(0,0,0,.6)}.uk-switcher{margin:0;padding:0;list-style:none}.uk-switcher>:not(.uk-active){display:none}.uk-tooltip{display:none;position:absolute;z-index:1030;-moz-box-sizing:border-box;box-sizing:border-box;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:12px;line-height:18px;text-align:center;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top:after,.uk-tooltip-top-left:after,.uk-tooltip-top-right:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom:after,.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-top:after,.uk-tooltip-bottom:after{left:50%;margin-left:-5px}.uk-tooltip-top-left:after,.uk-tooltip-bottom-left:after{left:10px}.uk-tooltip-top-right:after,.uk-tooltip-bottom-right:after{right:10px}.uk-tooltip-left:after{right:-5px;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent;border-left-color:#333}.uk-tooltip-right:after{left:-5px;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent;border-right-color:#333}.uk-text-small{font-size:11px;line-height:16px}.uk-text-large{font-size:18px;line-height:24px}.uk-text-bold{font-weight:700}.uk-text-muted{color:#999!important}.uk-text-primary{color:#2d7091!important}.uk-text-success{color:#659f13!important}.uk-text-warning{color:#e28327!important}.uk-text-danger{color:#d85030!important}.uk-text-left{text-align:left!important}.uk-text-right{text-align:right!important}.uk-text-center{text-align:center!important}.uk-text-justify{text-align:justify!important}.uk-text-top{vertical-align:top!important}.uk-text-middle{vertical-align:middle!important}.uk-text-bottom{vertical-align:bottom!important}@media (max-width:959px){.uk-text-center-medium{text-align:center!important}}@media (max-width:767px){.uk-text-center-small{text-align:center!important}}.uk-text-nowrap{white-space:nowrap}.uk-text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-text-break{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.uk-container{-moz-box-sizing:border-box;box-sizing:border-box;max-width:980px;padding:0 25px}@media (min-width:1220px){.uk-container{max-width:1200px;padding:0 35px}}.uk-container:before,.uk-container:after{content:" ";display:table}.uk-container:after{clear:both}.uk-container-center{margin-left:auto;margin-right:auto}.uk-clearfix:before,.uk-clearfix:after{content:" ";display:table}.uk-clearfix:after{clear:both}.uk-nbfc{overflow:hidden}.uk-nbfc-alt{display:table-cell;width:10000px}.uk-float-left{float:left}.uk-float-right{float:right}[class*=uk-float-]{max-width:100%}[class*=uk-align-]{display:block;margin-bottom:15px}.uk-align-left{margin-right:15px;float:left}.uk-align-right{margin-left:15px;float:right}@media (min-width:768px){.uk-align-medium-left{margin-right:15px;margin-bottom:15px;float:left}.uk-align-medium-right{margin-left:15px;margin-bottom:15px;float:right}}.uk-align-center{margin-left:auto;margin-right:auto}.uk-vertical-align{font-size:0}.uk-vertical-align:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-vertical-align-middle,.uk-vertical-align-bottom{display:inline-block;max-width:100%;font-size:1rem}.uk-vertical-align-middle{vertical-align:middle}.uk-vertical-align-bottom{vertical-align:bottom}.uk-height-1-1{height:100%}.uk-responsive-width,.uk-responsive-height{-moz-box-sizing:border-box;box-sizing:border-box}.uk-responsive-width{max-width:100%;height:auto}.uk-responsive-height{max-height:100%;width:auto}.uk-margin{margin-bottom:15px}*+.uk-margin{margin-top:15px}.uk-margin-top{margin-top:15px!important}.uk-margin-bottom{margin-bottom:15px!important}.uk-margin-left{margin-left:15px!important}.uk-margin-right{margin-right:15px!important}.uk-margin-large{margin-bottom:50px}*+.uk-margin-large{margin-top:50px}.uk-margin-large-top{margin-top:50px!important}.uk-margin-large-bottom{margin-bottom:50px!important}.uk-margin-large-left{margin-left:50px!important}.uk-margin-large-right{margin-right:50px!important}.uk-margin-small{margin-bottom:5px}*+.uk-margin-small{margin-top:5px}.uk-margin-small-top{margin-top:5px!important}.uk-margin-small-bottom{margin-bottom:5px!important}.uk-margin-small-left{margin-left:5px!important}.uk-margin-small-right{margin-right:5px!important}.uk-margin-remove{margin:0!important}.uk-margin-top-remove{margin-top:0!important}.uk-margin-bottom-remove{margin-bottom:0!important}.uk-border-circle{border-radius:50%}.uk-border-rounded{border-radius:5px}@media (min-width:768px){.uk-heading-large{font-size:52px;line-height:64px}}.uk-link-muted,.uk-link-muted a{color:#444}.uk-link-muted:hover,.uk-link-muted a:hover{color:#444}.uk-link-reset,.uk-link-reset a,.uk-link-reset:hover,.uk-link-reset a:hover{color:inherit;text-decoration:none}.uk-scrollable-text{height:300px;overflow-y:scroll;-webkit-overflow-scrolling:touch;resize:both}.uk-scrollable-box{-moz-box-sizing:border-box;box-sizing:border-box;height:170px;padding:10px;border:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch;resize:both;border-radius:3px}.uk-scrollable-box>:last-child{margin-bottom:0}.uk-overflow-container{overflow:auto;-webkit-overflow-scrolling:touch}.uk-overflow-container>:last-child{margin-bottom:0}.uk-display-block{display:block!important}.uk-display-inline{display:inline!important}.uk-display-inline-block{display:inline-block!important}@media (min-width:960px){.uk-visible-small{display:none!important}.uk-visible-medium{display:none!important}.uk-hidden-large{display:none!important}}@media (min-width:768px) and (max-width:959px){.uk-visible-small{display:none!important}.uk-visible-large{display:none!important}.uk-hidden-medium{display:none!important}}@media (max-width:767px){.uk-visible-medium{display:none!important}.uk-visible-large{display:none!important}.uk-hidden-small{display:none!important}}.uk-hidden{display:none!important;visibility:hidden!important}.uk-invisible{visibility:hidden!important}.uk-visible-hover:hover .uk-hidden,.uk-visible-hover:hover .uk-invisible{display:block!important;visibility:visible!important}.uk-visible-hover-inline:hover .uk-hidden,.uk-visible-hover-inline:hover .uk-invisible{display:inline-block!important;visibility:visible!important}@media print{*{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}} \ No newline at end of file diff --git a/www/static/css/uikit.gradient.min.css b/www/static/css/uikit.gradient.min.css new file mode 100755 index 0000000..9178efd --- /dev/null +++ b/www/static/css/uikit.gradient.min.css @@ -0,0 +1,3 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-size:1em;font-family:Consolas,monospace,serif}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}optgroup{font-weight:700}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button:disabled,html input:disabled{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{padding:0;cursor:pointer}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:none;margin:0;padding:0}legend{border:0;padding:0}textarea{overflow:auto;vertical-align:top}::-moz-placeholder{opacity:1}table{border-collapse:collapse;border-spacing:0}html{font-size:14px}body{background:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:20px;color:#444;background-image:-webkit-radial-gradient(100% 100%,center,#fff,#fff);background-image:radial-gradient(100% 100% at center,#fff,#fff)}@media (max-width:767px){body{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}}a,.uk-link{color:#07d;text-decoration:none;cursor:pointer}a:hover,.uk-link:hover{color:#059;text-decoration:underline}em{color:#d05}ins{background:#ffa;color:#444;text-decoration:none}mark{background:#ffa;color:#444}::-moz-selection{background:#39f;color:#fff;text-shadow:none}::selection{background:#39f;color:#fff;text-shadow:none}abbr[title],dfn[title]{cursor:help}dfn[title]{border-bottom:1px dotted;font-style:normal}img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;vertical-align:middle}.uk-img-preserve,.uk-img-preserve img,img[src*="maps.gstatic.com"],img[src*="googleapis.com"]{max-width:none}p,hr,ul,ol,dl,blockquote,pre,address,fieldset,figure{margin:0 0 15px}*+p,*+hr,*+ul,*+ol,*+dl,*+blockquote,*+pre,*+address,*+fieldset,*+figure{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}h1,.uk-h1{font-size:36px;line-height:42px}h2,.uk-h2{font-size:24px;line-height:30px}h3,.uk-h3{font-size:18px;line-height:24px}h4,.uk-h4{font-size:16px;line-height:22px}h5,.uk-h5{font-size:14px;line-height:20px}h6,.uk-h6{font-size:12px;line-height:18px}ul,ol{padding-left:30px}ul>li>ul,ul>li>ol,ol>li>ol,ol>li>ul{margin:0}dt{font-weight:700}dd{margin-left:0}hr{display:block;padding:0;border:0;border-top:1px solid #ddd}address{font-style:normal}q,blockquote{font-style:italic}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:16px;line-height:22px}blockquote small{display:block;color:#999;font-style:normal}blockquote p:last-of-type{margin-bottom:5px}code{color:#d05;font-size:12px;white-space:nowrap;padding:0 4px;border:1px solid #ddd;border-radius:3px;background:#fafafa}pre code{color:inherit;white-space:pre-wrap;padding:0;border:0;background:0 0}pre{padding:10px;background:#fafafa;color:#444;font-size:12px;line-height:18px;-moz-tab-size:4;tab-size:4;border:1px solid #ddd;border-radius:3px}button,input:not([type=radio]):not([type=checkbox]),select{vertical-align:middle}iframe{border:0}@media screen and (max-width:400px){@-ms-viewport{width:device-width}}.uk-grid:before,.uk-grid:after{content:" ";display:table}.uk-grid:after{clear:both}.uk-grid{margin:0 0 0 -25px;padding:0;list-style:none}.uk-grid>*{margin:0;padding-left:25px;float:left}.uk-grid>*>:last-child{margin-bottom:0}.uk-grid+.uk-grid{margin-top:25px}.uk-grid>.uk-grid-margin{margin-top:25px}.uk-grid>*>.uk-panel+.uk-panel{margin-top:25px}@media (min-width:1220px){.uk-grid:not(.uk-grid-preserve){margin-left:-35px}.uk-grid:not(.uk-grid-preserve)>*{padding-left:35px}.uk-grid:not(.uk-grid-preserve)+.uk-grid{margin-top:35px}.uk-grid:not(.uk-grid-preserve)>.uk-grid-margin{margin-top:35px}.uk-grid:not(.uk-grid-preserve)>*>.uk-panel+.uk-panel{margin-top:35px}}.uk-grid.uk-grid-small{margin-left:-10px}.uk-grid.uk-grid-small>*{padding-left:10px}.uk-grid.uk-grid-small+.uk-grid-small{margin-top:10px}.uk-grid.uk-grid-small>.uk-grid-margin{margin-top:10px}.uk-grid.uk-grid-small>*>.uk-panel+.uk-panel{margin-top:10px}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider>*{padding-left:25px;padding-right:25px}.uk-grid-divider>[class*=uk-width-1-]:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider>[class*=uk-width-2-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-3-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-4-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-5-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-6-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-7-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-8-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-9-]:nth-child(n+2){border-left:1px solid #ddd}@media (min-width:768px){.uk-grid-divider>[class*=uk-width-medium-]:not(.uk-width-medium-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:960px){.uk-grid-divider>[class*=uk-width-large-]:not(.uk-width-large-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:1220px){.uk-grid-divider:not(.uk-grid-preserve):not(:empty){margin-left:-35px;margin-right:-35px}.uk-grid-divider:not(.uk-grid-preserve)>*{padding-left:35px;padding-right:35px}.uk-grid-divider:not(.uk-grid-preserve):empty{margin-top:35px;margin-bottom:35px}}.uk-grid-divider:empty{margin-top:25px;margin-bottom:25px;border-top:1px solid #ddd}[class*=uk-grid-width]>*{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.uk-grid-width-1-2>*{width:50%}.uk-grid-width-1-3>*{width:33.333%}.uk-grid-width-1-4>*{width:25%}.uk-grid-width-1-5>*{width:20%}.uk-grid-width-1-6>*{width:16.666%}.uk-grid-width-1-10>*{width:10%}@media (min-width:480px){.uk-grid-width-small-1-2>*{width:50%}.uk-grid-width-small-1-3>*{width:33.333%}.uk-grid-width-small-1-4>*{width:25%}.uk-grid-width-small-1-5>*{width:20%}.uk-grid-width-small-1-6>*{width:16.666%}.uk-grid-width-small-1-10>*{width:10%}}@media (min-width:768px){.uk-grid-width-medium-1-2>*{width:50%}.uk-grid-width-medium-1-3>*{width:33.333%}.uk-grid-width-medium-1-4>*{width:25%}.uk-grid-width-medium-1-5>*{width:20%}.uk-grid-width-medium-1-6>*{width:16.666%}.uk-grid-width-medium-1-10>*{width:10%}}@media (min-width:960px){.uk-grid-width-large-1-2>*{width:50%}.uk-grid-width-large-1-3>*{width:33.333%}.uk-grid-width-large-1-4>*{width:25%}.uk-grid-width-large-1-5>*{width:20%}.uk-grid-width-large-1-6>*{width:16.666%}.uk-grid-width-large-1-10>*{width:10%}}@media (min-width:1220px){.uk-grid-width-xlarge-1-2>*{width:50%}.uk-grid-width-xlarge-1-3>*{width:33.333%}.uk-grid-width-xlarge-1-4>*{width:25%}.uk-grid-width-xlarge-1-5>*{width:20%}.uk-grid-width-xlarge-1-6>*{width:16.666%}.uk-grid-width-xlarge-1-10>*{width:10%}}[class*=uk-width]{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.uk-width-1-1{width:100%}.uk-width-1-2,.uk-width-2-4,.uk-width-3-6,.uk-width-5-10{width:50%}.uk-width-1-3,.uk-width-2-6{width:33.333%}.uk-width-2-3,.uk-width-4-6{width:66.666%}.uk-width-1-4{width:25%}.uk-width-3-4{width:75%}.uk-width-1-5,.uk-width-2-10{width:20%}.uk-width-2-5,.uk-width-4-10{width:40%}.uk-width-3-5,.uk-width-6-10{width:60%}.uk-width-4-5,.uk-width-8-10{width:80%}.uk-width-1-6{width:16.666%}.uk-width-5-6{width:83.333%}.uk-width-1-10{width:10%}.uk-width-3-10{width:30%}.uk-width-7-10{width:70%}.uk-width-9-10{width:90%}@media (min-width:480px){.uk-width-small-1-1{width:100%}.uk-width-small-1-2,.uk-width-small-2-4,.uk-width-small-3-6,.uk-width-small-5-10{width:50%}.uk-width-small-1-3,.uk-width-small-2-6{width:33.333%}.uk-width-small-2-3,.uk-width-small-4-6{width:66.666%}.uk-width-small-1-4{width:25%}.uk-width-small-3-4{width:75%}.uk-width-small-1-5,.uk-width-small-2-10{width:20%}.uk-width-small-2-5,.uk-width-small-4-10{width:40%}.uk-width-small-3-5,.uk-width-small-6-10{width:60%}.uk-width-small-4-5,.uk-width-small-8-10{width:80%}.uk-width-small-1-6{width:16.666%}.uk-width-small-5-6{width:83.333%}.uk-width-small-1-10{width:10%}.uk-width-small-3-10{width:30%}.uk-width-small-7-10{width:70%}.uk-width-small-9-10{width:90%}}@media (min-width:768px){.uk-width-medium-1-1{width:100%}.uk-width-medium-1-2,.uk-width-medium-2-4,.uk-width-medium-3-6,.uk-width-medium-5-10{width:50%}.uk-width-medium-1-3,.uk-width-medium-2-6{width:33.333%}.uk-width-medium-2-3,.uk-width-medium-4-6{width:66.666%}.uk-width-medium-1-4{width:25%}.uk-width-medium-3-4{width:75%}.uk-width-medium-1-5,.uk-width-medium-2-10{width:20%}.uk-width-medium-2-5,.uk-width-medium-4-10{width:40%}.uk-width-medium-3-5,.uk-width-medium-6-10{width:60%}.uk-width-medium-4-5,.uk-width-medium-8-10{width:80%}.uk-width-medium-1-6{width:16.666%}.uk-width-medium-5-6{width:83.333%}.uk-width-medium-1-10{width:10%}.uk-width-medium-3-10{width:30%}.uk-width-medium-7-10{width:70%}.uk-width-medium-9-10{width:90%}}@media (min-width:960px){.uk-width-large-1-1{width:100%}.uk-width-large-1-2,.uk-width-large-2-4,.uk-width-large-3-6,.uk-width-large-5-10{width:50%}.uk-width-large-1-3,.uk-width-large-2-6{width:33.333%}.uk-width-large-2-3,.uk-width-large-4-6{width:66.666%}.uk-width-large-1-4{width:25%}.uk-width-large-3-4{width:75%}.uk-width-large-1-5,.uk-width-large-2-10{width:20%}.uk-width-large-2-5,.uk-width-large-4-10{width:40%}.uk-width-large-3-5,.uk-width-large-6-10{width:60%}.uk-width-large-4-5,.uk-width-large-8-10{width:80%}.uk-width-large-1-6{width:16.666%}.uk-width-large-5-6{width:83.333%}.uk-width-large-1-10{width:10%}.uk-width-large-3-10{width:30%}.uk-width-large-7-10{width:70%}.uk-width-large-9-10{width:90%}}@media (min-width:768px){[class*=uk-push-],[class*=uk-pull-]{position:relative}.uk-push-1-2,.uk-push-2-4,.uk-push-3-6,.uk-push-5-10{left:50%}.uk-push-1-3,.uk-push-2-6{left:33.333%}.uk-push-2-3,.uk-push-4-6{left:66.666%}.uk-push-1-4{left:25%}.uk-push-3-4{left:75%}.uk-push-1-5,.uk-push-2-10{left:20%}.uk-push-2-5,.uk-push-4-10{left:40%}.uk-push-3-5,.uk-push-6-10{left:60%}.uk-push-4-5,.uk-push-8-10{left:80%}.uk-push-1-6{left:16.666%}.uk-push-5-6{left:83.333%}.uk-push-1-10{left:10%}.uk-push-3-10{left:30%}.uk-push-7-10{left:70%}.uk-push-9-10{left:90%}.uk-pull-1-2,.uk-pull-2-4,.uk-pull-3-6,.uk-pull-5-10{left:-50%}.uk-pull-1-3,.uk-pull-2-6{left:-33.333%}.uk-pull-2-3,.uk-pull-4-6{left:-66.666%}.uk-pull-1-4{left:-25%}.uk-pull-3-4{left:-75%}.uk-pull-1-5,.uk-pull-2-10{left:-20%}.uk-pull-2-5,.uk-pull-4-10{left:-40%}.uk-pull-3-5,.uk-pull-6-10{left:-60%}.uk-pull-4-5,.uk-pull-8-10{left:-80%}.uk-pull-1-6{left:-16.666%}.uk-pull-5-6{left:-83.333%}.uk-pull-1-10{left:-10%}.uk-pull-3-10{left:-30%}.uk-pull-7-10{left:-70%}.uk-pull-9-10{left:-90%}}.uk-panel{display:block;position:relative}.uk-panel:before,.uk-panel:after{content:" ";display:table}.uk-panel:after{clear:both}.uk-panel>:not(.uk-panel-title):last-child{margin-bottom:0}.uk-panel-title{margin-top:0;margin-bottom:15px;font-size:18px;line-height:24px;font-weight:400;text-transform:none;color:#444}.uk-panel-badge{position:absolute;top:0;right:0;z-index:1}.uk-panel-box{padding:15px;background:#fafafa;color:#444;border:1px solid #ddd;border-radius:4px}.uk-panel-box .uk-panel-title{color:#444}.uk-panel-box .uk-panel-badge{top:10px;right:10px}.uk-panel-box .uk-panel-teaser{margin:-16px -16px 15px -16px}.uk-panel-box>.uk-nav-side{margin:0 -15px}.uk-panel-box-primary{background-color:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-panel-box-primary .uk-panel-title{color:#2d7091}.uk-panel-box-secondary{background-color:#fff;color:#444}.uk-panel-box-secondary .uk-panel-title{color:#444}.uk-panel-header .uk-panel-title{padding-bottom:10px;border-bottom:1px solid #ddd;color:#444}.uk-panel-space{padding:30px}.uk-panel-space .uk-panel-badge{top:30px;right:30px}.uk-panel+.uk-panel-divider{margin-top:50px!important}.uk-panel+.uk-panel-divider:before{content:"";display:block;position:absolute;top:-25px;left:0;right:0;border-top:1px solid #ddd}@media (min-width:1220px){.uk-panel+.uk-panel-divider{margin-top:70px!important}.uk-panel+.uk-panel-divider:before{top:-35px}}.uk-panel-box .uk-panel-teaser>*{border-top-left-radius:4px;border-top-right-radius:4px}.uk-article:before,.uk-article:after{content:" ";display:table}.uk-article:after{clear:both}.uk-article>:last-child{margin-bottom:0}.uk-article+.uk-article{margin-top:25px}.uk-article-title{font-size:36px;line-height:42px;font-weight:400;text-transform:none}.uk-article-title a{color:inherit;text-decoration:none}.uk-article-meta{font-size:12px;line-height:18px;color:#999}.uk-article-lead{color:#444;font-size:18px;line-height:24px;font-weight:400}.uk-article-divider{margin-bottom:25px;border-color:#ddd}*+.uk-article-divider{margin-top:25px}.uk-article+.uk-article{padding-top:25px;border-top:1px solid #ddd}.uk-comment-header{margin-bottom:15px;padding:10px;border:1px solid #ddd;border-radius:4px;background:#fafafa}.uk-comment-header:before,.uk-comment-header:after{content:" ";display:table}.uk-comment-header:after{clear:both}.uk-comment-avatar{margin-right:15px;float:left}.uk-comment-title{margin:5px 0 0;font-size:16px;line-height:22px}.uk-comment-meta{margin:2px 0 0;font-size:11px;line-height:16px;color:#999}.uk-comment-body{padding-left:10px;padding-right:10px}.uk-comment-body>:last-child{margin-bottom:0}.uk-comment-list{padding:0;list-style:none}.uk-comment-list .uk-comment+ul{margin:25px 0 0;list-style:none}.uk-comment-list>li:nth-child(n+2),.uk-comment-list .uk-comment+ul>li:nth-child(n+2){margin-top:25px}@media (min-width:768px){.uk-comment-list .uk-comment+ul{padding-left:100px}}.uk-comment-primary .uk-comment-header{border-color:rgba(45,112,145,.3);background-color:#ebf7fd;color:#2d7091;text-shadow:0 1px 0 #fff}.uk-nav,.uk-nav ul{margin:0;padding:0;list-style:none}.uk-nav li>a{display:block;text-decoration:none}.uk-nav>li>a{padding:5px 15px}.uk-nav ul{padding-left:15px}.uk-nav ul a{padding:2px 0}.uk-nav li>a>div{font-size:12px;line-height:18px}.uk-nav-header{padding:5px 15px;text-transform:uppercase;font-weight:700;font-size:12px}.uk-nav-header:not(:first-child){margin-top:15px}.uk-nav-divider{margin:9px 15px}ul.uk-nav-sub{padding:5px 0 5px 15px}.uk-nav-parent-icon>.uk-parent>a:after{content:"\f104";width:20px;margin-right:-10px;float:right;font-family:FontAwesome;text-align:center}.uk-nav-parent-icon>.uk-parent.uk-open>a:after{content:"\f107"}.uk-nav-side>li>a{color:#444}.uk-nav-side>li>a:hover,.uk-nav-side>li>a:focus{background:rgba(0,0,0,.03);color:#444;outline:0;box-shadow:inset 0 0 1px rgba(0,0,0,.1);text-shadow:0 -1px 0 #fff}.uk-nav-side>li.uk-active>a{background:#009dd8;color:#fff;box-shadow:inset 0 2px 4px rgba(0,0,0,.2);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-nav-side .uk-nav-header{color:#444}.uk-nav-side .uk-nav-divider{border-top:1px solid #ddd;box-shadow:0 1px 0 #fff}.uk-nav-side ul a{color:#07d}.uk-nav-side ul a:hover{color:#059}.uk-nav-dropdown>li>a{color:#444}.uk-nav-dropdown>li>a:hover,.uk-nav-dropdown>li>a:focus{background:#009dd8;color:#fff;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.2);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-nav-dropdown .uk-nav-header{color:#999}.uk-nav-dropdown .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-dropdown ul a{color:#07d}.uk-nav-dropdown ul a:hover{color:#059}.uk-nav-navbar>li>a{color:#444}.uk-nav-navbar>li>a:hover,.uk-nav-navbar>li>a:focus{background:#009dd8;color:#fff;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.2);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-nav-navbar .uk-nav-header{color:#999}.uk-nav-navbar .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-navbar ul a{color:#07d}.uk-nav-navbar ul a:hover{color:#059}.uk-nav-offcanvas>li>a{color:#ccc;padding:10px 15px;border-top:1px solid rgba(0,0,0,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-nav-offcanvas>.uk-open>a,html:not(.uk-touch) .uk-nav-offcanvas>li>a:hover,html:not(.uk-touch) .uk-nav-offcanvas>li>a:focus{background:#404040;color:#fff;outline:0}html .uk-nav.uk-nav-offcanvas>li.uk-active>a{background:#1a1a1a;color:#fff;box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas .uk-nav-header{color:#777;margin-top:0;border-top:1px solid rgba(0,0,0,.3);background:#404040;box-shadow:inset 0 1px 0 rgba(255,255,255,.05);text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-nav-offcanvas .uk-nav-divider{border-top:1px solid rgba(255,255,255,.01);margin:0;height:4px;background:rgba(0,0,0,.2);box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas ul a{color:#ccc}html:not(.uk-touch) .uk-nav-offcanvas ul a:hover{color:#fff}.uk-nav-offcanvas{border-bottom:1px solid rgba(0,0,0,.3);box-shadow:0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-sub{border-top:1px solid rgba(0,0,0,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-navbar{background:#f7f7f7;color:#444;border:1px solid rgba(0,0,0,.1);border-bottom-color:rgba(0,0,0,.3);border-radius:4px;background-origin:border-box;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee)}.uk-navbar:before,.uk-navbar:after{content:" ";display:table}.uk-navbar:after{clear:both}.uk-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-navbar-nav>li{float:left;position:relative}.uk-navbar-nav>li>a{display:block;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-navbar-nav>li>a[href='#']{cursor:text}.uk-navbar-nav>li:hover>a,.uk-navbar-nav>li>a:focus,.uk-navbar-nav>li.uk-open>a{background-color:transparent;color:#444;outline:0;position:relative;z-index:1;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1);box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-navbar-nav>li>a:active{background-color:#f5f5f5;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.2);box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-navbar-nav>li.uk-active>a{background-color:#fafafa;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.2);box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-navbar-nav .uk-navbar-nav-subtitle{line-height:28px}.uk-navbar-nav-subtitle>div{margin-top:-6px;font-size:10px;line-height:12px}.uk-navbar-content,.uk-navbar-brand,.uk-navbar-toggle{-moz-box-sizing:border-box;box-sizing:border-box;display:block;height:41px;padding:0 15px;float:left;margin-top:-1px;text-shadow:0 1px 0 #fff}.uk-navbar-content:before,.uk-navbar-brand:before,.uk-navbar-toggle:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-navbar-content+.uk-navbar-content:not(.uk-navbar-center){padding-left:0}.uk-navbar-content>a:not([class]){color:#07d}.uk-navbar-content>a:not([class]):hover{color:#059}.uk-navbar-brand{font-size:18px;color:#444}.uk-navbar-brand:hover,.uk-navbar-brand:focus{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle{font-size:18px;color:#444}.uk-navbar-toggle:hover,.uk-navbar-toggle:focus{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle:after{content:"\f0c9";font-family:FontAwesome;vertical-align:middle}.uk-navbar-toggle-alt:after{content:"\f002"}.uk-navbar-center{float:none;text-align:center;max-width:50%;margin-left:auto;margin-right:auto}.uk-navbar-flip{float:right}.uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:4px;border-bottom-left-radius:4px}.uk-navbar-flip .uk-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-navbar-flip .uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0;border-bottom-left-radius:0}.uk-navbar-flip .uk-navbar-nav:last-child>li:last-child>a{border-top-right-radius:4px;border-bottom-right-radius:4px}.uk-navbar-attached{border-top-color:transparent;border-left-color:transparent;border-right-color:transparent;border-radius:0}.uk-navbar-attached .uk-navbar-nav>li>a{border-radius:0!important}.uk-subnav{padding:0;list-style:none;font-size:0}.uk-subnav>li{position:relative;font-size:1rem;vertical-align:top}.uk-subnav>li,.uk-subnav>li>a,.uk-subnav>li>span{display:inline-block}.uk-subnav>li:nth-child(n+2){margin-left:10px}.uk-subnav>li>a{color:#07d}.uk-subnav>li>a:hover{color:#059}.uk-subnav>li>span{color:#999}.uk-subnav-line>li:nth-child(n+2):before{content:"";display:inline-block;height:10px;margin-right:10px;border-left:1px solid #ddd}.uk-subnav-pill>li>a,.uk-subnav-pill>li>span{padding:3px 9px;text-decoration:none;border-radius:4px}.uk-subnav-pill>li>a:hover,.uk-subnav-pill>li>a:focus{background:#fafafa;color:#444;outline:0;box-shadow:0 0 0 1px rgba(0,0,0,.1)}.uk-subnav-pill>li.uk-active>a{background:#009dd8;color:#fff;box-shadow:inset 0 2px 4px rgba(0,0,0,.2)}.uk-breadcrumb{padding:0;list-style:none;font-size:0}.uk-breadcrumb>li{font-size:1rem;vertical-align:top}.uk-breadcrumb>li,.uk-breadcrumb>li>a,.uk-breadcrumb>li>span{display:inline-block}.uk-breadcrumb>li:nth-child(n+2):before{content:"/";display:inline-block;margin:0 8px}.uk-breadcrumb>li:not(.uk-active)>span{color:#999}.uk-pagination{padding:0;list-style:none;text-align:center;font-size:0}.uk-pagination:before,.uk-pagination:after{content:" ";display:table}.uk-pagination:after{clear:both}.uk-pagination>li{display:inline-block;font-size:1rem;vertical-align:top}.uk-pagination>li:nth-child(n+2){margin-left:5px}.uk-pagination>li>a,.uk-pagination>li>span{display:inline-block;min-width:16px;padding:3px 5px;line-height:20px;text-decoration:none;-moz-box-sizing:content-box;box-sizing:content-box;text-align:center;border-radius:4px}.uk-pagination>li>a{background:#f7f7f7;color:#444;border:1px solid rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.3);background-origin:border-box;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 0 #fff}.uk-pagination>li>a:hover,.uk-pagination>li>a:focus{background-color:#fafafa;color:#444;outline:0;background-image:none}.uk-pagination>li>a:active{background-color:#f5f5f5;color:#444;border-color:rgba(0,0,0,.2);border-top-color:rgba(0,0,0,.3);background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-pagination>.uk-active>span{background:#009dd8;color:#fff;border:1px solid rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.4);background-origin:border-box;background-image:-webkit-linear-gradient(top,#00b4f5,#008dc5);background-image:linear-gradient(to bottom,#00b4f5,#008dc5);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-pagination>.uk-disabled>span{background-color:#fafafa;color:#999;border:1px solid rgba(0,0,0,.2);text-shadow:0 1px 0 #fff}.uk-pagination-previous{float:left}.uk-pagination-next{float:right}.uk-pagination-left{text-align:left}.uk-pagination-right{text-align:right}.uk-tab{margin:0;padding:0;list-style:none;border-bottom:1px solid #ddd}.uk-tab:before,.uk-tab:after{content:" ";display:table}.uk-tab:after{clear:both}.uk-tab>li{margin-bottom:-1px;float:left;position:relative}.uk-tab>li>a{display:block;padding:8px 12px;border:1px solid transparent;border-bottom-width:0;color:#07d;text-decoration:none;border-radius:4px 4px 0 0;text-shadow:0 1px 0 #fff}.uk-tab>li:nth-child(n+2)>a{margin-left:5px}.uk-tab>li>a:hover,.uk-tab>li>a:focus,.uk-tab>li.uk-open>a{border-color:#ddd;background:#fafafa;color:#059;outline:0}.uk-tab>li:not(.uk-active)>a:hover,.uk-tab>li:not(.uk-active)>a:focus,.uk-tab>li.uk-open:not(.uk-active)>a{margin-bottom:1px;padding-bottom:7px}.uk-tab>li.uk-active>a{border-color:#ddd;border-bottom-color:transparent;background:#fff;color:#444}.uk-tab>li.uk-disabled>a{color:#999;cursor:auto}.uk-tab>li.uk-disabled>a:hover,.uk-tab>li.uk-disabled>a:focus,.uk-tab>li.uk-disabled.uk-active>a{background:0 0;border-color:transparent}.uk-tab-flip>li{float:right}.uk-tab-flip>li:nth-child(n+2)>a{margin-left:0;margin-right:5px}.uk-tab-responsive{display:none}.uk-tab-responsive>a:before{content:"\f0c9\00a0";font-family:FontAwesome}@media (max-width:767px){[data-uk-tab]>li{display:none}[data-uk-tab]>li.uk-tab-responsive{display:block}[data-uk-tab]>li.uk-tab-responsive>a{margin-left:0;margin-right:0}}.uk-tab-center{border-bottom:1px solid #ddd}.uk-tab-center-bottom{border-bottom:none;border-top:1px solid #ddd}.uk-tab-center:before,.uk-tab-center:after{content:" ";display:table}.uk-tab-center:after{clear:both}.uk-tab-center .uk-tab{position:relative;right:50%;border:none;float:right}.uk-tab-center .uk-tab>li{position:relative;right:-50%}.uk-tab-center .uk-tab>li>a{text-align:center}.uk-tab-bottom{border-top:1px solid #ddd;border-bottom:none}.uk-tab-bottom>li{margin-top:-1px;margin-bottom:0}.uk-tab-bottom>li>a{padding-top:8px;padding-bottom:8px;border-bottom-width:1px;border-top-width:0}.uk-tab-bottom>li:not(.uk-active)>a:hover,.uk-tab-bottom>li:not(.uk-active)>a:focus,.uk-tab-bottom>li.uk-open:not(.uk-active)>a{margin-bottom:0;margin-top:1px;padding-bottom:8px;padding-top:7px}.uk-tab-bottom>li.uk-active>a{border-top-color:transparent;border-bottom-color:#ddd}.uk-tab-grid{margin-left:-5px;border-bottom:none;position:relative;z-index:0}.uk-tab-grid:before{display:block;position:absolute;left:5px;right:0;bottom:-1px;border-top:1px solid #ddd;z-index:-1}.uk-tab-grid>li:first-child>a{margin-left:5px}.uk-tab-grid>li>a{text-align:center}.uk-tab-grid.uk-tab-bottom{border-top:none}.uk-tab-grid.uk-tab-bottom:before{top:-1px;bottom:auto}@media (min-width:768px){.uk-tab-left,.uk-tab-right{border-bottom:none}.uk-tab-left>li,.uk-tab-right>li{margin-bottom:0;float:none}.uk-tab-left>li>a,.uk-tab-right>li>a{padding-top:8px;padding-bottom:8px}.uk-tab-left>li:nth-child(n+2)>a,.uk-tab-right>li:nth-child(n+2)>a{margin-left:0;margin-top:5px}.uk-tab-left>li.uk-active>a,.uk-tab-right>li.uk-active>a{border-color:#ddd}.uk-tab-left{border-right:1px solid #ddd}.uk-tab-left>li{margin-right:-1px}.uk-tab-left>li>a{border-bottom-width:1px;border-right-width:0}.uk-tab-left>li:not(.uk-active)>a:hover,.uk-tab-left>li:not(.uk-active)>a:focus{margin-bottom:0;margin-right:1px;padding-bottom:8px;padding-right:11px}.uk-tab-left>li.uk-active>a{border-right-color:transparent}.uk-tab-right{border-left:1px solid #ddd}.uk-tab-right>li{margin-left:-1px}.uk-tab-right>li>a{border-bottom-width:1px;border-left-width:0}.uk-tab-right>li:not(.uk-active)>a:hover,.uk-tab-right>li:not(.uk-active)>a:focus{margin-bottom:0;margin-left:1px;padding-bottom:8px;padding-left:11px}.uk-tab-right>li.uk-active>a{border-left-color:transparent}}.uk-tab-bottom>li>a{border-radius:0 0 4px 4px}@media (min-width:768px){.uk-tab-left>li>a{border-radius:4px 0 0 4px}.uk-tab-right>li>a{border-radius:0 4px 4px 0}}.uk-list{padding:0;list-style:none}.uk-list>li:before,.uk-list>li:after{content:" ";display:table}.uk-list>li:after{clear:both}.uk-list>li>:last-child{margin-bottom:0}.uk-list ul{margin:0;padding-left:20px;list-style:none}.uk-list-line>li:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-list-striped>li{padding:5px;border-bottom:1px solid #ddd}.uk-list-striped>li:nth-of-type(odd){background:#fafafa}.uk-list-space>li:nth-child(n+2){margin-top:10px}.uk-list-striped>li:first-child{border-top:1px solid #ddd}@media (min-width:768px){.uk-description-list-horizontal{overflow:hidden}.uk-description-list-horizontal>dt{width:160px;float:left;clear:both;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-description-list-horizontal>dd{margin-left:180px}}.uk-description-list-line>dt{font-weight:400}.uk-description-list-line>dt:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-description-list-line>dd{color:#999}.uk-table{width:100%;margin-bottom:15px}*+.uk-table{margin-top:15px}.uk-table th,.uk-table td{padding:8px;border-bottom:1px solid #ddd}.uk-table th{text-align:left}.uk-table td{vertical-align:top}.uk-table thead th{vertical-align:bottom}.uk-table caption,.uk-table tfoot{font-size:12px;font-style:italic}.uk-table caption{text-align:left;color:#999}.uk-table-middle,.uk-table-middle td{vertical-align:middle!important}.uk-table-striped tbody tr:nth-of-type(odd){background:#fafafa}.uk-table-condensed td{padding:4px 8px}.uk-table-hover tbody tr:hover{background:#f0f0f0}.uk-form>:last-child{margin-bottom:0}.uk-form select,.uk-form textarea,.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=datetime],.uk-form input[type=datetime-local],.uk-form input[type=date],.uk-form input[type=month],.uk-form input[type=time],.uk-form input[type=week],.uk-form input[type=number],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=color]{height:30px;max-width:100%;padding:4px 6px;border:1px solid #ddd;background:#fff;color:#444;-webkit-transition:all linear .2s;transition:all linear .2s;border-radius:4px}.uk-form select:focus,.uk-form textarea:focus,.uk-form input:not([type]):focus,.uk-form input[type=text]:focus,.uk-form input[type=password]:focus,.uk-form input[type=datetime]:focus,.uk-form input[type=datetime-local]:focus,.uk-form input[type=date]:focus,.uk-form input[type=month]:focus,.uk-form input[type=time]:focus,.uk-form input[type=week]:focus,.uk-form input[type=number]:focus,.uk-form input[type=email]:focus,.uk-form input[type=url]:focus,.uk-form input[type=search]:focus,.uk-form input[type=tel]:focus,.uk-form input[type=color]:focus{border-color:#99baca;outline:0;background:#f5fbfe;color:#444}.uk-form select:disabled,.uk-form textarea:disabled,.uk-form input:not([type]):disabled,.uk-form input[type=text]:disabled,.uk-form input[type=password]:disabled,.uk-form input[type=datetime]:disabled,.uk-form input[type=datetime-local]:disabled,.uk-form input[type=date]:disabled,.uk-form input[type=month]:disabled,.uk-form input[type=time]:disabled,.uk-form input[type=week]:disabled,.uk-form input[type=number]:disabled,.uk-form input[type=email]:disabled,.uk-form input[type=url]:disabled,.uk-form input[type=search]:disabled,.uk-form input[type=tel]:disabled,.uk-form input[type=color]:disabled{border-color:#ddd;background-color:#fafafa;color:#999}.uk-form :-ms-input-placeholder{color:#999!important}.uk-form ::-moz-placeholder{color:#999}.uk-form ::-webkit-input-placeholder{color:#999}.uk-form :disabled:-ms-input-placeholder{color:#999!important}.uk-form :disabled::-moz-placeholder{color:#999}.uk-form :disabled::-webkit-input-placeholder{color:#999}.uk-form textarea,.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel]{-webkit-appearance:none}.uk-form :invalid{box-shadow:none}.uk-form legend{width:100%;padding-bottom:15px;font-size:18px;line-height:30px}.uk-form legend:after{content:"";display:block;border-bottom:1px solid #ddd}select.uk-form-small,textarea.uk-form-small,input[type].uk-form-small,input:not([type]).uk-form-small{height:25px;padding:3px;font-size:12px}select.uk-form-large,textarea.uk-form-large,input[type].uk-form-large,input:not([type]).uk-form-large{height:40px;padding:8px 6px;font-size:16px}.uk-form textarea,.uk-form select[multiple],.uk-form select[size]{height:auto}.uk-form-danger{border-color:#dc8d99!important;background:#fff7f8!important;color:#c91032!important}.uk-form-success{border-color:#8ec73b!important;background:#fafff2!important;color:#539022!important}.uk-form-blank{border-color:transparent!important;border-style:dashed!important;background:none!important}.uk-form-blank:focus{border-color:#ddd!important}input.uk-form-width-mini{width:40px}select.uk-form-width-mini{width:65px}.uk-form-width-small{width:130px}.uk-form-width-medium{width:200px}.uk-form-width-large{width:500px}.uk-form-row:before,.uk-form-row:after{content:" ";display:table}.uk-form-row:after{clear:both}.uk-form-row+.uk-form-row{margin-top:15px}.uk-form-help-inline{display:inline-block;margin:0 0 0 10px}.uk-form-help-block{margin:5px 0 0}.uk-form-controls>:first-child{margin-top:0}.uk-form-controls>:last-child{margin-bottom:0}.uk-form-controls-condensed{margin:5px 0}.uk-form-stacked .uk-form-label{display:block;margin-bottom:5px;font-weight:700}@media (max-width:959px){.uk-form-horizontal .uk-form-label{display:block;margin-bottom:5px;font-weight:700}}@media (min-width:960px){.uk-form-horizontal .uk-form-label{width:200px;margin-top:5px;float:left}.uk-form-horizontal .uk-form-controls{margin-left:215px}.uk-form-horizontal .uk-form-controls-text{padding-top:5px}}.uk-form-icon{position:relative;display:inline-block;max-width:100%}.uk-form-icon>[class*=uk-icon-]{position:absolute;top:50%;width:30px;margin-top:-7px;font-size:14px;color:#999;text-align:center}.uk-form-icon:not(.uk-form-icon-flip)>input{padding-left:30px!important}.uk-form-icon-flip>[class*=uk-icon-]{right:0}.uk-form-icon-flip>input{padding-right:30px!important}.uk-button{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;text-decoration:none;text-align:center;border:none;line-height:28px;min-height:30px;font-size:1rem;padding:0 12px;background:#f7f7f7;color:#444;border:1px solid rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.3);background-origin:border-box;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);border-radius:4px;text-shadow:0 1px 0 #fff}.uk-button:hover,.uk-button:focus{background-color:#fafafa;color:#444;outline:0;text-decoration:none;background-image:none}.uk-button:active,.uk-button.uk-active{background-color:#f5f5f5;color:#444;border-color:rgba(0,0,0,.2);border-top-color:rgba(0,0,0,.3);background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-button-primary{background-color:#009dd8;color:#fff;background-image:-webkit-linear-gradient(top,#00b4f5,#008dc5);background-image:linear-gradient(to bottom,#00b4f5,#008dc5);border-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.4);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-button-primary:hover,.uk-button-primary:focus{background-color:#00aff2;color:#fff;background-image:none}.uk-button-primary:active,.uk-button-primary.uk-active{background-color:#008abf;color:#fff;background-image:none;border-color:rgba(0,0,0,.2);border-top-color:rgba(0,0,0,.4);box-shadow:inset 0 2px 4px rgba(0,0,0,.2)}.uk-button-success{background-color:#82bb42;color:#fff;background-image:-webkit-linear-gradient(top,#9fd256,#6fac34);background-image:linear-gradient(to bottom,#9fd256,#6fac34);border-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.4);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-button-success:hover,.uk-button-success:focus{background-color:#8fce48;color:#fff;background-image:none}.uk-button-success:active,.uk-button-success.uk-active{background-color:#76b430;color:#fff;background-image:none;border-color:rgba(0,0,0,.2);border-top-color:rgba(0,0,0,.4);box-shadow:inset 0 2px 4px rgba(0,0,0,.2)}.uk-button-danger{background-color:#d32c46;color:#fff;background-image:-webkit-linear-gradient(top,#ee465a,#c11a39);background-image:linear-gradient(to bottom,#ee465a,#c11a39);border-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.4);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-button-danger:hover,.uk-button-danger:focus{background-color:#e33551;color:#fff;background-image:none}.uk-button-danger:active,.uk-button-danger.uk-active{background-color:#c91c37;color:#fff;background-image:none;border-color:rgba(0,0,0,.2);border-top-color:rgba(0,0,0,.4);box-shadow:inset 0 2px 4px rgba(0,0,0,.2)}.uk-button:disabled{background-color:#fafafa;color:#999;border-color:rgba(0,0,0,.2);background-image:none;box-shadow:none;text-shadow:0 1px 0 #fff}.uk-button-link,.uk-button-link:hover,.uk-button-link:focus,.uk-button-link:active,.uk-button-link.uk-active,.uk-button-link:disabled{border-color:transparent;background:0 0;box-shadow:none;text-shadow:none}.uk-button-link{color:#07d}.uk-button-link:hover,.uk-button-link:focus,.uk-button-link:active,.uk-button-link.uk-active{color:#059;text-decoration:underline}.uk-button-link:disabled{color:#999}.uk-button-link:focus{outline:1px dotted}.uk-button-mini{min-height:20px;padding:0 6px;line-height:18px;font-size:11px}.uk-button-small{min-height:25px;padding:0 10px;line-height:23px;font-size:12px}.uk-button-large{min-height:40px;padding:0 15px;line-height:38px;font-size:16px;border-radius:5px}.uk-button-group{display:inline-block;vertical-align:middle;position:relative;font-size:0;white-space:nowrap}.uk-button-group>*{display:inline-block}.uk-button-group .uk-button{vertical-align:top}.uk-button-dropdown{display:inline-block;vertical-align:middle;position:relative}.uk-button-group>.uk-button:not(:first-child):not(:last-child),.uk-button-group>div:not(:first-child):not(:last-child) .uk-button{border-radius:0}.uk-button-group>.uk-button:first-child,.uk-button-group>div:first-child .uk-button{border-top-right-radius:0;border-bottom-right-radius:0}.uk-button-group>.uk-button:last-child,.uk-button-group>div:last-child .uk-button{border-top-left-radius:0;border-bottom-left-radius:0}.uk-button-group>.uk-button:nth-child(n+2),.uk-button-group>div:nth-child(n+2) .uk-button{margin-left:-1px}.uk-button-group .uk-button:active{position:relative}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot);src:url(../fonts/fontawesome-webfont.eot?#iefix) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff) format("woff"),url(../fonts/fontawesome-webfont.ttf) format("truetype");font-weight:400;font-style:normal}[class*=uk-icon-]{font-family:FontAwesome;display:inline-block;font-weight:400;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.uk-icon-small:before{font-size:150%;vertical-align:-10%}.uk-icon-medium:before{font-size:200%;vertical-align:-16%}.uk-icon-large:before{font-size:250%;vertical-align:-22%}.uk-icon-spin{display:inline-block;-webkit-animation:uk-spin 2s infinite linear;animation:uk-spin 2s infinite linear}.uk-icon-button{-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:35px;height:35px;border-radius:100%;background:#f7f7f7;line-height:35px;color:#444;font-size:18px;text-align:center;border:1px solid #ccc;border-bottom-color:#bbb;background-origin:border-box;background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);text-shadow:0 1px 0 #fff}.uk-icon-button:hover,.uk-icon-button:focus{background-color:#fafafa;color:#444;text-decoration:none;outline:0;background-image:none}.uk-icon-button:active{background-color:#f5f5f5;color:#444;border-color:#ccc;border-top-color:#bbb;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.1)}.uk-icon-glass:before{content:"\f000"}.uk-icon-music:before{content:"\f001"}.uk-icon-search:before{content:"\f002"}.uk-icon-envelope-o:before{content:"\f003"}.uk-icon-heart:before{content:"\f004"}.uk-icon-star:before{content:"\f005"}.uk-icon-star-o:before{content:"\f006"}.uk-icon-user:before{content:"\f007"}.uk-icon-film:before{content:"\f008"}.uk-icon-th-large:before{content:"\f009"}.uk-icon-th:before{content:"\f00a"}.uk-icon-th-list:before{content:"\f00b"}.uk-icon-check:before{content:"\f00c"}.uk-icon-times:before{content:"\f00d"}.uk-icon-search-plus:before{content:"\f00e"}.uk-icon-search-minus:before{content:"\f010"}.uk-icon-power-off:before{content:"\f011"}.uk-icon-signal:before{content:"\f012"}.uk-icon-gear:before,.uk-icon-cog:before{content:"\f013"}.uk-icon-trash-o:before{content:"\f014"}.uk-icon-home:before{content:"\f015"}.uk-icon-file-o:before{content:"\f016"}.uk-icon-clock-o:before{content:"\f017"}.uk-icon-road:before{content:"\f018"}.uk-icon-download:before{content:"\f019"}.uk-icon-arrow-circle-o-down:before{content:"\f01a"}.uk-icon-arrow-circle-o-up:before{content:"\f01b"}.uk-icon-inbox:before{content:"\f01c"}.uk-icon-play-circle-o:before{content:"\f01d"}.uk-icon-rotate-right:before,.uk-icon-repeat:before{content:"\f01e"}.uk-icon-refresh:before{content:"\f021"}.uk-icon-list-alt:before{content:"\f022"}.uk-icon-lock:before{content:"\f023"}.uk-icon-flag:before{content:"\f024"}.uk-icon-headphones:before{content:"\f025"}.uk-icon-volume-off:before{content:"\f026"}.uk-icon-volume-down:before{content:"\f027"}.uk-icon-volume-up:before{content:"\f028"}.uk-icon-qrcode:before{content:"\f029"}.uk-icon-barcode:before{content:"\f02a"}.uk-icon-tag:before{content:"\f02b"}.uk-icon-tags:before{content:"\f02c"}.uk-icon-book:before{content:"\f02d"}.uk-icon-bookmark:before{content:"\f02e"}.uk-icon-print:before{content:"\f02f"}.uk-icon-camera:before{content:"\f030"}.uk-icon-font:before{content:"\f031"}.uk-icon-bold:before{content:"\f032"}.uk-icon-italic:before{content:"\f033"}.uk-icon-text-height:before{content:"\f034"}.uk-icon-text-width:before{content:"\f035"}.uk-icon-align-left:before{content:"\f036"}.uk-icon-align-center:before{content:"\f037"}.uk-icon-align-right:before{content:"\f038"}.uk-icon-align-justify:before{content:"\f039"}.uk-icon-list:before{content:"\f03a"}.uk-icon-dedent:before,.uk-icon-outdent:before{content:"\f03b"}.uk-icon-indent:before{content:"\f03c"}.uk-icon-video-camera:before{content:"\f03d"}.uk-icon-picture-o:before{content:"\f03e"}.uk-icon-pencil:before{content:"\f040"}.uk-icon-map-marker:before{content:"\f041"}.uk-icon-adjust:before{content:"\f042"}.uk-icon-tint:before{content:"\f043"}.uk-icon-edit:before,.uk-icon-pencil-square-o:before{content:"\f044"}.uk-icon-share-square-o:before{content:"\f045"}.uk-icon-check-square-o:before{content:"\f046"}.uk-icon-arrows:before{content:"\f047"}.uk-icon-step-backward:before{content:"\f048"}.uk-icon-fast-backward:before{content:"\f049"}.uk-icon-backward:before{content:"\f04a"}.uk-icon-play:before{content:"\f04b"}.uk-icon-pause:before{content:"\f04c"}.uk-icon-stop:before{content:"\f04d"}.uk-icon-forward:before{content:"\f04e"}.uk-icon-fast-forward:before{content:"\f050"}.uk-icon-step-forward:before{content:"\f051"}.uk-icon-eject:before{content:"\f052"}.uk-icon-chevron-left:before{content:"\f053"}.uk-icon-chevron-right:before{content:"\f054"}.uk-icon-plus-circle:before{content:"\f055"}.uk-icon-minus-circle:before{content:"\f056"}.uk-icon-times-circle:before{content:"\f057"}.uk-icon-check-circle:before{content:"\f058"}.uk-icon-question-circle:before{content:"\f059"}.uk-icon-info-circle:before{content:"\f05a"}.uk-icon-crosshairs:before{content:"\f05b"}.uk-icon-times-circle-o:before{content:"\f05c"}.uk-icon-check-circle-o:before{content:"\f05d"}.uk-icon-ban:before{content:"\f05e"}.uk-icon-arrow-left:before{content:"\f060"}.uk-icon-arrow-right:before{content:"\f061"}.uk-icon-arrow-up:before{content:"\f062"}.uk-icon-arrow-down:before{content:"\f063"}.uk-icon-mail-forward:before,.uk-icon-share:before{content:"\f064"}.uk-icon-expand:before{content:"\f065"}.uk-icon-compress:before{content:"\f066"}.uk-icon-plus:before{content:"\f067"}.uk-icon-minus:before{content:"\f068"}.uk-icon-asterisk:before{content:"\f069"}.uk-icon-exclamation-circle:before{content:"\f06a"}.uk-icon-gift:before{content:"\f06b"}.uk-icon-leaf:before{content:"\f06c"}.uk-icon-fire:before{content:"\f06d"}.uk-icon-eye:before{content:"\f06e"}.uk-icon-eye-slash:before{content:"\f070"}.uk-icon-warning:before,.uk-icon-exclamation-triangle:before{content:"\f071"}.uk-icon-plane:before{content:"\f072"}.uk-icon-calendar:before{content:"\f073"}.uk-icon-random:before{content:"\f074"}.uk-icon-comment:before{content:"\f075"}.uk-icon-magnet:before{content:"\f076"}.uk-icon-chevron-up:before{content:"\f077"}.uk-icon-chevron-down:before{content:"\f078"}.uk-icon-retweet:before{content:"\f079"}.uk-icon-shopping-cart:before{content:"\f07a"}.uk-icon-folder:before{content:"\f07b"}.uk-icon-folder-open:before{content:"\f07c"}.uk-icon-arrows-v:before{content:"\f07d"}.uk-icon-arrows-h:before{content:"\f07e"}.uk-icon-bar-chart-o:before{content:"\f080"}.uk-icon-twitter-square:before{content:"\f081"}.uk-icon-facebook-square:before{content:"\f082"}.uk-icon-camera-retro:before{content:"\f083"}.uk-icon-key:before{content:"\f084"}.uk-icon-gears:before,.uk-icon-cogs:before{content:"\f085"}.uk-icon-comments:before{content:"\f086"}.uk-icon-thumbs-o-up:before{content:"\f087"}.uk-icon-thumbs-o-down:before{content:"\f088"}.uk-icon-star-half:before{content:"\f089"}.uk-icon-heart-o:before{content:"\f08a"}.uk-icon-sign-out:before{content:"\f08b"}.uk-icon-linkedin-square:before{content:"\f08c"}.uk-icon-thumb-tack:before{content:"\f08d"}.uk-icon-external-link:before{content:"\f08e"}.uk-icon-sign-in:before{content:"\f090"}.uk-icon-trophy:before{content:"\f091"}.uk-icon-github-square:before{content:"\f092"}.uk-icon-upload:before{content:"\f093"}.uk-icon-lemon-o:before{content:"\f094"}.uk-icon-phone:before{content:"\f095"}.uk-icon-square-o:before{content:"\f096"}.uk-icon-bookmark-o:before{content:"\f097"}.uk-icon-phone-square:before{content:"\f098"}.uk-icon-twitter:before{content:"\f099"}.uk-icon-facebook:before{content:"\f09a"}.uk-icon-github:before{content:"\f09b"}.uk-icon-unlock:before{content:"\f09c"}.uk-icon-credit-card:before{content:"\f09d"}.uk-icon-rss:before{content:"\f09e"}.uk-icon-hdd-o:before{content:"\f0a0"}.uk-icon-bullhorn:before{content:"\f0a1"}.uk-icon-bell:before{content:"\f0f3"}.uk-icon-certificate:before{content:"\f0a3"}.uk-icon-hand-o-right:before{content:"\f0a4"}.uk-icon-hand-o-left:before{content:"\f0a5"}.uk-icon-hand-o-up:before{content:"\f0a6"}.uk-icon-hand-o-down:before{content:"\f0a7"}.uk-icon-arrow-circle-left:before{content:"\f0a8"}.uk-icon-arrow-circle-right:before{content:"\f0a9"}.uk-icon-arrow-circle-up:before{content:"\f0aa"}.uk-icon-arrow-circle-down:before{content:"\f0ab"}.uk-icon-globe:before{content:"\f0ac"}.uk-icon-wrench:before{content:"\f0ad"}.uk-icon-tasks:before{content:"\f0ae"}.uk-icon-filter:before{content:"\f0b0"}.uk-icon-briefcase:before{content:"\f0b1"}.uk-icon-arrows-alt:before{content:"\f0b2"}.uk-icon-group:before,.uk-icon-users:before{content:"\f0c0"}.uk-icon-chain:before,.uk-icon-link:before{content:"\f0c1"}.uk-icon-cloud:before{content:"\f0c2"}.uk-icon-flask:before{content:"\f0c3"}.uk-icon-cut:before,.uk-icon-scissors:before{content:"\f0c4"}.uk-icon-copy:before,.uk-icon-files-o:before{content:"\f0c5"}.uk-icon-paperclip:before{content:"\f0c6"}.uk-icon-save:before,.uk-icon-floppy-o:before{content:"\f0c7"}.uk-icon-square:before{content:"\f0c8"}.uk-icon-bars:before{content:"\f0c9"}.uk-icon-list-ul:before{content:"\f0ca"}.uk-icon-list-ol:before{content:"\f0cb"}.uk-icon-strikethrough:before{content:"\f0cc"}.uk-icon-underline:before{content:"\f0cd"}.uk-icon-table:before{content:"\f0ce"}.uk-icon-magic:before{content:"\f0d0"}.uk-icon-truck:before{content:"\f0d1"}.uk-icon-pinterest:before{content:"\f0d2"}.uk-icon-pinterest-square:before{content:"\f0d3"}.uk-icon-google-plus-square:before{content:"\f0d4"}.uk-icon-google-plus:before{content:"\f0d5"}.uk-icon-money:before{content:"\f0d6"}.uk-icon-caret-down:before{content:"\f0d7"}.uk-icon-caret-up:before{content:"\f0d8"}.uk-icon-caret-left:before{content:"\f0d9"}.uk-icon-caret-right:before{content:"\f0da"}.uk-icon-columns:before{content:"\f0db"}.uk-icon-unsorted:before,.uk-icon-sort:before{content:"\f0dc"}.uk-icon-sort-down:before,.uk-icon-sort-asc:before{content:"\f0dd"}.uk-icon-sort-up:before,.uk-icon-sort-desc:before{content:"\f0de"}.uk-icon-envelope:before{content:"\f0e0"}.uk-icon-linkedin:before{content:"\f0e1"}.uk-icon-rotate-left:before,.uk-icon-undo:before{content:"\f0e2"}.uk-icon-legal:before,.uk-icon-gavel:before{content:"\f0e3"}.uk-icon-dashboard:before,.uk-icon-tachometer:before{content:"\f0e4"}.uk-icon-comment-o:before{content:"\f0e5"}.uk-icon-comments-o:before{content:"\f0e6"}.uk-icon-flash:before,.uk-icon-bolt:before{content:"\f0e7"}.uk-icon-sitemap:before{content:"\f0e8"}.uk-icon-umbrella:before{content:"\f0e9"}.uk-icon-paste:before,.uk-icon-clipboard:before{content:"\f0ea"}.uk-icon-lightbulb-o:before{content:"\f0eb"}.uk-icon-exchange:before{content:"\f0ec"}.uk-icon-cloud-download:before{content:"\f0ed"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-user-md:before{content:"\f0f0"}.uk-icon-stethoscope:before{content:"\f0f1"}.uk-icon-suitcase:before{content:"\f0f2"}.uk-icon-bell-o:before{content:"\f0a2"}.uk-icon-coffee:before{content:"\f0f4"}.uk-icon-cutlery:before{content:"\f0f5"}.uk-icon-file-text-o:before{content:"\f0f6"}.uk-icon-building-o:before{content:"\f0f7"}.uk-icon-hospital-o:before{content:"\f0f8"}.uk-icon-ambulance:before{content:"\f0f9"}.uk-icon-medkit:before{content:"\f0fa"}.uk-icon-fighter-jet:before{content:"\f0fb"}.uk-icon-beer:before{content:"\f0fc"}.uk-icon-h-square:before{content:"\f0fd"}.uk-icon-plus-square:before{content:"\f0fe"}.uk-icon-angle-double-left:before{content:"\f100"}.uk-icon-angle-double-right:before{content:"\f101"}.uk-icon-angle-double-up:before{content:"\f102"}.uk-icon-angle-double-down:before{content:"\f103"}.uk-icon-angle-left:before{content:"\f104"}.uk-icon-angle-right:before{content:"\f105"}.uk-icon-angle-up:before{content:"\f106"}.uk-icon-angle-down:before{content:"\f107"}.uk-icon-desktop:before{content:"\f108"}.uk-icon-laptop:before{content:"\f109"}.uk-icon-tablet:before{content:"\f10a"}.uk-icon-mobile-phone:before,.uk-icon-mobile:before{content:"\f10b"}.uk-icon-circle-o:before{content:"\f10c"}.uk-icon-quote-left:before{content:"\f10d"}.uk-icon-quote-right:before{content:"\f10e"}.uk-icon-spinner:before{content:"\f110"}.uk-icon-circle:before{content:"\f111"}.uk-icon-mail-reply:before,.uk-icon-reply:before{content:"\f112"}.uk-icon-github-alt:before{content:"\f113"}.uk-icon-folder-o:before{content:"\f114"}.uk-icon-folder-open-o:before{content:"\f115"}.uk-icon-smile-o:before{content:"\f118"}.uk-icon-frown-o:before{content:"\f119"}.uk-icon-meh-o:before{content:"\f11a"}.uk-icon-gamepad:before{content:"\f11b"}.uk-icon-keyboard-o:before{content:"\f11c"}.uk-icon-flag-o:before{content:"\f11d"}.uk-icon-flag-checkered:before{content:"\f11e"}.uk-icon-terminal:before{content:"\f120"}.uk-icon-code:before{content:"\f121"}.uk-icon-reply-all:before{content:"\f122"}.uk-icon-mail-reply-all:before{content:"\f122"}.uk-icon-star-half-empty:before,.uk-icon-star-half-full:before,.uk-icon-star-half-o:before{content:"\f123"}.uk-icon-location-arrow:before{content:"\f124"}.uk-icon-crop:before{content:"\f125"}.uk-icon-code-fork:before{content:"\f126"}.uk-icon-unlink:before,.uk-icon-chain-broken:before{content:"\f127"}.uk-icon-question:before{content:"\f128"}.uk-icon-info:before{content:"\f129"}.uk-icon-exclamation:before{content:"\f12a"}.uk-icon-superscript:before{content:"\f12b"}.uk-icon-subscript:before{content:"\f12c"}.uk-icon-eraser:before{content:"\f12d"}.uk-icon-puzzle-piece:before{content:"\f12e"}.uk-icon-microphone:before{content:"\f130"}.uk-icon-microphone-slash:before{content:"\f131"}.uk-icon-shield:before{content:"\f132"}.uk-icon-calendar-o:before{content:"\f133"}.uk-icon-fire-extinguisher:before{content:"\f134"}.uk-icon-rocket:before{content:"\f135"}.uk-icon-maxcdn:before{content:"\f136"}.uk-icon-chevron-circle-left:before{content:"\f137"}.uk-icon-chevron-circle-right:before{content:"\f138"}.uk-icon-chevron-circle-up:before{content:"\f139"}.uk-icon-chevron-circle-down:before{content:"\f13a"}.uk-icon-html5:before{content:"\f13b"}.uk-icon-css3:before{content:"\f13c"}.uk-icon-anchor:before{content:"\f13d"}.uk-icon-unlock-alt:before{content:"\f13e"}.uk-icon-bullseye:before{content:"\f140"}.uk-icon-ellipsis-h:before{content:"\f141"}.uk-icon-ellipsis-v:before{content:"\f142"}.uk-icon-rss-square:before{content:"\f143"}.uk-icon-play-circle:before{content:"\f144"}.uk-icon-ticket:before{content:"\f145"}.uk-icon-minus-square:before{content:"\f146"}.uk-icon-minus-square-o:before{content:"\f147"}.uk-icon-level-up:before{content:"\f148"}.uk-icon-level-down:before{content:"\f149"}.uk-icon-check-square:before{content:"\f14a"}.uk-icon-pencil-square:before{content:"\f14b"}.uk-icon-external-link-square:before{content:"\f14c"}.uk-icon-share-square:before{content:"\f14d"}.uk-icon-compass:before{content:"\f14e"}.uk-icon-toggle-down:before,.uk-icon-caret-square-o-down:before{content:"\f150"}.uk-icon-toggle-up:before,.uk-icon-caret-square-o-up:before{content:"\f151"}.uk-icon-toggle-right:before,.uk-icon-caret-square-o-right:before{content:"\f152"}.uk-icon-euro:before,.uk-icon-eur:before{content:"\f153"}.uk-icon-gbp:before{content:"\f154"}.uk-icon-dollar:before,.uk-icon-usd:before{content:"\f155"}.uk-icon-rupee:before,.uk-icon-inr:before{content:"\f156"}.uk-icon-cny:before,.uk-icon-rmb:before,.uk-icon-yen:before,.uk-icon-jpy:before{content:"\f157"}.uk-icon-ruble:before,.uk-icon-rouble:before,.uk-icon-rub:before{content:"\f158"}.uk-icon-won:before,.uk-icon-krw:before{content:"\f159"}.uk-icon-bitcoin:before,.uk-icon-btc:before{content:"\f15a"}.uk-icon-file:before{content:"\f15b"}.uk-icon-file-text:before{content:"\f15c"}.uk-icon-sort-alpha-asc:before{content:"\f15d"}.uk-icon-sort-alpha-desc:before{content:"\f15e"}.uk-icon-sort-amount-asc:before{content:"\f160"}.uk-icon-sort-amount-desc:before{content:"\f161"}.uk-icon-sort-numeric-asc:before{content:"\f162"}.uk-icon-sort-numeric-desc:before{content:"\f163"}.uk-icon-thumbs-up:before{content:"\f164"}.uk-icon-thumbs-down:before{content:"\f165"}.uk-icon-youtube-square:before{content:"\f166"}.uk-icon-youtube:before{content:"\f167"}.uk-icon-xing:before{content:"\f168"}.uk-icon-xing-square:before{content:"\f169"}.uk-icon-youtube-play:before{content:"\f16a"}.uk-icon-dropbox:before{content:"\f16b"}.uk-icon-stack-overflow:before{content:"\f16c"}.uk-icon-instagram:before{content:"\f16d"}.uk-icon-flickr:before{content:"\f16e"}.uk-icon-adn:before{content:"\f170"}.uk-icon-bitbucket:before{content:"\f171"}.uk-icon-bitbucket-square:before{content:"\f172"}.uk-icon-tumblr:before{content:"\f173"}.uk-icon-tumblr-square:before{content:"\f174"}.uk-icon-long-arrow-down:before{content:"\f175"}.uk-icon-long-arrow-up:before{content:"\f176"}.uk-icon-long-arrow-left:before{content:"\f177"}.uk-icon-long-arrow-right:before{content:"\f178"}.uk-icon-apple:before{content:"\f179"}.uk-icon-windows:before{content:"\f17a"}.uk-icon-android:before{content:"\f17b"}.uk-icon-linux:before{content:"\f17c"}.uk-icon-dribbble:before{content:"\f17d"}.uk-icon-skype:before{content:"\f17e"}.uk-icon-foursquare:before{content:"\f180"}.uk-icon-trello:before{content:"\f181"}.uk-icon-female:before{content:"\f182"}.uk-icon-male:before{content:"\f183"}.uk-icon-gittip:before{content:"\f184"}.uk-icon-sun-o:before{content:"\f185"}.uk-icon-moon-o:before{content:"\f186"}.uk-icon-archive:before{content:"\f187"}.uk-icon-bug:before{content:"\f188"}.uk-icon-vk:before{content:"\f189"}.uk-icon-weibo:before{content:"\f18a"}.uk-icon-renren:before{content:"\f18b"}.uk-icon-pagelines:before{content:"\f18c"}.uk-icon-stack-exchange:before{content:"\f18d"}.uk-icon-arrow-circle-o-right:before{content:"\f18e"}.uk-icon-arrow-circle-o-left:before{content:"\f190"}.uk-icon-toggle-left:before,.uk-icon-caret-square-o-left:before{content:"\f191"}.uk-icon-dot-circle-o:before{content:"\f192"}.uk-icon-wheelchair:before{content:"\f193"}.uk-icon-vimeo-square:before{content:"\f194"}.uk-icon-turkish-lira:before,.uk-icon-try:before{content:"\f195"}.uk-icon-plus-square-o:before{content:"\f196"}.uk-close{-moz-box-sizing:content-box;box-sizing:content-box;display:inline-block;width:20px;line-height:20px;text-align:center;color:inherit;opacity:.3;padding:0;border:0;-webkit-appearance:none;background:0 0}.uk-close:after{display:block;content:"\f00d";font-family:FontAwesome}.uk-close:hover,.uk-close:focus{opacity:.5;outline:0;color:inherit;text-decoration:none;cursor:pointer}.uk-close-alt{padding:2px;border-radius:50%;background:#fff;opacity:1;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 0 6px rgba(0,0,0,.3)}.uk-close-alt:hover,.uk-close-alt:focus{opacity:1}.uk-close-alt:after{opacity:.5}.uk-close-alt:hover:after,.uk-close-alt:focus:after{opacity:.8}.uk-badge{display:inline-block;padding:0 5px;background:#009dd8;font-size:10px;font-weight:700;line-height:14px;color:#fff;text-align:center;vertical-align:middle;text-transform:none;border:1px solid rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.3);background-origin:border-box;background-image:-webkit-linear-gradient(top,#00b4f5,#008dc5);background-image:linear-gradient(to bottom,#00b4f5,#008dc5);border-radius:2px;text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-badge-notification{-moz-box-sizing:border-box;box-sizing:border-box;min-width:18px;border-radius:500px;font-size:12px;line-height:18px}.uk-badge-success{background-color:#82bb42;background-image:-webkit-linear-gradient(top,#9fd256,#6fac34);background-image:linear-gradient(to bottom,#9fd256,#6fac34)}.uk-badge-warning{background-color:#f9a124;background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406)}.uk-badge-danger{background-color:#d32c46;background-image:-webkit-linear-gradient(top,#ee465a,#c11a39);background-image:linear-gradient(to bottom,#ee465a,#c11a39)}.uk-alert{margin-bottom:15px;padding:10px;background:#ebf7fd;color:#2d7091;border:1px solid rgba(45,112,145,.3);border-radius:4px;text-shadow:0 1px 0 #fff}*+.uk-alert{margin-top:15px}.uk-alert>:last-child{margin-bottom:0}.uk-alert h1,.uk-alert h2,.uk-alert h3,.uk-alert h4,.uk-alert h5,.uk-alert h6{color:inherit}.uk-alert>.uk-close:first-child{float:right}.uk-alert>.uk-close:first-child+*{margin-top:0}.uk-alert-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-alert-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-alert-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)}.uk-alert-large{padding:20px}.uk-alert-large>.uk-close:first-child{margin:-10px -10px 0 0}.uk-thumbnail{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;margin:0;padding:4px;border:1px solid #ddd;background:#fff;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.05)}a.uk-thumbnail:hover,a.uk-thumbnail:focus{border-color:#aaa;background-color:#fff;text-decoration:none;outline:0;box-shadow:0 1px 4px rgba(0,0,0,.3)}.uk-thumbnail-caption{padding-top:4px;text-align:center;color:#444}.uk-thumbnail-mini{width:150px}.uk-thumbnail-small{width:200px}.uk-thumbnail-medium{width:300px}.uk-thumbnail-large{width:400px}.uk-thumbnail-expand,.uk-thumbnail-expand>img{width:100%}.uk-overlay{display:inline-block;position:relative;max-width:100%;vertical-align:middle}.uk-overlay>img:first-child{display:block}.uk-overlay-area{position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.3);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0)}.uk-overlay:hover .uk-overlay-area,.uk-overlay-toggle:hover .uk-overlay-area{opacity:1}.uk-overlay-area:empty:before{content:"\f002";position:absolute;top:50%;left:50%;width:50px;height:50px;margin-top:-25px;margin-left:-25px;font-size:50px;line-height:1;font-family:FontAwesome;text-align:center;color:#fff}.uk-overlay-area:not(:empty){font-size:0}.uk-overlay-area:not(:empty):before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-overlay-area-content{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;vertical-align:middle;font-size:1rem;text-align:center;padding:0 15px;color:#fff}.uk-overlay-area-content>:last-child{margin-bottom:0}.uk-overlay-area-content a:not([class]),.uk-overlay-area-content a:not([class]):hover{color:inherit}.uk-overlay-caption{position:absolute;bottom:0;left:0;right:0;padding:15px;background:rgba(0,0,0,.5);color:#fff;opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0)}.uk-overlay:hover .uk-overlay-caption,.uk-overlay-toggle:hover .uk-overlay-caption{opacity:1}.uk-progress{-moz-box-sizing:border-box;box-sizing:border-box;height:20px;margin-bottom:15px;background:#f7f7f7;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.07),inset 0 2px 2px rgba(0,0,0,.07);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#009dd8;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;background-image:-webkit-linear-gradient(top,#00b4f5,#008dc5);background-image:linear-gradient(to bottom,#00b4f5,#008dc5);box-shadow:inset 0 -1px 0 rgba(0,0,0,.2),inset 0 0 0 1px rgba(0,0,0,.1);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#82bb42;background-image:-webkit-linear-gradient(top,#9fd256,#6fac34);background-image:linear-gradient(to bottom,#9fd256,#6fac34)}.uk-progress-warning .uk-progress-bar{background-color:#f9a124;background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406)}.uk-progress-danger .uk-progress-bar{background-color:#d32c46;background-image:-webkit-linear-gradient(top,#ee465a,#c11a39);background-image:linear-gradient(to bottom,#ee465a,#c11a39)}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}[class*=uk-animation-]{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}[data-uk-scrollspy*=uk-animation-]{opacity:0}.uk-animation-fade{-webkit-animation-name:uk-fade;animation-name:uk-fade;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-timing-function:linear;animation-timing-function:linear}.uk-animation-scale-up{-webkit-animation-name:uk-scale-up;animation-name:uk-scale-up}.uk-animation-scale-down{-webkit-animation-name:uk-scale-down;animation-name:uk-scale-down}.uk-animation-slide-top{-webkit-animation-name:uk-slide-top;animation-name:uk-slide-top}.uk-animation-slide-bottom{-webkit-animation-name:uk-slide-bottom;animation-name:uk-slide-bottom}.uk-animation-slide-left{-webkit-animation-name:uk-slide-left;animation-name:uk-slide-left}.uk-animation-slide-right{-webkit-animation-name:uk-slide-right;animation-name:uk-slide-right}.uk-animation-shake{-webkit-animation-name:uk-shake;animation-name:uk-shake}.uk-animation-reverse{-webkit-animation-direction:reverse;animation-direction:reverse}@-webkit-keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes uk-scale-up{0%{opacity:0;-webkit-transform:scale(0.2)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-scale-up{0%{opacity:0;transform:scale(0.2)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-scale-down{0%{opacity:0;-webkit-transform:scale(1.8)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-scale-down{0%{opacity:0;transform:scale(1.8)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-slide-top{0%{opacity:0;-webkit-transform:translateY(-100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom{0%{opacity:0;-webkit-transform:translateY(100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-left{0%{opacity:0;-webkit-transform:translateX(-100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-slide-left{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-slide-right{0%{opacity:0;-webkit-transform:translateX(100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-slide-right{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-shake{0%,100%{-webkit-transform:translateX(0)}10%{-webkit-transform:translateX(-9px)}20%{-webkit-transform:translateX(8px)}30%{-webkit-transform:translateX(-7px)}40%{-webkit-transform:translateX(6px)}50%{-webkit-transform:translateX(-5px)}60%{-webkit-transform:translateX(4px)}70%{-webkit-transform:translateX(-3px)}80%{-webkit-transform:translateX(2px)}90%{-webkit-transform:translateX(-1px)}}@keyframes uk-shake{0%,100%{transform:translateX(0)}10%{transform:translateX(-9px)}20%{transform:translateX(8px)}30%{transform:translateX(-7px)}40%{transform:translateX(6px)}50%{transform:translateX(-5px)}60%{transform:translateX(4px)}70%{transform:translateX(-3px)}80%{transform:translateX(2px)}90%{transform:translateX(-1px)}}@-webkit-keyframes uk-slide-top-fixed{0%{opacity:0;-webkit-transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top-fixed{0%{opacity:0;transform:translateY(-10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom-fixed{0%{opacity:0;-webkit-transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom-fixed{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@keyframes uk-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.uk-dropdown{display:none;position:absolute;top:100%;left:0;z-index:1020;-moz-box-sizing:border-box;box-sizing:border-box;width:200px;margin-top:5px;padding:15px;background:#fff;color:#444;font-size:1rem;vertical-align:top;border:1px solid #cbcbcb;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.1)}.uk-open>.uk-dropdown{display:block;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-dropdown-flip{left:auto;right:0}.uk-dropdown-up{top:auto;bottom:100%;margin-top:auto;margin-bottom:5px}.uk-dropdown .uk-nav{margin:0 -15px}.uk-dropdown>.uk-grid+.uk-grid{margin-top:15px}.uk-dropdown>.uk-grid>[class*=uk-width-]>.uk-panel+.uk-panel{margin-top:15px}@media (min-width:768px){.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid{margin-left:-15px;margin-right:-15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid>[class*=uk-width-]{padding-left:15px;padding-right:15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid>[class*=uk-width-]:nth-child(n+2){border-left:1px solid #ddd}.uk-dropdown-width-2:not(.uk-dropdown-stack){width:400px}.uk-dropdown-width-3:not(.uk-dropdown-stack){width:600px}.uk-dropdown-width-4:not(.uk-dropdown-stack){width:800px}.uk-dropdown-width-5:not(.uk-dropdown-stack){width:1000px}}@media (max-width:767px){.uk-dropdown>.uk-grid>[class*=uk-width-]{width:100%}.uk-dropdown>.uk-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}}.uk-dropdown-stack>.uk-grid>[class*=uk-width-]{width:100%}.uk-dropdown-stack>.uk-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}.uk-dropdown-small{min-width:150px;width:auto;padding:5px;white-space:nowrap}.uk-dropdown-small .uk-nav{margin:0 -5px}.uk-dropdown-navbar{margin-top:6px;background:#fff;color:#444;left:-1px;border:1px solid #cbcbcb;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.1)}.uk-open>.uk-dropdown-navbar{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-dropdown-navbar.uk-dropdown-flip{left:auto}.uk-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1010;overflow-y:auto;-webkit-overflow-scrolling:touch;background:rgba(0,0,0,.6);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translateZ(0)}.uk-modal.uk-open{opacity:1}.uk-modal-page,.uk-modal-page body{overflow:hidden}.uk-modal-dialog{position:relative;-moz-box-sizing:border-box;box-sizing:border-box;margin:50px auto;padding:20px;width:600px;max-width:100%;max-width:calc(100% - 20px);background:#fff;opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out;border-radius:4px;box-shadow:0 0 10px rgba(0,0,0,.3)}@media (max-width:767px){.uk-modal-dialog{width:auto;margin:10px}}.uk-open .uk-modal-dialog{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.uk-modal-dialog>:last-child{margin-bottom:0}.uk-modal-dialog>.uk-close:first-child{margin:-10px -10px 0 0;float:right}.uk-modal-dialog>.uk-close:first-child+*{margin-top:0}.uk-modal-dialog-frameless{padding:0}.uk-modal-dialog-frameless>.uk-close:first-child{position:absolute;top:-12px;right:-12px;margin:0;float:none}@media (max-width:767px){.uk-modal-dialog-frameless>.uk-close:first-child{top:-7px;right:-7px}}@media (min-width:768px){.uk-modal-dialog-large{width:930px}}@media (min-width:1220px){.uk-modal-dialog-large{width:1130px}}.uk-offcanvas{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:rgba(0,0,0,.1)}.uk-offcanvas.uk-active{display:block}.uk-offcanvas-page{position:fixed;-webkit-transition:margin-left .3s ease-in-out 50ms;transition:margin-left .3s ease-in-out 50ms}.uk-offcanvas-bar{position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%);z-index:1001;width:270px;max-width:100%;background:#333;overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}.uk-offcanvas.uk-active .uk-offcanvas-bar.uk-offcanvas-bar-show{-webkit-transform:translateX(0%);transform:translateX(0%)}.uk-offcanvas-bar-flip{left:auto;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas .uk-panel{margin:20px 15px;color:#777;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-offcanvas .uk-panel-title{color:#ccc}.uk-offcanvas .uk-panel a:not([class]){color:#ccc}.uk-offcanvas .uk-panel a:not([class]):hover{color:#fff}.uk-offcanvas-bar:after{content:"";display:block;position:absolute;top:0;bottom:0;right:0;width:1px;background:rgba(0,0,0,.6);box-shadow:0 0 5px 2px rgba(0,0,0,.6)}.uk-offcanvas-bar-flip:after{right:auto;left:0;width:1px;background:rgba(0,0,0,.6);box-shadow:0 0 5px 2px rgba(0,0,0,.6)}.uk-switcher{margin:0;padding:0;list-style:none}.uk-switcher>:not(.uk-active){display:none}.uk-tooltip{display:none;position:absolute;z-index:1030;-moz-box-sizing:border-box;box-sizing:border-box;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:12px;line-height:18px;text-align:center;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top:after,.uk-tooltip-top-left:after,.uk-tooltip-top-right:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom:after,.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-top:after,.uk-tooltip-bottom:after{left:50%;margin-left:-5px}.uk-tooltip-top-left:after,.uk-tooltip-bottom-left:after{left:10px}.uk-tooltip-top-right:after,.uk-tooltip-bottom-right:after{right:10px}.uk-tooltip-left:after{right:-5px;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent;border-left-color:#333}.uk-tooltip-right:after{left:-5px;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent;border-right-color:#333}.uk-text-small{font-size:11px;line-height:16px}.uk-text-large{font-size:18px;line-height:24px}.uk-text-bold{font-weight:700}.uk-text-muted{color:#999!important}.uk-text-primary{color:#2d7091!important}.uk-text-success{color:#659f13!important}.uk-text-warning{color:#e28327!important}.uk-text-danger{color:#d85030!important}.uk-text-left{text-align:left!important}.uk-text-right{text-align:right!important}.uk-text-center{text-align:center!important}.uk-text-justify{text-align:justify!important}.uk-text-top{vertical-align:top!important}.uk-text-middle{vertical-align:middle!important}.uk-text-bottom{vertical-align:bottom!important}@media (max-width:959px){.uk-text-center-medium{text-align:center!important}}@media (max-width:767px){.uk-text-center-small{text-align:center!important}}.uk-text-nowrap{white-space:nowrap}.uk-text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-text-break{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.uk-container{-moz-box-sizing:border-box;box-sizing:border-box;max-width:980px;padding:0 25px}@media (min-width:1220px){.uk-container{max-width:1200px;padding:0 35px}}.uk-container:before,.uk-container:after{content:" ";display:table}.uk-container:after{clear:both}.uk-container-center{margin-left:auto;margin-right:auto}.uk-clearfix:before,.uk-clearfix:after{content:" ";display:table}.uk-clearfix:after{clear:both}.uk-nbfc{overflow:hidden}.uk-nbfc-alt{display:table-cell;width:10000px}.uk-float-left{float:left}.uk-float-right{float:right}[class*=uk-float-]{max-width:100%}[class*=uk-align-]{display:block;margin-bottom:15px}.uk-align-left{margin-right:15px;float:left}.uk-align-right{margin-left:15px;float:right}@media (min-width:768px){.uk-align-medium-left{margin-right:15px;margin-bottom:15px;float:left}.uk-align-medium-right{margin-left:15px;margin-bottom:15px;float:right}}.uk-align-center{margin-left:auto;margin-right:auto}.uk-vertical-align{font-size:0}.uk-vertical-align:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-vertical-align-middle,.uk-vertical-align-bottom{display:inline-block;max-width:100%;font-size:1rem}.uk-vertical-align-middle{vertical-align:middle}.uk-vertical-align-bottom{vertical-align:bottom}.uk-height-1-1{height:100%}.uk-responsive-width,.uk-responsive-height{-moz-box-sizing:border-box;box-sizing:border-box}.uk-responsive-width{max-width:100%;height:auto}.uk-responsive-height{max-height:100%;width:auto}.uk-margin{margin-bottom:15px}*+.uk-margin{margin-top:15px}.uk-margin-top{margin-top:15px!important}.uk-margin-bottom{margin-bottom:15px!important}.uk-margin-left{margin-left:15px!important}.uk-margin-right{margin-right:15px!important}.uk-margin-large{margin-bottom:50px}*+.uk-margin-large{margin-top:50px}.uk-margin-large-top{margin-top:50px!important}.uk-margin-large-bottom{margin-bottom:50px!important}.uk-margin-large-left{margin-left:50px!important}.uk-margin-large-right{margin-right:50px!important}.uk-margin-small{margin-bottom:5px}*+.uk-margin-small{margin-top:5px}.uk-margin-small-top{margin-top:5px!important}.uk-margin-small-bottom{margin-bottom:5px!important}.uk-margin-small-left{margin-left:5px!important}.uk-margin-small-right{margin-right:5px!important}.uk-margin-remove{margin:0!important}.uk-margin-top-remove{margin-top:0!important}.uk-margin-bottom-remove{margin-bottom:0!important}.uk-border-circle{border-radius:50%}.uk-border-rounded{border-radius:5px}@media (min-width:768px){.uk-heading-large{font-size:52px;line-height:64px}}.uk-link-muted,.uk-link-muted a{color:#444}.uk-link-muted:hover,.uk-link-muted a:hover{color:#444}.uk-link-reset,.uk-link-reset a,.uk-link-reset:hover,.uk-link-reset a:hover{color:inherit;text-decoration:none}.uk-scrollable-text{height:300px;overflow-y:scroll;-webkit-overflow-scrolling:touch;resize:both}.uk-scrollable-box{-moz-box-sizing:border-box;box-sizing:border-box;height:170px;padding:10px;border:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch;resize:both;border-radius:3px}.uk-scrollable-box>:last-child{margin-bottom:0}.uk-overflow-container{overflow:auto;-webkit-overflow-scrolling:touch}.uk-overflow-container>:last-child{margin-bottom:0}.uk-display-block{display:block!important}.uk-display-inline{display:inline!important}.uk-display-inline-block{display:inline-block!important}@media (min-width:960px){.uk-visible-small{display:none!important}.uk-visible-medium{display:none!important}.uk-hidden-large{display:none!important}}@media (min-width:768px) and (max-width:959px){.uk-visible-small{display:none!important}.uk-visible-large{display:none!important}.uk-hidden-medium{display:none!important}}@media (max-width:767px){.uk-visible-medium{display:none!important}.uk-visible-large{display:none!important}.uk-hidden-small{display:none!important}}.uk-hidden{display:none!important;visibility:hidden!important}.uk-invisible{visibility:hidden!important}.uk-visible-hover:hover .uk-hidden,.uk-visible-hover:hover .uk-invisible{display:block!important;visibility:visible!important}.uk-visible-hover-inline:hover .uk-hidden,.uk-visible-hover-inline:hover .uk-invisible{display:inline-block!important;visibility:visible!important}@media print{*{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}} \ No newline at end of file diff --git a/www/static/css/uikit.min.css b/www/static/css/uikit.min.css new file mode 100755 index 0000000..093a839 --- /dev/null +++ b/www/static/css/uikit.min.css @@ -0,0 +1,3 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-size:1em;font-family:Consolas,monospace,serif}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}optgroup{font-weight:700}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button:disabled,html input:disabled{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{padding:0;cursor:pointer}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:none;margin:0;padding:0}legend{border:0;padding:0}textarea{overflow:auto;vertical-align:top}::-moz-placeholder{opacity:1}table{border-collapse:collapse;border-spacing:0}html{font-size:14px}body{background:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:20px;color:#444}@media (max-width:767px){body{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}}a,.uk-link{color:#07d;text-decoration:none;cursor:pointer}a:hover,.uk-link:hover{color:#059;text-decoration:underline}em{color:#d05}ins{background:#ffa;color:#444;text-decoration:none}mark{background:#ffa;color:#444}::-moz-selection{background:#39f;color:#fff;text-shadow:none}::selection{background:#39f;color:#fff;text-shadow:none}abbr[title],dfn[title]{cursor:help}dfn[title]{border-bottom:1px dotted;font-style:normal}img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;vertical-align:middle}.uk-img-preserve,.uk-img-preserve img,img[src*="maps.gstatic.com"],img[src*="googleapis.com"]{max-width:none}p,hr,ul,ol,dl,blockquote,pre,address,fieldset,figure{margin:0 0 15px}*+p,*+hr,*+ul,*+ol,*+dl,*+blockquote,*+pre,*+address,*+fieldset,*+figure{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}h1,.uk-h1{font-size:36px;line-height:42px}h2,.uk-h2{font-size:24px;line-height:30px}h3,.uk-h3{font-size:18px;line-height:24px}h4,.uk-h4{font-size:16px;line-height:22px}h5,.uk-h5{font-size:14px;line-height:20px}h6,.uk-h6{font-size:12px;line-height:18px}ul,ol{padding-left:30px}ul>li>ul,ul>li>ol,ol>li>ol,ol>li>ul{margin:0}dt{font-weight:700}dd{margin-left:0}hr{display:block;padding:0;border:0;border-top:1px solid #ddd}address{font-style:normal}q,blockquote{font-style:italic}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:16px;line-height:22px}blockquote small{display:block;color:#999;font-style:normal}blockquote p:last-of-type{margin-bottom:5px}code{color:#d05;font-size:12px;white-space:nowrap}pre code{color:inherit;white-space:pre-wrap}pre{padding:10px;background:#f5f5f5;color:#444;font-size:12px;line-height:18px;-moz-tab-size:4;tab-size:4}button,input:not([type=radio]):not([type=checkbox]),select{vertical-align:middle}iframe{border:0}@media screen and (max-width:400px){@-ms-viewport{width:device-width}}.uk-grid:before,.uk-grid:after{content:" ";display:table}.uk-grid:after{clear:both}.uk-grid{margin:0 0 0 -25px;padding:0;list-style:none}.uk-grid>*{margin:0;padding-left:25px;float:left}.uk-grid>*>:last-child{margin-bottom:0}.uk-grid+.uk-grid{margin-top:25px}.uk-grid>.uk-grid-margin{margin-top:25px}.uk-grid>*>.uk-panel+.uk-panel{margin-top:25px}@media (min-width:1220px){.uk-grid:not(.uk-grid-preserve){margin-left:-35px}.uk-grid:not(.uk-grid-preserve)>*{padding-left:35px}.uk-grid:not(.uk-grid-preserve)+.uk-grid{margin-top:35px}.uk-grid:not(.uk-grid-preserve)>.uk-grid-margin{margin-top:35px}.uk-grid:not(.uk-grid-preserve)>*>.uk-panel+.uk-panel{margin-top:35px}}.uk-grid.uk-grid-small{margin-left:-10px}.uk-grid.uk-grid-small>*{padding-left:10px}.uk-grid.uk-grid-small+.uk-grid-small{margin-top:10px}.uk-grid.uk-grid-small>.uk-grid-margin{margin-top:10px}.uk-grid.uk-grid-small>*>.uk-panel+.uk-panel{margin-top:10px}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider>*{padding-left:25px;padding-right:25px}.uk-grid-divider>[class*=uk-width-1-]:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider>[class*=uk-width-2-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-3-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-4-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-5-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-6-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-7-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-8-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-9-]:nth-child(n+2){border-left:1px solid #ddd}@media (min-width:768px){.uk-grid-divider>[class*=uk-width-medium-]:not(.uk-width-medium-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:960px){.uk-grid-divider>[class*=uk-width-large-]:not(.uk-width-large-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:1220px){.uk-grid-divider:not(.uk-grid-preserve):not(:empty){margin-left:-35px;margin-right:-35px}.uk-grid-divider:not(.uk-grid-preserve)>*{padding-left:35px;padding-right:35px}.uk-grid-divider:not(.uk-grid-preserve):empty{margin-top:35px;margin-bottom:35px}}.uk-grid-divider:empty{margin-top:25px;margin-bottom:25px;border-top:1px solid #ddd}[class*=uk-grid-width]>*{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.uk-grid-width-1-2>*{width:50%}.uk-grid-width-1-3>*{width:33.333%}.uk-grid-width-1-4>*{width:25%}.uk-grid-width-1-5>*{width:20%}.uk-grid-width-1-6>*{width:16.666%}.uk-grid-width-1-10>*{width:10%}@media (min-width:480px){.uk-grid-width-small-1-2>*{width:50%}.uk-grid-width-small-1-3>*{width:33.333%}.uk-grid-width-small-1-4>*{width:25%}.uk-grid-width-small-1-5>*{width:20%}.uk-grid-width-small-1-6>*{width:16.666%}.uk-grid-width-small-1-10>*{width:10%}}@media (min-width:768px){.uk-grid-width-medium-1-2>*{width:50%}.uk-grid-width-medium-1-3>*{width:33.333%}.uk-grid-width-medium-1-4>*{width:25%}.uk-grid-width-medium-1-5>*{width:20%}.uk-grid-width-medium-1-6>*{width:16.666%}.uk-grid-width-medium-1-10>*{width:10%}}@media (min-width:960px){.uk-grid-width-large-1-2>*{width:50%}.uk-grid-width-large-1-3>*{width:33.333%}.uk-grid-width-large-1-4>*{width:25%}.uk-grid-width-large-1-5>*{width:20%}.uk-grid-width-large-1-6>*{width:16.666%}.uk-grid-width-large-1-10>*{width:10%}}@media (min-width:1220px){.uk-grid-width-xlarge-1-2>*{width:50%}.uk-grid-width-xlarge-1-3>*{width:33.333%}.uk-grid-width-xlarge-1-4>*{width:25%}.uk-grid-width-xlarge-1-5>*{width:20%}.uk-grid-width-xlarge-1-6>*{width:16.666%}.uk-grid-width-xlarge-1-10>*{width:10%}}[class*=uk-width]{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.uk-width-1-1{width:100%}.uk-width-1-2,.uk-width-2-4,.uk-width-3-6,.uk-width-5-10{width:50%}.uk-width-1-3,.uk-width-2-6{width:33.333%}.uk-width-2-3,.uk-width-4-6{width:66.666%}.uk-width-1-4{width:25%}.uk-width-3-4{width:75%}.uk-width-1-5,.uk-width-2-10{width:20%}.uk-width-2-5,.uk-width-4-10{width:40%}.uk-width-3-5,.uk-width-6-10{width:60%}.uk-width-4-5,.uk-width-8-10{width:80%}.uk-width-1-6{width:16.666%}.uk-width-5-6{width:83.333%}.uk-width-1-10{width:10%}.uk-width-3-10{width:30%}.uk-width-7-10{width:70%}.uk-width-9-10{width:90%}@media (min-width:480px){.uk-width-small-1-1{width:100%}.uk-width-small-1-2,.uk-width-small-2-4,.uk-width-small-3-6,.uk-width-small-5-10{width:50%}.uk-width-small-1-3,.uk-width-small-2-6{width:33.333%}.uk-width-small-2-3,.uk-width-small-4-6{width:66.666%}.uk-width-small-1-4{width:25%}.uk-width-small-3-4{width:75%}.uk-width-small-1-5,.uk-width-small-2-10{width:20%}.uk-width-small-2-5,.uk-width-small-4-10{width:40%}.uk-width-small-3-5,.uk-width-small-6-10{width:60%}.uk-width-small-4-5,.uk-width-small-8-10{width:80%}.uk-width-small-1-6{width:16.666%}.uk-width-small-5-6{width:83.333%}.uk-width-small-1-10{width:10%}.uk-width-small-3-10{width:30%}.uk-width-small-7-10{width:70%}.uk-width-small-9-10{width:90%}}@media (min-width:768px){.uk-width-medium-1-1{width:100%}.uk-width-medium-1-2,.uk-width-medium-2-4,.uk-width-medium-3-6,.uk-width-medium-5-10{width:50%}.uk-width-medium-1-3,.uk-width-medium-2-6{width:33.333%}.uk-width-medium-2-3,.uk-width-medium-4-6{width:66.666%}.uk-width-medium-1-4{width:25%}.uk-width-medium-3-4{width:75%}.uk-width-medium-1-5,.uk-width-medium-2-10{width:20%}.uk-width-medium-2-5,.uk-width-medium-4-10{width:40%}.uk-width-medium-3-5,.uk-width-medium-6-10{width:60%}.uk-width-medium-4-5,.uk-width-medium-8-10{width:80%}.uk-width-medium-1-6{width:16.666%}.uk-width-medium-5-6{width:83.333%}.uk-width-medium-1-10{width:10%}.uk-width-medium-3-10{width:30%}.uk-width-medium-7-10{width:70%}.uk-width-medium-9-10{width:90%}}@media (min-width:960px){.uk-width-large-1-1{width:100%}.uk-width-large-1-2,.uk-width-large-2-4,.uk-width-large-3-6,.uk-width-large-5-10{width:50%}.uk-width-large-1-3,.uk-width-large-2-6{width:33.333%}.uk-width-large-2-3,.uk-width-large-4-6{width:66.666%}.uk-width-large-1-4{width:25%}.uk-width-large-3-4{width:75%}.uk-width-large-1-5,.uk-width-large-2-10{width:20%}.uk-width-large-2-5,.uk-width-large-4-10{width:40%}.uk-width-large-3-5,.uk-width-large-6-10{width:60%}.uk-width-large-4-5,.uk-width-large-8-10{width:80%}.uk-width-large-1-6{width:16.666%}.uk-width-large-5-6{width:83.333%}.uk-width-large-1-10{width:10%}.uk-width-large-3-10{width:30%}.uk-width-large-7-10{width:70%}.uk-width-large-9-10{width:90%}}@media (min-width:768px){[class*=uk-push-],[class*=uk-pull-]{position:relative}.uk-push-1-2,.uk-push-2-4,.uk-push-3-6,.uk-push-5-10{left:50%}.uk-push-1-3,.uk-push-2-6{left:33.333%}.uk-push-2-3,.uk-push-4-6{left:66.666%}.uk-push-1-4{left:25%}.uk-push-3-4{left:75%}.uk-push-1-5,.uk-push-2-10{left:20%}.uk-push-2-5,.uk-push-4-10{left:40%}.uk-push-3-5,.uk-push-6-10{left:60%}.uk-push-4-5,.uk-push-8-10{left:80%}.uk-push-1-6{left:16.666%}.uk-push-5-6{left:83.333%}.uk-push-1-10{left:10%}.uk-push-3-10{left:30%}.uk-push-7-10{left:70%}.uk-push-9-10{left:90%}.uk-pull-1-2,.uk-pull-2-4,.uk-pull-3-6,.uk-pull-5-10{left:-50%}.uk-pull-1-3,.uk-pull-2-6{left:-33.333%}.uk-pull-2-3,.uk-pull-4-6{left:-66.666%}.uk-pull-1-4{left:-25%}.uk-pull-3-4{left:-75%}.uk-pull-1-5,.uk-pull-2-10{left:-20%}.uk-pull-2-5,.uk-pull-4-10{left:-40%}.uk-pull-3-5,.uk-pull-6-10{left:-60%}.uk-pull-4-5,.uk-pull-8-10{left:-80%}.uk-pull-1-6{left:-16.666%}.uk-pull-5-6{left:-83.333%}.uk-pull-1-10{left:-10%}.uk-pull-3-10{left:-30%}.uk-pull-7-10{left:-70%}.uk-pull-9-10{left:-90%}}.uk-panel{display:block;position:relative}.uk-panel:before,.uk-panel:after{content:" ";display:table}.uk-panel:after{clear:both}.uk-panel>:not(.uk-panel-title):last-child{margin-bottom:0}.uk-panel-title{margin-top:0;margin-bottom:15px;font-size:18px;line-height:24px;font-weight:400;text-transform:none;color:#444}.uk-panel-badge{position:absolute;top:0;right:0;z-index:1}.uk-panel-box{padding:15px;background:#f5f5f5;color:#444}.uk-panel-box .uk-panel-title{color:#444}.uk-panel-box .uk-panel-badge{top:10px;right:10px}.uk-panel-box .uk-panel-teaser{margin:-15px -15px 15px -15px}.uk-panel-box>.uk-nav-side{margin:0 -15px}.uk-panel-box-primary{background-color:#ebf7fd;color:#2d7091}.uk-panel-box-primary .uk-panel-title{color:#2d7091}.uk-panel-box-secondary{background-color:#eee;color:#444}.uk-panel-box-secondary .uk-panel-title{color:#444}.uk-panel-header .uk-panel-title{padding-bottom:10px;border-bottom:1px solid #ddd;color:#444}.uk-panel-space{padding:30px}.uk-panel-space .uk-panel-badge{top:30px;right:30px}.uk-panel+.uk-panel-divider{margin-top:50px!important}.uk-panel+.uk-panel-divider:before{content:"";display:block;position:absolute;top:-25px;left:0;right:0;border-top:1px solid #ddd}@media (min-width:1220px){.uk-panel+.uk-panel-divider{margin-top:70px!important}.uk-panel+.uk-panel-divider:before{top:-35px}}.uk-article:before,.uk-article:after{content:" ";display:table}.uk-article:after{clear:both}.uk-article>:last-child{margin-bottom:0}.uk-article+.uk-article{margin-top:25px}.uk-article-title{font-size:36px;line-height:42px;font-weight:400;text-transform:none}.uk-article-title a{color:inherit;text-decoration:none}.uk-article-meta{font-size:12px;line-height:18px;color:#999}.uk-article-lead{color:#444;font-size:18px;line-height:24px;font-weight:400}.uk-article-divider{margin-bottom:25px;border-color:#ddd}*+.uk-article-divider{margin-top:25px}.uk-comment-header{margin-bottom:15px}.uk-comment-header:before,.uk-comment-header:after{content:" ";display:table}.uk-comment-header:after{clear:both}.uk-comment-avatar{margin-right:15px;float:left}.uk-comment-title{margin:5px 0 0;font-size:16px;line-height:22px}.uk-comment-meta{margin:2px 0 0;font-size:11px;line-height:16px;color:#999}.uk-comment-body>:last-child{margin-bottom:0}.uk-comment-list{padding:0;list-style:none}.uk-comment-list .uk-comment+ul{margin:15px 0 0;list-style:none}.uk-comment-list>li:nth-child(n+2),.uk-comment-list .uk-comment+ul>li:nth-child(n+2){margin-top:15px}@media (min-width:768px){.uk-comment-list .uk-comment+ul{padding-left:100px}}.uk-nav,.uk-nav ul{margin:0;padding:0;list-style:none}.uk-nav li>a{display:block;text-decoration:none}.uk-nav>li>a{padding:5px 15px}.uk-nav ul{padding-left:15px}.uk-nav ul a{padding:2px 0}.uk-nav li>a>div{font-size:12px;line-height:18px}.uk-nav-header{padding:5px 15px;text-transform:uppercase;font-weight:700;font-size:12px}.uk-nav-header:not(:first-child){margin-top:15px}.uk-nav-divider{margin:9px 15px}ul.uk-nav-sub{padding:5px 0 5px 15px}.uk-nav-parent-icon>.uk-parent>a:after{content:"\f104";width:20px;margin-right:-10px;float:right;font-family:FontAwesome;text-align:center}.uk-nav-parent-icon>.uk-parent.uk-open>a:after{content:"\f107"}.uk-nav-side>li>a{color:#444}.uk-nav-side>li>a:hover,.uk-nav-side>li>a:focus{background:rgba(0,0,0,.05);color:#444;outline:0}.uk-nav-side>li.uk-active>a{background:#00a8e6;color:#fff}.uk-nav-side .uk-nav-header{color:#444}.uk-nav-side .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-side ul a{color:#07d}.uk-nav-side ul a:hover{color:#059}.uk-nav-dropdown>li>a{color:#444}.uk-nav-dropdown>li>a:hover,.uk-nav-dropdown>li>a:focus{background:#00a8e6;color:#fff;outline:0}.uk-nav-dropdown .uk-nav-header{color:#999}.uk-nav-dropdown .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-dropdown ul a{color:#07d}.uk-nav-dropdown ul a:hover{color:#059}.uk-nav-navbar>li>a{color:#444}.uk-nav-navbar>li>a:hover,.uk-nav-navbar>li>a:focus{background:#00a8e6;color:#fff;outline:0}.uk-nav-navbar .uk-nav-header{color:#999}.uk-nav-navbar .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-navbar ul a{color:#07d}.uk-nav-navbar ul a:hover{color:#059}.uk-nav-offcanvas>li>a{color:#ccc;padding:10px 15px}.uk-nav-offcanvas>.uk-open>a,html:not(.uk-touch) .uk-nav-offcanvas>li>a:hover,html:not(.uk-touch) .uk-nav-offcanvas>li>a:focus{background:#404040;color:#fff;outline:0}html .uk-nav.uk-nav-offcanvas>li.uk-active>a{background:#1a1a1a;color:#fff}.uk-nav-offcanvas .uk-nav-header{color:#777}.uk-nav-offcanvas .uk-nav-divider{border-top:1px solid #1a1a1a}.uk-nav-offcanvas ul a{color:#ccc}html:not(.uk-touch) .uk-nav-offcanvas ul a:hover{color:#fff}.uk-navbar{background:#eee;color:#444}.uk-navbar:before,.uk-navbar:after{content:" ";display:table}.uk-navbar:after{clear:both}.uk-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-navbar-nav>li{float:left;position:relative}.uk-navbar-nav>li>a{display:block;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;height:40px;padding:0 15px;line-height:40px;color:#444;font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400}.uk-navbar-nav>li>a[href='#']{cursor:text}.uk-navbar-nav>li:hover>a,.uk-navbar-nav>li>a:focus,.uk-navbar-nav>li.uk-open>a{background-color:#f5f5f5;color:#444;outline:0}.uk-navbar-nav>li>a:active{background-color:#ddd;color:#444}.uk-navbar-nav>li.uk-active>a{background-color:#f5f5f5;color:#444}.uk-navbar-nav .uk-navbar-nav-subtitle{line-height:28px}.uk-navbar-nav-subtitle>div{margin-top:-6px;font-size:10px;line-height:12px}.uk-navbar-content,.uk-navbar-brand,.uk-navbar-toggle{-moz-box-sizing:border-box;box-sizing:border-box;display:block;height:40px;padding:0 15px;float:left}.uk-navbar-content:before,.uk-navbar-brand:before,.uk-navbar-toggle:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-navbar-content+.uk-navbar-content:not(.uk-navbar-center){padding-left:0}.uk-navbar-content>a:not([class]){color:#07d}.uk-navbar-content>a:not([class]):hover{color:#059}.uk-navbar-brand{font-size:18px;color:#444}.uk-navbar-brand:hover,.uk-navbar-brand:focus{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle{font-size:18px;color:#444}.uk-navbar-toggle:hover,.uk-navbar-toggle:focus{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle:after{content:"\f0c9";font-family:FontAwesome;vertical-align:middle}.uk-navbar-toggle-alt:after{content:"\f002"}.uk-navbar-center{float:none;text-align:center;max-width:50%;margin-left:auto;margin-right:auto}.uk-navbar-flip{float:right}.uk-subnav{padding:0;list-style:none;font-size:0}.uk-subnav>li{position:relative;font-size:1rem;vertical-align:top}.uk-subnav>li,.uk-subnav>li>a,.uk-subnav>li>span{display:inline-block}.uk-subnav>li:nth-child(n+2){margin-left:10px}.uk-subnav>li>a{color:#07d}.uk-subnav>li>a:hover{color:#059}.uk-subnav>li>span{color:#999}.uk-subnav-line>li:nth-child(n+2):before{content:"";display:inline-block;height:10px;margin-right:10px;border-left:1px solid #ddd}.uk-subnav-pill>li>a,.uk-subnav-pill>li>span{padding:3px 9px;text-decoration:none}.uk-subnav-pill>li>a:hover,.uk-subnav-pill>li>a:focus{background:#eee;color:#444;outline:0}.uk-subnav-pill>li.uk-active>a{background:#00a8e6;color:#fff}.uk-breadcrumb{padding:0;list-style:none;font-size:0}.uk-breadcrumb>li{font-size:1rem;vertical-align:top}.uk-breadcrumb>li,.uk-breadcrumb>li>a,.uk-breadcrumb>li>span{display:inline-block}.uk-breadcrumb>li:nth-child(n+2):before{content:"/";display:inline-block;margin:0 8px}.uk-breadcrumb>li:not(.uk-active)>span{color:#999}.uk-pagination{padding:0;list-style:none;text-align:center;font-size:0}.uk-pagination:before,.uk-pagination:after{content:" ";display:table}.uk-pagination:after{clear:both}.uk-pagination>li{display:inline-block;font-size:1rem;vertical-align:top}.uk-pagination>li:nth-child(n+2){margin-left:5px}.uk-pagination>li>a,.uk-pagination>li>span{display:inline-block;min-width:16px;padding:3px 5px;line-height:20px;text-decoration:none;-moz-box-sizing:content-box;box-sizing:content-box;text-align:center}.uk-pagination>li>a{background:#eee;color:#444}.uk-pagination>li>a:hover,.uk-pagination>li>a:focus{background-color:#f5f5f5;color:#444;outline:0}.uk-pagination>li>a:active{background-color:#ddd;color:#444}.uk-pagination>.uk-active>span{background:#00a8e6;color:#fff}.uk-pagination>.uk-disabled>span{background-color:#f5f5f5;color:#999}.uk-pagination-previous{float:left}.uk-pagination-next{float:right}.uk-pagination-left{text-align:left}.uk-pagination-right{text-align:right}.uk-tab{margin:0;padding:0;list-style:none;border-bottom:1px solid #ddd}.uk-tab:before,.uk-tab:after{content:" ";display:table}.uk-tab:after{clear:both}.uk-tab>li{margin-bottom:-1px;float:left;position:relative}.uk-tab>li>a{display:block;padding:8px 12px;border:1px solid transparent;border-bottom-width:0;color:#07d;text-decoration:none}.uk-tab>li:nth-child(n+2)>a{margin-left:5px}.uk-tab>li>a:hover,.uk-tab>li>a:focus,.uk-tab>li.uk-open>a{border-color:#f5f5f5;background:#f5f5f5;color:#059;outline:0}.uk-tab>li:not(.uk-active)>a:hover,.uk-tab>li:not(.uk-active)>a:focus,.uk-tab>li.uk-open:not(.uk-active)>a{margin-bottom:1px;padding-bottom:7px}.uk-tab>li.uk-active>a{border-color:#ddd;border-bottom-color:transparent;background:#fff;color:#444}.uk-tab>li.uk-disabled>a{color:#999;cursor:auto}.uk-tab>li.uk-disabled>a:hover,.uk-tab>li.uk-disabled>a:focus,.uk-tab>li.uk-disabled.uk-active>a{background:0 0;border-color:transparent}.uk-tab-flip>li{float:right}.uk-tab-flip>li:nth-child(n+2)>a{margin-left:0;margin-right:5px}.uk-tab-responsive{display:none}.uk-tab-responsive>a:before{content:"\f0c9\00a0";font-family:FontAwesome}@media (max-width:767px){[data-uk-tab]>li{display:none}[data-uk-tab]>li.uk-tab-responsive{display:block}[data-uk-tab]>li.uk-tab-responsive>a{margin-left:0;margin-right:0}}.uk-tab-center{border-bottom:1px solid #ddd}.uk-tab-center-bottom{border-bottom:none;border-top:1px solid #ddd}.uk-tab-center:before,.uk-tab-center:after{content:" ";display:table}.uk-tab-center:after{clear:both}.uk-tab-center .uk-tab{position:relative;right:50%;border:none;float:right}.uk-tab-center .uk-tab>li{position:relative;right:-50%}.uk-tab-center .uk-tab>li>a{text-align:center}.uk-tab-bottom{border-top:1px solid #ddd;border-bottom:none}.uk-tab-bottom>li{margin-top:-1px;margin-bottom:0}.uk-tab-bottom>li>a{padding-top:8px;padding-bottom:8px;border-bottom-width:1px;border-top-width:0}.uk-tab-bottom>li:not(.uk-active)>a:hover,.uk-tab-bottom>li:not(.uk-active)>a:focus,.uk-tab-bottom>li.uk-open:not(.uk-active)>a{margin-bottom:0;margin-top:1px;padding-bottom:8px;padding-top:7px}.uk-tab-bottom>li.uk-active>a{border-top-color:transparent;border-bottom-color:#ddd}.uk-tab-grid{margin-left:-5px;border-bottom:none;position:relative;z-index:0}.uk-tab-grid:before{display:block;position:absolute;left:5px;right:0;bottom:-1px;border-top:1px solid #ddd;z-index:-1}.uk-tab-grid>li:first-child>a{margin-left:5px}.uk-tab-grid>li>a{text-align:center}.uk-tab-grid.uk-tab-bottom{border-top:none}.uk-tab-grid.uk-tab-bottom:before{top:-1px;bottom:auto}@media (min-width:768px){.uk-tab-left,.uk-tab-right{border-bottom:none}.uk-tab-left>li,.uk-tab-right>li{margin-bottom:0;float:none}.uk-tab-left>li>a,.uk-tab-right>li>a{padding-top:8px;padding-bottom:8px}.uk-tab-left>li:nth-child(n+2)>a,.uk-tab-right>li:nth-child(n+2)>a{margin-left:0;margin-top:5px}.uk-tab-left>li.uk-active>a,.uk-tab-right>li.uk-active>a{border-color:#ddd}.uk-tab-left{border-right:1px solid #ddd}.uk-tab-left>li{margin-right:-1px}.uk-tab-left>li>a{border-bottom-width:1px;border-right-width:0}.uk-tab-left>li:not(.uk-active)>a:hover,.uk-tab-left>li:not(.uk-active)>a:focus{margin-bottom:0;margin-right:1px;padding-bottom:8px;padding-right:11px}.uk-tab-left>li.uk-active>a{border-right-color:transparent}.uk-tab-right{border-left:1px solid #ddd}.uk-tab-right>li{margin-left:-1px}.uk-tab-right>li>a{border-bottom-width:1px;border-left-width:0}.uk-tab-right>li:not(.uk-active)>a:hover,.uk-tab-right>li:not(.uk-active)>a:focus{margin-bottom:0;margin-left:1px;padding-bottom:8px;padding-left:11px}.uk-tab-right>li.uk-active>a{border-left-color:transparent}}.uk-list{padding:0;list-style:none}.uk-list>li:before,.uk-list>li:after{content:" ";display:table}.uk-list>li:after{clear:both}.uk-list>li>:last-child{margin-bottom:0}.uk-list ul{margin:0;padding-left:20px;list-style:none}.uk-list-line>li:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-list-striped>li{padding:5px}.uk-list-striped>li:nth-of-type(odd){background:#f5f5f5}.uk-list-space>li:nth-child(n+2){margin-top:10px}@media (min-width:768px){.uk-description-list-horizontal{overflow:hidden}.uk-description-list-horizontal>dt{width:160px;float:left;clear:both;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-description-list-horizontal>dd{margin-left:180px}}.uk-description-list-line>dt{font-weight:400}.uk-description-list-line>dt:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-description-list-line>dd{color:#999}.uk-table{width:100%;margin-bottom:15px}*+.uk-table{margin-top:15px}.uk-table th,.uk-table td{padding:8px}.uk-table th{text-align:left}.uk-table td{vertical-align:top}.uk-table thead th{vertical-align:bottom}.uk-table caption,.uk-table tfoot{font-size:12px;font-style:italic}.uk-table caption{text-align:left;color:#999}.uk-table-middle,.uk-table-middle td{vertical-align:middle!important}.uk-table-striped tbody tr:nth-of-type(odd){background:#f5f5f5}.uk-table-condensed td{padding:4px 8px}.uk-table-hover tbody tr:hover{background:#eee}.uk-form>:last-child{margin-bottom:0}.uk-form select,.uk-form textarea,.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=datetime],.uk-form input[type=datetime-local],.uk-form input[type=date],.uk-form input[type=month],.uk-form input[type=time],.uk-form input[type=week],.uk-form input[type=number],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=color]{height:30px;max-width:100%;padding:4px 6px;border:1px solid #ddd;background:#fff;color:#444;-webkit-transition:all linear .2s;transition:all linear .2s}.uk-form select:focus,.uk-form textarea:focus,.uk-form input:not([type]):focus,.uk-form input[type=text]:focus,.uk-form input[type=password]:focus,.uk-form input[type=datetime]:focus,.uk-form input[type=datetime-local]:focus,.uk-form input[type=date]:focus,.uk-form input[type=month]:focus,.uk-form input[type=time]:focus,.uk-form input[type=week]:focus,.uk-form input[type=number]:focus,.uk-form input[type=email]:focus,.uk-form input[type=url]:focus,.uk-form input[type=search]:focus,.uk-form input[type=tel]:focus,.uk-form input[type=color]:focus{border-color:#99baca;outline:0;background:#f5fbfe;color:#444}.uk-form select:disabled,.uk-form textarea:disabled,.uk-form input:not([type]):disabled,.uk-form input[type=text]:disabled,.uk-form input[type=password]:disabled,.uk-form input[type=datetime]:disabled,.uk-form input[type=datetime-local]:disabled,.uk-form input[type=date]:disabled,.uk-form input[type=month]:disabled,.uk-form input[type=time]:disabled,.uk-form input[type=week]:disabled,.uk-form input[type=number]:disabled,.uk-form input[type=email]:disabled,.uk-form input[type=url]:disabled,.uk-form input[type=search]:disabled,.uk-form input[type=tel]:disabled,.uk-form input[type=color]:disabled{border-color:#ddd;background-color:#f5f5f5;color:#999}.uk-form :-ms-input-placeholder{color:#999!important}.uk-form ::-moz-placeholder{color:#999}.uk-form ::-webkit-input-placeholder{color:#999}.uk-form :disabled:-ms-input-placeholder{color:#999!important}.uk-form :disabled::-moz-placeholder{color:#999}.uk-form :disabled::-webkit-input-placeholder{color:#999}.uk-form textarea,.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel]{-webkit-appearance:none}.uk-form :invalid{box-shadow:none}.uk-form legend{width:100%;padding-bottom:15px;font-size:18px;line-height:30px}.uk-form legend:after{content:"";display:block;border-bottom:1px solid #ddd}select.uk-form-small,textarea.uk-form-small,input[type].uk-form-small,input:not([type]).uk-form-small{height:25px;padding:3px;font-size:12px}select.uk-form-large,textarea.uk-form-large,input[type].uk-form-large,input:not([type]).uk-form-large{height:40px;padding:8px 6px;font-size:16px}.uk-form textarea,.uk-form select[multiple],.uk-form select[size]{height:auto}.uk-form-danger{border-color:#dc8d99!important;background:#fff7f8!important;color:#c91032!important}.uk-form-success{border-color:#8ec73b!important;background:#fafff2!important;color:#539022!important}.uk-form-blank{border-color:transparent!important;border-style:dashed!important;background:none!important}.uk-form-blank:focus{border-color:#ddd!important}input.uk-form-width-mini{width:40px}select.uk-form-width-mini{width:65px}.uk-form-width-small{width:130px}.uk-form-width-medium{width:200px}.uk-form-width-large{width:500px}.uk-form-row:before,.uk-form-row:after{content:" ";display:table}.uk-form-row:after{clear:both}.uk-form-row+.uk-form-row{margin-top:15px}.uk-form-help-inline{display:inline-block;margin:0 0 0 10px}.uk-form-help-block{margin:5px 0 0}.uk-form-controls>:first-child{margin-top:0}.uk-form-controls>:last-child{margin-bottom:0}.uk-form-controls-condensed{margin:5px 0}.uk-form-stacked .uk-form-label{display:block;margin-bottom:5px;font-weight:700}@media (max-width:959px){.uk-form-horizontal .uk-form-label{display:block;margin-bottom:5px;font-weight:700}}@media (min-width:960px){.uk-form-horizontal .uk-form-label{width:200px;margin-top:5px;float:left}.uk-form-horizontal .uk-form-controls{margin-left:215px}.uk-form-horizontal .uk-form-controls-text{padding-top:5px}}.uk-form-icon{position:relative;display:inline-block;max-width:100%}.uk-form-icon>[class*=uk-icon-]{position:absolute;top:50%;width:30px;margin-top:-7px;font-size:14px;color:#999;text-align:center}.uk-form-icon:not(.uk-form-icon-flip)>input{padding-left:30px!important}.uk-form-icon-flip>[class*=uk-icon-]{right:0}.uk-form-icon-flip>input{padding-right:30px!important}.uk-button{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;text-decoration:none;text-align:center;border:none;line-height:30px;min-height:30px;font-size:1rem;padding:0 12px;background:#eee;color:#444}.uk-button:hover,.uk-button:focus{background-color:#f5f5f5;color:#444;outline:0;text-decoration:none}.uk-button:active,.uk-button.uk-active{background-color:#ddd;color:#444}.uk-button-primary{background-color:#00a8e6;color:#fff}.uk-button-primary:hover,.uk-button-primary:focus{background-color:#35b3ee;color:#fff}.uk-button-primary:active,.uk-button-primary.uk-active{background-color:#0091ca;color:#fff}.uk-button-success{background-color:#8cc14c;color:#fff}.uk-button-success:hover,.uk-button-success:focus{background-color:#8ec73b;color:#fff}.uk-button-success:active,.uk-button-success.uk-active{background-color:#72ae41;color:#fff}.uk-button-danger{background-color:#da314b;color:#fff}.uk-button-danger:hover,.uk-button-danger:focus{background-color:#e4354f;color:#fff}.uk-button-danger:active,.uk-button-danger.uk-active{background-color:#c91032;color:#fff}.uk-button:disabled{background-color:#f5f5f5;color:#999}.uk-button-link,.uk-button-link:hover,.uk-button-link:focus,.uk-button-link:active,.uk-button-link.uk-active,.uk-button-link:disabled{border-color:transparent;background:0 0}.uk-button-link{color:#07d}.uk-button-link:hover,.uk-button-link:focus,.uk-button-link:active,.uk-button-link.uk-active{color:#059;text-decoration:underline}.uk-button-link:disabled{color:#999}.uk-button-link:focus{outline:1px dotted}.uk-button-mini{min-height:20px;padding:0 6px;line-height:20px;font-size:11px}.uk-button-small{min-height:25px;padding:0 10px;line-height:25px;font-size:12px}.uk-button-large{min-height:40px;padding:0 15px;line-height:40px;font-size:16px}.uk-button-group{display:inline-block;vertical-align:middle;position:relative;font-size:0;white-space:nowrap}.uk-button-group>*{display:inline-block}.uk-button-group .uk-button{vertical-align:top}.uk-button-dropdown{display:inline-block;vertical-align:middle;position:relative}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot);src:url(../fonts/fontawesome-webfont.eot?#iefix) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff) format("woff"),url(../fonts/fontawesome-webfont.ttf) format("truetype");font-weight:400;font-style:normal}[class*=uk-icon-]{font-family:FontAwesome;display:inline-block;font-weight:400;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.uk-icon-small:before{font-size:150%;vertical-align:-10%}.uk-icon-medium:before{font-size:200%;vertical-align:-16%}.uk-icon-large:before{font-size:250%;vertical-align:-22%}.uk-icon-spin{display:inline-block;-webkit-animation:uk-spin 2s infinite linear;animation:uk-spin 2s infinite linear}.uk-icon-button{-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:35px;height:35px;border-radius:100%;background:#eee;line-height:35px;color:#444;font-size:18px;text-align:center}.uk-icon-button:hover,.uk-icon-button:focus{background-color:#f5f5f5;color:#444;text-decoration:none;outline:0}.uk-icon-button:active{background-color:#ddd;color:#444}.uk-icon-glass:before{content:"\f000"}.uk-icon-music:before{content:"\f001"}.uk-icon-search:before{content:"\f002"}.uk-icon-envelope-o:before{content:"\f003"}.uk-icon-heart:before{content:"\f004"}.uk-icon-star:before{content:"\f005"}.uk-icon-star-o:before{content:"\f006"}.uk-icon-user:before{content:"\f007"}.uk-icon-film:before{content:"\f008"}.uk-icon-th-large:before{content:"\f009"}.uk-icon-th:before{content:"\f00a"}.uk-icon-th-list:before{content:"\f00b"}.uk-icon-check:before{content:"\f00c"}.uk-icon-times:before{content:"\f00d"}.uk-icon-search-plus:before{content:"\f00e"}.uk-icon-search-minus:before{content:"\f010"}.uk-icon-power-off:before{content:"\f011"}.uk-icon-signal:before{content:"\f012"}.uk-icon-gear:before,.uk-icon-cog:before{content:"\f013"}.uk-icon-trash-o:before{content:"\f014"}.uk-icon-home:before{content:"\f015"}.uk-icon-file-o:before{content:"\f016"}.uk-icon-clock-o:before{content:"\f017"}.uk-icon-road:before{content:"\f018"}.uk-icon-download:before{content:"\f019"}.uk-icon-arrow-circle-o-down:before{content:"\f01a"}.uk-icon-arrow-circle-o-up:before{content:"\f01b"}.uk-icon-inbox:before{content:"\f01c"}.uk-icon-play-circle-o:before{content:"\f01d"}.uk-icon-rotate-right:before,.uk-icon-repeat:before{content:"\f01e"}.uk-icon-refresh:before{content:"\f021"}.uk-icon-list-alt:before{content:"\f022"}.uk-icon-lock:before{content:"\f023"}.uk-icon-flag:before{content:"\f024"}.uk-icon-headphones:before{content:"\f025"}.uk-icon-volume-off:before{content:"\f026"}.uk-icon-volume-down:before{content:"\f027"}.uk-icon-volume-up:before{content:"\f028"}.uk-icon-qrcode:before{content:"\f029"}.uk-icon-barcode:before{content:"\f02a"}.uk-icon-tag:before{content:"\f02b"}.uk-icon-tags:before{content:"\f02c"}.uk-icon-book:before{content:"\f02d"}.uk-icon-bookmark:before{content:"\f02e"}.uk-icon-print:before{content:"\f02f"}.uk-icon-camera:before{content:"\f030"}.uk-icon-font:before{content:"\f031"}.uk-icon-bold:before{content:"\f032"}.uk-icon-italic:before{content:"\f033"}.uk-icon-text-height:before{content:"\f034"}.uk-icon-text-width:before{content:"\f035"}.uk-icon-align-left:before{content:"\f036"}.uk-icon-align-center:before{content:"\f037"}.uk-icon-align-right:before{content:"\f038"}.uk-icon-align-justify:before{content:"\f039"}.uk-icon-list:before{content:"\f03a"}.uk-icon-dedent:before,.uk-icon-outdent:before{content:"\f03b"}.uk-icon-indent:before{content:"\f03c"}.uk-icon-video-camera:before{content:"\f03d"}.uk-icon-picture-o:before{content:"\f03e"}.uk-icon-pencil:before{content:"\f040"}.uk-icon-map-marker:before{content:"\f041"}.uk-icon-adjust:before{content:"\f042"}.uk-icon-tint:before{content:"\f043"}.uk-icon-edit:before,.uk-icon-pencil-square-o:before{content:"\f044"}.uk-icon-share-square-o:before{content:"\f045"}.uk-icon-check-square-o:before{content:"\f046"}.uk-icon-arrows:before{content:"\f047"}.uk-icon-step-backward:before{content:"\f048"}.uk-icon-fast-backward:before{content:"\f049"}.uk-icon-backward:before{content:"\f04a"}.uk-icon-play:before{content:"\f04b"}.uk-icon-pause:before{content:"\f04c"}.uk-icon-stop:before{content:"\f04d"}.uk-icon-forward:before{content:"\f04e"}.uk-icon-fast-forward:before{content:"\f050"}.uk-icon-step-forward:before{content:"\f051"}.uk-icon-eject:before{content:"\f052"}.uk-icon-chevron-left:before{content:"\f053"}.uk-icon-chevron-right:before{content:"\f054"}.uk-icon-plus-circle:before{content:"\f055"}.uk-icon-minus-circle:before{content:"\f056"}.uk-icon-times-circle:before{content:"\f057"}.uk-icon-check-circle:before{content:"\f058"}.uk-icon-question-circle:before{content:"\f059"}.uk-icon-info-circle:before{content:"\f05a"}.uk-icon-crosshairs:before{content:"\f05b"}.uk-icon-times-circle-o:before{content:"\f05c"}.uk-icon-check-circle-o:before{content:"\f05d"}.uk-icon-ban:before{content:"\f05e"}.uk-icon-arrow-left:before{content:"\f060"}.uk-icon-arrow-right:before{content:"\f061"}.uk-icon-arrow-up:before{content:"\f062"}.uk-icon-arrow-down:before{content:"\f063"}.uk-icon-mail-forward:before,.uk-icon-share:before{content:"\f064"}.uk-icon-expand:before{content:"\f065"}.uk-icon-compress:before{content:"\f066"}.uk-icon-plus:before{content:"\f067"}.uk-icon-minus:before{content:"\f068"}.uk-icon-asterisk:before{content:"\f069"}.uk-icon-exclamation-circle:before{content:"\f06a"}.uk-icon-gift:before{content:"\f06b"}.uk-icon-leaf:before{content:"\f06c"}.uk-icon-fire:before{content:"\f06d"}.uk-icon-eye:before{content:"\f06e"}.uk-icon-eye-slash:before{content:"\f070"}.uk-icon-warning:before,.uk-icon-exclamation-triangle:before{content:"\f071"}.uk-icon-plane:before{content:"\f072"}.uk-icon-calendar:before{content:"\f073"}.uk-icon-random:before{content:"\f074"}.uk-icon-comment:before{content:"\f075"}.uk-icon-magnet:before{content:"\f076"}.uk-icon-chevron-up:before{content:"\f077"}.uk-icon-chevron-down:before{content:"\f078"}.uk-icon-retweet:before{content:"\f079"}.uk-icon-shopping-cart:before{content:"\f07a"}.uk-icon-folder:before{content:"\f07b"}.uk-icon-folder-open:before{content:"\f07c"}.uk-icon-arrows-v:before{content:"\f07d"}.uk-icon-arrows-h:before{content:"\f07e"}.uk-icon-bar-chart-o:before{content:"\f080"}.uk-icon-twitter-square:before{content:"\f081"}.uk-icon-facebook-square:before{content:"\f082"}.uk-icon-camera-retro:before{content:"\f083"}.uk-icon-key:before{content:"\f084"}.uk-icon-gears:before,.uk-icon-cogs:before{content:"\f085"}.uk-icon-comments:before{content:"\f086"}.uk-icon-thumbs-o-up:before{content:"\f087"}.uk-icon-thumbs-o-down:before{content:"\f088"}.uk-icon-star-half:before{content:"\f089"}.uk-icon-heart-o:before{content:"\f08a"}.uk-icon-sign-out:before{content:"\f08b"}.uk-icon-linkedin-square:before{content:"\f08c"}.uk-icon-thumb-tack:before{content:"\f08d"}.uk-icon-external-link:before{content:"\f08e"}.uk-icon-sign-in:before{content:"\f090"}.uk-icon-trophy:before{content:"\f091"}.uk-icon-github-square:before{content:"\f092"}.uk-icon-upload:before{content:"\f093"}.uk-icon-lemon-o:before{content:"\f094"}.uk-icon-phone:before{content:"\f095"}.uk-icon-square-o:before{content:"\f096"}.uk-icon-bookmark-o:before{content:"\f097"}.uk-icon-phone-square:before{content:"\f098"}.uk-icon-twitter:before{content:"\f099"}.uk-icon-facebook:before{content:"\f09a"}.uk-icon-github:before{content:"\f09b"}.uk-icon-unlock:before{content:"\f09c"}.uk-icon-credit-card:before{content:"\f09d"}.uk-icon-rss:before{content:"\f09e"}.uk-icon-hdd-o:before{content:"\f0a0"}.uk-icon-bullhorn:before{content:"\f0a1"}.uk-icon-bell:before{content:"\f0f3"}.uk-icon-certificate:before{content:"\f0a3"}.uk-icon-hand-o-right:before{content:"\f0a4"}.uk-icon-hand-o-left:before{content:"\f0a5"}.uk-icon-hand-o-up:before{content:"\f0a6"}.uk-icon-hand-o-down:before{content:"\f0a7"}.uk-icon-arrow-circle-left:before{content:"\f0a8"}.uk-icon-arrow-circle-right:before{content:"\f0a9"}.uk-icon-arrow-circle-up:before{content:"\f0aa"}.uk-icon-arrow-circle-down:before{content:"\f0ab"}.uk-icon-globe:before{content:"\f0ac"}.uk-icon-wrench:before{content:"\f0ad"}.uk-icon-tasks:before{content:"\f0ae"}.uk-icon-filter:before{content:"\f0b0"}.uk-icon-briefcase:before{content:"\f0b1"}.uk-icon-arrows-alt:before{content:"\f0b2"}.uk-icon-group:before,.uk-icon-users:before{content:"\f0c0"}.uk-icon-chain:before,.uk-icon-link:before{content:"\f0c1"}.uk-icon-cloud:before{content:"\f0c2"}.uk-icon-flask:before{content:"\f0c3"}.uk-icon-cut:before,.uk-icon-scissors:before{content:"\f0c4"}.uk-icon-copy:before,.uk-icon-files-o:before{content:"\f0c5"}.uk-icon-paperclip:before{content:"\f0c6"}.uk-icon-save:before,.uk-icon-floppy-o:before{content:"\f0c7"}.uk-icon-square:before{content:"\f0c8"}.uk-icon-bars:before{content:"\f0c9"}.uk-icon-list-ul:before{content:"\f0ca"}.uk-icon-list-ol:before{content:"\f0cb"}.uk-icon-strikethrough:before{content:"\f0cc"}.uk-icon-underline:before{content:"\f0cd"}.uk-icon-table:before{content:"\f0ce"}.uk-icon-magic:before{content:"\f0d0"}.uk-icon-truck:before{content:"\f0d1"}.uk-icon-pinterest:before{content:"\f0d2"}.uk-icon-pinterest-square:before{content:"\f0d3"}.uk-icon-google-plus-square:before{content:"\f0d4"}.uk-icon-google-plus:before{content:"\f0d5"}.uk-icon-money:before{content:"\f0d6"}.uk-icon-caret-down:before{content:"\f0d7"}.uk-icon-caret-up:before{content:"\f0d8"}.uk-icon-caret-left:before{content:"\f0d9"}.uk-icon-caret-right:before{content:"\f0da"}.uk-icon-columns:before{content:"\f0db"}.uk-icon-unsorted:before,.uk-icon-sort:before{content:"\f0dc"}.uk-icon-sort-down:before,.uk-icon-sort-asc:before{content:"\f0dd"}.uk-icon-sort-up:before,.uk-icon-sort-desc:before{content:"\f0de"}.uk-icon-envelope:before{content:"\f0e0"}.uk-icon-linkedin:before{content:"\f0e1"}.uk-icon-rotate-left:before,.uk-icon-undo:before{content:"\f0e2"}.uk-icon-legal:before,.uk-icon-gavel:before{content:"\f0e3"}.uk-icon-dashboard:before,.uk-icon-tachometer:before{content:"\f0e4"}.uk-icon-comment-o:before{content:"\f0e5"}.uk-icon-comments-o:before{content:"\f0e6"}.uk-icon-flash:before,.uk-icon-bolt:before{content:"\f0e7"}.uk-icon-sitemap:before{content:"\f0e8"}.uk-icon-umbrella:before{content:"\f0e9"}.uk-icon-paste:before,.uk-icon-clipboard:before{content:"\f0ea"}.uk-icon-lightbulb-o:before{content:"\f0eb"}.uk-icon-exchange:before{content:"\f0ec"}.uk-icon-cloud-download:before{content:"\f0ed"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-user-md:before{content:"\f0f0"}.uk-icon-stethoscope:before{content:"\f0f1"}.uk-icon-suitcase:before{content:"\f0f2"}.uk-icon-bell-o:before{content:"\f0a2"}.uk-icon-coffee:before{content:"\f0f4"}.uk-icon-cutlery:before{content:"\f0f5"}.uk-icon-file-text-o:before{content:"\f0f6"}.uk-icon-building-o:before{content:"\f0f7"}.uk-icon-hospital-o:before{content:"\f0f8"}.uk-icon-ambulance:before{content:"\f0f9"}.uk-icon-medkit:before{content:"\f0fa"}.uk-icon-fighter-jet:before{content:"\f0fb"}.uk-icon-beer:before{content:"\f0fc"}.uk-icon-h-square:before{content:"\f0fd"}.uk-icon-plus-square:before{content:"\f0fe"}.uk-icon-angle-double-left:before{content:"\f100"}.uk-icon-angle-double-right:before{content:"\f101"}.uk-icon-angle-double-up:before{content:"\f102"}.uk-icon-angle-double-down:before{content:"\f103"}.uk-icon-angle-left:before{content:"\f104"}.uk-icon-angle-right:before{content:"\f105"}.uk-icon-angle-up:before{content:"\f106"}.uk-icon-angle-down:before{content:"\f107"}.uk-icon-desktop:before{content:"\f108"}.uk-icon-laptop:before{content:"\f109"}.uk-icon-tablet:before{content:"\f10a"}.uk-icon-mobile-phone:before,.uk-icon-mobile:before{content:"\f10b"}.uk-icon-circle-o:before{content:"\f10c"}.uk-icon-quote-left:before{content:"\f10d"}.uk-icon-quote-right:before{content:"\f10e"}.uk-icon-spinner:before{content:"\f110"}.uk-icon-circle:before{content:"\f111"}.uk-icon-mail-reply:before,.uk-icon-reply:before{content:"\f112"}.uk-icon-github-alt:before{content:"\f113"}.uk-icon-folder-o:before{content:"\f114"}.uk-icon-folder-open-o:before{content:"\f115"}.uk-icon-smile-o:before{content:"\f118"}.uk-icon-frown-o:before{content:"\f119"}.uk-icon-meh-o:before{content:"\f11a"}.uk-icon-gamepad:before{content:"\f11b"}.uk-icon-keyboard-o:before{content:"\f11c"}.uk-icon-flag-o:before{content:"\f11d"}.uk-icon-flag-checkered:before{content:"\f11e"}.uk-icon-terminal:before{content:"\f120"}.uk-icon-code:before{content:"\f121"}.uk-icon-reply-all:before{content:"\f122"}.uk-icon-mail-reply-all:before{content:"\f122"}.uk-icon-star-half-empty:before,.uk-icon-star-half-full:before,.uk-icon-star-half-o:before{content:"\f123"}.uk-icon-location-arrow:before{content:"\f124"}.uk-icon-crop:before{content:"\f125"}.uk-icon-code-fork:before{content:"\f126"}.uk-icon-unlink:before,.uk-icon-chain-broken:before{content:"\f127"}.uk-icon-question:before{content:"\f128"}.uk-icon-info:before{content:"\f129"}.uk-icon-exclamation:before{content:"\f12a"}.uk-icon-superscript:before{content:"\f12b"}.uk-icon-subscript:before{content:"\f12c"}.uk-icon-eraser:before{content:"\f12d"}.uk-icon-puzzle-piece:before{content:"\f12e"}.uk-icon-microphone:before{content:"\f130"}.uk-icon-microphone-slash:before{content:"\f131"}.uk-icon-shield:before{content:"\f132"}.uk-icon-calendar-o:before{content:"\f133"}.uk-icon-fire-extinguisher:before{content:"\f134"}.uk-icon-rocket:before{content:"\f135"}.uk-icon-maxcdn:before{content:"\f136"}.uk-icon-chevron-circle-left:before{content:"\f137"}.uk-icon-chevron-circle-right:before{content:"\f138"}.uk-icon-chevron-circle-up:before{content:"\f139"}.uk-icon-chevron-circle-down:before{content:"\f13a"}.uk-icon-html5:before{content:"\f13b"}.uk-icon-css3:before{content:"\f13c"}.uk-icon-anchor:before{content:"\f13d"}.uk-icon-unlock-alt:before{content:"\f13e"}.uk-icon-bullseye:before{content:"\f140"}.uk-icon-ellipsis-h:before{content:"\f141"}.uk-icon-ellipsis-v:before{content:"\f142"}.uk-icon-rss-square:before{content:"\f143"}.uk-icon-play-circle:before{content:"\f144"}.uk-icon-ticket:before{content:"\f145"}.uk-icon-minus-square:before{content:"\f146"}.uk-icon-minus-square-o:before{content:"\f147"}.uk-icon-level-up:before{content:"\f148"}.uk-icon-level-down:before{content:"\f149"}.uk-icon-check-square:before{content:"\f14a"}.uk-icon-pencil-square:before{content:"\f14b"}.uk-icon-external-link-square:before{content:"\f14c"}.uk-icon-share-square:before{content:"\f14d"}.uk-icon-compass:before{content:"\f14e"}.uk-icon-toggle-down:before,.uk-icon-caret-square-o-down:before{content:"\f150"}.uk-icon-toggle-up:before,.uk-icon-caret-square-o-up:before{content:"\f151"}.uk-icon-toggle-right:before,.uk-icon-caret-square-o-right:before{content:"\f152"}.uk-icon-euro:before,.uk-icon-eur:before{content:"\f153"}.uk-icon-gbp:before{content:"\f154"}.uk-icon-dollar:before,.uk-icon-usd:before{content:"\f155"}.uk-icon-rupee:before,.uk-icon-inr:before{content:"\f156"}.uk-icon-cny:before,.uk-icon-rmb:before,.uk-icon-yen:before,.uk-icon-jpy:before{content:"\f157"}.uk-icon-ruble:before,.uk-icon-rouble:before,.uk-icon-rub:before{content:"\f158"}.uk-icon-won:before,.uk-icon-krw:before{content:"\f159"}.uk-icon-bitcoin:before,.uk-icon-btc:before{content:"\f15a"}.uk-icon-file:before{content:"\f15b"}.uk-icon-file-text:before{content:"\f15c"}.uk-icon-sort-alpha-asc:before{content:"\f15d"}.uk-icon-sort-alpha-desc:before{content:"\f15e"}.uk-icon-sort-amount-asc:before{content:"\f160"}.uk-icon-sort-amount-desc:before{content:"\f161"}.uk-icon-sort-numeric-asc:before{content:"\f162"}.uk-icon-sort-numeric-desc:before{content:"\f163"}.uk-icon-thumbs-up:before{content:"\f164"}.uk-icon-thumbs-down:before{content:"\f165"}.uk-icon-youtube-square:before{content:"\f166"}.uk-icon-youtube:before{content:"\f167"}.uk-icon-xing:before{content:"\f168"}.uk-icon-xing-square:before{content:"\f169"}.uk-icon-youtube-play:before{content:"\f16a"}.uk-icon-dropbox:before{content:"\f16b"}.uk-icon-stack-overflow:before{content:"\f16c"}.uk-icon-instagram:before{content:"\f16d"}.uk-icon-flickr:before{content:"\f16e"}.uk-icon-adn:before{content:"\f170"}.uk-icon-bitbucket:before{content:"\f171"}.uk-icon-bitbucket-square:before{content:"\f172"}.uk-icon-tumblr:before{content:"\f173"}.uk-icon-tumblr-square:before{content:"\f174"}.uk-icon-long-arrow-down:before{content:"\f175"}.uk-icon-long-arrow-up:before{content:"\f176"}.uk-icon-long-arrow-left:before{content:"\f177"}.uk-icon-long-arrow-right:before{content:"\f178"}.uk-icon-apple:before{content:"\f179"}.uk-icon-windows:before{content:"\f17a"}.uk-icon-android:before{content:"\f17b"}.uk-icon-linux:before{content:"\f17c"}.uk-icon-dribbble:before{content:"\f17d"}.uk-icon-skype:before{content:"\f17e"}.uk-icon-foursquare:before{content:"\f180"}.uk-icon-trello:before{content:"\f181"}.uk-icon-female:before{content:"\f182"}.uk-icon-male:before{content:"\f183"}.uk-icon-gittip:before{content:"\f184"}.uk-icon-sun-o:before{content:"\f185"}.uk-icon-moon-o:before{content:"\f186"}.uk-icon-archive:before{content:"\f187"}.uk-icon-bug:before{content:"\f188"}.uk-icon-vk:before{content:"\f189"}.uk-icon-weibo:before{content:"\f18a"}.uk-icon-renren:before{content:"\f18b"}.uk-icon-pagelines:before{content:"\f18c"}.uk-icon-stack-exchange:before{content:"\f18d"}.uk-icon-arrow-circle-o-right:before{content:"\f18e"}.uk-icon-arrow-circle-o-left:before{content:"\f190"}.uk-icon-toggle-left:before,.uk-icon-caret-square-o-left:before{content:"\f191"}.uk-icon-dot-circle-o:before{content:"\f192"}.uk-icon-wheelchair:before{content:"\f193"}.uk-icon-vimeo-square:before{content:"\f194"}.uk-icon-turkish-lira:before,.uk-icon-try:before{content:"\f195"}.uk-icon-plus-square-o:before{content:"\f196"}.uk-close{-moz-box-sizing:content-box;box-sizing:content-box;display:inline-block;width:20px;line-height:20px;text-align:center;color:inherit;opacity:.3;padding:0;border:0;-webkit-appearance:none;background:0 0}.uk-close:after{display:block;content:"\f00d";font-family:FontAwesome}.uk-close:hover,.uk-close:focus{opacity:.5;outline:0;color:inherit;text-decoration:none;cursor:pointer}.uk-close-alt{padding:2px;border-radius:50%;background:#eee;opacity:1}.uk-close-alt:hover,.uk-close-alt:focus{opacity:1}.uk-close-alt:after{opacity:.5}.uk-close-alt:hover:after,.uk-close-alt:focus:after{opacity:.8}.uk-badge{display:inline-block;padding:0 5px;background:#00a8e6;font-size:10px;font-weight:700;line-height:14px;color:#fff;text-align:center;vertical-align:middle;text-transform:none}.uk-badge-notification{-moz-box-sizing:border-box;box-sizing:border-box;min-width:18px;border-radius:500px;font-size:12px;line-height:18px}.uk-badge-success{background-color:#8cc14c}.uk-badge-warning{background-color:#faa732}.uk-badge-danger{background-color:#da314b}.uk-alert{margin-bottom:15px;padding:10px;background:#ebf7fd;color:#2d7091}*+.uk-alert{margin-top:15px}.uk-alert>:last-child{margin-bottom:0}.uk-alert h1,.uk-alert h2,.uk-alert h3,.uk-alert h4,.uk-alert h5,.uk-alert h6{color:inherit}.uk-alert>.uk-close:first-child{float:right}.uk-alert>.uk-close:first-child+*{margin-top:0}.uk-alert-success{background:#f2fae3;color:#659f13}.uk-alert-warning{background:#fffceb;color:#e28327}.uk-alert-danger{background:#fff1f0;color:#d85030}.uk-alert-large{padding:20px}.uk-alert-large>.uk-close:first-child{margin:-10px -10px 0 0}.uk-thumbnail{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;margin:0;padding:4px;border:1px solid #ddd;background:#fff}a.uk-thumbnail:hover,a.uk-thumbnail:focus{border-color:#aaa;background-color:#fff;text-decoration:none;outline:0}.uk-thumbnail-caption{padding-top:4px;text-align:center;color:#444}.uk-thumbnail-mini{width:150px}.uk-thumbnail-small{width:200px}.uk-thumbnail-medium{width:300px}.uk-thumbnail-large{width:400px}.uk-thumbnail-expand,.uk-thumbnail-expand>img{width:100%}.uk-overlay{display:inline-block;position:relative;max-width:100%;vertical-align:middle}.uk-overlay>img:first-child{display:block}.uk-overlay-area{position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.3);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0)}.uk-overlay:hover .uk-overlay-area,.uk-overlay-toggle:hover .uk-overlay-area{opacity:1}.uk-overlay-area:empty:before{content:"\f002";position:absolute;top:50%;left:50%;width:50px;height:50px;margin-top:-25px;margin-left:-25px;font-size:50px;line-height:1;font-family:FontAwesome;text-align:center;color:#fff}.uk-overlay-area:not(:empty){font-size:0}.uk-overlay-area:not(:empty):before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-overlay-area-content{display:inline-block;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;vertical-align:middle;font-size:1rem;text-align:center;padding:0 15px;color:#fff}.uk-overlay-area-content>:last-child{margin-bottom:0}.uk-overlay-area-content a:not([class]),.uk-overlay-area-content a:not([class]):hover{color:inherit}.uk-overlay-caption{position:absolute;bottom:0;left:0;right:0;padding:15px;background:rgba(0,0,0,.5);color:#fff;opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0)}.uk-overlay:hover .uk-overlay-caption,.uk-overlay-toggle:hover .uk-overlay-caption{opacity:1}.uk-progress{-moz-box-sizing:border-box;box-sizing:border-box;height:20px;margin-bottom:15px;background:#eee;overflow:hidden;line-height:20px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}[class*=uk-animation-]{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}[data-uk-scrollspy*=uk-animation-]{opacity:0}.uk-animation-fade{-webkit-animation-name:uk-fade;animation-name:uk-fade;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-timing-function:linear;animation-timing-function:linear}.uk-animation-scale-up{-webkit-animation-name:uk-scale-up;animation-name:uk-scale-up}.uk-animation-scale-down{-webkit-animation-name:uk-scale-down;animation-name:uk-scale-down}.uk-animation-slide-top{-webkit-animation-name:uk-slide-top;animation-name:uk-slide-top}.uk-animation-slide-bottom{-webkit-animation-name:uk-slide-bottom;animation-name:uk-slide-bottom}.uk-animation-slide-left{-webkit-animation-name:uk-slide-left;animation-name:uk-slide-left}.uk-animation-slide-right{-webkit-animation-name:uk-slide-right;animation-name:uk-slide-right}.uk-animation-shake{-webkit-animation-name:uk-shake;animation-name:uk-shake}.uk-animation-reverse{-webkit-animation-direction:reverse;animation-direction:reverse}@-webkit-keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes uk-scale-up{0%{opacity:0;-webkit-transform:scale(0.2)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-scale-up{0%{opacity:0;transform:scale(0.2)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-scale-down{0%{opacity:0;-webkit-transform:scale(1.8)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-scale-down{0%{opacity:0;transform:scale(1.8)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-slide-top{0%{opacity:0;-webkit-transform:translateY(-100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom{0%{opacity:0;-webkit-transform:translateY(100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-left{0%{opacity:0;-webkit-transform:translateX(-100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-slide-left{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-slide-right{0%{opacity:0;-webkit-transform:translateX(100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-slide-right{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-shake{0%,100%{-webkit-transform:translateX(0)}10%{-webkit-transform:translateX(-9px)}20%{-webkit-transform:translateX(8px)}30%{-webkit-transform:translateX(-7px)}40%{-webkit-transform:translateX(6px)}50%{-webkit-transform:translateX(-5px)}60%{-webkit-transform:translateX(4px)}70%{-webkit-transform:translateX(-3px)}80%{-webkit-transform:translateX(2px)}90%{-webkit-transform:translateX(-1px)}}@keyframes uk-shake{0%,100%{transform:translateX(0)}10%{transform:translateX(-9px)}20%{transform:translateX(8px)}30%{transform:translateX(-7px)}40%{transform:translateX(6px)}50%{transform:translateX(-5px)}60%{transform:translateX(4px)}70%{transform:translateX(-3px)}80%{transform:translateX(2px)}90%{transform:translateX(-1px)}}@-webkit-keyframes uk-slide-top-fixed{0%{opacity:0;-webkit-transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top-fixed{0%{opacity:0;transform:translateY(-10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom-fixed{0%{opacity:0;-webkit-transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom-fixed{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@keyframes uk-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.uk-dropdown{display:none;position:absolute;top:100%;left:0;z-index:1020;-moz-box-sizing:border-box;box-sizing:border-box;width:200px;margin-top:5px;padding:15px;background:#f5f5f5;color:#444;font-size:1rem;vertical-align:top}.uk-open>.uk-dropdown{display:block;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-dropdown-flip{left:auto;right:0}.uk-dropdown-up{top:auto;bottom:100%;margin-top:auto;margin-bottom:5px}.uk-dropdown .uk-nav{margin:0 -15px}.uk-dropdown>.uk-grid+.uk-grid{margin-top:15px}.uk-dropdown>.uk-grid>[class*=uk-width-]>.uk-panel+.uk-panel{margin-top:15px}@media (min-width:768px){.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid{margin-left:-15px;margin-right:-15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid>[class*=uk-width-]{padding-left:15px;padding-right:15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-grid>[class*=uk-width-]:nth-child(n+2){border-left:1px solid #ddd}.uk-dropdown-width-2:not(.uk-dropdown-stack){width:400px}.uk-dropdown-width-3:not(.uk-dropdown-stack){width:600px}.uk-dropdown-width-4:not(.uk-dropdown-stack){width:800px}.uk-dropdown-width-5:not(.uk-dropdown-stack){width:1000px}}@media (max-width:767px){.uk-dropdown>.uk-grid>[class*=uk-width-]{width:100%}.uk-dropdown>.uk-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}}.uk-dropdown-stack>.uk-grid>[class*=uk-width-]{width:100%}.uk-dropdown-stack>.uk-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}.uk-dropdown-small{min-width:150px;width:auto;padding:5px;white-space:nowrap}.uk-dropdown-small .uk-nav{margin:0 -5px}.uk-dropdown-navbar{margin-top:0;background:#f5f5f5;color:#444}.uk-open>.uk-dropdown-navbar{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1010;overflow-y:auto;-webkit-overflow-scrolling:touch;background:rgba(0,0,0,.6);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;-webkit-transform:translateZ(0)}.uk-modal.uk-open{opacity:1}.uk-modal-page,.uk-modal-page body{overflow:hidden}.uk-modal-dialog{position:relative;-moz-box-sizing:border-box;box-sizing:border-box;margin:50px auto;padding:20px;width:600px;max-width:100%;max-width:calc(100% - 20px);background:#fff;opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out}@media (max-width:767px){.uk-modal-dialog{width:auto;margin:10px}}.uk-open .uk-modal-dialog{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.uk-modal-dialog>:last-child{margin-bottom:0}.uk-modal-dialog>.uk-close:first-child{margin:-10px -10px 0 0;float:right}.uk-modal-dialog>.uk-close:first-child+*{margin-top:0}.uk-modal-dialog-frameless{padding:0}.uk-modal-dialog-frameless>.uk-close:first-child{position:absolute;top:-12px;right:-12px;margin:0;float:none}@media (max-width:767px){.uk-modal-dialog-frameless>.uk-close:first-child{top:-7px;right:-7px}}@media (min-width:768px){.uk-modal-dialog-large{width:930px}}@media (min-width:1220px){.uk-modal-dialog-large{width:1130px}}.uk-offcanvas{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:rgba(0,0,0,.1)}.uk-offcanvas.uk-active{display:block}.uk-offcanvas-page{position:fixed;-webkit-transition:margin-left .3s ease-in-out 50ms;transition:margin-left .3s ease-in-out 50ms}.uk-offcanvas-bar{position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%);z-index:1001;width:270px;max-width:100%;background:#333;overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}.uk-offcanvas.uk-active .uk-offcanvas-bar.uk-offcanvas-bar-show{-webkit-transform:translateX(0%);transform:translateX(0%)}.uk-offcanvas-bar-flip{left:auto;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas .uk-panel{margin:20px 15px;color:#777}.uk-offcanvas .uk-panel-title{color:#ccc}.uk-offcanvas .uk-panel a:not([class]){color:#ccc}.uk-offcanvas .uk-panel a:not([class]):hover{color:#fff}.uk-switcher{margin:0;padding:0;list-style:none}.uk-switcher>:not(.uk-active){display:none}.uk-tooltip{display:none;position:absolute;z-index:1030;-moz-box-sizing:border-box;box-sizing:border-box;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:12px;line-height:18px;text-align:center}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top:after,.uk-tooltip-top-left:after,.uk-tooltip-top-right:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom:after,.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-top:after,.uk-tooltip-bottom:after{left:50%;margin-left:-5px}.uk-tooltip-top-left:after,.uk-tooltip-bottom-left:after{left:10px}.uk-tooltip-top-right:after,.uk-tooltip-bottom-right:after{right:10px}.uk-tooltip-left:after{right:-5px;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent;border-left-color:#333}.uk-tooltip-right:after{left:-5px;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent;border-right-color:#333}.uk-text-small{font-size:11px;line-height:16px}.uk-text-large{font-size:18px;line-height:24px}.uk-text-bold{font-weight:700}.uk-text-muted{color:#999!important}.uk-text-primary{color:#2d7091!important}.uk-text-success{color:#659f13!important}.uk-text-warning{color:#e28327!important}.uk-text-danger{color:#d85030!important}.uk-text-left{text-align:left!important}.uk-text-right{text-align:right!important}.uk-text-center{text-align:center!important}.uk-text-justify{text-align:justify!important}.uk-text-top{vertical-align:top!important}.uk-text-middle{vertical-align:middle!important}.uk-text-bottom{vertical-align:bottom!important}@media (max-width:959px){.uk-text-center-medium{text-align:center!important}}@media (max-width:767px){.uk-text-center-small{text-align:center!important}}.uk-text-nowrap{white-space:nowrap}.uk-text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-text-break{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.uk-container{-moz-box-sizing:border-box;box-sizing:border-box;max-width:980px;padding:0 25px}@media (min-width:1220px){.uk-container{max-width:1200px;padding:0 35px}}.uk-container:before,.uk-container:after{content:" ";display:table}.uk-container:after{clear:both}.uk-container-center{margin-left:auto;margin-right:auto}.uk-clearfix:before,.uk-clearfix:after{content:" ";display:table}.uk-clearfix:after{clear:both}.uk-nbfc{overflow:hidden}.uk-nbfc-alt{display:table-cell;width:10000px}.uk-float-left{float:left}.uk-float-right{float:right}[class*=uk-float-]{max-width:100%}[class*=uk-align-]{display:block;margin-bottom:15px}.uk-align-left{margin-right:15px;float:left}.uk-align-right{margin-left:15px;float:right}@media (min-width:768px){.uk-align-medium-left{margin-right:15px;margin-bottom:15px;float:left}.uk-align-medium-right{margin-left:15px;margin-bottom:15px;float:right}}.uk-align-center{margin-left:auto;margin-right:auto}.uk-vertical-align{font-size:0}.uk-vertical-align:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-vertical-align-middle,.uk-vertical-align-bottom{display:inline-block;max-width:100%;font-size:1rem}.uk-vertical-align-middle{vertical-align:middle}.uk-vertical-align-bottom{vertical-align:bottom}.uk-height-1-1{height:100%}.uk-responsive-width,.uk-responsive-height{-moz-box-sizing:border-box;box-sizing:border-box}.uk-responsive-width{max-width:100%;height:auto}.uk-responsive-height{max-height:100%;width:auto}.uk-margin{margin-bottom:15px}*+.uk-margin{margin-top:15px}.uk-margin-top{margin-top:15px!important}.uk-margin-bottom{margin-bottom:15px!important}.uk-margin-left{margin-left:15px!important}.uk-margin-right{margin-right:15px!important}.uk-margin-large{margin-bottom:50px}*+.uk-margin-large{margin-top:50px}.uk-margin-large-top{margin-top:50px!important}.uk-margin-large-bottom{margin-bottom:50px!important}.uk-margin-large-left{margin-left:50px!important}.uk-margin-large-right{margin-right:50px!important}.uk-margin-small{margin-bottom:5px}*+.uk-margin-small{margin-top:5px}.uk-margin-small-top{margin-top:5px!important}.uk-margin-small-bottom{margin-bottom:5px!important}.uk-margin-small-left{margin-left:5px!important}.uk-margin-small-right{margin-right:5px!important}.uk-margin-remove{margin:0!important}.uk-margin-top-remove{margin-top:0!important}.uk-margin-bottom-remove{margin-bottom:0!important}.uk-border-circle{border-radius:50%}.uk-border-rounded{border-radius:5px}@media (min-width:768px){.uk-heading-large{font-size:52px;line-height:64px}}.uk-link-muted,.uk-link-muted a{color:#444}.uk-link-muted:hover,.uk-link-muted a:hover{color:#444}.uk-link-reset,.uk-link-reset a,.uk-link-reset:hover,.uk-link-reset a:hover{color:inherit;text-decoration:none}.uk-scrollable-text{height:300px;overflow-y:scroll;-webkit-overflow-scrolling:touch;resize:both}.uk-scrollable-box{-moz-box-sizing:border-box;box-sizing:border-box;height:170px;padding:10px;border:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch;resize:both}.uk-scrollable-box>:last-child{margin-bottom:0}.uk-overflow-container{overflow:auto;-webkit-overflow-scrolling:touch}.uk-overflow-container>:last-child{margin-bottom:0}.uk-display-block{display:block!important}.uk-display-inline{display:inline!important}.uk-display-inline-block{display:inline-block!important}@media (min-width:960px){.uk-visible-small{display:none!important}.uk-visible-medium{display:none!important}.uk-hidden-large{display:none!important}}@media (min-width:768px) and (max-width:959px){.uk-visible-small{display:none!important}.uk-visible-large{display:none!important}.uk-hidden-medium{display:none!important}}@media (max-width:767px){.uk-visible-medium{display:none!important}.uk-visible-large{display:none!important}.uk-hidden-small{display:none!important}}.uk-hidden{display:none!important;visibility:hidden!important}.uk-invisible{visibility:hidden!important}.uk-visible-hover:hover .uk-hidden,.uk-visible-hover:hover .uk-invisible{display:block!important;visibility:visible!important}.uk-visible-hover-inline:hover .uk-hidden,.uk-visible-hover-inline:hover .uk-invisible{display:inline-block!important;visibility:visible!important}@media print{*{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}} \ No newline at end of file diff --git a/www/static/fonts/FontAwesome.otf b/www/static/fonts/FontAwesome.otf new file mode 100755 index 0000000..8b0f54e Binary files /dev/null and b/www/static/fonts/FontAwesome.otf differ diff --git a/www/static/fonts/fontawesome-webfont.eot b/www/static/fonts/fontawesome-webfont.eot new file mode 100755 index 0000000..7c79c6a Binary files /dev/null and b/www/static/fonts/fontawesome-webfont.eot differ diff --git a/www/static/fonts/fontawesome-webfont.ttf b/www/static/fonts/fontawesome-webfont.ttf new file mode 100755 index 0000000..e89738d Binary files /dev/null and b/www/static/fonts/fontawesome-webfont.ttf differ diff --git a/www/static/fonts/fontawesome-webfont.woff b/www/static/fonts/fontawesome-webfont.woff new file mode 100755 index 0000000..8c1748a Binary files /dev/null and b/www/static/fonts/fontawesome-webfont.woff differ diff --git a/www/static/js/awesome.js b/www/static/js/awesome.js new file mode 100644 index 0000000..400342a --- /dev/null +++ b/www/static/js/awesome.js @@ -0,0 +1,189 @@ +// awesome.js + +function showError(err) { + var alert = $('div.uk-alert-danger'); + if (err) { + alert.text(err.message || err.error || err).removeClass('uk-hidden').show(); + try { + if (alert.offset().top < ($(window).scrollTop() - 41)) { + $('html,body').animate({scrollTop: alert.offset().top - 41}); + } + } + catch (e) {} + } + else { + alert.addClass('uk-hidden').hide().text(''); + } +} + +function _ajax(method, url, data, callback) { + $.ajax({ + type: method, + url: url, + data: data, + dataType: 'json' + }).done(function(r) { + if (r && r.error) { + return callback && callback(r); + } + return callback && callback(null, r); + }).fail(function(jqXHR, textStatus) { + return callback && callback({error: 'HTTP ' + jqXHR.status, message: 'Network error (HTTP ' + jqXHR.status + ')'}); + }); +} + +function getApi(url, data, callback) { + if (arguments.length === 2) { + callback = data; + data = {}; + } + _ajax('GET', url, data, callback); +} + +function postApi(url, data, callback) { + if (arguments.length === 2) { + callback = data; + data = {}; + } + _ajax('POST', url, data, callback); +} + +function startLoading() { + var btn = $('form').find('button[type=submit]'); + var icon = btn.find('i'); + icon.addClass('uk-icon-spinner').addClass('uk-icon-spin'); + btn.attr('disabled', 'disabled'); +} + +function stopLoading() { + var btn = $('form').find('button[type=submit]'); + var icon = btn.find('i'); + icon.removeClass('uk-icon-spin').removeClass('uk-icon-spinner'); + btn.removeAttr('disabled'); +} + +// add to prototype: + +if (! String.prototype.trim) { + String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ''); + }; +} + +if (! Number.prototype.toDateTime) { + var replaces = { + 'yyyy': function(dt) { + return dt.getFullYear().toString(); + }, + 'yy': function(dt) { + return (dt.getFullYear() % 100).toString(); + }, + 'MM': function(dt) { + var m = dt.getMonth() + 1; + return m < 10 ? '0' + m : m.toString(); + }, + 'M': function(dt) { + var m = dt.getMonth() + 1; + return m.toString(); + }, + 'dd': function(dt) { + var d = dt.getDate(); + return d < 10 ? '0' + d : d.toString(); + }, + 'd': function(dt) { + var d = dt.getDate(); + return d.toString(); + }, + 'hh': function(dt) { + var h = dt.getHours(); + return h < 10 ? '0' + h : h.toString(); + }, + 'h': function(dt) { + var h = dt.getHours(); + return h.toString(); + }, + 'mm': function(dt) { + var m = dt.getMinutes(); + return m < 10 ? '0' + m : m.toString(); + }, + 'm': function(dt) { + var m = dt.getMinutes(); + return m.toString(); + }, + 'ss': function(dt) { + var s = dt.getSeconds(); + return s < 10 ? '0' + s : s.toString(); + }, + 's': function(dt) { + var s = dt.getSeconds(); + return s.toString(); + }, + 'a': function(dt) { + var h = dt.getHours(); + return h < 12 ? 'AM' : 'PM'; + } + }; + var token = /([a-zA-Z]+)/; + Number.prototype.toDateTime = function(format) { + var fmt = format || 'yyyy-MM-dd hh:mm' + var dt = new Date(this * 1000); + var arr = fmt.split(token); + for (var i=0; i<arr.length; i++) { + var s = arr[i]; + if (s && s in replaces) { + arr[i] = replaces[s](dt); + } + } + return arr.join(''); + }; +} + +function gotoPage(index) { + if (index) { + var search = location.search; + var hasPageParam = search.search(/page\=\d+\&?/)!==(-1); + if (hasPageParam) { + search = search.replace(/page\=\d+\&?/g, ''); + } + search = (search==='' || search==='?') ? ('?page=' + index) : (search + '&page=' + index); + location.assign(search); + } +} + +function showConfirm(title, text, fn_ok, fn_cancel) { + var s = '<div id="div-confirm" class="uk-modal">' + + '<div class="uk-modal-dialog">' + + '<a href="#0" class="uk-modal-close uk-close"></a>' + + '<h1 class="x-title"></h1>' + + '<p class="x-text"></p>' + + '<hr><p class="uk-text-center">' + + '<button class="uk-button uk-button-primary x-ok"><i class="uk-icon-check"></i> 是</button>' + + '   ' + + '<button class="uk-button x-cancel"><i class="uk-icon-times"></i> 否</button>' + + '</p></div></div>'; + $('body').append(s); + var m = $('#div-confirm'); + var modal = new $.UIkit.modal.Modal('#div-confirm'); + m.find('.x-title').text(title); + m.find('.x-text').text(text); + m.find('.x-ok').click(function () { + modal.hide(); + fn_ok && fn_ok(); + }); + m.find('.x-cancel').click(function () { + modal.hide(); + fn_cancel && fn_cancel(); + }); + m.on({ + 'uk.modal.hide': function() { + $('#div-confirm').remove(); + } + }); + modal.show(); +} + +$(function() { + if (location.pathname === '/' || location.pathname.indexOf('/blog')===0) { + $('li[data-url=blogs]').addClass('uk-active'); + } +}); diff --git a/www/static/js/html5.js b/www/static/js/html5.js new file mode 100644 index 0000000..2053aeb --- /dev/null +++ b/www/static/js/html5.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=s.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=r[a[p]];return b||(b={},q++,a[p]=q,r[q]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():o.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||n.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)f.createElement(h[g]);return f}function h(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?f(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function i(a){a||(a=b);var d=e(a);return!s.shivCSS||j||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||h(a,d),a}var j,k,l="3.7.0",m=a.html5||{},n=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,o=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,p="_html5shiv",q=0,r={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){j=!0,k=!0}}();var s={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:l,shivCSS:m.shivCSS!==!1,supportsUnknownElements:k,shivMethods:m.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=s,i(b)}(this,document); \ No newline at end of file diff --git a/www/static/js/jquery.min.js b/www/static/js/jquery.min.js new file mode 100644 index 0000000..ed80bfb --- /dev/null +++ b/www/static/js/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.10.1 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +*/ +(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.1",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=lt(),k=lt(),E=lt(),S=!1,A=function(){return 0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=bt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+xt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return At(e.replace(z,"$1"),t,n,i)}function st(e){return K.test(e+"")}function lt(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function ut(e){return e[b]=!0,e}function ct(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function pt(e,t,n){e=e.split("|");var r,i=e.length,a=n?null:t;while(i--)(r=o.attrHandle[e[i]])&&r!==t||(o.attrHandle[e[i]]=a)}function ft(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:e[t]===!0?t.toLowerCase():null}function dt(e,t){return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function ht(e){return"input"===e.nodeName.toLowerCase()?e.defaultValue:t}function gt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function mt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function yt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function vt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.parentWindow;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.frameElement&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ct(function(e){return e.innerHTML="<a href='#'></a>",pt("type|href|height|width",dt,"#"===e.firstChild.getAttribute("href")),pt(B,ft,null==e.getAttribute("disabled")),e.className="i",!e.getAttribute("className")}),r.input=ct(function(e){return e.innerHTML="<input>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}),pt("value",ht,r.attributes&&r.input),r.getElementsByTagName=ct(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ct(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ct(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=st(n.querySelectorAll))&&(ct(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ct(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=st(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ct(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=st(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},r.sortDetached=ct(function(e){return 1&e.compareDocumentPosition(n.createElement("div"))}),A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return gt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?gt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:ut,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=bt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?ut(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ut(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?ut(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ut(function(e){return function(t){return at(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:ut(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:vt(function(){return[0]}),last:vt(function(e,t){return[t-1]}),eq:vt(function(e,t,n){return[0>n?n+t:n]}),even:vt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:vt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:vt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:vt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=mt(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=yt(n);function bt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function xt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function wt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function Tt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ct(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function Nt(e,t,n,r,i,o){return r&&!r[b]&&(r=Nt(r)),i&&!i[b]&&(i=Nt(i,o)),ut(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||St(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:Ct(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=Ct(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=Ct(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function kt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=wt(function(e){return e===t},s,!0),p=wt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[wt(Tt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return Nt(l>1&&Tt(f),l>1&&xt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&kt(e.slice(l,r)),i>r&&kt(e=e.slice(r)),i>r&&xt(e))}f.push(n)}return Tt(f)}function Et(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=Ct(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?ut(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=bt(e)),n=t.length;while(n--)o=kt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Et(i,r))}return o};function St(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function At(e,t,n,i){var a,s,u,c,p,f=bt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&xt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}o.pseudos.nth=o.pseudos.eq;function jt(){}jt.prototype=o.filters=o.pseudos,o.setFilters=new jt,r.sortStable=b.split("").sort(A).join("")===b,p(),[0,0].sort(A),r.detectDuplicates=S,x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!u||(n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null) +}),n=s=l=u=r=o=null,t}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=x(this),l=t,u=e.match(T)||[];while(o=u[a++])l=r?l:!s.hasClass(o),s[l?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); +u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window); diff --git a/www/static/js/md5.js b/www/static/js/md5.js new file mode 100644 index 0000000..0fae5ca --- /dev/null +++ b/www/static/js/md5.js @@ -0,0 +1,19 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(s,p){var m={},l=m.lib={},n=function(){},r=l.Base={extend:function(b){n.prototype=this;var h=new n;b&&h.mixIn(b);h.hasOwnProperty("init")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var h in b)b.hasOwnProperty(h)&&(this[h]=b[h]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=l.WordArray=r.extend({init:function(b,h){b=this.words=b||[];this.sigBytes=h!=p?h:4*b.length},toString:function(b){return(b||t).stringify(this)},concat:function(b){var h=this.words,a=b.words,j=this.sigBytes;b=b.sigBytes;this.clamp();if(j%4)for(var g=0;g<b;g++)h[j+g>>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535<a.length)for(g=0;g<b;g+=4)h[j+g>>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<< +32-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a<b;a+=4)h.push(4294967296*s.random()|0);return new q.init(h,b)}}),v=m.enc={},t=v.Hex={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j<b;j++){var k=a[j>>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j<a;j+=2)g[j>>>3]|=parseInt(b.substr(j, +2),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j<b;j++)g.push(String.fromCharCode(a[j>>>2]>>>24-8*(j%4)&255));return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j<a;j++)g[j>>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l<b;l+=k)this._doProcessBlock(g,l);l=g.splice(0,b);a.sigBytes-=j}return new q.init(l,j)},clone:function(){var b=r.clone.call(this); +b._data=this._data.clone();return b},_minBufferSize:0});l.Hasher=g.extend({cfg:r.extend(),init:function(b){this.cfg=this.cfg.extend(b);this.reset()},reset:function(){g.reset.call(this);this._doReset()},update:function(b){this._append(b);this._process();return this},finalize:function(b){b&&this._append(b);return this._doFinalize()},blockSize:16,_createHelper:function(b){return function(a,g){return(new b.init(g)).finalize(a)}},_createHmacHelper:function(b){return function(a,g){return(new k.HMAC.init(b, +g)).finalize(a)}}});var k=m.algo={};return m}(Math); +(function(s){function p(a,k,b,h,l,j,m){a=a+(k&b|~k&h)+l+m;return(a<<j|a>>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<<j|a>>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<<j|a>>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<<j|a>>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]), +c=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c, +d,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d, +C,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/ +4294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math); diff --git a/www/static/js/sticky.min.js b/www/static/js/sticky.min.js new file mode 100755 index 0000000..7cb1a7d --- /dev/null +++ b/www/static/js/sticky.min.js @@ -0,0 +1,3 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +!function(a){"function"==typeof define&&define.amd&&define("uikit-sticky",["uikit"],function(){return jQuery.fn.uksticky||a(window,window.jQuery,window.jQuery.UIkit)}),window&&window.jQuery&&window.jQuery.UIkit&&a(window,window.jQuery,window.jQuery.UIkit)}(function(a,b,c){var d={top:0,bottom:0,clsactive:"uk-active",clswrapper:"uk-sticky",getWidthFrom:""},e=b(window),f=b(document),g=[],h=e.height(),i=function(){for(var a=e.scrollTop(),c=f.height(),d=c-h,i=a>d?d-a:0,j=0;j<g.length;j++)if(g[j].stickyElement.is(":visible")){var k=g[j],l=k.stickyWrapper.offset().top,m=l-k.top-i;if(m>=a)null!==k.currentTop&&(k.stickyElement.css({position:"",top:"",width:""}).parent().removeClass(k.clsactive),k.currentTop=null);else{var n=c-k.stickyElement.outerHeight()-k.top-k.bottom-a-i;n=0>n?n+k.top:k.top,k.currentTop!=n&&(k.stickyElement.css({position:"fixed",top:n,width:k.stickyElement.width()}),"undefined"!=typeof k.getWidthFrom&&k.stickyElement.css("width",b(k.getWidthFrom).width()),k.stickyElement.parent().addClass(k.clsactive),k.currentTop=n)}}},j=function(){h=e.height()},k={init:function(a){var c=b.extend({},d,a);return this.each(function(){var a=b(this);if(!a.data("sticky")){var d=a.attr("id")||"s"+Math.ceil(1e4*Math.random()),e=b("<div></div>").attr("id","sticky-"+d).addClass(c.clswrapper);a.wrapAll(e),"right"==a.css("float")&&a.css({"float":"none"}).parent().css({"float":"right"}),a.data("sticky",!0);var f=a.parent();f.css("height",a.outerHeight()),g.push({top:c.top,bottom:c.bottom,stickyElement:a,currentTop:null,stickyWrapper:f,clsactive:c.clsactive,getWidthFrom:c.getWidthFrom})}})},update:i};return window.addEventListener("scroll",i,!1),window.addEventListener("resize",j,!1),b.fn.uksticky=function(a){return k[a]?k[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?void b.error("Method "+a+" does not exist on jQuery.sticky"):k.init.apply(this,arguments)},b(document).on("uk-domready",function(){setTimeout(function(){i(),b("[data-uk-sticky]").each(function(){var a=b(this);a.data("sticky")||a.uksticky(c.Utils.options(a.attr("data-uk-sticky")))})},0)}),b.fn.uksticky}); \ No newline at end of file diff --git a/www/static/js/uikit.min.js b/www/static/js/uikit.min.js new file mode 100755 index 0000000..f487008 --- /dev/null +++ b/www/static/js/uikit.min.js @@ -0,0 +1,4 @@ +/*! UIkit 2.6.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ + +!function(a){if("function"==typeof define&&define.amd&&define("uikit",function(){var b=a(window,window.jQuery,window.document);return b.load=function(a,c,d,e){var f,g=a.split(","),h=[],i=(e.config&&e.config.uikit&&e.config.uikit.base?e.config.uikit.base:"").replace(/\/+$/g,"");if(!i)throw new Error("Please define base path to uikit in the requirejs config.");for(f=0;f<g.length;f+=1){var j=g[f].replace(/\./g,"/");h.push(i+"/js/addons/"+j)}c(h,function(){d(b)})},b}),!window.jQuery)throw new Error("UIkit requires jQuery");window&&window.jQuery&&a(window,window.jQuery,window.document)}(function(a,b,c){"use strict";var d=b.UIkit||{},e=b("html"),f=b(window);return d.fn?d:(d.version="2.6.0",d.fn=function(a,c){var e=arguments,f=a.match(/^([a-z\-]+)(?:\.([a-z]+))?/i),g=f[1],h=f[2];return d[g]?this.each(function(){var a=b(this),f=a.data(g);f||a.data(g,f=new d[g](this,h?void 0:c)),h&&f[h].apply(f,Array.prototype.slice.call(e,1))}):(b.error("UIkit component ["+g+"] does not exist."),this)},d.support={},d.support.transition=function(){var a=function(){var a,b=c.body||c.documentElement,d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in d)if(void 0!==b.style[a])return d[a]}();return a&&{end:a}}(),d.support.animation=function(){var a=function(){var a,b=c.body||c.documentElement,d={WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(a in d)if(void 0!==b.style[a])return d[a]}();return a&&{end:a}}(),d.support.requestAnimationFrame=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.msRequestAnimationFrame||a.oRequestAnimationFrame||function(b){a.setTimeout(b,1e3/60)},d.support.touch="ontouchstart"in window&&navigator.userAgent.toLowerCase().match(/mobile|tablet/)||a.DocumentTouch&&document instanceof a.DocumentTouch||a.navigator.msPointerEnabled&&a.navigator.msMaxTouchPoints>0||a.navigator.pointerEnabled&&a.navigator.maxTouchPoints>0||!1,d.support.mutationobserver=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver||null,d.Utils={},d.Utils.debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},d.Utils.removeCssRules=function(a){var b,c,d,e,f,g,h,i,j,k;a&&setTimeout(function(){try{for(k=document.styleSheets,e=0,h=k.length;h>e;e++){for(d=k[e],c=[],d.cssRules=d.cssRules,b=f=0,i=d.cssRules.length;i>f;b=++f)d.cssRules[b].type===CSSRule.STYLE_RULE&&a.test(d.cssRules[b].selectorText)&&c.unshift(b);for(g=0,j=c.length;j>g;g++)d.deleteRule(c[g])}}catch(l){}},0)},d.Utils.isInView=function(a,c){var d=b(a);if(!d.is(":visible"))return!1;var e=f.scrollLeft(),g=f.scrollTop(),h=d.offset(),i=h.left,j=h.top;return c=b.extend({topoffset:0,leftoffset:0},c),j+d.height()>=g&&j-c.topoffset<=g+f.height()&&i+d.width()>=e&&i-c.leftoffset<=e+f.width()?!0:!1},d.Utils.options=function(a){if(b.isPlainObject(a))return a;var c=a?a.indexOf("{"):-1,d={};if(-1!=c)try{d=new Function("","var json = "+a.substr(c)+"; return JSON.parse(JSON.stringify(json));")()}catch(e){}return d},d.Utils.template=function(a,b){for(var c,d,e,f,g=a.replace(/\n/g,"\\n").replace(/\{\{\{\s*(.+?)\s*\}\}\}/g,"{{!$1}}").split(/(\{\{\s*(.+?)\s*\}\})/g),h=0,i=[],j=0;h<g.length;){if(c=g[h],c.match(/\{\{\s*(.+?)\s*\}\}/))switch(h+=1,c=g[h],d=c[0],e=c.substring(c.match(/^(\^|\#|\!|\~|\:)/)?1:0),d){case"~":i.push("for(var $i=0;$i<"+e+".length;$i++) { var $item = "+e+"[$i];"),j++;break;case":":i.push("for(var $key in "+e+") { var $val = "+e+"[$key];"),j++;break;case"#":i.push("if("+e+") {"),j++;break;case"^":i.push("if(!"+e+") {"),j++;break;case"/":i.push("}"),j--;break;case"!":i.push("__ret.push("+e+");");break;default:i.push("__ret.push(escape("+e+"));")}else i.push("__ret.push('"+c.replace(/\'/g,"\\'")+"');");h+=1}f=["var __ret = [];","try {","with($data){",j?'__ret = ["Not all blocks are closed correctly."]':i.join(""),"};","}catch(e){__ret = [e.message];}",'return __ret.join("").replace(/\\n\\n/g, "\\n");',"function escape(html) { return String(html).replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');}"].join("\n");var k=new Function("$data",f);return b?k(b):k},d.Utils.events={},d.Utils.events.click=d.support.touch?"tap":"click",b.UIkit=d,b.fn.uk=d.fn,b.UIkit.langdirection="rtl"==e.attr("dir")?"right":"left",b(function(){if(b(document).trigger("uk-domready"),d.support.mutationobserver){try{var a=new d.support.mutationobserver(d.Utils.debounce(function(){b(document).trigger("uk-domready")},300));a.observe(document.body,{childList:!0,subtree:!0})}catch(c){}d.support.touch&&d.Utils.removeCssRules(/\.uk-(?!navbar).*:hover/)}}),e.addClass(d.support.touch?"uk-touch":"uk-notouch"),d)}),function(a,b){"use strict";var c=a(window),d="resize orientationchange",e=[],f=function(g,h){var i=this,j=a(g);j.data("stackMargin")||(this.element=j,this.columns=this.element.children(),this.options=a.extend({},f.defaults,h),this.columns.length&&(c.on(d,function(){var d=function(){i.process()};return a(function(){d(),c.on("load",d)}),b.Utils.debounce(d,150)}()),a(document).on("uk-domready",function(){i.columns=i.element.children(),i.process()}),this.element.data("stackMargin",this),e.push(this)))};a.extend(f.prototype,{process:function(){var b=this;this.revert();var c=!1,d=this.columns.filter(":visible:first"),e=d.length?d.offset().top:!1;if(e!==!1)return this.columns.each(function(){var d=a(this);d.is(":visible")&&(c?d.addClass(b.options.cls):d.offset().top!=e&&(d.addClass(b.options.cls),c=!0))}),this},revert:function(){return this.columns.removeClass(this.options.cls),this}}),f.defaults={cls:"uk-margin-small-top"},b.stackMargin=f,a(document).on("uk-domready",function(){a("[data-uk-margin]").each(function(){var c,d=a(this);d.data("stackMargin")||(c=new f(d,b.Utils.options(d.attr("data-uk-margin"))))})}),a(document).on("uk-check-display",function(){e.forEach(function(a){a.element.is(":visible")&&a.process()})})}(jQuery,jQuery.UIkit),function(a){function b(a,b,c,d){return Math.abs(a-b)>=Math.abs(c-d)?a-b>0?"Left":"Right":c-d>0?"Up":"Down"}function c(){j=null,l.last&&(l.el.trigger("longTap"),l={})}function d(){j&&clearTimeout(j),j=null}function e(){g&&clearTimeout(g),h&&clearTimeout(h),i&&clearTimeout(i),j&&clearTimeout(j),g=h=i=j=null,l={}}function f(a){return a.pointerType==a.MSPOINTER_TYPE_TOUCH&&a.isPrimary}var g,h,i,j,k,l={},m=750;a(function(){var n,o,p,q=0,r=0;"MSGesture"in window&&(k=new MSGesture,k.target=document.body),a(document).bind("MSGestureEnd",function(a){var b=a.originalEvent.velocityX>1?"Right":a.originalEvent.velocityX<-1?"Left":a.originalEvent.velocityY>1?"Down":a.originalEvent.velocityY<-1?"Up":null;b&&(l.el.trigger("swipe"),l.el.trigger("swipe"+b))}).on("touchstart MSPointerDown",function(b){("MSPointerDown"!=b.type||f(b.originalEvent))&&(p="MSPointerDown"==b.type?b:b.originalEvent.touches[0],n=Date.now(),o=n-(l.last||n),l.el=a("tagName"in p.target?p.target:p.target.parentNode),g&&clearTimeout(g),l.x1=p.pageX,l.y1=p.pageY,o>0&&250>=o&&(l.isDoubleTap=!0),l.last=n,j=setTimeout(c,m),k&&"MSPointerDown"==b.type&&k.addPointer(b.originalEvent.pointerId))}).on("touchmove MSPointerMove",function(a){("MSPointerMove"!=a.type||f(a.originalEvent))&&(p="MSPointerMove"==a.type?a:a.originalEvent.touches[0],d(),l.x2=p.pageX,l.y2=p.pageY,q+=Math.abs(l.x1-l.x2),r+=Math.abs(l.y1-l.y2))}).on("touchend MSPointerUp",function(c){("MSPointerUp"!=c.type||f(c.originalEvent))&&(d(),l.x2&&Math.abs(l.x1-l.x2)>30||l.y2&&Math.abs(l.y1-l.y2)>30?i=setTimeout(function(){l.el.trigger("swipe"),l.el.trigger("swipe"+b(l.x1,l.x2,l.y1,l.y2)),l={}},0):"last"in l&&(isNaN(q)||30>q&&30>r?h=setTimeout(function(){var b=a.Event("tap");b.cancelTouch=e,l.el.trigger(b),l.isDoubleTap?(l.el.trigger("doubleTap"),l={}):g=setTimeout(function(){g=null,l.el.trigger("singleTap"),l={}},250)},0):l={},q=r=0))}).on("touchcancel MSPointerCancel",e),a(window).on("scroll",e)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(b){a.fn[b]=function(c){return a(this).on(b,c)}})}(jQuery),function(a,b){"use strict";var c=function(b,d){var e=this;this.options=a.extend({},c.defaults,d),this.element=a(b),this.element.data("alert")||(this.element.on("click",this.options.trigger,function(a){a.preventDefault(),e.close()}),this.element.data("alert",this))};a.extend(c.prototype,{close:function(){function a(){b.trigger("closed").remove()}var b=this.element.trigger("close");this.options.fade?b.css("overflow","hidden").css("max-height",b.height()).animate({height:0,opacity:0,"padding-top":0,"padding-bottom":0,"margin-top":0,"margin-bottom":0},this.options.duration,a):a()}}),c.defaults={fade:!0,duration:200,trigger:".uk-alert-close"},b.alert=c,a(document).on("click.alert.uikit","[data-uk-alert]",function(d){var e=a(this);if(!e.data("alert")){var f=new c(e,b.Utils.options(e.data("uk-alert")));a(d.target).is(e.data("alert").options.trigger)&&(d.preventDefault(),f.close())}})}(jQuery,jQuery.UIkit),function(a,b){"use strict";var c=function(b,d){var e=this,f=a(b);f.data("buttonRadio")||(this.options=a.extend({},c.defaults,d),this.element=f.on("click",this.options.target,function(b){b.preventDefault(),f.find(e.options.target).not(this).removeClass("uk-active").blur(),f.trigger("change",[a(this).addClass("uk-active")])}),this.element.data("buttonRadio",this))};a.extend(c.prototype,{getSelected:function(){this.element.find(".uk-active")}}),c.defaults={target:".uk-button"};var d=function(b,c){var e=a(b);e.data("buttonCheckbox")||(this.options=a.extend({},d.defaults,c),this.element=e.on("click",this.options.target,function(b){b.preventDefault(),e.trigger("change",[a(this).toggleClass("uk-active").blur()])}),this.element.data("buttonCheckbox",this))};a.extend(d.prototype,{getSelected:function(){this.element.find(".uk-active")}}),d.defaults={target:".uk-button"};var e=function(b,c){var d=this,f=a(b);f.data("button")||(this.options=a.extend({},e.defaults,c),this.element=f.on("click",function(a){a.preventDefault(),d.toggle(),f.trigger("change",[f.blur().hasClass("uk-active")])}),this.element.data("button",this))};a.extend(e.prototype,{options:{},toggle:function(){this.element.toggleClass("uk-active")}}),e.defaults={},b.button=e,b.buttonCheckbox=d,b.buttonRadio=c,a(document).on("click.buttonradio.uikit","[data-uk-button-radio]",function(d){var e=a(this);if(!e.data("buttonRadio")){var f=new c(e,b.Utils.options(e.attr("data-uk-button-radio")));a(d.target).is(f.options.target)&&a(d.target).trigger("click")}}),a(document).on("click.buttoncheckbox.uikit","[data-uk-button-checkbox]",function(c){var e=a(this);if(!e.data("buttonCheckbox")){var f=new d(e,b.Utils.options(e.attr("data-uk-button-checkbox")));a(c.target).is(f.options.target)&&a(c.target).trigger("click")}}),a(document).on("click.button.uikit","[data-uk-button]",function(){var b=a(this);if(!b.data("button")){{new e(b,b.attr("data-uk-button"))}b.trigger("click")}})}(jQuery,jQuery.UIkit),function(a,b){"use strict";var c=!1,d=function(e,f){var g=this,h=a(e);h.data("dropdown")||(this.options=a.extend({},d.defaults,f),this.element=h,this.dropdown=this.element.find(".uk-dropdown"),this.centered=this.dropdown.hasClass("uk-dropdown-center"),this.justified=this.options.justify?a(this.options.justify):!1,this.boundary=a(this.options.boundary),this.boundary.length||(this.boundary=a(window)),"click"==this.options.mode||b.support.touch?this.element.on("click",function(b){var d=a(b.target);d.parents(".uk-dropdown").length||((d.is("a[href='#']")||d.parent().is("a[href='#']"))&&b.preventDefault(),d.blur()),g.element.hasClass("uk-open")?(d.is("a")||!g.element.find(".uk-dropdown").find(b.target).length)&&(g.element.removeClass("uk-open"),c=!1):g.show()}):this.element.on("mouseenter",function(){g.remainIdle&&clearTimeout(g.remainIdle),g.show()}).on("mouseleave",function(){g.remainIdle=setTimeout(function(){g.element.removeClass("uk-open"),g.remainIdle=!1,c&&c[0]==g.element[0]&&(c=!1)},g.options.remaintime)}).on("click",function(b){var c=a(b.target);g.remainIdle&&clearTimeout(g.remainIdle),(c.is("a[href='#']")||c.parent().is("a[href='#']"))&&b.preventDefault(),g.show()}),this.element.data("dropdown",this))};a.extend(d.prototype,{remainIdle:!1,show:function(){c&&c[0]!=this.element[0]&&c.removeClass("uk-open"),this.checkDimensions(),this.element.addClass("uk-open"),c=this.element,this.registerOuterClick()},registerOuterClick:function(){var b=this;a(document).off("click.outer.dropdown"),setTimeout(function(){a(document).on("click.outer.dropdown",function(d){!c||c[0]!=b.element[0]||!a(d.target).is("a")&&b.element.find(".uk-dropdown").find(d.target).length||(c.removeClass("uk-open"),a(document).off("click.outer.dropdown"))})},10)},checkDimensions:function(){if(this.dropdown.length){var b=this.dropdown.css("margin-"+a.UIkit.langdirection,"").css("min-width",""),c=b.show().offset(),d=b.outerWidth(),e=this.boundary.width(),f=this.boundary.offset()?this.boundary.offset().left:0;if(this.centered&&(b.css("margin-"+a.UIkit.langdirection,-1*(parseFloat(d)/2-b.parent().width()/2)),c=b.offset(),(d+c.left>e||c.left<0)&&(b.css("margin-"+a.UIkit.langdirection,""),c=b.offset())),this.justified&&this.justified.length){var g=this.justified.outerWidth();if(b.css("min-width",g),"right"==a.UIkit.langdirection){var h=e-(this.justified.offset().left+g),i=e-(b.offset().left+b.outerWidth());b.css("margin-right",h-i)}else b.css("margin-left",this.justified.offset().left-c.left);c=b.offset()}d+(c.left-f)>e&&(b.addClass("uk-dropdown-flip"),c=b.offset()),c.left<0&&b.addClass("uk-dropdown-stack"),b.css("display","")}}}),d.defaults={mode:"hover",remaintime:800,justify:!1,boundary:a(window)},b.dropdown=d;var e=b.support.touch?"click":"mouseenter";a(document).on(e+".dropdown.uikit","[data-uk-dropdown]",function(c){var f=a(this);if(!f.data("dropdown")){var g=new d(f,b.Utils.options(f.data("uk-dropdown")));("click"==e||"mouseenter"==e&&"hover"==g.options.mode)&&g.show(),g.element.find(".uk-dropdown").length&&c.preventDefault()}})}(jQuery,jQuery.UIkit),function(a,b){"use strict";var c=a(window),d="resize orientationchange",e=[],f=function(g,h){var i=this,j=a(g);j.data("gridMatchHeight")||(this.options=a.extend({},f.defaults,h),this.element=j,this.columns=this.element.children(),this.elements=this.options.target?this.element.find(this.options.target):this.columns,this.columns.length&&(c.on(d,function(){var d=function(){i.match()};return a(function(){d(),c.on("load",d)}),b.Utils.debounce(d,150)}()),a(document).on("uk-domready",function(){i.columns=i.element.children(),i.elements=i.options.target?i.element.find(i.options.target):i.columns,i.match()}),this.element.data("gridMatchHeight",this),e.push(this)))};a.extend(f.prototype,{match:function(){this.revert();var b=this.columns.filter(":visible:first");if(b.length){var c=Math.ceil(100*parseFloat(b.css("width"))/parseFloat(b.parent().css("width")))>=100?!0:!1,d=this;if(!c)return this.options.row?(this.element.width(),setTimeout(function(){var b=!1,c=[];d.elements.each(function(){var e=a(this),f=e.offset().top;f!=b&&c.length&&(d.matchHeights(a(c)),c=[],f=e.offset().top),c.push(e),b=f}),c.length&&d.matchHeights(a(c))},0)):this.matchHeights(this.elements),this}},revert:function(){return this.elements.css("min-height",""),this},matchHeights:function(b){if(!(b.length<2)){var c=0;b.each(function(){c=Math.max(c,a(this).outerHeight())}).each(function(){var b=a(this),d=c-(b.outerHeight()-b.height());b.css("min-height",d+"px")})}}}),f.defaults={target:!1,row:!1};var g=function(c,d){var e=a(c);if(!e.data("gridMargin")){this.options=a.extend({},g.defaults,d);var f=new b.stackMargin(e,this.options);e.data("gridMargin",f)}};g.defaults={cls:"uk-grid-margin"},b.gridMatchHeight=f,b.gridMargin=g,a(document).on("uk-domready",function(){a("[data-uk-grid-match],[data-uk-grid-margin]").each(function(){var c,d=a(this);d.is("[data-uk-grid-match]")&&!d.data("gridMatchHeight")&&(c=new f(d,b.Utils.options(d.attr("data-uk-grid-match")))),d.is("[data-uk-grid-margin]")&&!d.data("gridMargin")&&(c=new g(d,b.Utils.options(d.attr("data-uk-grid-margin"))))})}),a(document).on("uk-check-display",function(){e.forEach(function(a){a.element.is(":visible")&&a.match()})})}(jQuery,jQuery.UIkit),function(a,b,c){"use strict";function d(b,c){return c?("object"==typeof b?(b=b instanceof jQuery?b:a(b),b.parent().length&&(c.persist=b,c.persist.data("modalPersistParent",b.parent()))):b=a("<div></div>").html("string"==typeof b||"number"==typeof b?b:"$.UIkitt.modal Error: Unsupported data type: "+typeof b),b.appendTo(c.element.find(".uk-modal-dialog")),c):void 0}var e=!1,f=a("html"),g=function(c,d){var e=this;this.element=a(c),this.options=a.extend({},g.defaults,d),this.transition=b.support.transition,this.dialog=this.element.find(".uk-modal-dialog"),this.scrollable=function(){var a=e.dialog.find(".uk-overflow-container:first");return a.length?a:!1}(),this.element.on("click",".uk-modal-close",function(a){a.preventDefault(),e.hide()}).on("click",function(b){var c=a(b.target);c[0]==e.element[0]&&e.options.bgclose&&e.hide()})};a.extend(g.prototype,{scrollable:!1,transition:!1,toggle:function(){return this[this.isActive()?"hide":"show"]()},show:function(){if(!this.isActive())return e&&e.hide(!0),this.element.removeClass("uk-open").show(),this.resize(),e=this,f.addClass("uk-modal-page").height(),this.element.addClass("uk-open").trigger("uk.modal.show"),this},hide:function(a){if(this.isActive()){if(!a&&b.support.transition){var c=this;this.element.one(b.support.transition.end,function(){c._hide()}).removeClass("uk-open")}else this._hide();return this}},resize:function(){var a="padding-"+("left"==b.langdirection?"right":"left");if(this.scrollbarwidth=window.innerWidth-f.width(),f.css(a,this.scrollbarwidth),this.element.css(a,""),this.dialog.offset().left>this.scrollbarwidth&&this.element.css(a,this.scrollbarwidth-(this.element[0].scrollHeight==window.innerHeight?0:this.scrollbarwidth)),this.scrollable){this.scrollable.css("height",0);var c=Math.abs(parseInt(this.dialog.css("margin-top"),10)),d=this.dialog.outerHeight(),e=window.innerHeight,g=e-2*(20>c?20:c)-d;this.scrollable.css("height",g<this.options.minScrollHeight?"":g)}},_hide:function(){this.element.hide().removeClass("uk-open"),f.removeClass("uk-modal-page").css("padding-"+("left"==b.langdirection?"right":"left"),""),e===this&&(e=!1),this.element.trigger("uk.modal.hide")},isActive:function(){return e==this}}),g.dialog={tpl:'<div class="uk-modal"><div class="uk-modal-dialog"></div></div>'},g.defaults={keyboard:!0,show:!1,bgclose:!0,minScrollHeight:150};var h=function(b,c){var d=this,e=a(b);e.data("modal")||(this.options=a.extend({target:e.is("a")?e.attr("href"):!1},c),this.element=e,this.modal=new g(this.options.target,c),e.on("click",function(a){a.preventDefault(),d.show()}),a.each(["show","hide","isActive"],function(a,b){d[b]=function(){return d.modal[b]()}}),this.element.data("modal",this))};h.dialog=function(b,c){var e=new g(a(g.dialog.tpl).appendTo("body"),c);return e.element.on("uk.modal.hide",function(){e.persist&&(e.persist.appendTo(e.persist.data("modalPersistParent")),e.persist=!1),e.element.remove()}),d(b,e),e},h.alert=function(b,c){h.dialog(['<div class="uk-margin uk-modal-content">'+String(b)+"</div>",'<div class="uk-modal-buttons"><button class="uk-button uk-button-primary uk-modal-close">Ok</button></div>'].join(""),a.extend({bgclose:!1,keyboard:!1},c)).show()},h.confirm=function(b,c,d){c=a.isFunction(c)?c:function(){};var e=h.dialog(['<div class="uk-margin uk-modal-content">'+String(b)+"</div>",'<div class="uk-modal-buttons"><button class="uk-button uk-button-primary js-modal-confirm">Ok</button> <button class="uk-button uk-modal-close">Cancel</button></div>'].join(""),a.extend({bgclose:!1,keyboard:!1},d));e.element.find(".js-modal-confirm").on("click",function(){c(),e.hide()}),e.show()},h.Modal=g,b.modal=h,a(document).on("click.modal.uikit","[data-uk-modal]",function(c){var d=a(this);if(d.is("a")&&c.preventDefault(),!d.data("modal")){var e=new h(d,b.Utils.options(d.attr("data-uk-modal")));e.show()}}),a(document).on("keydown.modal.uikit",function(a){e&&27===a.keyCode&&e.options.keyboard&&(a.preventDefault(),e.hide())}),c.on("resize orientationchange",b.Utils.debounce(function(){e&&e.resize()},150))}(jQuery,jQuery.UIkit,jQuery(window)),function(a,b){"use strict";var c,d=a(window),e=a(document),f={show:function(b){if(b=a(b),b.length){var g=a("html"),h=b.find(".uk-offcanvas-bar:first"),i="right"==a.UIkit.langdirection,j=(h.hasClass("uk-offcanvas-bar-flip")?-1:1)*(i?-1:1),k=-1==j&&d.width()<window.innerWidth?window.innerWidth-d.width():0;c={x:window.scrollX,y:window.scrollY},b.addClass("uk-active"),g.css({width:window.innerWidth,height:window.innerHeight}).addClass("uk-offcanvas-page"),g.css(i?"margin-right":"margin-left",(i?-1:1)*(h.outerWidth()-k)*j).width(),h.addClass("uk-offcanvas-bar-show").width(),b.off(".ukoffcanvas").on("click.ukoffcanvas swipeRight.ukoffcanvas swipeLeft.ukoffcanvas",function(b){var c=a(b.target);if(!b.type.match(/swipe/)&&!c.hasClass("uk-offcanvas-close")){if(c.hasClass("uk-offcanvas-bar"))return;if(c.parents(".uk-offcanvas-bar:first").length)return}b.stopImmediatePropagation(),f.hide()}),e.on("keydown.ukoffcanvas",function(a){27===a.keyCode&&f.hide()})}},hide:function(b){var d=a("html"),f=a(".uk-offcanvas.uk-active"),g="right"==a.UIkit.langdirection,h=f.find(".uk-offcanvas-bar:first");f.length&&(a.UIkit.support.transition&&!b?(d.one(a.UIkit.support.transition.end,function(){d.removeClass("uk-offcanvas-page").attr("style",""),f.removeClass("uk-active"),window.scrollTo(c.x,c.y)}).css(g?"margin-right":"margin-left",""),setTimeout(function(){h.removeClass("uk-offcanvas-bar-show")},50)):(d.removeClass("uk-offcanvas-page").attr("style",""),f.removeClass("uk-active"),h.removeClass("uk-offcanvas-bar-show"),window.scrollTo(c.x,c.y)),f.off(".ukoffcanvas"),e.off(".ukoffcanvas"))}},g=function(b,c){var d=this,e=a(b);e.data("offcanvas")||(this.options=a.extend({target:e.is("a")?e.attr("href"):!1},c),this.element=e,e.on("click",function(a){a.preventDefault(),f.show(d.options.target)}),this.element.data("offcanvas",this))};g.offcanvas=f,b.offcanvas=g,e.on("click.offcanvas.uikit","[data-uk-offcanvas]",function(c){c.preventDefault();var d=a(this);if(!d.data("offcanvas")){{new g(d,b.Utils.options(d.attr("data-uk-offcanvas")))}d.trigger("click")}})}(jQuery,jQuery.UIkit),function(a,b){"use strict";function c(b){var c=a(b),d="auto";if(c.is(":visible"))d=c.outerHeight();else{var e={position:c.css("position"),visibility:c.css("visibility"),display:c.css("display")};d=c.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),c.css(e)}return d}var d=function(b,c){var e=this,f=a(b);f.data("nav")||(this.options=a.extend({},d.defaults,c),this.element=f.on("click",this.options.toggle,function(b){b.preventDefault();var c=a(this);e.open(c.parent()[0]==e.element[0]?c:c.parent("li"))}),this.element.find(this.options.lists).each(function(){var b=a(this),c=b.parent(),d=c.hasClass("uk-active");b.wrap('<div style="overflow:hidden;height:0;position:relative;"></div>'),c.data("list-container",b.parent()),d&&e.open(c,!0)}),this.element.data("nav",this))};a.extend(d.prototype,{open:function(b,d){var e=this.element,f=a(b);this.options.multiple||e.children(".uk-open").not(b).each(function(){a(this).data("list-container")&&a(this).data("list-container").stop().animate({height:0},function(){a(this).parent().removeClass("uk-open")})}),f.toggleClass("uk-open"),f.data("list-container")&&(d?f.data("list-container").stop().height(f.hasClass("uk-open")?"auto":0):f.data("list-container").stop().animate({height:f.hasClass("uk-open")?c(f.data("list-container").find("ul:first")):0}))}}),d.defaults={toggle:">li.uk-parent > a[href='#']",lists:">li.uk-parent > ul",multiple:!1},b.nav=d,a(document).on("uk-domready",function(){a("[data-uk-nav]").each(function(){var c=a(this);if(!c.data("nav")){new d(c,b.Utils.options(c.attr("data-uk-nav")))}})})}(jQuery,jQuery.UIkit),function(a,b,c){"use strict";var d,e,f=function(b,c){var d=this,e=a(b);e.data("tooltip")||(this.options=a.extend({},f.defaults,c),this.element=e.on({focus:function(){d.show()},blur:function(){d.hide()},mouseenter:function(){d.show()},mouseleave:function(){d.hide()}}),this.tip="function"==typeof this.options.src?this.options.src.call(this.element):this.options.src,this.element.attr("data-cached-title",this.element.attr("title")).attr("title",""),this.element.data("tooltip",this))};a.extend(f.prototype,{tip:"",show:function(){if(e&&clearTimeout(e),this.tip.length){d.stop().css({top:-2e3,visibility:"hidden"}).show(),d.html('<div class="uk-tooltip-inner">'+this.tip+"</div>");var b=this,c=a.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),f=d[0].offsetWidth,g=d[0].offsetHeight,h="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,i="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,j={display:"none",visibility:"visible",top:c.top+c.height+g,left:c.left},k=i.split("-");"left"!=k[0]&&"right"!=k[0]||"right"!=a.UIkit.langdirection||(k[0]="left"==k[0]?"right":"left");var l={bottom:{top:c.top+c.height+h,left:c.left+c.width/2-f/2},top:{top:c.top-g-h,left:c.left+c.width/2-f/2},left:{top:c.top+c.height/2-g/2,left:c.left-f-h},right:{top:c.top+c.height/2-g/2,left:c.left+c.width+h}};a.extend(j,l[k[0]]),2==k.length&&(j.left="left"==k[1]?c.left:c.left+c.width-f);var m=this.checkBoundary(j.left,j.top,f,g);if(m){switch(m){case"x":i=2==k.length?k[0]+"-"+(j.left<0?"left":"right"):j.left<0?"right":"left";break;case"y":i=2==k.length?(j.top<0?"bottom":"top")+"-"+k[1]:j.top<0?"bottom":"top";break;case"xy":i=2==k.length?(j.top<0?"bottom":"top")+"-"+(j.left<0?"left":"right"):j.left<0?"right":"left"}k=i.split("-"),a.extend(j,l[k[0]]),2==k.length&&(j.left="left"==k[1]?c.left:c.left+c.width-f)}j.left-=a("body").position().left,e=setTimeout(function(){d.css(j).attr("class","uk-tooltip uk-tooltip-"+i),b.options.animation?d.css({opacity:0,display:"block"}).animate({opacity:1},parseInt(b.options.animation,10)||400):d.show(),e=!1},parseInt(this.options.delay,10)||0)}},hide:function(){this.element.is("input")&&this.element[0]===document.activeElement||(e&&clearTimeout(e),d.stop(),this.options.animation?d.fadeOut(parseInt(this.options.animation,10)||400):d.hide())},content:function(){return this.tip},checkBoundary:function(a,b,d,e){var f="";return(0>a||a-c.scrollLeft()+d>window.innerWidth)&&(f+="x"),(0>b||b-c.scrollTop()+e>window.innerHeight)&&(f+="y"),f}}),f.defaults={offset:5,pos:"top",animation:!1,delay:0,src:function(){return this.attr("title")}},b.tooltip=f,a(function(){d=a('<div class="uk-tooltip"></div>').appendTo("body")}),a(document).on("mouseenter.tooltip.uikit focus.tooltip.uikit","[data-uk-tooltip]",function(){var c=a(this);if(!c.data("tooltip")){{new f(c,b.Utils.options(c.attr("data-uk-tooltip")))}c.trigger("mouseenter")}})}(jQuery,jQuery.UIkit,jQuery(window)),function(a,b){"use strict";var c=function(b,d){var e=this,f=a(b);if(!f.data("switcher")){if(this.options=a.extend({},c.defaults,d),this.element=f.on("click",this.options.toggle,function(a){a.preventDefault(),e.show(this)}),this.options.connect){this.connect=a(this.options.connect).find(".uk-active").removeClass(".uk-active").end();var g=this.element.find(this.options.toggle),h=g.filter(".uk-active");h.length?this.show(h):(h=g.eq(this.options.active),this.show(h.length?h:g.eq(0)))}this.element.data("switcher",this)}};a.extend(c.prototype,{show:function(b){b=isNaN(b)?a(b):this.element.find(this.options.toggle).eq(b);var c=b;if(!c.hasClass("uk-disabled")){if(this.element.find(this.options.toggle).filter(".uk-active").removeClass("uk-active"),c.addClass("uk-active"),this.options.connect&&this.connect.length){var d=this.element.find(this.options.toggle).index(c);this.connect.children().removeClass("uk-active").eq(d).addClass("uk-active")}this.element.trigger("uk.switcher.show",[c]),a(document).trigger("uk-check-display")}}}),c.defaults={connect:!1,toggle:">*",active:0},b.switcher=c,a(document).on("uk-domready",function(){a("[data-uk-switcher]").each(function(){var d=a(this);if(!d.data("switcher")){new c(d,b.Utils.options(d.attr("data-uk-switcher")))}})})}(jQuery,jQuery.UIkit),function(a,b){"use strict";var c=function(b,d){var e=this,f=a(b);if(!f.data("tab")){if(this.element=f,this.options=a.extend({},c.defaults,d),this.options.connect&&(this.connect=a(this.options.connect)),window.location.hash){var g=this.element.children().filter(window.location.hash);g.length&&this.element.children().removeClass("uk-active").filter(g).addClass("uk-active")}var h=a('<li class="uk-tab-responsive uk-active"><a href="javascript:void(0);"></a></li>'),i=h.find("a:first"),j=a('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>'),k=j.find("ul");i.html(this.element.find("li.uk-active:first").find("a").text()),this.element.hasClass("uk-tab-bottom")&&j.addClass("uk-dropdown-up"),this.element.hasClass("uk-tab-flip")&&j.addClass("uk-dropdown-flip"),this.element.find("a").each(function(b){var c=a(this).parent(),d=a('<li><a href="javascript:void(0);">'+c.text()+"</a></li>").on("click",function(){e.element.data("switcher").show(b)});a(this).parents(".uk-disabled:first").length||k.append(d)}),this.element.uk("switcher",{toggle:">li:not(.uk-tab-responsive)",connect:this.options.connect,active:this.options.active}),h.append(j).uk("dropdown",{mode:"click"}),this.element.append(h).data({dropdown:h.data("dropdown"),mobilecaption:i}).on("uk.switcher.show",function(a,b){h.addClass("uk-active"),i.html(b.find("a").text())}),this.element.data("tab",this)}};c.defaults={connect:!1,active:0},b.tab=c,a(document).on("uk-domready",function(){a("[data-uk-tab]").each(function(){var d=a(this);if(!d.data("tab")){new c(d,b.Utils.options(d.attr("data-uk-tab")))}})})}(jQuery,jQuery.UIkit),function(a,b){"use strict";var c=a(window),d=[],e=function(){for(var a=0;a<d.length;a++)b.support.requestAnimationFrame.apply(window,[d[a].check])},f=function(c,e){var g=a(c);if(!g.data("scrollspy")){this.options=a.extend({},f.defaults,e),this.element=a(c);var h,i,j,k=this,l=function(){var a=b.Utils.isInView(k.element,k.options);a&&!i&&(h&&clearTimeout(h),j||(k.element.addClass(k.options.initcls),k.offset=k.element.offset(),j=!0,k.element.trigger("uk-scrollspy-init")),h=setTimeout(function(){a&&k.element.addClass("uk-scrollspy-inview").addClass(k.options.cls).width()},k.options.delay),i=!0,k.element.trigger("uk.scrollspy.inview")),!a&&i&&k.options.repeat&&(k.element.removeClass("uk-scrollspy-inview").removeClass(k.options.cls),i=!1,k.element.trigger("uk.scrollspy.outview"))};l(),this.element.data("scrollspy",this),this.check=l,d.push(this)}};f.defaults={cls:"uk-scrollspy-inview",initcls:"uk-scrollspy-init-inview",topoffset:0,leftoffset:0,repeat:!1,delay:0},b.scrollspy=f;var g=[],h=function(){for(var a=0;a<g.length;a++)b.support.requestAnimationFrame.apply(window,[g[a].check])},i=function(d,e){var f=a(d);if(!f.data("scrollspynav")){this.element=f,this.options=a.extend({},i.defaults,e);var h,j=[],k=this.element.find("a[href^='#']").each(function(){j.push(a(this).attr("href"))}),l=a(j.join(",")),m=this,n=function(){h=[];for(var a=0;a<l.length;a++)b.Utils.isInView(l.eq(a),m.options)&&h.push(l.eq(a));if(h.length){var d=c.scrollTop(),e=function(){for(var a=0;a<h.length;a++)if(h[a].offset().top>=d)return h[a]}();if(!e)return;m.options.closest?k.closest(m.options.closest).removeClass(m.options.cls).end().filter("a[href='#"+e.attr("id")+"']").closest(m.options.closest).addClass(m.options.cls):k.removeClass(m.options.cls).filter("a[href='#"+e.attr("id")+"']").addClass(m.options.cls)}};this.options.smoothscroll&&b.smoothScroll&&k.each(function(){new b.smoothScroll(this,m.options.smoothscroll)}),n(),this.element.data("scrollspynav",this),this.check=n,g.push(this) +}};i.defaults={cls:"uk-active",closest:!1,topoffset:0,leftoffset:0,smoothscroll:!1},b.scrollspynav=i;var j=function(){e(),h()};c.on("scroll",j).on("resize orientationchange",b.Utils.debounce(j,50)),a(document).on("uk-domready",function(){a("[data-uk-scrollspy]").each(function(){var c=a(this);if(!c.data("scrollspy")){new f(c,b.Utils.options(c.attr("data-uk-scrollspy")))}}),a("[data-uk-scrollspy-nav]").each(function(){var c=a(this);if(!c.data("scrollspynav")){new i(c,b.Utils.options(c.attr("data-uk-scrollspy-nav")))}})})}(jQuery,jQuery.UIkit),function(a,b){"use strict";var c=function(b,d){var e=this,f=a(b);f.data("smoothScroll")||(this.options=a.extend({},c.defaults,d),this.element=f.on("click",function(){{var b=a(a(this.hash).length?this.hash:"body"),c=b.offset().top-e.options.offset,d=a(document).height(),f=a(window).height();b.outerHeight()}return c+f>d&&(c=d-f),a("html,body").stop().animate({scrollTop:c},e.options.duration,e.options.transition),!1}),this.element.data("smoothScroll",this))};c.defaults={duration:1e3,transition:"easeOutExpo",offset:0},b.smoothScroll=c,a.easing.easeOutExpo||(a.easing.easeOutExpo=function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c}),a(document).on("click.smooth-scroll.uikit","[data-uk-smooth-scroll]",function(){var d=a(this);if(!d.data("smoothScroll")){{new c(d,b.Utils.options(d.attr("data-uk-smooth-scroll")))}d.trigger("click")}})}(jQuery,jQuery.UIkit),function(a,b,c){var d=function(a,c){var e=this,f=b(a);f.data("toggle")||(this.options=b.extend({},d.defaults,c),this.totoggle=this.options.target?b(this.options.target):[],this.element=f.on("click",function(a){a.preventDefault(),e.toggle()}),this.element.data("toggle",this))};b.extend(d.prototype,{toggle:function(){this.totoggle.length&&(this.totoggle.toggleClass(this.options.cls),"uk-hidden"==this.options.cls&&b(document).trigger("uk-check-display"))}}),d.defaults={target:!1,cls:"uk-hidden"},c.toggle=d,b(document).on("uk-domready",function(){b("[data-uk-toggle]").each(function(){var a=b(this);if(!a.data("toggle")){new d(a,c.Utils.options(a.attr("data-uk-toggle")))}})})}(this,jQuery,jQuery.UIkit); \ No newline at end of file diff --git a/www/static/js/vue.min.js b/www/static/js/vue.min.js new file mode 100644 index 0000000..d5950c3 --- /dev/null +++ b/www/static/js/vue.min.js @@ -0,0 +1,7 @@ +/* + Vue.js v0.10.3 + (c) 2014 Evan You + License: MIT +*/ +!function(){"use strict";function e(t,i,n){var r=e.resolve(t);if(null!=r){var s=e.modules[r];if(!s._resolving&&!s.exports){var o={};o.exports={},o.client=o.component=!0,s._resolving=!0,s.call(this,o.exports,e.relative(r),o),delete s._resolving,s.exports=o.exports}return s.exports}}e.modules={},e.aliases={},e.exts=["",".js",".json","/index.js","/index.json"],e.resolve=function(t){"/"===t.charAt(0)&&(t=t.slice(1));for(var i=0;5>i;i++){var n=t+e.exts[i];if(e.modules.hasOwnProperty(n))return n;if(e.aliases.hasOwnProperty(n))return e.aliases[n]}},e.normalize=function(e,t){var i=[];if("."!=t.charAt(0))return t;e=e.split("/"),t=t.split("/");for(var n=0;n<t.length;++n)".."===t[n]?e.pop():"."!=t[n]&&""!=t[n]&&i.push(t[n]);return e.concat(i).join("/")},e.register=function(t,i){e.modules[t]=i},e.alias=function(t,i){e.modules.hasOwnProperty(t)&&(e.aliases[i]=t)},e.relative=function(t){function i(n){var r=i.resolve(n);return e(r,t,n)}var n=e.normalize(t,"..");return i.resolve=function(i){var r=i.charAt(0);if("/"===r)return i.slice(1);if("."===r)return e.normalize(n,i);for(var s=t.split("/"),o=s.length;o--&&"deps"!==s[o];);return i=s.slice(0,o+2).join("/")+"/deps/"+i},i.exists=function(t){return e.modules.hasOwnProperty(i.resolve(t))},i},e.register("vue/src/main.js",function(e,t,i){function n(e){var t=this;e.data&&(e.defaultData=e.data,delete e.data),e=r(e,t.options,!0),a.processOptions(e);var i=function(i,n){n||(i=r(i,e,!0)),t.call(this,i,!0)},s=i.prototype=Object.create(t.prototype);return a.defProtected(s,"constructor",i),i.extend=n,i.super=t,i.options=e,u.forEach(function(e){i[e]=o[e]}),i.use=o.use,i.require=o.require,i}function r(e,t,i){if(e=e||{},!t)return e;for(var n in t)if("el"!==n){var s=e[n],c=t[n];i&&"function"==typeof s&&c?(e[n]=[s],Array.isArray(c)?e[n]=e[n].concat(c):e[n].push(c)):!i||!a.isTrueObject(s)&&!a.isTrueObject(c)||c instanceof o?void 0===s&&(e[n]=c):e[n]=r(s,c)}return e}var s=t("./config"),o=t("./viewmodel"),a=t("./utils"),c=a.hash,u=["directive","filter","partial","effect","component"];t("./observer"),t("./transition"),o.options=s.globalAssets={directives:t("./directives"),filters:t("./filters"),partials:c(),effects:c(),components:c()},u.forEach(function(e){o[e]=function(t,i){var n=this.options[e+"s"];return n||(n=this.options[e+"s"]=c()),i?("partial"===e?i=a.toFragment(i):"component"===e?i=a.toConstructor(i):"filter"===e&&a.checkFilter(i),n[t]=i,this):n[t]}}),o.config=function(e,t){if("string"==typeof e){if(void 0===t)return s[e];s[e]=t}else a.extend(s,e);return this},o.use=function(e){if("string"==typeof e)try{e=t(e)}catch(i){return}var n=[].slice.call(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):e.apply(null,n),this},o.require=function(e){return t("./"+e)},o.extend=n,o.nextTick=a.nextTick,i.exports=o}),e.register("vue/src/emitter.js",function(e,t,i){function n(e){this._ctx=e||this}var r=n.prototype;r.on=function(e,t){return this._cbs=this._cbs||{},(this._cbs[e]=this._cbs[e]||[]).push(t),this},r.once=function(e,t){function i(){n.off(e,i),t.apply(this,arguments)}var n=this;return this._cbs=this._cbs||{},i.fn=t,this.on(e,i),this},r.off=function(e,t){if(this._cbs=this._cbs||{},!arguments.length)return this._cbs={},this;var i=this._cbs[e];if(!i)return this;if(1===arguments.length)return delete this._cbs[e],this;for(var n,r=0;r<i.length;r++)if(n=i[r],n===t||n.fn===t){i.splice(r,1);break}return this},r.emit=function(e,t,i,n){this._cbs=this._cbs||{};var r=this._cbs[e];if(r){r=r.slice(0);for(var s=0,o=r.length;o>s;s++)r[s].call(this._ctx,t,i,n)}return this},i.exports=n}),e.register("vue/src/config.js",function(e,t,i){var n=t("./text-parser");i.exports={prefix:"v",debug:!1,silent:!1,enterClass:"v-enter",leaveClass:"v-leave",interpolate:!0},Object.defineProperty(i.exports,"delimiters",{get:function(){return n.delimiters},set:function(e){n.setDelimiters(e)}})}),e.register("vue/src/utils.js",function(e,t,i){var n,r=t("./config"),s={}.toString,o=window,a=(o.console,o.setTimeout),c=Object.defineProperty,u=/[^\w]this[^\w]/,l="object",h="classList"in document.documentElement,f=i.exports={get:function(e,t){if(t.indexOf(".")<0)return e[t];for(var i=t.split("."),n=-1,r=i.length;++n<r&&null!=e;)e=e[i[n]];return e},set:function(e,t,i){if(t.indexOf(".")<0)return e[t]=i,void 0;for(var n=t.split("."),r=-1,s=n.length-1;++r<s;)null==e[n[r]]&&(e[n[r]]={}),e=e[n[r]];e[n[r]]=i},baseKey:function(e){return e.indexOf(".")>0?e.split(".")[0]:e},hash:function(){return Object.create(null)},attr:function(e,t){var i=r.prefix+"-"+t,n=e.getAttribute(i);return null!==n&&e.removeAttribute(i),n},defProtected:function(e,t,i,n,r){c(e,t,{value:i,enumerable:n,writable:r,configurable:!0})},isObject:function(e){return typeof e===l&&e&&!Array.isArray(e)},isTrueObject:function(e){return"[object Object]"===s.call(e)},bind:function(e,t){return function(i){return e.call(t,i)}},guard:function(e){return null==e?"":"object"==typeof e?JSON.stringify(e):e},checkNumber:function(e){return isNaN(e)||null===e||"boolean"==typeof e?e:Number(e)},extend:function(e,t){for(var i in t)e[i]!==t[i]&&(e[i]=t[i]);return e},unique:function(e){for(var t,i=f.hash(),n=e.length,r=[];n--;)t=e[n],i[t]||(i[t]=1,r.push(t));return r},toFragment:function(e){if("string"!=typeof e)return e;if("#"===e.charAt(0)){var t=document.getElementById(e.slice(1));if(!t)return;if("TEMPLATE"===t.tagName&&t.content)return t.content;e=t.innerHTML}var i,n=document.createElement("div"),r=document.createDocumentFragment();for(n.innerHTML=e.trim();i=n.firstChild;)1===n.nodeType&&r.appendChild(i);return r},toConstructor:function(e){return n=n||t("./viewmodel"),f.isObject(e)?n.extend(e):"function"==typeof e?e:null},checkFilter:function(e){u.test(e.toString())&&(e.computed=!0)},processOptions:function(e){var t,i=e.components,n=e.partials,r=e.template,s=e.filters;if(i)for(t in i)i[t]=f.toConstructor(i[t]);if(n)for(t in n)n[t]=f.toFragment(n[t]);if(s)for(t in s)f.checkFilter(s[t]);r&&(e.template=f.toFragment(r))},nextTick:function(e){a(e,0)},addClass:function(e,t){if(h)e.classList.add(t);else{var i=" "+e.className+" ";i.indexOf(" "+t+" ")<0&&(e.className=(i+t).trim())}},removeClass:function(e,t){if(h)e.classList.remove(t);else{for(var i=" "+e.className+" ",n=" "+t+" ";i.indexOf(n)>=0;)i=i.replace(n," ");e.className=i.trim()}},objectToArray:function(e){var t,i,n=[];for(var r in e)t=e[r],i=f.isObject(t)?t:{$value:t},i.$key=r,n.push(i);return n}}}),e.register("vue/src/compiler.js",function(e,t,i){function n(e,t){var i,n,s=this;s.init=!0,s.destroyed=!1,t=s.options=t||{},u.processOptions(t),m(s,t.compilerOptions),s.repeat=s.repeat||!1,s.expCache=s.expCache||{};var a=s.el=s.setupElement(t);if(s.vm=a.vue_vm=e,s.bindings=u.hash(),s.dirs=[],s.deferred=[],s.computed=[],s.children=[],s.emitter=new o(e),t.methods)for(i in t.methods)s.createBinding(i);if(t.computed)for(i in t.computed)s.createBinding(i);e.$={},e.$el=a,e.$options=t,e.$compiler=s,e.$event=null;var c=t.parent;c&&(s.parent=c.$compiler,c.$compiler.children.push(s),e.$parent=c),e.$root=r(s).vm,s.setupObserver();var l=s.data=t.data||{},h=t.defaultData;if(h)for(i in h)g.call(l,i)||(l[i]=h[i]);var f=t.paramAttributes;if(f)for(n=f.length;n--;)l[f[n]]=u.checkNumber(s.eval(a.getAttribute(f[n])));m(e,l),e.$data=l,s.execHook("created"),l=s.data=e.$data;var p;for(i in e)p=e[i],"$"!==i.charAt(0)&&l[i]!==p&&"function"!=typeof p&&(l[i]=p);for(s.observeData(l),t.template&&this.resolveContent(),s.compile(a,!0),n=s.deferred.length;n--;)s.bindDirective(s.deferred[n]);s.deferred=null,this.computed.length&&d.parse(this.computed),s.init=!1,s.execHook("ready")}function r(e){for(;e.parent;)e=e.parent;return e}var s,o=t("./emitter"),a=t("./observer"),c=t("./config"),u=t("./utils"),l=t("./binding"),h=t("./directive"),f=t("./text-parser"),d=t("./deps-parser"),p=t("./exp-parser"),v=[].slice,m=u.extend,g={}.hasOwnProperty,b=Object.defineProperty,y=["created","ready","beforeDestroy","afterDestroy","attached","detached"],_=["if","repeat","view","component"],x=n.prototype;x.setupElement=function(e){var t,i,n,r,s,o="string"==typeof e.el?document.querySelector(e.el):e.el||document.createElement(e.tagName||"div"),a=e.template;if(a){if(o.hasChildNodes())for(this.rawContent=document.createElement("div");t=o.firstChild;)this.rawContent.appendChild(t);if(e.replace&&1===a.childNodes.length){if(i=a.childNodes[0].cloneNode(!0),o.parentNode&&(o.parentNode.insertBefore(i,o),o.parentNode.removeChild(o)),o.hasAttributes())for(n=o.attributes.length;n--;)r=o.attributes[n],i.setAttribute(r.name,r.value);o=i}else o.appendChild(a.cloneNode(!0))}if(e.id&&(o.id=e.id),e.className&&(o.className=e.className),s=e.attributes)for(r in s)o.setAttribute(r,s[r]);return o},x.resolveContent=function(){function e(e,t){for(var i=e.parentNode,n=0,r=t.length;r>n;n++)i.insertBefore(t[n],e);i.removeChild(e)}var t,i,n,r,s,o=v.call(this.el.getElementsByTagName("content")),a=this.rawContent;if(n=o.length){for(;n--;)t=o[n],a?(i=t.getAttribute("select"),i?t.content=v.call(a.querySelectorAll(i)):s=t):t.content=v.call(t.childNodes);for(n=0,r=o.length;r>n;n++)t=o[n],t!==s&&e(t,t.content);a&&s&&e(s,v.call(a.childNodes))}this.rawContent=null},x.setupObserver=function(){function e(e){r(e),d.catcher.emit("get",a[e])}function t(e,t,i){u.emit("change:"+e,t,i),r(e),a[e].update(t)}function i(e,t){u.on("hook:"+e,function(){t.call(s.vm)})}function n(e){var t=s.children;if(t)for(var i,n=t.length;n--;)i=t[n],i.el.parentNode&&(e="hook:"+(e?"attached":"detached"),i.observer.emit(e),i.emitter.emit(e))}function r(e){a[e]||s.createBinding(e)}var s=this,a=s.bindings,c=s.options,u=s.observer=new o(s.vm);u.proxies={},u.on("get",e).on("set",t).on("mutate",t);for(var l,h,f,p=y.length;p--;)if(h=y[p],f=c[h],Array.isArray(f))for(l=f.length;l--;)i(h,f[l]);else f&&i(h,f);u.on("hook:attached",function(){n(1)}).on("hook:detached",function(){n(0)})},x.observeData=function(e){function t(e){"$data"!==e&&i()}function i(){s.update(n.data),r.emit("change:$data",n.data)}var n=this,r=n.observer;a.observe(e,"",r);var s=n.bindings.$data=new l(n,"$data");s.update(e),b(n.vm,"$data",{get:function(){return n.observer.emit("get","$data"),n.data},set:function(e){var t=n.data;a.unobserve(t,"",r),n.data=e,a.copyPaths(e,t),a.observe(e,"",r),i()}}),r.on("set",t).on("mutate",t)},x.compile=function(e,t){var i=e.nodeType;1===i&&"SCRIPT"!==e.tagName?this.compileElement(e,t):3===i&&c.interpolate&&this.compileTextNode(e)},x.checkPriorityDir=function(e,t,i){var n,r,s;if("component"===e&&i!==!0&&(s=this.resolveComponent(t,void 0,!0))?(r=this.parseDirective(e,"",t),r.Ctor=s):(n=u.attr(t,e),r=n&&this.parseDirective(e,n,t)),r){if(i===!0)return;return this.deferred.push(r),!0}},x.compileElement=function(e,t){if("TEXTAREA"===e.tagName&&e.value&&(e.value=this.eval(e.value)),e.hasAttributes()||e.tagName.indexOf("-")>-1){if(null!==u.attr(e,"pre"))return;var i,n,r,s;for(i=0,n=_.length;n>i;i++)if(this.checkPriorityDir(_[i],e,t))return;e.vue_trans=u.attr(e,"transition"),e.vue_anim=u.attr(e,"animation"),e.vue_effect=this.eval(u.attr(e,"effect"));var o,a,l,h,d,p,m=c.prefix+"-",g=v.call(e.attributes),b=this.options.paramAttributes;for(i=0,n=g.length;n>i;i++){if(o=g[i],a=!1,0===o.name.indexOf(m))for(a=!0,p=o.name.slice(m.length),h=this.parseDirective(p,o.value,e,!0),r=0,s=h.length;s>r;r++)d=h[r],"with"===p?this.bindDirective(d,this.parent):this.bindDirective(d);else c.interpolate&&(l=f.parseAttr(o.value),l&&(d=this.parseDirective("attr",o.name+":"+l,e),b&&b.indexOf(o.name)>-1?this.bindDirective(d,this.parent):this.bindDirective(d)));a&&"cloak"!==p&&e.removeAttribute(o.name)}}e.hasChildNodes()&&v.call(e.childNodes).forEach(this.compile,this)},x.compileTextNode=function(e){var t=f.parse(e.nodeValue);if(t){for(var i,n,r,s=0,o=t.length;o>s;s++)n=t[s],r=null,n.key?">"===n.key.charAt(0)?(i=document.createComment("ref"),r=this.parseDirective("partial",n.key.slice(1),i)):n.html?(i=document.createComment(c.prefix+"-html"),r=this.parseDirective("html",n.key,i)):(i=document.createTextNode(""),r=this.parseDirective("text",n.key,i)):i=document.createTextNode(n),e.parentNode.insertBefore(i,e),this.bindDirective(r);e.parentNode.removeChild(e)}},x.parseDirective=function(e,t,i,n){function r(t){return new h(e,t,o,s,i)}var s=this,o=s.getOption("directives",e);if(o){var a=h.parse(t);return n?a.map(r):r(a[0])}},x.bindDirective=function(e,t){if(e){if(this.dirs.push(e),e.isEmpty||e.isLiteral)return e.bind&&e.bind(),void 0;var i,n=t||this,r=e.key;if(e.isExp)i=n.createBinding(r,e);else{for(;n&&!n.hasKey(r);)n=n.parent;n=n||this,i=n.bindings[r]||n.createBinding(r)}i.dirs.push(e),e.binding=i;var s=i.val();e.bind&&e.bind(s),e.update(s,!0)}},x.createBinding=function(e,t){var i=this,n=i.options.methods,r=t&&t.isExp,s=t&&t.isFn||n&&n[e],o=i.bindings,c=i.options.computed,h=new l(i,e,r,s);if(r)i.defineExp(e,h,t);else if(s)o[e]=h,h.value=i.vm[e]=n[e];else if(o[e]=h,h.root)c&&c[e]?i.defineComputed(e,h,c[e]):"$"!==e.charAt(0)?i.defineProp(e,h):i.defineMeta(e,h);else if(c&&c[u.baseKey(e)])i.defineExp(e,h);else{a.ensurePath(i.data,e);var f=e.slice(0,e.lastIndexOf("."));o[f]||i.createBinding(f)}return h},x.defineProp=function(e,t){var i=this,n=i.data,r=n.__emitter__;g.call(n,e)||(n[e]=void 0),r&&!g.call(r.values,e)&&a.convertKey(n,e),t.value=n[e],b(i.vm,e,{get:function(){return i.data[e]},set:function(t){i.data[e]=t}})},x.defineMeta=function(e,t){var i=this.observer;t.value=this.data[e],delete this.data[e],b(this.vm,e,{get:function(){return a.shouldGet&&i.emit("get",e),t.value},set:function(t){i.emit("set",e,t)}})},x.defineExp=function(e,t,i){var n=i&&i.computedKey,r=n?i.expression:e,s=this.expCache[r];s||(s=this.expCache[r]=p.parse(n||e,this)),s&&this.markComputed(t,s)},x.defineComputed=function(e,t,i){this.markComputed(t,i),b(this.vm,e,{get:t.value.$get,set:t.value.$set})},x.markComputed=function(e,t){e.isComputed=!0,e.isFn?e.value=t:("function"==typeof t&&(t={$get:t}),e.value={$get:u.bind(t.$get,this.vm),$set:t.$set?u.bind(t.$set,this.vm):void 0}),this.computed.push(e)},x.getOption=function(e,t,i){var n=this.options,r=this.parent,s=c.globalAssets,o=n[e]&&n[e][t]||(r?r.getOption(e,t,i):s[e]&&s[e][t]);return o},x.execHook=function(e){e="hook:"+e,this.observer.emit(e),this.emitter.emit(e)},x.hasKey=function(e){var t=u.baseKey(e);return g.call(this.data,t)||g.call(this.vm,t)},x.eval=function(e,t){var i=f.parseAttr(e);return i?p.eval(i,this,t):e},x.resolveComponent=function(e,i,n){s=s||t("./viewmodel");var r=u.attr(e,"component"),o=e.tagName,a=this.eval(r,i),c=o.indexOf("-")>0&&o.toLowerCase(),l=this.getOption("components",a||c,!0);return n?""===r?s:l:l||s},x.destroy=function(){if(!this.destroyed){var e,t,i,n,r,s,o=this,c=o.vm,u=o.el,l=o.dirs,h=o.computed,f=o.bindings,d=o.children,p=o.parent;for(o.execHook("beforeDestroy"),a.unobserve(o.data,"",o.observer),e=l.length;e--;)n=l[e],n.binding&&n.binding.compiler!==o&&(r=n.binding.dirs,r&&(t=r.indexOf(n),t>-1&&r.splice(t,1))),n.unbind();for(e=h.length;e--;)h[e].unbind();for(i in f)s=f[i],s&&s.unbind();for(e=d.length;e--;)d[e].destroy();p&&(t=p.children.indexOf(o),t>-1&&p.children.splice(t,1)),u===document.body?u.innerHTML="":c.$remove(),u.vue_vm=null,o.destroyed=!0,o.execHook("afterDestroy"),o.observer.off(),o.emitter.off()}},i.exports=n}),e.register("vue/src/viewmodel.js",function(e,t,i){function n(e){new s(this,e)}function r(e){return"string"==typeof e?document.querySelector(e):e}var s=t("./compiler"),o=t("./utils"),a=t("./transition"),c=t("./batcher"),u=[].slice,l=o.defProtected,h=o.nextTick,f=new c,d=1,p=n.prototype;l(p,"$get",function(e){var t=o.get(this,e);return void 0===t&&this.$parent?this.$parent.$get(e):t}),l(p,"$set",function(e,t){o.set(this,e,t)}),l(p,"$watch",function(e,t){function i(){var e=u.call(arguments);f.push({id:n,override:!0,execute:function(){t.apply(r,e)}})}var n=d++,r=this;t._fn=i,r.$compiler.observer.on("change:"+e,i)}),l(p,"$unwatch",function(e,t){var i=["change:"+e],n=this.$compiler.observer;t&&i.push(t._fn),n.off.apply(n,i)}),l(p,"$destroy",function(){this.$compiler.destroy()}),l(p,"$broadcast",function(){for(var e,t=this.$compiler.children,i=t.length;i--;)e=t[i],e.emitter.emit.apply(e.emitter,arguments),e.vm.$broadcast.apply(e.vm,arguments)}),l(p,"$dispatch",function(){var e=this.$compiler,t=e.emitter,i=e.parent;t.emit.apply(t,arguments),i&&i.vm.$dispatch.apply(i.vm,arguments)}),["emit","on","off","once"].forEach(function(e){l(p,"$"+e,function(){var t=this.$compiler.emitter;t[e].apply(t,arguments)})}),l(p,"$appendTo",function(e,t){e=r(e);var i=this.$el;a(i,1,function(){e.appendChild(i),t&&h(t)},this.$compiler)}),l(p,"$remove",function(e){var t=this.$el;a(t,-1,function(){t.parentNode&&t.parentNode.removeChild(t),e&&h(e)},this.$compiler)}),l(p,"$before",function(e,t){e=r(e);var i=this.$el;a(i,1,function(){e.parentNode.insertBefore(i,e),t&&h(t)},this.$compiler)}),l(p,"$after",function(e,t){e=r(e);var i=this.$el;a(i,1,function(){e.nextSibling?e.parentNode.insertBefore(i,e.nextSibling):e.parentNode.appendChild(i),t&&h(t)},this.$compiler)}),i.exports=n}),e.register("vue/src/binding.js",function(e,t,i){function n(e,t,i,n){this.id=o++,this.value=void 0,this.isExp=!!i,this.isFn=n,this.root=!this.isExp&&-1===t.indexOf("."),this.compiler=e,this.key=t,this.dirs=[],this.subs=[],this.deps=[],this.unbound=!1}var r=t("./batcher"),s=new r,o=1,a=n.prototype;a.update=function(e){if((!this.isComputed||this.isFn)&&(this.value=e),this.dirs.length||this.subs.length){var t=this;s.push({id:this.id,execute:function(){t.unbound||t._update()}})}},a._update=function(){for(var e=this.dirs.length,t=this.val();e--;)this.dirs[e].update(t);this.pub()},a.val=function(){return this.isComputed&&!this.isFn?this.value.$get():this.value},a.pub=function(){for(var e=this.subs.length;e--;)this.subs[e].update()},a.unbind=function(){this.unbound=!0;for(var e=this.dirs.length;e--;)this.dirs[e].unbind();e=this.deps.length;for(var t;e--;){t=this.deps[e].subs;var i=t.indexOf(this);i>-1&&t.splice(i,1)}},i.exports=n}),e.register("vue/src/observer.js",function(e,t,i){function n(e){x(j,e,function(){var t,i,n=E.call(arguments),o=Array.prototype[e].apply(this,n);return"push"===e||"unshift"===e?t=n:"pop"===e||"shift"===e?i=[o]:"splice"===e&&(t=n.slice(2),i=o),r(this,t),s(this,i),this.__emitter__.emit("mutate","",this,{method:e,args:n,result:o,inserted:t,removed:i}),o},!A)}function r(e,t){if(t)for(var i,n,r=t.length;r--;)i=t[r],o(i)&&(i.__emitter__||(a(i),u(i)),n=i.__emitter__.owners,n.indexOf(e)<0&&n.push(e))}function s(e,t){if(t)for(var i,n=t.length;n--;)if(i=t[n],i&&i.__emitter__){var r=i.__emitter__.owners;r&&r.splice(r.indexOf(e))}}function o(e){return"object"==typeof e&&e&&!e.$compiler}function a(e){if(e.__emitter__)return!0;var t=new y;return x(e,"__emitter__",t),t.on("set",function(t,i,n){n&&c(e)}).on("mutate",function(){c(e)}),t.values=_.hash(),t.owners=[],!1}function c(e){for(var t=e.__emitter__.owners,i=t.length;i--;)t[i].__emitter__.emit("set","","",!0)}function u(e){k(e)?f(e):h(e)}function l(e,t){if(A)e.__proto__=t;else for(var i in t)x(e,i,t[i])}function h(e){l(e,O);for(var t in e)d(e,t)}function f(e){l(e,j),r(e,e)}function d(e,t){function i(e,i){s[t]=e,r.emit("set",t,e,i),k(e)&&r.emit("set",t+".length",e.length,i),g(e,t,r)}var n=t.charAt(0);if("$"!==n&&"_"!==n){var r=e.__emitter__,s=r.values;i(e[t]),w(e,t,{enumerable:!0,configurable:!0,get:function(){var e=s[t];return N.shouldGet&&r.emit("get",t),e},set:function(e){var n=s[t];b(n,t,r),v(e,n),i(e,!0)}})}}function p(e){var t=e&&e.__emitter__;if(t)if(k(e))t.emit("set","length",e.length);else{var i,n;for(i in e)n=e[i],t.emit("set",i,n),p(n)}}function v(e,t){if($(e)&&$(t)){var i,n,r;for(i in t)C.call(e,i)||(n=t[i],k(n)?e[i]=[]:$(n)?(r=e[i]={},v(r,n)):e[i]=void 0)}}function m(e,t){for(var i,n=t.split("."),r=0,s=n.length-1;s>r;r++)i=n[r],e[i]||(e[i]={},e.__emitter__&&d(e,i)),e=e[i];$(e)&&(i=n[r],C.call(e,i)||(e[i]=void 0,e.__emitter__&&d(e,i)))}function g(e,t,i){if(o(e)){var n=t?t+".":"",r=a(e),s=e.__emitter__;i.proxies=i.proxies||{};var c=i.proxies[n]={get:function(e){i.emit("get",n+e)},set:function(r,s,o){r&&i.emit("set",n+r,s),t&&o&&i.emit("set",t,e,!0)},mutate:function(e,r,s){var o=e?n+e:t;i.emit("mutate",o,r,s);var a=s.method;"sort"!==a&&"reverse"!==a&&i.emit("set",o+".length",r.length)}};s.on("get",c.get).on("set",c.set).on("mutate",c.mutate),r?p(e):u(e)}}function b(e,t,i){if(e&&e.__emitter__){t=t?t+".":"";var n=i.proxies[t];n&&(e.__emitter__.off("get",n.get).off("set",n.set).off("mutate",n.mutate),i.proxies[t]=null)}}var y=t("./emitter"),_=t("./utils"),x=_.defProtected,$=_.isObject,k=Array.isArray,C={}.hasOwnProperty,w=Object.defineProperty,E=[].slice,A={}.__proto__,j=Object.create(Array.prototype);["push","pop","shift","unshift","splice","sort","reverse"].forEach(n),x(j,"$set",function(e,t){return this.splice(e,1,t)[0]},!A),x(j,"$remove",function(e){return"number"!=typeof e&&(e=this.indexOf(e)),e>-1?this.splice(e,1)[0]:void 0},!A);var O=Object.create(Object.prototype);x(O,"$add",function(e,t){C.call(this,e)||(this[e]=t,d(this,e),this.__emitter__.emit("set",e,t,!0))},!A),x(O,"$delete",function(e){C.call(this,e)&&(this[e]=void 0,delete this[e],this.__emitter__.emit("delete",e))},!A);var N=i.exports={shouldGet:!1,observe:g,unobserve:b,ensurePath:m,copyPaths:v,watch:u,convert:a,convertKey:d}}),e.register("vue/src/directive.js",function(e,t,i){function n(e,t,i,r,o){this.id=s++,this.name=e,this.compiler=r,this.vm=r.vm,this.el=o,this.computeFilters=!1,this.key=t.key,this.arg=t.arg,this.expression=t.expression;var a=""===this.expression;if("function"==typeof i)this[a?"bind":"_update"]=i;else for(var l in i)"unbind"===l||"update"===l?this["_"+l]=i[l]:this[l]=i[l];if(a||this.isEmpty)return this.isEmpty=!0,void 0;this.expression=(this.isLiteral?r.eval(this.expression):this.expression).trim();var h,f,d,p,v,m=t.filters;if(m)for(this.filters=[],d=0,p=m.length;p>d;d++)h=m[d],f=this.compiler.getOption("filters",h.name),f&&(h.apply=f,this.filters.push(h),f.computed&&(v=!0));this.filters&&this.filters.length||(this.filters=null),v&&(this.computedKey=n.inlineFilters(this.key,this.filters),this.filters=null),this.isExp=v||!u.test(this.key)||c.test(this.key)}function r(e){return e.indexOf('"')>-1?e.replace(l,"'"):e}var s=1,o=/^[\w\$-]+$/,a=/[^\s'"]+|'[^']+'|"[^"]+"/g,c=/^\$(parent|root)\./,u=/^[\w\.$]+$/,l=/"/g,h=n.prototype;h.update=function(e,t){(t||e!==this.value||e&&"object"==typeof e)&&(this.value=e,this._update&&this._update(this.filters&&!this.computeFilters?this.applyFilters(e):e,t))},h.applyFilters=function(e){for(var t,i=e,n=0,r=this.filters.length;r>n;n++)t=this.filters[n],i=t.apply.apply(this.vm,[i].concat(t.args));return i},h.unbind=function(){this.el&&this.vm&&(this._unbind&&this._unbind(),this.vm=this.el=this.binding=this.compiler=null)},n.parse=function(e){function t(){v.expression=e.slice(f,g).trim(),void 0===v.key?v.key=e.slice(d,g).trim():m!==f&&i(),(0===g||v.key)&&p.push(v)}function i(){var t,i=e.slice(m,g).trim();if(i){t={};var n=i.match(a);t.name=n[0],t.args=n.length>1?n.slice(1):null}t&&(v.filters=v.filters||[]).push(t),m=g+1}for(var n,r,s=!1,c=!1,u=0,l=0,h=0,f=0,d=0,p=[],v={},m=0,g=0,b=e.length;b>g;g++)r=e.charAt(g),s?"'"===r&&(s=!s):c?'"'===r&&(c=!c):","!==r||h||u||l?":"!==r||v.key||v.arg?"|"===r&&"|"!==e.charAt(g+1)&&"|"!==e.charAt(g-1)?void 0===v.key?(m=g+1,v.key=e.slice(d,g).trim()):i():'"'===r?c=!0:"'"===r?s=!0:"("===r?h++:")"===r?h--:"["===r?l++:"]"===r?l--:"{"===r?u++:"}"===r&&u--:(n=e.slice(f,g).trim(),o.test(n)&&(d=g+1,v.arg=e.slice(f,g).trim())):(t(),v={},f=d=m=g+1);return(0===g||f!==g)&&t(),p},n.inlineFilters=function(e,t){for(var i,n,s=0,o=t.length;o>s;s++)n=t[s],i=n.args?',"'+n.args.map(r).join('","')+'"':"",e='this.$compiler.getOption("filters", "'+n.name+'").call(this,'+e+i+")";return e},i.exports=n}),e.register("vue/src/exp-parser.js",function(e,t){function i(e){return e=e.replace(p,"").replace(v,",").replace(d,"").replace(m,"").replace(g,""),e?e.split(/,+/):[]}function n(e,t,i){var n="",r=0,s=t;if(i&&void 0!==o.get(i,e))return"$temp.";for(;t&&!t.hasKey(e);)t=t.parent,r++;if(t){for(;r--;)n+="$parent.";t.bindings[e]||"$"===e.charAt(0)||t.createBinding(e)}else s.createBinding(e);return n}function r(e,t){var i;try{i=new Function(e)}catch(n){}return i}function s(e){return"$"===e.charAt(0)?"\\"+e:e}var o=t("./utils"),a=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/g,c=/"(\d+)"/g,u=/\n/g,l=new RegExp("constructor".split("").join("['\"+, ]*")),h=/\\u\d\d\d\d/,f="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,undefined,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,Math",d=new RegExp(["\\b"+f.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),p=/\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,v=/[^\w$]+/g,m=/\b\d[^,]*/g,g=/^,+|,+$/g;e.parse=function(e,t,f){function d(e){var t=y.length;return y[t]=e.replace(u,"\\n"),'"'+t+'"'}function p(e){var i=e.charAt(0);e=e.slice(1);var r="this."+n(e,t,f)+e;return b[e]||(g+=r+";",b[e]=1),i+r}function v(e,t){return y[t]}if(!h.test(e)&&!l.test(e)){var m=i(e);if(!m.length)return r("return "+e,e);m=o.unique(m);var g="",b=o.hash(),y=[],_=new RegExp("[^$\\w\\.]("+m.map(s).join("|")+")[$\\w\\.]*\\b","g"),x=(" "+e).replace(a,d).replace(_,p).replace(c,v);return x=g+"return "+x,r(x,e)}},e.eval=function(t,i,n){var r,s=e.parse(t,i,n);return s&&(i.vm.$temp=n,r=s.call(i.vm),delete i.vm.$temp),r}}),e.register("vue/src/text-parser.js",function(e,t){function i(){var e=n(u),t=n(l);return new RegExp(e+e+e+"?(.+?)"+t+"?"+t+t)}function n(e){return e.replace(h,"\\$&")}function r(t){e.delimiters=t,u=t[0],l=t[1],f=i()}function s(e){if(!f.test(e))return null;for(var t,i,n,r,s=[];t=e.match(f);)i=t.index,i>0&&s.push(e.slice(0,i)),n={key:t[1].trim()},r=t[0],n.html=r.charAt(2)===u&&r.charAt(r.length-3)===l,s.push(n),e=e.slice(i+t[0].length);return e.length&&s.push(e),s}function o(e){c=c||t("./directive");var i=s(e);if(!i)return null;if(1===i.length)return i[0].key;for(var n,r=[],o=0,u=i.length;u>o;o++)n=i[o],r.push(n.key?a(n.key):'"'+n+'"');return r.join("+")}function a(e){if(e.indexOf("|")>-1){var t=c.parse(e),i=t&&t[0];i&&i.filters&&(e=c.inlineFilters(i.key,i.filters))}return"("+e+")"}var c,u="{",l="}",h=/[-.*+?^${}()|[\]\/\\]/g,f=i();e.parse=s,e.parseAttr=o,e.setDelimiters=r,e.delimiters=[u,l]}),e.register("vue/src/deps-parser.js",function(e,t,i){function n(e){if(!e.isFn){var t=o.hash();e.deps=[],c.on("get",function(i){var n=t[i.key];n&&n.compiler===i.compiler||i.compiler.repeat&&!r(i.compiler,e.compiler)||(t[i.key]=i,e.deps.push(i),i.subs.push(e))}),e.value.$get(),c.off("get")}}function r(e,t){for(;t;){if(e===t)return!0;t=t.parent}}var s=t("./emitter"),o=t("./utils"),a=t("./observer"),c=new s;i.exports={catcher:c,parse:function(e){a.shouldGet=!0,e.forEach(n),a.shouldGet=!1}}}),e.register("vue/src/filters.js",function(e,t,i){function n(e,t){if(s.isObject(e)){for(var i in e)if(n(e[i],t))return!0}else if(null!=e)return e.toString().toLowerCase().indexOf(t)>-1}function r(e){return c.test(e)?e.slice(1,-1):void 0}var s=t("./utils"),o=s.get,a=[].slice,c=/^'.*'$/,u=i.exports=s.hash();u.capitalize=function(e){return e||0===e?(e=e.toString(),e.charAt(0).toUpperCase()+e.slice(1)):""},u.uppercase=function(e){return e||0===e?e.toString().toUpperCase():""},u.lowercase=function(e){return e||0===e?e.toString().toLowerCase():""},u.currency=function(e,t){if(!e&&0!==e)return"";t=t||"$";var i=Math.floor(e).toString(),n=i.length%3,r=n>0?i.slice(0,n)+(i.length>3?",":""):"",s="."+e.toFixed(2).slice(-2);return t+r+i.slice(n).replace(/(\d{3})(?=\d)/g,"$1,")+s},u.pluralize=function(e){var t=a.call(arguments,1);return t.length>1?t[e-1]||t[t.length-1]:t[e-1]||t[0]+"s"};var l={enter:13,tab:9,"delete":46,up:38,left:37,right:39,down:40,esc:27};u.key=function(e,t){if(e){var i=l[t];return i||(i=parseInt(t,10)),function(t){return t.keyCode===i?e.call(this,t):void 0}}},u.filterBy=function(e,t,i,a){i&&"in"!==i&&(a=i);var c=r(t)||this.$get(t);return c?(c=c.toLowerCase(),a=a&&(r(a)||this.$get(a)),Array.isArray(e)||(e=s.objectToArray(e)),e.filter(function(e){return a?n(o(e,a),c):n(e,c)})):e},u.filterBy.computed=!0,u.orderBy=function(e,t,i){var n=r(t)||this.$get(t);if(!n)return e;Array.isArray(e)||(e=s.objectToArray(e));var a=1;return i&&("-1"===i?a=-1:"!"===i.charAt(0)?(i=i.slice(1),a=this.$get(i)?1:-1):a=this.$get(i)?-1:1),e.slice().sort(function(e,t){return e=o(e,n),t=o(t,n),e===t?0:e>t?a:-a})},u.orderBy.computed=!0}),e.register("vue/src/transition.js",function(e,t,i){function n(e,t,i,n){if(!o.trans)return i(),f.CSS_SKIP;var r,s=e.classList,c=e.vue_trans_cb,l=a.enterClass,h=a.leaveClass,d=n?o.anim:o.trans;return c&&(e.removeEventListener(d,c),s.remove(l),s.remove(h),e.vue_trans_cb=null),t>0?(s.add(l),i(),n?(r=function(t){t.target===e&&(e.removeEventListener(d,r),e.vue_trans_cb=null,s.remove(l))},e.addEventListener(d,r),e.vue_trans_cb=r):u.push({execute:function(){s.remove(l)}}),f.CSS_E):(e.offsetWidth||e.offsetHeight?(s.add(h),r=function(t){t.target===e&&(e.removeEventListener(d,r),e.vue_trans_cb=null,i(),s.remove(h))},e.addEventListener(d,r),e.vue_trans_cb=r):i(),f.CSS_L)}function r(e,t,i,n,r){function s(t,i){var n=l(function(){t(),u.splice(u.indexOf(n),1),u.length||(e.vue_timeouts=null)},i);u.push(n)}var o=r.getOption("effects",n);if(!o)return i(),f.JS_SKIP;var a=o.enter,c=o.leave,u=e.vue_timeouts;if(u)for(var d=u.length;d--;)h(u[d]);return u=e.vue_timeouts=[],t>0?"function"!=typeof a?(i(),f.JS_SKIP_E):(a(e,i,s),f.JS_E):"function"!=typeof c?(i(),f.JS_SKIP_L):(c(e,i,s),f.JS_L)}function s(){var e=document.createElement("vue"),t="transitionend",i={transition:t,mozTransition:t,webkitTransition:"webkitTransitionEnd"},n={};for(var r in i)if(void 0!==e.style[r]){n.trans=i[r];break}return n.anim=""===e.style.animation?"animationend":"webkitAnimationEnd",n}var o=s(),a=t("./config"),c=t("./batcher"),u=new c,l=window.setTimeout,h=window.clearTimeout,f={CSS_E:1,CSS_L:2,JS_E:3,JS_L:4,CSS_SKIP:-1,JS_SKIP:-2,JS_SKIP_E:-3,JS_SKIP_L:-4,INIT:-5,SKIP:-6};u._preFlush=function(){document.body.offsetHeight};var d=i.exports=function(e,t,i,s){var o=function(){i(),s.execHook(t>0?"attached":"detached")};if(s.init)return o(),f.INIT;var a=""===e.vue_trans,c=""===e.vue_anim,u=e.vue_effect;return u?r(e,t,o,u,s):a||c?n(e,t,o,c):(o(),f.SKIP)};d.codes=f}),e.register("vue/src/batcher.js",function(e,t,i){function n(){this.reset()}var r=t("./utils"),s=n.prototype;s.push=function(e){if(e.id&&this.has[e.id]){if(e.override){var t=this.has[e.id];t.cancelled=!0,this.queue.push(e),this.has[e.id]=e}}else this.queue.push(e),this.has[e.id]=e,this.waiting||(this.waiting=!0,r.nextTick(r.bind(this.flush,this)))},s.flush=function(){this._preFlush&&this._preFlush();for(var e=0;e<this.queue.length;e++){var t=this.queue[e];t.cancelled||t.execute()}this.reset()},s.reset=function(){this.has=r.hash(),this.queue=[],this.waiting=!1},i.exports=n}),e.register("vue/src/directives/index.js",function(e,t,i){var n=t("../utils"),r=t("../config"),s=t("../transition"),o=i.exports=n.hash();o.component={isLiteral:!0,bind:function(){this.el.vue_vm||(this.childVM=new this.Ctor({el:this.el,parent:this.vm}))},unbind:function(){this.childVM&&this.childVM.$destroy()}},o.attr={bind:function(){var e=this.vm.$options.paramAttributes;this.isParam=e&&e.indexOf(this.arg)>-1},update:function(e){e||0===e?this.el.setAttribute(this.arg,e):this.el.removeAttribute(this.arg),this.isParam&&(this.vm[this.arg]=n.checkNumber(e))}},o.text={bind:function(){this.attr=3===this.el.nodeType?"nodeValue":"textContent"},update:function(e){this.el[this.attr]=n.guard(e)}},o.show=function(e){var t=this.el,i=e?"":"none",n=function(){t.style.display=i};s(t,e?1:-1,n,this.compiler)},o["class"]=function(e){this.arg?n[e?"addClass":"removeClass"](this.el,this.arg):(this.lastVal&&n.removeClass(this.el,this.lastVal),e&&(n.addClass(this.el,e),this.lastVal=e))},o.cloak={isEmpty:!0,bind:function(){var e=this.el; +this.compiler.observer.once("hook:ready",function(){e.removeAttribute(r.prefix+"-cloak")})}},o.ref={isLiteral:!0,bind:function(){var e=this.expression;e&&(this.vm.$parent.$[e]=this.vm)},unbind:function(){var e=this.expression;e&&delete this.vm.$parent.$[e]}},o.on=t("./on"),o.repeat=t("./repeat"),o.model=t("./model"),o["if"]=t("./if"),o["with"]=t("./with"),o.html=t("./html"),o.style=t("./style"),o.partial=t("./partial"),o.view=t("./view")}),e.register("vue/src/directives/if.js",function(e,t,i){var n=t("../utils");i.exports={bind:function(){this.parent=this.el.parentNode,this.ref=document.createComment("vue-if"),this.Ctor=this.compiler.resolveComponent(this.el),this.parent.insertBefore(this.ref,this.el),this.parent.removeChild(this.el),n.attr(this.el,"view"),n.attr(this.el,"repeat")},update:function(e){e?this.childVM||(this.childVM=new this.Ctor({el:this.el.cloneNode(!0),parent:this.vm}),this.compiler.init?this.parent.insertBefore(this.childVM.$el,this.ref):this.childVM.$before(this.ref)):this._unbind()},unbind:function(){this.childVM&&(this.childVM.$destroy(),this.childVM=null)}}}),e.register("vue/src/directives/repeat.js",function(e,t,i){function n(e,t){for(var i,n=0,r=e.length;r>n;n++)if(i=e[n],!i.$reused&&i.$value===t)return n;return-1}var r=t("../utils"),s=t("../config");i.exports={bind:function(){this.identifier="$r"+this.id,this.expCache=r.hash();var e=this.el,t=this.container=e.parentNode;this.childId=this.compiler.eval(r.attr(e,"ref")),this.ref=document.createComment(s.prefix+"-repeat-"+this.key),t.insertBefore(this.ref,e),t.removeChild(e),this.collection=null,this.vms=null},update:function(e){Array.isArray(e)||r.isObject(e)&&(e=r.objectToArray(e)),this.oldVMs=this.vms,this.oldCollection=this.collection,e=this.collection=e||[];var t=e[0]&&r.isObject(e[0]);this.vms=this.oldCollection?this.diff(e,t):this.init(e,t),this.childId&&(this.vm.$[this.childId]=this.vms)},init:function(e,t){for(var i,n=[],r=0,s=e.length;s>r;r++)i=this.build(e[r],r,t),n.push(i),this.compiler.init?this.container.insertBefore(i.$el,this.ref):i.$before(this.ref);return n},diff:function(e,t){var i,r,s,o,a,c,u,l,h=this.container,f=this.oldVMs,d=[];for(d.length=e.length,i=0,r=e.length;r>i;i++)s=e[i],t?(s.$index=i,s.__emitter__&&s.__emitter__[this.identifier]?s.$reused=!0:d[i]=this.build(s,i,t)):(a=n(f,s),a>-1?(f[a].$reused=!0,f[a].$data.$index=i):d[i]=this.build(s,i,t));for(i=0,r=f.length;r>i;i++)o=f[i],s=this.arg?o.$data[this.arg]:o.$data,s.$reused&&(o.$reused=!0,delete s.$reused),o.$reused?(o.$index=s.$index,s.$key&&s.$key!==o.$key&&(o.$key=s.$key),d[o.$index]=o):(s.__emitter__&&delete s.__emitter__[this.identifier],o.$destroy());for(i=d.length;i--;)if(o=d[i],s=o.$data,c=d[i+1],o.$reused){for(l=o.$el.nextSibling;!l.vue_vm&&l!==this.ref;)l=l.nextSibling;if(u=l.vue_vm,u!==c)if(c){for(l=c.$el;!l.parentNode;)c=d[l.vue_vm.$index+1],l=c?c.$el:this.ref;h.insertBefore(o.$el,l)}else h.insertBefore(o.$el,this.ref);delete o.$reused,delete s.$index,delete s.$key}else o.$before(c?c.$el:this.ref);return d},build:function(e,t,i){var n,r,s=!i||this.arg;s&&(n=e,r=this.arg||"$value",e={},e[r]=n),e.$index=t;var o=this.el.cloneNode(!0),a=this.compiler.resolveComponent(o,e),c=new a({el:o,data:e,parent:this.vm,compilerOptions:{repeat:!0,expCache:this.expCache}});if(i&&((n||e).__emitter__[this.identifier]=!0),s){var u=this,l=function(e){u.lock=!0,u.collection.$set(c.$index,e),u.lock=!1};c.$compiler.observer.on("change:"+r,l)}return c},unbind:function(){if(this.childId&&delete this.vm.$[this.childId],this.vms)for(var e=this.vms.length;e--;)this.vms[e].$destroy()}}}),e.register("vue/src/directives/on.js",function(e,t,i){t("../utils");i.exports={isFn:!0,bind:function(){this.context=this.binding.isExp?this.vm:this.binding.compiler.vm},update:function(e){if("function"==typeof e){this._unbind();var t=this.vm,i=this.context;this.handler=function(n){n.targetVM=t,i.$event=n;var r=e.call(i,n);return i.$event=null,r},this.el.addEventListener(this.arg,this.handler)}},unbind:function(){this.el.removeEventListener(this.arg,this.handler)}}}),e.register("vue/src/directives/model.js",function(e,t,i){function n(e){return o.call(e.options,function(e){return e.selected}).map(function(e){return e.value||e.text})}var r=t("../utils"),s=navigator.userAgent.indexOf("MSIE 9.0")>0,o=[].filter;i.exports={bind:function(){var e=this,t=e.el,i=t.type,n=t.tagName;e.lock=!1,e.ownerVM=e.binding.compiler.vm,e.event=e.compiler.options.lazy||"SELECT"===n||"checkbox"===i||"radio"===i?"change":"input",e.attr="checkbox"===i?"checked":"INPUT"===n||"SELECT"===n||"TEXTAREA"===n?"value":"innerHTML","SELECT"===n&&t.hasAttribute("multiple")&&(this.multi=!0);var o=!1;e.cLock=function(){o=!0},e.cUnlock=function(){o=!1},t.addEventListener("compositionstart",this.cLock),t.addEventListener("compositionend",this.cUnlock),e.set=e.filters?function(){if(!o){var i;try{i=t.selectionStart}catch(n){}e._set(),r.nextTick(function(){void 0!==i&&t.setSelectionRange(i,i)})}}:function(){o||(e.lock=!0,e._set(),r.nextTick(function(){e.lock=!1}))},t.addEventListener(e.event,e.set),s&&(e.onCut=function(){r.nextTick(function(){e.set()})},e.onDel=function(t){(46===t.keyCode||8===t.keyCode)&&e.set()},t.addEventListener("cut",e.onCut),t.addEventListener("keyup",e.onDel))},_set:function(){this.ownerVM.$set(this.key,this.multi?n(this.el):this.el[this.attr])},update:function(e,t){if(t&&void 0===e)return this._set();if(!this.lock){var i=this.el;"SELECT"===i.tagName?(i.selectedIndex=-1,this.multi&&Array.isArray(e)?e.forEach(this.updateSelect,this):this.updateSelect(e)):"radio"===i.type?i.checked=e==i.value:"checkbox"===i.type?i.checked=!!e:i[this.attr]=r.guard(e)}},updateSelect:function(e){for(var t=this.el.options,i=t.length;i--;)if(t[i].value==e){t[i].selected=!0;break}},unbind:function(){var e=this.el;e.removeEventListener(this.event,this.set),e.removeEventListener("compositionstart",this.cLock),e.removeEventListener("compositionend",this.cUnlock),s&&(e.removeEventListener("cut",this.onCut),e.removeEventListener("keyup",this.onDel))}}}),e.register("vue/src/directives/with.js",function(e,t,i){var n=t("../utils");i.exports={bind:function(){var e=this,t=e.arg,i=e.key,r=e.compiler,s=e.binding.compiler;return r===s?(this.alone=!0,void 0):(t&&(r.bindings[t]||r.createBinding(t),r.observer.on("change:"+t,function(t){r.init||(e.lock||(e.lock=!0,n.nextTick(function(){e.lock=!1})),s.vm.$set(i,t))})),void 0)},update:function(e){this.alone||this.lock||(this.arg?this.vm.$set(this.arg,e):this.vm.$data=e)}}}),e.register("vue/src/directives/html.js",function(e,t,i){var n=t("../utils").guard,r=[].slice;i.exports={bind:function(){8===this.el.nodeType&&(this.holder=document.createElement("div"),this.nodes=[])},update:function(e){e=n(e),this.holder?this.swap(e):this.el.innerHTML=e},swap:function(e){for(var t,i=this.el.parentNode,n=this.holder,s=this.nodes,o=s.length;o--;)i.removeChild(s[o]);for(n.innerHTML=e,s=this.nodes=r.call(n.childNodes),o=0,t=s.length;t>o;o++)i.insertBefore(s[o],this.el)}}}),e.register("vue/src/directives/style.js",function(e,t,i){function n(e){return e[1].toUpperCase()}var r=/-([a-z])/g,s=["webkit","moz","ms"];i.exports={bind:function(){var e=this.arg;if(e){var t=e.charAt(0);"$"===t?(e=e.slice(1),this.prefixed=!0):"-"===t&&(e=e.slice(1)),this.prop=e.replace(r,n)}},update:function(e){var t=this.prop;if(t){if(this.el.style[t]=e,this.prefixed){t=t.charAt(0).toUpperCase()+t.slice(1);for(var i=s.length;i--;)this.el.style[s[i]+t]=e}}else this.el.style.cssText=e}}}),e.register("vue/src/directives/partial.js",function(e,t,i){t("../utils");i.exports={isLiteral:!0,bind:function(){var e=this.expression;if(e){var t=this.el,i=this.compiler,n=i.getOption("partials",e);if(n)if(n=n.cloneNode(!0),8===t.nodeType){var r=[].slice.call(n.childNodes),s=t.parentNode;s.insertBefore(n,t),s.removeChild(t),r.forEach(i.compile,i)}else t.innerHTML="",t.appendChild(n.cloneNode(!0))}}}}),e.register("vue/src/directives/view.js",function(e,t,i){i.exports={bind:function(){var e=this.raw=this.el,t=e.parentNode,i=this.ref=document.createComment("v-view");t.insertBefore(i,e),t.removeChild(e);for(var n,r=this.inner=document.createElement("div");n=e.firstChild;)r.appendChild(n)},update:function(e){this._unbind();var t=this.compiler.getOption("components",e);t&&(this.childVM=new t({el:this.raw.cloneNode(!0),parent:this.vm,compilerOptions:{rawContent:this.inner.cloneNode(!0)}}),this.el=this.childVM.$el,this.compiler.init?this.ref.parentNode.insertBefore(this.el,this.ref):this.childVM.$before(this.ref))},unbind:function(){this.childVM&&this.childVM.$destroy()}}}),e.alias("vue/src/main.js","vue/index.js"),"object"==typeof exports?module.exports=e("vue"):"function"==typeof define&&define.amd?define(function(){return e("vue")}):window.Vue=e("vue")}(); \ No newline at end of file diff --git a/www/templates/__base__.html b/www/templates/__base__.html new file mode 100644 index 0000000..9a526c5 --- /dev/null +++ b/www/templates/__base__.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + {% block meta %}<!-- block meta -->{% endblock %} + <title>{% block title %} ? {% endblock %} - Awesome Python Webapp + + + + + + + + + + + {% block beforehead %}{% endblock %} + + + + +
+
+ + {% block content %} + {% endblock %} + +
+
+ +
+
+
+

+ + + + +

+

Powered by Awesome Python Webapp. Copyright © 2014. [Manage]

+

www.liaoxuefeng.com. All rights reserved.

+ +
+ +
+
+ + diff --git a/www/templates/blog.html b/www/templates/blog.html new file mode 100644 index 0000000..d68c487 --- /dev/null +++ b/www/templates/blog.html @@ -0,0 +1,109 @@ +{% extends '__base__.html' %} + +{% block title %}{{ blog.name }}{% endblock %} + +{% block beforehead %} + + + +{% endblock %} + +{% block content %} + +
+
+

{{ blog.name }}

+ +

{{ blog.html_content|safe }}

+
+ +
+ + {% if user %} +

发表评论

+ +
+
+ +

{{ user.name }}

+
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+ {% endif %} + +

最新评论

+ +
    + {% for comment in comments %} +
  • +
    +
    + +

    {{ comment.user_name }} {% if comment.user_id==blog.user_id %}(作者){% endif %}

    +

    {{ comment.created_at|datetime }}

    +
    +
    +

    {{ comment.content }}

    +
    +
    +
  • + {% else %} +

    还没有人评论...

    + {% endfor %} +
+ +
+ +
+
+
+ +

{{ blog.user_name }}

+
+
+
+

友情链接

+ +
+
+ +{% endblock %} diff --git a/www/templates/blogs.html b/www/templates/blogs.html new file mode 100644 index 0000000..671d931 --- /dev/null +++ b/www/templates/blogs.html @@ -0,0 +1,51 @@ +{% extends '__base__.html' %} + +{% block title %}日志{% endblock %} + +{% block beforehead %} + + + +{% endblock %} + +{% block content %} + +
+ {% for blog in blogs %} + +
+ {% endfor %} +
    + {% if page.has_previous %} +
  • + {% else %} +
  • + {% endif %} +
  • {{ page.page_index }}
  • + {% if page.has_next %} +
  • + {% else %} +
  • + {% endif %} +
+
+ +
+
+

友情链接

+ +
+
+ +{% endblock %} diff --git a/www/templates/manage_blog_edit.html b/www/templates/manage_blog_edit.html new file mode 100644 index 0000000..4342423 --- /dev/null +++ b/www/templates/manage_blog_edit.html @@ -0,0 +1,109 @@ +{% extends '__base__.html' %} + +{% block title %}编辑日志{% endblock %} + +{% block beforehead %} + + + +{% endblock %} + +{% block content %} + +
+
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+ +{% endblock %} diff --git a/www/templates/manage_blog_list.html b/www/templates/manage_blog_list.html new file mode 100644 index 0000000..69e8e60 --- /dev/null +++ b/www/templates/manage_blog_list.html @@ -0,0 +1,115 @@ +{% extends '__base__.html' %} + +{% block title %}日志{% endblock %} + +{% block beforehead %} + + + +{% endblock %} + +{% block content %} + +
+
+ +
+
+ +
+
+
+ + + +
+ 正在加载... +
+{% endblock %} diff --git a/www/templates/manage_comment_list.html b/www/templates/manage_comment_list.html new file mode 100644 index 0000000..2ad0b9e --- /dev/null +++ b/www/templates/manage_comment_list.html @@ -0,0 +1,110 @@ +{% extends '__base__.html' %} + +{% block title %}评论{% endblock %} + +{% block beforehead %} + + + +{% endblock %} + +{% block content %} + +
+
+ +
+
+ +
+
+
+ + + +
+ 正在加载... +
+{% endblock %} diff --git a/www/templates/manage_user_list.html b/www/templates/manage_user_list.html new file mode 100644 index 0000000..b61d876 --- /dev/null +++ b/www/templates/manage_user_list.html @@ -0,0 +1,96 @@ +{% extends '__base__.html' %} + +{% block title %}用户{% endblock %} + +{% block beforehead %} + + + +{% endblock %} + +{% block content %} + +
+
+ +
+
+ +
+
+
+ + + +
+ 正在加载... +
+{% endblock %} diff --git a/www/templates/register.html b/www/templates/register.html new file mode 100644 index 0000000..41b295e --- /dev/null +++ b/www/templates/register.html @@ -0,0 +1,97 @@ +{% extends '__base__.html' %} + +{% block title %}注册{% endblock %} + +{% block beforehead %} + + + +{% endblock %} + +{% block content %} + +
+

欢迎注册!

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +{% endblock %} diff --git a/www/templates/signin.html b/www/templates/signin.html new file mode 100644 index 0000000..9e0ce4f --- /dev/null +++ b/www/templates/signin.html @@ -0,0 +1,82 @@ + + + + + 登录 - Awesome Python Webapp + + + + + + + + + + + +
+
+

Awesome Python Webapp

+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+ +
+
+
+
+ + diff --git a/www/test/jinja2-test.html b/www/test/jinja2-test.html new file mode 100644 index 0000000..5c94679 --- /dev/null +++ b/www/test/jinja2-test.html @@ -0,0 +1 @@ +

Hello, {{ name }}.

{{ posted_at|datetime }} \ No newline at end of file diff --git a/www/transwarp/__init__.py b/www/transwarp/__init__.py new file mode 100644 index 0000000..5d95bb5 --- /dev/null +++ b/www/transwarp/__init__.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + \ No newline at end of file diff --git a/www/transwarp/db.py b/www/transwarp/db.py new file mode 100644 index 0000000..0a8601e --- /dev/null +++ b/www/transwarp/db.py @@ -0,0 +1,483 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +''' +Database operation module. +''' + +import time, uuid, functools, threading, logging + +# Dict object: + +class Dict(dict): + ''' + Simple dict but support access as x.y style. + + >>> d1 = Dict() + >>> d1['x'] = 100 + >>> d1.x + 100 + >>> d1.y = 200 + >>> d1['y'] + 200 + >>> d2 = Dict(a=1, b=2, c='3') + >>> d2.c + '3' + >>> d2['empty'] + Traceback (most recent call last): + ... + KeyError: 'empty' + >>> d2.empty + Traceback (most recent call last): + ... + AttributeError: 'Dict' object has no attribute 'empty' + >>> d3 = Dict(('a', 'b', 'c'), (1, 2, 3)) + >>> d3.a + 1 + >>> d3.b + 2 + >>> d3.c + 3 + ''' + def __init__(self, names=(), values=(), **kw): + super(Dict, self).__init__(**kw) + for k, v in zip(names, values): + self[k] = v + + def __getattr__(self, key): + try: + return self[key] + except KeyError: + raise AttributeError(r"'Dict' object has no attribute '%s'" % key) + + def __setattr__(self, key, value): + self[key] = value + +def next_id(t=None): + ''' + Return next id as 50-char string. + + Args: + t: unix timestamp, default to None and using time.time(). + ''' + if t is None: + t = time.time() + return '%015d%s000' % (int(t * 1000), uuid.uuid4().hex) + +def _profiling(start, sql=''): + t = time.time() - start + if t > 0.1: + logging.warning('[PROFILING] [DB] %s: %s' % (t, sql)) + else: + logging.info('[PROFILING] [DB] %s: %s' % (t, sql)) + +class DBError(Exception): + pass + +class MultiColumnsError(DBError): + pass + +class _LasyConnection(object): + + def __init__(self): + self.connection = None + + def cursor(self): + if self.connection is None: + connection = engine.connect() + logging.info('open connection <%s>...' % hex(id(connection))) + self.connection = connection + return self.connection.cursor() + + def commit(self): + self.connection.commit() + + def rollback(self): + self.connection.rollback() + + def cleanup(self): + if self.connection: + connection = self.connection + self.connection = None + logging.info('close connection <%s>...' % hex(id(connection))) + connection.close() + +class _DbCtx(threading.local): + ''' + Thread local object that holds connection info. + ''' + def __init__(self): + self.connection = None + self.transactions = 0 + + def is_init(self): + return not self.connection is None + + def init(self): + logging.info('open lazy connection...') + self.connection = _LasyConnection() + self.transactions = 0 + + def cleanup(self): + self.connection.cleanup() + self.connection = None + + def cursor(self): + ''' + Return cursor + ''' + return self.connection.cursor() + +# thread-local db context: +_db_ctx = _DbCtx() + +# global engine object: +engine = None + +class _Engine(object): + + def __init__(self, connect): + self._connect = connect + + def connect(self): + return self._connect() + +def create_engine(user, password, database, host='127.0.0.1', port=3306, **kw): + import mysql.connector + global engine + if engine is not None: + raise DBError('Engine is already initialized.') + params = dict(user=user, password=password, database=database, host=host, port=port) + defaults = dict(use_unicode=True, charset='utf8', collation='utf8_general_ci', autocommit=False) + for k, v in defaults.iteritems(): + params[k] = kw.pop(k, v) + params.update(kw) + params['buffered'] = True + engine = _Engine(lambda: mysql.connector.connect(**params)) + # test connection... + logging.info('Init mysql engine <%s> ok.' % hex(id(engine))) + +class _ConnectionCtx(object): + ''' + _ConnectionCtx object that can open and close connection context. _ConnectionCtx object can be nested and only the most + outer connection has effect. + + with connection(): + pass + with connection(): + pass + ''' + def __enter__(self): + global _db_ctx + self.should_cleanup = False + if not _db_ctx.is_init(): + _db_ctx.init() + self.should_cleanup = True + return self + + def __exit__(self, exctype, excvalue, traceback): + global _db_ctx + if self.should_cleanup: + _db_ctx.cleanup() + +def connection(): + ''' + Return _ConnectionCtx object that can be used by 'with' statement: + + with connection(): + pass + ''' + return _ConnectionCtx() + +def with_connection(func): + ''' + Decorator for reuse connection. + + @with_connection + def foo(*args, **kw): + f1() + f2() + f3() + ''' + @functools.wraps(func) + def _wrapper(*args, **kw): + with _ConnectionCtx(): + return func(*args, **kw) + return _wrapper + +class _TransactionCtx(object): + ''' + _TransactionCtx object that can handle transactions. + + with _TransactionCtx(): + pass + ''' + + def __enter__(self): + global _db_ctx + self.should_close_conn = False + if not _db_ctx.is_init(): + # needs open a connection first: + _db_ctx.init() + self.should_close_conn = True + _db_ctx.transactions = _db_ctx.transactions + 1 + logging.info('begin transaction...' if _db_ctx.transactions==1 else 'join current transaction...') + return self + + def __exit__(self, exctype, excvalue, traceback): + global _db_ctx + _db_ctx.transactions = _db_ctx.transactions - 1 + try: + if _db_ctx.transactions==0: + if exctype is None: + self.commit() + else: + self.rollback() + finally: + if self.should_close_conn: + _db_ctx.cleanup() + + def commit(self): + global _db_ctx + logging.info('commit transaction...') + try: + _db_ctx.connection.commit() + logging.info('commit ok.') + except: + logging.warning('commit failed. try rollback...') + _db_ctx.connection.rollback() + logging.warning('rollback ok.') + raise + + def rollback(self): + global _db_ctx + logging.warning('rollback transaction...') + _db_ctx.connection.rollback() + logging.info('rollback ok.') + +def transaction(): + ''' + Create a transaction object so can use with statement: + + with transaction(): + pass + + >>> def update_profile(id, name, rollback): + ... u = dict(id=id, name=name, email='%s@test.org' % name, passwd=name, last_modified=time.time()) + ... insert('user', **u) + ... r = update('update user set passwd=? where id=?', name.upper(), id) + ... if rollback: + ... raise StandardError('will cause rollback...') + >>> with transaction(): + ... update_profile(900301, 'Python', False) + >>> select_one('select * from user where id=?', 900301).name + u'Python' + >>> with transaction(): + ... update_profile(900302, 'Ruby', True) + Traceback (most recent call last): + ... + StandardError: will cause rollback... + >>> select('select * from user where id=?', 900302) + [] + ''' + return _TransactionCtx() + +def with_transaction(func): + ''' + A decorator that makes function around transaction. + + >>> @with_transaction + ... def update_profile(id, name, rollback): + ... u = dict(id=id, name=name, email='%s@test.org' % name, passwd=name, last_modified=time.time()) + ... insert('user', **u) + ... r = update('update user set passwd=? where id=?', name.upper(), id) + ... if rollback: + ... raise StandardError('will cause rollback...') + >>> update_profile(8080, 'Julia', False) + >>> select_one('select * from user where id=?', 8080).passwd + u'JULIA' + >>> update_profile(9090, 'Robert', True) + Traceback (most recent call last): + ... + StandardError: will cause rollback... + >>> select('select * from user where id=?', 9090) + [] + ''' + @functools.wraps(func) + def _wrapper(*args, **kw): + _start = time.time() + with _TransactionCtx(): + return func(*args, **kw) + _profiling(_start) + return _wrapper + +def _select(sql, first, *args): + ' execute select SQL and return unique result or list results.' + global _db_ctx + cursor = None + sql = sql.replace('?', '%s') + logging.info('SQL: %s, ARGS: %s' % (sql, args)) + try: + cursor = _db_ctx.connection.cursor() + cursor.execute(sql, args) + if cursor.description: + names = [x[0] for x in cursor.description] + if first: + values = cursor.fetchone() + if not values: + return None + return Dict(names, values) + return [Dict(names, x) for x in cursor.fetchall()] + finally: + if cursor: + cursor.close() + +@with_connection +def select_one(sql, *args): + ''' + Execute select SQL and expected one result. + If no result found, return None. + If multiple results found, the first one returned. + + >>> u1 = dict(id=100, name='Alice', email='alice@test.org', passwd='ABC-12345', last_modified=time.time()) + >>> u2 = dict(id=101, name='Sarah', email='sarah@test.org', passwd='ABC-12345', last_modified=time.time()) + >>> insert('user', **u1) + 1 + >>> insert('user', **u2) + 1 + >>> u = select_one('select * from user where id=?', 100) + >>> u.name + u'Alice' + >>> select_one('select * from user where email=?', 'abc@email.com') + >>> u2 = select_one('select * from user where passwd=? order by email', 'ABC-12345') + >>> u2.name + u'Alice' + ''' + return _select(sql, True, *args) + +@with_connection +def select_int(sql, *args): + ''' + Execute select SQL and expected one int and only one int result. + + >>> n = update('delete from user') + >>> u1 = dict(id=96900, name='Ada', email='ada@test.org', passwd='A-12345', last_modified=time.time()) + >>> u2 = dict(id=96901, name='Adam', email='adam@test.org', passwd='A-12345', last_modified=time.time()) + >>> insert('user', **u1) + 1 + >>> insert('user', **u2) + 1 + >>> select_int('select count(*) from user') + 2 + >>> select_int('select count(*) from user where email=?', 'ada@test.org') + 1 + >>> select_int('select count(*) from user where email=?', 'notexist@test.org') + 0 + >>> select_int('select id from user where email=?', 'ada@test.org') + 96900 + >>> select_int('select id, name from user where email=?', 'ada@test.org') + Traceback (most recent call last): + ... + MultiColumnsError: Expect only one column. + ''' + d = _select(sql, True, *args) + if len(d)!=1: + raise MultiColumnsError('Expect only one column.') + return d.values()[0] + +@with_connection +def select(sql, *args): + ''' + Execute select SQL and return list or empty list if no result. + + >>> u1 = dict(id=200, name='Wall.E', email='wall.e@test.org', passwd='back-to-earth', last_modified=time.time()) + >>> u2 = dict(id=201, name='Eva', email='eva@test.org', passwd='back-to-earth', last_modified=time.time()) + >>> insert('user', **u1) + 1 + >>> insert('user', **u2) + 1 + >>> L = select('select * from user where id=?', 900900900) + >>> L + [] + >>> L = select('select * from user where id=?', 200) + >>> L[0].email + u'wall.e@test.org' + >>> L = select('select * from user where passwd=? order by id desc', 'back-to-earth') + >>> L[0].name + u'Eva' + >>> L[1].name + u'Wall.E' + ''' + return _select(sql, False, *args) + +@with_connection +def _update(sql, *args): + global _db_ctx + cursor = None + sql = sql.replace('?', '%s') + logging.info('SQL: %s, ARGS: %s' % (sql, args)) + try: + cursor = _db_ctx.connection.cursor() + cursor.execute(sql, args) + r = cursor.rowcount + if _db_ctx.transactions==0: + # no transaction enviroment: + logging.info('auto commit') + _db_ctx.connection.commit() + return r + finally: + if cursor: + cursor.close() + +def insert(table, **kw): + ''' + Execute insert SQL. + + >>> u1 = dict(id=2000, name='Bob', email='bob@test.org', passwd='bobobob', last_modified=time.time()) + >>> insert('user', **u1) + 1 + >>> u2 = select_one('select * from user where id=?', 2000) + >>> u2.name + u'Bob' + >>> insert('user', **u2) + Traceback (most recent call last): + ... + IntegrityError: 1062 (23000): Duplicate entry '2000' for key 'PRIMARY' + ''' + cols, args = zip(*kw.iteritems()) + sql = 'insert into `%s` (%s) values (%s)' % (table, ','.join(['`%s`' % col for col in cols]), ','.join(['?' for i in range(len(cols))])) + return _update(sql, *args) + +def update(sql, *args): + r''' + Execute update SQL. + + >>> u1 = dict(id=1000, name='Michael', email='michael@test.org', passwd='123456', last_modified=time.time()) + >>> insert('user', **u1) + 1 + >>> u2 = select_one('select * from user where id=?', 1000) + >>> u2.email + u'michael@test.org' + >>> u2.passwd + u'123456' + >>> update('update user set email=?, passwd=? where id=?', 'michael@example.org', '654321', 1000) + 1 + >>> u3 = select_one('select * from user where id=?', 1000) + >>> u3.email + u'michael@example.org' + >>> u3.passwd + u'654321' + >>> update('update user set passwd=? where id=?', '***', '123\' or id=\'456') + 0 + ''' + return _update(sql, *args) + +if __name__=='__main__': + logging.basicConfig(level=logging.DEBUG) + create_engine('www-data', 'www-data', 'test') + update('drop table if exists user') + update('create table user (id int primary key, name text, email text, passwd text, last_modified real)') + import doctest + doctest.testmod() diff --git a/www/transwarp/orm.py b/www/transwarp/orm.py new file mode 100644 index 0000000..dca955f --- /dev/null +++ b/www/transwarp/orm.py @@ -0,0 +1,320 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +''' +Database operation module. This module is independent with web module. +''' + +import time, logging + +import db + +class Field(object): + + _count = 0 + + def __init__(self, **kw): + self.name = kw.get('name', None) + self._default = kw.get('default', None) + self.primary_key = kw.get('primary_key', False) + self.nullable = kw.get('nullable', False) + self.updatable = kw.get('updatable', True) + self.insertable = kw.get('insertable', True) + self.ddl = kw.get('ddl', '') + self._order = Field._count + Field._count = Field._count + 1 + + @property + def default(self): + d = self._default + return d() if callable(d) else d + + def __str__(self): + s = ['<%s:%s,%s,default(%s),' % (self.__class__.__name__, self.name, self.ddl, self._default)] + self.nullable and s.append('N') + self.updatable and s.append('U') + self.insertable and s.append('I') + s.append('>') + return ''.join(s) + +class StringField(Field): + + def __init__(self, **kw): + if not 'default' in kw: + kw['default'] = '' + if not 'ddl' in kw: + kw['ddl'] = 'varchar(255)' + super(StringField, self).__init__(**kw) + +class IntegerField(Field): + + def __init__(self, **kw): + if not 'default' in kw: + kw['default'] = 0 + if not 'ddl' in kw: + kw['ddl'] = 'bigint' + super(IntegerField, self).__init__(**kw) + +class FloatField(Field): + + def __init__(self, **kw): + if not 'default' in kw: + kw['default'] = 0.0 + if not 'ddl' in kw: + kw['ddl'] = 'real' + super(FloatField, self).__init__(**kw) + +class BooleanField(Field): + + def __init__(self, **kw): + if not 'default' in kw: + kw['default'] = False + if not 'ddl' in kw: + kw['ddl'] = 'bool' + super(BooleanField, self).__init__(**kw) + +class TextField(Field): + + def __init__(self, **kw): + if not 'default' in kw: + kw['default'] = '' + if not 'ddl' in kw: + kw['ddl'] = 'text' + super(TextField, self).__init__(**kw) + +class BlobField(Field): + + def __init__(self, **kw): + if not 'default' in kw: + kw['default'] = '' + if not 'ddl' in kw: + kw['ddl'] = 'blob' + super(BlobField, self).__init__(**kw) + +class VersionField(Field): + + def __init__(self, name=None): + super(VersionField, self).__init__(name=name, default=0, ddl='bigint') + +_triggers = frozenset(['pre_insert', 'pre_update', 'pre_delete']) + +def _gen_sql(table_name, mappings): + pk = None + sql = ['-- generating SQL for %s:' % table_name, 'create table `%s` (' % table_name] + for f in sorted(mappings.values(), lambda x, y: cmp(x._order, y._order)): + if not hasattr(f, 'ddl'): + raise StandardError('no ddl in field "%s".' % n) + ddl = f.ddl + nullable = f.nullable + if f.primary_key: + pk = f.name + sql.append(nullable and ' `%s` %s,' % (f.name, ddl) or ' `%s` %s not null,' % (f.name, ddl)) + sql.append(' primary key(`%s`)' % pk) + sql.append(');') + return '\n'.join(sql) + +class ModelMetaclass(type): + ''' + Metaclass for model objects. + ''' + def __new__(cls, name, bases, attrs): + # skip base Model class: + if name=='Model': + return type.__new__(cls, name, bases, attrs) + + # store all subclasses info: + if not hasattr(cls, 'subclasses'): + cls.subclasses = {} + if not name in cls.subclasses: + cls.subclasses[name] = name + else: + logging.warning('Redefine class: %s' % name) + + logging.info('Scan ORMapping %s...' % name) + mappings = dict() + primary_key = None + for k, v in attrs.iteritems(): + if isinstance(v, Field): + if not v.name: + v.name = k + logging.info('Found mapping: %s => %s' % (k, v)) + # check duplicate primary key: + if v.primary_key: + if primary_key: + raise TypeError('Cannot define more than 1 primary key in class: %s' % name) + if v.updatable: + logging.warning('NOTE: change primary key to non-updatable.') + v.updatable = False + if v.nullable: + logging.warning('NOTE: change primary key to non-nullable.') + v.nullable = False + primary_key = v + mappings[k] = v + # check exist of primary key: + if not primary_key: + raise TypeError('Primary key not defined in class: %s' % name) + for k in mappings.iterkeys(): + attrs.pop(k) + if not '__table__' in attrs: + attrs['__table__'] = name.lower() + attrs['__mappings__'] = mappings + attrs['__primary_key__'] = primary_key + attrs['__sql__'] = lambda self: _gen_sql(attrs['__table__'], mappings) + for trigger in _triggers: + if not trigger in attrs: + attrs[trigger] = None + return type.__new__(cls, name, bases, attrs) + +class Model(dict): + ''' + Base class for ORM. + + >>> class User(Model): + ... id = IntegerField(primary_key=True) + ... name = StringField() + ... email = StringField(updatable=False) + ... passwd = StringField(default=lambda: '******') + ... last_modified = FloatField() + ... def pre_insert(self): + ... self.last_modified = time.time() + >>> u = User(id=10190, name='Michael', email='orm@db.org') + >>> r = u.insert() + >>> u.email + 'orm@db.org' + >>> u.passwd + '******' + >>> u.last_modified > (time.time() - 2) + True + >>> f = User.get(10190) + >>> f.name + u'Michael' + >>> f.email + u'orm@db.org' + >>> f.email = 'changed@db.org' + >>> r = f.update() # change email but email is non-updatable! + >>> len(User.find_all()) + 1 + >>> g = User.get(10190) + >>> g.email + u'orm@db.org' + >>> r = g.delete() + >>> len(db.select('select * from user where id=10190')) + 0 + >>> import json + >>> print User().__sql__() + -- generating SQL for user: + create table `user` ( + `id` bigint not null, + `name` varchar(255) not null, + `email` varchar(255) not null, + `passwd` varchar(255) not null, + `last_modified` real not null, + primary key(`id`) + ); + ''' + __metaclass__ = ModelMetaclass + + def __init__(self, **kw): + super(Model, self).__init__(**kw) + + def __getattr__(self, key): + try: + return self[key] + except KeyError: + raise AttributeError(r"'Dict' object has no attribute '%s'" % key) + + def __setattr__(self, key, value): + self[key] = value + + @classmethod + def get(cls, pk): + ''' + Get by primary key. + ''' + d = db.select_one('select * from %s where %s=?' % (cls.__table__, cls.__primary_key__.name), pk) + return cls(**d) if d else None + + @classmethod + def find_first(cls, where, *args): + ''' + Find by where clause and return one result. If multiple results found, + only the first one returned. If no result found, return None. + ''' + d = db.select_one('select * from %s %s' % (cls.__table__, where), *args) + return cls(**d) if d else None + + @classmethod + def find_all(cls, *args): + ''' + Find all and return list. + ''' + L = db.select('select * from `%s`' % cls.__table__) + return [cls(**d) for d in L] + + @classmethod + def find_by(cls, where, *args): + ''' + Find by where clause and return list. + ''' + L = db.select('select * from `%s` %s' % (cls.__table__, where), *args) + return [cls(**d) for d in L] + + @classmethod + def count_all(cls): + ''' + Find by 'select count(pk) from table' and return integer. + ''' + return db.select_int('select count(`%s`) from `%s`' % (cls.__primary_key__.name, cls.__table__)) + + @classmethod + def count_by(cls, where, *args): + ''' + Find by 'select count(pk) from table where ... ' and return int. + ''' + return db.select_int('select count(`%s`) from `%s` %s' % (cls.__primary_key__.name, cls.__table__, where), *args) + + def update(self): + self.pre_update and self.pre_update() + L = [] + args = [] + for k, v in self.__mappings__.iteritems(): + if v.updatable: + if hasattr(self, k): + arg = getattr(self, k) + else: + arg = v.default + setattr(self, k, arg) + L.append('`%s`=?' % k) + args.append(arg) + pk = self.__primary_key__.name + args.append(getattr(self, pk)) + db.update('update `%s` set %s where %s=?' % (self.__table__, ','.join(L), pk), *args) + return self + + def delete(self): + self.pre_delete and self.pre_delete() + pk = self.__primary_key__.name + args = (getattr(self, pk), ) + db.update('delete from `%s` where `%s`=?' % (self.__table__, pk), *args) + return self + + def insert(self): + self.pre_insert and self.pre_insert() + params = {} + for k, v in self.__mappings__.iteritems(): + if v.insertable: + if not hasattr(self, k): + setattr(self, k, v.default) + params[v.name] = getattr(self, k) + db.insert('%s' % self.__table__, **params) + return self + +if __name__=='__main__': + logging.basicConfig(level=logging.DEBUG) + db.create_engine('www-data', 'www-data', 'test') + db.update('drop table if exists user') + db.update('create table user (id int primary key, name text, email text, passwd text, last_modified real)') + import doctest + doctest.testmod() diff --git a/www/transwarp/web.py b/www/transwarp/web.py new file mode 100644 index 0000000..8462d91 --- /dev/null +++ b/www/transwarp/web.py @@ -0,0 +1,1540 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +''' +A simple, lightweight, WSGI-compatible web framework. +''' + +__author__ = 'Michael Liao' + +import types, os, re, cgi, sys, time, datetime, functools, mimetypes, threading, logging, urllib, traceback + +try: + from cStringIO import StringIO +except ImportError: + from StringIO import StringIO + +# thread local object for storing request and response: + +ctx = threading.local() + +# Dict object: + +class Dict(dict): + ''' + Simple dict but support access as x.y style. + + >>> d1 = Dict() + >>> d1['x'] = 100 + >>> d1.x + 100 + >>> d1.y = 200 + >>> d1['y'] + 200 + >>> d2 = Dict(a=1, b=2, c='3') + >>> d2.c + '3' + >>> d2['empty'] + Traceback (most recent call last): + ... + KeyError: 'empty' + >>> d2.empty + Traceback (most recent call last): + ... + AttributeError: 'Dict' object has no attribute 'empty' + >>> d3 = Dict(('a', 'b', 'c'), (1, 2, 3)) + >>> d3.a + 1 + >>> d3.b + 2 + >>> d3.c + 3 + ''' + def __init__(self, names=(), values=(), **kw): + super(Dict, self).__init__(**kw) + for k, v in zip(names, values): + self[k] = v + + def __getattr__(self, key): + try: + return self[key] + except KeyError: + raise AttributeError(r"'Dict' object has no attribute '%s'" % key) + + def __setattr__(self, key, value): + self[key] = value + +_TIMEDELTA_ZERO = datetime.timedelta(0) + +# timezone as UTC+8:00, UTC-10:00 + +_RE_TZ = re.compile('^([\+\-])([0-9]{1,2})\:([0-9]{1,2})$') + +class UTC(datetime.tzinfo): + ''' + A UTC tzinfo object. + + >>> tz0 = UTC('+00:00') + >>> tz0.tzname(None) + 'UTC+00:00' + >>> tz8 = UTC('+8:00') + >>> tz8.tzname(None) + 'UTC+8:00' + >>> tz7 = UTC('+7:30') + >>> tz7.tzname(None) + 'UTC+7:30' + >>> tz5 = UTC('-05:30') + >>> tz5.tzname(None) + 'UTC-05:30' + >>> from datetime import datetime + >>> u = datetime.utcnow().replace(tzinfo=tz0) + >>> l1 = u.astimezone(tz8) + >>> l2 = u.replace(tzinfo=tz8) + >>> d1 = u - l1 + >>> d2 = u - l2 + >>> d1.seconds + 0 + >>> d2.seconds + 28800 + ''' + + def __init__(self, utc): + utc = str(utc.strip().upper()) + mt = _RE_TZ.match(utc) + if mt: + minus = mt.group(1)=='-' + h = int(mt.group(2)) + m = int(mt.group(3)) + if minus: + h, m = (-h), (-m) + self._utcoffset = datetime.timedelta(hours=h, minutes=m) + self._tzname = 'UTC%s' % utc + else: + raise ValueError('bad utc time zone') + + def utcoffset(self, dt): + return self._utcoffset + + def dst(self, dt): + return _TIMEDELTA_ZERO + + def tzname(self, dt): + return self._tzname + + def __str__(self): + return 'UTC tzinfo object (%s)' % self._tzname + + __repr__ = __str__ + +# all known response statues: + +_RESPONSE_STATUSES = { + # Informational + 100: 'Continue', + 101: 'Switching Protocols', + 102: 'Processing', + + # Successful + 200: 'OK', + 201: 'Created', + 202: 'Accepted', + 203: 'Non-Authoritative Information', + 204: 'No Content', + 205: 'Reset Content', + 206: 'Partial Content', + 207: 'Multi Status', + 226: 'IM Used', + + # Redirection + 300: 'Multiple Choices', + 301: 'Moved Permanently', + 302: 'Found', + 303: 'See Other', + 304: 'Not Modified', + 305: 'Use Proxy', + 307: 'Temporary Redirect', + + # Client Error + 400: 'Bad Request', + 401: 'Unauthorized', + 402: 'Payment Required', + 403: 'Forbidden', + 404: 'Not Found', + 405: 'Method Not Allowed', + 406: 'Not Acceptable', + 407: 'Proxy Authentication Required', + 408: 'Request Timeout', + 409: 'Conflict', + 410: 'Gone', + 411: 'Length Required', + 412: 'Precondition Failed', + 413: 'Request Entity Too Large', + 414: 'Request URI Too Long', + 415: 'Unsupported Media Type', + 416: 'Requested Range Not Satisfiable', + 417: 'Expectation Failed', + 418: "I'm a teapot", + 422: 'Unprocessable Entity', + 423: 'Locked', + 424: 'Failed Dependency', + 426: 'Upgrade Required', + + # Server Error + 500: 'Internal Server Error', + 501: 'Not Implemented', + 502: 'Bad Gateway', + 503: 'Service Unavailable', + 504: 'Gateway Timeout', + 505: 'HTTP Version Not Supported', + 507: 'Insufficient Storage', + 510: 'Not Extended', +} + +_RE_RESPONSE_STATUS = re.compile(r'^\d\d\d(\ [\w\ ]+)?$') + +_RESPONSE_HEADERS = ( + 'Accept-Ranges', + 'Age', + 'Allow', + 'Cache-Control', + 'Connection', + 'Content-Encoding', + 'Content-Language', + 'Content-Length', + 'Content-Location', + 'Content-MD5', + 'Content-Disposition', + 'Content-Range', + 'Content-Type', + 'Date', + 'ETag', + 'Expires', + 'Last-Modified', + 'Link', + 'Location', + 'P3P', + 'Pragma', + 'Proxy-Authenticate', + 'Refresh', + 'Retry-After', + 'Server', + 'Set-Cookie', + 'Strict-Transport-Security', + 'Trailer', + 'Transfer-Encoding', + 'Vary', + 'Via', + 'Warning', + 'WWW-Authenticate', + 'X-Frame-Options', + 'X-XSS-Protection', + 'X-Content-Type-Options', + 'X-Forwarded-Proto', + 'X-Powered-By', + 'X-UA-Compatible', +) + +_RESPONSE_HEADER_DICT = dict(zip(map(lambda x: x.upper(), _RESPONSE_HEADERS), _RESPONSE_HEADERS)) + +_HEADER_X_POWERED_BY = ('X-Powered-By', 'transwarp/1.0') + +class HttpError(Exception): + ''' + HttpError that defines http error code. + + >>> e = HttpError(404) + >>> e.status + '404 Not Found' + ''' + def __init__(self, code): + ''' + Init an HttpError with response code. + ''' + super(HttpError, self).__init__() + self.status = '%d %s' % (code, _RESPONSE_STATUSES[code]) + + def header(self, name, value): + if not hasattr(self, '_headers'): + self._headers = [_HEADER_X_POWERED_BY] + self._headers.append((name, value)) + + @property + def headers(self): + if hasattr(self, '_headers'): + return self._headers + return [] + + def __str__(self): + return self.status + + __repr__ = __str__ + +class RedirectError(HttpError): + ''' + RedirectError that defines http redirect code. + + >>> e = RedirectError(302, 'http://www.apple.com/') + >>> e.status + '302 Found' + >>> e.location + 'http://www.apple.com/' + ''' + def __init__(self, code, location): + ''' + Init an HttpError with response code. + ''' + super(RedirectError, self).__init__(code) + self.location = location + + def __str__(self): + return '%s, %s' % (self.status, self.location) + + __repr__ = __str__ + +def badrequest(): + ''' + Send a bad request response. + + >>> raise badrequest() + Traceback (most recent call last): + ... + HttpError: 400 Bad Request + ''' + return HttpError(400) + +def unauthorized(): + ''' + Send an unauthorized response. + + >>> raise unauthorized() + Traceback (most recent call last): + ... + HttpError: 401 Unauthorized + ''' + return HttpError(401) + +def forbidden(): + ''' + Send a forbidden response. + + >>> raise forbidden() + Traceback (most recent call last): + ... + HttpError: 403 Forbidden + ''' + return HttpError(403) + +def notfound(): + ''' + Send a not found response. + + >>> raise notfound() + Traceback (most recent call last): + ... + HttpError: 404 Not Found + ''' + return HttpError(404) + +def conflict(): + ''' + Send a conflict response. + + >>> raise conflict() + Traceback (most recent call last): + ... + HttpError: 409 Conflict + ''' + return HttpError(409) + +def internalerror(): + ''' + Send an internal error response. + + >>> raise internalerror() + Traceback (most recent call last): + ... + HttpError: 500 Internal Server Error + ''' + return HttpError(500) + +def redirect(location): + ''' + Do permanent redirect. + + >>> raise redirect('http://www.itranswarp.com/') + Traceback (most recent call last): + ... + RedirectError: 301 Moved Permanently, http://www.itranswarp.com/ + ''' + return RedirectError(301, location) + +def found(location): + ''' + Do temporary redirect. + + >>> raise found('http://www.itranswarp.com/') + Traceback (most recent call last): + ... + RedirectError: 302 Found, http://www.itranswarp.com/ + ''' + return RedirectError(302, location) + +def seeother(location): + ''' + Do temporary redirect. + + >>> raise seeother('http://www.itranswarp.com/') + Traceback (most recent call last): + ... + RedirectError: 303 See Other, http://www.itranswarp.com/ + >>> e = seeother('http://www.itranswarp.com/seeother?r=123') + >>> e.location + 'http://www.itranswarp.com/seeother?r=123' + ''' + return RedirectError(303, location) + +def _to_str(s): + ''' + Convert to str. + + >>> _to_str('s123') == 's123' + True + >>> _to_str(u'\u4e2d\u6587') == '\xe4\xb8\xad\xe6\x96\x87' + True + >>> _to_str(-123) == '-123' + True + ''' + if isinstance(s, str): + return s + if isinstance(s, unicode): + return s.encode('utf-8') + return str(s) + +def _to_unicode(s, encoding='utf-8'): + ''' + Convert to unicode. + + >>> _to_unicode('\xe4\xb8\xad\xe6\x96\x87') == u'\u4e2d\u6587' + True + ''' + return s.decode('utf-8') + +def _quote(s, encoding='utf-8'): + ''' + Url quote as str. + + >>> _quote('http://example/test?a=1+') + 'http%3A//example/test%3Fa%3D1%2B' + >>> _quote(u'hello world!') + 'hello%20world%21' + ''' + if isinstance(s, unicode): + s = s.encode(encoding) + return urllib.quote(s) + +def _unquote(s, encoding='utf-8'): + ''' + Url unquote as unicode. + + >>> _unquote('http%3A//example/test%3Fa%3D1+') + u'http://example/test?a=1+' + ''' + return urllib.unquote(s).decode(encoding) + +def get(path): + ''' + A @get decorator. + + @get('/:id') + def index(id): + pass + + >>> @get('/test/:id') + ... def test(): + ... return 'ok' + ... + >>> test.__web_route__ + '/test/:id' + >>> test.__web_method__ + 'GET' + >>> test() + 'ok' + ''' + def _decorator(func): + func.__web_route__ = path + func.__web_method__ = 'GET' + return func + return _decorator + +def post(path): + ''' + A @post decorator. + + >>> @post('/post/:id') + ... def testpost(): + ... return '200' + ... + >>> testpost.__web_route__ + '/post/:id' + >>> testpost.__web_method__ + 'POST' + >>> testpost() + '200' + ''' + def _decorator(func): + func.__web_route__ = path + func.__web_method__ = 'POST' + return func + return _decorator + +_re_route = re.compile(r'(\:[a-zA-Z_]\w*)') + +def _build_regex(path): + r''' + Convert route path to regex. + + >>> _build_regex('/path/to/:file') + '^\\/path\\/to\\/(?P[^\\/]+)$' + >>> _build_regex('/:user/:comments/list') + '^\\/(?P[^\\/]+)\\/(?P[^\\/]+)\\/list$' + >>> _build_regex(':id-:pid/:w') + '^(?P[^\\/]+)\\-(?P[^\\/]+)\\/(?P[^\\/]+)$' + ''' + re_list = ['^'] + var_list = [] + is_var = False + for v in _re_route.split(path): + if is_var: + var_name = v[1:] + var_list.append(var_name) + re_list.append(r'(?P<%s>[^\/]+)' % var_name) + else: + s = '' + for ch in v: + if ch>='0' and ch<='9': + s = s + ch + elif ch>='A' and ch<='Z': + s = s + ch + elif ch>='a' and ch<='z': + s = s + ch + else: + s = s + '\\' + ch + re_list.append(s) + is_var = not is_var + re_list.append('$') + return ''.join(re_list) + +class Route(object): + ''' + A Route object is a callable object. + ''' + + def __init__(self, func): + self.path = func.__web_route__ + self.method = func.__web_method__ + self.is_static = _re_route.search(self.path) is None + if not self.is_static: + self.route = re.compile(_build_regex(self.path)) + self.func = func + + def match(self, url): + m = self.route.match(url) + if m: + return m.groups() + return None + + def __call__(self, *args): + return self.func(*args) + + def __str__(self): + if self.is_static: + return 'Route(static,%s,path=%s)' % (self.method, self.path) + return 'Route(dynamic,%s,path=%s)' % (self.method, self.path) + + __repr__ = __str__ + +def _static_file_generator(fpath): + BLOCK_SIZE = 8192 + with open(fpath, 'rb') as f: + block = f.read(BLOCK_SIZE) + while block: + yield block + block = f.read(BLOCK_SIZE) + +class StaticFileRoute(object): + + def __init__(self): + self.method = 'GET' + self.is_static = False + self.route = re.compile('^/static/(.+)$') + + def match(self, url): + if url.startswith('/static/'): + return (url[1:], ) + return None + + def __call__(self, *args): + fpath = os.path.join(ctx.application.document_root, args[0]) + if not os.path.isfile(fpath): + raise notfound() + fext = os.path.splitext(fpath)[1] + ctx.response.content_type = mimetypes.types_map.get(fext.lower(), 'application/octet-stream') + return _static_file_generator(fpath) + +def favicon_handler(): + return static_file_handler('/favicon.ico') + +class MultipartFile(object): + ''' + Multipart file storage get from request input. + + f = ctx.request['file'] + f.filename # 'test.png' + f.file # file-like object + ''' + def __init__(self, storage): + self.filename = _to_unicode(storage.filename) + self.file = storage.file + +class Request(object): + ''' + Request object for obtaining all http request information. + ''' + + def __init__(self, environ): + self._environ = environ + + def _parse_input(self): + def _convert(item): + if isinstance(item, list): + return [_to_unicode(i.value) for i in item] + if item.filename: + return MultipartFile(item) + return _to_unicode(item.value) + fs = cgi.FieldStorage(fp=self._environ['wsgi.input'], environ=self._environ, keep_blank_values=True) + inputs = dict() + for key in fs: + inputs[key] = _convert(fs[key]) + return inputs + + def _get_raw_input(self): + ''' + Get raw input as dict containing values as unicode, list or MultipartFile. + ''' + if not hasattr(self, '_raw_input'): + self._raw_input = self._parse_input() + return self._raw_input + + def __getitem__(self, key): + ''' + Get input parameter value. If the specified key has multiple value, the first one is returned. + If the specified key is not exist, then raise KeyError. + + >>> from StringIO import StringIO + >>> r = Request({'REQUEST_METHOD':'POST', 'wsgi.input':StringIO('a=1&b=M%20M&c=ABC&c=XYZ&e=')}) + >>> r['a'] + u'1' + >>> r['c'] + u'ABC' + >>> r['empty'] + Traceback (most recent call last): + ... + KeyError: 'empty' + >>> b = '----WebKitFormBoundaryQQ3J8kPsjFpTmqNz' + >>> pl = ['--%s' % b, 'Content-Disposition: form-data; name=\\"name\\"\\n', 'Scofield', '--%s' % b, 'Content-Disposition: form-data; name=\\"name\\"\\n', 'Lincoln', '--%s' % b, 'Content-Disposition: form-data; name=\\"file\\"; filename=\\"test.txt\\"', 'Content-Type: text/plain\\n', 'just a test', '--%s' % b, 'Content-Disposition: form-data; name=\\"id\\"\\n', '4008009001', '--%s--' % b, ''] + >>> payload = '\\n'.join(pl) + >>> r = Request({'REQUEST_METHOD':'POST', 'CONTENT_LENGTH':str(len(payload)), 'CONTENT_TYPE':'multipart/form-data; boundary=%s' % b, 'wsgi.input':StringIO(payload)}) + >>> r.get('name') + u'Scofield' + >>> r.gets('name') + [u'Scofield', u'Lincoln'] + >>> f = r.get('file') + >>> f.filename + u'test.txt' + >>> f.file.read() + 'just a test' + ''' + r = self._get_raw_input()[key] + if isinstance(r, list): + return r[0] + return r + + def get(self, key, default=None): + ''' + The same as request[key], but return default value if key is not found. + + >>> from StringIO import StringIO + >>> r = Request({'REQUEST_METHOD':'POST', 'wsgi.input':StringIO('a=1&b=M%20M&c=ABC&c=XYZ&e=')}) + >>> r.get('a') + u'1' + >>> r.get('empty') + >>> r.get('empty', 'DEFAULT') + 'DEFAULT' + ''' + r = self._get_raw_input().get(key, default) + if isinstance(r, list): + return r[0] + return r + + def gets(self, key): + ''' + Get multiple values for specified key. + + >>> from StringIO import StringIO + >>> r = Request({'REQUEST_METHOD':'POST', 'wsgi.input':StringIO('a=1&b=M%20M&c=ABC&c=XYZ&e=')}) + >>> r.gets('a') + [u'1'] + >>> r.gets('c') + [u'ABC', u'XYZ'] + >>> r.gets('empty') + Traceback (most recent call last): + ... + KeyError: 'empty' + ''' + r = self._get_raw_input()[key] + if isinstance(r, list): + return r[:] + return [r] + + def input(self, **kw): + ''' + Get input as dict from request, fill dict using provided default value if key not exist. + + i = ctx.request.input(role='guest') + i.role ==> 'guest' + + >>> from StringIO import StringIO + >>> r = Request({'REQUEST_METHOD':'POST', 'wsgi.input':StringIO('a=1&b=M%20M&c=ABC&c=XYZ&e=')}) + >>> i = r.input(x=2008) + >>> i.a + u'1' + >>> i.b + u'M M' + >>> i.c + u'ABC' + >>> i.x + 2008 + >>> i.get('d', u'100') + u'100' + >>> i.x + 2008 + ''' + copy = Dict(**kw) + raw = self._get_raw_input() + for k, v in raw.iteritems(): + copy[k] = v[0] if isinstance(v, list) else v + return copy + + def get_body(self): + ''' + Get raw data from HTTP POST and return as str. + + >>> from StringIO import StringIO + >>> r = Request({'REQUEST_METHOD':'POST', 'wsgi.input':StringIO('')}) + >>> r.get_body() + '' + ''' + fp = self._environ['wsgi.input'] + return fp.read() + + @property + def remote_addr(self): + ''' + Get remote addr. Return '0.0.0.0' if cannot get remote_addr. + + >>> r = Request({'REMOTE_ADDR': '192.168.0.100'}) + >>> r.remote_addr + '192.168.0.100' + ''' + return self._environ.get('REMOTE_ADDR', '0.0.0.0') + + @property + def document_root(self): + ''' + Get raw document_root as str. Return '' if no document_root. + + >>> r = Request({'DOCUMENT_ROOT': '/srv/path/to/doc'}) + >>> r.document_root + '/srv/path/to/doc' + ''' + return self._environ.get('DOCUMENT_ROOT', '') + + @property + def query_string(self): + ''' + Get raw query string as str. Return '' if no query string. + + >>> r = Request({'QUERY_STRING': 'a=1&c=2'}) + >>> r.query_string + 'a=1&c=2' + >>> r = Request({}) + >>> r.query_string + '' + ''' + return self._environ.get('QUERY_STRING', '') + + @property + def environ(self): + ''' + Get raw environ as dict, both key, value are str. + + >>> r = Request({'REQUEST_METHOD': 'GET', 'wsgi.url_scheme':'http'}) + >>> r.environ.get('REQUEST_METHOD') + 'GET' + >>> r.environ.get('wsgi.url_scheme') + 'http' + >>> r.environ.get('SERVER_NAME') + >>> r.environ.get('SERVER_NAME', 'unamed') + 'unamed' + ''' + return self._environ + + @property + def request_method(self): + ''' + Get request method. The valid returned values are 'GET', 'POST', 'HEAD'. + + >>> r = Request({'REQUEST_METHOD': 'GET'}) + >>> r.request_method + 'GET' + >>> r = Request({'REQUEST_METHOD': 'POST'}) + >>> r.request_method + 'POST' + ''' + return self._environ['REQUEST_METHOD'] + + @property + def path_info(self): + ''' + Get request path as str. + + >>> r = Request({'PATH_INFO': '/test/a%20b.html'}) + >>> r.path_info + '/test/a b.html' + ''' + return urllib.unquote(self._environ.get('PATH_INFO', '')) + + @property + def host(self): + ''' + Get request host as str. Default to '' if cannot get host.. + + >>> r = Request({'HTTP_HOST': 'localhost:8080'}) + >>> r.host + 'localhost:8080' + ''' + return self._environ.get('HTTP_HOST', '') + + def _get_headers(self): + if not hasattr(self, '_headers'): + hdrs = {} + for k, v in self._environ.iteritems(): + if k.startswith('HTTP_'): + # convert 'HTTP_ACCEPT_ENCODING' to 'ACCEPT-ENCODING' + hdrs[k[5:].replace('_', '-').upper()] = v.decode('utf-8') + self._headers = hdrs + return self._headers + + @property + def headers(self): + ''' + Get all HTTP headers with key as str and value as unicode. The header names are 'XXX-XXX' uppercase. + + >>> r = Request({'HTTP_USER_AGENT': 'Mozilla/5.0', 'HTTP_ACCEPT': 'text/html'}) + >>> H = r.headers + >>> H['ACCEPT'] + u'text/html' + >>> H['USER-AGENT'] + u'Mozilla/5.0' + >>> L = H.items() + >>> L.sort() + >>> L + [('ACCEPT', u'text/html'), ('USER-AGENT', u'Mozilla/5.0')] + ''' + return dict(**self._get_headers()) + + def header(self, header, default=None): + ''' + Get header from request as unicode, return None if not exist, or default if specified. + The header name is case-insensitive such as 'USER-AGENT' or u'content-Type'. + + >>> r = Request({'HTTP_USER_AGENT': 'Mozilla/5.0', 'HTTP_ACCEPT': 'text/html'}) + >>> r.header('User-Agent') + u'Mozilla/5.0' + >>> r.header('USER-AGENT') + u'Mozilla/5.0' + >>> r.header('Accept') + u'text/html' + >>> r.header('Test') + >>> r.header('Test', u'DEFAULT') + u'DEFAULT' + ''' + return self._get_headers().get(header.upper(), default) + + def _get_cookies(self): + if not hasattr(self, '_cookies'): + cookies = {} + cookie_str = self._environ.get('HTTP_COOKIE') + if cookie_str: + for c in cookie_str.split(';'): + pos = c.find('=') + if pos>0: + cookies[c[:pos].strip()] = _unquote(c[pos+1:]) + self._cookies = cookies + return self._cookies + + @property + def cookies(self): + ''' + Return all cookies as dict. The cookie name is str and values is unicode. + + >>> r = Request({'HTTP_COOKIE':'A=123; url=http%3A%2F%2Fwww.example.com%2F'}) + >>> r.cookies['A'] + u'123' + >>> r.cookies['url'] + u'http://www.example.com/' + ''' + return Dict(**self._get_cookies()) + + def cookie(self, name, default=None): + ''' + Return specified cookie value as unicode. Default to None if cookie not exists. + + >>> r = Request({'HTTP_COOKIE':'A=123; url=http%3A%2F%2Fwww.example.com%2F'}) + >>> r.cookie('A') + u'123' + >>> r.cookie('url') + u'http://www.example.com/' + >>> r.cookie('test') + >>> r.cookie('test', u'DEFAULT') + u'DEFAULT' + ''' + return self._get_cookies().get(name, default) + +UTC_0 = UTC('+00:00') + +class Response(object): + + def __init__(self): + self._status = '200 OK' + self._headers = {'CONTENT-TYPE': 'text/html; charset=utf-8'} + + @property + def headers(self): + ''' + Return response headers as [(key1, value1), (key2, value2)...] including cookies. + + >>> r = Response() + >>> r.headers + [('Content-Type', 'text/html; charset=utf-8'), ('X-Powered-By', 'transwarp/1.0')] + >>> r.set_cookie('s1', 'ok', 3600) + >>> r.headers + [('Content-Type', 'text/html; charset=utf-8'), ('Set-Cookie', 's1=ok; Max-Age=3600; Path=/; HttpOnly'), ('X-Powered-By', 'transwarp/1.0')] + ''' + L = [(_RESPONSE_HEADER_DICT.get(k, k), v) for k, v in self._headers.iteritems()] + if hasattr(self, '_cookies'): + for v in self._cookies.itervalues(): + L.append(('Set-Cookie', v)) + L.append(_HEADER_X_POWERED_BY) + return L + + def header(self, name): + ''' + Get header by name, case-insensitive. + + >>> r = Response() + >>> r.header('content-type') + 'text/html; charset=utf-8' + >>> r.header('CONTENT-type') + 'text/html; charset=utf-8' + >>> r.header('X-Powered-By') + ''' + key = name.upper() + if not key in _RESPONSE_HEADER_DICT: + key = name + return self._headers.get(key) + + def unset_header(self, name): + ''' + Unset header by name and value. + + >>> r = Response() + >>> r.header('content-type') + 'text/html; charset=utf-8' + >>> r.unset_header('CONTENT-type') + >>> r.header('content-type') + ''' + key = name.upper() + if not key in _RESPONSE_HEADER_DICT: + key = name + if key in self._headers: + del self._headers[key] + + def set_header(self, name, value): + ''' + Set header by name and value. + + >>> r = Response() + >>> r.header('content-type') + 'text/html; charset=utf-8' + >>> r.set_header('CONTENT-type', 'image/png') + >>> r.header('content-TYPE') + 'image/png' + ''' + key = name.upper() + if not key in _RESPONSE_HEADER_DICT: + key = name + self._headers[key] = _to_str(value) + + @property + def content_type(self): + ''' + Get content type from response. This is a shortcut for header('Content-Type'). + + >>> r = Response() + >>> r.content_type + 'text/html; charset=utf-8' + >>> r.content_type = 'application/json' + >>> r.content_type + 'application/json' + ''' + return self.header('CONTENT-TYPE') + + @content_type.setter + def content_type(self, value): + ''' + Set content type for response. This is a shortcut for set_header('Content-Type', value). + ''' + if value: + self.set_header('CONTENT-TYPE', value) + else: + self.unset_header('CONTENT-TYPE') + + @property + def content_length(self): + ''' + Get content length. Return None if not set. + + >>> r = Response() + >>> r.content_length + >>> r.content_length = 100 + >>> r.content_length + '100' + ''' + return self.header('CONTENT-LENGTH') + + @content_length.setter + def content_length(self, value): + ''' + Set content length, the value can be int or str. + + >>> r = Response() + >>> r.content_length = '1024' + >>> r.content_length + '1024' + >>> r.content_length = 1024 * 8 + >>> r.content_length + '8192' + ''' + self.set_header('CONTENT-LENGTH', str(value)) + + def delete_cookie(self, name): + ''' + Delete a cookie immediately. + + Args: + name: the cookie name. + ''' + self.set_cookie(name, '__deleted__', expires=0) + + def set_cookie(self, name, value, max_age=None, expires=None, path='/', domain=None, secure=False, http_only=True): + ''' + Set a cookie. + + Args: + name: the cookie name. + value: the cookie value. + max_age: optional, seconds of cookie's max age. + expires: optional, unix timestamp, datetime or date object that indicate an absolute time of the + expiration time of cookie. Note that if expires specified, the max_age will be ignored. + path: the cookie path, default to '/'. + domain: the cookie domain, default to None. + secure: if the cookie secure, default to False. + http_only: if the cookie is for http only, default to True for better safty + (client-side script cannot access cookies with HttpOnly flag). + + >>> r = Response() + >>> r.set_cookie('company', 'Abc, Inc.', max_age=3600) + >>> r._cookies + {'company': 'company=Abc%2C%20Inc.; Max-Age=3600; Path=/; HttpOnly'} + >>> r.set_cookie('company', r'Example="Limited"', expires=1342274794.123, path='/sub/') + >>> r._cookies + {'company': 'company=Example%3D%22Limited%22; Expires=Sat, 14-Jul-2012 14:06:34 GMT; Path=/sub/; HttpOnly'} + >>> dt = datetime.datetime(2012, 7, 14, 22, 6, 34, tzinfo=UTC('+8:00')) + >>> r.set_cookie('company', 'Expires', expires=dt) + >>> r._cookies + {'company': 'company=Expires; Expires=Sat, 14-Jul-2012 14:06:34 GMT; Path=/; HttpOnly'} + ''' + if not hasattr(self, '_cookies'): + self._cookies = {} + L = ['%s=%s' % (_quote(name), _quote(value))] + if expires is not None: + if isinstance(expires, (float, int, long)): + L.append('Expires=%s' % datetime.datetime.fromtimestamp(expires, UTC_0).strftime('%a, %d-%b-%Y %H:%M:%S GMT')) + if isinstance(expires, (datetime.date, datetime.datetime)): + L.append('Expires=%s' % expires.astimezone(UTC_0).strftime('%a, %d-%b-%Y %H:%M:%S GMT')) + elif isinstance(max_age, (int, long)): + L.append('Max-Age=%d' % max_age) + L.append('Path=%s' % path) + if domain: + L.append('Domain=%s' % domain) + if secure: + L.append('Secure') + if http_only: + L.append('HttpOnly') + self._cookies[name] = '; '.join(L) + + def unset_cookie(self, name): + ''' + Unset a cookie. + + >>> r = Response() + >>> r.set_cookie('company', 'Abc, Inc.', max_age=3600) + >>> r._cookies + {'company': 'company=Abc%2C%20Inc.; Max-Age=3600; Path=/; HttpOnly'} + >>> r.unset_cookie('company') + >>> r._cookies + {} + ''' + if hasattr(self, '_cookies'): + if name in self._cookies: + del self._cookies[name] + + @property + def status_code(self): + ''' + Get response status code as int. + + >>> r = Response() + >>> r.status_code + 200 + >>> r.status = 404 + >>> r.status_code + 404 + >>> r.status = '500 Internal Error' + >>> r.status_code + 500 + ''' + return int(self._status[:3]) + + @property + def status(self): + ''' + Get response status. Default to '200 OK'. + + >>> r = Response() + >>> r.status + '200 OK' + >>> r.status = 404 + >>> r.status + '404 Not Found' + >>> r.status = '500 Oh My God' + >>> r.status + '500 Oh My God' + ''' + return self._status + + @status.setter + def status(self, value): + ''' + Set response status as int or str. + + >>> r = Response() + >>> r.status = 404 + >>> r.status + '404 Not Found' + >>> r.status = '500 ERR' + >>> r.status + '500 ERR' + >>> r.status = u'403 Denied' + >>> r.status + '403 Denied' + >>> r.status = 99 + Traceback (most recent call last): + ... + ValueError: Bad response code: 99 + >>> r.status = 'ok' + Traceback (most recent call last): + ... + ValueError: Bad response code: ok + >>> r.status = [1, 2, 3] + Traceback (most recent call last): + ... + TypeError: Bad type of response code. + ''' + if isinstance(value, (int, long)): + if value>=100 and value<=999: + st = _RESPONSE_STATUSES.get(value, '') + if st: + self._status = '%d %s' % (value, st) + else: + self._status = str(value) + else: + raise ValueError('Bad response code: %d' % value) + elif isinstance(value, basestring): + if isinstance(value, unicode): + value = value.encode('utf-8') + if _RE_RESPONSE_STATUS.match(value): + self._status = value + else: + raise ValueError('Bad response code: %s' % value) + else: + raise TypeError('Bad type of response code.') + +class Template(object): + + def __init__(self, template_name, **kw): + ''' + Init a template object with template name, model as dict, and additional kw that will append to model. + + >>> t = Template('hello.html', title='Hello', copyright='@2012') + >>> t.model['title'] + 'Hello' + >>> t.model['copyright'] + '@2012' + >>> t = Template('test.html', abc=u'ABC', xyz=u'XYZ') + >>> t.model['abc'] + u'ABC' + ''' + self.template_name = template_name + self.model = dict(**kw) + +class TemplateEngine(object): + ''' + Base template engine. + ''' + def __call__(self, path, model): + return '' + +class Jinja2TemplateEngine(TemplateEngine): + + ''' + Render using jinja2 template engine. + + >>> templ_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'test') + >>> engine = Jinja2TemplateEngine(templ_path) + >>> engine.add_filter('datetime', lambda dt: dt.strftime('%Y-%m-%d %H:%M:%S')) + >>> engine('jinja2-test.html', dict(name='Michael', posted_at=datetime.datetime(2014, 6, 1, 10, 11, 12))) + '

Hello, Michael.

2014-06-01 10:11:12' + ''' + + def __init__(self, templ_dir, **kw): + from jinja2 import Environment, FileSystemLoader + if not 'autoescape' in kw: + kw['autoescape'] = True + self._env = Environment(loader=FileSystemLoader(templ_dir), **kw) + + def add_filter(self, name, fn_filter): + self._env.filters[name] = fn_filter + + def __call__(self, path, model): + return self._env.get_template(path).render(**model).encode('utf-8') + +def _default_error_handler(e, start_response, is_debug): + if isinstance(e, HttpError): + logging.info('HttpError: %s' % e.status) + headers = e.headers[:] + headers.append(('Content-Type', 'text/html')) + start_response(e.status, headers) + return ('

%s

' % e.status) + logging.exception('Exception:') + start_response('500 Internal Server Error', [('Content-Type', 'text/html'), _HEADER_X_POWERED_BY]) + if is_debug: + return _debug() + return ('

500 Internal Server Error

%s

' % str(e)) + +def view(path): + ''' + A view decorator that render a view by dict. + + >>> @view('test/view.html') + ... def hello(): + ... return dict(name='Bob') + >>> t = hello() + >>> isinstance(t, Template) + True + >>> t.template_name + 'test/view.html' + >>> @view('test/view.html') + ... def hello2(): + ... return ['a list'] + >>> t = hello2() + Traceback (most recent call last): + ... + ValueError: Expect return a dict when using @view() decorator. + ''' + def _decorator(func): + @functools.wraps(func) + def _wrapper(*args, **kw): + r = func(*args, **kw) + if isinstance(r, dict): + logging.info('return Template') + return Template(path, **r) + raise ValueError('Expect return a dict when using @view() decorator.') + return _wrapper + return _decorator + +_RE_INTERCEPTROR_STARTS_WITH = re.compile(r'^([^\*\?]+)\*?$') +_RE_INTERCEPTROR_ENDS_WITH = re.compile(r'^\*([^\*\?]+)$') + +def _build_pattern_fn(pattern): + m = _RE_INTERCEPTROR_STARTS_WITH.match(pattern) + if m: + return lambda p: p.startswith(m.group(1)) + m = _RE_INTERCEPTROR_ENDS_WITH.match(pattern) + if m: + return lambda p: p.endswith(m.group(1)) + raise ValueError('Invalid pattern definition in interceptor.') + +def interceptor(pattern='/'): + ''' + An @interceptor decorator. + + @interceptor('/admin/') + def check_admin(req, resp): + pass + ''' + def _decorator(func): + func.__interceptor__ = _build_pattern_fn(pattern) + return func + return _decorator + +def _build_interceptor_fn(func, next): + def _wrapper(): + if func.__interceptor__(ctx.request.path_info): + return func(next) + else: + return next() + return _wrapper + +def _build_interceptor_chain(last_fn, *interceptors): + ''' + Build interceptor chain. + + >>> def target(): + ... print 'target' + ... return 123 + >>> @interceptor('/') + ... def f1(next): + ... print 'before f1()' + ... return next() + >>> @interceptor('/test/') + ... def f2(next): + ... print 'before f2()' + ... try: + ... return next() + ... finally: + ... print 'after f2()' + >>> @interceptor('/') + ... def f3(next): + ... print 'before f3()' + ... try: + ... return next() + ... finally: + ... print 'after f3()' + >>> chain = _build_interceptor_chain(target, f1, f2, f3) + >>> ctx.request = Dict(path_info='/test/abc') + >>> chain() + before f1() + before f2() + before f3() + target + after f3() + after f2() + 123 + >>> ctx.request = Dict(path_info='/api/') + >>> chain() + before f1() + before f3() + target + after f3() + 123 + ''' + L = list(interceptors) + L.reverse() + fn = last_fn + for f in L: + fn = _build_interceptor_fn(f, fn) + return fn + +def _load_module(module_name): + ''' + Load module from name as str. + + >>> m = _load_module('xml') + >>> m.__name__ + 'xml' + >>> m = _load_module('xml.sax') + >>> m.__name__ + 'xml.sax' + >>> m = _load_module('xml.sax.handler') + >>> m.__name__ + 'xml.sax.handler' + ''' + last_dot = module_name.rfind('.') + if last_dot==(-1): + return __import__(module_name, globals(), locals()) + from_module = module_name[:last_dot] + import_module = module_name[last_dot+1:] + m = __import__(from_module, globals(), locals(), [import_module]) + return getattr(m, import_module) + +class WSGIApplication(object): + + def __init__(self, document_root=None, **kw): + ''' + Init a WSGIApplication. + + Args: + document_root: document root path. + ''' + self._running = False + self._document_root = document_root + + self._interceptors = [] + self._template_engine = None + + self._get_static = {} + self._post_static = {} + + self._get_dynamic = [] + self._post_dynamic = [] + + def _check_not_running(self): + if self._running: + raise RuntimeError('Cannot modify WSGIApplication when running.') + + @property + def template_engine(self): + return self._template_engine + + @template_engine.setter + def template_engine(self, engine): + self._check_not_running() + self._template_engine = engine + + def add_module(self, mod): + self._check_not_running() + m = mod if type(mod)==types.ModuleType else _load_module(mod) + logging.info('Add module: %s' % m.__name__) + for name in dir(m): + fn = getattr(m, name) + if callable(fn) and hasattr(fn, '__web_route__') and hasattr(fn, '__web_method__'): + self.add_url(fn) + + def add_url(self, func): + self._check_not_running() + route = Route(func) + if route.is_static: + if route.method=='GET': + self._get_static[route.path] = route + if route.method=='POST': + self._post_static[route.path] = route + else: + if route.method=='GET': + self._get_dynamic.append(route) + if route.method=='POST': + self._post_dynamic.append(route) + logging.info('Add route: %s' % str(route)) + + def add_interceptor(self, func): + self._check_not_running() + self._interceptors.append(func) + logging.info('Add interceptor: %s' % str(func)) + + def run(self, port=9000, host='127.0.0.1'): + from wsgiref.simple_server import make_server + logging.info('application (%s) will start at %s:%s...' % (self._document_root, host, port)) + server = make_server(host, port, self.get_wsgi_application(debug=True)) + server.serve_forever() + + def get_wsgi_application(self, debug=False): + self._check_not_running() + if debug: + self._get_dynamic.append(StaticFileRoute()) + self._running = True + + _application = Dict(document_root=self._document_root) + + def fn_route(): + request_method = ctx.request.request_method + path_info = ctx.request.path_info + if request_method=='GET': + fn = self._get_static.get(path_info, None) + if fn: + return fn() + for fn in self._get_dynamic: + args = fn.match(path_info) + if args: + return fn(*args) + raise notfound() + if request_method=='POST': + fn = self._post_static.get(path_info, None) + if fn: + return fn() + for fn in self._post_dynamic: + args = fn.match(path_info) + if args: + return fn(*args) + raise notfound() + raise badrequest() + + fn_exec = _build_interceptor_chain(fn_route, *self._interceptors) + + def wsgi(env, start_response): + ctx.application = _application + ctx.request = Request(env) + response = ctx.response = Response() + try: + r = fn_exec() + if isinstance(r, Template): + r = self._template_engine(r.template_name, r.model) + if isinstance(r, unicode): + r = r.encode('utf-8') + if r is None: + r = [] + start_response(response.status, response.headers) + return r + except RedirectError, e: + response.set_header('Location', e.location) + start_response(e.status, response.headers) + return [] + except HttpError, e: + start_response(e.status, response.headers) + return ['

', e.status, '

'] + except Exception, e: + logging.exception(e) + if not debug: + start_response('500 Internal Server Error', []) + return ['

500 Internal Server Error

'] + exc_type, exc_value, exc_traceback = sys.exc_info() + fp = StringIO() + traceback.print_exception(exc_type, exc_value, exc_traceback, file=fp) + stacks = fp.getvalue() + fp.close() + start_response('500 Internal Server Error', []) + return [ + r'''

500 Internal Server Error

''',
+                    stacks.replace('<', '<').replace('>', '>'),
+                    '
'] + finally: + del ctx.application + del ctx.request + del ctx.response + + return wsgi + +if __name__=='__main__': + sys.path.append('.') + import doctest + doctest.testmod() diff --git a/www/urls.py b/www/urls.py new file mode 100644 index 0000000..3bddced --- /dev/null +++ b/www/urls.py @@ -0,0 +1,302 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +import os, re, time, base64, hashlib, logging + +import markdown2 + +from transwarp.web import get, post, ctx, view, interceptor, seeother, notfound + +from apis import api, Page, APIError, APIValueError, APIPermissionError, APIResourceNotFoundError +from models import User, Blog, Comment +from config import configs + +_COOKIE_NAME = 'awesession' +_COOKIE_KEY = configs.session.secret + +def _get_page_index(): + page_index = 1 + try: + page_index = int(ctx.request.get('page', '1')) + except ValueError: + pass + return page_index + +def make_signed_cookie(id, password, max_age): + # build cookie string by: id-expires-md5 + expires = str(int(time.time() + (max_age or 86400))) + L = [id, expires, hashlib.md5('%s-%s-%s-%s' % (id, password, expires, _COOKIE_KEY)).hexdigest()] + return '-'.join(L) + +def parse_signed_cookie(cookie_str): + try: + L = cookie_str.split('-') + if len(L) != 3: + return None + id, expires, md5 = L + if int(expires) < time.time(): + return None + user = User.get(id) + if user is None: + return None + if md5 != hashlib.md5('%s-%s-%s-%s' % (id, user.password, expires, _COOKIE_KEY)).hexdigest(): + return None + return user + except: + return None + +def check_admin(): + user = ctx.request.user + if user and user.admin: + return + raise APIPermissionError('No permission.') + +@interceptor('/') +def user_interceptor(next): + logging.info('try to bind user from session cookie...') + user = None + cookie = ctx.request.cookies.get(_COOKIE_NAME) + if cookie: + logging.info('parse session cookie...') + user = parse_signed_cookie(cookie) + if user: + logging.info('bind user <%s> to session...' % user.email) + ctx.request.user = user + return next() + +@interceptor('/manage/') +def manage_interceptor(next): + user = ctx.request.user + if user and user.admin: + return next() + raise seeother('/signin') + +@view('blogs.html') +@get('/') +def index(): + blogs, page = _get_blogs_by_page() + return dict(page=page, blogs=blogs, user=ctx.request.user) + +@view('blog.html') +@get('/blog/:blog_id') +def blog(blog_id): + blog = Blog.get(blog_id) + if blog is None: + raise notfound() + blog.html_content = markdown2.markdown(blog.content) + comments = Comment.find_by('where blog_id=? order by created_at desc limit 1000', blog_id) + return dict(blog=blog, comments=comments, user=ctx.request.user) + +@view('signin.html') +@get('/signin') +def signin(): + return dict() + +@get('/signout') +def signout(): + ctx.response.delete_cookie(_COOKIE_NAME) + raise seeother('/') + +@api +@post('/api/authenticate') +def authenticate(): + i = ctx.request.input(remember='') + email = i.email.strip().lower() + password = i.password + remember = i.remember + user = User.find_first('where email=?', email) + if user is None: + raise APIError('auth:failed', 'email', 'Invalid email.') + elif user.password != password: + raise APIError('auth:failed', 'password', 'Invalid password.') + # make session cookie: + max_age = 604800 if remember=='true' else None + cookie = make_signed_cookie(user.id, user.password, max_age) + ctx.response.set_cookie(_COOKIE_NAME, cookie, max_age=max_age) + user.password = '******' + return user + +_RE_EMAIL = re.compile(r'^[a-z0-9\.\-\_]+\@[a-z0-9\-\_]+(\.[a-z0-9\-\_]+){1,4}$') +_RE_MD5 = re.compile(r'^[0-9a-f]{32}$') + +@api +@post('/api/users') +def register_user(): + i = ctx.request.input(name='', email='', password='') + name = i.name.strip() + email = i.email.strip().lower() + password = i.password + if not name: + raise APIValueError('name') + if not email or not _RE_EMAIL.match(email): + raise APIValueError('email') + if not password or not _RE_MD5.match(password): + raise APIValueError('password') + user = User.find_first('where email=?', email) + if user: + raise APIError('register:failed', 'email', 'Email is already in use.') + user = User(name=name, email=email, password=password, image='http://www.gravatar.com/avatar/%s?d=mm&s=120' % hashlib.md5(email).hexdigest()) + user.insert() + # make session cookie: + cookie = make_signed_cookie(user.id, user.password, None) + ctx.response.set_cookie(_COOKIE_NAME, cookie) + return user + +@view('register.html') +@get('/register') +def register(): + return dict() + +def _get_blogs_by_page(): + total = Blog.count_all() + page = Page(total, _get_page_index()) + blogs = Blog.find_by('order by created_at desc limit ?,?', page.offset, page.limit) + return blogs, page + +@get('/manage/') +def manage_index(): + raise seeother('/manage/comments') + +@view('manage_comment_list.html') +@get('/manage/comments') +def manage_comments(): + return dict(page_index=_get_page_index(), user=ctx.request.user) + +@view('manage_blog_list.html') +@get('/manage/blogs') +def manage_blogs(): + return dict(page_index=_get_page_index(), user=ctx.request.user) + +@view('manage_blog_edit.html') +@get('/manage/blogs/create') +def manage_blogs_create(): + return dict(id=None, action='/api/blogs', redirect='/manage/blogs', user=ctx.request.user) + +@view('manage_blog_edit.html') +@get('/manage/blogs/edit/:blog_id') +def manage_blogs_edit(blog_id): + blog = Blog.get(blog_id) + if blog is None: + raise notfound() + return dict(id=blog.id, name=blog.name, summary=blog.summary, content=blog.content, action='/api/blogs/%s' % blog_id, redirect='/manage/blogs', user=ctx.request.user) + +@view('manage_user_list.html') +@get('/manage/users') +def manage_users(): + return dict(page_index=_get_page_index(), user=ctx.request.user) + +@api +@get('/api/blogs') +def api_get_blogs(): + format = ctx.request.get('format', '') + blogs, page = _get_blogs_by_page() + if format=='html': + for blog in blogs: + blog.content = markdown2.markdown(blog.content) + return dict(blogs=blogs, page=page) + +@api +@get('/api/blogs/:blog_id') +def api_get_blog(blog_id): + blog = Blog.get(blog_id) + if blog: + return blog + raise APIResourceNotFoundError('Blog') + +@api +@post('/api/blogs') +def api_create_blog(): + check_admin() + i = ctx.request.input(name='', summary='', content='') + name = i.name.strip() + summary = i.summary.strip() + content = i.content.strip() + if not name: + raise APIValueError('name', 'name cannot be empty.') + if not summary: + raise APIValueError('summary', 'summary cannot be empty.') + if not content: + raise APIValueError('content', 'content cannot be empty.') + user = ctx.request.user + blog = Blog(user_id=user.id, user_name=user.name, name=name, summary=summary, content=content) + blog.insert() + return blog + +@api +@post('/api/blogs/:blog_id') +def api_update_blog(blog_id): + check_admin() + i = ctx.request.input(name='', summary='', content='') + name = i.name.strip() + summary = i.summary.strip() + content = i.content.strip() + if not name: + raise APIValueError('name', 'name cannot be empty.') + if not summary: + raise APIValueError('summary', 'summary cannot be empty.') + if not content: + raise APIValueError('content', 'content cannot be empty.') + blog = Blog.get(blog_id) + if blog is None: + raise APIResourceNotFoundError('Blog') + blog.name = name + blog.summary = summary + blog.content = content + blog.update() + return blog + +@api +@post('/api/blogs/:blog_id/delete') +def api_delete_blog(blog_id): + check_admin() + blog = Blog.get(blog_id) + if blog is None: + raise APIResourceNotFoundError('Blog') + blog.delete() + return dict(id=blog_id) + +@api +@post('/api/blogs/:blog_id/comments') +def api_create_blog_comment(blog_id): + user = ctx.request.user + if user is None: + raise APIPermissionError('Need signin.') + blog = Blog.get(blog_id) + if blog is None: + raise APIResourceNotFoundError('Blog') + content = ctx.request.input(content='').content.strip() + if not content: + raise APIValueError('content') + c = Comment(blog_id=blog_id, user_id=user.id, user_name=user.name, user_image=user.image, content=content) + c.insert() + return dict(comment=c) + +@api +@post('/api/comments/:comment_id/delete') +def api_delete_comment(comment_id): + check_admin() + comment = Comment.get(comment_id) + if comment is None: + raise APIResourceNotFoundError('Comment') + comment.delete() + return dict(id=comment_id) + +@api +@get('/api/comments') +def api_get_comments(): + total = Comment.count_all() + page = Page(total, _get_page_index()) + comments = Comment.find_by('order by created_at desc limit ?,?', page.offset, page.limit) + return dict(comments=comments, page=page) + +@api +@get('/api/users') +def api_get_users(): + total = User.count_all() + page = Page(total, _get_page_index()) + users = User.find_by('order by created_at desc limit ?,?', page.offset, page.limit) + for u in users: + u.password = '******' + return dict(users=users, page=page) diff --git a/www/wsgiapp.py b/www/wsgiapp.py new file mode 100644 index 0000000..3684e83 --- /dev/null +++ b/www/wsgiapp.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__author__ = 'Michael Liao' + +''' +A WSGI application entry. +''' + +import logging; logging.basicConfig(level=logging.INFO) + +import os, time +from datetime import datetime + +from transwarp import db +from transwarp.web import WSGIApplication, Jinja2TemplateEngine + +from config import configs + +def datetime_filter(t): + delta = int(time.time() - t) + if delta < 60: + return u'1分钟前' + if delta < 3600: + return u'%s分钟前' % (delta // 60) + if delta < 86400: + return u'%s小时前' % (delta // 3600) + if delta < 604800: + return u'%s天前' % (delta // 86400) + dt = datetime.fromtimestamp(t) + return u'%s年%s月%s日' % (dt.year, dt.month, dt.day) + +# init db: +db.create_engine(**configs.db) + +# init wsgi app: +wsgi = WSGIApplication(os.path.dirname(os.path.abspath(__file__))) + +template_engine = Jinja2TemplateEngine(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')) +template_engine.add_filter('datetime', datetime_filter) + +wsgi.template_engine = template_engine + +import urls + +wsgi.add_interceptor(urls.user_interceptor) +wsgi.add_interceptor(urls.manage_interceptor) +wsgi.add_module(urls) + +if __name__ == '__main__': + wsgi.run(9000, host='0.0.0.0') +else: + application = wsgi.get_wsgi_application()