(function(e,t){t[e]={listeners:{},init:function(e){this.parent=e||document.querySelector("article");this.populate();this.dispatch("init")&&this.activate(0);return this},activate:function(e){if(this.index==e||e<0||e>this.deck.length-1)return;if(this.index>=0&&!this.dispatch("deactivate",{index:this.index,element:this.deck[this.index]}))return;this.index=e;this.update();this.dispatch("activate",{index:this.index,element:this.deck[this.index]})},populate:function(){this.deck=this.parent.querySelectorAll("section")},update:function(){for(var e=0;e<this.deck.length;e++){this.deck[e].className=this.deck[e].className.replace(RegExp("((active|inactive)|(before|after)(-\\d+)?)","g"),"").trim();if(e==this.index)this.deck[e].classList.add("active");else{this.deck[e].classList.add("inactive",e<this.index?"before":"after",(e<this.index?"before":"after")+"-"+Math.abs(e-this.index))}}},next:function(){this.dispatch("next",{index:this.index})&&this.activate(this.index+1)},prev:function(){this.dispatch("prev",{index:this.index})&&this.activate(this.index-1)},on:function(e,t){(this.listeners[e]||(this.listeners[e]=[])).push(t)},dispatch:function(e,t){var n=true;if(!this.listeners[e])return n;for(var r=0;r<this.listeners[e].length;r++)if(this.listeners[e][r](t)==false)n=false;return n}};document.addEventListener("keydown",function(n){[34,32,13,39,40].indexOf(n.which)>-1&&t[e].next();[33,37,38].indexOf(n.which)>-1&&t[e].prev()})})("lecture",this)
(function(e,t){t[e]={listeners:{},init:function(e){this.parent=e||document.querySelector("article");this.populate();this.dispatch("init")&&this.activate(0);return this},activate:function(e){if(e<0||e>this.deck.length-1)return;if(this.index>=0&&!this.dispatch("deactivate",{index:this.index,element:this.deck[this.index]}))return;this.index=e;this.update();this.dispatch("activate",{index:this.index,element:this.deck[this.index]})},populate:function(){this.deck=this.parent.querySelectorAll("section")},update:function(){for(var e=0;e<this.deck.length;e++){this.deck[e].className=this.deck[e].className.replace(RegExp("((active|inactive)|(before|after)(-\\d+)?)","g"),"").trim();if(e==this.index)this.deck[e].classList.add("active");else{this.deck[e].classList.add("inactive",e<this.index?"before":"after",(e<this.index?"before":"after")+"-"+Math.abs(e-this.index))}}},next:function(){this.dispatch("next",{index:this.index})&&this.activate(this.index+1)},prev:function(){this.dispatch("prev",{index:this.index})&&this.activate(this.index-1)},on:function(e,t){(this.listeners[e]||(this.listeners[e]=[])).push(t)},dispatch:function(e,t){var n=true;if(!this.listeners[e])return n;for(var r=0;r<this.listeners[e].length;r++)if(this.listeners[e][r](t)==false)n=false;return n}};document.addEventListener("keydown",function(n){[34,32,13,39,40].indexOf(n.which)>-1&&t[e].next();[33,37,38].indexOf(n.which)>-1&&t[e].prev()})})("lecture",this)
Update minified library.