Cleanup static files
diff --git a/Gruntfile.js b/Gruntfile.js
index edbf621..ee186f7 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -42,7 +42,7 @@
 	files: [{
 	  expand: true,
 	  cwd: 'dev/img/',
-	  src: ['*.{png,gif,jpg,svg}'],
+	  src: ['*.{png,gif,jpg}'],
 	  dest: 'public/img/'
 	}]
       }
@@ -89,19 +89,20 @@
 	    timestamp: true
 	  },
 	  {
-	    expand: true,
+	    expand: false,
 	    cwd: 'dev/img/',
 	    src: 'favicon.ico',
 	    dest: 'public/',
+	    filter: 'isFile',
 	    nonull:true,
 	    timestamp:true
 	  },
-	  // Needs to overwrite the prepared svg as it corrupts the embedded js
 	  {
 	    expand: true,
 	    cwd: 'dev/img/',
-	    src: 'korap-overview.svg',
+	    src: '*.svg',
 	    dest: 'public/img/',
+	    filter: 'isFile',
 	    nonull:true,
 	    timestamp:true
 	  }
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 5cf2284..0685242 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -16,6 +16,8 @@
         by an unspecified document
   TODO: Implement "persistence"-Option,
         injecting the current creation date stamp
+  TODO: Implement vec-Type for document-id vectors
+        like docID in [1,2,3,4 ...]
 
   Error codes:
   701: "JSON-LD group has no @type attribute" 
diff --git a/kalamar.conf b/kalamar.conf
index 172c091..91adff5 100644
--- a/kalamar.conf
+++ b/kalamar.conf
@@ -70,6 +70,7 @@
 	pubOn => 'veröffentlicht am',
 	matchCount => 'Treffer',
 	noMatches => 'Es wurden keine Treffer für <code><%= stash("q") %></code> gefunden.',
+	notFound => '404 - Seite nicht gefunden',
 	jsFile => 'kalamar-<%= $Kalamar::VERSION %>-de.js',
 	korap => {
 	  -short => 'KorAP',
@@ -99,6 +100,7 @@
 	pubOn => 'published on',
 	matchCount => '<%= num($found, "match", "matches") %>',
 	noMatches => 'There were no matches for <code><%= stash("q") %></code>.',
+	notFound => '404 - Page not found',
 	glimpse => 'Sample',
 	faq => 'F.A.Q.',
 	tutorial => 'Tutorial',
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index 31cd35e..929e481 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -3,18 +3,24 @@
 use Mojo::ByteStream 'b';
 use Mojo::JSON 'decode_json';
 
-# Sync with package.json
-our $VERSION = '0.15.0';
+# Minor version - may be patched from package.json
+our $VERSION = '0.15';
 
 # TODO: The FAQ-Page has a contact form for new questions
+# TODO: Embed query serialization
+# TODO: Embed collection statistics
+# TODO: Implement tab opener for matches and the tutorial
+# TODO: Make the tutorial ql sensitive
+# TODO: Implement a "projects" system
 
 # Start the application and register all routes and plugins
 sub startup {
   my $self = shift;
 
   # Set version based on package file
-  # my $pkg = b($self->home . '/package.json')->slurp;
-  # $Kalamar::VERSION = decode_json($pkg)->{version};
+  # This may introduce a SemVer patch number
+  my $pkg = b($self->home . '/package.json')->slurp;
+  $Kalamar::VERSION = decode_json($pkg)->{version};
 
   # Add additional plugin path
   push(@{$self->plugins->namespaces}, __PACKAGE__ . '::Plugin');
@@ -31,26 +37,21 @@
     }) if $self->mode eq 'production';
 
 
-  # Cache static assets
-  # (not necessary, as long as shipped by nginx or Apache)
-  $self->hook(
-    after_static => sub {
-      my $res = shift->res;
-      if ($res->code) {
-	$res->headers->cache_control('public, max-age=172800');
-      };
-    });
-
   # Set secrets for signed cookies
   if (-e (my $secret = $self->home . '/kalamar.secret')) {
 
     # Load file and split lines for multiple secrets
     $self->secrets([b($secret)->slurp->split("\n")]);
   }
+
+  # File not found ...
+  # Kalamar needs secrets in a file to be easily deployable
+  # and publishable at the same time.
   else {
     $self->log->warn('Please create a kalamar.secret file');
   };
 
+
   # Load plugins
   foreach (
     'Config',                    # Configuration framework
@@ -58,7 +59,7 @@
     'Notifications',             # Client notifications
     'Search',                    # Abstract Search framework
     'CHI',                       # Global caching mechanism
-    'MailException',              # Alert via Email on exception
+    'MailException',             # Alert via Email on exceptions
     'TagHelpers::Pagination',    # Pagination widget
     'TagHelpers::MailToChiffre', # Obfuscate email addresses
     'KalamarHelpers',            # Specific Helpers for Kalamar
@@ -66,13 +67,16 @@
     $self->plugin($_);
   };
 
+
   # Configure mail exception
   $self->plugin('MailException' => $self->config('MailException'));
 
+
   # Configure documentation navigation
   my $navi = b($self->home . '/templates/doc/navigation.json')->slurp;
   $self->config(navi => decode_json($navi)) if $navi;
 
+
   # Establish routes
   my $r = $self->routes;
 
@@ -121,13 +125,12 @@
 =head2 Generate Static Asset Files
 
 To generate the static asset files (scripts, styles, images ...),
-you need NodeJS E<gt> 0.8 and Grunt. To install Grunt, just run
+you need NodeJS E<gt> 0.8. This will probably need administration
+rights.
 
-  $ sudo npm install -g grunt-cli
   $ npm install
   $ grunt
 
-
 =head2 Start Server
 
 Kalamar uses the L<Mojolicious|http://mojolicio.us/> framework,
@@ -135,13 +138,16 @@
 The recommended environment is based on L<Perlbrew|http://perlbrew.pl/>
 with L<App::cpanminus>.
 
-Some perl modules are not on CPAN yet,
-so you need to install them from GitHub.
-The easiest way to do this is running
+Some perl modules are not on CPAN yet, so you need to install them from GitHub.
+The easiest way to do this is using L<App:cpanminus>.
+This will probably need administration rights.
 
   $ cpanm git://github.com/Akron/Mojolicious-Plugin-Search.git
-  $ cpanm git://github.com/Akron/Mojolicious-Plugin-Localize.git
-  $ cpanm --installdeps .
+  $ cpanm --force git://github.com/Akron/Mojolicious-Plugin-Localize.git
+
+Then install the dependencies as always and run the test suite.
+There is no need to install Kalamar on your system.
+
   $ perl Makefile.PL
   $ make test
 
@@ -149,7 +155,9 @@
 L<Mojolicious apps|http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#DEPLOYMENT>.
 The easiest way is to start the built-in server:
 
-  $ perl script/kalamar deamon
+  $ perl script/kalamar daemon
+
+Kalamar will then be available at C<localhost:3000> in your browser.
 
 
 =head1 COPYRIGHT AND LICENSE
diff --git a/package.json b/package.json
index 1f20922..d326713 100755
--- a/package.json
+++ b/package.json
@@ -2,6 +2,10 @@
   "name": "Kalamar",
   "description": "Mojolicious based Frontend for KorAP",
   "version": "0.15.0",
+  "repository" : {
+    "type": "git",
+    "url": "https://github.com/KorAP/Kalamar.git"
+  }
   "devDependencies": {
     "grunt":                   "~0.4.5",
     "grunt-contrib-copy":      "^0.8.0",
diff --git a/public/css/font-awesome.min.css b/public/css/font-awesome.min.css
deleted file mode 100644
index 94df482..0000000
--- a/public/css/font-awesome.min.css
+++ /dev/null
@@ -1,4 +0,0 @@
-/*!
- *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
- *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */@font-face{font-family:'FontAwesome';src:url('../font/fontawesome-webfont.eot?v=4.1.0');src:url('../font/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../font/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('../font/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('../font/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
\ No newline at end of file
diff --git a/public/css/highlight.css b/public/css/highlight.css
deleted file mode 100644
index 1e61e83..0000000
--- a/public/css/highlight.css
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-
-Based on github.com style (c) Vasily Polovnyov <vast@whiteants.net>
-
-*/
-
-.hljs {
-  display: block;
-  padding: 0.5em;
-}
-
-.hljs-comment,
-.hljs-template_comment,
-.diff .hljs-header,
-.hljs-javadoc {
-  color: #998;
-  font-style: italic
-}
-
-.hljs-keyword,
-.css .rule .hljs-keyword,
-.hljs-winutils,
-.javascript .hljs-title,
-.nginx .hljs-title,
-.hljs-subst,
-.hljs-request,
-.hljs-status {
-  color: #333;
-  font-weight: bold
-}
-
-.hljs-number,
-.hljs-hexcolor,
-.ruby .hljs-constant {
-  color: #099;
-}
-
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-phpdoc,
-.tex .hljs-formula {
-  color: #d14
-}
-
-.hljs-title,
-.hljs-id,
-.coffeescript .hljs-params,
-.scss .hljs-preprocessor {
-  color: #900;
-  font-weight: bold
-}
-
-.javascript .hljs-title,
-.lisp .hljs-title,
-.clojure .hljs-title,
-.hljs-subst {
-  font-weight: normal
-}
-
-.hljs-class .hljs-title,
-.haskell .hljs-type,
-.vhdl .hljs-literal,
-.tex .hljs-command {
-  color: #458;
-  font-weight: bold
-}
-
-.hljs-tag,
-.hljs-tag .hljs-title,
-.hljs-rules .hljs-property,
-.django .hljs-tag .hljs-keyword {
-  color: #000080;
-  font-weight: normal
-}
-
-.hljs-attribute,
-.hljs-variable,
-.lisp .hljs-body {
-  color: #008080
-}
-
-.hljs-regexp {
-  color: #009926
-}
-
-.hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.lisp .hljs-keyword,
-.tex .hljs-special,
-.hljs-prompt {
-  color: #990073
-}
-
-.hljs-built_in,
-.lisp .hljs-title,
-.clojure .hljs-built_in {
-  color: #0086b3
-}
-
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-pi,
-.hljs-doctype,
-.hljs-shebang,
-.hljs-cdata {
-  color: #999;
-  font-weight: bold
-}
-
-.hljs-deletion {
-  background: #fdd
-}
-
-.hljs-addition {
-  background: #dfd
-}
-
-.diff .hljs-change {
-  background: #0086b3
-}
-
-.hljs-chunk {
-  color: #aaa
-}
diff --git a/public/css/matchinfo.css b/public/css/matchinfo.css
deleted file mode 100644
index faca77c..0000000
--- a/public/css/matchinfo.css
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * Table view
- */
-div.matchinfo {
-  position: relative;
-  width: 100%;
-  height: auto;
-  font-size: 10pt;
-}
-
-div.matchinfo div.matchtable {
-  z-index: 20;
-  margin-left: 122pt;
-  overflow-x: auto;
-  overflow-y: visible;
-  width: auto;
-}
-
-div.matchtable table {
-  display: table;
-  border-spacing: 2pt;
-  border-collapse: separate;
-}
-
-div.matchtable th {
-  color: white;
-}
-
-div.matchtable thead th,
-div.matchinfo > p {
-  background-color: #ff8000;
-}
-
-div.matchtable tbody th {
-  overflow:hidden;
-  text-overflow: ellipsis;
-}
-
-div.matchtable tr > th:nth-of-type(1),
-div.matchtable tr > th:nth-of-type(2) {
-  position: absolute;
-  z-index: 80;
-  vertical-align: middle;
-  left: 0pt;
-}
-
-div.matchtable tr > th:nth-of-type(1),
-div.matchtable tr > th:nth-of-type(2),
-div.matchtree h6 > span {
-  border-top: 2pt solid #ff8000;
-  width: 60pt;
-  padding: 0 !important;
-}
-
-div.matchtable tbody > tr:nth-of-type(1) > th {
-  border-top-color: transparent;
-}
-
-div.matchtable tr > th:nth-of-type(2) {
-  left: 62pt;
-}
-
-tbody tr:focus {
-  outline: none;
-}
-
-div.matchtable tbody tr:focus {
-  outline: 4px solid #7ba400;
-  -moz-outline-radius: 4px;
-  outline-radius: 4px;
-}
-
-div.matchtable tbody tr:focus td {
-  background-color: #7ba400;
-  color: white;
-  border-color: white;
-}
-
-div.matchtable tr > * {
-  padding: 0pt 6pt;
-  margin: 0;
-  line-height: 150%;
-}
-
-div.matchtable tr > td {
-  background-color: #ffd080;
-  white-space: nowrap;
-  vertical-align: top;
-  text-align: center;
-}
-
-div.matchtable tr:nth-child(odd) > td {
-  background-color: #f4eebb;
-}
-
-div.matchinfo > p {
-  position: relative;
-  box-sizing: border-box;
-  color: white;
-  font-size: inherit;
-  margin: 2pt 0 0 0 !important;
-  font-weight: bold;
-  width: 126pt;
-  cursor: pointer;
-  text-align: left !important;
-  padding-left: 4pt !important;
-}
-
-div.matchinfo > p:before {
-  content: '+ '; /* FontAwesome */
-}
-
-div.matchinfo > p *.menu {
-  position: absolute;
-  top: 0;
-  left: 126pt;
-  margin-top: 0;
-}
-
-div.matchinfo > p *.menu {
-  border-top-right-radius: 8px;
-}
-
-div.matchinfo > p *.menu > li:first-of-type {
-  border-top-right-radius: 5px;
-}
-
-/**
- * Tree view
- */
-div.matchtree {
-  position: relative;
-  overflow-x: hidden;
-  overflow-y: visible;
-  padding: 0;
-  margin-top: 1pt;
-}
-
-div.matchtree h6 {
-  display: inline;
-  font-size: inherit;
-  color: white;
-  text-align: center;
-  margin: 0;
-  padding: 0 !important;
-  float: left;
-}
-
-div.matchtree h6 span {
-  display: inline-block;
-  margin: 0;
-}
-
-div.matchtree h6 > span:nth-of-type(2),
-div.matchinfo > p {
-  margin-left: 2pt;
-}
-
-div.matchtree div {
-  overflow-x: auto;
-  margin: 2pt 2pt 2pt 126pt;
-/*
-  background-color: transparent;
-  background-color: #f4eebb;
-  background-color: #ff8000;
-*/
-  background-color: #ffd080;
-}
-
-div.matchtree > div > em {
-  display: block;
-  width: 1.5em;
-  height: 1.5em;
-  line-height: 1.2em;
-  position: absolute;
-  right: 10px;
-  top: 10px;
-  border-radius: 5px;
-  border: 2px solid white;
-  content: 'x';
-  cursor: pointer;
-  text-align: center;
-  color: white;
-  font-weight: bold;
-  font-style: normal;
-}
-
-div.matchtree > div > em:after {
-  content: 'x';
-}
-
-path.edge {
-  stroke: #ff8000;
-  stroke-width: 2px;
-  fill: none;
-}
-
-g.middle > rect {
-  stroke: #ff8000;
-  stroke-width: 2px;
-  fill: #f4eebb;
-}
-
-g.leaf > rect {
-  display: none;
-}
-
-g > text {
-  text-anchor: middle;
-  font-size: 9pt;
-}
-
-g.leaf > text {
-  font-size: 10pt;
-  overflow: visible;
-}
diff --git a/public/css/media.css b/public/css/media.css
deleted file mode 100644
index ecddbb9..0000000
--- a/public/css/media.css
+++ /dev/null
@@ -1,62 +0,0 @@
-@media (orientation: portrait), (max-width: 42.5em) {
-  body {
-    font-size: 10pt;
-  }
-  #sidebar {
-    margin-left: -230px;
-  }
-  h1 {
-    margin-left: 3px;
-/*
-    width: 4em;
-    height: 1.8em;
-*/
-    width: 80px;
-    height: 40px;
-    background-size: 100%;
-    z-index: 300;
-  }
-  main {
-    margin-left: 14px;
-  }
-  #top form {
-    padding-left: 0px;
-/*
-    padding-top: 2.9em;
-*/
-    padding-top: 33px;
-  }
-  #sidebar {
-    padding-top: 22px;
-  }
-  #tutorial {
-    border-radius: 0;
-    border-width: 0;
-    right: 0;
-    left: 0;
-    bottom: 0;
-    top: 0;
-    padding: 0;
-  }
-  #tutorial iframe {
-    border-radius: 0;
-  }
-  #sidebar:not(.active) > i.fa-bars {
-    font-size: 12pt;
-    width: 10pt;
-    height: 11pt;
-  }
-  #searchbar, #searchbar input {
-    font-size: 9pt;
-  }
-  ol {
-    font-size: 9pt;
-  }
-  ol > li:target > div > div.snippet,
-  ol > li.active > div > div.snippet {
-    margin: 2px 3em 2px 4px;
-  }
-  pre.query {
-    font-size: 9.5pt;
-  }
-}
\ No newline at end of file
diff --git a/public/css/menu.css b/public/css/menu.css
deleted file mode 100644
index 0417fd1..0000000
--- a/public/css/menu.css
+++ /dev/null
@@ -1,28 +0,0 @@
-/* List view */
-
-/*
-  .hint {
-    max-width: 23em;
-    margin-top: -1px;
-    display: inline-block;
-    opacity: 0;
-    border-top-width: 0px;
-  }
-*/
-
-
-/*
-  border: 2px solid white;
-  height: -1.5em;
-  border-top-width: 0;
-  background-color: #7ba400;
-*/
-
-/*
-  .hint > li {
-    border-bottom: 5px solid transparent;
-  }
-*/
-
-
-
diff --git a/public/css/vc.css b/public/css/vc.css
deleted file mode 100644
index f4b6fc5..0000000
--- a/public/css/vc.css
+++ /dev/null
@@ -1,275 +0,0 @@
-@charset "utf-8";
-
-/*
- dark-green: #496000
- green: #7ba400
- orange: #f4eebb
-*/
-
-body {
-  background-color: #7ba400;
-  color: white;
-  font-family: tahoma, verdana, arial;
-  font-size: 10pt;
-}
-
-.vc .doc > span + span {
-  margin-left: 5pt;
-}
-
-.vc .docGroup {
-  position: relative;
-  background-color: #7ba400;
-  color: white;
-  display: inline-block;
-  border-radius: 10px;
-  border-style: solid;
-
-  /* See margin-left in docGroup::before */
-  margin-left: 2.8em;
-  border-width: 0 3px 0 3px;
-  padding: .6em .5em;
-}
-
-.vc .rewritten .rewrite {
-  margin-left: 4pt;
-  display: inline-block;
-  color: #ffa500;
-}
-
-.vc .rewritten .rewrite:after {
-  font-family: FontAwesome;
-  font-style: normal;
-  font-weight: normal;
-  content: "\f040"; // "\f14b";
-  text-decoration: underline;
-}
-
-.vc .rewritten .rewrite span {
-  display: none;
-}
-
-/*
-.vc .rewritten .rewrite:hover span {
-  display: block;
-}
-*/
-
-.vc .docGroup .docGroup {
-  display: block;
-}
-
-.vc > .docGroup {
-  margin-left: 0;
-}
-
-.vc .operators {
-  opacity: 0;
-  white-space: nowrap;
-  padding: 0;
-  font-size: 0;
-  line-height: 0;
-}
-
-.vc .operators > span {
-  cursor: pointer;
-  font-size: 9pt;
-  line-height: 1.3em;
-  padding: 0 4px;
-  display: inline-block;
-}
-
-.vc .operators > span.and {
-  background-color: white;
-  color: #7ba400;
-}
-
-.vc .doc > .operators > span.and {
-  border-radius: inherit;
-  border-top-right-radius: 0;
-  border-bottom-right-radius: 0;
-}
-
-.vc .operators > span.or {
-  background-color: #ffa500;
-  color: white;
-}
-
-.vc .operators > span.delete {
-  background-color: red;
-  border-radius: inherit;
-  color: white;
-}
-
-.vc .doc > .operators > span.delete {
-  border-top-left-radius: 0;
-  border-bottom-left-radius: 0;
-}
-
-.vc .doc > .operators {
-  margin-left: 10px;
-}
-
-.vc .docGroup[data-operation=or] > .doc::before,
-.vc .docGroup[data-operation=or] > .docGroup::before {
-  content: "oder";
-}
-
-.vc .docGroup[data-operation=and] > .doc::before,
-.vc .docGroup[data-operation=and] > .docGroup::before {
-  content: "und";
-}
-
-.vc .docGroup[data-operation] > .doc:first-child::before,
-.vc .docGroup[data-operation] > .docGroup:first-child::before {
-  content: '';
-}
-
-.vc .docGroup[data-operation] > .doc::before,
-.vc .docGroup[data-operation] > .docGroup::before {
-  display: inline-block;
-  text-align: right;
-  width: 2.2em;
-}
-
-
-.vc .docGroup[data-operation] > .doc::before {
-  padding-right: 1.2em;
-}
-
-.vc .docGroup[data-operation] > .docGroup::before {
-  position: absolute;
-}
-
-.vc .docGroup[data-operation] > .doc::before {
-  margin-right: .1em;
-}
-
-.vc .docGroup > .docGroup::before {
-  margin-left: -3.4em;
-}
-
-/*
-.vc .docGroup[data-operation=and]::before,
-.vc .docGroup[data-operation=and] .operators {
-  background-color: white;
-}
-*/
-
-.vc .docGroup[data-operation] > .doc::before,
-.vc .docGroup[data-operation] > .docGroup::before {
-  color: #496000;
-}
-
-.vc .docGroup[data-operation=or] {
-  border-color: #ffa500;
-}
-
-.vc .docGroup[data-operation=or] > .operators {
-  border-color: #ffa500;
-  background-color: #ffa500;
-  color: white;
-}
-
-.docGroup > .operators {
-  z-index: 30;
-}
-
-.docGroup
-.docGroup > .operators {
-  z-index: 31;
-}
-
-.docGroup
-.docGroup
-.docGroup > .operators {
-  z-index: 32;
-}
-
-.docGroup
-.docGroup
-.docGroup
-.docGroup > .operators {
-  z-index: 33;
-}
-
-.docGroup
-.docGroup
-.docGroup
-.docGroup
-.docGroup > .operators {
-  z-index: 34;
-}
-
-.docGroup
-.docGroup
-.docGroup
-.docGroup
-.docGroup
-.docGroup > .operators {
-  z-index: 35;
-}
-
-.docGroup
-.docGroup
-.docGroup
-.docGroup
-.docGroup
-.docGroup
-.docGroup > .operators {
-  z-index: 36;
-}
-
-.vc .doc > span.key,
-.vc .doc > span.value {
-  font-weight: bold;
-}
-
-.vc .doc > span.key {
-  position: relative;
-}
-
-.vc .doc > span.key > ul {
-  margin: 0;
-  margin-left: 3.3em;
-}
-
-.vc .operators {
-  color: #7ba400;
-  border-color: white;
-  text-align: center;
-  font-weight: bold;
-  border-style: solid;
-}
-
-.vc .docGroup > .operators {
-  position: absolute;
-  display: block;
-  top: 10px;
-  vertical-align: middle;
-}
-
-.vc .doc > .operators {
-  display: inline-block;
-  border-color: #ffa500;
-  border-width: 2px 2px 2px 2px;
-  border-radius: 7px;
-}
-
-.vc .docGroup > .operators {
-  left: 3px;
-  border-width: 2px 2px 2px 0;
-  border-top-right-radius: 7px;
-  border-bottom-right-radius: 7px;
-  margin-left: 100%;
-  padding: 0;
-}
-
-.vc .docGroup:hover {
-  background-color: rgba(255,255,255,0.05);
-}
-
-.vc .docGroup:hover > .operators,
-.vc .doc:hover > .operators {
-  opacity: 1;
-}
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index 85d8593..0000000
--- a/public/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/public/img/korap-logo-solo.png b/public/img/korap-logo-solo.png
deleted file mode 100644
index 183bda3..0000000
--- a/public/img/korap-logo-solo.png
+++ /dev/null
Binary files differ
diff --git a/public/img/korap-logo-solo.svg b/public/img/korap-logo-solo.svg
deleted file mode 100644
index 73b7c58..0000000
--- a/public/img/korap-logo-solo.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   version="1.1"
-   width="297"
-   height="108"
-   id="svg2">
-  <defs
-     id="defs4" />
-  <metadata
-     id="metadata7">
-    <rdf:RDF>
-      <cc:Work>
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <path
-     d="m 272.6875,2.3470265 c -0.13853,0 -0.26847,0.028 -0.40625,0.031 -0.0633,9e-4 -0.1244,0 -0.1875,0 l -41.53125,0 -40,3e-4 -20,-3e-4 -11.9375,0 -10.84375,0 0,0.062 c -9.55779,0.3611 -17.1875,8.1974995 -17.1875,17.8436995 0,0.2871 0.0179,0.5599 0.0312,0.8438 l -0.0625,0 0,81.250004 40,0 0,-40.000004 20,0 0,40.000004 40,0 0,-40.000004 42.125,0 0.46875,0 0,-0.031 c 9.62803,-0.2482 17.35652,-8.0737 17.40625,-17.7499 1.6e-4,-0.031 0,-0.062 0,-0.094 l 0,-24.2501 c 0,-0.1254 0.003,-0.2502 0,-0.375 -0.19976,-9.7029 -8.12415,-17.5311995 -17.875,-17.5311995 z m -102.125,20.0312995 20,0 0,20 -20,0 z m 60,0 20,0 0,20 -20,0 z"
-     id="path6"
-     style="fill:#496000;fill-opacity:1;stroke:#ffffff;stroke-width:4.69999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-  <path
-     d="M 2.625,7.7150265 2.5,102.37833 l 40.0625,0 0,-42.812504 19.9375,42.812504 12,0 28.0625,0 14,0 40,0 0,-40.000004 40,0 0,-2.7188 c -3.6e-4,-0.01 3.8e-4,-0.021 0,-0.031 -0.3416,-9.4668 -8.05179,-17.0523 -17.5625,-17.2187 -5.5e-4,0 5.5e-4,-0.031 0,-0.031 l -0.3125,0 -22.125,0 -40,0 -41.9375,0 0,0.125 -0.0625,-0.125 28,-34.6632995 -39.9375,0 -20.0625,17.5694995 0,-17.5694995 -39.9375,0 z m 91.9375,54.6632995 20,0 0,20 -20,0 z"
-     id="path8"
-     style="fill:#ffffff;fill-opacity:1;stroke:#496000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-</svg>
diff --git a/public/img/korap-logo.svg b/public/img/korap-logo.svg
deleted file mode 100644
index 48daea5..0000000
--- a/public/img/korap-logo.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   version="1.1"
-   width="176"
-   height="62.5"
-   transform="scale(.49)"
-   id="svg2">
-  <defs id="defs4" />
-  <metadata id="metadata7">
-    <rdf:RDF>
-      <cc:Work>
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title>KorAP-Testbed Logo</dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g transform="translate(-193.4375,-1075.875)" id="layer1">
-    <path d="m 452.125,1098.3437 c -0.13853,0 -0.26847,0.028 -0.40625,0.031 -0.0633,9e-4 -0.1244,0 -0.1875,0 l -41.53125,0 -40,0 -20,0 -11.9375,0 -10.84375,0 0,0.062 c -9.55779,0.3611 -17.1875,8.1975 -17.1875,17.8437 0,0.2871 0.0179,0.5599 0.0312,0.8438 l -0.0625,0 0,81.25 40,0 0,-40 20,0 0,40 40,0 0,-40 42.125,0 0.46875,0 0,-0.031 c 9.62803,-0.2482 17.35652,-8.0737 17.40625,-17.7499 1.6e-4,-0.031 0,-0.062 0,-0.094 l 0,-24.2501 c 0,-0.1254 0.003,-0.2502 0,-0.375 -0.19976,-9.7029 -8.12415,-17.5312 -17.875,-17.5312 z M 350,1118.375 l 20,0 0,20 -20,0 z m 60,0 20,0 0,20 -20,0 z" style="fill:#496000;fill-opacity:1;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-    <path d="m 196.0625,1078.375 -0.125,120 40.0625,0 0,-42.8125 19.9375,42.8125 12,0 28.0625,0 14,0 40,0 0,-40 40,0 0,-2.7188 c -3.6e-4,-0.01 3.8e-4,-0.021 0,-0.031 -0.3416,-9.4668 -8.05179,-17.0523 -17.5625,-17.2187 -5.5e-4,0 5.5e-4,-0.031 0,-0.031 l -0.3125,0 -22.125,0 -40,0 -41.9375,0 0,0.125 -0.0625,-0.125 28,-60 -39.9375,0 -20.0625,42.9062 0,-42.9062 -39.9375,0 z m 91.9375,80 20,0 0,20 -20,0 0,-20 z" style="fill:#ffffff;fill-opacity:1;stroke:#496000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-    <g style="fill:#ffffff;fill-opacity:1;stroke:none">
-      <path d="m 424.30998,1197.2666 0,-28.4881 -8.57407,0 0,-2.6594 19.99908,0 0,2.6594 -8.59535,0 0,28.4881 -2.82966,0" />
-      <path d="m 448.01103,1185.6714 c -0.12767,-1.7304 -0.70211,-3.0708 -1.72333,-4.0211 -1.02124,-0.9503 -2.40415,-1.4255 -4.14874,-1.4255 -1.58859,0 -2.92186,0.4965 -3.99982,1.4893 -1.06379,0.9929 -1.68078,2.312 -1.85098,3.9573 l 11.72287,0 m 3.10624,2.2339 -14.99931,0 c 0.0709,2.4396 0.68081,4.3544 1.8297,5.7444 1.14888,1.3901 2.68781,2.0851 4.61681,2.0851 1.38999,0 2.6098,-0.3759 3.65941,-1.1277 1.04958,-0.7517 1.92188,-1.8864 2.6169,-3.4041 l 2.40414,1.3191 c -0.96451,1.9148 -2.14885,3.3261 -3.55302,4.2339 -1.39003,0.8936 -3.09917,1.3404 -5.12743,1.3404 -2.76584,0 -5.00687,-0.922 -6.7231,-2.7659 -1.70205,-1.858 -2.55307,-4.2906 -2.55307,-7.2975 0,-3.0921 0.84393,-5.5884 2.5318,-7.489 1.70204,-1.9006 3.9218,-2.851 6.65927,-2.851 2.60979,0 4.70189,0.8794 6.27631,2.6382 1.57437,1.7446 2.36157,4.0778 2.36159,6.9997 l 0,0.5744" />
-      <path d="m 454.45754,1193.9051 2.48925,-1.4255 c 0.41133,1.0496 1.00704,1.8439 1.78715,2.3829 0.7801,0.5248 1.73751,0.7872 2.87221,0.7872 1.10633,0 1.98572,-0.2766 2.63818,-0.8298 0.65244,-0.5673 0.97867,-1.3191 0.97868,-2.2552 -10e-6,-1.4467 -1.28364,-2.6736 -3.85089,-3.6807 -0.2695,-0.099 -0.48225,-0.1844 -0.63827,-0.2553 -1.98573,-0.7801 -3.37573,-1.5815 -4.17002,-2.4041 -0.79429,-0.8369 -1.19144,-1.8652 -1.19143,-3.085 -1e-5,-1.6028 0.56734,-2.9148 1.70205,-3.936 1.13469,-1.0354 2.60271,-1.5531 4.40405,-1.5531 1.53184,0 2.83674,0.3333 3.91472,0.9999 1.07795,0.6667 1.86514,1.617 2.36159,2.851 l -2.40415,1.3403 c -0.29787,-0.8935 -0.7943,-1.5744 -1.48929,-2.0424 -0.69501,-0.4681 -1.54604,-0.7021 -2.55307,-0.7021 -0.90777,0 -1.65951,0.2695 -2.25522,0.8084 -0.58154,0.5249 -0.87231,1.1844 -0.8723,1.9787 -1e-5,0.7801 0.29076,1.4255 0.8723,1.9361 0.58153,0.5106 1.78714,1.0708 3.61686,1.6807 2.07081,0.7234 3.46082,1.5106 4.17002,2.3616 0.72335,0.8511 1.08504,2.0283 1.08505,3.5318 -10e-6,1.7304 -0.617,3.1133 -1.85097,4.1487 -1.234,1.0354 -2.8935,1.5532 -4.9785,1.5532 -1.60277,0 -2.98569,-0.3617 -4.14875,-1.0851 -1.14888,-0.7376 -1.97863,-1.773 -2.48925,-3.1062" />
-      <path d="m 473.83964,1180.6291 -3.46793,0 0,-2.234 3.46793,0 0,-7.7443 2.57435,0 0,7.7443 3.78706,0 0,2.234 -3.78706,0 0,16.6375 -2.57435,0 0,-16.6375" />
-      <path d="m 499.39166,1188.033 c -2e-5,-2.468 -0.57446,-4.4041 -1.72332,-5.8083 -1.1489,-1.4183 -2.70911,-2.1275 -4.68064,-2.1275 -1.97155,0 -3.51758,0.6666 -4.63809,1.9999 -1.12052,1.3191 -1.68078,3.1346 -1.68077,5.4465 -10e-6,2.5248 0.56734,4.5105 1.70205,5.9572 1.14887,1.4326 2.71618,2.1489 4.70191,2.1489 2.02826,0 3.58847,-0.6525 4.68064,-1.9574 1.09213,-1.3191 1.6382,-3.2055 1.63822,-5.6593 m -12.68027,9.2336 -2.6169,0 0,-32.9772 2.6169,0 0,17.5524 c 0.63826,-1.3616 1.53184,-2.39 2.68073,-3.085 1.16306,-0.7092 2.54597,-1.0638 4.14875,-1.0638 2.58142,0 4.68771,0.9574 6.31886,2.8722 1.63111,1.9007 2.44667,4.3616 2.44669,7.3827 -2e-5,3.0495 -0.82977,5.5033 -2.48925,7.3613 -1.64533,1.8581 -3.82253,2.7872 -6.53161,2.7872 -1.51767,0 -2.83676,-0.3617 -3.95727,-1.0851 -1.12052,-0.7234 -1.99282,-1.7872 -2.6169,-3.1913 l 0,3.4466" />
-      <path d="m 520.77367,1185.6714 c -0.12767,-1.7304 -0.70211,-3.0708 -1.72333,-4.0211 -1.02124,-0.9503 -2.40416,-1.4255 -4.14874,-1.4255 -1.58859,0 -2.92187,0.4965 -3.99982,1.4893 -1.06379,0.9929 -1.68078,2.312 -1.85098,3.9573 l 11.72287,0 m 3.10624,2.2339 -14.99932,0 c 0.0709,2.4396 0.68082,4.3544 1.82971,5.7444 1.14887,1.3901 2.68781,2.0851 4.61681,2.0851 1.38999,0 2.60979,-0.3759 3.65941,-1.1277 1.04958,-0.7517 1.92188,-1.8864 2.6169,-3.4041 l 2.40414,1.3191 c -0.96451,1.9148 -2.14885,3.3261 -3.55303,4.2339 -1.39002,0.8936 -3.09916,1.3404 -5.12742,1.3404 -2.76584,0 -5.00687,-0.922 -6.7231,-2.7659 -1.70205,-1.858 -2.55308,-4.2906 -2.55307,-7.2975 -1e-5,-3.0921 0.84393,-5.5884 2.53179,-7.489 1.70205,-1.9006 3.9218,-2.851 6.65928,-2.851 2.60979,0 4.70189,0.8794 6.2763,2.6382 1.57438,1.7446 2.36158,4.0778 2.3616,6.9997 l 0,0.5744" />
-      <path d="m 530.66684,1188.033 c -10e-6,2.4396 0.54607,4.3189 1.63822,5.638 1.10633,1.3191 2.68072,1.9787 4.72319,1.9787 1.97153,0 3.52465,-0.7163 4.65936,-2.1489 1.13468,-1.4467 1.70203,-3.4324 1.70205,-5.9572 -2e-5,-2.3119 -0.56027,-4.1274 -1.68077,-5.4465 -1.12053,-1.3333 -2.66656,-1.9999 -4.63809,-1.9999 -1.97155,0 -3.53176,0.7092 -4.68064,2.1275 -1.14889,1.4042 -1.72333,3.3403 -1.72332,5.8083 m 12.68027,9.2336 0,-3.4466 c -0.6241,1.4041 -1.4964,2.4679 -2.6169,3.1913 -1.12053,0.7234 -2.43962,1.0851 -3.95727,1.0851 -2.7091,0 -4.8934,-0.9291 -6.55289,-2.7872 -1.64532,-1.858 -2.46798,-4.3118 -2.46797,-7.3613 -10e-6,-3.0211 0.81556,-5.482 2.44669,-7.3827 1.63113,-1.9148 3.73741,-2.8722 6.31886,-2.8722 1.60276,0 2.97858,0.3546 4.12748,1.0638 1.16305,0.695 2.06371,1.7234 2.702,3.085 l 0,-17.5524 2.65945,0 0,32.9772 -2.65945,0" />
-    </g>
-  </g>
-</svg>
diff --git a/public/js/ajax.js b/public/js/ajax.js
deleted file mode 100644
index e128820..0000000
--- a/public/js/ajax.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// TODO: https://github.com/honza/140medley/blob/master/140medley.js
-
-"use strict";
-
-// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
-// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest
-// r.addEventListener("progress", updateProgress, false);
-// http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml
-// http://stackoverflow.com/questions/6112744/load-javascript-on-demand
-var Ajax = {
-  getJSON : function (url, onload) {
-    var r = new XMLHttpRequest();
-    r.open('GET', url, true);
-    r.setRequestHeader("Accept", "application/json");
-    r.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); 
-    r.onreadystatechange = function () {
-      if (this.readyState == 4)
-	onload(JSON.parse(this.responseText));
-    };
-    r.send();
-  }
-};
-
diff --git a/public/js/d3.v3.min.js b/public/js/d3.v3.min.js
deleted file mode 100644
index ac74e5a..0000000
--- a/public/js/d3.v3.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function r(n){return{left:function(t,r,e,u){for(arguments.length<3&&(e=0),arguments.length<4&&(u=t.length);u>e;){var i=e+u>>>1;n(t[i],r)<0?e=i+1:u=i}return e},right:function(t,r,e,u){for(arguments.length<3&&(e=0),arguments.length<4&&(u=t.length);u>e;){var i=e+u>>>1;n(t[i],r)>0?u=i:e=i+1}return e}}}function e(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var r in t)Object.defineProperty(n.prototype,r,{value:t[r],enumerable:!1})}catch(e){n.prototype=t}}function o(){}function a(n){return sa+n in this}function c(n){return n=sa+n,n in this&&delete this[n]}function s(){var n=[];return this.forEach(function(t){n.push(t)}),n}function l(){var n=0;for(var t in this)t.charCodeAt(0)===la&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===la)return!1;return!0}function h(){}function g(n,t,r){return function(){var e=r.apply(t,arguments);return e===t?n:e}}function p(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var r=0,e=fa.length;e>r;++r){var u=fa[r]+t;if(u in n)return u}}function v(){}function d(){}function m(n){function t(){for(var t,e=r,u=-1,i=e.length;++u<i;)(t=e[u].on)&&t.apply(this,arguments);return n}var r=[],e=new o;return t.on=function(t,u){var i,o=e.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,r=r.slice(0,i=r.indexOf(o)).concat(r.slice(i+1)),e.remove(t)),u&&r.push(e.set(t,{on:u})),n)},t}function y(){Bo.event.preventDefault()}function x(){for(var n,t=Bo.event;n=t.sourceEvent;)t=n;return t}function M(n){for(var t=new d,r=0,e=arguments.length;++r<e;)t[arguments[r]]=m(t);return t.of=function(r,e){return function(u){try{var i=u.sourceEvent=Bo.event;u.target=n,Bo.event=u,t[u.type].apply(r,e)}finally{Bo.event=i}}},t}function _(n){return ga(n,ya),n}function b(n){return"function"==typeof n?n:function(){return pa(n,this)}}function w(n){return"function"==typeof n?n:function(){return va(n,this)}}function S(n,t){function r(){this.removeAttribute(n)}function e(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var r=t.apply(this,arguments);null==r?this.removeAttribute(n):this.setAttribute(n,r)}function a(){var r=t.apply(this,arguments);null==r?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,r)}return n=Bo.ns.qualify(n),null==t?n.local?e:r:"function"==typeof t?n.local?a:o:n.local?i:u}function k(n){return n.trim().replace(/\s+/g," ")}function E(n){return new RegExp("(?:^|\\s+)"+Bo.requote(n)+"(?:\\s+|$)","g")}function A(n){return n.trim().split(/^|\s+/)}function C(n,t){function r(){for(var r=-1;++r<u;)n[r](this,t)}function e(){for(var r=-1,e=t.apply(this,arguments);++r<u;)n[r](this,e)}n=A(n).map(N);var u=n.length;return"function"==typeof t?e:r}function N(n){var t=E(n);return function(r,e){if(u=r.classList)return e?u.add(n):u.remove(n);var u=r.getAttribute("class")||"";e?(t.lastIndex=0,t.test(u)||r.setAttribute("class",k(u+" "+n))):r.setAttribute("class",k(u.replace(t," ")))}}function z(n,t,r){function e(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,r)}function i(){var e=t.apply(this,arguments);null==e?this.style.removeProperty(n):this.style.setProperty(n,e,r)}return null==t?e:"function"==typeof t?i:u}function L(n,t){function r(){delete this[n]}function e(){this[n]=t}function u(){var r=t.apply(this,arguments);null==r?delete this[n]:this[n]=r}return null==t?r:"function"==typeof t?u:e}function T(n){return"function"==typeof n?n:(n=Bo.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function q(n){return{__data__:n}}function R(n){return function(){return ma(this,n)}}function D(t){return arguments.length||(t=n),function(n,r){return n&&r?t(n.__data__,r.__data__):!n-!r}}function P(n,t){for(var r=0,e=n.length;e>r;r++)for(var u,i=n[r],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,r);return n}function U(n){return ga(n,Ma),n}function j(n){var t,r;return function(e,u,i){var o,a=n[i].update,c=a.length;for(i!=r&&(r=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function H(){var n=this.__transition__;n&&++n.active}function F(n,t,r){function e(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,Wo(arguments));e.call(this),this.addEventListener(n,this[o]=u,u.$=r),u._=t}function i(){var t,r=new RegExp("^__on([^.]+)"+Bo.requote(n)+"$");for(var e in this)if(t=e.match(r)){var u=this[e];this.removeEventListener(t[1],u,u.$),delete this[e]}}var o="__on"+n,a=n.indexOf("."),c=O;a>0&&(n=n.substring(0,a));var s=ba.get(n);return s&&(n=s,c=I),a?t?u:e:t?v:i}function O(n,t){return function(r){var e=Bo.event;Bo.event=r,t[0]=this.__data__;try{n.apply(this,t)}finally{Bo.event=e}}}function I(n,t){var r=O(n,t);return function(n){var t=this,e=n.relatedTarget;e&&(e===t||8&e.compareDocumentPosition(t))||r.call(t,n)}}function Y(){var n=".dragsuppress-"+ ++Sa,t="click"+n,r=Bo.select(Qo).on("touchmove"+n,y).on("dragstart"+n,y).on("selectstart"+n,y);if(wa){var e=Ko.style,u=e[wa];e[wa]="none"}return function(i){function o(){r.on(t,null)}r.on(n,null),wa&&(e[wa]=u),i&&(r.on(t,function(){y(),o()},!0),setTimeout(o,0))}}function Z(n,t){t.changedTouches&&(t=t.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var e=r.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,e=e.matrixTransform(n.getScreenCTM().inverse()),[e.x,e.y]}var u=n.getBoundingClientRect();return[t.clientX-u.left-n.clientLeft,t.clientY-u.top-n.clientTop]}function V(){return Bo.event.changedTouches[0].identifier}function $(){return Bo.event.target}function X(){return Qo}function B(n){return n>0?1:0>n?-1:0}function J(n,t,r){return(t[0]-n[0])*(r[1]-n[1])-(t[1]-n[1])*(r[0]-n[0])}function W(n){return n>1?0:-1>n?ka:Math.acos(n)}function G(n){return n>1?Aa:-1>n?-Aa:Math.asin(n)}function K(n){return((n=Math.exp(n))-1/n)/2}function Q(n){return((n=Math.exp(n))+1/n)/2}function nt(n){return((n=Math.exp(2*n))-1)/(n+1)}function tt(n){return(n=Math.sin(n/2))*n}function rt(){}function et(n,t,r){return new ut(n,t,r)}function ut(n,t,r){this.h=n,this.s=t,this.l=r}function it(n,t,r){function e(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*e(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,r=0>r?0:r>1?1:r,o=.5>=r?r*(1+t):r+t-r*t,i=2*r-o,yt(u(n+120),u(n),u(n-120))}function ot(n,t,r){return new at(n,t,r)}function at(n,t,r){this.h=n,this.c=t,this.l=r}function ct(n,t,r){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),st(r,Math.cos(n*=za)*t,Math.sin(n)*t)}function st(n,t,r){return new lt(n,t,r)}function lt(n,t,r){this.l=n,this.a=t,this.b=r}function ft(n,t,r){var e=(n+16)/116,u=e+t/500,i=e-r/200;return u=gt(u)*Oa,e=gt(e)*Ia,i=gt(i)*Ya,yt(vt(3.2404542*u-1.5371385*e-.4985314*i),vt(-.969266*u+1.8760108*e+.041556*i),vt(.0556434*u-.2040259*e+1.0572252*i))}function ht(n,t,r){return n>0?ot(Math.atan2(r,t)*La,Math.sqrt(t*t+r*r),n):ot(0/0,0/0,n)}function gt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function pt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function vt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function dt(n){return yt(n>>16,255&n>>8,255&n)}function mt(n){return dt(n)+""}function yt(n,t,r){return new xt(n,t,r)}function xt(n,t,r){this.r=n,this.g=t,this.b=r}function Mt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _t(n,t,r){var e,u,i,o=0,a=0,c=0;if(e=/([a-z]+)\((.*)\)/i.exec(n))switch(u=e[2].split(","),e[1]){case"hsl":return r(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=$a.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.substring(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function bt(n,t,r){var e,u,i=Math.min(n/=255,t/=255,r/=255),o=Math.max(n,t,r),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),e=n==o?(t-r)/a+(r>t?6:0):t==o?(r-n)/a+2:(n-t)/a+4,e*=60):(e=0/0,u=c>0&&1>c?0:e),et(e,u,c)}function wt(n,t,r){n=St(n),t=St(t),r=St(r);var e=pt((.4124564*n+.3575761*t+.1804375*r)/Oa),u=pt((.2126729*n+.7151522*t+.072175*r)/Ia),i=pt((.0193339*n+.119192*t+.9503041*r)/Ya);return st(116*u-16,500*(e-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Ct(n){return function(t,r,e){return 2===arguments.length&&"function"==typeof r&&(e=r,r=null),Nt(t,r,n,e)}}function Nt(n,t,r,e){function u(){var n,t=c.status;if(!t&&c.responseText||t>=200&&300>t||304===t){try{n=r.call(i,c)}catch(e){return o.error.call(i,e),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=Bo.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,s=null;return!Qo.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=Bo.event;Bo.event=n;try{o.progress.call(i,c)}finally{Bo.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(s=n,i):s},i.response=function(n){return r=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(Wo(arguments)))}}),i.send=function(r,e,u){if(2===arguments.length&&"function"==typeof e&&(u=e,e=null),c.open(r,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=s&&(c.responseType=s),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==e?null:e),i},i.abort=function(){return c.abort(),i},Bo.rebind(i,o,"on"),null==e?i:i.get(zt(e))}function zt(n){return 1===n.length?function(t,r){n(null==t?r:null)}:n}function Lt(){var n=Tt(),t=qt()-n;t>24?(isFinite(t)&&(clearTimeout(Wa),Wa=setTimeout(Lt,t)),Ja=0):(Ja=1,Ka(Lt))}function Tt(){var n=Date.now();for(Ga=Xa;Ga;)n>=Ga.t&&(Ga.f=Ga.c(n-Ga.t)),Ga=Ga.n;return n}function qt(){for(var n,t=Xa,r=1/0;t;)t.f?t=n?n.n=t.n:Xa=t.n:(t.t<r&&(r=t.t),t=(n=t).n);return Ba=n,r}function Rt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Dt(n,t){var r=Math.pow(10,3*ca(8-t));return{scale:t>8?function(n){return n/r}:function(n){return n*r},symbol:n}}function Pt(n){var t=n.decimal,r=n.thousands,e=n.grouping,u=n.currency,i=e?function(n){for(var t=n.length,u=[],i=0,o=e[0];t>0&&o>0;)u.push(n.substring(t-=o,t+o)),o=e[i=(i+1)%e.length];return u.reverse().join(r)}:At;return function(n){var r=nc.exec(n),e=r[1]||" ",o=r[2]||">",a=r[3]||"",c=r[4]||"",s=r[5],l=+r[6],f=r[7],h=r[8],g=r[9],p=1,v="",d="",m=!1;switch(h&&(h=+h.substring(1)),(s||"0"===e&&"="===o)&&(s=e="0",o="=",f&&(l-=Math.floor((l-1)/4))),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=tc.get(g)||Ut;var y=s&&f;return function(n){var r=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):a;if(0>p){var c=Bo.formatPrefix(n,h);n=c.scale(n),r=c.symbol+d}else n*=p;n=g(n,h);var x=n.lastIndexOf("."),M=0>x?n:n.substring(0,x),_=0>x?"":t+n.substring(x+1);!s&&f&&(M=i(M));var b=v.length+M.length+_.length+(y?0:u.length),w=l>b?new Array(b=l-b+1).join(e):"";return y&&(M=i(w+M)),u+=v,n=M+_,("<"===o?u+n+w:">"===o?w+u+n:"^"===o?w.substring(0,b>>=1)+u+n+w.substring(b):u+(y?n:w+n))+r}}}function Ut(n){return n+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,r){function e(t){var r=n(t),e=i(r,1);return e-t>t-r?r:e}function u(r){return t(r=n(new ec(r-1)),1),r}function i(n,r){return t(n=new ec(+n),r),n}function o(n,e,i){var o=u(n),a=[];if(i>1)for(;e>o;)r(o)%i||a.push(new Date(+o)),t(o,1);else for(;e>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,r){try{ec=jt;var e=new jt;return e._=n,o(e,t,r)}finally{ec=Date}}n.floor=n,n.round=e,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ft(n);return c.floor=c,c.round=Ft(e),c.ceil=Ft(u),c.offset=Ft(i),c.range=a,n}function Ft(n){return function(t,r){try{ec=jt;var e=new jt;return e._=t,n(e,r)._}finally{ec=Date}}}function Ot(n){function t(n){function t(t){for(var r,u,i,o=[],a=-1,c=0;++a<e;)37===n.charCodeAt(a)&&(o.push(n.substring(c,a)),null!=(u=ic[r=n.charAt(++a)])&&(r=n.charAt(++a)),(i=C[r])&&(r=i(t,null==u?"e"===r?" ":"0":u)),o.push(r),c=a+1);return o.push(n.substring(c,a)),o.join("")}var e=n.length;return t.parse=function(t){var e={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=r(e,n,t,0);if(u!=t.length)return null;"p"in e&&(e.H=e.H%12+12*e.p);var i=null!=e.Z&&ec!==jt,o=new(i?jt:ec);return"j"in e?o.setFullYear(e.y,0,e.j):"w"in e&&("W"in e||"U"in e)?(o.setFullYear(e.y,0,1),o.setFullYear(e.y,0,"W"in e?(e.w+6)%7+7*e.W-(o.getDay()+5)%7:e.w+7*e.U-(o.getDay()+6)%7)):o.setFullYear(e.y,e.m,e.d),o.setHours(e.H+Math.floor(e.Z/100),e.M+e.Z%100,e.S,e.L),i?o._:o},t.toString=function(){return n},t}function r(n,t,r,e){for(var u,i,o,a=0,c=t.length,s=r.length;c>a;){if(e>=s)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=N[o in ic?t.charAt(a++):o],!i||(e=i(n,r,e))<0)return-1}else if(u!=r.charCodeAt(e++))return-1}return e}function e(n,t,r){b.lastIndex=0;var e=b.exec(t.substring(r));return e?(n.w=w.get(e[0].toLowerCase()),r+e[0].length):-1}function u(n,t,r){M.lastIndex=0;var e=M.exec(t.substring(r));return e?(n.w=_.get(e[0].toLowerCase()),r+e[0].length):-1}function i(n,t,r){E.lastIndex=0;var e=E.exec(t.substring(r));return e?(n.m=A.get(e[0].toLowerCase()),r+e[0].length):-1}function o(n,t,r){S.lastIndex=0;var e=S.exec(t.substring(r));return e?(n.m=k.get(e[0].toLowerCase()),r+e[0].length):-1}function a(n,t,e){return r(n,C.c.toString(),t,e)}function c(n,t,e){return r(n,C.x.toString(),t,e)}function s(n,t,e){return r(n,C.X.toString(),t,e)}function l(n,t,r){var e=x.get(t.substring(r,r+=2).toLowerCase());return null==e?-1:(n.p=e,r)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function r(n){try{ec=jt;var t=new ec;return t._=n,e(t)}finally{ec=Date}}var e=t(n);return r.parse=function(n){try{ec=jt;var t=e.parse(n);return t&&t._}finally{ec=Date}},r.toString=e.toString,r},t.multi=t.utc.multi=ar;var x=Bo.map(),M=Yt(v),_=Zt(v),b=Yt(d),w=Zt(d),S=Yt(m),k=Zt(m),E=Yt(y),A=Zt(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var C={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+rc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(rc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(rc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:ir,"%":function(){return"%"}},N={a:e,A:u,b:i,B:o,c:a,d:Qt,e:Qt,H:tr,I:tr,j:nr,L:ur,m:Kt,M:rr,p:l,S:er,U:$t,w:Vt,W:Xt,x:c,X:s,y:Jt,Y:Bt,Z:Wt,"%":or};return t}function It(n,t,r){var e=0>n?"-":"",u=(e?-n:n)+"",i=u.length;return e+(r>i?new Array(r-i+1).join(t)+u:u)}function Yt(n){return new RegExp("^(?:"+n.map(Bo.requote).join("|")+")","i")}function Zt(n){for(var t=new o,r=-1,e=n.length;++r<e;)t.set(n[r].toLowerCase(),r);return t}function Vt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+1));return e?(n.w=+e[0],r+e[0].length):-1}function $t(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r));return e?(n.U=+e[0],r+e[0].length):-1}function Xt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r));return e?(n.W=+e[0],r+e[0].length):-1}function Bt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+4));return e?(n.y=+e[0],r+e[0].length):-1}function Jt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.y=Gt(+e[0]),r+e[0].length):-1}function Wt(n,t,r){return/^[+-]\d{4}$/.test(t=t.substring(r,r+5))?(n.Z=-t,r+5):-1}function Gt(n){return n+(n>68?1900:2e3)}function Kt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.m=e[0]-1,r+e[0].length):-1}function Qt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.d=+e[0],r+e[0].length):-1}function nr(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+3));return e?(n.j=+e[0],r+e[0].length):-1}function tr(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.H=+e[0],r+e[0].length):-1}function rr(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.M=+e[0],r+e[0].length):-1}function er(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.S=+e[0],r+e[0].length):-1}function ur(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+3));return e?(n.L=+e[0],r+e[0].length):-1}function ir(n){var t=n.getTimezoneOffset(),r=t>0?"-":"+",e=~~(ca(t)/60),u=ca(t)%60;return r+It(e,"0",2)+It(u,"0",2)}function or(n,t,r){ac.lastIndex=0;var e=ac.exec(t.substring(r,r+1));return e?r+e[0].length:-1}function ar(n){for(var t=n.length,r=-1;++r<t;)n[r][0]=this(n[r][0]);return function(t){for(var r=0,e=n[r];!e[1](t);)e=n[++r];return e[0](t)}}function cr(){}function sr(n,t,r){var e=r.s=n+t,u=e-n,i=e-u;r.t=n-i+(t-u)}function lr(n,t){n&&fc.hasOwnProperty(n.type)&&fc[n.type](n,t)}function fr(n,t,r){var e,u=-1,i=n.length-r;for(t.lineStart();++u<i;)e=n[u],t.point(e[0],e[1],e[2]);t.lineEnd()}function hr(n,t){var r=-1,e=n.length;for(t.polygonStart();++r<e;)fr(n[r],t,1);t.polygonEnd()}function gr(){function n(n,t){n*=za,t=t*za/2+ka/4;var r=n-e,o=r>=0?1:-1,a=o*r,c=Math.cos(t),s=Math.sin(t),l=i*s,f=u*c+l*Math.cos(a),h=l*o*Math.sin(a);gc.add(Math.atan2(h,f)),e=n,u=c,i=s}var t,r,e,u,i;pc.point=function(o,a){pc.point=n,e=(t=o)*za,u=Math.cos(a=(r=a)*za/2+ka/4),i=Math.sin(a)},pc.lineEnd=function(){n(t,r)}}function pr(n){var t=n[0],r=n[1],e=Math.cos(r);return[e*Math.cos(t),e*Math.sin(t),Math.sin(r)]}function vr(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function dr(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function mr(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function yr(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xr(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function Mr(n){return[Math.atan2(n[1],n[0]),G(n[2])]}function _r(n,t){return ca(n[0]-t[0])<Ca&&ca(n[1]-t[1])<Ca}function br(n,t){n*=za;var r=Math.cos(t*=za);wr(r*Math.cos(n),r*Math.sin(n),Math.sin(t))}function wr(n,t,r){++vc,mc+=(n-mc)/vc,yc+=(t-yc)/vc,xc+=(r-xc)/vc}function Sr(){function n(n,u){n*=za;var i=Math.cos(u*=za),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),s=Math.atan2(Math.sqrt((s=r*c-e*a)*s+(s=e*o-t*c)*s+(s=t*a-r*o)*s),t*o+r*a+e*c);dc+=s,Mc+=s*(t+(t=o)),_c+=s*(r+(r=a)),bc+=s*(e+(e=c)),wr(t,r,e)}var t,r,e;Ec.point=function(u,i){u*=za;var o=Math.cos(i*=za);t=o*Math.cos(u),r=o*Math.sin(u),e=Math.sin(i),Ec.point=n,wr(t,r,e)}}function kr(){Ec.point=br}function Er(){function n(n,t){n*=za;var r=Math.cos(t*=za),o=r*Math.cos(n),a=r*Math.sin(n),c=Math.sin(t),s=u*c-i*a,l=i*o-e*c,f=e*a-u*o,h=Math.sqrt(s*s+l*l+f*f),g=e*o+u*a+i*c,p=h&&-W(g)/h,v=Math.atan2(h,g);wc+=p*s,Sc+=p*l,kc+=p*f,dc+=v,Mc+=v*(e+(e=o)),_c+=v*(u+(u=a)),bc+=v*(i+(i=c)),wr(e,u,i)}var t,r,e,u,i;Ec.point=function(o,a){t=o,r=a,Ec.point=n,o*=za;var c=Math.cos(a*=za);e=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),wr(e,u,i)},Ec.lineEnd=function(){n(t,r),Ec.lineEnd=kr,Ec.point=br}}function Ar(){return!0}function Cr(n,t,r,e,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,r=n[0],e=n[t];if(_r(r,e)){u.lineStart();for(var a=0;t>a;++a)u.point((r=n[a])[0],r[1]);return u.lineEnd(),void 0}var c=new zr(r,n,null,!0),s=new zr(r,null,c,!1);c.o=s,i.push(c),o.push(s),c=new zr(e,n,null,!1),s=new zr(e,null,c,!0),c.o=s,i.push(c),o.push(s)}}),o.sort(t),Nr(i),Nr(o),i.length){for(var a=0,c=r,s=o.length;s>a;++a)o[a].e=c=!c;for(var l,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,s=l.length;s>a;++a)u.point((f=l[a])[0],f[1]);else e(g.x,g.n.x,1,u);g=g.n}else{if(p){l=g.p.z;for(var a=l.length-1;a>=0;--a)u.point((f=l[a])[0],f[1])}else e(g.x,g.p.x,-1,u);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Nr(n){if(t=n.length){for(var t,r,e=0,u=n[0];++e<t;)u.n=r=n[e],r.p=u,u=r;u.n=r=n[0],r.p=u}}function zr(n,t,r,e){this.x=n,this.z=t,this.o=r,this.e=e,this.v=!1,this.n=this.p=null}function Lr(n,t,r,e){return function(u,i){function o(t,r){var e=u(t,r);n(t=e[0],r=e[1])&&i.point(t,r)}function a(n,t){var r=u(n,t);d.point(r[0],r[1])}function c(){y.point=a,d.lineStart()}function s(){y.point=o,d.lineEnd()}function l(n,t){v.push([n,t]);var r=u(n,t);M.point(r[0],r[1])}function f(){M.lineStart(),v=[]}function h(){l(v[0][0],v[0][1]),M.lineEnd();var n,t=M.clean(),r=x.buffer(),e=r.length;if(v.pop(),p.push(v),v=null,e)if(1&t){n=r[0];var u,e=n.length-1,o=-1;if(e>0){for(_||(i.polygonStart(),_=!0),i.lineStart();++o<e;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else e>1&&2&t&&r.push(r.pop().concat(r.shift())),g.push(r.filter(Tr))}var g,p,v,d=t(i),m=u.invert(e[0],e[1]),y={point:o,lineStart:c,lineEnd:s,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=s,g=Bo.merge(g);var n=Dr(m,p);g.length?(_||(i.polygonStart(),_=!0),Cr(g,Rr,n,r,i)):n&&(_||(i.polygonStart(),_=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),_&&(i.polygonEnd(),_=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=qr(),M=t(x),_=!1;return y}}function Tr(n){return n.length>1}function qr(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,r){n.push([t,r])},lineEnd:v,buffer:function(){var r=t;return t=[],n=null,r},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Rr(n,t){return((n=n.x)[0]<0?n[1]-Aa-Ca:Aa-n[1])-((t=t.x)[0]<0?t[1]-Aa-Ca:Aa-t[1])}function Dr(n,t){var r=n[0],e=n[1],u=[Math.sin(r),-Math.cos(r),0],i=0,o=0;gc.reset();for(var a=0,c=t.length;c>a;++a){var s=t[a],l=s.length;if(l)for(var f=s[0],h=f[0],g=f[1]/2+ka/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===l&&(d=0),n=s[d];var m=n[0],y=n[1]/2+ka/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=_>=0?1:-1,w=b*_,S=w>ka,k=p*x;if(gc.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),i+=S?_+b*Ea:_,S^h>=r^m>=r){var E=dr(pr(f),pr(n));xr(E);var A=dr(u,E);xr(A);var C=(S^_>=0?-1:1)*G(A[2]);(e>C||e===C&&(E[0]||E[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Ca>i||Ca>i&&0>gc)^1&o}function Pr(n){var t,r=0/0,e=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?ka:-ka,c=ca(i-r);ca(c-ka)<Ca?(n.point(r,e=(e+o)/2>0?Aa:-Aa),n.point(u,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(i,e),t=0):u!==a&&c>=ka&&(ca(r-u)<Ca&&(r-=u*Ca),ca(i-a)<Ca&&(i-=a*Ca),e=Ur(r,e,i,o),n.point(u,e),n.lineEnd(),n.lineStart(),n.point(a,e),t=0),n.point(r=i,e=o),u=a},lineEnd:function(){n.lineEnd(),r=e=0/0},clean:function(){return 2-t}}}function Ur(n,t,r,e){var u,i,o=Math.sin(n-r);return ca(o)>Ca?Math.atan((Math.sin(t)*(i=Math.cos(e))*Math.sin(r)-Math.sin(e)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+e)/2}function jr(n,t,r,e){var u;if(null==n)u=r*Aa,e.point(-ka,u),e.point(0,u),e.point(ka,u),e.point(ka,0),e.point(ka,-u),e.point(0,-u),e.point(-ka,-u),e.point(-ka,0),e.point(-ka,u);else if(ca(n[0]-t[0])>Ca){var i=n[0]<t[0]?ka:-ka;u=r*i/2,e.point(-i,u),e.point(0,u),e.point(i,u)}else e.point(t[0],t[1])}function Hr(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function r(n){var r,i,c,s,l;return{lineStart:function(){s=c=!1,l=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?ka:-ka),h):0;if(!r&&(s=c=v)&&n.lineStart(),v!==c&&(g=e(r,p),(_r(r,g)||_r(p,g))&&(p[0]+=Ca,p[1]+=Ca,v=t(p[0],p[1]))),v!==c)l=0,v?(n.lineStart(),g=e(p,r),n.point(g[0],g[1])):(g=e(r,p),n.point(g[0],g[1]),n.lineEnd()),r=g;else if(a&&r&&o^v){var m;d&i||!(m=e(p,r,!0))||(l=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||r&&_r(r,p)||n.point(p[0],p[1]),r=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),r=null},clean:function(){return l|(s&&c)<<1}}}function e(n,t,r){var e=pr(n),u=pr(t),o=[1,0,0],a=dr(e,u),c=vr(a,a),s=a[0],l=c-s*s;if(!l)return!r&&n;var f=i*c/l,h=-i*s/l,g=dr(o,a),p=yr(o,f),v=yr(a,h);mr(p,v);var d=g,m=vr(p,d),y=vr(d,d),x=m*m-y*(vr(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=yr(d,(-m-M)/y);if(mr(_,p),_=Mr(_),!r)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=ca(A-ka)<Ca,N=C||Ca>A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(ca(_[0]-w)<Ca?k:E):k<=_[1]&&_[1]<=E:A>ka^(w<=_[0]&&_[0]<=S)){var z=yr(d,(-m+M)/y);return mr(z,p),[_,Mr(z)]}}}function u(t,r){var e=o?n:ka-n,u=0;return-e>t?u|=1:t>e&&(u|=2),-e>r?u|=4:r>e&&(u|=8),u}var i=Math.cos(n),o=i>0,a=ca(i)>Ca,c=ge(n,6*za);return Lr(t,r,c,o?[0,-n]:[-ka,n-ka])}function Fr(n,t,r,e){return function(u){var i,o=u.a,a=u.b,c=o.x,s=o.y,l=a.x,f=a.y,h=0,g=1,p=l-c,v=f-s;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-s,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=e-s,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:s+h*v}),1>g&&(u.b={x:c+g*p,y:s+g*v}),u}}}}}}function Or(n,t,r,e){function u(e,u){return ca(e[0]-n)<Ca?u>0?0:3:ca(e[0]-r)<Ca?u>0?2:1:ca(e[1]-t)<Ca?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var r=u(n,1),e=u(t,1);return r!==e?r-e:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,r=d.length,e=n[1],u=0;r>u;++u)for(var i,o=1,a=d[u],c=a.length,s=a[0];c>o;++o)i=a[o],s[1]<=e?i[1]>e&&J(s,i,n)>0&&++t:i[1]<=e&&J(s,i,n)<0&&--t,s=i;return 0!==t}function s(i,a,c,s){var l=0,f=0;if(null==i||(l=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do s.point(0===l||3===l?n:r,l>1?e:t);while((l=(l+c+4)%4)!==f)}else s.point(a[0],a[1])}function l(u,i){return u>=n&&r>=u&&i>=t&&e>=i}function f(n,t){l(n,t)&&a.point(n,t)}function h(){N.point=p,d&&d.push(m=[]),S=!0,w=!1,_=b=0/0}function g(){v&&(p(y,x),M&&w&&A.rejoin(),v.push(A.buffer())),N.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Cc,Math.min(Cc,n)),t=Math.max(-Cc,Math.min(Cc,t));var r=l(n,t);if(d&&m.push([n,t]),S)y=n,x=t,M=r,S=!1,r&&(a.lineStart(),a.point(n,t));else if(r&&w)a.point(n,t);else{var e={a:{x:_,y:b},b:{x:n,y:t}};C(e)?(w||(a.lineStart(),a.point(e.a.x,e.a.y)),a.point(e.b.x,e.b.y),r||a.lineEnd(),k=!1):r&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=r}var v,d,m,y,x,M,_,b,w,S,k,E=a,A=qr(),C=Fr(n,t,r,e),N={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=Bo.merge(v);var t=c([n,e]),r=k&&t,u=v.length;(r||u)&&(a.polygonStart(),r&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),u&&Cr(v,i,t,s,a),a.polygonEnd()),v=d=m=null}};return N}}function Ir(n,t){function r(r,e){return r=n(r,e),t(r[0],r[1])}return n.invert&&t.invert&&(r.invert=function(r,e){return r=t.invert(r,e),r&&n.invert(r[0],r[1])}),r}function Yr(n){var t=0,r=ka/3,e=ie(n),u=e(t,r);return u.parallels=function(n){return arguments.length?e(t=n[0]*ka/180,r=n[1]*ka/180):[180*(t/ka),180*(r/ka)]},u}function Zr(n,t){function r(n,t){var r=Math.sqrt(i-2*u*Math.sin(t))/u;return[r*Math.sin(n*=u),o-r*Math.cos(n)]}var e=Math.sin(n),u=(e+Math.sin(t))/2,i=1+e*(2*u-e),o=Math.sqrt(i)/u;return r.invert=function(n,t){var r=o-t;return[Math.atan2(n,r)/u,G((i-(n*n+r*r)*u*u)/(2*u))]},r}function Vr(){function n(n,t){zc+=u*n-e*t,e=n,u=t}var t,r,e,u;Dc.point=function(i,o){Dc.point=n,t=e=i,r=u=o},Dc.lineEnd=function(){n(t,r)}}function $r(n,t){Lc>n&&(Lc=n),n>qc&&(qc=n),Tc>t&&(Tc=t),t>Rc&&(Rc=t)}function Xr(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=r}function r(n,t){o.push("L",n,",",t)}function e(){a.point=n}function u(){o.push("Z")}var i=Br(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:e,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=e,a.point=n},pointRadius:function(n){return i=Br(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Br(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Jr(n,t){mc+=n,yc+=t,++xc}function Wr(){function n(n,e){var u=n-t,i=e-r,o=Math.sqrt(u*u+i*i);Mc+=o*(t+n)/2,_c+=o*(r+e)/2,bc+=o,Jr(t=n,r=e)}var t,r;Uc.point=function(e,u){Uc.point=n,Jr(t=e,r=u)}}function Gr(){Uc.point=Jr}function Kr(){function n(n,t){var r=n-e,i=t-u,o=Math.sqrt(r*r+i*i);Mc+=o*(e+n)/2,_c+=o*(u+t)/2,bc+=o,o=u*n-e*t,wc+=o*(e+n),Sc+=o*(u+t),kc+=3*o,Jr(e=n,u=t)}var t,r,e,u;Uc.point=function(i,o){Uc.point=n,Jr(t=e=i,r=u=o)},Uc.lineEnd=function(){n(t,r)}}function Qr(n){function t(t,r){n.moveTo(t,r),n.arc(t,r,o,0,Ea)}function r(t,r){n.moveTo(t,r),a.point=e}function e(t,r){n.lineTo(t,r)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=r},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:v};return a}function ne(n){function t(n){return(a?e:r)(n)}function r(t){return ee(t,function(r,e){r=n(r,e),t.point(r[0],r[1])})}function e(t){function r(r,e){r=n(r,e),t.point(r[0],r[1])}function e(){x=0/0,S.point=i,t.lineStart()}function i(r,e){var i=pr([r,e]),o=n(r,e);u(x,M,y,_,b,w,x=o[0],M=o[1],y=r,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=r,t.lineEnd()}function c(){e(),S.point=s,S.lineEnd=l}function s(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function l(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:r,lineStart:e,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=e}};return S}function u(t,r,e,a,c,s,l,f,h,g,p,v,d,m){var y=l-t,x=f-r,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=s+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=ca(ca(w)-1)<Ca||ca(e-h)<Ca?(e+h)/2:Math.atan2(b,_),A=n(E,k),C=A[0],N=A[1],z=C-t,L=N-r,T=x*z-y*L;(T*T/M>i||ca((y*z+x*L)/M-.5)>.3||o>a*g+c*p+s*v)&&(u(t,r,e,a,c,s,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,l,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*za),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function te(n){var t=ne(function(t,r){return n([t*La,r*La])});return function(n){return oe(t(n))}}function re(n){this.stream=n}function ee(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ue(n){return ie(function(){return n})()}function ie(n){function t(n){return n=a(n[0]*za,n[1]*za),[n[0]*h+c,s-n[1]*h]}function r(n){return n=a.invert((n[0]-c)/h,(s-n[1])/h),n&&[n[0]*La,n[1]*La]}function e(){a=Ir(o=se(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,s=p+n[1]*h,u()
-}function u(){return l&&(l.valid=!1,l=null),t}var i,o,a,c,s,l,f=ne(function(n,t){return n=i(n,t),[n[0]*h+c,s-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=Ac,_=At,b=null,w=null;return t.stream=function(n){return l&&(l.valid=!1),l=oe(M(o,f(_(n)))),l.valid=!0,l},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,Ac):Hr((b=+n)*za),u()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?Or(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,e()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],e()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*za,d=n[1]%360*za,e()):[v*La,d*La]},t.rotate=function(n){return arguments.length?(m=n[0]%360*za,y=n[1]%360*za,x=n.length>2?n[2]%360*za:0,e()):[m*La,y*La,x*La]},Bo.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&r,e()}}function oe(n){return ee(n,function(t,r){n.point(t*za,r*za)})}function ae(n,t){return[n,t]}function ce(n,t){return[n>ka?n-Ea:-ka>n?n+Ea:n,t]}function se(n,t,r){return n?t||r?Ir(fe(n),he(t,r)):fe(n):t||r?he(t,r):ce}function le(n){return function(t,r){return t+=n,[t>ka?t-Ea:-ka>t?t+Ea:t,r]}}function fe(n){var t=le(n);return t.invert=le(-n),t}function he(n,t){function r(n,t){var r=Math.cos(t),a=Math.cos(n)*r,c=Math.sin(n)*r,s=Math.sin(t),l=s*e+a*u;return[Math.atan2(c*i-l*o,a*e-s*u),G(l*i+c*o)]}var e=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return r.invert=function(n,t){var r=Math.cos(t),a=Math.cos(n)*r,c=Math.sin(n)*r,s=Math.sin(t),l=s*i-c*o;return[Math.atan2(c*i+s*o,a*e+l*u),G(l*e-a*u)]},r}function ge(n,t){var r=Math.cos(n),e=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=pe(r,u),i=pe(r,i),(o>0?i>u:u>i)&&(u+=o*Ea)):(u=n+o*Ea,i=n-.5*c);for(var s,l=u;o>0?l>i:i>l;l-=c)a.point((s=Mr([r,-e*Math.cos(l),-e*Math.sin(l)]))[0],s[1])}}function pe(n,t){var r=pr(t);r[0]-=n,xr(r);var e=W(-r[1]);return((-r[2]<0?-e:e)+2*Math.PI-Ca)%(2*Math.PI)}function ve(n,t,r){var e=Bo.range(n,t-Ca,r).concat(t);return function(n){return e.map(function(t){return[n,t]})}}function de(n,t,r){var e=Bo.range(n,t-Ca,r).concat(t);return function(n){return e.map(function(t){return[t,n]})}}function me(n){return n.source}function ye(n){return n.target}function xe(n,t,r,e){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(e),a=Math.sin(e),c=u*Math.cos(n),s=u*Math.sin(n),l=o*Math.cos(r),f=o*Math.sin(r),h=2*Math.asin(Math.sqrt(tt(e-t)+u*o*tt(r-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,r=Math.sin(h-n)*g,e=r*c+t*l,u=r*s+t*f,o=r*i+t*a;return[Math.atan2(u,e)*La,Math.atan2(o,Math.sqrt(e*e+u*u))*La]}:function(){return[n*La,t*La]};return p.distance=h,p}function Me(){function n(n,u){var i=Math.sin(u*=za),o=Math.cos(u),a=ca((n*=za)-t),c=Math.cos(a);jc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=e*i-r*o*c)*a),r*i+e*o*c),t=n,r=i,e=o}var t,r,e;Hc.point=function(u,i){t=u*za,r=Math.sin(i*=za),e=Math.cos(i),Hc.point=n},Hc.lineEnd=function(){Hc.point=Hc.lineEnd=v}}function _e(n,t){function r(t,r){var e=Math.cos(t),u=Math.cos(r),i=n(e*u);return[i*u*Math.sin(t),i*Math.sin(r)]}return r.invert=function(n,r){var e=Math.sqrt(n*n+r*r),u=t(e),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,e*o),Math.asin(e&&r*i/e)]},r}function be(n,t){function r(n,t){o>0?-Aa+Ca>t&&(t=-Aa+Ca):t>Aa-Ca&&(t=Aa-Ca);var r=o/Math.pow(u(t),i);return[r*Math.sin(i*n),o-r*Math.cos(i*n)]}var e=Math.cos(n),u=function(n){return Math.tan(ka/4+n/2)},i=n===t?Math.sin(n):Math.log(e/Math.cos(t))/Math.log(u(t)/u(n)),o=e*Math.pow(u(n),i)/i;return i?(r.invert=function(n,t){var r=o-t,e=B(i)*Math.sqrt(n*n+r*r);return[Math.atan2(n,r)/i,2*Math.atan(Math.pow(o/e,1/i))-Aa]},r):Se}function we(n,t){function r(n,t){var r=i-t;return[r*Math.sin(u*n),i-r*Math.cos(u*n)]}var e=Math.cos(n),u=n===t?Math.sin(n):(e-Math.cos(t))/(t-n),i=e/u+n;return ca(u)<Ca?ae:(r.invert=function(n,t){var r=i-t;return[Math.atan2(n,r)/u,i-B(u)*Math.sqrt(n*n+r*r)]},r)}function Se(n,t){return[n,Math.log(Math.tan(ka/4+t/2))]}function ke(n){var t,r=ue(n),e=r.scale,u=r.translate,i=r.clipExtent;return r.scale=function(){var n=e.apply(r,arguments);return n===r?t?r.clipExtent(null):r:n},r.translate=function(){var n=u.apply(r,arguments);return n===r?t?r.clipExtent(null):r:n},r.clipExtent=function(n){var o=i.apply(r,arguments);if(o===r){if(t=null==n){var a=ka*e(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},r.clipExtent(null)}function Ee(n,t){return[Math.log(Math.tan(ka/4+t/2)),-n]}function Ae(n){return n[0]}function Ce(n){return n[1]}function Ne(n){for(var t=n.length,r=[0,1],e=2,u=2;t>u;u++){for(;e>1&&J(n[r[e-2]],n[r[e-1]],n[u])<=0;)--e;r[e++]=u}return r.slice(0,e)}function ze(n,t){return n[0]-t[0]||n[1]-t[1]}function Le(n,t,r){return(r[0]-t[0])*(n[1]-t[1])<(r[1]-t[1])*(n[0]-t[0])}function Te(n,t,r,e){var u=n[0],i=r[0],o=t[0]-u,a=e[0]-i,c=n[1],s=r[1],l=t[1]-c,f=e[1]-s,h=(a*(c-s)-f*(u-i))/(f*o-a*l);return[u+h*o,c+h*l]}function qe(n){var t=n[0],r=n[n.length-1];return!(t[0]-r[0]||t[1]-r[1])}function Re(){tu(this),this.edge=this.site=this.circle=null}function De(n){var t=Gc.pop()||new Re;return t.site=n,t}function Pe(n){$e(n),Bc.remove(n),Gc.push(n),tu(n)}function Ue(n){var t=n.circle,r=t.x,e=t.cy,u={x:r,y:e},i=n.P,o=n.N,a=[n];Pe(n);for(var c=i;c.circle&&ca(r-c.circle.x)<Ca&&ca(e-c.circle.cy)<Ca;)i=c.P,a.unshift(c),Pe(c),c=i;a.unshift(c),$e(c);for(var s=o;s.circle&&ca(r-s.circle.x)<Ca&&ca(e-s.circle.cy)<Ca;)o=s.N,a.push(s),Pe(s),s=o;a.push(s),$e(s);var l,f=a.length;for(l=1;f>l;++l)s=a[l],c=a[l-1],Ke(s.edge,c.site,s.site,u);c=a[0],s=a[f-1],s.edge=We(c.site,s.site,null,u),Ve(c),Ve(s)}function je(n){for(var t,r,e,u,i=n.x,o=n.y,a=Bc._;a;)if(e=He(a,o)-i,e>Ca)a=a.L;else{if(u=i-Fe(a,o),!(u>Ca)){e>-Ca?(t=a.P,r=a):u>-Ca?(t=a,r=a.N):t=r=a;break}if(!a.R){t=a;break}a=a.R}var c=De(n);if(Bc.insert(t,c),t||r){if(t===r)return $e(t),r=De(t.site),Bc.insert(c,r),c.edge=r.edge=We(t.site,c.site),Ve(t),Ve(r),void 0;if(!r)return c.edge=We(t.site,c.site),void 0;$e(t),$e(r);var s=t.site,l=s.x,f=s.y,h=n.x-l,g=n.y-f,p=r.site,v=p.x-l,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+l,y:(h*x-v*y)/m+f};Ke(r.edge,s,p,M),c.edge=We(s,n,null,M),r.edge=We(n,p,null,M),Ve(t),Ve(r)}}function He(n,t){var r=n.site,e=r.x,u=r.y,i=u-t;if(!i)return e;var o=n.P;if(!o)return-1/0;r=o.site;var a=r.x,c=r.y,s=c-t;if(!s)return a;var l=a-e,f=1/i-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+u-i/2)))/f+e:(e+a)/2}function Fe(n,t){var r=n.N;if(r)return He(r,t);var e=n.site;return e.y===t?e.x:1/0}function Oe(n){this.site=n,this.edges=[]}function Ie(n){for(var t,r,e,u,i,o,a,c,s,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Xc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)l=a[o].end(),e=l.x,u=l.y,s=a[++o%c].start(),t=s.x,r=s.y,(ca(e-t)>Ca||ca(u-r)>Ca)&&(a.splice(o,0,new Qe(Ge(i.site,l,ca(e-f)<Ca&&p-u>Ca?{x:f,y:ca(t-f)<Ca?r:p}:ca(u-p)<Ca&&h-e>Ca?{x:ca(r-p)<Ca?t:h,y:p}:ca(e-h)<Ca&&u-g>Ca?{x:h,y:ca(t-h)<Ca?r:g}:ca(u-g)<Ca&&e-f>Ca?{x:ca(r-g)<Ca?t:f,y:g}:null),i.site,null)),++c)}function Ye(n,t){return t.angle-n.angle}function Ze(){tu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ve(n){var t=n.P,r=n.N;if(t&&r){var e=t.site,u=n.site,i=r.site;if(e!==i){var o=u.x,a=u.y,c=e.x-o,s=e.y-a,l=i.x-o,f=i.y-a,h=2*(c*f-s*l);if(!(h>=-Na)){var g=c*c+s*s,p=l*l+f*f,v=(f*g-s*p)/h,d=(c*p-l*g)/h,f=d+a,m=Kc.pop()||new Ze;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Wc._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Wc.insert(y,m),y||(Jc=m)}}}}function $e(n){var t=n.circle;t&&(t.P||(Jc=t.N),Wc.remove(t),Kc.push(t),tu(t),n.circle=null)}function Xe(n){for(var t,r=$c,e=Fr(n[0][0],n[0][1],n[1][0],n[1][1]),u=r.length;u--;)t=r[u],(!Be(t,n)||!e(t)||ca(t.a.x-t.b.x)<Ca&&ca(t.a.y-t.b.y)<Ca)&&(t.a=t.b=null,r.splice(u,1))}function Be(n,t){var r=n.b;if(r)return!0;var e,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],s=t[1][1],l=n.l,f=n.r,h=l.x,g=l.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=s)return}else i={x:d,y:c};r={x:d,y:s}}else{if(i){if(i.y<c)return}else i={x:d,y:s};r={x:d,y:c}}}else if(e=(h-p)/(v-g),u=m-e*d,-1>e||e>1)if(h>p){if(i){if(i.y>=s)return}else i={x:(c-u)/e,y:c};r={x:(s-u)/e,y:s}}else{if(i){if(i.y<c)return}else i={x:(s-u)/e,y:s};r={x:(c-u)/e,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:e*o+u};r={x:a,y:e*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:e*a+u};r={x:o,y:e*o+u}}return n.a=i,n.b=r,!0}function Je(n,t){this.l=n,this.r=t,this.a=this.b=null}function We(n,t,r,e){var u=new Je(n,t);return $c.push(u),r&&Ke(u,n,t,r),e&&Ke(u,t,n,e),Xc[n.i].edges.push(new Qe(u,n,t)),Xc[t.i].edges.push(new Qe(u,t,n)),u}function Ge(n,t,r){var e=new Je(n,null);return e.a=t,e.b=r,$c.push(e),e}function Ke(n,t,r,e){n.a||n.b?n.l===r?n.b=e:n.a=e:(n.a=e,n.l=t,n.r=r)}function Qe(n,t,r){var e=n.a,u=n.b;this.edge=n,this.site=t,this.angle=r?Math.atan2(r.y-t.y,r.x-t.x):n.l===t?Math.atan2(u.x-e.x,e.y-u.y):Math.atan2(e.x-u.x,u.y-e.y)}function nu(){this._=null}function tu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ru(n,t){var r=t,e=t.R,u=r.U;u?u.L===r?u.L=e:u.R=e:n._=e,e.U=u,r.U=e,r.R=e.L,r.R&&(r.R.U=r),e.L=r}function eu(n,t){var r=t,e=t.L,u=r.U;u?u.L===r?u.L=e:u.R=e:n._=e,e.U=u,r.U=e,r.L=e.R,r.L&&(r.L.U=r),e.R=r}function uu(n){for(;n.L;)n=n.L;return n}function iu(n,t){var r,e,u,i=n.sort(ou).pop();for($c=[],Xc=new Array(n.length),Bc=new nu,Wc=new nu;;)if(u=Jc,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==r||i.y!==e)&&(Xc[i.i]=new Oe(i),je(i),r=i.x,e=i.y),i=n.pop();else{if(!u)break;Ue(u.arc)}t&&(Xe(t),Ie(t));var o={cells:Xc,edges:$c};return Bc=Wc=$c=Xc=null,o}function ou(n,t){return t.y-n.y||t.x-n.x}function au(n,t,r){return(n.x-r.x)*(t.y-n.y)-(n.x-t.x)*(r.y-n.y)}function cu(n){return n.x}function su(n){return n.y}function lu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function fu(n,t,r,e,u,i){if(!n(t,r,e,u,i)){var o=.5*(r+u),a=.5*(e+i),c=t.nodes;c[0]&&fu(n,c[0],r,e,o,a),c[1]&&fu(n,c[1],o,e,u,a),c[2]&&fu(n,c[2],r,a,o,i),c[3]&&fu(n,c[3],o,a,u,i)}}function hu(n,t){n=Bo.rgb(n),t=Bo.rgb(t);var r=n.r,e=n.g,u=n.b,i=t.r-r,o=t.g-e,a=t.b-u;return function(n){return"#"+Mt(Math.round(r+i*n))+Mt(Math.round(e+o*n))+Mt(Math.round(u+a*n))}}function gu(n,t){var r,e={},u={};for(r in n)r in t?e[r]=du(n[r],t[r]):u[r]=n[r];for(r in t)r in n||(u[r]=t[r]);return function(n){for(r in e)u[r]=e[r](n);return u}}function pu(n,t){return t-=n=+n,function(r){return n+t*r}}function vu(n,t){var r,e,u,i=ns.lastIndex=ts.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(r=ns.exec(n))&&(e=ts.exec(t));)(u=e.index)>i&&(u=t.substring(i,u),a[o]?a[o]+=u:a[++o]=u),(r=r[0])===(e=e[0])?a[o]?a[o]+=e:a[++o]=e:(a[++o]=null,c.push({i:o,x:pu(r,e)})),i=ts.lastIndex;return i<t.length&&(u=t.substring(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var r,e=0;t>e;++e)a[(r=c[e]).i]=r.x(n);return a.join("")})}function du(n,t){for(var r,e=Bo.interpolators.length;--e>=0&&!(r=Bo.interpolators[e](n,t)););return r}function mu(n,t){var r,e=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(r=0;a>r;++r)e.push(du(n[r],t[r]));for(;i>r;++r)u[r]=n[r];for(;o>r;++r)u[r]=t[r];return function(n){for(r=0;a>r;++r)u[r]=e[r](n);return u}}function yu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function xu(n){return function(t){return 1-n(1-t)}}function Mu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function _u(n){return n*n}function bu(n){return n*n*n}function wu(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,r=t*n;return 4*(.5>n?r:3*(n-t)+r-.75)}function Su(n){return function(t){return Math.pow(t,n)}}function ku(n){return 1-Math.cos(n*Aa)}function Eu(n){return Math.pow(2,10*(n-1))}function Au(n){return 1-Math.sqrt(1-n*n)}function Cu(n,t){var r;return arguments.length<2&&(t=.45),arguments.length?r=t/Ea*Math.asin(1/n):(n=1,r=t/4),function(e){return 1+n*Math.pow(2,-10*e)*Math.sin((e-r)*Ea/t)}}function Nu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function zu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Lu(n,t){n=Bo.hcl(n),t=Bo.hcl(t);var r=n.h,e=n.c,u=n.l,i=t.h-r,o=t.c-e,a=t.l-u;return isNaN(o)&&(o=0,e=isNaN(e)?t.c:e),isNaN(i)?(i=0,r=isNaN(r)?t.h:r):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(r+i*n,e+o*n,u+a*n)+""}}function Tu(n,t){n=Bo.hsl(n),t=Bo.hsl(t);var r=n.h,e=n.s,u=n.l,i=t.h-r,o=t.s-e,a=t.l-u;return isNaN(o)&&(o=0,e=isNaN(e)?t.s:e),isNaN(i)?(i=0,r=isNaN(r)?t.h:r):i>180?i-=360:-180>i&&(i+=360),function(n){return it(r+i*n,e+o*n,u+a*n)+""}}function qu(n,t){n=Bo.lab(n),t=Bo.lab(t);var r=n.l,e=n.a,u=n.b,i=t.l-r,o=t.a-e,a=t.b-u;return function(n){return ft(r+i*n,e+o*n,u+a*n)+""}}function Ru(n,t){return t-=n,function(r){return Math.round(n+t*r)}}function Du(n){var t=[n.a,n.b],r=[n.c,n.d],e=Uu(t),u=Pu(t,r),i=Uu(ju(r,t,-u))||0;t[0]*r[1]<r[0]*t[1]&&(t[0]*=-1,t[1]*=-1,e*=-1,u*=-1),this.rotate=(e?Math.atan2(t[1],t[0]):Math.atan2(-r[0],r[1]))*La,this.translate=[n.e,n.f],this.scale=[e,i],this.skew=i?Math.atan2(u,i)*La:0}function Pu(n,t){return n[0]*t[0]+n[1]*t[1]}function Uu(n){var t=Math.sqrt(Pu(n,n));return t&&(n[0]/=t,n[1]/=t),t}function ju(n,t,r){return n[0]+=r*t[0],n[1]+=r*t[1],n}function Hu(n,t){var r,e=[],u=[],i=Bo.transform(n),o=Bo.transform(t),a=i.translate,c=o.translate,s=i.rotate,l=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(e.push("translate(",null,",",null,")"),u.push({i:1,x:pu(a[0],c[0])},{i:3,x:pu(a[1],c[1])})):c[0]||c[1]?e.push("translate("+c+")"):e.push(""),s!=l?(s-l>180?l+=360:l-s>180&&(s+=360),u.push({i:e.push(e.pop()+"rotate(",null,")")-2,x:pu(s,l)})):l&&e.push(e.pop()+"rotate("+l+")"),f!=h?u.push({i:e.push(e.pop()+"skewX(",null,")")-2,x:pu(f,h)}):h&&e.push(e.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(r=e.push(e.pop()+"scale(",null,",",null,")"),u.push({i:r-4,x:pu(g[0],p[0])},{i:r-2,x:pu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&e.push(e.pop()+"scale("+p+")"),r=u.length,function(n){for(var t,i=-1;++i<r;)e[(t=u[i]).i]=t.x(n);return e.join("")}}function Fu(n,t){return t=t-(n=+n)?1/(t-n):0,function(r){return(r-n)*t}}function Ou(n,t){return t=t-(n=+n)?1/(t-n):0,function(r){return Math.max(0,Math.min(1,(r-n)*t))}}function Iu(n){for(var t=n.source,r=n.target,e=Zu(t,r),u=[t];t!==e;)t=t.parent,u.push(t);for(var i=u.length;r!==e;)u.splice(i,0,r),r=r.parent;return u}function Yu(n){for(var t=[],r=n.parent;null!=r;)t.push(n),n=r,r=r.parent;return t.push(n),t}function Zu(n,t){if(n===t)return n;for(var r=Yu(n),e=Yu(t),u=r.pop(),i=e.pop(),o=null;u===i;)o=u,u=r.pop(),i=e.pop();return o}function Vu(n){n.fixed|=2}function $u(n){n.fixed&=-7}function Xu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Bu(n){n.fixed&=-5}function Ju(n,t,r){var e=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Ju(i,t,r),n.charge+=i.charge,e+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var s=t*r[n.point.index];n.charge+=n.pointCharge=s,e+=s*n.point.x,u+=s*n.point.y}n.cx=e/n.charge,n.cy=u/n.charge}function Wu(n,t){return Bo.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ri,n}function Gu(n,t){for(var r=[n];null!=(n=r.pop());)if(t(n),(u=n.children)&&(e=u.length))for(var e,u;--e>=0;)r.push(u[e])}function Ku(n,t){for(var r=[n],e=[];null!=(n=r.pop());)if(e.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)r.push(i[o]);for(;null!=(n=e.pop());)t(n)}function Qu(n){return n.children}function ni(n){return n.value}function ti(n,t){return t.value-n.value}function ri(n){return Bo.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ei(n){return n.x}function ui(n){return n.y}function ii(n,t,r){n.y0=t,n.y=r}function oi(n){return Bo.range(n.length)}function ai(n){for(var t=-1,r=n[0].length,e=[];++t<r;)e[t]=0;return e}function ci(n){for(var t,r=1,e=0,u=n[0][1],i=n.length;i>r;++r)(t=n[r][1])>u&&(e=r,u=t);return e}function si(n){return n.reduce(li,0)}function li(n,t){return n+t[1]}function fi(n,t){return hi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function hi(n,t){for(var r=-1,e=+n[0],u=(n[1]-e)/t,i=[];++r<=t;)i[r]=u*r+e;return i}function gi(n){return[Bo.min(n),Bo.max(n)]}function pi(n,t){return n.value-t.value}function vi(n,t){var r=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=r,r._pack_prev=t}function di(n,t){n._pack_next=t,t._pack_prev=n}function mi(n,t){var r=t.x-n.x,e=t.y-n.y,u=n.r+t.r;return.999*u*u>r*r+e*e}function yi(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((r=n.children)&&(s=r.length)){var r,e,u,i,o,a,c,s,l=1/0,f=-1/0,h=1/0,g=-1/0;if(r.forEach(xi),e=r[0],e.x=-e.r,e.y=0,t(e),s>1&&(u=r[1],u.x=u.r,u.y=0,t(u),s>2))for(i=r[2],bi(e,u,i),t(i),vi(e,i),e._pack_prev=i,vi(i,u),u=e._pack_next,o=3;s>o;o++){bi(e,u,i=r[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(mi(a,i)){p=1;break}if(1==p)for(c=e._pack_prev;c!==a._pack_prev&&!mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<e.r?di(e,u=a):di(e=c,u),o--):(vi(e,i),u=i,t(i))}var m=(l+f)/2,y=(h+g)/2,x=0;for(o=0;s>o;o++)i=r[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,r.forEach(Mi)}}function xi(n){n._pack_next=n._pack_prev=n}function Mi(n){delete n._pack_next,delete n._pack_prev}function _i(n,t,r,e){var u=n.children;if(n.x=t+=e*n.x,n.y=r+=e*n.y,n.r*=e,u)for(var i=-1,o=u.length;++i<o;)_i(u[i],t,r,e)}function bi(n,t,r){var e=n.r+r.r,u=t.x-n.x,i=t.y-n.y;if(e&&(u||i)){var o=t.r+r.r,a=u*u+i*i;o*=o,e*=e;var c=.5+(e-o)/(2*a),s=Math.sqrt(Math.max(0,2*o*(e+a)-(e-=a)*e-o*o))/(2*a);r.x=n.x+c*u+s*i,r.y=n.y+c*i-s*u}else r.x=n.x+e,r.y=n.y}function wi(n,t){return n.parent==t.parent?1:2}function Si(n){var t=n.children;return t.length?t[0]:n.t}function ki(n){var t,r=n.children;return(t=r.length)?r[t-1]:n.t}function Ei(n,t,r){var e=r/(t.i-n.i);t.c-=e,t.s+=r,n.c+=e,t.z+=r,t.m+=r}function Ai(n){for(var t,r=0,e=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=r,t.m+=r,r+=t.s+(e+=t.c)}function Ci(n,t,r){return n.a.parent===t.parent?n.a:r}function Ni(n){return 1+Bo.max(n,function(n){return n.y})}function zi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Li(n){var t=n.children;return t&&t.length?Li(t[0]):n}function Ti(n){var t,r=n.children;return r&&(t=r.length)?Ti(r[t-1]):n}function qi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ri(n,t){var r=n.x+t[3],e=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(r+=u/2,u=0),0>i&&(e+=i/2,i=0),{x:r,y:e,dx:u,dy:i}}function Di(n){var t=n[0],r=n[n.length-1];return r>t?[t,r]:[r,t]}function Pi(n){return n.rangeExtent?n.rangeExtent():Di(n.range())}function Ui(n,t,r,e){var u=r(n[0],n[1]),i=e(t[0],t[1]);return function(n){return i(u(n))}}function ji(n,t){var r,e=0,u=n.length-1,i=n[e],o=n[u];return i>o&&(r=e,e=u,u=r,r=i,i=o,o=r),n[e]=t.floor(i),n[u]=t.ceil(o),n}function Hi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:hs}function Fi(n,t,r,e){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(r(n[o-1],n[o])),i.push(e(t[o-1],t[o]));return function(t){var r=Bo.bisect(n,t,1,a)-1;return i[r](u[r](t))}}function Oi(n,t,r,e){function u(){var u=Math.min(n.length,t.length)>2?Fi:Ui,c=e?Ou:Fu;return o=u(n,t,c,r),a=u(t,n,c,du),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ru)},i.clamp=function(n){return arguments.length?(e=n,u()):e},i.interpolate=function(n){return arguments.length?(r=n,u()):r},i.ticks=function(t){return Vi(n,t)},i.tickFormat=function(t,r){return $i(n,t,r)},i.nice=function(t){return Yi(n,t),u()},i.copy=function(){return Oi(n,t,r,e)},u()}function Ii(n,t){return Bo.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Yi(n,t){return ji(n,Hi(Zi(n,t)[2]))}function Zi(n,t){null==t&&(t=10);var r=Di(n),e=r[1]-r[0],u=Math.pow(10,Math.floor(Math.log(e/t)/Math.LN10)),i=t/e*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),r[0]=Math.ceil(r[0]/u)*u,r[1]=Math.floor(r[1]/u)*u+.5*u,r[2]=u,r}function Vi(n,t){return Bo.range.apply(Bo,Zi(n,t))}function $i(n,t,r){var e=Zi(n,t);if(r){var u=nc.exec(r);if(u.shift(),"s"===u[8]){var i=Bo.formatPrefix(Math.max(ca(e[0]),ca(e[1])));return u[7]||(u[7]="."+Xi(i.scale(e[2]))),u[8]="f",r=Bo.format(u.join("")),function(n){return r(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Bi(u[8],e)),r=u.join("")}else r=",."+Xi(e[2])+"f";return Bo.format(r)}function Xi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Bi(n,t){var r=Xi(t[2]);return n in gs?Math.abs(r-Xi(Math.max(ca(t[0]),ca(t[1]))))+ +("e"!==n):r-2*("%"===n)}function Ji(n,t,r,e){function u(n){return(r?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return r?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((e=t.map(Number)).map(u)),o):e},o.base=function(r){return arguments.length?(t=+r,n.domain(e.map(u)),o):t},o.nice=function(){var t=ji(e.map(u),r?Math:vs);return n.domain(t),e=t.map(i),o},o.ticks=function(){var n=Di(e),o=[],a=n[0],c=n[1],s=Math.floor(u(a)),l=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(l-s)){if(r){for(;l>s;s++)for(var h=1;f>h;h++)o.push(i(s)*h);o.push(i(s))}else for(o.push(i(s));s++<l;)for(var h=f-1;h>0;h--)o.push(i(s)*h);for(s=0;o[s]<a;s++);for(l=o.length;o[l-1]>c;l--);o=o.slice(s,l)}return o},o.tickFormat=function(n,t){if(!arguments.length)return ps;arguments.length<2?t=ps:"function"!=typeof t&&(t=Bo.format(t));var e,a=Math.max(.1,n/o.ticks().length),c=r?(e=1e-12,Math.ceil):(e=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+e))<=a?t(n):""}},o.copy=function(){return Ji(n.copy(),t,r,e)},Ii(o,n)}function Wi(n,t,r){function e(t){return n(u(t))}var u=Gi(t),i=Gi(1/t);return e.invert=function(t){return i(n.invert(t))},e.domain=function(t){return arguments.length?(n.domain((r=t.map(Number)).map(u)),e):r},e.ticks=function(n){return Vi(r,n)},e.tickFormat=function(n,t){return $i(r,n,t)},e.nice=function(n){return e.domain(Yi(r,n))},e.exponent=function(o){return arguments.length?(u=Gi(t=o),i=Gi(1/t),n.domain(r.map(u)),e):t},e.copy=function(){return Wi(n.copy(),t,r)},Ii(e,n)}function Gi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Ki(n,t){function r(r){return i[((u.get(r)||("range"===t.t?u.set(r,n.push(r)):0/0))-1)%i.length]}function e(t,r){return Bo.range(n.length).map(function(n){return t+r*n})}var u,i,a;return r.domain=function(e){if(!arguments.length)return n;n=[],u=new o;for(var i,a=-1,c=e.length;++a<c;)u.has(i=e[a])||u.set(i,n.push(i));return r[t.t].apply(r,t.a)},r.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},r):i},r.rangePoints=function(u,o){arguments.length<2&&(o=0);var c=u[0],s=u[1],l=(s-c)/(Math.max(1,n.length-1)+o);return i=e(n.length<2?(c+s)/2:c+l*o/2,l),a=0,t={t:"rangePoints",a:arguments},r},r.rangeBands=function(u,o,c){arguments.length<2&&(o=0),arguments.length<3&&(c=o);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=(f-l)/(n.length-o+2*c);return i=e(l+h*c,h),s&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},r},r.rangeRoundBands=function(u,o,c){arguments.length<2&&(o=0),arguments.length<3&&(c=o);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=Math.floor((f-l)/(n.length-o+2*c)),g=f-l-(n.length-o)*h;return i=e(l+Math.round(g/2),h),s&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},r},r.rangeBand=function(){return a},r.rangeExtent=function(){return Di(t.a[0])},r.copy=function(){return Ki(n,t)},r.domain(n)}function Qi(r,e){function u(){var n=0,t=e.length;for(o=[];++n<t;)o[n-1]=Bo.quantile(r,n/t);return i}function i(n){return isNaN(n=+n)?void 0:e[Bo.bisect(o,n)]}var o;return i.domain=function(e){return arguments.length?(r=e.filter(t).sort(n),u()):r},i.range=function(n){return arguments.length?(e=n,u()):e},i.quantiles=function(){return o},i.invertExtent=function(n){return n=e.indexOf(n),0>n?[0/0,0/0]:[n>0?o[n-1]:r[0],n<o.length?o[n]:r[r.length-1]]},i.copy=function(){return Qi(r,e)},u()}function no(n,t,r){function e(t){return r[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=r.length/(t-n),o=r.length-1,e}var i,o;return e.domain=function(r){return arguments.length?(n=+r[0],t=+r[r.length-1],u()):[n,t]},e.range=function(n){return arguments.length?(r=n,u()):r},e.invertExtent=function(t){return t=r.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},e.copy=function(){return no(n,t,r)},u()}function to(n,t){function r(r){return r>=r?t[Bo.bisect(n,r)]:void 0}return r.domain=function(t){return arguments.length?(n=t,r):n},r.range=function(n){return arguments.length?(t=n,r):t},r.invertExtent=function(r){return r=t.indexOf(r),[n[r-1],n[r]]},r.copy=function(){return to(n,t)},r}function ro(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(r){return arguments.length?(n=r.map(t),t):n},t.ticks=function(t){return Vi(n,t)},t.tickFormat=function(t,r){return $i(n,t,r)},t.copy=function(){return ro(n)},t}function eo(n){return n.innerRadius}function uo(n){return n.outerRadius}function io(n){return n.startAngle}function oo(n){return n.endAngle}function ao(n){function t(t){function o(){s.push("M",i(n(l),a))}for(var c,s=[],l=[],f=-1,h=t.length,g=Et(r),p=Et(e);++f<h;)u.call(this,c=t[f],f)?l.push([+g.call(this,c,f),+p.call(this,c,f)]):l.length&&(o(),l=[]);return l.length&&o(),s.length?s.join(""):null}var r=Ae,e=Ce,u=Ar,i=co,o=i.key,a=.7;return t.x=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(e=n,t):e},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=bs.get(n)||co).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function co(n){return n.join("L")}function so(n){return co(n)+"Z"}function lo(n){for(var t=0,r=n.length,e=n[0],u=[e[0],",",e[1]];++t<r;)u.push("H",(e[0]+(e=n[t])[0])/2,"V",e[1]);return r>1&&u.push("H",e[0]),u.join("")}function fo(n){for(var t=0,r=n.length,e=n[0],u=[e[0],",",e[1]];++t<r;)u.push("V",(e=n[t])[1],"H",e[0]);return u.join("")}function ho(n){for(var t=0,r=n.length,e=n[0],u=[e[0],",",e[1]];++t<r;)u.push("H",(e=n[t])[0],"V",e[1]);return u.join("")}function go(n,t){return n.length<4?co(n):n[1]+mo(n.slice(1,n.length-1),yo(n,t))}function po(n,t){return n.length<3?co(n):n[0]+mo((n.push(n[0]),n),yo([n[n.length-2]].concat(n,[n[1]]),t))}function vo(n,t){return n.length<3?co(n):n[0]+mo(n,yo(n,t))}function mo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return co(n);var r=n.length!=t.length,e="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(r&&(e+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,e+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var s=2;s<t.length;s++,c++)i=n[c],a=t[s],e+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(r){var l=n[c];e+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+l[0]+","+l[1]}return e}function yo(n,t){for(var r,e=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)r=i,i=o,o=n[a],e.push([u*(o[0]-r[0]),u*(o[1]-r[1])]);return e}function xo(n){if(n.length<3)return co(n);var t=1,r=n.length,e=n[0],u=e[0],i=e[1],o=[u,u,u,(e=n[1])[0]],a=[i,i,i,e[1]],c=[u,",",i,"L",wo(ks,o),",",wo(ks,a)];for(n.push(n[r-1]);++t<=r;)e=n[t],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),So(c,o,a);return n.pop(),c.push("L",e),c.join("")}function Mo(n){if(n.length<4)return co(n);for(var t,r=[],e=-1,u=n.length,i=[0],o=[0];++e<3;)t=n[e],i.push(t[0]),o.push(t[1]);for(r.push(wo(ks,i)+","+wo(ks,o)),--e;++e<u;)t=n[e],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),So(r,i,o);return r.join("")}function _o(n){for(var t,r,e=-1,u=n.length,i=u+4,o=[],a=[];++e<4;)r=n[e%u],o.push(r[0]),a.push(r[1]);for(t=[wo(ks,o),",",wo(ks,a)],--e;++e<i;)r=n[e%u],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),So(t,o,a);return t.join("")}function bo(n,t){var r=n.length-1;if(r)for(var e,u,i=n[0][0],o=n[0][1],a=n[r][0]-i,c=n[r][1]-o,s=-1;++s<=r;)e=n[s],u=s/r,e[0]=t*e[0]+(1-t)*(i+u*a),e[1]=t*e[1]+(1-t)*(o+u*c);return xo(n)}function wo(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function So(n,t,r){n.push("C",wo(ws,t),",",wo(ws,r),",",wo(Ss,t),",",wo(Ss,r),",",wo(ks,t),",",wo(ks,r))}function ko(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Eo(n){for(var t=0,r=n.length-1,e=[],u=n[0],i=n[1],o=e[0]=ko(u,i);++t<r;)e[t]=(o+(o=ko(u=i,i=n[t+1])))/2;return e[t]=o,e}function Ao(n){for(var t,r,e,u,i=[],o=Eo(n),a=-1,c=n.length-1;++a<c;)t=ko(n[a],n[a+1]),ca(t)<Ca?o[a]=o[a+1]=0:(r=o[a]/t,e=o[a+1]/t,u=r*r+e*e,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*r,o[a+1]=u*e));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Co(n){return n.length<3?co(n):n[0]+mo(n,Ao(n))}function No(n){for(var t,r,e,u=-1,i=n.length;++u<i;)t=n[u],r=t[0],e=t[1]+Ms,t[0]=r*Math.cos(e),t[1]=r*Math.sin(e);return n}function zo(n){function t(t){function c(){v.push("M",a(n(m),f),l,s(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,x=t.length,M=Et(r),_=Et(u),b=r===e?function(){return g}:Et(e),w=u===i?function(){return p}:Et(i);++y<x;)o.call(this,h=t[y],y)?(d.push([g=+M.call(this,h,y),p=+_.call(this,h,y)]),m.push([+b.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var r=Ae,e=Ae,u=0,i=Ce,o=Ar,a=co,c=a.key,s=a,l="L",f=.7;return t.x=function(n){return arguments.length?(r=e=n,t):e},t.x0=function(n){return arguments.length?(r=n,t):r},t.x1=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=bs.get(n)||co).key,s=a.reverse||a,l=a.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Lo(n){return n.radius}function To(n){return[n.x,n.y]}function qo(n){return function(){var t=n.apply(this,arguments),r=t[0],e=t[1]+Ms;return[r*Math.cos(e),r*Math.sin(e)]}}function Ro(){return 64}function Do(){return"circle"}function Po(n){var t=Math.sqrt(n/ka);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Uo(n,t){return ga(n,Ls),n.id=t,n}function jo(n,t,r,e){var u=n.id;return P(n,"function"==typeof r?function(n,i,o){n.__transition__[u].tween.set(t,e(r.call(n,n.__data__,i,o)))}:(r=e(r),function(n){n.__transition__[u].tween.set(t,r)}))}function Ho(n){return null==n&&(n=""),function(){this.textContent=n}}function Fo(n,t,r,e){var u=n.__transition__||(n.__transition__={active:0,count:0}),i=u[r];if(!i){var a=e.time;i=u[r]={tween:new o,time:a,ease:e.ease,delay:e.delay,duration:e.duration},++u.count,Bo.timer(function(e){function o(e){return u.active>r?s():(u.active=r,i.event&&i.event.start.call(n,l,t),i.tween.forEach(function(r,e){(e=e.call(n,l,t))&&v.push(e)}),Bo.timer(function(){return p.c=c(e||1)?Ar:c,1},0,a),void 0)}function c(e){if(u.active!==r)return s();for(var o=e/g,a=f(o),c=v.length;c>0;)v[--c].call(n,a);return o>=1?(i.event&&i.event.end.call(n,l,t),s()):void 0}function s(){return--u.count?delete u[r]:delete n.__transition__,1}var l=n.__data__,f=i.ease,h=i.delay,g=i.duration,p=Ga,v=[];return p.t=h+a,e>=h?o(e-h):(p.c=o,void 0)},0,a)}}function Oo(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function Io(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function Yo(n){return n.toISOString()}function Zo(n,t,r){function e(t){return n(t)}function u(n,r){var e=n[1]-n[0],u=e/r,i=Bo.bisect(Fs,u);return i==Fs.length?[t.year,Zi(n.map(function(n){return n/31536e6}),r)[2]]:i?t[u/Fs[i-1]<Fs[i]/u?i-1:i]:[Ys,Zi(n,r)[2]]}return e.invert=function(t){return Vo(n.invert(t))
-},e.domain=function(t){return arguments.length?(n.domain(t),e):n.domain().map(Vo)},e.nice=function(n,t){function r(r){return!isNaN(r)&&!n.range(r,Vo(+r+1),t).length}var i=e.domain(),o=Di(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),e.domain(ji(i,t>1?{floor:function(t){for(;r(t=n.floor(t));)t=Vo(t-1);return t},ceil:function(t){for(;r(t=n.ceil(t));)t=Vo(+t+1);return t}}:n))},e.ticks=function(n,t){var r=Di(e.domain()),i=null==n?u(r,10):"number"==typeof n?u(r,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(r[0],Vo(+r[1]+1),1>t?1:t)},e.tickFormat=function(){return r},e.copy=function(){return Zo(n.copy(),t,r)},Ii(e,n)}function Vo(n){return new Date(n)}function $o(n){return JSON.parse(n.responseText)}function Xo(n){var t=Go.createRange();return t.selectNode(Go.body),t.createContextualFragment(n.responseText)}var Bo={version:"3.4.8"};Date.now||(Date.now=function(){return+new Date});var Jo=[].slice,Wo=function(n){return Jo.call(n)},Go=document,Ko=Go.documentElement,Qo=window;try{Wo(Ko.childNodes)[0].nodeType}catch(na){Wo=function(n){for(var t=n.length,r=new Array(t);t--;)r[t]=n[t];return r}}try{Go.createElement("div").style.setProperty("opacity",0,"")}catch(ta){var ra=Qo.Element.prototype,ea=ra.setAttribute,ua=ra.setAttributeNS,ia=Qo.CSSStyleDeclaration.prototype,oa=ia.setProperty;ra.setAttribute=function(n,t){ea.call(this,n,t+"")},ra.setAttributeNS=function(n,t,r){ua.call(this,n,t,r+"")},ia.setProperty=function(n,t,r){oa.call(this,n,t+"",r)}}Bo.ascending=n,Bo.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},Bo.min=function(n,t){var r,e,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(r=n[u])&&r>=r);)r=void 0;for(;++u<i;)null!=(e=n[u])&&r>e&&(r=e)}else{for(;++u<i&&!(null!=(r=t.call(n,n[u],u))&&r>=r);)r=void 0;for(;++u<i;)null!=(e=t.call(n,n[u],u))&&r>e&&(r=e)}return r},Bo.max=function(n,t){var r,e,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(r=n[u])&&r>=r);)r=void 0;for(;++u<i;)null!=(e=n[u])&&e>r&&(r=e)}else{for(;++u<i&&!(null!=(r=t.call(n,n[u],u))&&r>=r);)r=void 0;for(;++u<i;)null!=(e=t.call(n,n[u],u))&&e>r&&(r=e)}return r},Bo.extent=function(n,t){var r,e,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o&&!(null!=(r=u=n[i])&&r>=r);)r=u=void 0;for(;++i<o;)null!=(e=n[i])&&(r>e&&(r=e),e>u&&(u=e))}else{for(;++i<o&&!(null!=(r=u=t.call(n,n[i],i))&&r>=r);)r=void 0;for(;++i<o;)null!=(e=t.call(n,n[i],i))&&(r>e&&(r=e),e>u&&(u=e))}return[r,u]},Bo.sum=function(n,t){var r,e=0,u=n.length,i=-1;if(1===arguments.length)for(;++i<u;)isNaN(r=+n[i])||(e+=r);else for(;++i<u;)isNaN(r=+t.call(n,n[i],i))||(e+=r);return e},Bo.mean=function(n,r){var e,u=0,i=n.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)t(e=n[o])?u+=e:--a;else for(;++o<i;)t(e=r.call(n,n[o],o))?u+=e:--a;return a?u/a:void 0},Bo.quantile=function(n,t){var r=(n.length-1)*t+1,e=Math.floor(r),u=+n[e-1],i=r-e;return i?u+i*(n[e]-u):u},Bo.median=function(r,e){return arguments.length>1&&(r=r.map(e)),r=r.filter(t),r.length?Bo.quantile(r.sort(n),.5):void 0};var aa=r(n);Bo.bisectLeft=aa.left,Bo.bisect=Bo.bisectRight=aa.right,Bo.bisector=function(t){return r(1===t.length?function(r,e){return n(t(r),e)}:t)},Bo.shuffle=function(n){for(var t,r,e=n.length;e;)r=0|Math.random()*e--,t=n[e],n[e]=n[r],n[r]=t;return n},Bo.permute=function(n,t){for(var r=t.length,e=new Array(r);r--;)e[r]=n[t[r]];return e},Bo.pairs=function(n){for(var t,r=0,e=n.length-1,u=n[0],i=new Array(0>e?0:e);e>r;)i[r]=[t=u,u=n[++r]];return i},Bo.zip=function(){if(!(u=arguments.length))return[];for(var n=-1,t=Bo.min(arguments,e),r=new Array(t);++n<t;)for(var u,i=-1,o=r[n]=new Array(u);++i<u;)o[i]=arguments[i][n];return r},Bo.transpose=function(n){return Bo.zip.apply(Bo,n)},Bo.keys=function(n){var t=[];for(var r in n)t.push(r);return t},Bo.values=function(n){var t=[];for(var r in n)t.push(n[r]);return t},Bo.entries=function(n){var t=[];for(var r in n)t.push({key:r,value:n[r]});return t},Bo.merge=function(n){for(var t,r,e,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(r=new Array(o);--u>=0;)for(e=n[u],t=e.length;--t>=0;)r[--o]=e[t];return r};var ca=Math.abs;Bo.range=function(n,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/r)throw new Error("infinite range");var e,i=[],o=u(ca(r)),a=-1;if(n*=o,t*=o,r*=o,0>r)for(;(e=n+r*++a)>t;)i.push(e/o);else for(;(e=n+r*++a)<t;)i.push(e/o);return i},Bo.map=function(n){var t=new o;if(n instanceof o)n.forEach(function(n,r){t.set(n,r)});else for(var r in n)t.set(r,n[r]);return t},i(o,{has:a,get:function(n){return this[sa+n]},set:function(n,t){return this[sa+n]=t},remove:c,keys:s,values:function(){var n=[];return this.forEach(function(t,r){n.push(r)}),n},entries:function(){var n=[];return this.forEach(function(t,r){n.push({key:t,value:r})}),n},size:l,empty:f,forEach:function(n){for(var t in this)t.charCodeAt(0)===la&&n.call(this,t.substring(1),this[t])}});var sa="\x00",la=sa.charCodeAt(0);Bo.nest=function(){function n(t,a,c){if(c>=i.length)return e?e.call(u,a):r?a.sort(r):a;for(var s,l,f,h,g=-1,p=a.length,v=i[c++],d=new o;++g<p;)(h=d.get(s=v(l=a[g])))?h.push(l):d.set(s,[l]);return t?(l=t(),f=function(r,e){l.set(r,n(t,e,c))}):(l={},f=function(r,e){l[r]=n(t,e,c)}),d.forEach(f),l}function t(n,r){if(r>=i.length)return n;var e=[],u=a[r++];return n.forEach(function(n,u){e.push({key:n,values:t(u,r)})}),u?e.sort(function(n,t){return u(n.key,t.key)}):e}var r,e,u={},i=[],a=[];return u.map=function(t,r){return n(r,t,0)},u.entries=function(r){return t(n(Bo.map,r,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return r=n,u},u.rollup=function(n){return e=n,u},u},Bo.set=function(n){var t=new h;if(n)for(var r=0,e=n.length;e>r;++r)t.add(n[r]);return t},i(h,{has:a,add:function(n){return this[sa+n]=!0,n},remove:function(n){return n=sa+n,n in this&&delete this[n]},values:s,size:l,empty:f,forEach:function(n){for(var t in this)t.charCodeAt(0)===la&&n.call(this,t.substring(1))}}),Bo.behavior={},Bo.rebind=function(n,t){for(var r,e=1,u=arguments.length;++e<u;)n[r=arguments[e]]=g(n,t,t[r]);return n};var fa=["webkit","ms","moz","Moz","o","O"];Bo.dispatch=function(){for(var n=new d,t=-1,r=arguments.length;++t<r;)n[arguments[t]]=m(n);return n},d.prototype.on=function(n,t){var r=n.indexOf("."),e="";if(r>=0&&(e=n.substring(r+1),n=n.substring(0,r)),n)return arguments.length<2?this[n].on(e):this[n].on(e,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(e,null);return this}},Bo.event=null,Bo.requote=function(n){return n.replace(ha,"\\$&")};var ha=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ga={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var r in t)n[r]=t[r]},pa=function(n,t){return t.querySelector(n)},va=function(n,t){return t.querySelectorAll(n)},da=Ko[p(Ko,"matchesSelector")],ma=function(n,t){return da.call(n,t)};"function"==typeof Sizzle&&(pa=function(n,t){return Sizzle(n,t)[0]||null},va=Sizzle,ma=Sizzle.matchesSelector),Bo.selection=function(){return _a};var ya=Bo.selection.prototype=[];ya.select=function(n){var t,r,e,u,i=[];n=b(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(e=this[o]).parentNode;for(var c=-1,s=e.length;++c<s;)(u=e[c])?(t.push(r=n.call(u,u.__data__,c,o)),r&&"__data__"in u&&(r.__data__=u.__data__)):t.push(null)}return _(i)},ya.selectAll=function(n){var t,r,e=[];n=w(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(r=o[a])&&(e.push(t=Wo(n.call(r,r.__data__,a,u))),t.parentNode=r);return _(e)};var xa={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Bo.ns={prefix:xa,qualify:function(n){var t=n.indexOf(":"),r=n;return t>=0&&(r=n.substring(0,t),n=n.substring(t+1)),xa.hasOwnProperty(r)?{space:xa[r],local:n}:n}},ya.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var r=this.node();return n=Bo.ns.qualify(n),n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}for(t in n)this.each(S(t,n[t]));return this}return this.each(S(n,t))},ya.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var r=this.node(),e=(n=A(n)).length,u=-1;if(t=r.classList){for(;++u<e;)if(!t.contains(n[u]))return!1}else for(t=r.getAttribute("class");++u<e;)if(!E(n[u]).test(t))return!1;return!0}for(t in n)this.each(C(t,n[t]));return this}return this.each(C(n,t))},ya.style=function(n,t,r){var e=arguments.length;if(3>e){if("string"!=typeof n){2>e&&(t="");for(r in n)this.each(z(r,n[r],t));return this}if(2>e)return Qo.getComputedStyle(this.node(),null).getPropertyValue(n);r=""}return this.each(z(n,t,r))},ya.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(L(t,n[t]));return this}return this.each(L(n,t))},ya.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ya.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ya.append=function(n){return n=T(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ya.insert=function(n,t){return n=T(n),t=b(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ya.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},ya.data=function(n,t){function r(n,r){var e,u,i,a=n.length,f=r.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new o,y=new o,x=[];for(e=-1;++e<a;)d=t.call(u=n[e],u.__data__,e),m.has(d)?v[e]=u:m.set(d,u),x.push(d);for(e=-1;++e<f;)d=t.call(r,i=r[e],e),(u=m.get(d))?(g[e]=u,u.__data__=i):y.has(d)||(p[e]=q(i)),y.set(d,i),m.remove(d);for(e=-1;++e<a;)m.has(x[e])&&(v[e]=n[e])}else{for(e=-1;++e<h;)u=n[e],i=r[e],u?(u.__data__=i,g[e]=u):p[e]=q(i);for(;f>e;++e)p[e]=q(r[e]);for(;a>e;++e)v[e]=n[e]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),s.push(g),l.push(v)}var e,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(e=this[0]).length);++i<a;)(u=e[i])&&(n[i]=u.__data__);return n}var c=U([]),s=_([]),l=_([]);if("function"==typeof n)for(;++i<a;)r(e=this[i],n.call(e,e.parentNode.__data__,i));else for(;++i<a;)r(e=this[i],n);return s.enter=function(){return c},s.exit=function(){return l},s},ya.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ya.filter=function(n){var t,r,e,u=[];"function"!=typeof n&&(n=R(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(r=this[i]).parentNode;for(var a=0,c=r.length;c>a;a++)(e=r[a])&&n.call(e,e.__data__,a,i)&&t.push(e)}return _(u)},ya.order=function(){for(var n=-1,t=this.length;++n<t;)for(var r,e=this[n],u=e.length-1,i=e[u];--u>=0;)(r=e[u])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},ya.sort=function(n){n=D.apply(this,arguments);for(var t=-1,r=this.length;++t<r;)this[t].sort(n);return this.order()},ya.each=function(n){return P(this,function(t,r,e){n.call(t,t.__data__,r,e)})},ya.call=function(n){var t=Wo(arguments);return n.apply(t[0]=this,t),this},ya.empty=function(){return!this.node()},ya.node=function(){for(var n=0,t=this.length;t>n;n++)for(var r=this[n],e=0,u=r.length;u>e;e++){var i=r[e];if(i)return i}return null},ya.size=function(){var n=0;return this.each(function(){++n}),n};var Ma=[];Bo.selection.enter=U,Bo.selection.enter.prototype=Ma,Ma.append=ya.append,Ma.empty=ya.empty,Ma.node=ya.node,Ma.call=ya.call,Ma.size=ya.size,Ma.select=function(n){for(var t,r,e,u,i,o=[],a=-1,c=this.length;++a<c;){e=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var s=-1,l=u.length;++s<l;)(i=u[s])?(t.push(e[s]=r=n.call(u.parentNode,i.__data__,s,a)),r.__data__=i.__data__):t.push(null)}return _(o)},Ma.insert=function(n,t){return arguments.length<2&&(t=j(this)),ya.insert.call(this,n,t)},ya.transition=function(){for(var n,t,r=As||++Ts,e=[],u=Cs||{time:Date.now(),ease:wu,delay:0,duration:250},i=-1,o=this.length;++i<o;){e.push(n=[]);for(var a=this[i],c=-1,s=a.length;++c<s;)(t=a[c])&&Fo(t,c,r,u),n.push(t)}return Uo(e,r)},ya.interrupt=function(){return this.each(H)},Bo.select=function(n){var t=["string"==typeof n?pa(n,Go):n];return t.parentNode=Ko,_([t])},Bo.selectAll=function(n){var t=Wo("string"==typeof n?va(n,Go):n);return t.parentNode=Ko,_([t])};var _a=Bo.select(Ko);ya.on=function(n,t,r){var e=arguments.length;if(3>e){if("string"!=typeof n){2>e&&(t=!1);for(r in n)this.each(F(r,n[r],t));return this}if(2>e)return(e=this.node()["__on"+n])&&e._;r=!1}return this.each(F(n,t,r))};var ba=Bo.map({mouseenter:"mouseover",mouseleave:"mouseout"});ba.forEach(function(n){"on"+n in Go&&ba.remove(n)});var wa="onselectstart"in Go?null:p(Ko.style,"userSelect"),Sa=0;Bo.mouse=function(n){return Z(n,x())},Bo.touches=function(n,t){return arguments.length<2&&(t=x().touches),t?Wo(t).map(function(t){var r=Z(n,t);return r.identifier=t.identifier,r}):[]},Bo.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,r,e=t(h,v);e&&(n=e[0]-x[0],r=e[1]-x[1],p|=n|r,x=e,g({type:"drag",x:e[0]+s[0],y:e[1]+s[1],dx:n,dy:r}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&Bo.event.target===f),g({type:"dragend"}))}var s,l=this,f=Bo.event.target,h=l.parentNode,g=r.of(l,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=Bo.select(u()).on(i+d,a).on(o+d,c),y=Y(),x=t(h,v);e?(s=e.apply(l,arguments),s=[s.x-x[0],s.y-x[1]]):s=[0,0],g({type:"dragstart"})}}var r=M(n,"drag","dragstart","dragend"),e=null,u=t(v,Bo.mouse,X,"mousemove","mouseup"),i=t(V,Bo.touch,$,"touchmove","touchend");return n.origin=function(t){return arguments.length?(e=t,n):e},Bo.rebind(n,r,"on")};var ka=Math.PI,Ea=2*ka,Aa=ka/2,Ca=1e-6,Na=Ca*Ca,za=ka/180,La=180/ka,Ta=Math.SQRT2,qa=2,Ra=4;Bo.interpolateZoom=function(n,t){function r(n){var t=n*y;if(m){var r=Q(v),o=i/(qa*h)*(r*nt(Ta*t+v)-K(v));return[e+o*s,u+o*l,i*r/Q(Ta*t+v)]}return[e+n*s,u+n*l,i*Math.exp(Ta*t)]}var e=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],s=o-e,l=a-u,f=s*s+l*l,h=Math.sqrt(f),g=(c*c-i*i+Ra*f)/(2*i*qa*h),p=(c*c-i*i-Ra*f)/(2*c*qa*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ta;return r.duration=1e3*y,r},Bo.behavior.zoom=function(){function n(n){n.on(A,s).on(Ua+".zoom",f).on(C,h).on("dblclick.zoom",g).on(z,l)}function t(n){return[(n[0]-S.x)/S.k,(n[1]-S.y)/S.k]}function r(n){return[n[0]*S.k+S.x,n[1]*S.k+S.y]}function e(n){S.k=Math.max(E[0],Math.min(E[1],n))}function u(n,t){t=r(t),S.x+=n[0]-t[0],S.y+=n[1]-t[1]}function i(){_&&_.domain(x.range().map(function(n){return(n-S.x)/S.k}).map(x.invert)),w&&w.domain(b.range().map(function(n){return(n-S.y)/S.k}).map(b.invert))}function o(n){n({type:"zoomstart"})}function a(n){i(),n({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(n){n({type:"zoomend"})}function s(){function n(){l=1,u(Bo.mouse(e),g),a(s)}function r(){f.on(C,Qo===e?h:null).on(N,null),p(l&&Bo.event.target===i),c(s)}var e=this,i=Bo.event.target,s=L.of(e,arguments),l=0,f=Bo.select(Qo).on(C,n).on(N,r),g=t(Bo.mouse(e)),p=Y();H.call(e),o(s)}function l(){function n(){var n=Bo.touches(g);return h=S.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=t(n))}),n}function r(){var t=Bo.event.target;Bo.select(t).on(M,i).on(_,f),b.push(t);for(var r=Bo.event.changedTouches,o=0,c=r.length;c>o;++o)v[r[o].identifier]=null;var s=n(),l=Date.now();if(1===s.length){if(500>l-m){var h=s[0],g=v[h.identifier];e(2*S.k),u(h,g),y(),a(p)}m=l}else if(s.length>1){var h=s[0],x=s[1],w=h[0]-x[0],k=h[1]-x[1];d=w*w+k*k}}function i(){for(var n,t,r,i,o=Bo.touches(g),c=0,s=o.length;s>c;++c,i=null)if(r=o[c],i=v[r.identifier]){if(t)break;n=r,t=i}if(i){var l=(l=r[0]-n[0])*l+(l=r[1]-n[1])*l,f=d&&Math.sqrt(l/d);n=[(n[0]+r[0])/2,(n[1]+r[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],e(f*h)}m=null,u(n,t),a(p)}function f(){if(Bo.event.touches.length){for(var t=Bo.event.changedTouches,r=0,e=t.length;e>r;++r)delete v[t[r].identifier];for(var u in v)return void n()}Bo.selectAll(b).on(x,null),w.on(A,s).on(z,l),k(),c(p)}var h,g=this,p=L.of(g,arguments),v={},d=0,x=".zoom-"+Bo.event.changedTouches[0].identifier,M="touchmove"+x,_="touchend"+x,b=[],w=Bo.select(g).on(A,null).on(z,r),k=Y();H.call(g),r(),o(p)}function f(){var n=L.of(this,arguments);d?clearTimeout(d):(H.call(this),o(n)),d=setTimeout(function(){d=null,c(n)},50),y();var r=v||Bo.mouse(this);p||(p=t(r)),e(Math.pow(2,.002*Da())*S.k),u(r,p),a(n)}function h(){p=null}function g(){var n=L.of(this,arguments),r=Bo.mouse(this),i=t(r),s=Math.log(S.k)/Math.LN2;o(n),e(Math.pow(2,Bo.event.shiftKey?Math.ceil(s)-1:Math.floor(s)+1)),u(r,i),a(n),c(n)}var p,v,d,m,x,_,b,w,S={x:0,y:0,k:1},k=[960,500],E=Pa,A="mousedown.zoom",C="mousemove.zoom",N="mouseup.zoom",z="touchstart.zoom",L=M(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=L.of(this,arguments),t=S;As?Bo.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},o(n)}).tween("zoom:zoom",function(){var r=k[0],e=k[1],u=r/2,i=e/2,o=Bo.interpolateZoom([(u-S.x)/S.k,(i-S.y)/S.k,r/S.k],[(u-t.x)/t.k,(i-t.y)/t.k,r/t.k]);return function(t){var e=o(t),c=r/e[2];this.__chart__=S={x:u-e[0]*c,y:i-e[1]*c,k:c},a(n)}}).each("end.zoom",function(){c(n)}):(this.__chart__=S,o(n),a(n),c(n))})},n.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},i(),n):[S.x,S.y]},n.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:+t},i(),n):S.k},n.scaleExtent=function(t){return arguments.length?(E=null==t?Pa:[+t[0],+t[1]],n):E},n.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],n):v},n.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],n):k},n.x=function(t){return arguments.length?(_=t,x=t.copy(),S={x:0,y:0,k:1},n):_},n.y=function(t){return arguments.length?(w=t,b=t.copy(),S={x:0,y:0,k:1},n):w},Bo.rebind(n,L,"on")};var Da,Pa=[0,1/0],Ua="onwheel"in Go?(Da=function(){return-Bo.event.deltaY*(Bo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Go?(Da=function(){return Bo.event.wheelDelta},"mousewheel"):(Da=function(){return-Bo.event.detail},"MozMousePixelScroll");rt.prototype.toString=function(){return this.rgb()+""},Bo.hsl=function(n,t,r){return 1===arguments.length?n instanceof ut?et(n.h,n.s,n.l):_t(""+n,bt,et):et(+n,+t,+r)};var ja=ut.prototype=new rt;ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),et(this.h,this.s,this.l/n)},ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),et(this.h,this.s,n*this.l)},ja.rgb=function(){return it(this.h,this.s,this.l)},Bo.hcl=function(n,t,r){return 1===arguments.length?n instanceof at?ot(n.h,n.c,n.l):n instanceof lt?ht(n.l,n.a,n.b):ht((n=wt((n=Bo.rgb(n)).r,n.g,n.b)).l,n.a,n.b):ot(+n,+t,+r)};var Ha=at.prototype=new rt;Ha.brighter=function(n){return ot(this.h,this.c,Math.min(100,this.l+Fa*(arguments.length?n:1)))},Ha.darker=function(n){return ot(this.h,this.c,Math.max(0,this.l-Fa*(arguments.length?n:1)))},Ha.rgb=function(){return ct(this.h,this.c,this.l).rgb()},Bo.lab=function(n,t,r){return 1===arguments.length?n instanceof lt?st(n.l,n.a,n.b):n instanceof at?ct(n.l,n.c,n.h):wt((n=Bo.rgb(n)).r,n.g,n.b):st(+n,+t,+r)};var Fa=18,Oa=.95047,Ia=1,Ya=1.08883,Za=lt.prototype=new rt;Za.brighter=function(n){return st(Math.min(100,this.l+Fa*(arguments.length?n:1)),this.a,this.b)},Za.darker=function(n){return st(Math.max(0,this.l-Fa*(arguments.length?n:1)),this.a,this.b)},Za.rgb=function(){return ft(this.l,this.a,this.b)},Bo.rgb=function(n,t,r){return 1===arguments.length?n instanceof xt?yt(n.r,n.g,n.b):_t(""+n,yt,it):yt(~~n,~~t,~~r)};var Va=xt.prototype=new rt;Va.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,r=this.g,e=this.b,u=30;return t||r||e?(t&&u>t&&(t=u),r&&u>r&&(r=u),e&&u>e&&(e=u),yt(Math.min(255,~~(t/n)),Math.min(255,~~(r/n)),Math.min(255,~~(e/n)))):yt(u,u,u)},Va.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),yt(~~(n*this.r),~~(n*this.g),~~(n*this.b))},Va.hsl=function(){return bt(this.r,this.g,this.b)},Va.toString=function(){return"#"+Mt(this.r)+Mt(this.g)+Mt(this.b)};var $a=Bo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});$a.forEach(function(n,t){$a.set(n,dt(t))}),Bo.functor=Et,Bo.xhr=Ct(At),Bo.dsv=function(n,t){function r(n,r,i){arguments.length<3&&(i=r,r=null);var o=Nt(n,t,null==r?e:u(r),i);return o.row=function(n){return arguments.length?o.response(null==(r=n)?e:u(n)):r},o}function e(n){return r.parse(n.responseText)}function u(n){return function(t){return r.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return r.parse=function(n,t){var e;return r.parseRows(n,function(n,r){if(e)return e(n,r-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");e=t?function(n,r){return t(u(n),r)}:u})},r.parseRows=function(n,t){function r(){if(l>=s)return o;if(u)return u=!1,i;var t=l;if(34===n.charCodeAt(t)){for(var r=t;r++<s;)if(34===n.charCodeAt(r)){if(34!==n.charCodeAt(r+1))break;++r}l=r+2;var e=n.charCodeAt(r+1);return 13===e?(u=!0,10===n.charCodeAt(r+2)&&++l):10===e&&(u=!0),n.substring(t+1,r).replace(/""/g,'"')}for(;s>l;){var e=n.charCodeAt(l++),a=1;if(10===e)u=!0;else if(13===e)u=!0,10===n.charCodeAt(l)&&(++l,++a);else if(e!==c)continue;return n.substring(t,l-a)}return n.substring(t)}for(var e,u,i={},o={},a=[],s=n.length,l=0,f=0;(e=r())!==o;){for(var h=[];e!==i&&e!==o;)h.push(e),e=r();(!t||(h=t(h,f++)))&&a.push(h)}return a},r.format=function(t){if(Array.isArray(t[0]))return r.formatRows(t);var e=new h,u=[];return t.forEach(function(n){for(var t in n)e.has(t)||u.push(e.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},r.formatRows=function(n){return n.map(i).join("\n")},r},Bo.csv=Bo.dsv(",","text/csv"),Bo.tsv=Bo.dsv("	","text/tab-separated-values"),Bo.touch=function(n,t,r){if(arguments.length<3&&(r=t,t=x().changedTouches),t)for(var e,u=0,i=t.length;i>u;++u)if((e=t[u]).identifier===r)return Z(n,e)};var Xa,Ba,Ja,Wa,Ga,Ka=Qo[p(Qo,"requestAnimationFrame")]||function(n){setTimeout(n,17)};Bo.timer=function(n,t,r){var e=arguments.length;2>e&&(t=0),3>e&&(r=Date.now());var u=r+t,i={c:n,t:u,f:!1,n:null};Ba?Ba.n=i:Xa=i,Ba=i,Ja||(Wa=clearTimeout(Wa),Ja=1,Ka(Lt))},Bo.timer.flush=function(){Tt(),qt()},Bo.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var Qa=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Dt);Bo.formatPrefix=function(n,t){var r=0;return n&&(0>n&&(n*=-1),t&&(n=Bo.round(n,Rt(n,t))),r=1+Math.floor(1e-12+Math.log(n)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3)))),Qa[8+r/3]};var nc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,tc=Bo.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Bo.round(n,Rt(n,t))).toFixed(Math.max(0,Math.min(20,Rt(n*(1+1e-15),t))))}}),rc=Bo.time={},ec=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){uc.setUTCDate.apply(this._,arguments)},setDay:function(){uc.setUTCDay.apply(this._,arguments)},setFullYear:function(){uc.setUTCFullYear.apply(this._,arguments)},setHours:function(){uc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){uc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){uc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){uc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){uc.setUTCSeconds.apply(this._,arguments)},setTime:function(){uc.setTime.apply(this._,arguments)}};var uc=Date.prototype;rc.year=Ht(function(n){return n=rc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),rc.years=rc.year.range,rc.years.utc=rc.year.utc.range,rc.day=Ht(function(n){var t=new ec(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),rc.days=rc.day.range,rc.days.utc=rc.day.utc.range,rc.dayOfYear=function(n){var t=rc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var r=rc[n]=Ht(function(n){return(n=rc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var r=rc.year(n).getDay();return Math.floor((rc.dayOfYear(n)+(r+t)%7)/7)-(r!==t)});rc[n+"s"]=r.range,rc[n+"s"].utc=r.utc.range,rc[n+"OfYear"]=function(n){var r=rc.year(n).getDay();return Math.floor((rc.dayOfYear(n)+(r+t)%7)/7)}}),rc.week=rc.sunday,rc.weeks=rc.sunday.range,rc.weeks.utc=rc.sunday.utc.range,rc.weekOfYear=rc.sundayOfYear;var ic={"-":"",_:" ",0:"0"},oc=/^\s*\d+/,ac=/^%/;Bo.locale=function(n){return{numberFormat:Pt(n),timeFormat:Ot(n)}};var cc=Bo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Bo.format=cc.numberFormat,Bo.geo={},cr.prototype={s:0,t:0,add:function(n){sr(n,this.t,sc),sr(sc.s,this.s,this),this.s?this.t+=sc.t:this.s=sc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var sc=new cr;Bo.geo.stream=function(n,t){n&&lc.hasOwnProperty(n.type)?lc[n.type](n,t):lr(n,t)};var lc={Feature:function(n,t){lr(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,e=-1,u=r.length;++e<u;)lr(r[e].geometry,t)}},fc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var r=n.coordinates,e=-1,u=r.length;++e<u;)n=r[e],t.point(n[0],n[1],n[2])},LineString:function(n,t){fr(n.coordinates,t,0)},MultiLineString:function(n,t){for(var r=n.coordinates,e=-1,u=r.length;++e<u;)fr(r[e],t,0)},Polygon:function(n,t){hr(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,e=-1,u=r.length;++e<u;)hr(r[e],t)},GeometryCollection:function(n,t){for(var r=n.geometries,e=-1,u=r.length;++e<u;)lr(r[e],t)}};Bo.geo.area=function(n){return hc=0,Bo.geo.stream(n,pc),hc};var hc,gc=new cr,pc={sphere:function(){hc+=4*ka},point:v,lineStart:v,lineEnd:v,polygonStart:function(){gc.reset(),pc.lineStart=gr},polygonEnd:function(){var n=2*gc;hc+=0>n?4*ka+n:n,pc.lineStart=pc.lineEnd=pc.point=v}};Bo.geo.bounds=function(){function n(n,t){x.push(M=[l=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,r){var e=pr([t*za,r*za]);if(m){var u=dr(m,e),i=[u[1],-u[0],0],o=dr(i,u);xr(o),o=Mr(o);var c=t-p,s=c>0?1:-1,v=o[0]*La*s,d=ca(c)>180;if(d^(v>s*p&&s*t>v)){var y=o[1]*La;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>s*p&&s*t>v)){var y=-o[1]*La;f>y&&(f=y)}else f>r&&(f=r),r>g&&(g=r);d?p>t?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>p?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t)}else n(t,r);m=e,p=t}function r(){_.point=t}function e(){M[0]=l,M[1]=h,_.point=n,m=null}function u(n,r){if(m){var e=n-p;y+=ca(e)>180?e+(e>0?360:-360):e}else v=n,d=r;pc.point(n,r),t(n,r)}function i(){pc.lineStart()}function o(){u(v,d),pc.lineEnd(),ca(y)>Ca&&(l=-(h=180)),M[0]=l,M[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function s(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var l,f,h,g,p,v,d,m,y,x,M,_={point:n,lineStart:r,lineEnd:e,polygonStart:function(){_.point=u,_.lineStart=i,_.lineEnd=o,y=0,pc.polygonStart()},polygonEnd:function(){pc.polygonEnd(),_.point=n,_.lineStart=r,_.lineEnd=e,0>gc?(l=-(h=180),f=-(g=90)):y>Ca?g=90:-Ca>y&&(f=-90),M[0]=l,M[1]=h}};return function(n){g=h=-(l=f=1/0),x=[],Bo.geo.stream(n,_);var t=x.length;if(t){x.sort(c);for(var r,e=1,u=x[0],i=[u];t>e;++e)r=x[e],s(r[0],u)||s(r[1],u)?(a(u[0],r[1])>a(u[0],u[1])&&(u[1]=r[1]),a(r[0],u[1])>a(u[0],u[1])&&(u[0]=r[0])):i.push(u=r);for(var o,r,p=-1/0,t=i.length-1,e=0,u=i[t];t>=e;u=r,++e)r=i[e],(o=a(u[1],r[0]))>p&&(p=o,l=r[0],h=u[1])}return x=M=null,1/0===l||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[l,f],[h,g]]
-}}(),Bo.geo.centroid=function(n){vc=dc=mc=yc=xc=Mc=_c=bc=wc=Sc=kc=0,Bo.geo.stream(n,Ec);var t=wc,r=Sc,e=kc,u=t*t+r*r+e*e;return Na>u&&(t=Mc,r=_c,e=bc,Ca>dc&&(t=mc,r=yc,e=xc),u=t*t+r*r+e*e,Na>u)?[0/0,0/0]:[Math.atan2(r,t)*La,G(e/Math.sqrt(u))*La]};var vc,dc,mc,yc,xc,Mc,_c,bc,wc,Sc,kc,Ec={sphere:v,point:br,lineStart:Sr,lineEnd:kr,polygonStart:function(){Ec.lineStart=Er},polygonEnd:function(){Ec.lineStart=Sr}},Ac=Lr(Ar,Pr,jr,[-ka,-ka/2]),Cc=1e9;Bo.geo.clipExtent=function(){var n,t,r,e,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Or(n=+a[0][0],t=+a[0][1],r=+a[1][0],e=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[r,e]]}};return o.extent([[0,0],[960,500]])},(Bo.geo.conicEqualArea=function(){return Yr(Zr)}).raw=Zr,Bo.geo.albers=function(){return Bo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Bo.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,r(i,o),t||(e(i,o),t)||u(i,o),t}var t,r,e,u,i=Bo.geo.albers(),o=Bo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Bo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,r){t=[n,r]}};return n.invert=function(n){var t=i.scale(),r=i.translate(),e=(n[0]-r[0])/t,u=(n[1]-r[1])/t;return(u>=.12&&.234>u&&e>=-.425&&-.214>e?o:u>=.166&&.234>u&&e>=-.214&&-.115>e?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),r=o.stream(n),e=a.stream(n);return{point:function(n,u){t.point(n,u),r.point(n,u),e.point(n,u)},sphere:function(){t.sphere(),r.sphere(),e.sphere()},lineStart:function(){t.lineStart(),r.lineStart(),e.lineStart()},lineEnd:function(){t.lineEnd(),r.lineEnd(),e.lineEnd()},polygonStart:function(){t.polygonStart(),r.polygonStart(),e.polygonStart()},polygonEnd:function(){t.polygonEnd(),r.polygonEnd(),e.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var s=i.scale(),l=+t[0],f=+t[1];return r=i.translate(t).clipExtent([[l-.455*s,f-.238*s],[l+.455*s,f+.238*s]]).stream(c).point,e=o.translate([l-.307*s,f+.201*s]).clipExtent([[l-.425*s+Ca,f+.12*s+Ca],[l-.214*s-Ca,f+.234*s-Ca]]).stream(c).point,u=a.translate([l-.205*s,f+.212*s]).clipExtent([[l-.214*s+Ca,f+.166*s+Ca],[l-.115*s-Ca,f+.234*s-Ca]]).stream(c).point,n},n.scale(1070)};var Nc,zc,Lc,Tc,qc,Rc,Dc={point:v,lineStart:v,lineEnd:v,polygonStart:function(){zc=0,Dc.lineStart=Vr},polygonEnd:function(){Dc.lineStart=Dc.lineEnd=Dc.point=v,Nc+=ca(zc/2)}},Pc={point:$r,lineStart:v,lineEnd:v,polygonStart:v,polygonEnd:v},Uc={point:Jr,lineStart:Wr,lineEnd:Gr,polygonStart:function(){Uc.lineStart=Kr},polygonEnd:function(){Uc.point=Jr,Uc.lineStart=Wr,Uc.lineEnd=Gr}};Bo.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),Bo.geo.stream(n,o)),i.result()}function t(){return o=null,n}var r,e,u,i,o,a=4.5;return n.area=function(n){return Nc=0,Bo.geo.stream(n,u(Dc)),Nc},n.centroid=function(n){return mc=yc=xc=Mc=_c=bc=wc=Sc=kc=0,Bo.geo.stream(n,u(Uc)),kc?[wc/kc,Sc/kc]:bc?[Mc/bc,_c/bc]:xc?[mc/xc,yc/xc]:[0/0,0/0]},n.bounds=function(n){return qc=Rc=-(Lc=Tc=1/0),Bo.geo.stream(n,u(Pc)),[[Lc,Tc],[qc,Rc]]},n.projection=function(n){return arguments.length?(u=(r=n)?n.stream||te(n):At,t()):r},n.context=function(n){return arguments.length?(i=null==(e=n)?new Xr:new Qr(n),"function"!=typeof a&&i.pointRadius(a),t()):e},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(Bo.geo.albersUsa()).context(null)},Bo.geo.transform=function(n){return{stream:function(t){var r=new re(t);for(var e in n)r[e]=n[e];return r}}},re.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Bo.geo.projection=ue,Bo.geo.projectionMutator=ie,(Bo.geo.equirectangular=function(){return ue(ae)}).raw=ae.invert=ae,Bo.geo.rotation=function(n){function t(t){return t=n(t[0]*za,t[1]*za),t[0]*=La,t[1]*=La,t}return n=se(n[0]%360*za,n[1]*za,n.length>2?n[2]*za:0),t.invert=function(t){return t=n.invert(t[0]*za,t[1]*za),t[0]*=La,t[1]*=La,t},t},ce.invert=ae,Bo.geo.circle=function(){function n(){var n="function"==typeof e?e.apply(this,arguments):e,t=se(-n[0]*za,-n[1]*za,0).invert,u=[];return r(null,null,1,{point:function(n,r){u.push(n=t(n,r)),n[0]*=La,n[1]*=La}}),{type:"Polygon",coordinates:[u]}}var t,r,e=[0,0],u=6;return n.origin=function(t){return arguments.length?(e=t,n):e},n.angle=function(e){return arguments.length?(r=ge((t=+e)*za,u*za),n):t},n.precision=function(e){return arguments.length?(r=ge(t*za,(u=+e)*za),n):u},n.angle(90)},Bo.geo.distance=function(n,t){var r,e=(t[0]-n[0])*za,u=n[1]*za,i=t[1]*za,o=Math.sin(e),a=Math.cos(e),c=Math.sin(u),s=Math.cos(u),l=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((r=f*o)*r+(r=s*l-c*f*a)*r),c*l+s*f*a)},Bo.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return Bo.range(Math.ceil(i/d)*d,u,d).map(h).concat(Bo.range(Math.ceil(s/m)*m,c,m).map(g)).concat(Bo.range(Math.ceil(e/p)*p,r,p).filter(function(n){return ca(n%d)>Ca}).map(l)).concat(Bo.range(Math.ceil(a/v)*v,o,v).filter(function(n){return ca(n%m)>Ca}).map(f))}var r,e,u,i,o,a,c,s,l,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(s).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],s=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),s>c&&(t=s,s=c,c=t),n.precision(y)):[[i,s],[u,c]]},n.minorExtent=function(t){return arguments.length?(e=+t[0][0],r=+t[1][0],a=+t[0][1],o=+t[1][1],e>r&&(t=e,e=r,r=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[e,a],[r,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,l=ve(a,o,90),f=de(e,r,y),h=ve(s,c,90),g=de(i,u,y),n):y},n.majorExtent([[-180,-90+Ca],[180,90-Ca]]).minorExtent([[-180,-80-Ca],[180,80+Ca]])},Bo.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),r||u.apply(this,arguments)]}}var t,r,e=me,u=ye;return n.distance=function(){return Bo.geo.distance(t||e.apply(this,arguments),r||u.apply(this,arguments))},n.source=function(r){return arguments.length?(e=r,t="function"==typeof r?null:r,n):e},n.target=function(t){return arguments.length?(u=t,r="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},Bo.geo.interpolate=function(n,t){return xe(n[0]*za,n[1]*za,t[0]*za,t[1]*za)},Bo.geo.length=function(n){return jc=0,Bo.geo.stream(n,Hc),jc};var jc,Hc={sphere:v,point:v,lineStart:Me,lineEnd:v,polygonStart:v,polygonEnd:v},Fc=_e(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(Bo.geo.azimuthalEqualArea=function(){return ue(Fc)}).raw=Fc;var Oc=_e(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},At);(Bo.geo.azimuthalEquidistant=function(){return ue(Oc)}).raw=Oc,(Bo.geo.conicConformal=function(){return Yr(be)}).raw=be,(Bo.geo.conicEquidistant=function(){return Yr(we)}).raw=we;var Ic=_e(function(n){return 1/n},Math.atan);(Bo.geo.gnomonic=function(){return ue(Ic)}).raw=Ic,Se.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Aa]},(Bo.geo.mercator=function(){return ke(Se)}).raw=Se;var Yc=_e(function(){return 1},Math.asin);(Bo.geo.orthographic=function(){return ue(Yc)}).raw=Yc;var Zc=_e(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(Bo.geo.stereographic=function(){return ue(Zc)}).raw=Zc,Ee.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Aa]},(Bo.geo.transverseMercator=function(){var n=ke(Ee),t=n.center,r=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[-n[1],n[0]])},n.rotate=function(n){return n?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},n.rotate([0,0])}).raw=Ee,Bo.geom={},Bo.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(r),i=Et(e),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(ze),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var s=Ne(a),l=Ne(c),f=l[0]===s[0],h=l[l.length-1]===s[s.length-1],g=[];for(t=s.length-1;t>=0;--t)g.push(n[a[s[t]][2]]);for(t=+f;t<l.length-h;++t)g.push(n[a[l[t]][2]]);return g}var r=Ae,e=Ce;return arguments.length?t(n):(t.x=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(e=n,t):e},t)},Bo.geom.polygon=function(n){return ga(n,Vc),n};var Vc=Bo.geom.polygon.prototype=[];Vc.area=function(){for(var n,t=-1,r=this.length,e=this[r-1],u=0;++t<r;)n=e,e=this[t],u+=n[1]*e[0]-n[0]*e[1];return.5*u},Vc.centroid=function(n){var t,r,e=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++e<u;)t=a,a=this[e],r=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*r,o+=(t[1]+a[1])*r;return[i*n,o*n]},Vc.clip=function(n){for(var t,r,e,u,i,o,a=qe(n),c=-1,s=this.length-qe(this),l=this[s-1];++c<s;){for(t=n.slice(),n.length=0,u=this[c],i=t[(e=t.length-a)-1],r=-1;++r<e;)o=t[r],Le(o,l,u)?(Le(i,l,u)||n.push(Te(i,o,l,u)),n.push(o)):Le(i,l,u)&&n.push(Te(i,o,l,u)),i=o;a&&n.push(n[0]),l=u}return n};var $c,Xc,Bc,Jc,Wc,Gc=[],Kc=[];Oe.prototype.prepare=function(){for(var n,t=this.edges,r=t.length;r--;)n=t[r].edge,n.b&&n.a||t.splice(r,1);return t.sort(Ye),t.length},Qe.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},nu.prototype={insert:function(n,t){var r,e,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;r=n}else this._?(n=uu(this._),t.P=null,t.N=n,n.P=n.L=t,r=n):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,n=t;r&&r.C;)e=r.U,r===e.L?(u=e.R,u&&u.C?(r.C=u.C=!1,e.C=!0,n=e):(n===r.R&&(ru(this,r),n=r,r=n.U),r.C=!1,e.C=!0,eu(this,e))):(u=e.L,u&&u.C?(r.C=u.C=!1,e.C=!0,n=e):(n===r.L&&(eu(this,r),n=r,r=n.U),r.C=!1,e.C=!0,ru(this,e))),r=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,r,e,u=n.U,i=n.L,o=n.R;if(r=i?o?uu(o):i:o,u?u.L===n?u.L=r:u.R=r:this._=r,i&&o?(e=r.C,r.C=n.C,r.L=i,i.U=r,r!==o?(u=r.U,r.U=n.U,n=r.R,u.L=n,r.R=o,o.U=r):(r.U=u,u=r,n=r.R)):(e=n.C,n=r),n&&(n.U=u),!e){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,eu(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ru(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,eu(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ru(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,eu(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},Bo.geom.voronoi=function(n){function t(n){var t=new Array(n.length),e=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return iu(r(n),a).cells.forEach(function(r,a){var c=r.edges,s=r.site,l=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):s.x>=e&&s.x<=i&&s.y>=u&&s.y<=o?[[e,o],[i,o],[i,u],[e,u]]:[];l.point=n[a]}),t}function r(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ca)*Ca,y:Math.round(o(n,t)/Ca)*Ca,i:t}})}var e=Ae,u=Ce,i=e,o=u,a=Qc;return n?t(n):(t.links=function(n){return iu(r(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return iu(r(n)).cells.forEach(function(r,e){for(var u,i,o=r.site,a=r.edges.sort(Ye),c=-1,s=a.length,l=a[s-1].edge,f=l.l===o?l.r:l.l;++c<s;)u=l,i=f,l=a[c].edge,f=l.l===o?l.r:l.l,e<i.i&&e<f.i&&au(o,i,f)<0&&t.push([n[e],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(e=n),t):e},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?Qc:n,t):a===Qc?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===Qc?null:a&&a[1]},t)};var Qc=[[-1e6,-1e6],[1e6,1e6]];Bo.geom.delaunay=function(n){return Bo.geom.voronoi().triangles(n)},Bo.geom.quadtree=function(n,t,r,e,u){function i(n){function i(n,t,r,e,u,i,o,a){if(!isNaN(r)&&!isNaN(e))if(n.leaf){var c=n.x,l=n.y;if(null!=c)if(ca(c-r)+ca(l-e)<.01)s(n,t,r,e,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,s(n,f,c,l,u,i,o,a),s(n,t,r,e,u,i,o,a)}else n.x=r,n.y=e,n.point=t}else s(n,t,r,e,u,i,o,a)}function s(n,t,r,e,u,o,a,c){var s=.5*(u+a),l=.5*(o+c),f=r>=s,h=e>=l,g=(h<<1)+f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=lu()),f?u=s:a=s,h?o=l:c=l,i(n,t,r,e,u,o,a,c)}var l,f,h,g,p,v,d,m,y,x=Et(a),M=Et(c);if(null!=t)v=t,d=r,m=e,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)l=n[g],l.x<v&&(v=l.x),l.y<d&&(d=l.y),l.x>m&&(m=l.x),l.y>y&&(y=l.y),f.push(l.x),h.push(l.y);else for(g=0;p>g;++g){var _=+x(l=n[g],g),b=+M(l,g);v>_&&(v=_),d>b&&(d=b),_>m&&(m=_),b>y&&(y=b),f.push(_),h.push(b)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=lu();if(k.add=function(n){i(k,n,+x(n,++g),+M(n,g),v,d,m,y)},k.visit=function(n){fu(n,k,v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=l=null,k}var o,a=Ae,c=Ce;return(o=arguments.length)?(a=cu,c=su,3===o&&(u=r,e=t,r=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=r=e=u=null:(t=+n[0][0],r=+n[0][1],e=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,r],[e,u]]},i.size=function(n){return arguments.length?(null==n?t=r=e=u=null:(t=r=0,e=+n[0],u=+n[1]),i):null==t?null:[e-t,u-r]},i)},Bo.interpolateRgb=hu,Bo.interpolateObject=gu,Bo.interpolateNumber=pu,Bo.interpolateString=vu;var ns=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ts=new RegExp(ns.source,"g");Bo.interpolate=du,Bo.interpolators=[function(n,t){var r=typeof t;return("string"===r?$a.has(t)||/^(#|rgb\(|hsl\()/.test(t)?hu:vu:t instanceof rt?hu:Array.isArray(t)?mu:"object"===r&&isNaN(t)?gu:pu)(n,t)}],Bo.interpolateArray=mu;var rs=function(){return At},es=Bo.map({linear:rs,poly:Su,quad:function(){return _u},cubic:function(){return bu},sin:function(){return ku},exp:function(){return Eu},circle:function(){return Au},elastic:Cu,back:Nu,bounce:function(){return zu}}),us=Bo.map({"in":At,out:xu,"in-out":Mu,"out-in":function(n){return Mu(xu(n))}});Bo.ease=function(n){var t=n.indexOf("-"),r=t>=0?n.substring(0,t):n,e=t>=0?n.substring(t+1):"in";return r=es.get(r)||rs,e=us.get(e)||At,yu(e(r.apply(null,Jo.call(arguments,1))))},Bo.interpolateHcl=Lu,Bo.interpolateHsl=Tu,Bo.interpolateLab=qu,Bo.interpolateRound=Ru,Bo.transform=function(n){var t=Go.createElementNS(Bo.ns.prefix.svg,"g");return(Bo.transform=function(n){if(null!=n){t.setAttribute("transform",n);var r=t.transform.baseVal.consolidate()}return new Du(r?r.matrix:is)})(n)},Du.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var is={a:1,b:0,c:0,d:1,e:0,f:0};Bo.interpolateTransform=Hu,Bo.layout={},Bo.layout.bundle=function(){return function(n){for(var t=[],r=-1,e=n.length;++r<e;)t.push(Iu(n[r]));return t}},Bo.layout.chord=function(){function n(){var n,s,f,h,g,p={},v=[],d=Bo.range(i),m=[];for(r=[],e=[],n=0,h=-1;++h<i;){for(s=0,g=-1;++g<i;)s+=u[h][g];v.push(s),m.push(Bo.range(i)),n+=s}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,r){return a(u[t][n],u[t][r])})}),n=(Ea-l*i)/n,s=0,h=-1;++h<i;){for(f=s,g=-1;++g<i;){var y=d[h],x=m[y][g],M=u[y][x],_=s,b=s+=M*n;p[y+"-"+x]={index:y,subindex:x,startAngle:_,endAngle:b,value:M}}e[y]={index:y,startAngle:f,endAngle:s,value:(s-f)/n},s+=l}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&r.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){r.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var r,e,u,i,o,a,c,s={},l=0;return s.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,r=e=null,s):u},s.padding=function(n){return arguments.length?(l=n,r=e=null,s):l},s.sortGroups=function(n){return arguments.length?(o=n,r=e=null,s):o},s.sortSubgroups=function(n){return arguments.length?(a=n,r=null,s):a},s.sortChords=function(n){return arguments.length?(c=n,r&&t(),s):c},s.chords=function(){return r||n(),r},s.groups=function(){return e||n(),e},s},Bo.layout.force=function(){function n(n){return function(t,r,e,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-r,c=i*i+o*o;if(c>a*a/d){if(p>c){var s=t.charge/c;n.px-=i*s,n.py-=o*s}return!0}if(t.point&&c&&p>c){var s=t.pointCharge/c;n.px-=i*s,n.py-=o*s}}return!t.charge}}function t(n){n.px=Bo.event.x,n.py=Bo.event.y,a.resume()}var r,e,u,i,o,a={},c=Bo.dispatch("start","tick","end"),s=[1,1],l=.9,f=os,h=as,g=-30,p=cs,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((e*=.99)<.005)return c.end({type:"end",alpha:e=0}),!0;var t,r,a,f,h,p,d,x,M,_=m.length,b=y.length;for(r=0;b>r;++r)a=y[r],f=a.source,h=a.target,x=h.x-f.x,M=h.y-f.y,(p=x*x+M*M)&&(p=e*i[r]*((p=Math.sqrt(p))-u[r])/p,x*=p,M*=p,h.x-=x*(d=f.weight/(h.weight+f.weight)),h.y-=M*d,f.x+=x*(d=1-d),f.y+=M*d);if((d=e*v)&&(x=s[0]/2,M=s[1]/2,r=-1,d))for(;++r<_;)a=m[r],a.x+=(x-a.x)*d,a.y+=(M-a.y)*d;if(g)for(Ju(t=Bo.geom.quadtree(m),e,o),r=-1;++r<_;)(a=m[r]).fixed||t.visit(n(a));for(r=-1;++r<_;)a=m[r],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*l,a.y-=(a.py-(a.py=a.y))*l);c.tick({type:"tick",alpha:e})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(s=n,a):s},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(l=+n,a):l},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,e?e=n>0?n:0:n>0&&(c.start({type:"start",alpha:e=n}),Bo.timer(a.tick)),a):e},a.start=function(){function n(n,e){if(!r){for(r=new Array(c),a=0;c>a;++a)r[a]=[];for(a=0;s>a;++a){var u=y[a];r[u.source.index].push(u.target),r[u.target.index].push(u.source)}}for(var i,o=r[t],a=-1,s=o.length;++a<s;)if(!isNaN(i=o[a][n]))return i;return Math.random()*e}var t,r,e,c=m.length,l=y.length,p=s[0],v=s[1];for(t=0;c>t;++t)(e=m[t]).index=t,e.weight=0;for(t=0;l>t;++t)e=y[t],"number"==typeof e.source&&(e.source=m[e.source]),"number"==typeof e.target&&(e.target=m[e.target]),++e.source.weight,++e.target.weight;for(t=0;c>t;++t)e=m[t],isNaN(e.x)&&(e.x=n("x",p)),isNaN(e.y)&&(e.y=n("y",v)),isNaN(e.px)&&(e.px=e.x),isNaN(e.py)&&(e.py=e.y);if(u=[],"function"==typeof f)for(t=0;l>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;l>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;l>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;l>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return r||(r=Bo.behavior.drag().origin(At).on("dragstart.force",Vu).on("drag.force",t).on("dragend.force",$u)),arguments.length?(this.on("mouseover.force",Xu).on("mouseout.force",Bu).call(r),void 0):r},Bo.rebind(a,c,"on")};var os=20,as=1,cs=1/0;Bo.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(s=r.call(n,i,i.depth))&&(c=s.length)){for(var c,s,l;--c>=0;)o.push(l=s[c]),l.parent=i,l.depth=i.depth+1;e&&(i.value=0),i.children=s}else e&&(i.value=+e.call(n,i,i.depth)||0),delete i.children;return Ku(u,function(n){var r,u;t&&(r=n.children)&&r.sort(t),e&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ti,r=Qu,e=ni;return n.sort=function(r){return arguments.length?(t=r,n):t},n.children=function(t){return arguments.length?(r=t,n):r},n.value=function(t){return arguments.length?(e=t,n):e},n.revalue=function(t){return e&&(Gu(t,function(n){n.children&&(n.value=0)}),Ku(t,function(t){var r;t.children||(t.value=+e.call(n,t,t.depth)||0),(r=t.parent)&&(r.value+=t.value)})),t},n},Bo.layout.partition=function(){function n(t,r,e,u){var i=t.children;if(t.x=r,t.y=t.depth*u,t.dx=e,t.dy=u,i&&(o=i.length)){var o,a,c,s=-1;for(e=t.value?e/t.value:0;++s<o;)n(a=i[s],r,c=a.value*e,u),r+=c}}function t(n){var r=n.children,e=0;if(r&&(u=r.length))for(var u,i=-1;++i<u;)e=Math.max(e,t(r[i]));return 1+e}function r(r,i){var o=e.call(this,r,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var e=Bo.layout.hierarchy(),u=[1,1];return r.size=function(n){return arguments.length?(u=n,r):u},Wu(r,e)},Bo.layout.pie=function(){function n(i){var o=i.map(function(r,e){return+t.call(n,r,e)}),a=+("function"==typeof e?e.apply(this,arguments):e),c=(("function"==typeof u?u.apply(this,arguments):u)-a)/Bo.sum(o),s=Bo.range(i.length);null!=r&&s.sort(r===ss?function(n,t){return o[t]-o[n]}:function(n,t){return r(i[n],i[t])});var l=[];return s.forEach(function(n){var t;l[n]={data:i[n],value:t=o[n],startAngle:a,endAngle:a+=t*c}}),l}var t=Number,r=ss,e=0,u=Ea;return n.value=function(r){return arguments.length?(t=r,n):t},n.sort=function(t){return arguments.length?(r=t,n):r},n.startAngle=function(t){return arguments.length?(e=t,n):e},n.endAngle=function(t){return arguments.length?(u=t,n):u},n};var ss={};Bo.layout.stack=function(){function n(a,c){var s=a.map(function(r,e){return t.call(n,r,e)}),l=s.map(function(t){return t.map(function(t,r){return[i.call(n,t,r),o.call(n,t,r)]})}),f=r.call(n,l,c);s=Bo.permute(s,f),l=Bo.permute(l,f);var h,g,p,v=e.call(n,l,c),d=s.length,m=s[0].length;for(g=0;m>g;++g)for(u.call(n,s[0][g],p=v[g],l[0][g][1]),h=1;d>h;++h)u.call(n,s[h][g],p+=l[h-1][g][1],l[h][g][1]);return a}var t=At,r=oi,e=ai,u=ii,i=ei,o=ui;return n.values=function(r){return arguments.length?(t=r,n):t},n.order=function(t){return arguments.length?(r="function"==typeof t?t:ls.get(t)||oi,n):r},n.offset=function(t){return arguments.length?(e="function"==typeof t?t:fs.get(t)||ai,n):e},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var ls=Bo.map({"inside-out":function(n){var t,r,e=n.length,u=n.map(ci),i=n.map(si),o=Bo.range(e).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,s=[],l=[];for(t=0;e>t;++t)r=o[t],c>a?(a+=i[r],s.push(r)):(c+=i[r],l.push(r));return l.reverse().concat(s)},reverse:function(n){return Bo.range(n.length).reverse()},"default":oi}),fs=Bo.map({silhouette:function(n){var t,r,e,u=n.length,i=n[0].length,o=[],a=0,c=[];for(r=0;i>r;++r){for(t=0,e=0;u>t;t++)e+=n[t][r][1];e>a&&(a=e),o.push(e)}for(r=0;i>r;++r)c[r]=(a-o[r])/2;return c},wiggle:function(n){var t,r,e,u,i,o,a,c,s,l=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=s=0,r=1;h>r;++r){for(t=0,u=0;l>t;++t)u+=n[t][r][1];for(t=0,i=0,a=f[r][0]-f[r-1][0];l>t;++t){for(e=0,o=(n[t][r][1]-n[t][r-1][1])/(2*a);t>e;++e)o+=(n[e][r][1]-n[e][r-1][1])/a;i+=o*n[t][r][1]}g[r]=c-=u?i/u*a:0,s>c&&(s=c)}for(r=0;h>r;++r)g[r]-=s;return g},expand:function(n){var t,r,e,u=n.length,i=n[0].length,o=1/u,a=[];for(r=0;i>r;++r){for(t=0,e=0;u>t;t++)e+=n[t][r][1];if(e)for(t=0;u>t;t++)n[t][r][1]/=e;else for(t=0;u>t;t++)n[t][r][1]=o}for(r=0;i>r;++r)a[r]=0;return a},zero:ai});Bo.layout.histogram=function(){function n(n,i){for(var o,a,c=[],s=n.map(r,this),l=e.call(this,s,i),f=u.call(this,l,s,i),i=-1,h=s.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=s[i],a>=l[0]&&a<=l[1]&&(o=c[Bo.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,r=Number,e=gi,u=fi;return n.value=function(t){return arguments.length?(r=t,n):r},n.range=function(t){return arguments.length?(e=Et(t),n):e},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return hi(n,t)}:Et(t),n):u},n.frequency=function(r){return arguments.length?(t=!!r,n):t},n},Bo.layout.pack=function(){function n(n,i){var o=r.call(this,n,i),a=o[0],c=u[0],s=u[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Ku(a,function(n){n.r=+l(n.value)}),Ku(a,yi),e){var f=e*(t?1:Math.max(2*a.r/c,2*a.r/s))/2;Ku(a,function(n){n.r+=f}),Ku(a,yi),Ku(a,function(n){n.r-=f})}return _i(a,c/2,s/2,t?1:1/Math.max(2*a.r/c,2*a.r/s)),o}var t,r=Bo.layout.hierarchy().sort(pi),e=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(r){return arguments.length?(t=null==r||"function"==typeof r?r:+r,n):t},n.padding=function(t){return arguments.length?(e=+t,n):e},Wu(n,r)},Bo.layout.tree=function(){function n(n,u){var l=o.call(this,n,u),f=l[0],h=t(f);if(Ku(h,r),h.parent.m=-h.z,Gu(h,e),s)Gu(f,i);else{var g=f,p=f,v=f;Gu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Gu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return l}function t(n){for(var t,r={A:null,children:[n]},e=[r];null!=(t=e.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)e.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return r.children[0]}function r(n){var t=n.children,r=n.parent.children,e=n.i?r[n.i-1]:null;if(t.length){Ai(n);var i=(t[0].z+t[t.length-1].z)/2;e?(n.z=e.z+a(n._,e._),n.m=n.z-i):n.z=i}else e&&(n.z=e.z+a(n._,e._));n.parent.A=u(n,e,n.parent.A||r[0])}function e(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,r){if(t){for(var e,u=n,i=n,o=t,c=u.parent.children[0],s=u.m,l=i.m,f=o.m,h=c.m;o=ki(o),u=Si(u),o&&u;)c=Si(c),i=ki(i),i.a=n,e=o.z+f-u.z-s+a(o._,u._),e>0&&(Ei(Ci(o,n,r),n,e),s+=e,l+=e),f+=o.m,s+=u.m,h+=c.m,l+=i.m;o&&!ki(i)&&(i.t=o,i.m+=f-l),u&&!Si(c)&&(c.t=u,c.m+=s-h,r=n)}return r}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=Bo.layout.hierarchy().sort(null).value(null),a=wi,c=[1,1],s=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(s=null==(c=t)?i:null,n):s?null:c},n.nodeSize=function(t){return arguments.length?(s=null==(c=t)?null:i,n):s?c:null},Wu(n,o)},Bo.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],s=0;Ku(c,function(n){var t=n.children;t&&t.length?(n.x=zi(t),n.y=Ni(t)):(n.x=o?s+=r(n,o):0,n.y=0,o=n)});var l=Li(c),f=Ti(c),h=l.x-r(l,f)/2,g=f.x+r(f,l)/2;return Ku(c,u?function(n){n.x=(n.x-c.x)*e[0],n.y=(c.y-n.y)*e[1]}:function(n){n.x=(n.x-h)/(g-h)*e[0],n.y=(1-(c.y?n.y/c.y:1))*e[1]}),a}var t=Bo.layout.hierarchy().sort(null).value(null),r=wi,e=[1,1],u=!1;return n.separation=function(t){return arguments.length?(r=t,n):r},n.size=function(t){return arguments.length?(u=null==(e=t),n):u?null:e},n.nodeSize=function(t){return arguments.length?(u=null!=(e=t),n):u?e:null},Wu(n,t)},Bo.layout.treemap=function(){function n(n,t){for(var r,e,u=-1,i=n.length;++u<i;)e=(r=n[u]).value*(0>t?0:t),r.area=isNaN(e)||0>=e?0:e}function t(r){var i=r.children;if(i&&i.length){var o,a,c,s=f(r),l=[],h=i.slice(),p=1/0,v="slice"===g?s.dx:"dice"===g?s.dy:"slice-dice"===g?1&r.depth?s.dy:s.dx:Math.min(s.dx,s.dy);for(n(h,s.dx*s.dy/r.value),l.area=0;(c=h.length)>0;)l.push(o=h[c-1]),l.area+=o.area,"squarify"!==g||(a=e(l,v))<=p?(h.pop(),p=a):(l.area-=l.pop().area,u(l,v,s,!1),v=Math.min(s.dx,s.dy),l.length=l.area=0,p=1/0);l.length&&(u(l,v,s,!0),l.length=l.area=0),i.forEach(t)}}function r(t){var e=t.children;if(e&&e.length){var i,o=f(t),a=e.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);e.forEach(r)}}function e(n,t){for(var r,e=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(r=n[o].area)&&(i>r&&(i=r),r>u&&(u=r));return e*=e,t*=t,e?Math.max(t*u*p/e,e/(t*i*p)):1/0}function u(n,t,r,e){var u,i=-1,o=n.length,a=r.x,s=r.y,l=t?c(n.area/t):0;if(t==r.dx){for((e||l>r.dy)&&(l=r.dy);++i<o;)u=n[i],u.x=a,u.y=s,u.dy=l,a+=u.dx=Math.min(r.x+r.dx-a,l?c(u.area/l):0);u.z=!0,u.dx+=r.x+r.dx-a,r.y+=l,r.dy-=l}else{for((e||l>r.dx)&&(l=r.dx);++i<o;)u=n[i],u.x=a,u.y=s,u.dx=l,s+=u.dy=Math.min(r.y+r.dy-s,l?c(u.area/l):0);u.z=!1,u.dy+=r.y+r.dy-s,r.x+=l,r.dx-=l}}function i(e){var u=o||a(e),i=u[0];return i.x=0,i.y=0,i.dx=s[0],i.dy=s[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?r:t)(i),h&&(o=u),u}var o,a=Bo.layout.hierarchy(),c=Math.round,s=[1,1],l=null,f=qi,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(s=n,i):s},i.padding=function(n){function t(t){var r=n.call(i,t,t.depth);return null==r?qi(t):Ri(t,"number"==typeof r?[r,r,r,r]:r)}function r(t){return Ri(t,n)}if(!arguments.length)return l;var e;return f=null==(l=n)?qi:"function"==(e=typeof n)?t:"number"===e?(n=[n,n,n,n],r):r,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Wu(i,a)},Bo.random={normal:function(n,t){var r=arguments.length;return 2>r&&(t=1),1>r&&(n=0),function(){var r,e,u;do r=2*Math.random()-1,e=2*Math.random()-1,u=r*r+e*e;while(!u||u>1);return n+t*r*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=Bo.random.normal.apply(Bo,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=Bo.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,r=0;n>r;r++)t+=Math.random();return t}}},Bo.scale={};var hs={floor:At,ceil:At};Bo.scale.linear=function(){return Oi([0,1],[0,1],du,!1)};var gs={s:1,g:1,p:1,r:1,e:1};Bo.scale.log=function(){return Ji(Bo.scale.linear().domain([0,1]),10,!0,[1,10])};var ps=Bo.format(".0e"),vs={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};Bo.scale.pow=function(){return Wi(Bo.scale.linear(),1,[0,1])},Bo.scale.sqrt=function(){return Bo.scale.pow().exponent(.5)},Bo.scale.ordinal=function(){return Ki([],{t:"range",a:[[]]})},Bo.scale.category10=function(){return Bo.scale.ordinal().range(ds)},Bo.scale.category20=function(){return Bo.scale.ordinal().range(ms)},Bo.scale.category20b=function(){return Bo.scale.ordinal().range(ys)},Bo.scale.category20c=function(){return Bo.scale.ordinal().range(xs)};var ds=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(mt),ms=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(mt),ys=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(mt),xs=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(mt);Bo.scale.quantile=function(){return Qi([],[])},Bo.scale.quantize=function(){return no(0,1,[0,1])},Bo.scale.threshold=function(){return to([.5],[0,1])},Bo.scale.identity=function(){return ro([0,1])},Bo.svg={},Bo.svg.arc=function(){function n(){var n=t.apply(this,arguments),i=r.apply(this,arguments),o=e.apply(this,arguments)+Ms,a=u.apply(this,arguments)+Ms,c=(o>a&&(c=o,o=a,a=c),a-o),s=ka>c?"0":"1",l=Math.cos(o),f=Math.sin(o),h=Math.cos(a),g=Math.sin(a);
-return c>=_s?n?"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"M0,"+n+"A"+n+","+n+" 0 1,0 0,"+-n+"A"+n+","+n+" 0 1,0 0,"+n+"Z":"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":n?"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L"+n*h+","+n*g+"A"+n+","+n+" 0 "+s+",0 "+n*l+","+n*f+"Z":"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L0,0"+"Z"}var t=eo,r=uo,e=io,u=oo;return n.innerRadius=function(r){return arguments.length?(t=Et(r),n):t},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.startAngle=function(t){return arguments.length?(e=Et(t),n):e},n.endAngle=function(t){return arguments.length?(u=Et(t),n):u},n.centroid=function(){var n=(t.apply(this,arguments)+r.apply(this,arguments))/2,i=(e.apply(this,arguments)+u.apply(this,arguments))/2+Ms;return[Math.cos(i)*n,Math.sin(i)*n]},n};var Ms=-Aa,_s=Ea-Ca;Bo.svg.line=function(){return ao(At)};var bs=Bo.map({linear:co,"linear-closed":so,step:lo,"step-before":fo,"step-after":ho,basis:xo,"basis-open":Mo,"basis-closed":_o,bundle:bo,cardinal:vo,"cardinal-open":go,"cardinal-closed":po,monotone:Co});bs.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ws=[0,2/3,1/3,0],Ss=[0,1/3,2/3,0],ks=[0,1/6,2/3,1/6];Bo.svg.line.radial=function(){var n=ao(No);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},fo.reverse=ho,ho.reverse=fo,Bo.svg.area=function(){return zo(At)},Bo.svg.area.radial=function(){var n=zo(No);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},Bo.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),s=t(this,o,n,a);return"M"+c.p0+e(c.r,c.p1,c.a1-c.a0)+(r(c,s)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,s.r,s.p0)+e(s.r,s.p1,s.a1-s.a0)+u(s.r,s.p1,c.r,c.p0))+"Z"}function t(n,t,r,e){var u=t.call(n,r,e),i=a.call(n,u,e),o=c.call(n,u,e)+Ms,l=s.call(n,u,e)+Ms;return{r:i,a0:o,a1:l,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(l),i*Math.sin(l)]}}function r(n,t){return n.a0==t.a0&&n.a1==t.a1}function e(n,t,r){return"A"+n+","+n+" 0 "+ +(r>ka)+",1 "+t}function u(n,t,r,e){return"Q 0,0 "+e}var i=me,o=ye,a=Lo,c=io,s=oo;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(s=Et(t),n):s},n},Bo.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=r.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(e),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=me,r=ye,e=To;return n.source=function(r){return arguments.length?(t=Et(r),n):t},n.target=function(t){return arguments.length?(r=Et(t),n):r},n.projection=function(t){return arguments.length?(e=t,n):e},n},Bo.svg.diagonal.radial=function(){var n=Bo.svg.diagonal(),t=To,r=n.projection;return n.projection=function(n){return arguments.length?r(qo(t=n)):t},n},Bo.svg.symbol=function(){function n(n,e){return(Es.get(t.call(this,n,e))||Po)(r.call(this,n,e))}var t=Do,r=Ro;return n.type=function(r){return arguments.length?(t=Et(r),n):t},n.size=function(t){return arguments.length?(r=Et(t),n):r},n};var Es=Bo.map({circle:Po,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*zs)),r=t*zs;return"M0,"+-t+"L"+r+",0"+" 0,"+t+" "+-r+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ns),r=t*Ns/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ns),r=t*Ns/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});Bo.svg.symbolTypes=Es.keys();var As,Cs,Ns=Math.sqrt(3),zs=Math.tan(30*za),Ls=[],Ts=0;Ls.call=ya.call,Ls.empty=ya.empty,Ls.node=ya.node,Ls.size=ya.size,Bo.transition=function(n){return arguments.length?As?n.transition():n:_a.transition()},Bo.transition.prototype=Ls,Ls.select=function(n){var t,r,e,u=this.id,i=[];n=b(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]);for(var c=this[o],s=-1,l=c.length;++s<l;)(e=c[s])&&(r=n.call(e,e.__data__,s,o))?("__data__"in e&&(r.__data__=e.__data__),Fo(r,s,u,e.__transition__[u]),t.push(r)):t.push(null)}return Uo(i,u)},Ls.selectAll=function(n){var t,r,e,u,i,o=this.id,a=[];n=w(n);for(var c=-1,s=this.length;++c<s;)for(var l=this[c],f=-1,h=l.length;++f<h;)if(e=l[f]){i=e.__transition__[o],r=n.call(e,e.__data__,f,c),a.push(t=[]);for(var g=-1,p=r.length;++g<p;)(u=r[g])&&Fo(u,g,o,i),t.push(u)}return Uo(a,o)},Ls.filter=function(n){var t,r,e,u=[];"function"!=typeof n&&(n=R(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var r=this[i],a=0,c=r.length;c>a;a++)(e=r[a])&&n.call(e,e.__data__,a,i)&&t.push(e)}return Uo(u,this.id)},Ls.tween=function(n,t){var r=this.id;return arguments.length<2?this.node().__transition__[r].tween.get(n):P(this,null==t?function(t){t.__transition__[r].tween.remove(n)}:function(e){e.__transition__[r].tween.set(n,t)})},Ls.attr=function(n,t){function r(){this.removeAttribute(a)}function e(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?r:(n+="",function(){var t,r=this.getAttribute(a);return r!==n&&(t=o(r,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?e:(n+="",function(){var t,r=this.getAttributeNS(a.space,a.local);return r!==n&&(t=o(r,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Hu:du,a=Bo.ns.qualify(n);return jo(this,"attr."+n,t,a.local?i:u)},Ls.attrTween=function(n,t){function r(n,r){var e=t.call(this,n,r,this.getAttribute(u));return e&&function(n){this.setAttribute(u,e(n))}}function e(n,r){var e=t.call(this,n,r,this.getAttributeNS(u.space,u.local));return e&&function(n){this.setAttributeNS(u.space,u.local,e(n))}}var u=Bo.ns.qualify(n);return this.tween("attr."+n,u.local?e:r)},Ls.style=function(n,t,r){function e(){this.style.removeProperty(n)}function u(t){return null==t?e:(t+="",function(){var e,u=Qo.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(e=du(u,t),function(t){this.style.setProperty(n,e(t),r)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(r in n)this.style(r,n[r],t);return this}r=""}return jo(this,"style."+n,t,u)},Ls.styleTween=function(n,t,r){function e(e,u){var i=t.call(this,e,u,Qo.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,e)},Ls.text=function(n){return jo(this,"text",n,Ho)},Ls.remove=function(){return this.each("end.transition",function(){var n;this.__transition__.count<2&&(n=this.parentNode)&&n.removeChild(this)})},Ls.ease=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof n&&(n=Bo.ease.apply(Bo,arguments)),P(this,function(r){r.__transition__[t].ease=n}))},Ls.delay=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].delay:P(this,"function"==typeof n?function(r,e,u){r.__transition__[t].delay=+n.call(r,r.__data__,e,u)}:(n=+n,function(r){r.__transition__[t].delay=n}))},Ls.duration=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].duration:P(this,"function"==typeof n?function(r,e,u){r.__transition__[t].duration=Math.max(1,n.call(r,r.__data__,e,u))}:(n=Math.max(1,n),function(r){r.__transition__[t].duration=n}))},Ls.each=function(n,t){var r=this.id;if(arguments.length<2){var e=Cs,u=As;As=r,P(this,function(t,e,u){Cs=t.__transition__[r],n.call(t,t.__data__,e,u)}),Cs=e,As=u}else P(this,function(e){var u=e.__transition__[r];(u.event||(u.event=Bo.dispatch("start","end"))).on(n,t)});return this},Ls.transition=function(){for(var n,t,r,e,u=this.id,i=++Ts,o=[],a=0,c=this.length;c>a;a++){o.push(n=[]);for(var t=this[a],s=0,l=t.length;l>s;s++)(r=t[s])&&(e=Object.create(r.__transition__[u]),e.delay+=e.duration,Fo(r,s,i,e)),n.push(r)}return Uo(o,i)},Bo.svg.axis=function(){function n(n){n.each(function(){var n,s=Bo.select(this),l=this.__chart__||r,f=this.__chart__=r.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):At:t,p=s.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ca),d=Bo.transition(p.exit()).style("opacity",Ca).remove(),m=Bo.transition(p.order()).style("opacity",1),y=Pi(f),x=s.selectAll(".domain").data([0]),M=(x.enter().append("path").attr("class","domain"),Bo.transition(x));v.append("line"),v.append("text");var _=v.select("line"),b=m.select("line"),w=p.select("text").text(g),S=v.select("text"),k=m.select("text");switch(e){case"bottom":n=Oo,_.attr("y2",u),S.attr("y",Math.max(u,0)+o),b.attr("x2",0).attr("y2",u),k.attr("x",0).attr("y",Math.max(u,0)+o),w.attr("dy",".71em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+i+"V0H"+y[1]+"V"+i);break;case"top":n=Oo,_.attr("y2",-u),S.attr("y",-(Math.max(u,0)+o)),b.attr("x2",0).attr("y2",-u),k.attr("x",0).attr("y",-(Math.max(u,0)+o)),w.attr("dy","0em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+-i+"V0H"+y[1]+"V"+-i);break;case"left":n=Io,_.attr("x2",-u),S.attr("x",-(Math.max(u,0)+o)),b.attr("x2",-u).attr("y2",0),k.attr("x",-(Math.max(u,0)+o)).attr("y",0),w.attr("dy",".32em").style("text-anchor","end"),M.attr("d","M"+-i+","+y[0]+"H0V"+y[1]+"H"+-i);break;case"right":n=Io,_.attr("x2",u),S.attr("x",Math.max(u,0)+o),b.attr("x2",u).attr("y2",0),k.attr("x",Math.max(u,0)+o).attr("y",0),w.attr("dy",".32em").style("text-anchor","start"),M.attr("d","M"+i+","+y[0]+"H0V"+y[1]+"H"+i)}if(f.rangeBand){var E=f,A=E.rangeBand()/2;l=f=function(n){return E(n)+A}}else l.rangeBand?l=f:d.call(n,f);v.call(n,l),m.call(n,f)})}var t,r=Bo.scale.linear(),e=qs,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(r=t,n):r},n.orient=function(t){return arguments.length?(e=t in Rs?t+"":qs,n):e},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(r){return arguments.length?(t=r,n):t},n.tickSize=function(t){var r=arguments.length;return r?(u=+t,i=+arguments[r-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var qs="bottom",Rs={top:1,right:1,bottom:1,left:1};Bo.svg.brush=function(){function n(i){i.each(function(){var i=Bo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,At);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Ds[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,f=Bo.transition(i),h=Bo.transition(o);c&&(l=Pi(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Pi(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),e(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+l[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",l[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function e(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==Bo.event.keyCode&&(C||(x=null,z[0]-=l[1],z[1]-=f[1],C=2),y())}function p(){32==Bo.event.keyCode&&2==C&&(z[0]+=l[1],z[1]+=f[1],C=0,y())}function v(){var n=Bo.mouse(_),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),C||(Bo.event.altKey?(x||(x=[(l[0]+l[1])/2,(f[0]+f[1])/2]),z[0]=l[+(n[0]<x[0])],z[1]=f[+(n[1]<x[1])]):x=null),E&&d(n,c,0)&&(r(S),u=!0),A&&d(n,s,1)&&(e(S),u=!0),u&&(t(S),w({type:"brush",mode:C?"move":"resize"}))}function d(n,t,r){var e,u,a=Pi(t),c=a[0],s=a[1],p=z[r],v=r?f:l,d=v[1]-v[0];return C&&(c-=p,s-=d+p),e=(r?g:h)?Math.max(c,Math.min(s,n[r])):n[r],C?u=(e+=p)+d:(x&&(p=Math.max(c,Math.min(s,2*x[r]-e))),e>p?(u=e,e=p):u=p),v[0]!=e||v[1]!=u?(r?o=null:i=null,v[0]=e,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),Bo.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),N(),w({type:"brushend"})}var x,M,_=this,b=Bo.select(Bo.event.target),w=a.of(_,arguments),S=Bo.select(_),k=b.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&s,C=b.classed("extent"),N=Y(),z=Bo.mouse(_),L=Bo.select(Qo).on("keydown.brush",u).on("keyup.brush",p);if(Bo.event.changedTouches?L.on("touchmove.brush",v).on("touchend.brush",m):L.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),C)z[0]=l[0]-z[0],z[1]=f[0]-z[1];else if(k){var T=+/w$/.test(k),q=+/^n/.test(k);M=[l[1-T]-z[0],f[1-q]-z[1]],z[0]=l[T],z[1]=f[q]}else Bo.event.altKey&&(x=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),Bo.select("body").style("cursor",b.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=M(n,"brushstart","brush","brushend"),c=null,s=null,l=[0,0],f=[0,0],h=!0,g=!0,p=Ps[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:l,y:f,i:i,j:o},r=this.__chart__||t;this.__chart__=t,As?Bo.select(this).transition().each("start.brush",function(){i=r.i,o=r.j,l=r.x,f=r.y,n({type:"brushstart"})}).tween("brush:brush",function(){var r=mu(l,t.x),e=mu(f,t.y);return i=o=null,function(u){l=t.x=r(u),f=t.y=e(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Ps[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,p=Ps[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(h=!!t[0],g=!!t[1]):c?h=!!t:s&&(g=!!t),n):c&&s?[h,g]:c?h:s?g:null},n.extent=function(t){var r,e,u,a,h;return arguments.length?(c&&(r=t[0],e=t[1],s&&(r=r[0],e=e[0]),i=[r,e],c.invert&&(r=c(r),e=c(e)),r>e&&(h=r,r=e,e=h),(r!=l[0]||e!=l[1])&&(l=[r,e])),s&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],s.invert&&(u=s(u),a=s(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(r=i[0],e=i[1]):(r=l[0],e=l[1],c.invert&&(r=c.invert(r),e=c.invert(e)),r>e&&(h=r,r=e,e=h))),s&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],s.invert&&(u=s.invert(u),a=s.invert(a)),u>a&&(h=u,u=a,a=h))),c&&s?[[r,u],[e,a]]:c?[r,e]:s&&[u,a])},n.clear=function(){return n.empty()||(l=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&l[0]==l[1]||!!s&&f[0]==f[1]},Bo.rebind(n,a,"on")};var Ds={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ps=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Us=rc.format=cc.timeFormat,js=Us.utc,Hs=js("%Y-%m-%dT%H:%M:%S.%LZ");Us.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Yo:Hs,Yo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Yo.toString=Hs.toString,rc.second=Ht(function(n){return new ec(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),rc.seconds=rc.second.range,rc.seconds.utc=rc.second.utc.range,rc.minute=Ht(function(n){return new ec(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),rc.minutes=rc.minute.range,rc.minutes.utc=rc.minute.utc.range,rc.hour=Ht(function(n){var t=n.getTimezoneOffset()/60;return new ec(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),rc.hours=rc.hour.range,rc.hours.utc=rc.hour.utc.range,rc.month=Ht(function(n){return n=rc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),rc.months=rc.month.range,rc.months.utc=rc.month.utc.range;var Fs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Os=[[rc.second,1],[rc.second,5],[rc.second,15],[rc.second,30],[rc.minute,1],[rc.minute,5],[rc.minute,15],[rc.minute,30],[rc.hour,1],[rc.hour,3],[rc.hour,6],[rc.hour,12],[rc.day,1],[rc.day,2],[rc.week,1],[rc.month,1],[rc.month,3],[rc.year,1]],Is=Us.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ar]]),Ys={range:function(n,t,r){return Bo.range(Math.ceil(n/r)*r,+t,r).map(Vo)},floor:At,ceil:At};Os.year=rc.year,rc.scale=function(){return Zo(Bo.scale.linear(),Os,Is)};var Zs=Os.map(function(n){return[n[0].utc,n[1]]}),Vs=js.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ar]]);Zs.year=rc.year.utc,rc.scale.utc=function(){return Zo(Bo.scale.linear(),Zs,Vs)},Bo.text=Ct(function(n){return n.responseText}),Bo.json=function(n,t){return Nt(n,"application/json",$o,t)},Bo.html=function(n,t){return Nt(n,"text/html",Xo,t)},Bo.xml=Ct(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(Bo):"object"==typeof module&&module.exports?module.exports=Bo:this.d3=Bo}();
\ No newline at end of file
diff --git a/public/js/dagre-d3.min.js b/public/js/dagre-d3.min.js
deleted file mode 100644
index 606fdce..0000000
--- a/public/js/dagre-d3.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var j=typeof require=="function"&&require;if(!h&&j)return j(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}var f=typeof require=="function"&&require;for(var g=0;g<d.length;g++)e(d[g]);return e})({1:[function(a,b,c){var d=self;d.dagreD3=a("./index")},{"./index":2}],2:[function(a,b,c){b.exports={Digraph:a("graphlib").Digraph,Renderer:a("./lib/Renderer"),json:a("graphlib").converter.json,layout:a("dagre").layout,version:a("./lib/version"),debug:a("dagre").debug}},{"./lib/Renderer":3,"./lib/version":4,dagre:11,graphlib:28}],3:[function(a,b,c){function g(){this._layout=d(),this.drawNodes(k),this.drawEdgeLabels(l),this.drawEdgePaths(m),this.positionNodes(n),this.positionEdgeLabels(o),this.positionEdgePaths(p),this.zoomSetup(r),this.zoom(s),this.transition(q),this.postLayout(t),this.postRender(u),this.edgeInterpolate("bundle"),this.edgeTension(.95)}function h(a){var b=a.copy();return b.nodes().forEach(function(a){var c=b.node(a);c===undefined&&(c={},b.node(a,c)),"label"in c||(c.label="")}),b.edges().forEach(function(a){var c=b.edge(a);c===undefined&&(c={},b.edge(a,c)),"label"in c||(c.label="")}),b}function i(a,b){var c=a.getBBox();b.width=c.width,b.height=c.height}function j(a,b){var c=b.run(a);return a.eachNode(function(a,b){c.node(a).label=b.label}),a.eachEdge(function(a,b,d,e){c.edge(a).label=e.label}),c}function k(a,b){var c=a.nodes().filter(function(b){return!B(a,b)}),d=b.selectAll("g.node").classed("enter",!1).data(c,function(a){return a});return d.selectAll("*").remove(),d.enter().append("g").style("opacity",0).attr("class","node enter"),d.each(function(b){v(a.node(b),e.select(this),10,10)}),this._transition(d.exit()).style("opacity",0).remove(),d}function l(a,b){var c=b.selectAll("g.edgeLabel").classed("enter",!1).data(a.edges(),function(a){return a});return c.selectAll("*").remove(),c.enter().append("g").style("opacity",0).attr("class","edgeLabel enter"),c.each(function(b){v(a.edge(b),e.select(this),0,0)}),this._transition(c.exit()).style("opacity",0).remove(),c}function n(a,b){function c(b){var c=a.node(b);return"translate("+c.x+","+c.y+")"}b.filter(".enter").attr("transform",c),this._transition(b).style("opacity",1).attr("transform",c)}function o(a,b){function c(b){var c=a.edge(b),d=z(c.points);return"translate("+d.x+","+d.y+")"}b.filter(".enter").attr("transform",c),this._transition(b).style("opacity",1).attr("transform",c)}function p(a,b){function f(b){var f=a.edge(b),g=a.node(a.incidentNodes(b)[0]),h=a.node(a.incidentNodes(b)[1]),i=f.points.slice(),j=i.length===0?h:i[0],k=i.length===0?g:i[i.length-1];return i.unshift(A(g,j)),i.push(A(h,k)),e.svg.line().x(function(a){return a.x}).y(function(a){return a.y}).interpolate(c).tension(d)(i)}var c=this._edgeInterpolate,d=this._edgeTension;b.filter(".enter").selectAll("path").attr("d",f),this._transition(b.selectAll("path")).attr("d",f).style("opacity",1)}function q(a){return a}function r(a,b){var c=b.property("ownerSVGElement");return c||(c=b),c=e.select(c),c.select("rect.overlay").empty()&&(c.append("rect").attr("class","overlay").attr("width","100%").attr("height","100%").style("fill","none"),b=b.append("g").attr("class","zoom"),this._zoom&&c.call(this._zoom(a,b))),b}function s(a,b){return e.behavior.zoom().on("zoom",function(){b.attr("transform","translate("+e.event.translate+")scale("+e.event.scale+")")})}function t(){}function u(a,b){a.isDirected()&&b.select("#arrowhead").empty()&&b.append("svg:defs").append("svg:marker").attr("id","arrowhead").attr("viewBox","0 0 10 10").attr("refX",8).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",5).attr("orient","auto").attr("style","fill: #333").append("svg:path").attr("d","M 0 0 L 10 5 L 0 10 z")}function v(a,b,c,d){var e=a.label,f=b.append("rect"),g=b.append("g");e[0]==="<"?(w(e,g),c=d=0):x(e,g,Math.floor(a.labelCols),a.labelCut);var h=b.node().getBBox();g.attr("transform","translate("+ -h.width/2+","+ -h.height/2+")"),f.attr("rx",5).attr("ry",5).attr("x",-(h.width/2+c)).attr("y",-(h.height/2+d)).attr("width",h.width+2*c).attr("height",h.height+2*d)}function w(a,b){var c=b.append("foreignObject").attr("width","100000"),d,e;c.append("xhtml:div").style("float","left").html(function(){return a}).each(function(){d=this.clientWidth,e=this.clientHeight}),c.attr("width",d).attr("height",e)}function x(a,b,c,d){d===undefined&&(d="false"),d=d.toString().toLowerCase()==="true";var e=b.append("text").attr("text-anchor","left");a=a.replace(/\\n/g,"\n");var f=c?y(a,c,d):a;f=f.split("\n");for(var g=0;g<f.length;g++)e.append("tspan").attr("dy","1em").attr("x","1").text(f[g])}function y(a,b,c,d){d=d||"\n",b=b||75,c=c||!1;if(!a)return a;var e=".{1,"+b+"}(\\s|$)"+(c?"|.{"+b+"}|.+$":"|\\S+?(\\s|$)");return a.match(new RegExp(e,"g")).join(d)}function z(a){var b=a.length/2;if(a.length%2)return a[Math.floor(b)];var c=a[b-1],d=a[b];return{x:(c.x+d.x)/2,y:(c.y+d.y)/2}}function A(a,b){var c=a.x,d=a.y,e=b.x-c,f=b.y-d,g=a.width/2,h=a.height/2,i,j;return Math.abs(f)*g>Math.abs(e)*h?(f<0&&(h=-h),i=f===0?0:h*e/f,j=h):(e<0&&(g=-g),i=g,j=e===0?0:g*f/e),{x:c+i,y:d+j}}function B(a,b){return"children"in a&&a.children(b).length}function C(a,b){return a.bind?a.bind(b):function(){return a.apply(b,arguments)}}var d=a("dagre").layout,e;try{e=a("d3")}catch(f){e=window.d3}b.exports=g,g.prototype.layout=function(a){return arguments.length?(this._layout=a,this):this._layout},g.prototype.drawNodes=function(a){return arguments.length?(this._drawNodes=C(a,this),this):this._drawNodes},g.prototype.drawEdgeLabels=function(a){return arguments.length?(this._drawEdgeLabels=C(a,this),this):this._drawEdgeLabels},g.prototype.drawEdgePaths=function(a){return arguments.length?(this._drawEdgePaths=C(a,this),this):this._drawEdgePaths},g.prototype.positionNodes=function(a){return arguments.length?(this._positionNodes=C(a,this),this):this._positionNodes},g.prototype.positionEdgeLabels=function(a){return arguments.length?(this._positionEdgeLabels=C(a,this),this):this._positionEdgeLabels},g.prototype.positionEdgePaths=function(a){return arguments.length?(this._positionEdgePaths=C(a,this),this):this._positionEdgePaths},g.prototype.transition=function(a){return arguments.length?(this._transition=C(a,this),this):this._transition},g.prototype.zoomSetup=function(a){return arguments.length?(this._zoomSetup=C(a,this),this):this._zoomSetup},g.prototype.zoom=function(a){return arguments.length?(a?this._zoom=C(a,this):delete this._zoom,this):this._zoom},g.prototype.postLayout=function(a){return arguments.length?(this._postLayout=C(a,this),this):this._postLayout},g.prototype.postRender=function(a){return arguments.length?(this._postRender=C(a,this),this):this._postRender},g.prototype.edgeInterpolate=function(a){return arguments.length?(this._edgeInterpolate=a,this):this._edgeInterpolate},g.prototype.edgeTension=function(a){return arguments.length?(this._edgeTension=a,this):this._edgeTension},g.prototype.run=function(a,b){a=h(a),b=this._zoomSetup(a,b),b.selectAll("g.edgePaths, g.edgeLabels, g.nodes").data(["edgePaths","edgeLabels","nodes"]).enter().append("g").attr("class",function(a){return a});var c=this._drawNodes(a,b.select("g.nodes")),d=this._drawEdgeLabels(a,b.select("g.edgeLabels"));c.each(function(b){i(this,a.node(b))}),d.each(function(b){i(this,a.edge(b))});var e=j(a,this._layout);this._postLayout(e,b);var f=this._drawEdgePaths(a,b.select("g.edgePaths"));return this._positionNodes(e,c),this._positionEdgeLabels(e,d),this._positionEdgePaths(e,f),this._postRender(e,b),e};var m=function(a,b){var c=b.selectAll("g.edgePath").classed("enter",!1).data(a.edges(),function(a){return a});return c.enter().append("g").attr("class","edgePath enter").append("path").style("opacity",0).attr("marker-end","url(#arrowhead)"),this._transition(c.exit()).style("opacity",0).remove(),c}},{d3:10,dagre:11}],4:[function(a,b,c){b.exports="0.2.0"},{}],5:[function(a,b,c){c.Set=a("./lib/Set"),c.PriorityQueue=a("./lib/PriorityQueue"),c.version=a("./lib/version")},{"./lib/PriorityQueue":6,"./lib/Set":7,"./lib/version":9}],6:[function(a,b,c){function d(){this._arr=[],this._keyIndices={}}b.exports=d,d.prototype.size=function(){return this._arr.length},d.prototype.keys=function(){return this._arr.map(function(a){return a.key})},d.prototype.has=function(a){return a in this._keyIndices},d.prototype.priority=function(a){var b=this._keyIndices[a];if(b!==undefined)return this._arr[b].priority},d.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},d.prototype.add=function(a,b){var c=this._keyIndices;if(a in c)return!1;var d=this._arr,e=d.length;return c[a]=e,d.push({key:a,priority:b}),this._decrease(e),!0},d.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var a=this._arr.pop();return delete this._keyIndices[a.key],this._heapify(0),a.key},d.prototype.decrease=function(a,b){var c=this._keyIndices[a];if(b>this._arr[c].priority)throw new Error("New priority is greater than current priority. Key: "+a+" Old: "+this._arr[c].priority+" New: "+b);this._arr[c].priority=b,this._decrease(c)},d.prototype._heapify=function(a){var b=this._arr,c=2*a,d=c+1,e=a;c<b.length&&(e=b[c].priority<b[e].priority?c:e,d<b.length&&(e=b[d].priority<b[e].priority?d:e),e!==a&&(this._swap(a,e),this._heapify(e)))},d.prototype._decrease=function(a){var b=this._arr,c=b[a].priority,d;while(a!==0){d=a>>1;if(b[d].priority<c)break;this._swap(a,d),a=d}},d.prototype._swap=function(a,b){var c=this._arr,d=this._keyIndices,e=c[a],f=c[b];c[a]=f,c[b]=e,d[f.key]=a,d[e.key]=b}},{}],7:[function(a,b,c){function e(a){this._size=0,this._keys={};if(a)for(var b=0,c=a.length;b<c;++b)this.add(a[b])}function f(a){var b=Object.keys(a),c=b.length,d=new Array(c),e;for(e=0;e<c;++e)d[e]=a[b[e]];return d}var d=a("./util");b.exports=e,e.intersect=function(a){if(a.length===0)return new e;var b=new e(d.isArray(a[0])?a[0]:a[0].keys());for(var c=1,f=a.length;c<f;++c){var g=b.keys(),h=d.isArray(a[c])?new e(a[c]):a[c];for(var i=0,j=g.length;i<j;++i){var k=g[i];h.has(k)||b.remove(k)}}return b},e.union=function(a){var b=d.reduce(a,function(a,b){return a+(b.size?b.size():b.length)},0),c=new Array(b),f=0;for(var g=0,h=a.length;g<h;++g){var i=a[g],j=d.isArray(i)?i:i.keys();for(var k=0,l=j.length;k<l;++k)c[f++]=j[k]}return new e(c)},e.prototype.size=function(){return this._size},e.prototype.keys=function(){return f(this._keys)},e.prototype.has=function(a){return a in this._keys},e.prototype.add=function(a){return a in this._keys?!1:(this._keys[a]=a,++this._size,!0)},e.prototype.remove=function(a){return a in this._keys?(delete this._keys[a],--this._size,!0):!1}},{"./util":8}],8:[function(a,b,c){Array.isArray?c.isArray=Array.isArray:c.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"},"function"!=typeof Array.prototype.reduce?c.reduce=function(a,b,c){"use strict";if(null===a||"undefined"==typeof a)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof b)throw new TypeError(b+" is not a function");var d,e,f=a.length>>>0,g=!1;1<arguments.length&&(e=c,g=!0);for(d=0;f>d;++d)a.hasOwnProperty(d)&&(g?e=b(e,a[d],d,a):(e=a[d],g=!0));if(!g)throw new TypeError("Reduce of empty array with no initial value");return e}:c.reduce=function(a,b,c){return a.reduce(b,c)}},{}],9:[function(a,b,c){b.exports="1.1.3"},{}],10:[function(a,b,c){a("./d3"),b.exports=d3,function(){delete this.d3}()},{}],11:[function(a,b,c){c.Digraph=a("graphlib").Digraph,c.Graph=a("graphlib").Graph,c.layout=a("./lib/layout"),c.version=a("./lib/version")},{"./lib/layout":12,"./lib/version":27,graphlib:28}],12:[function(a,b,c){var d=a("./util"),e=a("./rank"),f=a("./order"),g=a("graphlib").CGraph,h=a("graphlib").CDigraph;b.exports=function(){function j(a){var c=new h;a.eachNode(function(a,b){b===undefined&&(b={}),c.addNode(a,{width:b.width,height:b.height}),b.hasOwnProperty("rank")&&(c.node(a).prefRank=b.rank)}),a.parent&&a.nodes().forEach(function(b){c.parent(b,a.parent(b))}),a.eachEdge(function(a,b,d,e){e===undefined&&(e={});var f={e:a,minLen:e.minLen||1,width:e.width||0,height:e.height||0,points:[]};c.addEdge(null,b,d,f)});var d=a.graph()||{};return c.graph({rankDir:d.rankDir||b.rankDir,orderRestarts:d.orderRestarts}),c}function k(a){var g=i.rankSep(),h;try{return h=d.time("initLayoutGraph",j)(a),h.order()===0?h:(h.eachEdge(function(a,b,c,d){d.minLen*=2}),i.rankSep(g/2),d.time("rank.run",e.run)(h,b.rankSimplex),d.time("normalize",l)(h),d.time("order",f)(h,b.orderMaxSweeps),d.time("position",c.run)(h),d.time("undoNormalize",m)(h),d.time("fixupEdgePoints",n)(h),d.time("rank.restoreEdges",e.restoreEdges)(h),d.time("createFinalGraph",o)(h,a.isDirected()))}finally{i.rankSep(g)}}function l(a){var b=0;a.eachEdge(function(c,d,e,f){var g=a.node(d).rank,h=a.node(e).rank;if(g+1<h){for(var i=d,j=g+1,k=0;j<h;++j,++k){var l="_D"+ ++b,m={width:f.width,height:f.height,edge:{id:c,source:d,target:e,attrs:f},rank:j,dummy:!0};k===0?m.index=0:j+1===h&&(m.index=1),a.addNode(l,m),a.addEdge(null,i,l,{}),i=l}a.addEdge(null,i,e,{}),a.delEdge(c)}})}function m(a){a.eachNode(function(b,c){if(c.dummy){if("index"in c){var d=c.edge;a.hasEdge(d.id)||a.addEdge(d.id,d.source,d.target,d.attrs);var e=a.edge(d.id).points;e[c.index]={x:c.x,y:c.y,ul:c.ul,ur:c.ur,dl:c.dl,dr:c.dr}}a.delNode(b)}})}function n(a){a.eachEdge(function(a,b,c,d){d.reversed&&d.points.reverse()})}function o(a,b){var c=b?new h:new g;c.graph(a.graph()),a.eachNode(function(a,b){c.addNode(a,b)}),a.eachNode(function(b){c.parent(b,a.parent(b))}),a.eachEdge(function(a,b,d,e){c.addEdge(e.e,b,d,e)});var d=0,e=0;return a.eachNode(function(b,c){a.children(b).length||(d=Math.max(d,c.x+c.width/2),e=Math.max(e,c.y+c.height/2))}),a.eachEdge(function(a,b,c,f){var g=Math.max.apply(Math,f.points.map(function(a){return a.x})),h=Math.max.apply(Math,f.points.map(function(a){return a.y}));d=Math.max(d,g+f.width/2),e=Math.max(e,h+f.height/2)}),c.graph().width=d,c.graph().height=e,c}function p(a){return function(){return arguments.length?(a.apply(null,arguments),i):a()}}var b={debugLevel:0,orderMaxSweeps:f.DEFAULT_MAX_SWEEPS,rankSimplex:!1,rankDir:"TB"},c=a("./position")(),i={};return i.orderIters=d.propertyAccessor(i,b,"orderMaxSweeps"),i.rankSimplex=d.propertyAccessor(i,b,"rankSimplex"),i.nodeSep=p(c.nodeSep),i.edgeSep=p(c.edgeSep),i.universalSep=p(c.universalSep),i.rankSep=p(c.rankSep),i.rankDir=d.propertyAccessor(i,b,"rankDir"),i.debugAlignment=p(c.debugAlignment),i.debugLevel=d.propertyAccessor(i,b,"debugLevel",function(a){d.log.level=a,c.debugLevel(a)}),i.run=d.time("Total layout",k),i._normalize=l,i}},{"./order":13,"./position":18,"./rank":19,"./util":26,graphlib:28}],13:[function(a,b,c){function k(a,b){function o(){a.eachNode(function(a,b){m[a]=b.order})}arguments.length<2&&(b=j);var c=a.graph().orderRestarts||0,h=f(a);h.forEach(function(b){b=b.filterNodes(function(b){return!a.children(b).length})});var i=0,k,l=Number.MAX_VALUE,m={};for(var p=0;p<Number(c)+1&&l!==0;++p){k=Number.MAX_VALUE,g(a,c>0),d.log(2,"Order phase start cross count: "+a.graph().orderInitCC);var q,r,s;for(q=0,r=0;r<4&&q<b&&k>0;++q,++r,++i)n(a,h,q),s=e(a),s<k&&(r=0,k=s,s<l&&(o(),l=s)),d.log(3,"Order phase start "+p+" iter "+q+" cross count: "+s)}Object.keys(m).forEach(function(b){if(!a.children||!a.children(b).length)a.node(b).order=m[b]}),a.graph().orderCC=l,d.log(2,"Order iterations: "+i),d.log(2,"Order phase best cross count: "+a.graph().orderCC)}function l(a,b){var c={};return b.forEach(function(b){c[b]=a.inEdges(b).map(function(b){return a.node(a.source(b)).order})}),c}function m(a,b){var c={};return b.forEach(function(b){c[b]=a.outEdges(b).map(function(b){return a.node(a.target(b)).order})}),c}function n(a,b,c){c%2===0?o(a,b,c):p(a,b,c)}function o(a,b){var c;for(i=1;i<b.length;++i)c=h(b[i],c,l(a,b[i].nodes()))}function p(a,b){var c;for(i=b.length-2;i>=0;--i)h(b[i],c,m(a,b[i].nodes()))}var d=a("./util"),e=a("./order/crossCount"),f=a("./order/initLayerGraphs"),g=a("./order/initOrder"),h=a("./order/sortLayer");b.exports=k;var j=24;k.DEFAULT_MAX_SWEEPS=j},{"./order/crossCount":14,"./order/initLayerGraphs":15,"./order/initOrder":16,"./order/sortLayer":17,"./util":26}],14:[function(a,b,c){function e(a){var b=0,c=d.ordering(a);for(var e=1;e<c.length;++e)b+=f(a,c[e-1],c[e]);return b}function f(a,b,c){var d=[];b.forEach(function(b){var c=[];a.outEdges(b).forEach(function(b){c.push(a.node(a.target(b)).order)}),c.sort(function(a,b){return a-b}),d=d.concat(c)});var e=1;while(e<c.length)e<<=1;var f=2*e-1;e-=1;var g=[];for(var h=0;h<f;++h)g[h]=0;var i=0;return d.forEach(function(a){var b=a+e;++g[b];while(b>0)b%2&&(i+=g[b+1]),b=b-1>>1,++g[b]}),i}var d=a("../util");b.exports=e},{"../util":26}],15:[function(a,b,c){function f(a){function c(d){if(d===null){a.children(d).forEach(function(a){c(a)});return}var f=a.node(d);f.minRank="rank"in f?f.rank:Number.MAX_VALUE,f.maxRank="rank"in f?f.rank:Number.MIN_VALUE;var h=new e;return a.children(d).forEach(function(b){var d=c(b);h=e.union([h,d]),f.minRank=Math.min(f.minRank,a.node(b).minRank),f.maxRank=Math.max(f.maxRank,a.node(b).maxRank)}),"rank"in f&&h.add(f.rank),h.keys().forEach(function(a){a in b||(b[a]=[]),b[a].push(d)}),h}var b=[];c(null);var f=[];return b.forEach(function(b,c){f[c]=a.filterNodes(d(b))}),f}var d=a("graphlib").filter.nodesFromList,e=a("cp-data").Set;b.exports=f},{"cp-data":5,graphlib:28}],16:[function(a,b,c){function f(a,b){var c=[];a.eachNode(function(b,d){var e=c[d.rank];if(a.children&&a.children(b).length>0)return;e||(e=c[d.rank]=[]),e.push(b)}),c.forEach(function(c){b&&e.shuffle(c),c.forEach(function(b,c){a.node(b).order=c})});var f=d(a);a.graph().orderInitCC=f,a.graph().orderCC=Number.MAX_VALUE}var d=a("./crossCount"),e=a("../util");b.exports=f},{"../util":26,"./crossCount":14}],17:[function(a,b,c){function e(a,b,c){var e=[],f={};a.eachNode(function(a,b){e[b.order]=a;var g=c[a];g.length&&(f[a]=d.sum(g)/g.length)});var g=a.nodes().filter(function(a){return f[a]!==undefined});g.sort(function(b,c){return f[b]-f[c]||a.node(b).order-a.node(c).order});for(var h=0,i=0,j=g.length;i<j;++h)f[e[h]]!==undefined&&(a.node(g[i++]).order=h)}var d=a("../util");b.exports=e},{"../util":26}],18:[function(a,b,c){var d=a("./util");b.exports=function(){function c(b){b=b.filterNodes(d.filterNonSubgraphs(b));var c=d.ordering(b),e=f(b,c),i={};["u","d"].forEach(function(d){d==="d"&&c.reverse(),["l","r"].forEach(function(f){f==="r"&&m(c);var j=d+f,k=g(b,c,e,d==="u"?"predecessors":"successors");i[j]=h(b,c,k.pos,k.root,k.align),a.debugLevel>=3&&t(d+f,b,c,i[j]),f==="r"&&l(i[j]),f==="r"&&m(c)}),d==="d"&&c.reverse()}),k(b,c,i),b.eachNode(function(a){var c=[];for(var d in i){var e=i[d][a];r(d,b,a,e),c.push(e)}c.sort(function(a,b){return a-b}),q(b,a,(c[1]+c[2])/2)});var j=0,p=b.graph().rankDir==="BT"||b.graph().rankDir==="RL";c.forEach(function(c){var e=d.max(c.map(function(a){return o(b,a)}));j+=e/2,c.forEach(function(a){s(b,a,p?-j:j)}),j+=e/2+a.rankSep});var u=d.min(b.nodes().map(function(a){return q(b,a)-n(b,a)/2})),v=d.min(b.nodes().map(function(a){return s(b,a)-o(b,a)/2}));b.eachNode(function(a){q(b,a,q(b,a)-u),s(b,a,s(b,a)-v)})}function e(a,b){return a<b?a.toString().length+":"+a+"-"+b:b.toString().length+":"+b+"-"+a}function f(a,b){function k(a){var b=d[a];if(b<h||b>j)c[e(g[i],a)]=!0}var c={},d={},f,g,h,i,j;if(b.length<=2)return c;b[1].forEach(function(a,b){d[a]=b});for(var l=1;l<b.length-1;++l){f=b[l],g=b[l+1],h=0,i=0;for(var m=0;m<g.length;++m){var n=g[m];d[n]=m,j=undefined;if(a.node(n).dummy){var o=a.predecessors(n)[0];o!==undefined&&a.node(o).dummy&&(j=d[o])}j===undefined&&m===g.length-1&&(j=f.length-1);if(j!==undefined){for(;i<=m;++i)a.predecessors(g[i]).forEach(k);h=j}}}return c}function g(a,b,c,d){var f={},g={},h={};return b.forEach(function(a){a.forEach(function(a,b){g[a]=a,h[a]=a,f[a]=b})}),b.forEach(function(b){var i=-1;b.forEach(function(b){var j=a[d](b),k;j.length>0&&(j.sort(function(a,b){return f[a]-f[b]}),k=(j.length-1)/2,j.slice(Math.floor(k),Math.ceil(k)+1).forEach(function(a){h[b]===b&&!c[e(a,b)]&&i<f[a]&&(h[a]=b,h[b]=g[b]=g[a],i=f[a])}))})}),{pos:f,root:g,align:h}}function h(a,b,c,e,f){function l(a,b,c){b in h[a]?h[a][b]=Math.min(h[a][b],c):h[a][b]=c}function m(b){if(!(b in k)){k[b]=0;var d=b;do{if(c[d]>0){var h=e[j[d]];m(h),g[b]===b&&(g[b]=g[h]);var i=p(a,j[d])+p(a,d);g[b]!==g[h]?l(g[h],g[b],k[b]-k[h]-i):k[b]=Math.max(k[b],k[h]+i)}d=f[d]}while(d!==b)}}var g={},h={},i={},j={},k={};return b.forEach(function(a){a.forEach(function(b,c){g[b]=b,h[b]={},c>0&&(j[b]=a[c-1])})}),d.values(e).forEach(function(a){m(a)}),b.forEach(function(a){a.forEach(function(a){k[a]=k[e[a]];if(a===e[a]&&a===g[a]){var b=0;a in h&&Object.keys(h[a]).length>0&&(b=d.min(Object.keys(h[a]).map(function(b){return h[a][b]+(b in i?i[b]:0)}))),i[a]=b}})}),b.forEach(function(a){a.forEach(function(a){k[a]+=i[g[e[a]]]||0})}),k}function i(a,b,c){return d.min(b.map(function(a){var b=a[0];return c[b]}))}function j(a,b,c){return d.max(b.map(function(a){var b=a[a.length-1];return c[b]}))}function k(a,b,c){function h(a){c[l][a]+=g[l]}var d={},e={},f,g={},k=Number.POSITIVE_INFINITY;for(var l in c){var m=c[l];d[l]=i(a,b,m),e[l]=j(a,b,m);var n=e[l]-d[l];n<k&&(k=n,f=l)}["u","d"].forEach(function(a){["l","r"].forEach(function(b){var c=a+b;g[c]=b==="l"?d[f]-d[c]:e[f]-e[c]})});for(l in c)a.eachNode(h)}function l(a){for(var b in a)a[b]=-a[b]}function m(a){a.forEach(function(a){a.reverse()})}function n(a,b){switch(a.graph().rankDir){case"LR":return a.node(b).height;case"RL":return a.node(b).height;default:return a.node(b).width}}function o(a,b){switch(a.graph().rankDir){case"LR":return a.node(b).width;case"RL":return a.node(b).width;default:return a.node(b).height}}function p(b,c){if(a.universalSep!==null)return a.universalSep;var d=n(b,c),e=b.node(c).dummy?a.edgeSep:a.nodeSep;return(d+e)/2}function q(a,b,c){if(a.graph().rankDir==="LR"||a.graph().rankDir==="RL"){if(arguments.length<3)return a.node(b).y;a.node(b).y=c}else{if(arguments.length<3)return a.node(b).x;a.node(b).x=c}}function r(a,b,c,d){if(b.graph().rankDir==="LR"||b.graph().rankDir==="RL"){if(arguments.length<3)return b.node(c)[a];b.node(c)[a]=d}else{if(arguments.length<3)return b.node(c)[a];b.node(c)[a]=d}}function s(a,b,c){if(a.graph().rankDir==="LR"||a.graph().rankDir==="RL"){if(arguments.length<3)return a.node(b).x;a.node(b).x=c}else{if(arguments.length<3)return a.node(b).y;a.node(b).y=c}}function t(a,b,c,d){c.forEach(function(c,e){var f,g;c.forEach(function(c){var h=d[c];if(f){var i=p(b,f)+p(b,c);h-g<i&&console.log("Position phase: sep violation. Align: "+a+". Layer: "+e+". "+"U: "+f+" V: "+c+". Actual sep: "+(h-g)+" Expected sep: "+i)}f=c,g=h})})}var a={nodeSep:50,edgeSep:10,universalSep:null,rankSep:30},b={};return b.nodeSep=d.propertyAccessor(b,a,"nodeSep"),b.edgeSep=d.propertyAccessor(b,a,"edgeSep"),b.universalSep=d.propertyAccessor(b,a,"universalSep"),b.rankSep=d.propertyAccessor(b,a,"rankSep"),b.debugLevel=d.propertyAccessor(b,a,"debugLevel"),b.run=c,b}},{"./util":26}],19:[function(a,b,c){function l(a,b){n(a),d.time("constraints.apply",h.apply)(a),o(a),d.time("acyclic",e)(a);var c=a.filterNodes(d.filterNonSubgraphs(a));f(c),j(c).forEach(function(a){var d=c.filterNodes(k.nodesFromList(a));r(d,b)}),d.time("constraints.relax",h.relax(a)),d.time("reorientEdges",q)(a)}function m(a){e.undo(a)}function n(a){a.eachEdge(function(b,c,d,e){if(c===d){var f=p(a,b,c,d,e,0,!1),g=p(a,b,c,d,e,1,!0),h=p(a,b,c,d,e,2,!1);a.addEdge(null,f,c,{minLen:1,selfLoop:!0}),a.addEdge(null,f,g,{minLen:1,selfLoop:!0}),a.addEdge(null,c,h,{minLen:1,selfLoop:!0}),a.addEdge(null,g,h,{minLen:1,selfLoop:!0}),a.delEdge(b)}})}function o(a){a.eachEdge(function(b,c,d,e){if(c===d){var f=e.originalEdge,g=p(a,f.e,f.u,f.v,f.value,0,!0);a.addEdge(null,c,g,{minLen:1}),a.addEdge(null,g,d,{minLen:1}),a.delEdge(b)}})}function p(a,b,c,d,e,f,g){return a.addNode(null,{width:g?e.width:0,height:g?e.height:0,edge:{id:b,source:c,target:d,attrs:e},dummy:!0,index:f})}function q(a){a.eachEdge(function(b,c,d,e){a.node(c).rank>a.node(d).rank&&(a.delEdge(b),e.reversed=!0,a.addEdge(b,d,c,e))})}function r(a,b){var c=g(a);b&&(d.log(1,"Using network simplex for ranking"),i(a,c)),s(a)}function s(a){var b=d.min(a.nodes().map(function(b){return a.node(b).rank}));a.eachNode(function(a,c){c.rank-=b})}var d=a("./util"),e=a("./rank/acyclic"),f=a("./rank/initRank"),g=a("./rank/feasibleTree"),h=a("./rank/constraints"),i=a("./rank/simplex"),j=a("graphlib").alg.components,k=a("graphlib").filter;c.run=l,c.restoreEdges=m},{"./rank/acyclic":20,"./rank/constraints":21,"./rank/feasibleTree":22,"./rank/initRank":23,"./rank/simplex":25,"./util":26,graphlib:28}],20:[function(a,b,c){function e(a){function f(d){if(d in c)return;c[d]=b[d]=!0,a.outEdges(d).forEach(function(c){var h=a.target(c),i;d===h?console.error('Warning: found self loop "'+c+'" for node "'+d+'"'):h in b?(i=a.edge(c),a.delEdge(c),i.reversed=!0,++e,a.addEdge(c,h,d,i)):f(h)}),delete b[d]}var b={},c={},e=0;return a.eachNode(function(a){f(a)}),d.log(2,"Acyclic Phase: reversed "+e+" edge(s)"),e}function f(a){a.eachEdge(function(b,c,d,e){e.reversed&&(delete e.reversed,a.delEdge(b),a.addEdge(b,d,c,e))})}var d=a("../util");b.exports=e,b.exports.undo=f},{"../util":26}],21:[function(a,b,c){function d(a){return a!=="min"&&a!=="max"&&a.indexOf("same_")!==0?(console.error("Unsupported rank type: "+a),!1):!0}function e(a,b,c,d){a.inEdges(b).forEach(function(b){var e=a.edge(b),f;e.originalEdge?f=e:f={originalEdge:{e:b,u:a.source(b),v:a.target(b),value:e},minLen:a.edge(b).minLen},e.selfLoop&&(d=!1),d?(a.addEdge(null,c,a.source(b),f),f.reversed=!0):a.addEdge(null,a.source(b),c,f)})}function f(a,b,c,d){a.outEdges(b).forEach(function(b){var e=a.edge(b),f;e.originalEdge?f=e:f={originalEdge:{e:b,u:a.source(b),v:a.target(b),value:e},minLen:a.edge(b).minLen},e.selfLoop&&(d=!1),d?(a.addEdge(null,a.target(b),c,f),f.reversed=!0):a.addEdge(null,c,a.target(b),f)})}function g(a,b,c){c!==undefined&&a.children(b).forEach(function(b){b!==c&&!a.outEdges(c,b).length&&!a.node(b).dummy&&a.addEdge(null,c,b,{minLen:0})})}function h(a,b,c){c!==undefined&&a.children(b).forEach(function(b){b!==c&&!a.outEdges(b,c).length&&!a.node(b).dummy&&a.addEdge(null,b,c,{minLen:0})})}c.apply=function(a){function b(c){var i={};a.children(c).forEach(function(g){if(a.children(g).length){b(g);return}var h=a.node(g),j=h.prefRank;if(j!==undefined){if(!d(j))return;j in i?i.prefRank.push(g):i.prefRank=[g];var k=i[j];k===undefined&&(k=i[j]=a.addNode(null,{originalNodes:[]}),a.parent(k,c)),e(a,g,k,j==="min"),f(a,g,k,j==="max"),a.node(k).originalNodes.push({u:g,value:h,parent:c}),a.delNode(g)}}),g(a,c,i.min),h(a,c,i.max)}b(null)},c.relax=function(a){var b=[];a.eachEdge(function(a,c,d,e){var f=e.originalEdge;f&&b.push(f)}),a.eachNode(function(b,c){var d=c.originalNodes;d&&(d.forEach(function(b){b.value.rank=c.rank,a.addNode(b.u,b.value),a.parent(b.u,b.parent)}),a.delNode(b))}),b.forEach(function(b){a.addEdge(b.e,b.u,b.v,b.value)})}},{}],22:[function(a,b,c){function g(a){function g(d){var e=!0;return a.predecessors(d).forEach(function(f){b.has(f)&&!h(a,f,d)&&(b.has(d)&&(c.addNode(d,{}),b.remove(d),c.graph({root:d})),c.addNode(f,{}),c.addEdge(null,f,d,{reversed:!0}),b.remove(f),g(f),e=!1)}),a.successors(d).forEach(function(f){b.has(f)&&!h(a,d,f)&&(b.has(d)&&(c.addNode(d,{}),b.remove(d),c.graph({root:d})),c.addNode(f,{}),c.addEdge(null,d,f,{}),b.remove(f),g(f),e=!1)}),e}function i(){var d=Number.MAX_VALUE;b.keys().forEach(function(c){a.predecessors(c).forEach(function(e){if(!b.has(e)){var f=h(a,e,c);Math.abs(f)<Math.abs(d)&&(d=-f)}}),a.successors(c).forEach(function(e){if(!b.has(e)){var f=h(a,c,e);Math.abs(f)<Math.abs(d)&&(d=f)}})}),c.eachNode(function(b){a.node(b).rank-=d})}var b=new d(a.nodes()),c=new e;if(b.size()===1){var f=a.nodes()[0];return c.addNode(f,{}),c.graph({root:f}),c}while(b.size()){var j=c.order()?c.nodes():b.keys();for(var k=0,l=j.length;k<l&&g(j[k]);++k);b.size()&&i()}return c}function h(a,b,c){var d=a.node(c).rank-a.node(b).rank,e=f.max(a.outEdges(b,c).map(function(b){return a.edge(b).minLen}));return d-e}var d=a("cp-data").Set,e=a("graphlib").Digraph,f=a("../util");b.exports=g},{"../util":26,"cp-data":5,graphlib:28}],23:[function(a,b,c){function f(a){var b=e(a);b.forEach(function(b){var c=a.inEdges(b);if(c.length===0){a.node(b).rank=0;return}var e=c.map(function(b){return a.node(a.source(b)).rank+a.edge(b).minLen});a.node(b).rank=d.max(e)})}var d=a("../util"),e=a("graphlib").alg.topsort;b.exports=f},{"../util":26,graphlib:28}],24:[function(a,b,c){function d(a,b,c,d){return Math.abs(a.node(b).rank-a.node(c).rank)-d}b.exports={slack:d}},{}],25:[function(a,b,c){function f(a,b){g(a,b);for(;;){var c=k(b);if(c===null)break;var d=l(a,b,c);m(a,b,c,d)}}function g(a,b){function c(d){var e=b.successors(d);for(var f in e){var g=e[f];c(g)}d!==b.graph().root&&i(a,b,d)}h(b),b.eachEdge(function(a,b,c,d){d.cutValue=0}),c(b.graph().root)}function h(a){function c(d){var e=a.successors(d),f=b;for(var g in e){var h=e[g];c(h),f=Math.min(f,a.node(h).low)}a.node(d).low=f,a.node(d).lim=b++}var b=0;c(a.graph().root)}function i(a,b,c){var d=b.inEdges(c)[0],e=[],f=b.outEdges(c);for(var g in f)e.push(b.target(f[g]));var h=0,i=0,k=0,l=0,m=0,n=a.outEdges(c),o;for(var p in n){var q=a.target(n[p]);for(o in e)j(b,q,e[o])&&i++;j(b,q,c)||l++}var r=a.inEdges(c);for(var s in r){var t=a.source(r[s]);for(o in e)j(b,t,e[o])&&k++;j(b,t,c)||m++}var u=0;for(o in e){var v=b.edge(f[o]).cutValue;b.edge(f[o]).reversed?u-=v:u+=v}b.edge(d).reversed?h-=u-i+k-l+m:h+=u-i+k-l+m,b.edge(d).cutValue=h}function j(a,b,c){return a.node(c).low<=a.node(b).lim&&a.node(b).lim<=a.node(c).lim}function k(a){var b=a.edges();for(var c in b){var d=b[c],e=a.edge(d);if(e.cutValue<0)return d}return null}function l(a,b,c){var d=b.source(c),f=b.target(c),g=b.node(f).lim<b.node(d).lim?f:d,h=!b.edge(c).reversed,i=Number.POSITIVE_INFINITY,k;h?a.eachEdge(function(d,f,h,l){if(d!==c&&j(b,f,g)&&!j(b,h,g)){var m=e.slack(a,f,h,l.minLen);m<i&&(i=m,k=d)}}):a.eachEdge(function(d,f,h,l){if(d!==c&&!j(b,f,g)&&j(b,h,g)){var m=e.slack(a,f,h,l.minLen);m<i&&(i=m,k=d)}});if(k===undefined){var l=[],m=[];throw a.eachNode(function(a){j(b,a,g)?m.push(a):l.push(a)}),new Error("No edge found from outside of tree to inside")}return k}function m(a,b,c,d){function h(a){var c=b.inEdges(a);for(var d in c){var e=c[d],f=b.source(e),g=b.edge(e);h(f),b.delEdge(e),g.reversed=!g.reversed,b.addEdge(e,a,f,g)}}b.delEdge(c);var e=a.source(d),f=a.target(d);h(f);var i=e,j=b.inEdges(i);while(j.length>0)i=b.source(j[0]),j=b.inEdges(i);b.graph().root=i,b.addEdge(null,e,f,{cutValue:0}),g(a,b),n(a,b)}function n(a,b){function c(d){var e=b.successors(d);e.forEach(function(b){var e=o(a,d,b);a.node(b).rank=a.node(d).rank+e,c(b)})}c(b.graph().root)}function o(a,b,c){var e=a.outEdges(b,c);if(e.length>0)return d.max(e.map(function(b){return a.edge(b).minLen}));var f=a.inEdges(b,c);if(f.length>0)return-d.max(f.map(function(b){return a.edge(b).minLen}))}var d=a("../util"),e=a("./rankUtil");b.exports=f},{"../util":26,"./rankUtil":24}],26:[function(a,b,c){function d(a,b){return function(){var c=(new Date).getTime();try{return b.apply(null,arguments)}finally{e(1,a+" time: "+((new Date).getTime()-c)+"ms")}}}function e(a){e.level>=a&&console.log.apply(console,Array.prototype.slice.call(arguments,1))}c.min=function(a){return Math.min.apply(Math,a)},c.max=function(a){return Math.max.apply(Math,a)},c.all=function(a,b){for(var c=0;c<a.length;++c)if(!b(a[c]))return!1;return!0},c.sum=function(a){return a.reduce(function(a,b){return a+b},0)},c.values=function(a){return Object.keys(a).map(function(b){return a[b]})},c.shuffle=function(a){for(i=a.length-1;i>0;--i){var b=Math.floor(Math.random()*(i+1)),c=a[b];a[b]=a[i],a[i]=c}},c.propertyAccessor=function(a,b,c,d){return function(e){return arguments.length?(b[c]=e,d&&d(e),a):b[c]}},c.ordering=function(a){var b=[];return a.eachNode(function(a,c){var d=b[c.rank]||(b[c.rank]=[]);d[c.order]=a}),b},c.filterNonSubgraphs=function(a){return function(b){return a.children(b).length===0}},d.enabled=!1,c.time=d,e.level=0,c.log=e},{}],27:[function(a,b,c){b.exports="0.4.5"},{}],28:[function(a,b,c){c.Graph=a("./lib/Graph"),c.Digraph=a("./lib/Digraph"),c.CGraph=a("./lib/CGraph"),c.CDigraph=a("./lib/CDigraph"),a("./lib/graph-converters"),c.alg={isAcyclic:a("./lib/alg/isAcyclic"),components:a("./lib/alg/components"),dijkstra:a("./lib/alg/dijkstra"),dijkstraAll:a("./lib/alg/dijkstraAll"),findCycles:a("./lib/alg/findCycles"),floydWarshall:a("./lib/alg/floydWarshall"),postorder:a("./lib/alg/postorder"),preorder:a("./lib/alg/preorder"),prim:a("./lib/alg/prim"),tarjan:a("./lib/alg/tarjan"),topsort:a("./lib/alg/topsort"
-)},c.converter={json:a("./lib/converter/json.js")};var d=a("./lib/filter");c.filter={all:d.all,nodesFromList:d.nodesFromList},c.version=a("./lib/version")},{"./lib/CDigraph":30,"./lib/CGraph":31,"./lib/Digraph":32,"./lib/Graph":33,"./lib/alg/components":34,"./lib/alg/dijkstra":35,"./lib/alg/dijkstraAll":36,"./lib/alg/findCycles":37,"./lib/alg/floydWarshall":38,"./lib/alg/isAcyclic":39,"./lib/alg/postorder":40,"./lib/alg/preorder":41,"./lib/alg/prim":42,"./lib/alg/tarjan":43,"./lib/alg/topsort":44,"./lib/converter/json.js":46,"./lib/filter":47,"./lib/graph-converters":48,"./lib/version":50}],29:[function(a,b,c){function e(){this._value=undefined,this._nodes={},this._edges={},this._nextId=0}function f(a,b,c){(a[b]||(a[b]=new d)).add(c)}function g(a,b,c){var d=a[b];d.remove(c),d.size()===0&&delete a[b]}var d=a("cp-data").Set;b.exports=e,e.prototype.order=function(){return Object.keys(this._nodes).length},e.prototype.size=function(){return Object.keys(this._edges).length},e.prototype.graph=function(a){if(arguments.length===0)return this._value;this._value=a},e.prototype.hasNode=function(a){return a in this._nodes},e.prototype.node=function(a,b){var c=this._strictGetNode(a);if(arguments.length===1)return c.value;c.value=b},e.prototype.nodes=function(){var a=[];return this.eachNode(function(b){a.push(b)}),a},e.prototype.eachNode=function(a){for(var b in this._nodes){var c=this._nodes[b];a(c.id,c.value)}},e.prototype.hasEdge=function(a){return a in this._edges},e.prototype.edge=function(a,b){var c=this._strictGetEdge(a);if(arguments.length===1)return c.value;c.value=b},e.prototype.edges=function(){var a=[];return this.eachEdge(function(b){a.push(b)}),a},e.prototype.eachEdge=function(a){for(var b in this._edges){var c=this._edges[b];a(c.id,c.u,c.v,c.value)}},e.prototype.incidentNodes=function(a){var b=this._strictGetEdge(a);return[b.u,b.v]},e.prototype.addNode=function(a,b){if(a===undefined||a===null){do a="_"+ ++this._nextId;while(this.hasNode(a))}else if(this.hasNode(a))throw new Error("Graph already has node '"+a+"'");return this._nodes[a]={id:a,value:b},a},e.prototype.delNode=function(a){this._strictGetNode(a),this.incidentEdges(a).forEach(function(a){this.delEdge(a)},this),delete this._nodes[a]},e.prototype._addEdge=function(a,b,c,d,e,g){this._strictGetNode(b),this._strictGetNode(c);if(a===undefined||a===null){do a="_"+ ++this._nextId;while(this.hasEdge(a))}else if(this.hasEdge(a))throw new Error("Graph already has edge '"+a+"'");return this._edges[a]={id:a,u:b,v:c,value:d},f(e[c],b,a),f(g[b],c,a),a},e.prototype._delEdge=function(a,b,c){var d=this._strictGetEdge(a);g(b[d.v],d.u,a),g(c[d.u],d.v,a),delete this._edges[a]},e.prototype.copy=function(){var a=new this.constructor;return a.graph(this.graph()),this.eachNode(function(b,c){a.addNode(b,c)}),this.eachEdge(function(b,c,d,e){a.addEdge(b,c,d,e)}),a._nextId=this._nextId,a},e.prototype.filterNodes=function(a){var b=new this.constructor;return b.graph(this.graph()),this.eachNode(function(c,d){a(c)&&b.addNode(c,d)}),this.eachEdge(function(a,c,d,e){b.hasNode(c)&&b.hasNode(d)&&b.addEdge(a,c,d,e)}),b},e.prototype._strictGetNode=function(a){var b=this._nodes[a];if(b===undefined)throw new Error("Node '"+a+"' is not in graph");return b},e.prototype._strictGetEdge=function(a){var b=this._edges[a];if(b===undefined)throw new Error("Edge '"+a+"' is not in graph");return b}},{"cp-data":5}],30:[function(a,b,c){var d=a("./Digraph"),e=a("./compoundify"),f=e(d);b.exports=f,f.fromDigraph=function(a){var b=new f,c=a.graph();return c!==undefined&&b.graph(c),a.eachNode(function(a,c){c===undefined?b.addNode(a):b.addNode(a,c)}),a.eachEdge(function(a,c,d,e){e===undefined?b.addEdge(null,c,d):b.addEdge(null,c,d,e)}),b},f.prototype.toString=function(){return"CDigraph "+JSON.stringify(this,null,2)}},{"./Digraph":32,"./compoundify":45}],31:[function(a,b,c){var d=a("./Graph"),e=a("./compoundify"),f=e(d);b.exports=f,f.fromGraph=function(a){var b=new f,c=a.graph();return c!==undefined&&b.graph(c),a.eachNode(function(a,c){c===undefined?b.addNode(a):b.addNode(a,c)}),a.eachEdge(function(a,c,d,e){e===undefined?b.addEdge(null,c,d):b.addEdge(null,c,d,e)}),b},f.prototype.toString=function(){return"CGraph "+JSON.stringify(this,null,2)}},{"./Graph":33,"./compoundify":45}],32:[function(a,b,c){function g(){e.call(this),this._inEdges={},this._outEdges={}}var d=a("./util"),e=a("./BaseGraph"),f=a("cp-data").Set;b.exports=g,g.prototype=new e,g.prototype.constructor=g,g.prototype.isDirected=function(){return!0},g.prototype.successors=function(a){return this._strictGetNode(a),Object.keys(this._outEdges[a]).map(function(a){return this._nodes[a].id},this)},g.prototype.predecessors=function(a){return this._strictGetNode(a),Object.keys(this._inEdges[a]).map(function(a){return this._nodes[a].id},this)},g.prototype.neighbors=function(a){return f.union([this.successors(a),this.predecessors(a)]).keys()},g.prototype.sources=function(){var a=this;return this._filterNodes(function(b){return a.inEdges(b).length===0})},g.prototype.sinks=function(){var a=this;return this._filterNodes(function(b){return a.outEdges(b).length===0})},g.prototype.source=function(a){return this._strictGetEdge(a).u},g.prototype.target=function(a){return this._strictGetEdge(a).v},g.prototype.inEdges=function(a,b){this._strictGetNode(a);var c=f.union(d.values(this._inEdges[a])).keys();return arguments.length>1&&(this._strictGetNode(b),c=c.filter(function(a){return this.source(a)===b},this)),c},g.prototype.outEdges=function(a,b){this._strictGetNode(a);var c=f.union(d.values(this._outEdges[a])).keys();return arguments.length>1&&(this._strictGetNode(b),c=c.filter(function(a){return this.target(a)===b},this)),c},g.prototype.incidentEdges=function(a,b){return arguments.length>1?f.union([this.outEdges(a,b),this.outEdges(b,a)]).keys():f.union([this.inEdges(a),this.outEdges(a)]).keys()},g.prototype.toString=function(){return"Digraph "+JSON.stringify(this,null,2)},g.prototype.addNode=function(a,b){return a=e.prototype.addNode.call(this,a,b),this._inEdges[a]={},this._outEdges[a]={},a},g.prototype.delNode=function(a){e.prototype.delNode.call(this,a),delete this._inEdges[a],delete this._outEdges[a]},g.prototype.addEdge=function(a,b,c,d){return e.prototype._addEdge.call(this,a,b,c,d,this._inEdges,this._outEdges)},g.prototype.delEdge=function(a){e.prototype._delEdge.call(this,a,this._inEdges,this._outEdges)},g.prototype._filterNodes=function(a){var b=[];return this.eachNode(function(c){a(c)&&b.push(c)}),b}},{"./BaseGraph":29,"./util":49,"cp-data":5}],33:[function(a,b,c){function g(){e.call(this),this._incidentEdges={}}var d=a("./util"),e=a("./BaseGraph"),f=a("cp-data").Set;b.exports=g,g.prototype=new e,g.prototype.constructor=g,g.prototype.isDirected=function(){return!1},g.prototype.neighbors=function(a){return this._strictGetNode(a),Object.keys(this._incidentEdges[a]).map(function(a){return this._nodes[a].id},this)},g.prototype.incidentEdges=function(a,b){return this._strictGetNode(a),arguments.length>1?(this._strictGetNode(b),b in this._incidentEdges[a]?this._incidentEdges[a][b].keys():[]):f.union(d.values(this._incidentEdges[a])).keys()},g.prototype.toString=function(){return"Graph "+JSON.stringify(this,null,2)},g.prototype.addNode=function(a,b){return a=e.prototype.addNode.call(this,a,b),this._incidentEdges[a]={},a},g.prototype.delNode=function(a){e.prototype.delNode.call(this,a),delete this._incidentEdges[a]},g.prototype.addEdge=function(a,b,c,d){return e.prototype._addEdge.call(this,a,b,c,d,this._incidentEdges,this._incidentEdges)},g.prototype.delEdge=function(a){e.prototype._delEdge.call(this,a,this._incidentEdges,this._incidentEdges)}},{"./BaseGraph":29,"./util":49,"cp-data":5}],34:[function(a,b,c){function e(a){function e(b,d){c.has(b)||(c.add(b),d.push(b),a.neighbors(b).forEach(function(a){e(a,d)}))}var b=[],c=new d;return a.nodes().forEach(function(a){var c=[];e(a,c),c.length>0&&b.push(c)}),b}var d=a("cp-data").Set;b.exports=e},{"cp-data":5}],35:[function(a,b,c){function e(a,b,c,e){function h(b){var d=a.incidentNodes(b),e=d[0]!==i?d[0]:d[1],h=f[e],k=c(b),l=j.distance+k;if(k<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+b+" Weight: "+k);l<h.distance&&(h.distance=l,h.predecessor=i,g.decrease(e,l))}var f={},g=new d;c=c||function(){return 1},e=e||(a.isDirected()?function(b){return a.outEdges(b)}:function(b){return a.incidentEdges(b)}),a.eachNode(function(a){var c=a===b?0:Number.POSITIVE_INFINITY;f[a]={distance:c},g.add(a,c)});var i,j;while(g.size()>0){i=g.removeMin(),j=f[i];if(j.distance===Number.POSITIVE_INFINITY)break;e(i).forEach(h)}return f}var d=a("cp-data").PriorityQueue;b.exports=e},{"cp-data":5}],36:[function(a,b,c){function e(a,b,c){var e={};return a.eachNode(function(f){e[f]=d(a,f,b,c)}),e}var d=a("./dijkstra");b.exports=e},{"./dijkstra":35}],37:[function(a,b,c){function e(a){return d(a).filter(function(a){return a.length>1})}var d=a("./tarjan");b.exports=e},{"./tarjan":43}],38:[function(a,b,c){function d(a,b,c){var d={},e=a.nodes();return b=b||function(){return 1},c=c||(a.isDirected()?function(b){return a.outEdges(b)}:function(b){return a.incidentEdges(b)}),e.forEach(function(f){d[f]={},d[f][f]={distance:0},e.forEach(function(a){f!==a&&(d[f][a]={distance:Number.POSITIVE_INFINITY})}),c(f).forEach(function(c){var e=a.incidentNodes(c),h=e[0]!==f?e[0]:e[1],i=b(c);i<d[f][h].distance&&(d[f][h]={distance:i,predecessor:f})})}),e.forEach(function(a){var b=d[a];e.forEach(function(c){var f=d[c];e.forEach(function(c){var d=f[a],e=b[c],g=f[c],h=d.distance+e.distance;h<g.distance&&(g.distance=h,g.predecessor=e.predecessor)})})}),d}b.exports=d},{}],39:[function(a,b,c){function e(a){try{d(a)}catch(b){if(b instanceof d.CycleException)return!1;throw b}return!0}var d=a("./topsort");b.exports=e},{"./topsort":44}],40:[function(a,b,c){function e(a,b,c){function f(b,d){if(e.has(b))throw new Error("The input graph is not a tree: "+a);e.add(b),a.neighbors(b).forEach(function(a){a!==d&&f(a,b)}),c(b)}var e=new d;if(a.isDirected())throw new Error("This function only works for undirected graphs");f(b)}var d=a("cp-data").Set;b.exports=e},{"cp-data":5}],41:[function(a,b,c){function e(a,b,c){function f(b,d){if(e.has(b))throw new Error("The input graph is not a tree: "+a);e.add(b),c(b),a.neighbors(b).forEach(function(a){a!==d&&f(a,b)})}var e=new d;if(a.isDirected())throw new Error("This function only works for undirected graphs");f(b)}var d=a("cp-data").Set;b.exports=e},{"cp-data":5}],42:[function(a,b,c){function f(a,b){function i(c){var d=a.incidentNodes(c),e=d[0]!==h?d[0]:d[1],i=g.priority(e);if(i!==undefined){var j=b(c);j<i&&(f[e]=h,g.decrease(e,j))}}var c=new d,f={},g=new e,h;if(a.order()===0)return c;a.eachNode(function(a){g.add(a,Number.POSITIVE_INFINITY),c.addNode(a)}),g.decrease(a.nodes()[0],0);var j=!1;while(g.size()>0){h=g.removeMin();if(h in f)c.addEdge(null,h,f[h]);else{if(j)throw new Error("Input graph is not connected: "+a);j=!0}a.incidentEdges(h).forEach(i)}return c}var d=a("../Graph"),e=a("cp-data").PriorityQueue;b.exports=f},{"../Graph":33,"cp-data":5}],43:[function(a,b,c){function d(a){function f(h){var i=d[h]={onStack:!0,lowlink:b,index:b++};c.push(h),a.successors(h).forEach(function(a){a in d?d[a].onStack&&(i.lowlink=Math.min(i.lowlink,d[a].index)):(f(a),i.lowlink=Math.min(i.lowlink,d[a].lowlink))});if(i.lowlink===i.index){var j=[],k;do k=c.pop(),d[k].onStack=!1,j.push(k);while(h!==k);e.push(j)}}if(!a.isDirected())throw new Error("tarjan can only be applied to a directed graph. Bad input: "+a);var b=0,c=[],d={},e=[];return a.nodes().forEach(function(a){a in d||f(a)}),e}b.exports=d},{}],44:[function(a,b,c){function d(a){function f(g){if(g in c)throw new e;g in b||(c[g]=!0,b[g]=!0,a.predecessors(g).forEach(function(a){f(a)}),delete c[g],d.push(g))}if(!a.isDirected())throw new Error("topsort can only be applied to a directed graph. Bad input: "+a);var b={},c={},d=[],g=a.sinks();if(a.order()!==0&&g.length===0)throw new e;return a.sinks().forEach(function(a){f(a)}),d}function e(){}b.exports=d,d.CycleException=e,e.prototype.toString=function(){return"Graph has at least one cycle"}},{}],45:[function(a,b,c){function e(a){function b(){a.call(this),this._parents={},this._children={},this._children[null]=new d}return b.prototype=new a,b.prototype.constructor=b,b.prototype.parent=function(a,b){this._strictGetNode(a);if(arguments.length<2)return this._parents[a];if(a===b)throw new Error("Cannot make "+a+" a parent of itself");b!==null&&this._strictGetNode(b),this._children[this._parents[a]].remove(a),this._parents[a]=b,this._children[b].add(a)},b.prototype.children=function(a){return a!==null&&this._strictGetNode(a),this._children[a].keys()},b.prototype.addNode=function(b,c){return b=a.prototype.addNode.call(this,b,c),this._parents[b]=null,this._children[b]=new d,this._children[null].add(b),b},b.prototype.delNode=function(b){var c=this.parent(b);return this._children[b].keys().forEach(function(a){this.parent(a,c)},this),this._children[c].remove(b),delete this._parents[b],delete this._children[b],a.prototype.delNode.call(this,b)},b.prototype.copy=function(){var b=a.prototype.copy.call(this);return this.nodes().forEach(function(a){b.parent(a,this.parent(a))},this),b},b.prototype.filterNodes=function(b){function f(a){var b=c.parent(a);return b===null||d.hasNode(b)?(e[a]=b,b):b in e?e[b]:f(b)}var c=this,d=a.prototype.filterNodes.call(this,b),e={};return d.eachNode(function(a){d.parent(a,f(a))}),d},b}var d=a("cp-data").Set;b.exports=e},{"cp-data":5}],46:[function(a,b,c){function h(a){return Object.prototype.toString.call(a).slice(8,-1)}var d=a("../Graph"),e=a("../Digraph"),f=a("../CGraph"),g=a("../CDigraph");c.decode=function(a,b,c){c=c||e;if(h(a)!=="Array")throw new Error("nodes is not an Array");if(h(b)!=="Array")throw new Error("edges is not an Array");if(typeof c=="string")switch(c){case"graph":c=d;break;case"digraph":c=e;break;case"cgraph":c=f;break;case"cdigraph":c=g;break;default:throw new Error("Unrecognized graph type: "+c)}var i=new c;return a.forEach(function(a){i.addNode(a.id,a.value)}),i.parent&&a.forEach(function(a){a.children&&a.children.forEach(function(b){i.parent(b,a.id)})}),b.forEach(function(a){i.addEdge(a.id,a.u,a.v,a.value)}),i},c.encode=function(a){var b=[],c=[];a.eachNode(function(c,d){var e={id:c,value:d};if(a.children){var f=a.children(c);f.length&&(e.children=f)}b.push(e)}),a.eachEdge(function(a,b,d,e){c.push({id:a,u:b,v:d,value:e})});var h;if(a instanceof g)h="cdigraph";else if(a instanceof f)h="cgraph";else if(a instanceof e)h="digraph";else if(a instanceof d)h="graph";else throw new Error("Couldn't determine type of graph: "+a);return{nodes:b,edges:c,type:h}}},{"../CDigraph":30,"../CGraph":31,"../Digraph":32,"../Graph":33}],47:[function(a,b,c){var d=a("cp-data").Set;c.all=function(){return function(){return!0}},c.nodesFromList=function(a){var b=new d(a);return function(a){return b.has(a)}}},{"cp-data":5}],48:[function(a,b,c){var d=a("./Graph"),e=a("./Digraph");d.prototype.toDigraph=d.prototype.asDirected=function(){var a=new e;return this.eachNode(function(b,c){a.addNode(b,c)}),this.eachEdge(function(b,c,d,e){a.addEdge(null,c,d,e),a.addEdge(null,d,c,e)}),a},e.prototype.toGraph=e.prototype.asUndirected=function(){var a=new d;return this.eachNode(function(b,c){a.addNode(b,c)}),this.eachEdge(function(b,c,d,e){a.addEdge(b,c,d,e)}),a}},{"./Digraph":32,"./Graph":33}],49:[function(a,b,c){c.values=function(a){var b=Object.keys(a),c=b.length,d=new Array(c),e;for(e=0;e<c;++e)d[e]=a[b[e]];return d}},{}],50:[function(a,b,c){b.exports="0.7.4"},{}]},{},[1]);
\ No newline at end of file
diff --git a/public/js/demo/about.html b/public/js/demo/about.html
deleted file mode 100644
index 39afb46..0000000
--- a/public/js/demo/about.html
+++ /dev/null
@@ -1,108 +0,0 @@
- <!DOCTYPE html>
-<html>
-  <head>
-    <title>Tutorial demo</title>
-    <link type="text/css" rel="stylesheet" href="../../css/build/kalamar.css" />
-    <script src="../src/session.js"></script>
-    <script src="../src/tutorial.js"></script>
-  </head>
-  <body class="embedded">
-    <div id="sidebar" tabindex="0" class="active">
-      <div>
-<!-- Not embedded:
-	<h2>Tutorial</h2>
--->
-	<nav>
-	  <ul>
-	    <li><a href="/doc/korap">KorAP</a>
-	      <ul>
-		<li><a href="/doc/kalamar" class="active">Kalamar</a></li>
-		<li><a href="/doc/koral">Koral</a></li>
-		<li><a href="/doc/kustvakt">Kustvakt</a></li>
-		<li><a href="/doc/krill">Krill</a></li>
-		<!-- <li>Karang</li> -->
-	      </ul>
-	    </li>
-	    <li><a href="/doc/ql">Query Languages</a>
-	      <ul>
-		<li><a href="/doc/ql/cosmas-2">Cosmas II</a></li>
-		<li><a href="/doc/ql/poliqarp-plus">Poliqarp+</a></li>
-		<li><a href="/doc/ql/annis">Annis QL</a></li>
-		<li><a href="/doc/ql/cql">CQL</a></li>
-		<li><a href="/doc/ql/regexp">RegExp</a></li>
-	      </ul>
-	    </li>
-	    <li><a href="/doc/data">Data</a>
-	      <ul>
-		<li><a href="/doc/data/corpus">Corpora</a>
-		  <ul>
-		    <li><a href="/doc/data/corpus/dereko">DeReKo</a></li>
-		  </ul>
-		</li>
-		<li><a href="/doc/data/annotation">Annotations</a>
-		  <ul>
-		    <li><a href="/doc/data/annotation/connexor">Connexor</a></li>
-		    <li><a href="/doc/data/annotation/mate">Mate</a></li>
-		    <li><a href="/doc/data/annotation/treetagger">TreeTagger</a></li>
-		  </ul>
-		</li>
-	      </ul>
-	    </li>
-	    <li><a href="/doc/api">API</a>
-<!--
-	      <ul>
-		<li><a href="/doc/api/koralquery">KoralQuery</a></li>
-		<li><a href="/doc/api/search">Search API</a></li>
-		<li><a href="/doc/api/match">Match Information API</a></li>
-		<li><a href="/doc/api/user">User API</a></li>
-	      </ul>
--->
-	    </li>
-	  </ul>
-	</nav>
-      </div>
-    </div>
-    <main class="tutorial">
-      <h2>KorAP-Tutorial</h2>
-      <section id="tut-intro">
-	<h3>Frontend Features</h3>
-	<p>This frontend ...</p>
-      </section>
-
-      <section id="tut-examples">
-	<h3>Example Queries</h3>
-	<p><strong>Poliqarp</strong>: Find all occurrences of the lemma &quot;baum&quot; as annotated by the <a href="#">default foundry</a>.</p>
-	<pre class="query tutorial" data-query="[base=Baum]" data-query-language="poliqarp"><code>[base=Baum]</code></pre>
-      </section>
-
-      <section id="tut-caveats">
-	<h3>Caveats</h3>
-	<p>Memcheck is not perfect; it occasionally produces false positives, and there are mechanisms for suppressing these (see Suppressing errors in the Valgrind User Manual). However, it is typically right 99% of the time, so you should be wary of ignoring its error messages. After all, you wouldn’t ignore warning messages produced by a compiler, right?</p>
-	<p>The suppression mechanism is also useful if Memcheck is reporting errors in library code that you cannot change. The default suppression set hides a lot of these, but you may come across more. Memcheck cannot detect every memory error your program has. For example, it can’t detect out-of-range reads or writes to arrays that are allocated statically or on the stack. But it should detect many errors that could crash your program (eg. cause a segmentation fault).</p>
-	<p>Try to make your program so clean that Memcheck reports no errors. Once you achieve this state, it is much easier to see when changes to the program cause Memcheck to report new errors. Experience from several years of Memcheck use shows that it is possible to make even huge programs run Memcheck-clean. For example, large parts of KDE, OpenOffice.org and Firefox are Memcheck-clean, or very close to it.</p>
-      </section>
-      <section id="tut-more-information">
-	<h3>More information</h3>
-	<p>Please consult the Valgrind FAQ and the Valgrind User Manual, which have much more information. Note that the other tools in the Valgrind distribution can be invoked with the <code>--tool</code> option.</p>
-      </section>
-      <section id="tut-overview">
-	<h3>An Overview of Valgrind</h3>
-	  <p>Valgrind is an instrumentation framework for building dynamic analysis tools. It comes with a set of tools each of which performs some kind of debugging, profiling, or similar task that helps you improve your programs. Valgrind’s architecture is modular, so new tools can be created easily and without disturbing the existing structure.</p>
-	  <p>A number of useful tools are supplied as standard.</p>
-	  <ol>
-	    <li><strong>Memcheck</strong> is a memory error detector. It helps you make your programs, particularly those written in C and C++, more correct.</li>
-	    <li><strong>Cachegrind</strong> is a cache and branch-prediction profiler. It helps you make your programs run faster.</li>
-	    <li><strong>Callgrind</strong> is a call-graph generating cache profiler. It has some overlap with Cachegrind, but also gathers some information that Cachegrind does not.</li>
-	    <li><strong>Helgrind</strong> is a thread error detector. It helps you make your multi-threaded programs more correct.</li>
-	    <li><strong>DRD</strong> is also a thread error detector. It is similar to Helgrind but uses different analysis techniques and so may find different problems.</li>
-	    <li><strong>Massif</strong> is a heap profiler. It helps you make your programs use less memory.</li>
-	    <li><strong>DHAT</strong> is a different kind of heap profiler. It helps you understand issues of block lifetimes, block utilisation, and layout inefficiencies.</li>
-	    <li><strong>SGcheck</strong> is an experimental tool that can detect overruns of stack and global arrays. Its functionality is complementary to that of Memcheck: SGcheck finds problems that Memcheck can’t, and vice versa.</li>
-	    <li><strong>BBV</strong> is an experimental SimPoint basic block vector generator. It is useful to people doing computer architecture research and development.</li>
-	  </ol>
-	  <p>There are also a couple of minor tools that aren’t useful to most users: Lackey is an example tool that illustrates some instrumentation basics; and Nulgrind is the minimal Valgrind tool that does no analysis or instrumentation, and is only useful for testing purposes. Valgrind is closely tied to details of the CPU and operating system, and to a lesser extent, the compiler and basic C libraries. Nonetheless, it supports a number of widely-used platforms, listed in full at <a href="http://www.valgrind.org/">valgrind.org</a>.</p>
-	  <p>Valgrind is built via the standard Unix ./configure, make, make install process; full details are given in the README file in the distribution.</p>
-      </section>
-    </main>
-  </body>
-</html>
diff --git a/public/js/demo/all.html b/public/js/demo/all.html
deleted file mode 100644
index ec6d017..0000000
--- a/public/js/demo/all.html
+++ /dev/null
@@ -1,156 +0,0 @@
- <!DOCTYPE html>
-<html>
-  <head>
-    <title>CSS demo</title>
-    <meta charset="utf-8" />
-    <link type="text/css" rel="stylesheet" href="../../css/build/kalamar.css" />
-  </head>
-  <body>
-    <div id="kalamar-bg"></div>
-    <header>
-      <a href="/" class="logo"><h1><span>KorAP - Corpus Analysis Platform</span></h1></a>
-      <form autocomplete="off" action="/kalamar">
-	<div id="searchbar">
-	  <input type="search"
-		 placeholder="Find ..."
-		 name="q"
-		 id="q-field"
-		 autofocus="autofocus" />
-	  <button type="submit"><span>Go</span></button>
-	  <!-- <i class="fa fa-arrow-circle-down show-hint" onclick="hint.popUp()"></i> -->
-	</div>
-	<div id="vc-view"></div>
-	in <input type="hidden" id="vc-name" name="vc-name" value="Wikipedia" />
-	<input type="text" name="vc" id="vc" value="corpusID = Wikipedia" />
-	with <span class="select">
-	  <!-- Change this to js-menu -->
-	  <select name="ql" id="ql-field">
-	    <option value="poliqarp">Poliqarp</option>
-	    <option value="cosmas2">Cosmas II</option>
-	    <option value="annis">Annis</option>
-	    <option value="cql">CQL v1.2</option>
-	  </select>
-	</span>
-	<div id="button-right">
-	  <input type="checkbox"
-		 value="1"
-		 name="cutoff"
-		 class="checkbox"
-		 id="q-cutoff-field" />
-	  <label for="q-cutoff-field"><span></span>Glimpse</label>
-
-	  <!-- Todo: open tutorial - like openTutorial() -->
-	  <a href="about.html" title="Tutorial" class="tutorial" id="view-tutorial"><span>Tutorial</span></a>
-	</div>
-      </form>
-    </header>
-
-    <div id="sidebar" tabindex="0">
-      <h2>Tutorial</h2>
-      <p>Hui</p>
-    </div>
-
-    <main>
-      <div class="resultinfo">
-	<div id="pagination">
-	  <a rel="prev"><span><span>&lt;</span></span></a>
-	  <a rel="self"><span>1</span></a>
-	  <a href="#2"><span>2</span></a>
-	  <a href="#3"><span>3</span></a>
-	  <a class="ellipsis"><span><span>...</span></span></a>
-	  <a href="#52230"><span>52230</span></a>
-	  <a rel="next" href="#2"><span><span>&gt;</span></span></a>
-	</div>
-	<p class="found">Found <span id="total-results">unknown amount of matches</span> in 59.93ms</p>
-      </div>
-
-      <div id="search">
-	<ol class="align-left">
-	  <li data-corpus-id="WPD"
-	      data-doc-id="WWW"
-	      data-text-id="03313"
-	      data-match-id="p102-103"
-	      data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans xip/c=spans"
-	      id="WPD-WWW.03313-p102-103">
-	    <div>
-	      <div class="snippet startMore endMore"><span class="context-left">In diesem Beispiel ist zu sehen, dass die beiden Variablen a und b lediglich ihre Werte an die Funktion </span><mark><mark class="class-2 level-1">Dies </mark><mark class="class-1 level-0"><mark class="class-2 level-1"><mark class="class-3 level-2">ist</mark> ein</mark> Test</mark></mark><span class="context-right"> übergeben, aber im Gegensatz zu einem Referenzparamter dabei unverändert bleiben.</span></div>
-	      <!-- only inject via javascript! -->
-	    </div>
-	    <p class="ref"><strong>Wertparameter</strong> by Hubi,Zwobot,4; published on 2005-03-28 as WWW.03313 (WPD)</p>
-	    <!-- only inject via javascript! -->
-	    <!--
-	    <ul class="action right">
-	      <li class="close" title="Close"><a href="#">Close hit<i class="fa fa-toggle-up"></i></a></li>
-	      <li class="open" title="Open in new tab"><a href="#WPD-WWW.03313-p102-103" target="_blank"><i class="fa fa-external-link-square"></i></a></li>
-	      <li onclick="showTable(this)" title="Annotations"><i class="fa fa-info-circle"></i></li>
-	    </ul>
--->
-	  </li>
-	  <li data-corpus-id="WPD"
-	      data-doc-id="FFF"
-	      data-text-id="01460"
-	      data-match-id="p119-120"
-	      data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans xip/c=spans"
-	      id="WPD-FFF.01460-p119-120">
-	    <div>
-	      <div class="snippet startMore endMore"><span class="context-left">Der Fehler unterläuft häufig bei der direkten Übersetzung aus dem Englischen, wenn im originalen Ausdruck die beiden Wortteile verschiedene Wörter sind und sich das Adjektiv wahlweise auf das erste oder zweite Wort bezieht. Ein Beispiel ist multiples Testproblem für multiple </span><span class="match">test</span><span class="context-right"> problem.</span></div>
-	      <div class="tokenInfo"></div>
-	    </div>
-	    <p class="ref"><strong>Fehlbezogenes Adjektiv</strong> by Joni2,Peterlustig,BWBot; published on 2005-03-28 as FFF.01460 (WPD)</p>
-	    <ul class="action right">
-	      <li class="close" title="Close"><a href="#"><i class="fa fa-toggle-up"></i></a></li>
-	      <li class="open" title="Open in new tab"><a href="#WPD-FFF.01460-p119-120" target="_blank"><i class="fa fa-external-link-square"></i></a></li>
-	      <li onclick="showTable(this)" title="Annotations"><i class="fa fa-info-circle"></i></li>
-	    </ul>
-	  </li>
-
-	  <li data-corpus-id="WPD"
-	      data-doc-id="HHH"
-	      data-text-id="06056"
-	      data-match-id="p2564-2565"
-	      data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans xip/c=spans"
-	      id="WPD-HHH.06056-p2564-2565">
-	    <div>
-	      <div class="snippet startMore endMore"><span class="context-left">HDTV Samples from European (and other) broadcasters and </span><span class="match">test</span><span class="context-right"> transmissions in Europe</span></div>
-	      <div class="tokenInfo"></div>
-	    </div>
-	    <p class="ref"><strong>High Definition Television</strong> by ArtMechanic,TheK,Andreas -horn- Hornig; published on 2005-03-28 as HHH.06056 (WPD)</p>
-	    <ul class="action right">
-	      <li class="close" title="Close"><a href="#"><i class="fa fa-toggle-up"></i></a></li>
-	      <li class="open" title="Open in new tab"><a href="#WPD-HHH.06056-p2564-2565" target="_blank"><i class="fa fa-external-link-square"></i></a></li>
-	      <li onclick="showTable(this)" title="Annotations"><i class="fa fa-info-circle"></i></li>
-	    </ul>
-	  </li>
-      </div>
-      <div id="menu"></div>
-
-      <div class="intro">
-	<p><strong>KorAP</strong> is a new Corpus Analysis Platform, suited for large, multiple annotated corpora and complex search queries independent of particular research questions.</p>
-	<p>This is the new frontend for KorAP, with currently no access to restricted corpora. For full access, please visit the <a href="http://korap.ids-mannheim.de/app">first frontend</a>.</p>
-
-	<p><strong>New to KorAP?</strong> Please check out our <a href="#">tutorial</a>!</p>
-
-	<p>KorAP is developed at the <a href="http://www.ids-mannheim.de">Institute for the German Language</a> and funded by the <a href="http://www.leibniz-gemeinschaft.de/en/about-us/leibniz-competition/projekte-2011/2011-funding-line-2/">Leibniz Association</a>. The separated modules are being published as open source at <a href="http://github.com/KorAP">GitHub</a>.</p>
-      </div>
-      <div id="logos">
-	<div>
-	  <a href="http://www.ids-mannheim.de/" class="logo"><p id="ids-logo"><span>Developed at the Institute for the German Language (IDS)</span></p></a>
-	  <a href="http://www.leibniz-gemeinschaft.de/" class="logo"><p id="leibniz-logo"><span>Member of the Leibniz Association</span></p></a>
-	</div>
-      </div>
-    </main>
-    <script src="../lib/dagre/dagre.min.js"></script>
-    <script src="../src/api.js"></script>
-    <script src="../src/hint.js"></script>
-    <script src="../src/match.js"></script>
-    <script src="../src/menu.js"></script>
-    <script src="../src/vc.js"></script>
-    <script src="../src/session.js"></script>
-    <script src="../src/tutorial.js"></script>
-    <script src="../src/util.js"></script>
-    <script>
-      KorAP.URL = 'http://localhost:3000';
-    </script>
-    <script src="./all.js"></script>
-  </body>
-</html>
diff --git a/public/js/demo/all.js b/public/js/demo/all.js
deleted file mode 100644
index b29b0b5..0000000
--- a/public/js/demo/all.js
+++ /dev/null
@@ -1,455 +0,0 @@
-var snippet = "<span title=\"cnx/l:meist\">" +
-  "  <span title=\"cnx/p:ADV\">" +
-  "    <span title=\"cnx/syn:@PREMOD\">" +
-  "      <span title=\"mate/l:meist\">" +
-  "        <span title=\"mate/p:ADV\">" +
-  "          <span title=\"opennlp/p:ADV\">meist</span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span title=\"cnx/l:deutlich\">" +
-  "  <span title=\"cnx/p:A\">" +
-  "    <span title=\"cnx/syn:@PREMOD\">" +
-  "      <span title=\"mate/l:deutlich\">" +
-  "        <span title=\"mate/m:degree:pos\">" +
-  "          <span title=\"mate/p:ADJD\">" +
-  "            <span title=\"opennlp/p:ADJD\">deutlich</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span title=\"cnx/l:fähig\">" +
-  "  <span title=\"cnx/l:leistung\">" +
-  "    <span title=\"cnx/p:A\">" +
-  "      <span title=\"cnx/syn:@NH\">" +
-  "        <span title=\"mate/l:leistungsfähig\">" +
-  "          <span title=\"mate/m:degree:comp\">" +
-  "            <span title=\"mate/p:ADJD\">" +
-  "              <span title=\"opennlp/p:ADJD\">leistungsfähiger</span>" +
-  "            </span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>";
-
-var treeSnippet =
-  "<span class=\"context-left\"></span>" +
-  "<span class=\"match\">" +
-  "  <span title=\"xip/c:MC\">" +
-  "    <span title=\"xip/c:TOP\">" +
-  "      <span title=\"xip/c:PP\">" +
-  "        <span title=\"xip/c:PREP\">Mit</span>" +
-  "        <span title=\"xip/c:NP\">" +
-  "          <span title=\"xip/c:DET\">dieser</span>" +
-  "          <span title=\"xip/c:NPA\">" +
-  "            <span title=\"xip/c:NOUN\">Methode</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:VERB\">ist</span>" +
-  "      <span title=\"xip/c:NP\">" +
-  "        <span title=\"xip/c:PRON\">es</span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:AP\">" +
-  "        <span title=\"xip/c:ADV\">nun</span>" +
-  "        <span title=\"xip/c:ADJ\">möglich</span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:ADV\">z. B.</span>" +
-  "      <span title=\"xip/c:NPA\">" +
-  "        <span title=\"xip/c:NP\">" +
-  "          <span title=\"xip/c:NOUN\">Voice</span>" +
-  "        </span>" +
-  "      </span>" + "(" +
-  "      <span title=\"xip/c:INS\">" +
-  "        <span title=\"xip/c:NPA\">" +
-  "          <span title=\"xip/c:NP\">" +
-  "            <span title=\"xip/c:NOUN\">Sprache</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" + ")" +
-  "      <span title=\"xip/c:VERB\">bevorzugt</span>" +
-  "      <span title=\"xip/c:PP\">" +
-  "        <span title=\"xip/c:PREP\">in</span>" +
-  "        <span title=\"xip/c:NP\">" +
-  "          <span title=\"xip/c:PRON\">der</span>" +
-  "        </span>" +
-  "        <span title=\"xip/c:NPA\">" +
-  "          <span title=\"xip/c:NP\">" +
-  "            <span title=\"xip/c:NOUN\">Bridge</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:INFC\">" +
-  "        <span title=\"xip/c:INS\">" +
-  "          <span title=\"xip/c:VERB\">weiterzugeben</span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span class=\"context-right\"></span>";
-
-var treeSnippet2 =
-  "<span class=\"context-left\"><\/span>"+
-  "<span class=\"match\">"+
-  "<span title=\"xip\/c:NPA\">"+
-  "<span title=\"xip\/c:NP\">"+
-  "<span title=\"xip\/c:NOUN\">HDTV<\/span>"+
-  "<\/span>"+
-  "<\/span> "+
-  "<span title=\"xip\/c:NPA\">" +
-  "<span title=\"xip\/c:NP\">"+
-  "<span title=\"xip\/c:NOUN\">Samples<\/span>"+
-  "<\/span>"+
-  "<\/span> "+
-  "<span title=\"xip\/c:ADV\">from<\/span> "+
-  "<span title=\"xip\/c:NPA\">"+
-  "<span title=\"xip\/c:NP\">"+
-  "<span title=\"xip\/c:NOUN\">European<\/span>"+
-  "<\/span>"+
-  "<\/span> ("+
-  "<span title=\"xip\/c:INS\">"+
-  "<span title=\"xip\/c:NPA\">"+
-  "<span title=\"xip\/c:NP\">"+
-  "<span title=\"xip\/c:NOUN\">and<\/span>"+
-  "<\/span>"+
-  "<\/span> "+
-  "<span title=\"xip\/c:ADV\">other<\/span>"+
-  "<\/span>) "+
-  "<span title=\"xip\/c:ADV\">broadcasters<\/span> "+
-  "<span title=\"xip\/c:NPA\">"+
-  "<span title=\"xip\/c:NP\">"+
-  "<span title=\"xip\/c:NOUN\">and<\/span>"+
-  "<\/span>"+
-  "<\/span> "+
-  "<span title=\"xip\/c:VERB\">test<\/span> "+
-  "<span title=\"xip\/c:ADV\">transmissions<\/span> "+
-  "<span title=\"xip\/c:PREP\">in<\/span> "+
-  "<span title=\"xip\/c:NOUN\">Europe<\/span>"+
-  "<\/span>"+
-  "<span class=\"context-right\"><\/span>";
-
-var menuContent = [
-    ['cnx/c', 'cnx', 'c'],
-    ['mate/c', 'mate', 'c'],
-    ['base/c', 'base', 'c'],
-    ['xip/c', 'xip', 'c'],
-    ['tt/c', 'tt', 'c']
-];
-
-var namedEntities = [
-  ["I-LOC",  "I-LOC ",  "Location"],
-  ["I-MISC", "I-MISC ", "Miscellaneous"],
-  ["I-ORG",  "I-ORG ",  "Organization"],
-  ["I-PER",  "I-PER ",  "Person"]
-];
-
-// http://www.ids-mannheim.de/cosmas2/projekt/referenz/stts/morph.html
-// http://nachhalt.sfb632.uni-potsdam.de/owl-docu/stts.html
-var sttsArray = [
-  // "$.", "$(", "$,"
-  ["ADJA","ADJA ", "Attributive Adjective"],
-  ["ADJD","ADJD ", "Predicative Adjective"],
-  ["ADV","ADV ", "Adverb"],
-  ["APPO","APPO ", "Postposition"],
-  ["APPR","APPR ", "Preposition"],
-  ["APPRART","APPRART ", "Preposition with Determiner"],
-  ["APZR","APZR ","Right Circumposition"],
-  ["ART","ART ", "Determiner"],
-  ["CARD","CARD ", "Cardinal Number"],
-  ["FM","FM ", "Foreign Material"],
-  ["ITJ","ITJ ", "Interjection"],
-  ["KOKOM","KOKOM ", "Comparison Particle"],
-  ["KON","KON ", "Coordinating Conjuncion"],
-  ["KOUI","KOUI ", "Subordinating Conjunction with 'zu'"],
-  ["KOUS","KOUS ", "Subordinating Conjunction with Sentence"],
-  ["NE","NE ", "Named Entity"],
-  ["NN","NN ", "Normal Nomina"],
-  ["PAV", "PAV ", "Pronominal Adverb"],
-  ["PDAT","PDAT ","Attributive Demonstrative Pronoun"],
-  ["PDS","PDS ", "Substitutive Demonstrative Pronoun"],
-  ["PIAT","PIAT ", "Attributive Indefinite Pronoun without Determiner"],
-  ["PIDAT","PIDAT ", "Attributive Indefinite Pronoun with Determiner"],
-  ["PIS","PIS ", "Substitutive Indefinite Pronoun"],
-  ["PPER","PPER ", "Personal Pronoun"],
-  ["PPOSAT","PPOSAT ", "Attributive Possessive Pronoun"],
-  ["PPOSS","PPOSS ", "Substitutive Possessive Pronoun"],
-  ["PRELAT","PRELAT ", "Attributive Relative Pronoun"],
-  ["PRELS","PRELS ", "Substitutive Relative Pronoun"],
-  ["PRF","PRF ", "Reflexive Pronoun"],
-  ["PROAV","PROAV ", "Pronominal Adverb"],
-  ["PTKA","PTKA ","Particle with Adjective"],
-  ["PTKANT","PTKANT ", "Answering Particle"],
-  ["PTKNEG","PTKNEG ", "Negation Particle"],
-  ["PTKVZ","PTKVZ ", "Separated Verbal Particle"],
-  ["PTKZU","PTKZU ", "'zu' Particle"],
-  ["PWAT","PWAT ", "Attributive Interrogative Pronoun"],
-  ["PWAV","PWAV ", "Adverbial Interrogative Pronoun"],
-  ["PWS","PWS ", "Substitutive Interrogative Pronoun"],
-  ["TRUNC","TRUNC ","Truncated"],
-  ["VAFIN","VAFIN ", "Auxiliary Finite Verb"],
-  ["VAINF","VAINF ", "Auxiliary Infinite Verb"],
-  ["VAIMP","VAIMP ", "Auxiliary Finite Imperative Verb"],
-  ["VAPP","VAPP ", "Auxiliary Perfect Participle"],
-  ["VMFIN","VMFIN ", "Modal Finite Verb"],
-  ["VMINF","VMINF ", "Modal Infinite Verb"],
-  ["VMPP","VMPP ", "Modal Perfect Participle"],
-  ["VVFIN","VVFIN ","Finite Verb"],
-  ["VVIMP","VVIMP ", "Finite Imperative Verb"],
-  ["VVINF","VVINF ", "Infinite Verb"],
-  ["VVIZU","VVIZU ", "Infinite Verb with 'zu'"],
-  ["VVPP","VVPP ", "Perfect Participle"],
-  ["XY", "XY ", "Non-Word"]
-];
-
-var mateSttsArray = sttsArray.slice(0);
-mateSttsArray.push(
-  ["<root-POS>","<root-POS>","Root Part of Speech"]
-);
-
-
-var vcExample = {
-  "@type":"koral:docGroup",
-  "operation":"operation:or",
-  "operands":[
-    {
-      "@type":"koral:docGroup",
-      "operation":"operation:and",
-      "operands":[
-        {
-          "@type":"koral:doc",
-          "key":"Titel",
-          "value":"Der Birnbaum",
-          "match":"match:eq"
-        },
-        {
-          "@type":"koral:doc",
-          "key":"Veröffentlichungsort",
-          "value":"Mannheim",
-          "match":"match:eq"
-        },
-        {
-          "@type":"koral:docGroup",
-          "operation":"operation:or",
-          "operands":[
-            {
-              "@type":"koral:doc",
-              "key":"Untertitel",
-              "value":"Aufzucht und Pflege",
-              "match":"match:eq"
-            },
-            {
-              "@type":"koral:doc",
-              "key":"Untertitel",
-              "value":"Gedichte",
-              "match":"match:eq",
-              "rewrites" : [
-                {
-                  "@type": "koral:rewrite",
-                  "src" : "policy",
-                  "operation" : "operation:injection",
-                }
-              ]
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "@type":"koral:doc",
-      "key":"Veröffentlichungsdatum",
-      "type":"type:date",
-      "value":"2015-03-05",
-      "match":"match:geq"
-    }
-  ]
-};
-
-
-KorAP.hintArray = {
-  "-" : [
-    ["Connexor",   "cnx/",     "Constituency, Lemma, Morphology, Part-of-Speech, Syntax"],
-    ["CoreNLP",    "corenlp/", "Named Entities"],
-    ["Mate",       "mate/",     "Lemma, Morphology, Part-of-Speech"],
-    ["OpenNLP",    "opennlp/", "Part-of-Speech"],
-    ["TreeTagger", "tt/",      "Lemma, Part-of-Speech"],
-    ["Xerox Parser", "xip/",   "Constituency, Lemma, Part-of-Speech"]
-  ],
-  "corenlp/" : [
-    ["Named Entity", "ne=" , "Combined"],
-    ["Named Entity", "ne_dewac_175m_600=" , "ne_dewac_175m_600"],
-    ["Named Entity", "ne_hgc_175m_600=",    "ne_hgc_175m_600"]
-  ],
-  "corenlp/ne=" : namedEntities,
-  "corenlp/ne_dewac_175m_600=" : namedEntities,
-  "corenlp/ne_hgc_175m_600=" : namedEntities,
-  "cnx/" : [
-    ["Constituency", "c="],
-    ["Lemma", "l="],
-    ["Morphology", "m="],
-    ["Part-of-Speech", "p="],
-    ["Syntax", "syn="]
-  ],
-  "cnx/c=" : [
-    ["np", "np ", "Nominal Phrase"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
-  "cnx/m=" : [
-    ["Abbr","Abbr ", "Nouns: Abbreviation"],
-    ["CMP","CMP ", "Adjective: Comparative"],
-    ["IMP", "IMP ", "Mood: Imperative"],
-    ["IND", "IND ", "Mood: Indicative"],
-    ["INF", "INF ", "Infinitive"],
-    ["ORD","ORD ", "Numeral: Ordinal"],
-    ["PAST", "PAST ", "Tense: past"],
-    ["PCP", "PCP ", "Participle"],
-    ["PERF", "PERF ", "Perfective Participle"],
-    ["PL","PL ", "Nouns: Plural"],
-    ["PRES", "PRES ", "Tense: present"],
-    ["PROG", "PROG ", "Progressive Participle"],
-    ["Prop","Prop ", "Nouns: Proper Noun"],
-    ["SUB", "SUB ", "Mood: Subjunctive"],
-    ["SUP","SUP ", "Adjective: Superlative"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
-  "cnx/p=" : [
-    ["A", "A ", "Adjective"],
-    ["ADV", "ADV ", "Adverb"],
-    ["CC", "CC ", "Coordination Marker"],
-    ["CS", "CS ", "Clause Marker"],
-    ["DET", "DET ", "Determiner"],
-    ["INTERJ", "INTERJ ", "Interjection"],
-    ["N", "N ", "Noun"],
-    ["NUM", "NUM ", "Numeral"],
-    ["PREP", "PREP ", "Preposition"],
-    ["PRON", "PRON ", "Pro-Nominal"],
-    ["V", "V ", "Verb"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/syntax.html
-  "cnx/syn=" : [
-    ["@ADVL", "@ADVL ", "Adverbial Head"],
-    ["@AUX", "@AUX ", "Auxiliary Verb"],
-    ["@CC", "@CC ", "Coordination"]
-    ["@MAIN", "@MAIN ", "Main Verb"],
-    ["@NH", "@NH ", "Nominal Head"],
-    ["@POSTMOD", "@POSTMOD ", "Postmodifier"],
-    ["@PREMARK", "@PREMARK ", "Preposed Marker"],
-    ["@PREMOD", "@POSTMOD ", "Premodifier"]
-  ],
-  "opennlp/" : [
-    ["Part-of-Speech", "p="]
-  ],
-  "opennlp/p=" : sttsArray,
-  "xip/" : [
-    ["Constituency", "c="],
-    // Inactive: ["Dependency", "d="],
-    ["Lemma", "l="],
-    ["Part-of-Speech", "p="],
-  ],
-  // "xip/c=" : [],
-  // Inactive: "xip/d=" : [],
-  // "xip/p=" : [],
-  "tt/" : [
-    ["Lemma", "l="],
-    ["Part-of-Speech", "p="]
-  ],
-  "tt/p=" : sttsArray,
-  "mate/" : [
-    // Inactive: "d" : ["d=", "Dependency"],
-    ["Lemma", "l="],
-    ["Morphology", "m="],
-    ["Part-of-Speech", "p="]
-  ],
-  // Inactive: mate/d=
-  "mate/p=" : mateSttsArray,
-  "mate/m=" : [
-    ["Case", "case:"],
-    ["Degree", "degree:"],
-    ["Gender", "gender:"],
-    ["Mood", "mood:"],
-    ["Number", "number:"],
-    ["Person", "person:"],
-    ["Tense","tense:"],
-    ["No type", "<no-type> "]
-  ],
-  "mate/m=case:" : [
-    ["acc", "acc ", "Accusative"],
-    ["dat","dat ", "Dative"],
-    ["gen", "gen ","Genitive"],
-    ["nom","nom ", "Nominative"],
-    ["*","* ", "Undefined"]
-  ],
-  "mate/m=degree:" : [
-    ["comp","comp ", "Comparative"],
-    ["pos","pos ", "Positive"],
-    ["sup","sup ", "Superative"]
-  ],
-  "mate/m=gender:" : [
-    ["fem", "fem ", "Feminium"],
-    ["masc", "masc ", "Masculinum"],
-    ["neut","neut ", "Neuter"],
-    ["*","* ","Undefined"]
-  ],
-  "mate/m=mood:" : [
-    ["imp","imp ", "Imperative"],
-    ["ind","ind ", "Indicative"],
-    ["subj","subj ", "Subjunctive"]
-  ],
-  "mate/m=number:" : [
-    ["pl","pl ","Plural"],
-    ["sg","sg ","Singular"],
-    ["*","* ","Undefined"]
-  ],
-  "mate/m=person:" : [
-    ["1","1 ", "First Person"],
-    ["2","2 ", "Second Person"],
-    ["3","3 ", "Third Person"]
-  ],
-  "mate/m=tense:" : [
-    ["past","past ", "Past"],
-    ["pres","pres ", "Present"]
-  ]
-};
-
-// Parse and show the table
-// Override getMatchInfo API call
-KorAP.API.getMatchInfo = function(match, callObj, cb) {
-  if (callObj["spans"] !== undefined && callObj["spans"] === true) {
-    cb({ "snippet": treeSnippet2 });
-  }
-  else {
-    cb({ "snippet": snippet });
-  }
-};
-
-
-/**
- * Do some things at the beginning.
- */
-document.addEventListener('DOMContentLoaded', function () {
-
-  // Decorate actions
-  var init = KorAP.init();
-
-  var menu = KorAP.MatchTreeMenu.create(
-    undefined,
-    menuContent
-  );
-
-  // document.getElementById('vc-choose').click();
-
-  // init.tutorial.show();
-
-  // Don't hide!!!
-  menu.hide = function () {};
-  document.getElementById('menu').appendChild(menu.element());
-  menu.limit(3);
-  menu.show();
-  menu.focus();
-});
diff --git a/public/js/demo/hint.html b/public/js/demo/hint.html
deleted file mode 100644
index 154bcaf..0000000
--- a/public/js/demo/hint.html
+++ /dev/null
@@ -1,248 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Hint demo</title>
-    <meta charset="utf-8" />
-    <script src="../src/menu.js"></script>
-    <script src="../src/hint.js"></script>
-    <link type="text/css" rel="stylesheet" href="../../css/build/kalamar.css" />
-    <script>
-// http://www.nlpado.de/~sebastian/software/ner_german.shtml
-// http://www.cnts.ua.ac.be/conll2003/ner/
-var namedEntities = [
-  ["I-LOC",  "I-LOC ",  "Location"],
-  ["I-MISC", "I-MISC ", "Miscellaneous"],
-  ["I-ORG",  "I-ORG ",  "Organization"],
-  ["I-PER",  "I-PER ",  "Person"]
-];
-
-// http://www.ids-mannheim.de/cosmas2/projekt/referenz/stts/morph.html
-// http://nachhalt.sfb632.uni-potsdam.de/owl-docu/stts.html
-var sttsArray = [
-  // "$.", "$(", "$,"
-  ["ADJA","ADJA ", "Attributive Adjective"],
-  ["ADJD","ADJD ", "Predicative Adjective"],
-  ["ADV","ADV ", "Adverb"],
-  ["APPO","APPO ", "Postposition"],
-  ["APPR","APPR ", "Preposition"],
-  ["APPRART","APPRART ", "Preposition with Determiner"],
-  ["APZR","APZR ","Right Circumposition"],
-  ["ART","ART ", "Determiner"],
-  ["CARD","CARD ", "Cardinal Number"],
-  ["FM","FM ", "Foreign Material"],
-  ["ITJ","ITJ ", "Interjection"],
-  ["KOKOM","KOKOM ", "Comparison Particle"],
-  ["KON","KON ", "Coordinating Conjuncion"],
-  ["KOUI","KOUI ", "Subordinating Conjunction with 'zu'"],
-  ["KOUS","KOUS ", "Subordinating Conjunction with Sentence"],
-  ["NE","NE ", "Named Entity"],
-  ["NN","NN ", "Normal Nomina"],
-  ["PAV", "PAV ", "Pronominal Adverb"],
-  ["PDAT","PDAT ","Attributive Demonstrative Pronoun"],
-  ["PDS","PDS ", "Substitutive Demonstrative Pronoun"],
-  ["PIAT","PIAT ", "Attributive Indefinite Pronoun without Determiner"],
-  ["PIDAT","PIDAT ", "Attributive Indefinite Pronoun with Determiner"],
-  ["PIS","PIS ", "Substitutive Indefinite Pronoun"],
-  ["PPER","PPER ", "Personal Pronoun"],
-  ["PPOSAT","PPOSAT ", "Attributive Possessive Pronoun"],
-  ["PPOSS","PPOSS ", "Substitutive Possessive Pronoun"],
-  ["PRELAT","PRELAT ", "Attributive Relative Pronoun"],
-  ["PRELS","PRELS ", "Substitutive Relative Pronoun"],
-  ["PRF","PRF ", "Reflexive Pronoun"],
-  ["PROAV","PROAV ", "Pronominal Adverb"],
-  ["PTKA","PTKA ","Particle with Adjective"],
-  ["PTKANT","PTKANT ", "Answering Particle"],
-  ["PTKNEG","PTKNEG ", "Negation Particle"],
-  ["PTKVZ","PTKVZ ", "Separated Verbal Particle"],
-  ["PTKZU","PTKZU ", "'zu' Particle"],
-  ["PWAT","PWAT ", "Attributive Interrogative Pronoun"],
-  ["PWAV","PWAV ", "Adverbial Interrogative Pronoun"],
-  ["PWS","PWS ", "Substitutive Interrogative Pronoun"],
-  ["TRUNC","TRUNC ","Truncated"],
-  ["VAFIN","VAFIN ", "Auxiliary Finite Verb"],
-  ["VAINF","VAINF ", "Auxiliary Infinite Verb"],
-  ["VAIMP","VAIMP ", "Auxiliary Finite Imperative Verb"],
-  ["VAPP","VAPP ", "Auxiliary Perfect Participle"],
-  ["VMFIN","VMFIN ", "Modal Finite Verb"],
-  ["VMINF","VMINF ", "Modal Infinite Verb"],
-  ["VMPP","VMPP ", "Modal Perfect Participle"],
-  ["VVFIN","VVFIN ","Finite Verb"],
-  ["VVIMP","VVIMP ", "Finite Imperative Verb"],
-  ["VVINF","VVINF ", "Infinite Verb"],
-  ["VVIZU","VVIZU ", "Infinite Verb with 'zu'"],
-  ["VVPP","VVPP ", "Perfect Participle"],
-  ["XY", "XY ", "Non-Word"]
-];
-
-var mateSttsArray = sttsArray.slice(0);
-mateSttsArray.push(
-  ["<root-POS>","<root-POS>","Root Part of Speech"]
-);
-
-
-var hintArray = {
-  "-" : [
-    ["Connexor",   "cnx/",     "Constituency, Lemma, Morphology, Part-of-Speech, Syntax"],
-    ["CoreNLP",    "corenlp/", "Named Entities"],
-    ["Mate",       "mate/",     "Lemma, Morphology, Part-of-Speech"],
-    ["OpenNLP",    "opennlp/", "Part-of-Speech"],
-    ["TreeTagger", "tt/",      "Lemma, Part-of-Speech"],
-    ["Xerox Parser", "xip/",   "Constituency, Lemma, Part-of-Speech"]
-  ],
-  "corenlp/" : [
-    ["Named Entity", "ne=" , "Combined"],
-    ["Named Entity", "ne_dewac_175m_600=" , "ne_dewac_175m_600"],
-    ["Named Entity", "ne_hgc_175m_600=",    "ne_hgc_175m_600"]
-  ],
-  "corenlp/ne=" : namedEntities,
-  "corenlp/ne_dewac_175m_600=" : namedEntities,
-  "corenlp/ne_hgc_175m_600=" : namedEntities,
-  "cnx/" : [
-    ["Constituency", "c="],
-    ["Lemma", "l="],
-    ["Morphology", "m="],
-    ["Part-of-Speech", "p="],
-    ["Syntax", "syn="]
-  ],
-  "cnx/c=" : [
-    ["np", "np ", "Nominal Phrase"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
-  "cnx/m=" : [
-    ["Abbr","Abbr ", "Nouns: Abbreviation"],
-    ["CMP","CMP ", "Adjective: Comparative"],
-    ["IMP", "IMP ", "Mood: Imperative"],
-    ["IND", "IND ", "Mood: Indicative"],
-    ["INF", "INF ", "Infinitive"],
-    ["ORD","ORD ", "Numeral: Ordinal"],
-    ["PAST", "PAST ", "Tense: past"],
-    ["PCP", "PCP ", "Participle"],
-    ["PERF", "PERF ", "Perfective Participle"],
-    ["PL","PL ", "Nouns: Plural"],
-    ["PRES", "PRES ", "Tense: present"],
-    ["PROG", "PROG ", "Progressive Participle"],
-    ["Prop","Prop ", "Nouns: Proper Noun"],
-    ["SUB", "SUB ", "Mood: Subjunctive"],
-    ["SUP","SUP ", "Adjective: Superlative"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
-  "cnx/p=" : [
-    ["A", "A ", "Adjective"],
-    ["ADV", "ADV ", "Adverb"],
-    ["CC", "CC ", "Coordination Marker"],
-    ["CS", "CS ", "Clause Marker"],
-    ["DET", "DET ", "Determiner"],
-    ["INTERJ", "INTERJ ", "Interjection"],
-    ["N", "N ", "Noun"],
-    ["NUM", "NUM ", "Numeral"],
-    ["PREP", "PREP ", "Preposition"],
-    ["PRON", "PRON ", "Pro-Nominal"],
-    ["V", "V ", "Verb"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/syntax.html
-  "cnx/syn=" : [
-    ["@ADVL", "@ADVL ", "Adverbial Head"],
-    ["@AUX", "@AUX ", "Auxiliary Verb"],
-    ["@CC", "@CC ", "Coordination"]
-    ["@MAIN", "@MAIN ", "Main Verb"],
-    ["@NH", "@NH ", "Nominal Head"],
-    ["@POSTMOD", "@POSTMOD ", "Postmodifier"],
-    ["@PREMARK", "@PREMARK ", "Preposed Marker"],
-    ["@PREMOD", "@POSTMOD ", "Premodifier"]
-  ],
-  "opennlp/" : [
-    ["Part-of-Speech", "p="]
-  ],
-  "opennlp/p=" : sttsArray,
-  "xip/" : [
-    ["Constituency", "c="],
-    // Inactive: ["Dependency", "d="],
-    ["Lemma", "l="],
-    ["Part-of-Speech", "p="],
-  ],
-  // "xip/c=" : [],
-  // Inactive: "xip/d=" : [],
-  // "xip/p=" : [],
-  "tt/" : [
-    ["Lemma", "l="],
-    ["Part-of-Speech", "p="]
-  ],
-  "tt/p=" : sttsArray,
-  "mate/" : [
-    // Inactive: "d" : ["d=", "Dependency"],
-    ["Lemma", "l="],
-    ["Morphology", "m="],
-    ["Part-of-Speech", "p="]
-  ],
-  // Inactive: mate/d=
-  "mate/p=" : mateSttsArray,
-  "mate/m=" : [
-    ["Case", "case:"],
-    ["Degree", "degree:"],
-    ["Gender", "gender:"],
-    ["Mood", "mood:"],
-    ["Number", "number:"],
-    ["Person", "person:"],
-    ["Tense","tense:"],
-    ["No type", "<no-type> "]
-  ],
-  "mate/m=case:" : [
-    ["acc", "acc ", "Accusative"],
-    ["dat","dat ", "Dative"],
-    ["gen", "gen ","Genitive"],
-    ["nom","nom ", "Nominative"],
-    ["*","* ", "Undefined"]
-  ],
-  "mate/m=degree:" : [
-    ["comp","comp ", "Comparative"],
-    ["pos","pos ", "Positive"],
-    ["sup","sup ", "Superative"]
-  ],
-  "mate/m=gender:" : [
-    ["fem", "fem ", "Feminium"],
-    ["masc", "masc ", "Masculinum"],
-    ["neut","neut ", "Neuter"],
-    ["*","* ","Undefined"]
-  ],
-  "mate/m=mood:" : [
-    ["imp","imp ", "Imperative"],
-    ["ind","ind ", "Indicative"],
-    ["subj","subj ", "Subjunctive"]
-  ],
-  "mate/m=number:" : [
-    ["pl","pl ","Plural"],
-    ["sg","sg ","Singular"],
-    ["*","* ","Undefined"]
-  ],
-  "mate/m=person:" : [
-    ["1","1 ", "First Person"],
-    ["2","2 ", "Second Person"],
-    ["3","3 ", "Third Person"]
-  ],
-  "mate/m=tense:" : [
-    ["past","past ", "Past"],
-    ["pres","pres ", "Present"]
-  ]
-};
-
-    </script>
-  </head>
-  <body>
-    <header>
-      <form autocomplete="off" action="/kalamar">
-	<div id="searchbar">
-	  <input type="search"
-		 placeholder="Find ..."
-		 name="q"
-		 id="q-field"
-		 autofocus="autofocus" />
-	  <button type="submit"><span>Go</span></button>
-	</div>
-      </form>
-    </header>
-    <script>
-KorAP.hintArray = hintArray;
-var input = KorAP.Hint.create();
-    </script>
-  </body>
-</html>
diff --git a/public/js/demo/match.html b/public/js/demo/match.html
deleted file mode 100644
index 7b51996..0000000
--- a/public/js/demo/match.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Match demo</title>
-    <meta charset="utf-8" />
-    <script src="../lib/dagre/dagre.min.js"></script>
-    <script src="../src/util.js"></script>
-    <script src="../src/menu.js"></script>
-    <script src="../src/match.js"></script>
-    <link type="text/css"
-	  rel="stylesheet"
-	  href="../../css/font-awesome.min.css"></link>
-    <link type="text/css"
-	  rel="stylesheet"
-	  href="../../css/build/kalamar.css"></link>
-    <style type="text/css"
-	   rel="stylesheet">
-
-body {
-  background-color: #ffa500;
-}
-
-body, text {
-  font-family: tahoma, verdana, arial;
-  color: #444;
-}
-
-text {
-  fill: #444;
-}
-
-    </style>
-  </head>
-  <body>
-    <div id="search">
-      <ol class="align-left">
-	<li data-corpus-id="WPD"
-	    data-doc-id="WWW"
-	    data-text-id="03313"
-	    data-match-id="p102-103"
-	    data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans"
-	    id="WPD-WWW.03313-p102-103">
-	  <div>
-	    <div class="snippet startMore endMore"><span class="context-left">In diesem Beispiel ist zu sehen, dass die beiden Variablen a und b lediglich ihre Werte an die Funktion </span><span class="match">test</span><span class="context-right"> übergeben, aber im Gegensatz zu einem Referenzparamter dabei unverändert bleiben.</span></div>
-	  </div>
-	  <p class="ref"><strong>Wertparameter</strong> by Hubi,Zwobot,4; published on 2005-03-28 as WWW.03313 (WPD)</p>
-	</li>
-      </ol>
-    </div>
-
-    <script>
-var snippet = "<span title=\"cnx/l:meist\">" +
-  "  <span title=\"cnx/p:ADV\">" +
-  "    <span title=\"cnx/syn:@PREMOD\">" +
-  "      <span title=\"mate/l:meist\">" +
-  "        <span title=\"mate/p:ADV\">" +
-  "          <span title=\"opennlp/p:ADV\">meist</span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span title=\"cnx/l:deutlich\">" +
-  "  <span title=\"cnx/p:A\">" +
-  "    <span title=\"cnx/syn:@PREMOD\">" +
-  "      <span title=\"mate/l:deutlich\">" +
-  "        <span title=\"mate/m:degree:pos\">" +
-  "          <span title=\"mate/p:ADJD\">" +
-  "            <span title=\"opennlp/p:ADJD\">deutlich</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span title=\"cnx/l:fähig\">" +
-  "  <span title=\"cnx/l:leistung\">" +
-  "    <span title=\"cnx/p:A\">" +
-  "      <span title=\"cnx/syn:@NH\">" +
-  "        <span title=\"mate/l:leistungsfähig\">" +
-  "          <span title=\"mate/m:degree:comp\">" +
-  "            <span title=\"mate/p:ADJD\">" +
-  "              <span title=\"opennlp/p:ADJD\">leistungsfähiger</span>" +
-  "            </span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>";
-
-var treeSnippet =
-  "<span class=\"context-left\"></span>" +
-  "<span class=\"match\">" +
-  "  <span title=\"xip/c:MC\">" +
-  "    <span title=\"xip/c:TOP\">" +
-  "      <span title=\"xip/c:PP\">" +
-  "        <span title=\"xip/c:PREP\">Mit</span>" +
-  "        <span title=\"xip/c:NP\">" +
-  "          <span title=\"xip/c:DET\">dieser</span>" +
-  "          <span title=\"xip/c:NPA\">" +
-  "            <span title=\"xip/c:NOUN\">Methode</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:VERB\">ist</span>" +
-  "      <span title=\"xip/c:NP\">" +
-  "        <span title=\"xip/c:PRON\">es</span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:AP\">" +
-  "        <span title=\"xip/c:ADV\">nun</span>" +
-  "        <span title=\"xip/c:ADJ\">möglich</span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:ADV\">z. B.</span>" +
-  "      <span title=\"xip/c:NPA\">" +
-  "        <span title=\"xip/c:NP\">" +
-  "          <span title=\"xip/c:NOUN\">Voice</span>" +
-  "        </span>" +
-  "      </span>" + "(" +
-  "      <span title=\"xip/c:INS\">" +
-  "        <span title=\"xip/c:NPA\">" +
-  "          <span title=\"xip/c:NP\">" +
-  "            <span title=\"xip/c:NOUN\">Sprache</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" + ")" +
-  "      <span title=\"xip/c:VERB\">bevorzugt</span>" +
-  "      <span title=\"xip/c:PP\">" +
-  "        <span title=\"xip/c:PREP\">in</span>" +
-  "        <span title=\"xip/c:NP\">" +
-  "          <span title=\"xip/c:PRON\">der</span>" +
-  "        </span>" +
-  "        <span title=\"xip/c:NPA\">" +
-  "          <span title=\"xip/c:NP\">" +
-  "            <span title=\"xip/c:NOUN\">Bridge</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "      <span title=\"xip/c:INFC\">" +
-  "        <span title=\"xip/c:INS\">" +
-  "          <span title=\"xip/c:VERB\">weiterzugeben</span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span class=\"context-right\"></span>";
-
-// Parse and show the table
-// Override getMatchInfo API call
-KorAP.API.getMatchInfo = function(match, callObj) {
-  if (callObj["spans"] !== undefined && callObj["spans"] === true) {
-    return { "snippet": treeSnippet };
-  }
-  else {
-    return { "snippet": snippet };
-  }
-};
-
-KorAP.init();
-    </script>
-
-    <!--
-    <div class="matchinfo">
-      <div class="matchtable">
-	<table>
-	  <thead>
-            <tr>
-	      <th>Foundry</th>
-	      <th>Layer</th>
-	      <th>Ich</th>
-	      <th>Du</th>
-	      <th>Er</th>
-	    </tr>
-	  </thead>
-	  <tbody>
-	    <tr tabindex="0">
-	      <th>Hallo</th>
-	      <th>X</th>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	    </tr>
-	    <tr tabindex="0">
-	      <th>geht</th>
-	      <th>y</th>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	    </tr>
-	    <tr tabindex="0">
-	      <th>es</th>
-	      <th>z</th>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	      <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td>
-	    </tr>
-	  </tbody>
-	</table>
-      </div>
-    </div>
-    -->
-
-  </body>
-</html>
diff --git a/public/js/demo/matchSort.html b/public/js/demo/matchSort.html
deleted file mode 100644
index 860560e..0000000
--- a/public/js/demo/matchSort.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Match demo</title>
-    <meta charset="utf-8" />
-    <link type="text/css"
-	  rel="stylesheet"
-	  href="../../css/build/kalamar.css"></link>
-    <style type="text/css"
-	   rel="stylesheet">
-body {
-  background-color: #ffa500;
-}
-    </style>
-  </head>
-  <body>
-    <div id="search">
-      <ol class="align-left">
-	<li data-corpus-id="WPD"
-	    data-doc-id="WWW"
-	    data-text-id="03313"
-	    data-match-id="p102-103"
-	    data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans"
-	    id="WPD-WWW.03313-p102-103">
-	  <div>
-	    <div class="snippet startMore endMore"><span class="context-left">In diesem Beispiel ist zu sehen, dass die beiden Variablen a und b lediglich ihre Werte an die Funktion </span><span class="match">test</span><span class="context-right"> übergeben, aber im Gegensatz zu einem Referenzparamter dabei unverändert bleiben.</span></div>
-	  </div>
-	  <p class="ref"><strong>Wertparameter</strong> by Hubi,Zwobot,4; published on 2005-03-28 as WWW.03313 (WPD)</p>
-	</li>
-	<li data-corpus-id="WPD"
-	    data-doc-id="WWW"
-	    data-text-id="03313"
-	    data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans"
-	    id="WPD-WWW.03313-p102-103">
-	  <ol>
-	    <li data-match-id="p102-103">
-	      <div>
-		<div class="snippet startMore endMore"><span class="context-left">In diesem Beispiel ist zu sehen, dass die beiden Variablen a und b lediglich ihre Werte an die Funktion </span><span class="match">test</span><span class="context-right"> übergeben, aber im Gegensatz zu einem Referenzparamter dabei unverändert bleiben.</span></div>
-	      </div>
-	      <p class="ref"><strong>Wertparameter</strong> by Hubi,Zwobot,4; published on 2005-03-28 as WWW.03313 (WPD)</p>
-	    </li>
-	    <li data-match-id="p108-109">
-	      <div>
-		<div class="snippet startMore endMore"><span class="context-left">In diesem Beispiel ist zu sehen, dass die beiden Variablen a und b lediglich ihre Werte an die Funktion </span><span class="match">test</span><span class="context-right"> übergeben, aber im Gegensatz zu einem Referenzparamter dabei unverändert bleiben.</span></div>
-	      </div>
-	      <p class="ref"><strong>Wertparameter</strong> by Hubi,Zwobot,4; published on 2005-03-28 as WWW.03313 (WPD)</p>
-	    </li>
-	  </ol>
-	  <span class="matchMore">+5</span>
-	</li>
-      </ol>
-    </div>
-
-
-    <p>Sort by</p>
-    <p>click auf ein Item gibt ihm höchste Priorität, Klick auf asc/desc ändert die Sortierung, Klick auf ein aktives Feld deaktiviert. Sortiert wird nur nach Klick auf (okay) if prefix feld</p>
-    <ul class="menu sort">
-      <li class="active">CorpusID (asc|desc)</li>
-      <li class="active">Author (asc|desc)</li>
-      <li>Date</li>
-      <span class="pref right" style="right: 0; left: auto;">Sortieren</span>
-    </ul>
-
-  </body>
-</html>
diff --git a/public/js/demo/menu.html b/public/js/demo/menu.html
deleted file mode 100644
index 985be65..0000000
--- a/public/js/demo/menu.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Menu demo</title>
-    <meta charset="utf-8" />
-    <script src="../src/menu.js"></script>
-<!--
-    <link href="../../css/vc.css" rel="stylesheet" type="text/css"></link>
--->
-    <link href="../../css/build/kalamar.css" rel="stylesheet" type="text/css"></link>
-    <style type="text/css" rel="stylesheet">
-.info {
-  background-color: #ddd;
-  color: black;
-  padding: 1em;
-  font-family: mono;
-}
-body {
-  margin: 0;
-  background-color: #ddd;
-}
-    </style>
-  </head>
-  <body>
-    <div style="position: absolute; background-color: #7ba400; height: 50px; width: 100%;"></div>
-
-    <div id="menu" class="vc"></div>
-
-    <main>
-      <div>
-	<div id="pagination"><a rel="prev"><span><i class="fa fa-caret-left"></i></span></a><a rel="self"><span>1</span></a><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&amp;ql=poliqarp&amp;p=2"><span>2</span></a><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&amp;ql=poliqarp&amp;p=3"><span>3</span></a><span><i class="fa fa-ellipsis-h"></i></span><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&amp;ql=poliqarp&amp;p=52230"><span>52230</span></a><a rel="next" href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&amp;ql=poliqarp&amp;p=2"><span><i class="fa fa-caret-right"></i></span></a></div>
-      </div>
-    </main>
-
-    <script>
-KorAP.OwnMenuItem = {
-  create : function (params) {
-    return Object.create(KorAP.MenuItem).upgradeTo(KorAP.OwnMenuItem)._init(params);
-  },
-  content : function (content) {
-    if (arguments.length === 1) {
-      this._content = content;
-    };
-    return this._content;
-  },
-
-  // enter or click
-  onclick : function () {
-    console.log(this._name);
-  },
-
-  // right arrow
-  further : function () {
-    console.log("Further: " + this._name);
-  },
-  _init : function (params) {
-    if (params[0] === undefined)
-      throw new Error("Missing parameters");
-
-    this._name = params[0];
-    this._content = document.createTextNode(this._name);
-    this._lcField = ' ' + this.content().textContent.toLowerCase();
-
-    return this;
-  }
-};
-
-KorAP.OwnPrefix = {
-  create : function () {
-    return Object.create(KorAP.MenuPrefix)
-      .upgradeTo(KorAP.OwnPrefix)
-      ._init();
-  },
-  onclick : function () {
-    console.log('Prefix: ' + this.value());
-  }
-}
-
-KorAP.OwnMenu = {
-  create : function (params) {
-    return Object.create(KorAP.Menu)
-      .upgradeTo(KorAP.OwnMenu)
-      ._init(KorAP.OwnMenuItem, KorAP.OwnPrefix, params);
-  }
-};
-
-var menu = KorAP.OwnMenu.create([
-  ['Titel', 'title', 'string'],
-  ['Untertitel', 'subTitle', 'string'],
-  ['Veröffentlichungsdatum', 'pubDate', 'date'],
-  ['Länge', 'length', 'integer'],
-  ['Autor', 'author', 'string'],
-  ['Genre', 'genre', 'string'],
-  ['corpusID', 'corpusID', 'string'],
-  ['docID', 'docID', 'string'],
-  ['textID', 'textID', 'string']
-]);
-
-    document.getElementById('menu').appendChild(menu.element());
-
-    menu.limit(3);
-    menu.show('');
-    menu.focus();
-
-    </script>
-  </body>
-</html>
diff --git a/public/js/demo/session.html b/public/js/demo/session.html
deleted file mode 100644
index 59cfe4f..0000000
--- a/public/js/demo/session.html
+++ /dev/null
@@ -1,44 +0,0 @@
- <!DOCTYPE html>
-<html>
-  <head>
-    <title>Cookie demo</title>
-    <script src="../src/session.js"></script>
-    <script>
-
-var cookey;
-
-function add (val) {
-  var list = document.getElementById('number');
-  list.textContent += '-' + val;
-  cookey.set('n', list.textContent);
-};
-
-function removeCookie () {
-  cookey.clear();
-};
-
-document.addEventListener('DOMContentLoaded', function () {
-  cookey = KorAP.Session.create('peter');
-  document.getElementById('number').textContent = cookey.get('n') || '';
-
-  var elements =   document.getElementsByClassName('num');
-  for (var i = 0; i < elements.length; i++) {
-    elements[i].addEventListener(
-      'click',
-      function (e) {
-        add(this.textContent);
-      }
-    );
-  };
-});
-
-    </script>
-  </head>
-  <body>
-    <div id="number"></div>
-    <span class="num">1</span>
-    <span class="num">2</span>
-    <span class="num">3</span>
-    <div onclick="removeCookie()">remove</div>
-  </body>
-</html>
diff --git a/public/js/demo/vc.html b/public/js/demo/vc.html
deleted file mode 100644
index ae6aef1..0000000
--- a/public/js/demo/vc.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Virtual Collection demo</title>
-    <meta charset="utf-8" />
-    <script src="../src/menu.js"></script>
-    <script src="../src/vc.js"></script>
-    <link href="../../css/build/kalamar.css" rel="stylesheet" type="text/css"></link>
-    <style type="text/css" rel="stylesheet">
-
-body {
-  background-color: #7ba400;
-  color: white;
-  font-family: tahoma, verdana, arial;
-  font-size: 10pt;
-  margin: 20px;
-}
-
-.info {
-  background-color:white;
-  color: black;
-  padding: 1em;
-  font-family: mono;
-}
-    </style>
-  </head>
-  <body>
-    <div id="vc"></div>
-    <div id="menu" class="vc"></div>
-
-    <script>
-    var json = {
-      "@type":"koral:docGroup",
-      "operation":"operation:or",
-      "operands":[
-        {
-          "@type":"koral:docGroup",
-          "operation":"operation:and",
-          "operands":[
-            {
-              "@type":"koral:doc",
-              "key":"Titel",
-              "value":"Der Birnbaum",
-              "match":"match:eq"
-            },
-            {
-              "@type":"koral:doc",
-              "key":"Veröffentlichungsort",
-              "value":"Mannheim",
-              "match":"match:eq"
-            },
-            {
-              "@type":"koral:docGroup",
-              "operation":"operation:or",
-              "operands":[
-                {
-                  "@type":"koral:doc",
-                  "key":"Untertitel",
-                  "value":"Aufzucht und Pflege",
-                  "match":"match:eq"
-                },
-                {
-                  "@type":"koral:doc",
-                  "key":"Untertitel",
-                  "value":"Gedichte",
-                  "match":"match:eq",
-                  "rewrites" : [
-                    {
-                      "@type": "koral:rewrite",
-                      "src" : "policy",
-                      "operation" : "operation:injection",
-                    }
-                  ]
-                }
-              ]
-            }
-          ]
-        },
-        {
-          "@type":"koral:doc",
-          "key":"Veröffentlichungsdatum",
-          "type":"type:date",
-          "value":"2015-03-05",
-          "match":"match:geq"
-        }
-      ]
-    };
-    KorAP.Locale.AND = 'und';
-    KorAP.Locale.OR  = 'oder';
-
-    var vc = KorAP.VirtualCollection.render(json);
-    document.getElementById('vc').appendChild(vc.element());
-
-    function showJSON() {
-      document.getElementById("json").innerHTML = JSON.stringify(vc.root().toJson());
-    };
-
-    function showQuery() {
-      document.getElementById("query").innerHTML = vc.root().toQuery();
-    };
-
-    </script>
-
-    <hr />
-
-    <p><a onclick="showJSON()" style="cursor:pointer">show JSON!</a></p>
-    <div id="json" class="info"></div>
-
-    <hr />
-
-    <p><a onclick="showQuery()" style="cursor:pointer">show Query!</a></p>
-    <div id="query" class="info"></div>
-
-  </body>
-</html>
diff --git a/public/js/highlight.pack.js b/public/js/highlight.pack.js
deleted file mode 100644
index 6c71f03..0000000
--- a/public/js/highlight.pack.js
+++ /dev/null
@@ -1 +0,0 @@
-var hljs=new function(){function k(v){return v.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+k(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T<V.c.length;T++){if(i(V.c[T].bR,U)){return V.c[T]}}}function z(U,T){if(i(U.eR,T)){return U}if(U.eW){return z(U.parent,T)}}function A(T,U){return !J&&i(U.iR,T)}function E(V,T){var U=M.cI?T[0].toLowerCase():T[0];return V.k.hasOwnProperty(U)&&V.k[U]}function w(Z,X,W,V){var T=V?"":b.classPrefix,U='<span class="'+T,Y=W?"":"</span>";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:k(L)}}else{throw O}}}function g(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:k(y)};var w=v;x.forEach(function(z){if(!j(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function h(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(z){var y=d(z);var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):g(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=h(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function e(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function j(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=g;this.fixMarkup=h;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=e;this.getLanguage=j;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/</,r:0,c:[d,{cN:"attribute",b:c,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true,}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}});
\ No newline at end of file
diff --git a/public/js/hint.js b/public/js/hint.js
deleted file mode 100644
index ddf80b1..0000000
--- a/public/js/hint.js
+++ /dev/null
@@ -1,858 +0,0 @@
-"use strict";
-
-/*
- * Todo:
- * - limit the view based on prefix matches
- * - highlight matching substrings
- * - http://www.cryer.co.uk/resources/javascript/script20_respond_to_keypress.htm
- * - document.removeEventListener("click",arguments.callee,false);
- */
-
-// Don't let events bubble up
-Event.prototype.halt = function () {
-  this.stopPropagation();
-  this.preventDefault();
-};
-
-// http://www.nlpado.de/~sebastian/software/ner_german.shtml
-// http://www.cnts.ua.ac.be/conll2003/ner/
-var namedEntities = [
-  ["I-LOC",  "I-LOC ",  "Location"],
-  ["I-MISC", "I-MISC ", "Miscellaneous"],
-  ["I-ORG",  "I-ORG ",  "Organization"],
-  ["I-PER",  "I-PER ",  "Person"]
-];
-
-// http://www.ids-mannheim.de/cosmas2/projekt/referenz/stts/morph.html
-// http://nachhalt.sfb632.uni-potsdam.de/owl-docu/stts.html
-var sttsArray = [
-  // "$.", "$(", "$,"
-  ["ADJA","ADJA ", "Attributive Adjective"],
-  ["ADJD","ADJD ", "Predicative Adjective"],
-  ["ADV","ADV ", "Adverb"],
-  ["APPO","APPO ", "Postposition"],
-  ["APPR","APPR ", "Preposition"],
-  ["APPRART","APPRART ", "Preposition with Determiner"],
-  ["APZR","APZR ","Right Circumposition"],
-  ["ART","ART ", "Determiner"],
-  ["CARD","CARD ", "Cardinal Number"],
-  ["FM","FM ", "Foreign Material"],
-  ["ITJ","ITJ ", "Interjection"],
-  ["KOKOM","KOKOM ", "Comparison Particle"],
-  ["KON","KON ", "Coordinating Conjuncion"],
-  ["KOUI","KOUI ", "Subordinating Conjunction with 'zu'"],
-  ["KOUS","KOUS ", "Subordinating Conjunction with Sentence"],
-  ["NE","NE ", "Named Entity"],
-  ["NN","NN ", "Normal Nomina"],
-  ["PAV", "PAV ", "Pronominal Adverb"],
-  ["PDAT","PDAT ","Attributive Demonstrative Pronoun"],
-  ["PDS","PDS ", "Substitutive Demonstrative Pronoun"],
-  ["PIAT","PIAT ", "Attributive Indefinite Pronoun without Determiner"],
-  ["PIDAT","PIDAT ", "Attributive Indefinite Pronoun with Determiner"],
-  ["PIS","PIS ", "Substitutive Indefinite Pronoun"],
-  ["PPER","PPER ", "Personal Pronoun"],
-  ["PPOSAT","PPOSAT ", "Attributive Possessive Pronoun"],
-  ["PPOSS","PPOSS ", "Substitutive Possessive Pronoun"],
-  ["PRELAT","PRELAT ", "Attributive Relative Pronoun"],
-  ["PRELS","PRELS ", "Substitutive Relative Pronoun"],
-  ["PRF","PRF ", "Reflexive Pronoun"],
-  ["PROAV","PROAV ", "Pronominal Adverb"],
-  ["PTKA","PTKA ","Particle with Adjective"],
-  ["PTKANT","PTKANT ", "Answering Particle"],
-  ["PTKNEG","PTKNEG ", "Negation Particle"],
-  ["PTKVZ","PTKVZ ", "Separated Verbal Particle"],
-  ["PTKZU","PTKZU ", "'zu' Particle"],
-  ["PWAT","PWAT ", "Attributive Interrogative Pronoun"],
-  ["PWAV","PWAV ", "Adverbial Interrogative Pronoun"],
-  ["PWS","PWS ", "Substitutive Interrogative Pronoun"],
-  ["TRUNC","TRUNC ","Truncated"],
-  ["VAFIN","VAFIN ", "Auxiliary Finite Verb"],
-  ["VAINF","VAINF ", "Auxiliary Infinite Verb"],
-  ["VAIMP","VAIMP ", "Auxiliary Finite Imperative Verb"],
-  ["VAPP","VAPP ", "Auxiliary Perfect Participle"],
-  ["VMFIN","VMFIN ", "Modal Finite Verb"],
-  ["VMINF","VMINF ", "Modal Infinite Verb"],
-  ["VMPP","VMPP ", "Modal Perfect Participle"],
-  ["VVFIN","VVFIN ","Finite Verb"],
-  ["VVIMP","VVIMP ", "Finite Imperative Verb"],
-  ["VVINF","VVINF ", "Infinite Verb"],
-  ["VVIZU","VVIZU ", "Infinite Verb with 'zu'"],
-  ["VVPP","VVPP ", "Perfect Participle"],
-  ["XY", "XY ", "Non-Word"]
-];
-
-var mateSttsArray = sttsArray.slice(0);
-mateSttsArray.push(
-  ["<root-POS>","<root-POS>","Root Part of Speech"]
-);
-
-
-var hintArray = {
-  "-" : [
-    ["Connexor",   "cnx/",     "Constituency, Lemma, Morphology, Part-of-Speech, Syntax"],
-    ["CoreNLP",    "corenlp/", "Named Entities"],
-    ["Mate",       "mate/",     "Lemma, Morphology, Part-of-Speech"],
-    ["OpenNLP",    "opennlp/", "Part-of-Speech"],
-    ["TreeTagger", "tt/",      "Lemma, Part-of-Speech"],
-    ["Xerox Parser", "xip/",   "Constituency, Lemma, Part-of-Speech"]
-  ],
-  "corenlp/" : [
-    ["Named Entity", "ne=" , "Combined"],
-    ["Named Entity", "ne_dewac_175m_600=" , "ne_dewac_175m_600"],
-    ["Named Entity", "ne_hgc_175m_600=",    "ne_hgc_175m_600"]
-  ],
-  "corenlp/ne=" : namedEntities,
-  "corenlp/ne_dewac_175m_600=" : namedEntities,
-  "corenlp/ne_hgc_175m_600=" : namedEntities,
-  "cnx/" : [
-    ["Constituency", "c="],
-    ["Lemma", "l="],
-    ["Morphology", "m="],
-    ["Part-of-Speech", "p="],
-    ["Syntax", "syn="]
-  ],
-  "cnx/c=" : [
-    ["np", "np ", "Nominal Phrase"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
-  "cnx/m=" : [
-    ["Abbr","Abbr ", "Nouns: Abbreviation"],
-    ["CMP","CMP ", "Adjective: Comparative"],
-    ["IMP", "IMP ", "Mood: Imperative"],
-    ["IND", "IND ", "Mood: Indicative"],
-    ["INF", "INF ", "Infinitive"],
-    ["ORD","ORD ", "Numeral: Ordinal"],
-    ["PAST", "PAST ", "Tense: past"],
-    ["PCP", "PCP ", "Participle"],
-    ["PERF", "PERF ", "Perfective Participle"],
-    ["PL","PL ", "Nouns: Plural"],
-    ["PRES", "PRES ", "Tense: present"],
-    ["PROG", "PROG ", "Progressive Participle"],
-    ["Prop","Prop ", "Nouns: Proper Noun"],
-    ["SUB", "SUB ", "Mood: Subjunctive"],
-    ["SUP","SUP ", "Adjective: Superlative"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
-  "cnx/p=" : [
-    ["A", "A ", "Adjective"],
-    ["ADV", "ADV ", "Adverb"],
-    ["CC", "CC ", "Coordination Marker"],
-    ["CS", "CS ", "Clause Marker"],
-    ["DET", "DET ", "Determiner"],
-    ["INTERJ", "INTERJ ", "Interjection"],
-    ["N", "N ", "Noun"],
-    ["NUM", "NUM ", "Numeral"],
-    ["PREP", "PREP ", "Preposition"],
-    ["PRON", "PRON ", "Pro-Nominal"],
-    ["V", "V ", "Verb"]
-  ],
-  // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/syntax.html
-  "cnx/syn=" : [
-    ["@ADVL", "@ADVL ", "Adverbial Head"],
-    ["@AUX", "@AUX ", "Auxiliary Verb"],
-    ["@CC", "@CC ", "Coordination"]
-    ["@MAIN", "@MAIN ", "Main Verb"],
-    ["@NH", "@NH ", "Nominal Head"],
-    ["@POSTMOD", "@POSTMOD ", "Postmodifier"],
-    ["@PREMARK", "@PREMARK ", "Preposed Marker"],
-    ["@PREMOD", "@POSTMOD ", "Premodifier"]
-  ],
-  "opennlp/" : [
-    ["Part-of-Speech", "p="]
-  ],
-  "opennlp/p=" : sttsArray,
-  "xip/" : [
-    ["Constituency", "c="],
-    // Inactive: ["Dependency", "d="],
-    ["Lemma", "l="],
-    ["Part-of-Speech", "p="],
-  ],
-  // "xip/c=" : [],
-  // Inactive: "xip/d=" : [],
-  // "xip/p=" : [],
-  "tt/" : [
-    ["Lemma", "l="],
-    ["Part-of-Speech", "p="]
-  ],
-  "tt/p=" : sttsArray,
-  "mate/" : [
-    // Inactive: "d" : ["d=", "Dependency"],
-    ["Lemma", "l="],
-    ["Morphology", "m="],
-    ["Part-of-Speech", "p="]
-  ],
-  // Inactive: mate/d=
-  "mate/p=" : mateSttsArray,
-  "mate/m=" : [
-    ["Case", "case:"],
-    ["Degree", "degree:"],
-    ["Gender", "gender:"],
-    ["Mood", "mood:"],
-    ["Number", "number:"],
-    ["Person", "person:"],
-    ["Tense","tense:"],
-    ["No type", "<no-type> "]
-  ],
-  "mate/m=case:" : [
-    ["acc", "acc ", "Accusative"],
-    ["dat","dat ", "Dative"],
-    ["gen", "gen ","Genitive"],
-    ["nom","nom ", "Nominative"],
-    ["*","* ", "Undefined"]
-  ],
-  "mate/m=degree:" : [
-    ["comp","comp ", "Comparative"],
-    ["pos","pos ", "Positive"],
-    ["sup","sup ", "Superative"]
-  ],
-  "mate/m=gender:" : [
-    ["fem", "fem ", "Feminium"],
-    ["masc", "masc ", "Masculinum"],
-    ["neut","neut ", "Neuter"],
-    ["*","* ","Undefined"]
-  ],
-  "mate/m=mood:" : [
-    ["imp","imp ", "Imperative"],
-    ["ind","ind ", "Indicative"],
-    ["subj","subj ", "Subjunctive"]
-  ],
-  "mate/m=number:" : [
-    ["pl","pl ","Plural"],
-    ["sg","sg ","Singular"],
-    ["*","* ","Undefined"]
-  ],
-  "mate/m=person:" : [
-    ["1","1 ", "First Person"],
-    ["2","2 ", "Second Person"],
-    ["3","3 ", "Third Person"]
-  ],
-  "mate/m=tense:" : [
-    ["past","past ", "Past"],
-    ["pres","pres ", "Present"]
-  ]
-};
-
-
-/**
- * Analyze strings for prefixes
- */
-var PrefixAnalyzer = {
-  _regex : new RegExp(
-    "(?:^|[^-_a-zA-Z0-9])" +   // Anchor
-    "((?:[-_a-zA-Z0-9]+?)\/" + // Foundry
-    "(?:" +
-    "(?:[-_a-zA-Z0-9]+?)=" +   // Layer
-    "(?:(?:[^:=\/ ]+?):)?" +  // Key
-    ")?" +
-    ")$"),
-  analyze : function (text) {
-    if (!this._regex.exec(text))
-      return undefined;
-    return RegExp.$1
-  }
-};
-
-function codeFromEvent (e) {
-  if ((e.charCode) && (e.keyCode==0))
-    return e.charCode
-  return e.keyCode;
-};
-
-
-/*
- * Event handling after a key is down
- * for arrows!
- */
-function updateKeyDown (that, e) {
-  var code = codeFromEvent(e);
-  var menu = that.menu();
-
-  /*
-   * keyCodes:
-   * - Down  = 40
-   * - Esc   = 27
-   * - Up    = 38
-   * - Enter = 13
-   * - shift = 16
-   * for characters use e.key
-   */
-  switch (code) {
-  case 27: // 'Esc'
-    // Hide menu
-    menu.hide();
-    break;
-  case 40: // 'Down'
-    e.halt(); // No event propagation
-
-    // Menu is not active
-    if (!menu.active) {
-      that.popUp()
-    }
-    // Menu is active
-    else {
-      that.removePrefix();
-      menu.next();
-    };
-
-    break;
-  case 38: // "Up"
-    if (!menu.active)
-      break;
-    e.halt(); // No event propagation
-    that.removePrefix();
-    menu.prev();
-    break;
-  case 13: // "Enter"
-    if (!menu.active)
-      break;
-    e.halt(); // No event propagation
-    that.insertText(menu.getActiveItem().getAction());
-    that.removePrefix();
-    
-    // Remove menu
-    menu.hide();
-
-    // Fill this with the correct value
-    // Todo: This is redundant with click function
-    var show;
-    if ((show = that.analyzeContext()) != "-") {
-      menu.show(show);
-      menu.update(
-        e.target.getBoundingClientRect().right
-      );
-    };
-    
-    break;
-  default:
-    if (!menu.active)
-      return;
-
-    // Surpress propagation in firefox
-    if (e.key !== undefined && e.key.length != 1) {
-      menu.hide();
-    };
-  };
-};
-
-/**
- * Event handling after a key pressed
- * for characters!
- */
-function updateKeyPress (that, e) {
-  var character = String.fromCharCode(codeFromEvent(e));
-  var menu = that.menu();
-
-  if (!menu.active)
-    return;
-
-  e.halt(); // No event propagation
-    
-  // Try to identify prefix
-  if (menu.skipToPrefix(character))
-    return;
-
-  // Prefix not found
-  that.insertPrefix();
-  menu.hide();
-};
-
-
-
-// new hint object
-var Hint = {
-  _search   : undefined,   // Return the search element
-  _mirror   : undefined,   // Return the mirror element
-  _menu     : undefined,
-  _analyzer : undefined,
-  firstTry  : true,
-  menu : function () {
-    // In case this wasn't defined yet
-    if (this._menu === undefined) {
-      this._menu = Object.create(Menu).init();
-      this._mirror.appendChild(this._menu.getElement());
-    };
-    return this._menu;
-  },
-
-  // Initialize the object
-  init : function () {
-    this._search = document.getElementById("q-field");
-    this._mirror = document.createElement("div");
-    this._mirror.setAttribute("id", "searchMirror");
-    this._mirror.appendChild(document.createElement("span"));
-    document.getElementsByTagName("body")[0].appendChild(this._mirror);
-
-    this._analyzer = Object.create(PrefixAnalyzer);
-
-    // Update positional information, in case the windows size changes    
-    var that = this;
-    window.onresize = function () { that.reposition() };
-
-    // Add event listener for key pressed down
-    this._search.addEventListener(
-      "keypress",
-      function (e) {
-	updateKeyPress(that, e)
-      },
-      false
-    );
-
-    // Add event listener for key pressed down
-    this._search.addEventListener(
-      "keydown",
-      function (e) {
-	updateKeyDown(that, e)
-      },
-      false
-    );
-
-    // Reposition the mirror
-    this.reposition();
-
-    // Return object for chaining
-    return this;
-  },
-
-  // Popup method
-  popUp : function () {
-    if (this.active)
-      return;
-
-    // Reposition hint list on first try
-    if (this.firstTry)
-      this.reposition().firstTry = false;
-
-    // Update view
-    this.update();
-
-    // Fill this with the correct value
-    if (this.menu().show(this.analyzeContext())) {
-      this.update(
-        this._search.getBoundingClientRect().right
-      );
-    }
-    else {
-      this.menu().hide();
-    };
-
-    this._search.focus();
-  },
-
-  // Reposition the mirror object
-  reposition : function () {
-
-    // Update style properties
-    var searchRect  = this._search.getBoundingClientRect();
-    var searchStyle = window.getComputedStyle(this._search, null);
-    var mStyle = this._mirror.style;
-    mStyle.left = searchRect.left + "px";
-    mStyle.top  = searchRect.bottom + "px";
-    mStyle.borderLeftColor = "transparent";
-    mStyle.height          = "1px";
-    mStyle.paddingLeft     = searchStyle.getPropertyValue("padding-left");
-    mStyle.marginLeft      = searchStyle.getPropertyValue("margin-left");
-    mStyle.borderLeftWidth = searchStyle.getPropertyValue("border-left-width");
-    mStyle.borderLeftStyle = searchStyle.getPropertyValue("border-left-style");
-    mStyle.fontSize        = searchStyle.getPropertyValue("font-size");
-    mStyle.fontFamily      = searchStyle.getPropertyValue("font-family");
-    return this;
-  },
-
-  // Reposition the menu object
-  update : function () {
-    var s = this._search;
-    var start = s.selectionStart;
-    this._mirror.firstChild.textContent = s.value.substring(0, start);
-  },
-
-  analyzeContext : function () {
-    var context = this._splitInputText()[0];
-    if (context === undefined || context.length === 0)
-      return "-";
-    context = this._analyzer.analyze(context);
-    if (context === undefined || context.length === 0)
-      return "-";
-
-    if (!hintArray[context])
-      return "-";
-
-    return context;
-  },
-
-  _splitInputText : function () {
-    var s = this._search;
-    var value = s.value;
-    var start = s.selectionStart;
-    var begin = value.substring(0, start);
-    var end   = value.substring(start, value.length);
-    return new Array(begin, end);
-  },
-
-  // Insert text at the current cursor position
-  insertText : function (text) {
-    var s = this._search;
-    var splitText = this._splitInputText();
-    s.value          = splitText[0] + text + splitText[1];
-    s.selectionStart = (splitText[0] + text).length
-    s.selectionEnd   = s.selectionStart;
-    this._mirror.firstChild.textContent = splitText[0] + text;
-  },
-
-  // Remove stored prefix 
-  removePrefix : function () {
-    this.menu()._prefix = undefined;
-  },
-
-  // Insert stored prefix at current cursor position
-  insertPrefix : function () {
-    if (this.menu()._prefix === undefined)
-      return;
-    this.insertText(this.menu()._prefix);
-  }
-};
-
-
-/**
-* Menu list
-*/
-var Menu = {
-  active     : false,
-  _element   : undefined,
-  _position  : 0,   // Position of menu item
-  _offset    : 0,   // Visual offset for chosen highlight
-  _size      : 8,  // Number of items to be shown
-  _items     : [],  // Items for menu
-  _name      : undefined,
-  _prefix    : undefined,
-  getElement : function () {
-    return this._element;
-  },
-  init : function () {
-    this._element = document.createElement("ul");
-
-    // Add onclick event
-    // Todo: Probably better do this for each <li />
-    this._element.addEventListener("click", chooseHint, false);
-
-    this._element.style.opacity = 0;
-    this.active = false;
-    this._setDefaults();
-    return this;
-  },
-  update : function (searchRightPosition) {
-    var infoRightPosition = this._element.getBoundingClientRect().right;
-    if (infoRightPosition > searchRightPosition) {
-      this._element.style.marginLeft = '-' + (infoRightPosition - searchRightPosition) + 'px';
-    };
-    return this;
-  },
-  next : function () {
-    if (!this.active)
-      return;
-    this._clearView();
-    this._position++;
-
-    // In case the list is bigger than the view
-    if (this._items.length > this._size) {
-      if (this._position >= this._items.length) {
-	// Roll to top
-	this._offset = 0;
-	this._position = 0;
-	this._showItems(0);
-      }
-      else if (this._position >= (this._size + this._offset)) {
-	// Roll down
-	this._element.removeChild(this._element.firstChild);
-	this._offset++;
-	this._element.appendChild(this.getItem(this._position).getElement());
-      };
-    }
-    else if (this._position >= this._items.length) {
-      this._position = 0;
-    };
-    this._updateView();
-  },
-  prev : function () {
-    if (!this.active)
-      return;
-    this._clearView();
-    this._position--;
-
-    // In case the list is bigger than the view
-    if (this._items.length > this._size) {
-      if (this._position < 0) {
-	// roll to bottom
-	this._setToLast();
-	this._offset = (this._position - this._size) + 1;
-	this._showLastItems();
-      }
-      else if (this._position < this._offset) {
-	// roll up
-	this._element.removeChild(this._element.lastChild);
-	this._offset--;
-	this._element.insertBefore(
-	  this.getItem(this._position).getElement(),
-	  this._element.firstChild
-	);
-      };
-    }
-    else if (this._position < 0) {
-      this._setToLast();
-    };
-    this._updateView();
-  },
-  skipToPrefix : function (prefix) {
-    if (this._prefix === undefined)
-      this._prefix = prefix.toLocaleLowerCase();
-    else
-      this._prefix += prefix.toLocaleLowerCase();
-
-    var pos = 0;
-    var found = false;
-    var good = -1;
-    var test;
-    for (; pos < this._items.length; pos++) {
-      if ((test = this.getItem(pos).getLCName().indexOf(this._prefix)) != -1) {
-	if (test == 0) {
-	  found = true;
-	  break;
-	};
-	good = pos;
-      };
-    };
-
-    // Perfect prefix
-    if (found)
-      return this.skipToPos(pos);
-    // At least infix
-    else if (good != -1)
-      return this.skipToPos(good);
-    // No
-    return false;
-  },
-  skipToPos : function (index) {
-    if (!this.active)
-      return false;
-    if (index < 0 || index >= this._items.length)
-      return false;
-
-    this._clearView();
-    this._position = index;
-
-    if (index < this._offset || index >= (this._offset + this._size)) {
-
-      // Index is in the final frame
-      if (index >= (this._items.length - this._size)) {
-	this._offset = this._items.length - this._size;
-	this._showLastItems();
-      }
-
-      // Index is in the final frame
-      else {
-	this._offset = index;
-	this._showItems(index);
-      };
-    };
-
-    // Activate new position
-    this._updateView();
-    return true;
-  },
-  show : function (name) {
-    // The element is already given
-    if (this._name != name) {
-
-      // Todo: store hints in hash
-
-      // Delete items
-      this._items.length = 0;
-
-      var items = hintArray[name];
-
-      // Hints not found
-      if (items === undefined)
-	return undefined;
-
-      var i;
-      for (i in items) {
-	var item = Object.create(MenuItem).init(items[i]);
-	this._items.push(item);
-      };
-
-      // Add classes for rolling menus
-      this.getItem(0).getElement().classList.add("no-more");
-      this.getItem(i).getElement().classList.add("no-more");
-
-      this._name = name;
-    };
-    this._showItems(0);
-    this._element.style.opacity = 1;
-    this._setDefaults();
-    this.active = true;
-    this._updateView();
-    return true;
-  },
-  hide : function () {
-    this._element.style.opacity = 0;
-    if (this.active)
-      this.getActiveItem().deactivate();
-    this._setDefaults();
-    this.active = false;
-  },
-  getActiveItem : function () {
-    return this._items[this._position];
-  },
-  getItem : function (index) {
-    return this._items[index];
-  },
-  getPrefix : function () {
-    return this._prefix;
-  },
-  _setDefaults : function () {
-    this._offset = 0;
-    this._position = 0;
-    this._prefix = undefined;
-  },
-  // Remove all visible list items
-  _deleteMenu : function () {
-    var child;
-    while (child = this._element.firstChild)
-      this._element.removeChild(child);
-  },
-  _clearView : function () {
-    var active = this.getActiveItem();
-    if (active !== undefined)
-      active.deactivate();
-  },
-  _updateView : function () {
-    var active = this.getActiveItem();
-    if (active !== undefined)
-      active.activate();
-  },
-
-  // Make all list items visible starting at a certain offset
-  _showItems : function (offset) {
-    this._deleteMenu();
-    for (var i = offset; i < this._size + offset; i++) {
-      if (i >= this._items.length)
-	break;
-      this._element.appendChild(
-	this._items[i].getElement()
-      )
-    };
-  },
-
-  // Make all final list items visible
-  _showLastItems : function () {
-    this._deleteMenu();
-    for (var i = (this._items.length - 1); i >= (this._items.length - this._size); i--) {
-      if (i < 0)
-	break;
-      if (!this._element.firstChild)
-	this._element.appendChild(this._items[i].getElement());
-      else
-	this._element.insertBefore(
-	  this._items[i].getElement(),
-	  this._element.firstChild
-	);
-    };
-  },
-  _setToLast : function () {
-    this._position = this._items.length - 1;
-  }
-};
-
-function chooseHint (e) {
-  var element = e.target;
-  while (element.nodeName == "STRONG" || element.nodeName == "SPAN") {
-    element = element.parentNode;
-  };
-  if (element === undefined || element.nodeName != "LI")
-    return;
-
-  // console.log(this.getAttribute('data-action'));
-
-  var action = element.getAttribute('data-action');
-  hint.insertText(action);
-  var menu = hint.menu();
-  menu.hide();
-
-  // Fill this with the correct value
-  var show;
-  if ((show = hint.analyzeContext()) != "-") {
-    menu.show(show);
-    menu.update(
-      hint._search.getBoundingClientRect().right
-    );
-  };
-
-  hint._search.focus();
-};
-
-var MenuItem = {
-  _name    : undefined,
-  _lcname  : undefined,
-  _desc    : undefined,
-  _element : undefined,
-  _action  : "",
-  activate : function () {
-    this._element.classList.add("active");
-  },
-  deactivate : function () {
-    this._element.classList.remove("active");
-  },
-  // Initialize this item
-  init : function (param) {
-    this._name = param[0];
-    this._action = param[1];
-    this._lcname = this._name.toLocaleLowerCase();
-
-    if (param.length > 2) {
-      this._desc = param[2];
-      this._lcname += " " + this._desc.toLocaleLowerCase();
-    };
-
-    return this;
-  },
-
-  // Created element of this item
-  getElement : function () {
-    if (this._element !== undefined)
-      return this._element;
-
-    var li = document.createElement("li");
-
-    li.setAttribute("data-action", this._action);
-
-    var name = document.createElement("strong");
-
-    name.appendChild(document.createTextNode(this._name));
-    li.appendChild(name);
-    if (this._desc !== undefined) {
-      var desc = document.createElement("span");
-      desc.appendChild(document.createTextNode(this._desc));
-      li.appendChild(desc);
-    };
-    this._element = li;
-    return this._element;
-  },
-
-  // Name of this item
-  getName : function () {
-    return this._name;
-  },
-
-  getLCName : function () {
-    return this._lcname;
-  },
-
-  // Description of this item
-  getDesc : function () {
-    return this._desc;
-  },
-
-
-  getAction : function () {
-    return this._action;
-  }
-};
diff --git a/public/js/translateTable.js b/public/js/translateTable.js
deleted file mode 100644
index 0990622..0000000
--- a/public/js/translateTable.js
+++ /dev/null
@@ -1,225 +0,0 @@
-// Store Table object in global object
-
-var splitRegex = /^([^\/]+?)(?:\/([^:]+?))?:(.+?)$/;
-
-var textFoundry = "Foundry";
-var textLayer = "Layer";
-
-
-// SnippetTable constructor
-function SnippetTable (snippet) {
-  this.info = [];
-  this.foundry = {};
-  this.layer = {};
-  this.pos = 0;
-
-  this.load = function (children) {
-    for (var i in children) {
-      var c = children[i];
-
-      // Create object on position unless it exists
-      if (this.info[this.pos] === undefined)
-	this.info[this.pos] = {};
-
-      var found = this.info[this.pos];
-
-      // element with title
-      if (c.nodeType === 1) {
-	if (c.getAttribute("title")) {
-	  if (splitRegex.exec(c.getAttribute("title"))) {
-
-	    // Fill position with info
-	    var foundry, layer;
-	    if (RegExp.$2) {
-	      foundry = RegExp.$1;
-	      layer = RegExp.$2;
-	    }
-	    else {
-	      foundry = "base";
-	      layer = RegExp.$1
-	    };
-
-	    if (found[foundry + "/" + layer] === undefined)
-	      found[foundry + "/" + layer] = [];
-
-	    found[foundry + "/" + layer].push(RegExp.$3);
-
-	    // Set foundry
-	    if (!this.foundry[foundry])
-	      this.foundry[foundry] = {};
-	    this.foundry[foundry][layer] = 1;
-
-	    // Set layer
-	    if (!this.layer[layer])
-	      this.layer[layer] = {};
-	    this.layer[layer][foundry] = 1;
-	  };
-	};
-
-	// depth search
-	if (c.hasChildNodes())
-	  this.load(c.childNodes);
-      }
-
-      // Leaf node - store string on position and go to next string
-      else if (c.nodeType === 3) {
-	if (c.nodeValue.match(/[a-z0-9]/i))
-	  this.info[this.pos++]["-s"] = c.nodeValue;
-      };
-    };
-    delete this.info[this.pos];
-    return this;
-  };
-
-  this.toTable = function (base) {
-    var i, f, l;
-
-    // Create HTML based on info
-    var d = document;
-    var table = d.createElement('table');
-    var tr = d.createElement('tr');
-    table.appendChild(tr);
-    var th = d.createElement('th');
-    th.appendChild(document.createTextNode(base === "layer" ? textLayer : textFoundry));
-
-    // Add icon to switch sorting
-    var span = document.createElement("span");
-
-    // Add switch event
-    var that = this;
-    span.addEventListener("click", function (obj) {
-      var x = that.toTable(base === "layer" ? "foundry" : "layer");
-      table.parentNode.replaceChild(x, table);
-    }, false);
-
-    span.setAttribute("class", "switchSort");
-    var icon = document.createElement("i");
-    icon.setAttribute("class", "fa fa-arrows-h");
-    span.appendChild(icon);
-    th.appendChild(span);
-
-    tr.appendChild(th);
-    th = d.createElement('th');
-    th.appendChild(document.createTextNode(base === "layer" ? textFoundry : textLayer));
-    tr.appendChild(th);
-
-    // Header line with surface strings
-    for (i in this.info) {
-      th = d.createElement('th');
-      tr.appendChild(th);
-      th.appendChild(d.createTextNode(this.info[i]["-s"]));
-    };
-
-    // Sort keys
-    var baseArray = [];
-    if (base === "layer") {
-      for (i in this.layer) {
-	baseArray.push(i);
-      };
-    }
-    else {
-      for (i in this.foundry) {
-	baseArray.push(i);
-      };
-    };
-    baseArray.sort();
-
-    // Annotations
-    for (f in baseArray) {
-      f = baseArray[f];
-      var thBase = d.createElement('th');
-      thBase.appendChild(d.createTextNode(f));
-
-      var rowSpan = 0;
-
-      // Sort keys
-      var subArray = [];
-      if (base === "layer") {
-	for (i in this.layer[f]) {
-	  subArray.push(i);
-	};
-      }
-      else {
-	for (i in this.foundry[f]) {
-	  subArray.push(i);
-	};
-      };
-      subArray.sort();
-
-      for (l in subArray) {
-	l = subArray[l];
-	tr = d.createElement('tr');
-	table.appendChild(tr);
-
-	if (rowSpan === 0)
-	  tr.appendChild(thBase);
-
-	th = d.createElement('th');
-	tr.appendChild(th);
-	th.appendChild(d.createTextNode(l));
-
-	var infoString = base === "layer" ? l + '/' + f : f + '/' + l;
-
-	for (t in this.info) {
-	  var td = d.createElement('td');
-	  tr.appendChild(td);
-
-	  var surfaces = this.info[t][infoString];
-	  if (surfaces !== undefined) {
-	    for (i in surfaces) {
-	      td.appendChild(d.createTextNode(surfaces[i]));
-	      if (i !== surfaces.length -1) {
-		td.appendChild(d.createElement("br"));
-	      };
-	    };
-	  };
-	};
-	rowSpan++;
-      };
-      thBase.setAttribute("rowspan", rowSpan);
-    };
-    // return HTML object
-    return table;
-  };
-
-  // Create wrapper element
-  var html = document.createElement("table");
-  html.innerHTML = snippet;
-
-  // Create table object and load data from HTML
-  this.load(html.childNodes);
-};
-
-
-function showTable (o) {
-  var match = o.parentNode.parentNode;
-  var table = match.getElementsByClassName("tokenInfo")[0];
-
-  if (table.classList.contains("active")) {
-    table.classList.remove("active");
-    return;
-  }
-  else if (table.getElementsByTagName("table").length > 0) {
-    table.classList.add("active");
-    return;
-  };
-
-
-  var corpusID = match.getAttribute('data-corpus-id');
-  var docID    = match.getAttribute('data-doc-id');
-  var matchID  = match.getAttribute('data-match-id');
-  var url = '';;
-  if (document.location.pathname.indexOf('kalamar') >= 0) {
-    url = '/kalamar';
-  };
-  url += '/corpus/' + corpusID + '/' + docID + '/' + matchID;
-  var snippet;
-
-  Ajax.getJSON(url, function (res) {
-    var snippet = new SnippetTable(res['snippet']);
-    table.classList.add("active");
-    table.appendChild(snippet.toTable());
-  });
-};
-
-
diff --git a/public/js/translateTree.js b/public/js/translateTree.js
deleted file mode 100644
index 6ac4378..0000000
--- a/public/js/translateTree.js
+++ /dev/null
@@ -1,156 +0,0 @@
-var cleanRegex = /^([^\/]+?\/)?[^\:]+?\:/;
-
-var renderer = new dagreD3.Renderer();
-var oldDrawNodes = renderer.drawNodes();
-renderer.drawNodes(
-  function (graph, root) {
-    var svgNodes = oldDrawNodes(graph, root);
-    svgNodes.each(function(u) {
-      d3.select(this).classed(graph.node(u).nodeclass, true);
-    });
-    return svgNodes;
-  });
-
-// Disable pan and zoom
-renderer.zoom(false);
-
-function SnippetTree (graph) {
-  this.next = new Number(0);
-  this.graph = graph;
-
-  // Fix title
-  this.cleanTitle = function (title) {
-    return title.replace(cleanRegex, "");
-  };
-
-  // This is a new root
-  this.graph.addNode(this.next++,{
-    nodeclass: "root"
-  })
-
-  // Add the children to the node
-  this.parseChildren = function (parent, children) {
-    for (var i in children) {
-      var c = children[i];
-
-      // Element node
-      if (c.nodeType == 1) {
-
-	// Get title from html
-	if (c.getAttribute("title")) {
-	  var title = this.cleanTitle(c.getAttribute("title"));
-
-	  // Add child node
-	  var id = this.next++;
-	  this.graph.addNode(id, {
-	    nodeclass : "middle",
-	    label : title
-	  });
-	  this.graph.addEdge(null, parent, id);
-
-	  // Check for next level
-	  if (c.hasChildNodes())
-	    this.parseChildren(id, c.childNodes);
-	}
-
-	// Step further
-	else if (c.hasChildNodes())
-	  this.parseChildren(parent, c.childNodes);
-      }
-
-      // Text node
-      else if (c.nodeType == 3)
-	if (c.nodeValue.match(/[-a-z0-9]/i)) {
-	  // Add child node
-	  var id = this.next++;
-	  this.graph.addNode(id, {
-	    nodeclass : "leaf",
-	    label : c.nodeValue
-	  });
-	  this.graph.addEdge(null, parent, id);
-	};
-    };
-    return this;
-  };
-};
-
-function translateTree (snippet) {
-  var html = document.createElement("tree");
-  html.innerHTML = snippet;
-  var st = new SnippetTree(new dagreD3.Digraph());
-  st.parseChildren(0, html.childNodes);
-  var g = st.graph;
-
-  // Root node has only one child
-  if (Object.keys(g._outEdges[0]).length === 1)
-    g.delNode(0);
-  return g;
-};
-
-function showTree (o, foundry, layer) {
-  var match = o.parentNode.parentNode;
-
-console.log("Match: " + match);
-
-  var tree = d3.select(match).select("div > div.treeInfo");
-
-console.log("Tree: " + tree);
-
-  if (tree.classed("active")) {
-    tree.classed("active", false);
-    return;
-  }
-  else if (!tree.select("svg").empty()) {
-    tree.classed("active", true);
-    return;
-  };
-
-  var corpusID = match.getAttribute('data-corpus-id');
-console.log(corpusID);
-
-  var docID    = match.getAttribute('data-doc-id');
-  var matchID  = match.getAttribute('data-match-id');
-  var url      =
-    '/corpus' +
-    '/' + corpusID +
-    '/' + docID +
-    '/' + matchID +
-    '?foundry=' + foundry +
-    '&layer=' + layer +
-    '&spans=true';
-
-  var wrapper = new String("<span class=\"context-left\"></span><span class=\"match\"><span title=\"xip/c:MC\"><span title=\"xip/c:TOP\"><span title=\"xip/c:PP\"><span title=\"xip/c:PREP\">Mit</span> <span title=\"xip/c:NP\"><span title=\"xip/c:DET\">dieser</span> <span title=\"xip/c:NPA\"><span title=\"xip/c:NOUN\">Methode</span></span></span></span> <span title=\"xip/c:VERB\">ist</span> <span title=\"xip/c:NP\"><span title=\"xip/c:PRON\">es</span></span> <span title=\"xip/c:AP\"><span title=\"xip/c:ADV\">nun</span> <span title=\"xip/c:ADJ\">möglich</span></span> <span title=\"xip/c:ADV\">z. B.</span> <span title=\"xip/c:NPA\"><span title=\"xip/c:NP\"><span title=\"xip/c:NOUN\">Voice</span></span></span> (<span title=\"xip/c:INS\"><span title=\"xip/c:NPA\"><span title=\"xip/c:NP\"><span title=\"xip/c:NOUN\">Sprache</span></span></span></span>) <span title=\"xip/c:VERB\">bevorzugt</span> <span title=\"xip/c:PP\"><span title=\"xip/c:PREP\">in</span> <span title=\"xip/c:NP\"><span title=\"xip/c:PRON\">der</span></span> <span title=\"xip/c:NPA\"><span title=\"xip/c:NP\"><span title=\"xip/c:NOUN\">Bridge</span></span></span></span> <span title=\"xip/c:INFC\"><span title=\"xip/c:INS\"><span title=\"xip/c:VERB\">weiterzugeben</span></span></span></span></span></span><span class=\"context-right\"></span>");
-
-    var svg = tree.append("svg");
-    var svgGroup = svg.append("svg:g");
-
-  var treething = translateTree(wrapper);
-console.log(treething);  
-
-    var layout = renderer.run(treething, svgGroup);
-    // 10 pixel padding
-    var w = layout.graph().width;
-    var h = layout.graph().height;
-    svg.attr("width", w + 10);
-    svg.attr("height", h + 10);
-    svgGroup.attr("transform", "translate(5, 5)");
-    tree.classed("active", true);
-
-/*
-
-  jQuery.getJSON(url, function (res) {
-    var svg = tree.append("svg");
-    var svgGroup = svg.append("svg:g");
-    var treething = translateTree(res['snippet']);
-    var layout = renderer.run(treething, svgGroup);
-    // 10 pixel padding
-    var w = layout.graph().width;
-    var h = layout.graph().height;
-    svg.attr("width", w + 10);
-    svg.attr("height", h + 10);
-    svgGroup.attr("transform", "translate(5, 5)");
-    tree.classed("active", true);
-  });
-
-*/
-};
diff --git a/public/js/tutorialCookie.js b/public/js/tutorialCookie.js
deleted file mode 100644
index ecf39b2..0000000
--- a/public/js/tutorialCookie.js
+++ /dev/null
@@ -1,48 +0,0 @@
-function setTutorialPage(obj) {
-  var page = obj;
-  if (typeof page != 'string') {
-    page = window.location.pathname + window.location.search;
-    for (i = 1; i < 5; i++) {
-      if (obj.nodeName === 'SECTION') {
-	if (obj.hasAttribute('id'))
-	  page += '#' + obj.getAttribute('id');
-	break;
-      }
-      else if (obj.nodeName === 'PRE' && obj.hasAttribute('id')) {
-	page += '#' + obj.getAttribute('id');
-	break;
-      }
-      else {
-	obj = obj.parentNode;
-      };
-    };
-  };
-  document.cookie = 'tutorial_page=' + page + '; path=/'; 
-};
-
-function getTutorialPage() {
-  var pc = 'tutorial_page';
-  var c_value = document.cookie;
-  var c_start = c_value.indexOf(" " + pc + "=");
-  if (c_start == -1)
-    c_start = c_value.indexOf(pc + "=");
-  
-  if (c_start == -1) {
-    if (document.location.pathname.indexOf('kalamar') >= 0) {
-      c_value = '/kalamar/tutorial?embedded=1';
-    }
-    else {
-	c_value = '/tutorial?embedded=1';
-    };
-  }
-  else {
-    c_start = c_value.indexOf("=", c_start) + 1;
-    var c_end = c_value.indexOf(";", c_start);
-
-    if (c_end == -1)
-      c_end = c_value.length;
-
-    c_value = unescape(c_value.substring(c_start,c_end));
-  };
-  return c_value;
-};
diff --git a/public/sass/alertify.scss b/public/sass/alertify.scss
deleted file mode 100644
index fcaafb7..0000000
--- a/public/sass/alertify.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-@import "colors";
-
-article.alertify-log {
-  text-shadow:none;		   
-}
-
-article.alertify-log-warn {
-  background-color: $dark-orange;
-}
diff --git a/public/sass/colors.scss b/public/sass/colors.scss
deleted file mode 100644
index 86e5fa4..0000000
--- a/public/sass/colors.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-$basepath: '/kalamar';
-
-$light-orange:   #f4eebb;
-$dark-orange:    #ffa500;
-$darker-orange:  #ff8000;
-$darkest-orange: darken($dark-orange, 20%);
-
-$light-blue:     #cfe6f4;
-$dark-blue:      #73b2f4;
-$darkest-blue:   darken($dark-blue, 40%);
-
-$dark-green:    #496000;
-$middle-green:  #688704;
-$light-green:   #7ba400;
-
-$total-results: $light-green; // #c1002b;
-
-$light-shadow: 1px 1px rgba(255, 255, 255, 0.9);
-
-$light-grey: #ddd;
-$middle-grey: #999;
-$dark-grey: #333;
-
-$nearly-white: #f5f5f5;
-
-$kwic-border:       $middle-grey;
-$kwic-line-noneven: $nearly-white;
-$kwic-line-even:    $light-grey;
-$kwic-match-color:  $dark-grey;
-$kwic-match-shadow: $light-shadow;
-
-$kwic-highlight-1: #c1002b;
-$kwic-highlight-2: $dark-blue;   // #009ee0;
-$kwic-highlight-3: $dark-orange; // #f29400;
-$kwic-highlight-4: $light-green;
-
-$pagination-bg: $light-grey;
-$pagination-border: $middle-grey;
-$pagination-box-shadow: 3px 3px 3px rgba(0,0,0,0.3);
diff --git a/public/sass/font-awesome.scss b/public/sass/font-awesome.scss
deleted file mode 100644
index e62b74e..0000000
--- a/public/sass/font-awesome.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-/*!
- *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
- *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */
-
-@import "colors";
-
-@font-face{font-family:'FontAwesome';src:url('$basepath/font/fontawesome-webfont.eot?v=4.1.0');src:url('$basepath/font/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('$basepath/font/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('$basepath/font/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('$basepath/font/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
\ No newline at end of file
diff --git a/public/sass/hint.scss b/public/sass/hint.scss
deleted file mode 100644
index e5cb41b..0000000
--- a/public/sass/hint.scss
+++ /dev/null
@@ -1,99 +0,0 @@
-@charset "utf-8";
-
-@import "colors";
-
-#searchbar > i.show-hint {
-  z-index: 0;
-  position: absolute;
-  right: 65px;
-  top: 0;
-  font-size: 120%;
-  line-height: 120%;
-  margin-top: 1pt;
-  padding-top: 2pt;
-  padding-bottom: 1pt;
-  color: $dark-orange;
-  background-color: white;
-  &:hover, &.active {
-    color: $light-green;
-    cursor: pointer;
-  }
-}
-
-#searchMirror {
-  position: absolute;
-  margin-top: 1px;
-  white-space: pre-wrap;
-  overflow: show;
-  height: 0;
-  > span {
-    opacity: 0;
-    white-space: pre-wrap;
-    overflow: hidden;
-  }
-  > ul {
-    color: white;
-    margin: 0;
-    margin-top: -1px;
-    text-indent: 0;
-    max-width: 23em;
-    display: inline-block;
-    background-color: $pagination-bg;
-    border: {
-      width: 2px;
-      style: solid;
-      top-width:  0px;
-      color: $pagination-border;
-    }
-    box-shadow: $pagination-box-shadow;
-    opacity: 0;
-    padding: 0;
-    padding-bottom: 5px;
-    border-bottom-left-radius: 10px;
-    border-bottom-right-radius: 10px;
-    > li {
-      cursor: pointer;
-      list-style-type: none;
-      list-style-position: outside;
-      padding: 3px 10pt;
-      text-shadow: none;
-      white-space: normal;
-      color: $light-green;
-      border: {
-        top: 5px solid transparent;
-	bottom: 5px solid transparent;
-      }
-      &:hover {
-        background-color: $dark-orange;
-        color: white;
-        text-shadow: none;
-	> span {
-	  color: white;
-	}
-      }
-      > span {
-	display: block;
-	color: $dark-green;
-        text-align: left;
-        font-style: normal;
-	font-size: 80%;
-	text-shadow: none;
-      }
-      /* like sidebar ul li.active */
-      &.active {
-        background-color: $light-green;
-        text-shadow: none;
-        color: $dark-green;
-	&:hover {
-	  color: white;
-	}
-      }
-      &:first-of-type:not(.no-more) {
-        border-top-color: $dark-orange;
-      }
-      &:last-of-type:not(.no-more) {
-        border-bottom-color: $dark-orange;
-      }     
-    }
-  }
-}
diff --git a/public/sass/kwic-4.0.scss b/public/sass/kwic-4.0.scss
deleted file mode 100644
index ae259a0..0000000
--- a/public/sass/kwic-4.0.scss
+++ /dev/null
@@ -1,250 +0,0 @@
-@charset "utf-8";
-
-$fonts: verdana, tahoma, arial;
-
-@import "colors";
-
-@mixin box-sizing-box() {
-  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
-  box-sizing: border-box;         /* Opera/IE 8+ */
-}
-
-
-/*
-  Search for: [orth=erstens]
-*/
-
-ol {
-  width: auto;
-  overflow: hidden;
-  list-style-type: none;
-  margin: 0;
-  padding: 0;
-  text-indent: 0;
-  border: 1px solid $kwic-border;
-  font: {
-    family: $fonts;
-    size: 10pt;
-  }
-  text-shadow: 1px 1px rgba(255, 255, 255, 0.4);
-  > li {
-    border: {
-      style: solid;
-      color: #ffa500;
-      width: 0;
-    }
-    &:not(.active):not(:target) {
-      width: 99999%;
-      margin-left: -49999.5%;
-      background-color: $kwic-line-noneven;
-      overflow: hidden;
-      white-space: no-wrap;
-      cursor: pointer;
-      padding: 5pt 0 6pt 0;
-      text-indent: 0;
-      &:nth-of-type(even) {
-        background-color: $kwic-line-even;
-      }
-    }
-    > div {
-      > div.snippet {
-        > span,
-        > mark {
-          white-space: no-wrap !important;
-          > span {
-            white-space: no-wrap !important;
-          }
-          color: #666;
-        }
-        > mark,
-	> span.match {
-          font-weight: bold;
-          text-shadow: $kwic-match-shadow;
-          color: $kwic-match-color;
-          padding-left: 4pt;
-          padding-right: 2pt;
-        }
-      }
-    }
-  }
-}
-
-ol.align-free > li:not(.active):not(:target) > div > div.snippet > span.left {
-  display: inline-block;
-  text-align: right;
-  width: 50.046%;
-}
-
-ol.align-free > li:not(.active):not(:target) > div > div.snippet > span.separator {
-  width: 0px;
-  height: 1em;
-  margin-bottom: -2px;
-  display: inline-block;
-  line-height: 100%;
-  border: 1px solid #009EE0;
-  margin-left: 2px;
-  margin-right: 2px;
-}
-
-ol.align-free > li > div > div.snippet > span.right {
-  text-align: left;
-}
-
-ol.align-left > li > div > div.snippet > span.context-left {
-  display: inline-block;
-  text-align: right;
-  width: 50.01%;
-}
-
-ol.align-right {
-  text-align: right;
-  > li:not(.active):not(:target) > div > div.snippet > span.context-right {
-    display: inline-block;
-    text-align: left;
-    width: 49.915%;
-  }
-}
-
-/* Highlights */
-mark > mark,
-em,
-.level-0 {
-  border-bottom-width: 2px;
-  border-bottom-style: solid;
-  padding-bottom: 0px;
-  font-style: normal;
-}
-
-mark > mark > mark,
-em > em,
-.level-1 {
-  padding-bottom: 3px;
-}
-
-mark > mark > mark > mark,
-em > em > em,
-.level-2 {
-  padding-bottom: 6px;
-}
-
-li {
-  &:not(.active) mark > mark > mark > mark,
-  &:not(.active) em > em > em {
-    line-height: 180%;
-  }
-  &.active mark > mark > mark > mark,
-  &.active em > em > em {
-    line-height: 250%;
-  }
-}
-
-.class-1 { border-color: $kwic-highlight-1; }
-.class-2 { border-color: $kwic-highlight-2; }
-.class-3 { border-color: $kwic-highlight-3; }
-.class-4 { border-color: $kwic-highlight-4; }
-
-/*
-span.more:before {
-  content: "…";
-  padding-left: 2pt;
-  padding-right: 2pt;
-}
-*/
-
-div.snippet.startMore:before,
-div.snippet.endMore:after {
-  content: "…";
-  padding-left: 2pt;
-  padding-right: 2pt;
-}
-
-/* active view */
-ol > li.active,
-ol > li:target {
-  text-align: left;
-  width: auto;
-  cursor: normal;
-  white-space: wrap;
-  height: auto;
-  border-width: 2px;
-  background-color: $light-orange;
-  position: relative;
-  > div {
-    min-height: 42pt;
-    > div.snippet {
-      margin: 5pt 10pt;
-      margin-right: 3em;
-      > span {
-        line-height: 1.4em;
-        width: auto;
-        &.context-left {
-          margin-left: 0;
-          display: inline;
-          overflow: visible;
-          text-align: left;
-          width: auto;
-        }
-      }
-    }
-  }
-}
-
-/* Actions */
-ol > li {
-  ul.action {
-    display: none;
-    > li {
-      cursor: pointer;
-      color: white;
-      text-decoration: none;
-    }
-  }
-  /* active actions */
-  &.active, &:target {
-    ul.action {
-      background-color: $dark-orange;
-      font-size: 12pt;
-      color: white;
-      text: {
-        shadow: none;
-        indent: 0;
-      }
-      display: block;
-      margin: 0;
-      padding: 0;
-      z-index: 4;
-      list-style: {
-        type: none;
-        position: inline;
-      }
-      &.right {
-        position: absolute;
-        float: right;
-        text-align: center;
-        padding: 0pt 3pt;
-        height: 100%;
-        width: 1.2em;;
-        right: 0;
-        top: 0;
-      }
-    }
-  }
-  &:not(.active):not(:target) p {
-    display: none;
-  }
-  &.active p, &:target p {
-    @include box-sizing-box();
-    padding-right: 2em;
-    background-color: $dark-orange;
-    color: white;
-    text-shadow: none;
-    padding: 3pt 10pt;
-    margin: 0pt;
-    width: 100%;
-    bottom: 0;
-    z-index: 300;
-  }
-}
-
-
diff --git a/public/sass/matchinfo.scss b/public/sass/matchinfo.scss
deleted file mode 100644
index 8c0b087..0000000
--- a/public/sass/matchinfo.scss
+++ /dev/null
@@ -1,112 +0,0 @@
-@charset "utf-8";
-
-@import "colors";
-
-ol > li:not(.active) {
-  .tokenInfo, .treeInfo {
-    display: none;
-  }
-}
-
-.tokenInfo, .treeInfo {
-  display: none;
-  background-color: $dark-orange;
-  margin-right: 26px;
-  overflow: auto;
-  &.active {
-    display: block;
-  }
-}
-
-.tokenInfo {
-  table {
-    font-size: 10pt;
-    padding: 3pt 10pt; /* wie in ol > li.active p */
-    /* All cells */
-    > tr:nth-child(odd) {
-      td {
-        background-color: lighten($dark-orange, 25%);
-      }
-    }
-    > tr {
-      > * {
-	padding: 1pt 6pt;
-	vertical-align: top;
-      }
-      > td {
-	text-align: center;
-	background-color: $light-orange;
-      }
-      /* header */
-      > th{
-	&:not([rowspan]) {
-	  color: white;
-	  text-shadow: none;
-	}
-	&[rowspan]:first-child {
-	  background-color: $light-orange;
-	}
-	span.switchSort {
-	  cursor: pointer;
-	  position: absolute;
-	  display: inline-block;
-	  right: 0;
-	  margin-right: -11pt;
-	  width: 20pt;
-	}
-      }
-      &:first-child th {
-	text-align: center;
-	background-color: $darker-orange;
-	/* first column header */
-	&:first-child {
-	  position: relative;
-	  padding-right: 20pt;
-	  padding-left: 5pt;
-	}
-	/* second column header */
-	&:nth-child(2) {
-	  text-align: left;
-	  padding-left: 20pt;
-	  padding-right: 5pt;
-	}
-      }
-    }
-  }
-}
-
-g.root > rect {
-  fill: none;
-  stroke-width: 5px;
-  stroke: $darker-orange;
-}
-
-g.middle > rect {
-  fill: $light-orange;
-  stroke: $darker-orange;
-  color: white;
-  stroke-width: 2px;
-  padding: 2px;
-}
-
-g.leaf > rect {
-  display: none;
-}
-
-svg {
-  background-color: $dark-orange;
-  overflow: hidden;
-}
-
-text {
-  font-family: verdana, tahoma, arial;
-  font-size: 9pt;
-  color: $dark-grey;
-  text-shadow: 1px 1px rgba(255, 255, 255, 0.4);
-}
-
-.edgePath path {
-  stroke: white;
-  stroke-width: 2px;
-  fill: none;
-}
diff --git a/public/sass/pagination.scss b/public/sass/pagination.scss
deleted file mode 100644
index d847f6f..0000000
--- a/public/sass/pagination.scss
+++ /dev/null
@@ -1,78 +0,0 @@
-@import "colors";
-
-/*
-<div id="pagination">
-  <a rel="prev"><span><i class="fa fa-caret-left"></i></span></a>
-  <a rel="self"><span>1</span></a>
-  <a href="/?ql=poliqarp&amp;q=test&amp;action=ok&amp;p=2"><span>2</span></a>
-  <a href="/?ql=poliqarp&amp;q=test&amp;action=ok&amp;p=3"><span>3</span></a>
-  <span><i class="fa fa-ellipsis-h"></i></span>
-  <a href="/?ql=poliqarp&amp;q=test&amp;action=ok&amp;p=67"><span>67</span></a>
-  <a rel="next" href="/?ql=poliqarp&amp;q=test&amp;action=ok&amp;p=2"><span><i class="fa fa-caret-right"></i></span></a>
-</div>
-*/
-
-#pagination {
-  position: fixed;
-  right: 20px;
-  bottom: 10px;
-  z-index: 400;
-  span {
-    display: inline-block;
-    background-color: $pagination-bg;
-    height: 1.5em;
-    line-height: 1.5em;
-    padding: {
-      left: .4em;
-      right: .4em;
-    }
-    text-align: center;
-    border: {
-      top-width: 2px;
-      top-style: solid;
-      bottom-width:  2px;
-      bottom-style: solid;
-      color: $pagination-border;
-    }
-    box-shadow: $pagination-box-shadow;
-  }
-  a {
-    text-shadow: $light-shadow;
-    &[rel=self] span {
-      border: {
-	color: $dark-orange;
-	left-style: solid;
-	right-style: solid;
-	left-width: 2px;
-	right-width: 2px;
-      }
-      background-color: $light-orange;
-      color: $darkest-orange;
-    }
-    &[rel=next] span {
-      border: {
-	right-width: 2px;
-	right-style: solid;
-	top-right-radius: 12px;
-	bottom-right-radius: 12px;
-      }
-    }
-    &[rel=prev] span {
-      border: {
-	left-width: 2px;
-	left-style: solid;
-	top-left-radius: 12px;
-	bottom-left-radius: 12px;
-      }      
-    }
-    &[href] {
-      color: $light-green;
-      span:hover {
-        background-color: $light-green;
-        border-color: $dark-green;
-        color: $dark-green;
-        text-shadow: none;
-      }
-    }
-  }
-}
diff --git a/public/sass/query.scss b/public/sass/query.scss
deleted file mode 100644
index b5abe2f..0000000
--- a/public/sass/query.scss
+++ /dev/null
@@ -1,53 +0,0 @@
-@charset "utf-8";
-
-@import "colors";
-
-/* code data - clickable */
-pre.query {
-  overflow-x: hidden;
-  color: $darkest-orange;
-  background-color: $light-orange;
-//  text-shadow: $light-shadow;
-  border: {
-    color: $dark-orange;
-    style: solid;
-    width: 3px;
-    radius: 6px;
-  }
-  white-space: normal;
-  cursor: pointer;
-  display: block;
-  font: {
-    size: 11pt;
-    weight: bold;
-  }
-  padding: 2pt;
-  margin: 0;
-  margin-bottom: 5pt;
-  > code {
-    white-space: pre;
-    display: block;
-    padding: 2px 5px;
-    margin: 0;
-  }
-  > span {
-     padding: 2pt;
-  }
-  &.serial, &.api {
-    overflow-x: auto;
-    &:not(.active) {
-      overflow-x: hidden;
-      code {
-        display: none;
-      }
-    }
-  }
-}
-
-pre.query.api {
-  background-color: $light-blue;
-  color: $darkest-blue;
-  border: {
-    color: $dark-blue;
-  }
-}
diff --git a/public/sass/sidebar.scss b/public/sass/sidebar.scss
deleted file mode 100644
index a9371ea..0000000
--- a/public/sass/sidebar.scss
+++ /dev/null
@@ -1,102 +0,0 @@
-@import "colors";
-
-#sidebar {
-  color: #fff;
-  text-shadow: none;
-  transition: all .3s ease-in-out;
-  position: fixed;
-  z-index: 500;
-  height: 105%;
-  margin-top: -10px;
-  background-color: #496000;
-  width: 230px;
-  margin-left: -215px;
-  padding-top: 80px;
-  left: 0;
-  top: 0;
-  &.active {
-    box-shadow: 2px 2px 5px darken($dark-green, 15%);
-    margin-left: 0px;
-    left: 0;
-    top: 0;
-  }
-  > * {
-    opacity: 0;
-// TODO
-    transition: {
-      property: opacity;
-      duration: .3s;
-    }
-  }
-  &.active {
-    > * {
-      opacity: 1;
-    }
-    > i.fa-bars {
-      opacity: 0;
-    }
-  }
-  &:not(.active) > i.fa-bars {
-    opacity: 1;
-    cursor: pointer;
-    background-color: #496000;
-    position: fixed;
-    font-size: 16pt;
-    width: 16pt;  
-    height: 17pt;
-    padding: 6pt;
-    bottom: 0;
-    left: 0;
-    border-top-right-radius: 5pt;
-  }
-  h2 {
-    font: {
-      size: 100%;
-      weight: bold;
-    }
-    text-align: center;
-    padding: 0;
-    margin: 0 0 5pt 0;
-  }
-  ul {
-    list-style-type: none;
-    margin: 0;
-    font-size: 10pt;
-    text-indent: 0;
-    padding: 0;
-    li {
-      padding: 4pt 10pt;
-      h3 {
-        font: {
-	  weight: bold;
-	  size: 100%;
-	}	  
-	padding: 0;
-	margin: 0;
-      }
-      &.active {
-	background-color: $light-green;
-/*
-	text-shadow: 1px 1px rgba(0, 0, 0, 0.4);
-*/
-	text-shadow: none;
-	h3 {
-	  margin-bottom: 2pt;
-	  padding-bottom: 2pt;
-	  border-bottom: 1px solid black;
-	}
-      }
-    }
-  }
-  dl.info {
-    font-size: 9pt;
-    padding: 0 10pt;
-    > dt {
-      font-weight: bold;
-      float: left;
-    }
-    > dd {
-      text-align: right;
-    }
-  }
-}
diff --git a/public/sass/style.scss b/public/sass/style.scss
deleted file mode 100644
index 0d34797..0000000
--- a/public/sass/style.scss
+++ /dev/null
@@ -1,369 +0,0 @@
-@charset "utf-8";
-
-@import "colors";
-
-@mixin box-sizing-box() {
-  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
-  box-sizing: border-box;         /* Opera/IE 8+ */
-}
-
-@mixin no-appearance() {
-  -webkit-appearance:none;
-  -moz-appearance:none;
-  appearance:none;
-}
-
-body, html, select {
-  color: #666;
-  font-family: verdana, tahoma, arial;
-  margin: 0;
-}
-
-body, html, #searchbar button {
-  text-shadow: 1px 1px rgba(255, 255, 255, 0.4);
-}
-
-a {
-  color: inherit;
-  text-decoration: none;
-}
-
-#kalamar-bg {
-  top: 0;
-  background: {
-    image:url('#{$basepath}/img/korap-bg-kalamar.svg');
-    repeat: no-repeat;
-    size: 50%;
-    position: 50% 50%;
-  }
-  position: fixed;
-  height: 110%;
-  width: 175%;
-  z-index: -5000
-}
-
-#top {
-  background-color: #7ba400;
-  @include box-sizing-box();
-  padding: 8px;
-  padding-bottom: 0;
-  position: relative;
-  font-size: 10pt;
-  color: white;
-  text-shadow: none;
-  button {
-    color: $light-green;
-    background-color: transparent;
-    border-width: 0;
-    font-weight: normal;
-    margin: 0;
-    padding: 0;
-  }
-  form {
-    display: block;
-    padding-left: 230px;
-    margin: 0px;
-    position: relative;
-    > div.select, > span.location {
-      line-height: 1.8em;
-      border: {
-	width: 0;
-	bottom-width: 3px;
-	style: solid;
-	color: transparent;
-      }
-      display: inline-block;
-      &:hover {
-	border-color: $dark-green;
-      }
-    }
-    > span.location {
-      padding: 0 2px;
-      cursor:pointer;
-    }
-    > div.select {      
-      position: relative;
-      padding: 0;
-      margin: 0;
-      &:after {
-	content: "";
-	font-family: FontAwesome;
-	font-style: normal;
-	font-weight: normal;
-	right: 0px;
-	top: 0px;
-	width: 18px;
-	text-align: center;
-	position: absolute;
-	pointer-events: none;
-	background-color: $light-green;
-      }
-      > * {
-	cursor: pointer;
-	padding: 0pt;
-	padding-right: .3em;
-	line-height: 1.8em;
-	outline: none;
-      }
-    }
-  }
-}
-
-
-
-/*
-http://cssdeck.com/labs/styling-select-box-with-css3
-*/
-
-#ql-field {
-  margin: 0;
-  outline: none;
-  border: none;
-  display: inline-block;
-  position: relative;
-  color: white;
-  background-color: $light-green;
-  -webkit-appearance: none;
-  border-width: 0;
-  border-radius: 0;
-  @include no-appearance();
-  &:checked {
-    outline: none;
-  }
-  > option {
-    padding: 0pt 2pt;
-    outline: none;
-  }
-}
-
-/* funny hack */
-#ql-field:-moz-focusring {
-  color: transparent;
-  text-shadow: 0 0 0 white;
-}
-
-
-#searchbar {
-  position: relative;
-  @include box-sizing-box();
-  width: 100%;
-  padding-right: 60px;
-  button {
-    position: absolute;
-    font-weight: normal;
-    background-color: $pagination-bg;
-    padding: 0;
-    height: 100%;
-    top: 0;
-    right: 30px;
-    width: 30px;
-    border: {
-      top-width: 2px;
-      top-style: solid;
-      bottom-width:  2px;
-      bottom-style: solid;
-      color: white;
-    }
-    &:hover {
-      cursor:pointer;
-      color: white;
-    }
-    &:first-of-type {
-      border: {
-	left-width: 1px;
-	left-style: solid;
-	left-color: $pagination-border;
-      }
-    }
-    &:last-of-type {
-      @include box-sizing-box();
-      border: {
-	right-width: 2px;
-	right-style: solid;
-	top-right-radius: 12px;
-	bottom-right-radius: 12px;
-      }
-    }
-    &:hover {
-      background-color: $light-green;
-      border-color: $dark-green;
-      color: $dark-green;
-      text-shadow: none;
-    }
-  }
-  button + button {
-    right: 0;
-  }
-}
-
-/*
-http://stackoverflow.com/questions/4148499/how-to-style-checkbox-using-css
-*/
-
-#q-cutoff-field {
-  display: none;
-  + label span { 
-    border-radius: 4px;
-    display: inline-block;
-    background-color: white;
-    width: 12px;
-    height: 12px;
-    cursor: pointer;
-    vertical-align: middle;
-    line-height: 12px;
-    padding: 0;
-    margin-right: .3em;
-    :hover {
-      border-color: white;
-    }
-  }
-  &:checked + label span { 
-    :after {
-      content:"\f00c";
-      color: $light-green;
-      font-family: FontAwesome; 
-    }
-  }
-}
-
-#q-field {
-  border: 2px solid white;
-  padding: 3px;
-  font-size: 11pt;
-  width: 100%;
-  margin: 0;
-  @include box-sizing-box();
-  display: block;
-}
-
-#button-right {
-  display: inline-block;
-  float: right;
-  color: white;
-  line-height: 2em;
-  > button {
-    border-bottom: 3px solid transparent;
-    font-size: 120%;
-    cursor: pointer;
-    color: white;
-    line-height: 14pt;
-    padding: 0;
-    &:hover {
-      border-bottom-color: $dark-green;
-    }
-  }
-}
-/*
-#button-right {
-  position: absolute;
-  @include box-sizing-box();
-  right: 0px;
-  bottom: 0px;
-  height: 2em;
-  width: 6em;
-  > button {
-    cursor: pointer;
-    color: white;
-    right: 5px;
-    width: 2em;
-    bottom: 0;
-    &:hover {
-      border-bottom: 2px solid green;
-    }
-    &[name=alignment] {
-    }
-    &[name=tutorial] {
-    }
-  }
-}
-*/
-
-p.found {
-  font-size: 10pt;
-  padding: 0;
-  margin: 0;
-  text-align: right;
-}
-
-#total-results {
-  color: $total-results;
-  font-weight: bold;
-}
-
-/* KorAP header logo */
-h1 {
-  margin: 0;
-  margin-left:15px;
-  left: 0;
-  top: 0;
-  position: absolute;
-  width: 7.8em;
-  height: 2.4em;
-  z-index: 999;
-  background: {
-    repeat: no-repeat;
-    position: center center;
-    size: 72%;
-    image: url('#{$basepath}/img/korap-logo-kalamar.svg');
-  }
-  span {
-    margin-left: -3000px;
-  }
-}
-
-#search {
-  margin-bottom: 44px;
-  &.match {
-    margin-top: 14pt;
-  }
-}
-
-main {
-  margin: {
-    left: 30px;
-    right: 14px;
-  }
-  &.embedded {
-    margin: {
-      left: 14px;
-      right: 14px;
-    }
-  }
-}
-
-main {
-  > section > p,
-  > p {
-    a {
-      border-radius: 6px;
-      padding: 0 .3em;
-      background-color: $pagination-bg;
-      text-shadow: light-shadow;
-      color: $light-green;
-      &:hover {
-        color: $dark-green;
-	text-shadow: none;
-	background-color: $light-green;
-      }
-    }
-  }
-  blockquote {
-    border-radius: 12px;
-    margin: 0;
-    text-indent: 0;
-    padding: 1em;
-    border-left: {
-      color: $dark-grey;
-      style: solid;
-      width: 1em;
-    }
-    background-color: $light-grey;
-    &.warning {
-      border-left-color: $dark-orange;
-    }
-    &.exception {
-      border-left-color: red;
-    }
-  }
-}
diff --git a/public/sass/tutorial.scss b/public/sass/tutorial.scss
deleted file mode 100644
index 2238827..0000000
--- a/public/sass/tutorial.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-@import "colors";
-
-#tutorial {
-  position: fixed;
-  display: block;
-  z-index: 9999;
-  background-color: $dark-green;
-  border-radius: 15px;
-  padding: 5px;
-  top:    2%;
-  bottom: 2%;
-  left:   5%;
-  right:  5%;
-  &:not(.active) {
-    display: none;
-  }
-  &.active {
-    display: block;
-  }
-  > i,
-  > a > i {
-    font-size: 20pt;
-    color: $dark-green;
-    position: absolute;
-    background-color: rgba(255,255,255,0.5);
-    z-index: 100;
-    top: 10pt;
-    right: 20pt;
-    cursor: pointer;
-  }
-  > a > i {
-    right: 40pt;
-  }
-  iframe {
-    width: 100%;
-    min-height: 100%;
-    border: {
-      width: 0;
-      radius: 10px;
-    }
-    background: {
-      image:url('#{$basepath}/img/korap-bg-kalamar.svg');
-      size: 10%;
-      repeat: no-repeat;
-      position: center center;
-      color: white;
-    }
-  }
-}
-
-div.test {
-  display: block;
-  border-left: 10px solid $dark-green;
-  margin: 1em;
-  padding-left: 5px;
-  p {
-    color: black;
-    &.fail {
-      font-weight: bold;
-      color: red;
-    }
-    &.pass {
-      font-weight: bold;
-      color: green;
-    }
-  }
-}
diff --git a/public/scss/alertify.scss b/public/scss/alertify.scss
deleted file mode 100644
index ee83a5d..0000000
--- a/public/scss/alertify.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-@import "util";
-
-/*
-article.alertify-log {
-  text-shadow:none;
-}
-*/
-
-article.alertify-log-warn {
-  background-color: $dark-orange;
-}
diff --git a/public/scss/base.scss b/public/scss/base.scss
deleted file mode 100644
index da95c81..0000000
--- a/public/scss/base.scss
+++ /dev/null
@@ -1,101 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-body, html, select, g > text {
-  color: $dark-grey;
-  font-family: verdana, tahoma, arial;
-  margin: 0;
-}
-
-g > text {
-  fill: $dark-grey;
-}
-
-* {
-  @include box-sizing-box;
-}
-
-body {
-  font-size: 12pt;
-}
-
-.intro p {
-  text-shadow: $light-shadow
-}
-
-a {
-  &[href^="http://"]:after {
-    font-family: "FontAwesome";
-    content: " \f08e";
-    font-size: 75%;
-  }
-  &:link {
-    color: $dark-orange;
-    text-decoration: none;
-  }
-  &:link:hover:hover {
-    color: $light-green; // $darkest-orange;
-    @include color-transition;
-  }
-  &:active, &:visited {
-    color: $darkest-orange;
-  }
-}
-
-main {
-  margin: {
-    left: $standard-margin; 
-    right: $standard-margin; // Todo: -16px
-  }
-  &.embedded {
-    margin: {
-      left: 14px;
-      right: 14px;
-    }
-  }
-  p {
-    text-align: justify;
-    hyphens: auto;
-  }
-/*
-  > section > p, > p {
-    a {
-      border-radius: 6px;
-      padding: 0 .3em;
-      background-color: $choose-bg;
-      text-shadow: light-shadow;
-      color: $light-green;
-      &:hover {
-        color: $dark-green;
-	text-shadow: none;
-	background-color: $light-green;
-      }
-    }
-  }
-*/
-}
-/*
-blockquote {
-  border-radius: 12px;
-  margin: 0;
-  text-indent: 0;
-  padding: 1em;
-  border-left: {
-    color: $dark-grey;
-    style: solid;
-    width: 1em;
-  }
-  background-color: $light-grey;
-  &.warning {
-    border-left-color: $dark-orange;
-  }
-  &.exception {
-    border-left-color: red;
-  }
-}
-*/
-
-div.intro {
-  width: 70%;
-  min-width: 600px;
-}
\ No newline at end of file
diff --git a/public/scss/fonts.scss b/public/scss/fonts.scss
deleted file mode 100644
index be46ba2..0000000
--- a/public/scss/fonts.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-@font-face {
-  font-family: 'FontAwesome';
-  src: url('#{$font-path}/fontawesome-webfont.eot?v=4.3.0');
-  src: url('#{$font-path}/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('#{$font-path}/fontawesome-webfont.woff2?v=4.3.0') format('woff2'), url('#{$font-path}/fontawesome-webfont.woff?v=4.3.0') format('woff'), url('#{$font-path}/fontawesome-webfont.ttf?v=4.3.0') format('truetype'), url('#{$font-path}/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');
-  font-weight: normal;
-  font-style: normal;
-}
\ No newline at end of file
diff --git a/public/scss/header.scss b/public/scss/header.scss
deleted file mode 100644
index f3f995a..0000000
--- a/public/scss/header.scss
+++ /dev/null
@@ -1,89 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-header {
-  position: relative;
-  background-color: $light-green;
-//  background-color: $ids-grey-1;
-  @include box-sizing-box();
-  padding: 8px;
-  padding-bottom: 0;
-  font-size: 10pt;
-  color: $nearly-white;
-  // text-shadow: none;
-  button {
-    color: $light-green;
-    background-color: transparent;
-    border-width: 0;
-    font-weight: normal;
-    margin: 0;
-    padding: 0;
-    outline: none;
-  }
-  span.select, #vc-choose { /* Formally vc.location */
-    cursor: pointer;
-    line-height: 1.8em;
-    border: {
-      width: 0;
-      bottom-width: 3px;
-      style: solid;
-      color: transparent;
-    }
-    display: inline-block;
-    &:hover {
-      color: $dark-green;
-      border-color: $dark-green;
-    }
-    &::after {
-      pointer-events: none;
-      font-family: FontAwesome;
-      text-align: center;
-      background-color: $light-green;
-    }
-  }
-  span.select::after {
-    content: "\f0dd";
-  }
-
-  form {
-    padding-left: $logo-left-distance;
-    min-height: 2.7em;
-    display: block;
-    margin: 0px;
-    position: relative;
-  }
-}
-
-
-/**
- * Temporary hack for language chooser
- * http://cssdeck.com/labs/styling-select-box-with-css3
- */
-#ql-field {
-  cursor: pointer;
-  margin: 0;
-  outline: none;
-  border: none;
-  display: inline-block;
-  position: relative;
-  color: white;
-  background-color: $light-green;
-  border-width: 0;
-  border-radius: 0;
-  @include no-appearance;
-  &:checked {
-    outline: none;
-  }
-  > option {
-    padding: 0pt 2pt;
-    outline: none;
-  }
-}
-
-/**
- * funny hack for firefox
- */
-#ql-field:-moz-focusring {
-  color: transparent;
-  text-shadow: 0 0 0 white;
-}
diff --git a/public/scss/hint.scss b/public/scss/hint.scss
deleted file mode 100644
index 470cd17..0000000
--- a/public/scss/hint.scss
+++ /dev/null
@@ -1,69 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$border-size: 2px;
-
-ul.menu.hint {
-  text-align:left;
-//  margin-left: -1 * $border-size;
-  max-width: 23em !important;
-  min-width: 7em;
-
-  > li:first-of-type {
-    border-top: {
-      width: 1px;
-      left-radius: 0;
-      right-radius: 0;
-    }
-  }
-  span.desc {
-    display: block;
-    font-size: 75%;
-  }
-}
-
-#searchMirror {
-  position: absolute;
-  left: 0;
-  top: 0;
-  white-space: pre-wrap;
-  overflow: show;
-  height: 0;
-  > span {
-    display: block;
-    opacity: 0;
-    white-space: pre-wrap;
-    overflow: hidden;
-  }
-  // Todo: Besser nur, wenn im Focus
-  > div {
-    cursor: pointer;
-    transition: left 0.3s ease 0s;
-    position: absolute;
-    top: 0;
-    left: 0;
-    text-align: center;
-    padding: 0;
-    border-top: 5px solid $dark-orange;
-
-    height: 10px;
-    width: 1.2em;
-
-    &:hover {
-/*
-      border: {
-	width: $border-size;
-	style: solid;
-	radius: $standard-border-radius;
-	top: {
-	  left-radius: 0;
-	  right-radius: 0;
-	  width: 0px;
-	}
-      }
-      @include choose-hover;
-*/
-      border-top: 10px solid $dark-orange;
-    }
-  }
-}
\ No newline at end of file
diff --git a/public/scss/kalamar.scss b/public/scss/kalamar.scss
deleted file mode 100644
index 582fe9b..0000000
--- a/public/scss/kalamar.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-@charset "utf-8";
-
-// Global variables and mixins
-@import "fonts";      // Font families
-
-@import "base";       // Base styles
-@import "logos";      // Logo images
-@import "header";     // Top
-@import "searchbar";  // The search bar
-@import "menu";       // Menu list
-@import "hint";       // Hint specific menu list
-@import "pagination"; // Pagination
-@import "resultinfo"; // Information on results
-@import "matchinfo";  // Match table and tree
-@import "kwic";       // Kwic view information
-@import "vc";         // Virtual collection builder
-@import "tutorial";   // Embedded and non-embedded tutorial
-@import "query";      // View query
-@import "sidebar";    // Navigation on the left side
-
-@import "media";      // Media queries
diff --git a/public/scss/kwic.scss b/public/scss/kwic.scss
deleted file mode 100644
index c55c00a..0000000
--- a/public/scss/kwic.scss
+++ /dev/null
@@ -1,278 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$border-size: 2px;
-
-#search {
-  position: relative;
-  margin-bottom: 44px;
-  overflow: visible;
-
-  &.match {
-    margin-top: 14pt;
-  }
-
-  ol {
-    width: auto;
-    overflow-x: hidden;
-    overflow-y: visible;
-    list-style-type: none;
-    margin: 0;
-    padding: 0;
-    text-indent: 0;
-    border: 1px solid $kwic-border;
-    font-size: 10pt;
-    > li {
-      border: {
-	style: solid;
-	color: $dark-orange;
-	width: 0;
-      }
-      &:not(.active):not(:target) {
-	width: 99999%;
-	margin-left: -49999.5%;
-	background-color: $kwic-line-noneven;
-	overflow-x: hidden;
-	overflow-y: visible;
-	white-space: no-wrap;
-	cursor: pointer;
-	padding: 5pt 0 6pt 0;
-	&:nth-of-type(even) {
-          background-color: $kwic-line-even;
-	}
-	.matchinfo {
-	  display: none;
-	}
-	> div > div.snippet {
-	  text-overflow: ellipsis;
-	  text-indent: 0;
-	  text-shadow: $light-shadow;
-	}
-      }
-      > div {
-	> div.snippet {
-          > span,
-          > mark {
-            white-space: no-wrap !important;
-            > span {
-              white-space: no-wrap !important;
-            }
-            color: #666;
-          }
-          > mark,
-	  > span.match {
-            font-weight: bold;
-            /* text-shadow: $kwic-match-shadow; */
-            color: $kwic-match-color;
-            padding-left: 4pt;
-            padding-right: 2pt;
-          }
-	}
-      }
-    }
-
-    /* active view */
-    > li.active,
-    > li:target {
-      text-align: left;
-      width: auto;
-      cursor: normal;
-      white-space: wrap;
-      height: auto;
-      border-width: 2px;
-      background-color: $light-orange;
-      position: relative;
-      > div {
-	min-height: 42pt;
-	> div.snippet {
-	  margin: 5pt 10pt;
-	  margin-right: 3em;
-	  > span {
-            line-height: 1.4em;
-            width: auto;
-            &.context-left {
-              margin-left: 0;
-              display: inline;
-              overflow: visible;
-              text-align: left;
-              width: auto;
-            }
-	  }
-	}
-      }
-    }
-
-    /* Actions */
-    > li {
-      ul.action {
-	display: none;
-      }
-
-      /* active actions */
-      &.active, &:target {
-	ul.action {
-	  display: block;
-	}
-      }
-      &:not(.active):not(:target) p.ref {
-	display: none;
-      }
-      &.active p.ref,
-      &:target p.ref {
-	background-color: $dark-orange;
-	color: white;
-	padding: 3pt 10pt;
-	padding-right: $right-match-distance;
-	margin: 0pt;
-	width: 100%;
-	bottom: 0;
-	z-index: 30;
-      }
-    }
-  }
-}
-
-ul.action {
-  background-color: $dark-orange;
-  font-size: 12pt;
-  color: white;
-  text: {
-    shadow: none;
-    indent: 0;
-  }
-  margin: 0;
-  padding: 0;
-  z-index: 5;
-  
-  list-style: {
-    type: none;
-    position: inline;
-  }
-  &.right {
-    position: absolute;
-    width: $right-match-distance;
-    float: right;
-    text-align: center;
-    padding: 0pt 3pt;
-    height: 100%;
-    right: 0;
-    top: 0;
-    li {
-      cursor: pointer;
-      color: white;
-      text-decoration: none;
-
-      > span {
-	@include blind;
-      }
-      &.close::after {
-	font-family: "FontAwesome";
-	content: "\f00d";
-      }
-      &.info::after {
-	font-family: "FontAwesome";
-	content: "\f05a";
-      }
-    }
-  }
-}
-
-/*
-ol.align-free > li:not(.active):not(:target) > div > div.snippet > span.left {
-  display: inline-block;
-  text-align: right;
-  width: 50.046%;
-}
-
-ol.align-free > li:not(.active):not(:target) > div > div.snippet > span.separator {
-  width: 0px;
-  height: 1em;
-  margin-bottom: -2px;
-  display: inline-block;
-  line-height: 100%;
-  border: 1px solid #009EE0;
-  margin-left: 2px;
-  margin-right: 2px;
-}
-
-ol.align-free > li > div > div.snippet > span.right {
-  text-align: left;
-}
-*/
-
-ol.align-left > li > div > div.snippet > span.context-left {
-  display: inline-block;
-  text-align: right;
-  width: 50.01%;
-}
-
-ol.align-right {
-  text-align: right;
-  > li:not(.active):not(:target) > div > div.snippet > span.context-right {
-    display: inline-block;
-    text-align: left;
-    width: 49.915%;
-  }
-}
-
-/**
- * Highlights
- */
-mark {
-  background-color: inherit;
-  color: inherit;
-}
-
-mark > mark,
-em,
-.level-0 {
-  border-bottom-width: 2px;
-  border-bottom-style: solid;
-  padding-bottom: 0px;
-  font-style: normal;
-}
-
-mark > mark > mark,
-em > em,
-.level-1 {
-  padding-bottom: 3px;
-}
-
-mark > mark > mark > mark,
-em > em > em,
-.level-2 {
-  padding-bottom: 6px;
-}
-
-li {
-  &:not(.active) mark > mark > mark > mark,
-  &:not(.active) em > em > em {
-    line-height: 180%;
-  }
-  &.active mark > mark > mark > mark,
-  &.active em > em > em {
-    line-height: 250%;
-  }
-}
-
-.class-1 { border-color: $kwic-highlight-1; }
-.class-2 { border-color: $kwic-highlight-2; }
-.class-3 { border-color: $kwic-highlight-3; }
-.class-4 { border-color: $kwic-highlight-4; }
-
-/*
-span.more:before {
-  content: "…";
-  padding-left: 2pt;
-  padding-right: 2pt;
-}
-*/
-
-div.snippet.startMore:before,
-div.snippet.endMore:after {
-  content: "…";
-  padding-left: 2pt;
-  padding-right: 2pt;
-}
-
-
diff --git a/public/scss/logos.scss b/public/scss/logos.scss
deleted file mode 100644
index e9058ae..0000000
--- a/public/scss/logos.scss
+++ /dev/null
@@ -1,107 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-.logo {
-  &::after {
-    content: "" !important;
-  }
-  > * {
-    background: {
-      repeat: no-repeat;
-      size: 90%;
-      position: 50% 50%;
-    }
-    > span {
-      margin-left: -3000px;
-    }
-  }
-}
-
-/**
- * Background image for the front page
- */
-#kalamar-bg {
-  position: fixed;
-  height: 110%;
-  width: 175%;
-  top: 0;
-  z-index: -5000;
-  opacity: .1;
-  background: {
-    image:url('#{$img-path}/korap-bg-kalamar.svg');
-    size: 50%;
-    repeat: no-repeat;
-    position: 50% 50%;
-  }
-}
-
-/**
- * Logo table of the front page
- */
-#logos {
-  position: relative;
-  text-align: right;
-  font-size: 85%;
-  right: 0;
-  width: 100%;
-  margin-left: $standard-margin;
-  padding-left: 60%;
-  > div {
-    border-top: 26px solid $dark-orange;
-    padding-right: 2em;
-  }
-  p {
-    text-align: left;
-    display: inline-block;
-  }
-}
-
-
-/**
- * Logo: Institute for German Language
- */
-#ids-logo {
-  display: block;
-  width: (910 / 60) + em;
-  height: (176 / 60) + em;
-  background: {
-    image:url('#{$img-path}/ids-institute-for-the-german-language.svg');
-  }
-}
-
-/**
- * Logo: Member of the Leibniz Association
- */
-#leibniz-logo {
-  display: block;
-  width: (199 / 20) + em;
-  height: (130 / 20) + em;
-  background: {
-    image:url('#{$img-path}/member-of-the-leibniz-association.svg');
-  }
-}
-
-/**
- * Logo: KorAP
- */
-h1 {
-  position: absolute;
-  margin: 0;
-  margin-left:15px;
-  left: 0;
-  top: 0;
-  width: 7.8em;
-  height: 2.4em;
-  z-index: 7200;
-  background: {
-    size: 72%;
-    image: url('#{$img-path}/korap-logo-kalamar.svg');
-  }
-}
-
-/*
-#leibniz-logo, #ids-logo {
-  height: (130 / 20) + em;
-}
-
-*/
\ No newline at end of file
diff --git a/public/scss/matchinfo.scss b/public/scss/matchinfo.scss
deleted file mode 100644
index 4341f23..0000000
--- a/public/scss/matchinfo.scss
+++ /dev/null
@@ -1,241 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$left-width: 176px;
-$border-size: 2px;
-$left-distance: $left-width + ($border-size * 2);
-
-@mixin cell-info {
-  text-overflow: ellipsis;
-  overflow: hidden;
-  padding: 1px 6px;
-  margin: 0px;
-}
-
-/**
- * Table view
- *
- * The table view is complicated, as the
- * first column has to be static.
- */
-@mixin matchinfo-head {
-  border-width: 0px;
-  border-top: $border-size solid #ff8000;
-  width: $left-width / 2;
-}
-
-div.matchinfo {
-  position: relative;
-  width: 100%;
-  padding-top: $border-size;
-  background-color: $dark-orange;
-  height: auto;
-  font-size: 10pt;
-  text-align: left;
-  > p.addtree {
-    position: relative;
-    @include choose-item;
-    border: {
-      width: $border-size;
-      style: solid;
-      radius: $standard-border-radius;
-    }
-
-    font-size: inherit;
-    margin: $border-size $border-size 0 $border-size !important;
-    width: $left-width;
-    text-align: center;
-    cursor: pointer;
-    padding: 0 !important;
-
-    &:hover {
-      cursor:pointer;
-      @include choose-hover;
-    }
-
-    *.menu {
-      border-top-right-radius: 8px;
-      position: absolute;
-      width: $left-width;
-      left: 0;
-      bottom: 0;
-      text-align: left;
-      margin: -1* $border-size;
-      margin-top: 0;
-      > li:first-of-type {
-	border-top-right-radius: 5px;
-      }
-    }
-  }
-}
-
-div.matchtable {
-  z-index: 20;
-  margin-left: $left-distance - ($border-size / 2);
-  margin-right: $right-match-distance;
-  padding: 0;
-  overflow-x: auto;
-  overflow-y: visible;
-  width: auto;
-  table {
-    display: table;
-    border-collapse: separate;
-    border-spacing: 0px;
-  }
-  th {
-    color: $nearly-white;
-  }
-  thead {
-    tr th {
-      background-color: $darker-orange;
-      border-top-width: 0px !important;
-    }
-  }
-  tbody {
-    > tr:nth-of-type(1) > th {
-      border-top-color: transparent;
-    }
-    /**
-     * Click on a row and it's highlighted.
-     */
-    > tr:focus {
-      outline: none;
-      /*
-	outline:  (2 * $border-size) solid $light-green;
-	-moz-outline-radius: $border-size;
-	outline-radius: $border-size;
-	*/
-      background-color: $light-green;
-      border-color: $light-green;
-      td {
-        background-color: inherit;
-        color: $nearly-white;
-        border-color: $light-green;
-      }
-    }
-  }
-  tr {
-    /**
-     * The first two columns.
-     */
-    > th:nth-of-type(1),
-    > th:nth-of-type(2) {
-      position: absolute;
-      z-index: 80;
-      vertical-align: middle;
-      left: 0px;
-      @include matchinfo-head;
-    }
-    > th:nth-of-type(2) {
-      left: ($left-width / 2) + $border-size;
-    }
-    > * {
-      @include cell-info;
-      border: ($border-size / 2) solid $dark-orange;
-    }
-  }
-  tr > td {
-    background-color: $middle-orange; // $nearly-white;
-    white-space: nowrap;
-    vertical-align: top;
-    text-align: center;
-  }
-  tr:nth-child(even) > td {
-    background-color: $light-orange;
-  }
-}
-
-/**
-  * Tree view
-  */
-div.matchtree {
-  position: relative;
-  overflow-x: hidden;
-  overflow-y: visible;
-  padding: 0;
-  margin-top: 1pt;
-
-  /**
-   * Label
-   */
-  h6 {
-    display: inline;
-    font-size: inherit;
-    color: $nearly-white;
-    margin: 0;
-    padding: 0 !important;
-    float: left;
-    > span {
-      @include matchinfo-head;
-      @include cell-info;
-      display: inline-block;
-      margin: 0;
-      &:nth-of-type(2) {
-	margin-left: $border-size;
-      }
-    }
-  }
-  > div {
-    overflow-x: auto;
-    margin: $border-size;
-    margin-left: $left-distance;
-    margin-right: $right-match-distance;
-
-    background-color: $light-orange; // $nearly-white; // $light-orange;
-    > em {
-      color: $nearly-white;
-      cursor: pointer;
-      display: block;
-      position: absolute;
-      right: 0px;
-      top: 0px;
-      width: $right-match-distance;
-      border-width: 0;
-      z-index: 8;
-      text-decoration:none;
-      text-align: center;
-      font-weight: bold;
-      font-style: normal;
-
-      &::after {
-	font-family: 'FontAwesome';
-	content: '\f00d';
-      }
-    }
-  }
-}
-
-/**
- * SVG tree
- */
-path.edge {
-  stroke: $darker-orange;
-  stroke-width: 2px;
-  fill: none;
-}
-
-g.root rect.empty {
-  stroke: $darker-orange;
-  fill: $darker-orange;
-  stroke-width: 2px;
-}
-
-g.middle rect {
-  stroke: $darker-orange;
-  stroke-width: 2px;
-  fill: $middle-orange;
-}
-
-g.leaf > rect {
-  display: none;
-}
-
-g > text {
-  text-anchor: middle;
-  font-size: 9pt;
-}
-
-g.leaf > text {
-  font-size: 10pt;
-  overflow: visible;
-}
diff --git a/public/scss/media.scss b/public/scss/media.scss
deleted file mode 100644
index cef3fed..0000000
--- a/public/scss/media.scss
+++ /dev/null
@@ -1,118 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$standard-margin: 4px;
-
-@media (orientation: portrait), (max-width: 42.5em) {
-  body, #search ol, header, header input {
-    font-size: 9pt;
-  }
-  header form {
-    padding-left: 0px;
-    padding-top: 33px;
-  }
-  .vc {
-    font-size: 9pt;
-  }
-  h1 {
-    margin-left: 10px;
-    width: 130px;
-    height: 40px;
-    background-size: 100%;
-    background-position: 50% 0;
-    z-index: 300;
-  }
-
-  #searchbar {
-    padding-right: 30px;
-    input {
-      font-size: 9pt;
-    }
-    button[type=submit] {
-      right: 0;
-    }
-  }
-
-  .level-1 {
-    padding-bottom: 2px;
-  }
-
-  .level-2 {
-    padding-bottom: 4px;
-  }
-
-  main {
-    margin-left: $standard-margin;
-    margin-right: $standard-margin;
-  }
-
-  #search ol {
-    > li:target, > li.active {
-      > div > div.snippet {
-	margin: 2px 2em 2px 4px;
-      }
-    }
-    > li:not(:target):not(.active) {
-      padding: 3pt 0 3pt 0;
-    }
-  }
-
-  div.matchinfo {
-    font-size: 9pt;
-  }
-
-  div.matchtable tr > * {
-    padding: 1pt 3pt;
-  }
-
-  div.matchtree {
-    h6 {
-      display: block;
-      float: none;
-    }
-    > div {
-      margin-left: 2px;
-    }
-  }
-
-  div.resultinfo p.found,
-  #pagination > a {
-    font-size: 9pt;
-  }
-
-  #logos {
-    margin-left: 0;
-    margin-right: 0;
-
-    > div {
-      border-top-width: 14px;
-    }
-  }
-
-/*
-
-  #sidebar {
-    padding-top: 22px;
-  }
-  #tutorial {
-    border-radius: 0;
-    border-width: 0;
-    right: 0;
-    left: 0;
-    bottom: 0;
-    top: 0;
-    padding: 0;
-  }
-  #tutorial iframe {
-    border-radius: 0;
-  }
-  #sidebar:not(.active) > i.fa-bars {
-    font-size: 12pt;
-    width: 10pt;
-    height: 11pt;
-  }
-  pre.query {
-    font-size: 9.5pt;
-  }
-*/
-}
\ No newline at end of file
diff --git a/public/scss/menu.scss b/public/scss/menu.scss
deleted file mode 100644
index 5e2d084..0000000
--- a/public/scss/menu.scss
+++ /dev/null
@@ -1,140 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$border-size: 2px;
-
-/**
- * Menu list - used nearly everywhere
- */
-ul.menu,
-ul.menu > span.pref:not(:empty) {
-  box-sizing: border-box;
-  text-shadow: none;
-  font-weight: normal;
-  // Pagination border?
-
-  z-index: 7000;
-}
-
-ul.menu > li,
-ul.menu > span.pref:not(:empty) {
-  box-shadow: $choose-box-shadow;
-  border: {
-    width: $border-size;
-    bottom-width: 0px;
-    top-width: 0px;
-    style: solid;
-  }
-  @include choose-item;
-  cursor: pointer;
-  padding: $item-padding;
-  white-space: normal;
-}
-
-ul.menu > li,
-ul.menu > span.pref:not(.active) {
-  @include choose-item;
-}
-
-ul.menu {
-  position: absolute;
-  padding: 0;
-  margin: 0;
-  text-indent: 0;
-  list-style-type: none;
-  list-style-position: outside;
-
-  /**
-   * List items
-   */
-  > li {
-    padding-right: 1.6em;
-
-    &:first-of-type {
-      border-top: {
-	width: $border-size;
-	left-radius: $standard-border-radius;
-	right-radius: $standard-border-radius;
-      }
-    }
-    &:last-of-type {
-      border-bottom: {
-	width: $border-size;
-	left-radius: $standard-border-radius;
-	right-radius: $standard-border-radius;
-      }
-    }
-    mark {
-      text-decoration: underline;
-      background-color: transparent;
-      color: inherit;
-      font-weight: bold;
-    }
-  }
-  > li.active,
-  > span.pref.active {
-    @include choose-active;
-  }
-  > li:hover,
-  > span.pref:hover {
-    @include choose-hover;
-  }
-
-  /**
-   * Default prefix view
-   */
-  > span.pref:not(:empty) {
-    position: absolute;
-    min-width: 5px;
-    font-size: 80%;
-    left: 0;
-    bottom: 0;
-    display: block;
-    margin-bottom: -2.1em;
-    padding: 2px 6px;
-    border: {
-      radius: $standard-border-radius;
-      width: $border-size;
-    }
-  }
-}
-
-/**
- * Rolling menu
- */
-ul.menu.roll {
-  > li:first-of-type {
-    &:not(.no-more):before {
-      position: absolute;
-      font-family: "FontAwesome";
-      content: '\f0de';
-      right: .5em;
-      top: .4em;
-    }
-  }
-  > li:last-of-type {
-    &:not(.no-more):before {
-      position: absolute;
-      font-family: "FontAwesome";
-      content: '\f0dd';
-      right: .5em;
-      bottom: .4em;
-    }
-  }
-}
-
-
-/**
- * Sorting menu
- */
-ul.menu.sort {
-  position: relative;
-  display: inline-block;
-  > li::before {
-    content: '';
-  }
-  > li.active:hover {
-    @include choose-remove;
-  }
-
-}
\ No newline at end of file
diff --git a/public/scss/pagination.scss b/public/scss/pagination.scss
deleted file mode 100644
index 0e099ac..0000000
--- a/public/scss/pagination.scss
+++ /dev/null
@@ -1,114 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$border-size : 2px;
-
-/**
- * The pagination view
- */
-/*
-<div id="pagination">
-  <a rel="prev"><span><i class="fa fa-caret-left"></i></span></a>
-  <a rel="self"><span>1</span></a>
-  <a href="#p=2"><span>2</span></a>
-  <a href="#3"><span>3</span></a>
-  <span><i class="fa fa-ellipsis-h"></i></span>
-  <a href="#67"><span>67</span></a>
-  <a rel="next" href="#2"><span><i class="fa fa-caret-right"></i></span></a>
-</div>
-*/
-#pagination {
-  /**
-   * Always in fixed position.
-   * This may need to be overwritten in case multiple
-   * paginations have to be activated.
-   */
-  font-size: 0;
-  position: fixed;
-  right: 20px;
-  bottom: 10px;
-  z-index: 400;
-  padding: 0;
-  height: auto;
-  line-height: 0;
-
-  > a {
-    margin: 0;
-    font-size: 10pt;
-    padding: 0;
-
-    > span {
-      box-shadow: $choose-box-shadow;
-      @include standard-text-padding;
-      @include choose-item;
-      display: inline-block;
-      line-height: 2em;
-      text-align: center;
-      border: {
-	top-width: $border-size;
-	bottom-width:  $border-size;
-	top-style: solid;
-	bottom-style: solid;
-      }
-    }
-
-    &:not(:link):not([rel=self]) span {
-      color: $choose-blind-color;
-    }
-
-    &.ellipsis > span {
-      > span {
-	@include blind;
-      }
-      &::after {
-	font-family: 'FontAwesome';
-	content: '\f141';
-      }
-    }
-
-    &[rel=self] > span {
-      @include choose-active;
-      border {
-	left-width: $border-size;
-	right-width: $border-size;
-	left-style: solid;
-	right-style: solid;
-      }
-    }
-
-    &[rel=prev] > span {
-      border: {
-	top-left-radius: $standard-border-radius;
-	bottom-left-radius: $standard-border-radius;
-	left-width: $border-size;
-	left-style: solid;
-      }
-      > span {
-	@include blind;
-      }
-      &::after {
-	font-family: 'FontAwesome';
-	content: '\f0d9';
-      }
-    }
-
-    &[rel=next] > span {
-      border: {
-	top-right-radius: $standard-border-radius;
-	bottom-right-radius: $standard-border-radius;
-	right-width: $border-size;
-	right-style: solid;
-      }
-      > span {
-	@include blind;
-      }
-      &::after {
-	font-family: 'FontAwesome';
-	content: '\f0da';
-      }
-    }
-    &:link:hover span {
-      @include choose-hover;
-    }
-  }
-}
\ No newline at end of file
diff --git a/public/scss/query.scss b/public/scss/query.scss
deleted file mode 100644
index 4167059..0000000
--- a/public/scss/query.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-@import "util";
-@charset "utf-8";
-
-
-pre.query {
-  overflow-x: hidden; 
-  cursor: pointer;
-  padding: .5em;
-  @include choose-item;
-  position:relative;
-  border: {
-    width: 2px;
-    style: solid;
-    radius: $standard-border-radius;
-  }
-  box-shadow: $choose-box-shadow;
-  
-  &:hover {
-    @include choose-hover;
-  }
-  &:active {
-    @include choose-active;
-  }
-}
diff --git a/public/scss/resultinfo.scss b/public/scss/resultinfo.scss
deleted file mode 100644
index 1f1097f..0000000
--- a/public/scss/resultinfo.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-div.resultinfo {
-  clear: both;
-
-  p.found {
-    font-size: 10pt;
-    padding: 0;
-    margin: 0;
-    text-align: right;
-  }
-}
-
-#total-results {
-  color: $total-results;
-  font-weight: bold;
-}
-
diff --git a/public/scss/searchbar.scss b/public/scss/searchbar.scss
deleted file mode 100644
index 098eacd..0000000
--- a/public/scss/searchbar.scss
+++ /dev/null
@@ -1,139 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$border-size: 2px;
-$right-distance: 30px;
-
-/**
- * Input field
- */
-#q-field {
-  width: 100%;
-  margin: 0;
-  margin-bottom: 3px;
-  display: block;
-}
-
-header input {
-  outline: none;
-  font-size: 11pt;
-  border: $border-size solid $nearly-white;
-  padding: 2px;
-}
-
-#searchbar {
-  position: relative;
-  width: 100%;
-  padding-right: 60px;
-  button[type=submit] {
-    position: absolute;
-    font-weight: normal;
-    @include choose-item;
-    padding: 0;
-    height: 100%;
-    top: 0;
-    right: $right-distance;
-    width: 30px;
-    cursor:pointer;
-    > span:nth-of-type(1) {
-      @include blind;
-    }
-    &::after {
-      font-family: "FontAwesome";
-      content: "\f002";
-    }
-    border: {
-      width: $border-size;
-      style: solid;
-      color: $nearly-white;
-    }
-    &:hover {
-      @include choose-hover;
-    }
-    &:active {
-      @include choose-active;
-    }
-
-    /**
-     * This is just for styling the last button,
-     * in case there are more than one buttons.
-     */
-    &:last-of-type {
-      @include box-sizing-box();
-      border: {
-	right-width: $border-size;
-	right-style: solid;
-	top-right-radius: $standard-border-radius;
-	bottom-right-radius: $standard-border-radius;
-      }
-    }
-  }
-  button + button {
-    right: 0;
-  }
-}
-
-/**
- * Checkbox styling
- * http://stackoverflow.com/questions/4148499/how-to-style-checkbox-using-css
-*/
-.checkbox {
-  display: none;
-  + label {
-    cursor: pointer;
-    span { 
-      border-radius: 4px;
-      display: inline-block;
-      width: 1em; // 12px
-      height: 1em;
-      line-height: 1em; // 12px;
-      vertical-align: middle;
-      padding: 0;
-      margin-right: .2em;
-/*
-    background-color: $nearly-white;
-    &:hover {
-      border-color: $nearly-white;
-    }
-*/
-      &::after {
-	font-family: "FontAwesome"; 
-	content: '\f096';
-      }
-    }
-  }
-  &:checked + label span { 
-    &:after {
-      content:"\f046";
-    }
-  }
-}
-
-#button-right {
-  display: inline-block;
-  float: right;
-  color: $nearly-white;
-  line-height: 2em;
-  margin-right: $right-distance;
-  > a {
-    color: $nearly-white;
-    cursor:pointer;
-    position: relative;
-    font-size: 120%;
-    > span {
-      @include blind;
-    }
-  }
-  > a::after {
-    font-family: 'FontAwesome';
-  }
-  > a.tutorial::after {
-    content: '\f19d';
-  }
-  > a.align.left::after {
-    content: '\f036';
-  }
-  > a.align.right::after {
-    content: '\f038';
-  }
-}
diff --git a/public/scss/sidebar.scss b/public/scss/sidebar.scss
deleted file mode 100644
index 5829600..0000000
--- a/public/scss/sidebar.scss
+++ /dev/null
@@ -1,183 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$border-size: 2px;
-
-#sidebar {
-  // box-shadow: 2px 2px 5px darken($dark-green, 15%);
-  // box-shadow: $choose-box-shadow;
-  outline: none;
-  display: block;
-  background-color: $dark-green;
-  position: fixed;
-  z-index: 7100;
-  color: $nearly-white;
-  width: $logo-left-distance;
-  top: 0;
-  left: 0;
-  height: 100%;
-  padding-top: 80px;
-  transition: all .3s ease-in-out;
-  > div {
-    overflow-y: auto;
-    overflow-x: visible;
-    max-height: 100%;
-  }
-  > * {
-    opacity: 1;
-  }
-  &::after {
-    display: block;
-    opacity: 0;
-    cursor: pointer;
-    position: absolute;
-    right: 0;
-    bottom: 0;
-    margin-right: -30px;
-    background-color: $dark-green;
-    content: '#';
-    font-size: 16pt;
-    width: 16pt;  
-    height: 17pt;
-    padding: 6pt;
-    border-top-right-radius: $standard-border-radius;
-  }
-  h2 {
-    font: {
-      size: 100%;
-      weight: bold;
-    }
-    line-height: 2em;
-    text-align: center;
-    padding: 0;
-    margin: 0;
-  }
-
-  ul {
-    list-style-type: none;
-/*
-    background-color: $light-green;
-*/
-    margin: 0;
-    font-size: 10pt;
-    text-indent: 0;
-    padding: 0;
-    li {
-      padding: 0;
-      > a {
-	@include choose-item;
-	padding: $item-padding;
-
-	border-right: {
-	  width: $border-size;
-	  style: solid;
-	}
-
-	display: block;
-	&:link, &:visited {
-	  color: inherited;
-	}
-	&:hover {
-	  color: inherit;
-	  transition: none;
-	  @include choose-hover;
-	}
-	&.active, &:active {
-	  @include choose-active;
-	}
-      }
-      h3 {
-        font: {
-	  weight: bold;
-	  size: 100%;
-	}	  
-	padding: 0;
-	margin: 0;
-      }
-/*
-      &.active {
-	text-shadow: none;
-	h3 {
-	  margin-bottom: 2pt;
-	  padding-bottom: 2pt;
-	  border-bottom: 1px solid black;
-	}
-      }
-*/
-      > a {
-	padding-left: 6pt;
-      }
-      li > a {
-	padding-left: 18pt;
-      }
-      li li > a {
-	padding-left: 36pt;
-      }
-    }
-  }
-  nav > ul > li > a {
-    font-weight: bold;
-  }
-}
-
-
-#sidebar:not(:focus):not(.active) {
-  margin-left: -1 * ($logo-left-distance - 15px);
-//  box-shadow: none;
-/*
-  overflow-y: hidden;
-  overflow-x: visible;
-*/
-  &::after {
-    opacity: 1;
-  }
-  > * {
-    opacity: 0;
-    // TODO
-    transition: {
-      property: opacity;
-      duration: .3s;
-    }
-  }
-}
-
-/*
-#sidebar {
-  text-shadow: none;
-  height: 105%;
-  margin-top: -10px;
-  background-color: #496000;
-  left: 0;
-  top: 0;
-  &.active {
-    box-shadow: 2px 2px 5px darken($dark-green, 15%);
-    margin-left: 0px;
-    left: 0;
-    top: 0;
-  }
-  &:not(.active) > i.fa-bars {
-    opacity: 1;
-    cursor: pointer;
-    background-color: #496000;
-    position: fixed;
-    font-size: 16pt;
-    width: 16pt;  
-    height: 17pt;
-    padding: 6pt;
-    bottom: 0;
-    left: 0;
-    border-top-right-radius: 5pt;
-  }
-  dl.info {
-    font-size: 9pt;
-    padding: 0 10pt;
-    > dt {
-      font-weight: bold;
-      float: left;
-    }
-    > dd {
-      text-align: right;
-    }
-  }
-}
-*/
\ No newline at end of file
diff --git a/public/scss/tutorial.scss b/public/scss/tutorial.scss
deleted file mode 100644
index 0b03cd0..0000000
--- a/public/scss/tutorial.scss
+++ /dev/null
@@ -1,132 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$border-size: 2px;
-
-#tutorial {
-  position: fixed;
-  z-index: 9999;
-  top:    5%;
-  bottom: 5%;
-  left:   2%;
-  right:  2%;
-  padding-right: $right-match-distance;
-/*
-  padding: 0;
-  margin: 0;
-*/
-  background-color: $nearly-white;
-  ul.action {
-    background-color: $middle-grey;
-    display: block;
-  }
-  border: {
-    width: 2 * $border-size;
-//    color: $dark-orange;
-    color: $dark-grey;
-    style: solid;
-    radius: $standard-border-radius;
-  }
-  box-shadow: $choose-box-shadow;
-  iframe {
-    border-width: 0;
-    width: 100%;
-    // Hack for a Firefox bug
-    min-height: 100.1%;
-    background: {
-      image:url('#{$img-path}/korap-bg-kalamar.svg');
-      repeat: no-repeat;
-      position: center center;
-      size: 20%;
-    }
-  }
-}
-
-body.embedded {
-  background-color: $nearly-white;
-  #sidebar {
-/*
-    border-right: {
-      width: $border-size;
-      style: solid;
-    }
-*/
-    padding-top: 0;
-    // @include choose-item;
-    background-color: $middle-grey;
-    > div {
-      position: relative;
-      top: 50%;
-      -webkit-transform: translateY(-50%);
-      -ms-transform: translateY(-50%);
-      transform: translateY(-50%);
-      // margin-right: -1 * $border-size;
-    }
-  }
-}
-
-main.tutorial {
-  margin-left: $logo-left-distance + 15px;
-}
-
-/*
-#tutorial {
-  iframe {
-    width: 100%;
-    min-height: 100%;
-    border: {
-      width: 0;
-      radius: 10px;
-    }
-    background: {
-      image:url('#{$basepath}/img/korap-bg-kalamar.svg');
-      size: 10%;
-      repeat: no-repeat;
-      position: center center;
-      color: white;
-    }
-  }
-
-  display: block;
-  background-color: $dark-green;
-  border-radius: 15px;
-  &:not(.active) {
-    display: none;
-  }
-  &.active {
-    display: block;
-  }
-  > i,
-  > a > i {
-    font-size: 20pt;
-    color: $dark-green;
-    position: absolute;
-    background-color: rgba(255,255,255,0.5);
-    z-index: 100;
-    top: 10pt;
-    right: 20pt;
-    cursor: pointer;
-  }
-  > a > i {
-    right: 40pt;
-  }
-}
-
-div.test {
-  display: block;
-  border-left: 10px solid $dark-green;
-  margin: 1em;
-  padding-left: 5px;
-  p {
-    color: black;
-    &.fail {
-      font-weight: bold;
-      color: red;
-    }
-    &.pass {
-      font-weight: bold;
-      color: green;
-    }
-  }
-}
-*/
\ No newline at end of file
diff --git a/public/scss/util.scss b/public/scss/util.scss
deleted file mode 100644
index a4971c4..0000000
--- a/public/scss/util.scss
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * Official IDS colors
- */
-$ids-orange-1: rgb(246, 168,   0);
-$ids-orange-2: rgb(242, 148,   0);
-$ids-grey-1:   rgb(135, 136, 138);
-$ids-grey-2:   rgb(217, 218, 219);
-$ids-blue-1:   rgb(  0, 158, 224); // Pragmatik
-$ids-blue-2:   rgb(188, 228, 247); // Pragmatik
-$ids-green-1:  rgb( 99, 111,   7); // Grammatik
-$ids-green-2:  rgb(227, 232, 163); // Grammatik
-$ids-pink-1:   rgb(193,   0,  43); // Lexik
-$ids-pink-2:   rgb(250, 243, 222); // Lexik
-
-/**
- * Orange Colors
- */
-$light-orange:   #f4eebb; // #ffe56a;
-$middle-orange:  #ffd080;
-$dark-orange:    $ids-orange-1; // #ffa500;
-$darker-orange:  #ff8000;
-$darkest-orange: darken($dark-orange, 20%);
-// $light-orange-2: #f4eebb;, #ffd080;
-// Yellow: #fff48d
-
-/**
- * Green Colors
- */
-$dark-green:    $ids-green-1; // #496000;
-$middle-green:  lighten($ids-green-1, 5%); // $ids-green-1; // #688704;
-$light-green:   lighten($ids-green-1, 13%); // #7ba400;
-
-/**
- * Blue Colors
- */
-$light-blue:     $ids-blue-2; // #cfe6f4;
-$dark-blue:      $ids-blue-1; // #73b2f4;
-$darkest-blue:   darken($dark-blue, 40%);
-
-
-/*
- * Grey
- */
-$middle-grey:  $ids-grey-1; // #999;
-$light-grey:   $ids-grey-2; // #ddd;
-// $dark-grey:    darken($light-grey, 55%); // #555;
-$dark-grey:    darken($middle-grey, 15%); // #555;
-// $nearly-white: #f5f5f5;
-$nearly-white: #fff;
-
-$middle-red: #c1002b;
-$light-red: lighten($middle-red, 40%);
-$dark-red: darken($middle-red, 40%);
-
-$dark-shadow: 1px 1px 1px rgba(0,0,0,0.3);
-$light-shadow: 1px 1px rgba(255,255,255,0.5);
-
-$total-results: $light-green;
-
-/**
- * KWIC colors
- */
-$kwic-border:       $middle-grey;
-$kwic-line-noneven: $light-grey;
-$kwic-line-even:    $nearly-white;
-$kwic-match-color:  $dark-grey;
-$kwic-match-shadow: $light-shadow;
-
-$kwic-highlight-1:  $middle-red;
-$kwic-highlight-2:  $dark-blue;   // #009ee0;
-$kwic-highlight-3:  $dark-orange; // #f29400;
-$kwic-highlight-4:  $light-green;
-
-$choose-bg:     $light-grey;
-$choose-border-color: $middle-grey;
-$choose-border: 2px solid $choose-border-color;
-$choose-color:  $dark-grey;
-$choose-blind-color:  $middle-grey;
-$choose-box-shadow: 2px 2px 2px  rgba(0,0,0,0.2);
-$standard-border-radius: 6px;
-$item-padding: 3pt 6pt;
-
-/**
- * Path information
- */
-$img-path: '../../img/build';
-$font-path: '../../font';
-
-/**
- * Margins
- */
-$standard-margin: 30px;
-$right-match-distance: 20px;
-$logo-left-distance: 230px;
-
-@mixin blind {
-  position: absolute;
-  margin-left: -3000px;
-}
-
-@mixin choose-item {
-  color: $choose-color;
-  background-color: $choose-bg;
-  border-color: $choose-border-color;
-  text-shadow: $light-shadow;
-}
-
-@mixin choose-hover {
-  color: $nearly-white;
-  text-shadow: none;
-  background-color: $dark-orange;
-  border-color: $darker-orange;
-}
-
-@mixin choose-active {
-  color: $dark-green;
-  text-shadow: none;
-  background-color: $light-green;
-  border-color: $dark-green;
-}
-
-@mixin choose-remove {
-  color: $nearly-white;
-  text-shadow: none;
-  background-color: $middle-red;
-  border-color: $dark-red;
-}
-
-@mixin color-transition {
-  transition: color 0.3s ease 0s;
-}
-
-@mixin standard-text-padding {
-  padding-left: .4em;
-  padding-right: .4em;
-}
-
-@mixin box-sizing-box() {
-  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
-  box-sizing: border-box;         /* Opera/IE 8+ */
-}
-
-
-// https://css-tricks.com/almanac/properties/a/appearance/
-@mixin no-appearance {
-  -webkit-appearance:none;
-  -moz-appearance:none;
-  appearance:none;
-}
diff --git a/public/scss/vc.scss b/public/scss/vc.scss
deleted file mode 100644
index 1ed7959..0000000
--- a/public/scss/vc.scss
+++ /dev/null
@@ -1,250 +0,0 @@
-@charset "utf-8";
-@import "util";
-
-$left-padding: 28pt; // 2.8em;
-$border-size: 2px;
-
-.vc {
-  background-color: $light-green;
-  margin-top: 10px;
-  .docGroup {
-    position: relative;
-    display: inline-block;
-    color: $nearly-white;
-
-    margin-left: $left-padding; // 2.8em
-
-    // .6em .5em
-    border-width: 0 (2 * $border-size);
-
-    padding: {
-      top: 10pt;
-      bottom: 2pt;
-      left: 0pt;
-      right: 6pt;
-    }
-
-    border: {
-      radius: $standard-border-radius * 2;
-      style: solid;
-    }
-
-    .docGroup {
-      display: block;
-    }
-
-    > .operators {
-      position: absolute;
-      display: block;
-      top: 10px;
-      vertical-align: middle;
-      left: 3px;
-      border-width: 2px 2px 2px 0;
-      border-top-right-radius: 7px;
-      border-bottom-right-radius: 7px;
-      margin-left: 100%;
-      padding: 0;
-    }
-
-    &:hover {
-      background-color: rgba(255,255,255,.05);
-    }
-
-    &[data-operation=or] {
-      border-color: $dark-orange;
-      > .doc::before,
-      > .docGroup::before {
-	content: "oder";
-      }
-      > .operators {
-	border-color: $dark-orange;
-	background-color: $dark-orange;
-	color: $nearly-white;
-      }
-    }
-
-    &[data-operation=and] {
-      > .doc::before,
-      > .docGroup::before {
-	content: "und";
-      }
-    }
-
-    &[data-operation] {
-      > .doc:first-child::before,
-      > .docGroup:first-child::before {
-	content: '';
-      }
-      > .doc::before,
-      > .docGroup::before {
-	display: inline-block;
-	text-align: right;
-//	width: 2.2em;
-	width: $left-padding;
-	color: $dark-green;
-      }
-      > .doc::before {
-	padding-right: 1.2em;
-	margin-right: .1em;
-      }
-      > .docGroup::before {
-	position: absolute;
-      }
-    }
-  }
-
-  .doc {
-    > span + span {
-      margin-left: 5pt;
-    }
-    > span.key,
-    > span.value {
-      font-weight: bold;
-    }
-    > .operators {
-      display: inline-block;
-      border-color: $dark-orange;
-      border-width: 2px 2px 2px 2px;
-      border-radius: 7px;
-
-      margin-left: 10px;
-      > span {
-	&.and {
-	  border: {
-	    radius: inherit;
-	    top-right-radius: 0;
-	    bottom-right-radius: 0;
-	  }
-	  &.delete {
-	    border: {
-	      top-left-radius: 0;
-	      bottom-left-radius: 0;
-	    }
-	  }
-	}
-      }
-    }
-    > span.key {
-      position: relative;
-      > ul {
-	margin: 0;
-	margin-left: 3.3em;
-      }
-    }
-  }
-
-  .rewritten {
-    .rewrite {
-      margin-left: 4pt;
-      display: inline-block;
-      color: $dark-orange;
-      &::after {
-	font-family: FontAwesome;
-	font-style: normal;
-	font-weight: normal;
-	content: "\f040"; // "\f14b";
-	text-decoration: underline;
-      }
-      span {
-	display: none;
-      }
-    }
-  }
-
-  .operators {
-    opacity: 0;
-    white-space: nowrap;
-    padding: 0;
-    font-size: 0;
-    line-height: 0;
-    color: $light-green;
-    border-color: $nearly-white;
-    text-align: center;
-    font-weight: bold;
-    border-style: solid;
-
-    > span {
-      cursor: pointer;
-      font-size: 9pt;
-      line-height: 1.3em;
-      padding: 0 4px;
-      display: inline-block;
-      &.and {
-	background-color: $nearly-white;
-	color: $light-green;
-      }
-      &.or {
-	background-color: $dark-orange;
-	color: $nearly-white;
-      }
-      &.delete {
-	background-color: red;
-	border-radius: inherit;
-	color: $nearly-white;
-      }
-    }
-  }
-
-  > .docGroup {
-    margin-left: 0;
-  }
-
-
-  .docGroup > .docGroup::before {
-    background-color: red;
-    margin-left: -1 * $left-padding; // -3.4em;
-  }
-
-  .doc, .docGroup {
-    &:hover > .operators {
-      opacity: 1;
-    }
-  }
-
-}
-
-
-/*
-.vc .docGroup[data-operation=and]::before,
-.vc .docGroup[data-operation=and] .operators {
-  background-color: white;
-}
-*/
-
-$dg-index : 30;
-
-.docGroup {
-  > .operators {
-    z-index: $dg-index;
-  }
-  .docGroup {
-    > .operators {
-      z-index: $dg-index + 1;
-    }
-    .docGroup {
-      > .operators {
-	z-index: $dg-index + 2;
-      }
-      .docGroup {
-	> .operators {
-	  z-index: $dg-index + 3;
-	}
-	.docGroup {
-	  > .operators {
-	    z-index: $dg-index + 4;
-	  }
-	  .docGroup {
-	    > .operators {
-	      z-index: $dg-index + 5;
-	    }
-	    .docGroup {
-	      > .operators {
-		z-index: $dg-index + 6;
-	      }
-	    }
-	  }
-	}
-      }
-    }
-  }
-}
diff --git a/templates/api-communication.html.ep b/templates/api-communication.html.ep
deleted file mode 100644
index 9a6ccb0..0000000
--- a/templates/api-communication.html.ep
+++ /dev/null
@@ -1,14 +0,0 @@
-% use JSON::XS;
-
-% if (kalamar_test_port() && search->api_request) {
-<pre class="query api" onclick="this.classList.toggle('active')">
-  <span>API Response for </span>
-  <span style="font-size: 70%"><%= search->api_request %></span>
-  <code>
-%= search->api_response
-  </code>
-</pre>
-%= javascript begin
-hljs.initHighlightingOnLoad();
-% end
-% };
diff --git a/templates/collections.html.ep b/templates/collections.html.ep
deleted file mode 100644
index 3c217bc..0000000
--- a/templates/collections.html.ep
+++ /dev/null
@@ -1,23 +0,0 @@
-% my $res = stash('search.resource');
-% if (ref($res) eq 'ARRAY') {
-
-<h2>Virtual Collections</h2>
-<ul>
-% foreach my $vc (@$res) {
-  <li class="active" title="<%= $vc->{description} // '' %>"><h3><%= $vc->{name} %></h3>
-% my $stats = $vc->{statistics};
-    <dl class="info">
-      <dt>Texts</dt>      <dd><%= commify($stats->{documents} // $stats->{texts}) %></dd>
-      <dt>Paragraphs</dt> <dd><%= commify $stats->{paragraphs} %></dd>
-      <dt>Sentences</dt>  <dd><%= commify $stats->{sentences} %></dd>
-      <dt>Tokens</dt>     <dd><%= commify $stats->{tokens} %></dd>
-    </dl>
-  </li>
-% };
-</ul>
-% }
-
-
-% if (kalamar_test_port()) {
-<p style="font-size: 9pt; padding-left: 1em">Index port: <%= $c->url_for($c->config('Kalamar')->{'api-0.1'})->port %></p>
-% };
diff --git a/templates/not_found.production.html.ep b/templates/not_found.production.html.ep
index ee74676..eebf7c6 100644
--- a/templates/not_found.production.html.ep
+++ b/templates/not_found.production.html.ep
@@ -1,5 +1,4 @@
-% my $msg = '404: Page not found';
-% layout 'main', title => 'KorAP: ' . $msg;
+% layout 'main', title => 'KorAP: ' . loc('notFound');
 
 <p id="no-results"><%= $msg %></p>