ability to define autoSlide duration per slide

This commit is contained in:
Hakim El Hattab 2012-10-13 12:04:33 -04:00
parent ed1db1f3c8
commit 421b78aafb
3 changed files with 75 additions and 74 deletions

View File

@ -76,7 +76,7 @@ Reveal.initialize({
// Number of milliseconds between automatically proceeding to the // Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten // next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoSlide attribute on your slides // by using a data-duration attribute on your slides
autoSlide: 0, autoSlide: 0,
// Enable slide navigation via mouse wheel // Enable slide navigation via mouse wheel

View File

@ -1,5 +1,5 @@
/*! /*!
* reveal.js 2.1 r31 * reveal.js 2.1 r32
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
@ -34,7 +34,7 @@ var Reveal = (function(){
// Number of milliseconds between automatically proceeding to the // Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten // next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoSlide attribute on your slides // by using a data-duration attribute on your slides
autoSlide: 0, autoSlide: 0,
// Enable slide navigation via mouse wheel // Enable slide navigation via mouse wheel
@ -53,7 +53,7 @@ var Reveal = (function(){
dependencies: [] dependencies: []
}, },
// stores if the next slide should be shown automatically // Stores if the next slide should be shown automatically
// after n milliseconds // after n milliseconds
autoSlide = config.autoSlide, autoSlide = config.autoSlide,
@ -845,11 +845,11 @@ var Reveal = (function(){
state = state.concat( slideState.split( ' ' ) ); state = state.concat( slideState.split( ' ' ) );
} }
// if this slide has a autoSlide attribtue associated use this as autoSlide value // If this slide has a data-duration attribtue associated use this as
// otherwise use the global configured time // autoSlide value otherwise use the global configured time
var slideAutoSlide = slides[index].getAttribute( 'data-autoslide' ); var slideAutoSlide = slides[index].getAttribute( 'data-duration' );
if( slideAutoSlide ) { if( slideAutoSlide ) {
autoSlide = parseInt(slideAutoSlide); autoSlide = parseInt( slideAutoSlide );
} else { } else {
autoSlide = config.autoSlide autoSlide = config.autoSlide
} }

133
js/reveal.min.js vendored
View File

@ -1,78 +1,79 @@
/*! /*!
* reveal.js 2.1 r31 * reveal.js 2.1 r32
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/ */
var Reveal=(function(){var l=".reveal .slides>section",b=".reveal .slides>section.present>section",R={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},m=0,e=0,y,G,ah=[],f={},T="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,n="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,z=0,k=0,C=0,aa={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:40}; var Reveal=(function(){var l=".reveal .slides>section",b=".reveal .slides>section.present>section",R={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},Y=R.autoSlide,m=0,e=0,y,G,ai=[],f={},T="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,n="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,z=0,k=0,D=0,ab={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:40};
function i(ai){if((!n&&!T)){document.body.setAttribute("class","no-transforms");return;}t(R,ai);P();d();V();}function P(){f.theme=document.querySelector("#theme"); function i(aj){if((!n&&!T)){document.body.setAttribute("class","no-transforms");return;}t(R,aj);P();d();V();}function P(){f.theme=document.querySelector("#theme");
f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&R.progress){var al=document.createElement("div");al.classList.add("progress"); f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&R.progress){var am=document.createElement("div");am.classList.add("progress");
al.innerHTML="<span></span>";f.wrapper.appendChild(al);}if(!f.wrapper.querySelector(".controls")&&R.controls){var ak=document.createElement("aside");ak.classList.add("controls"); am.innerHTML="<span></span>";f.wrapper.appendChild(am);}if(!f.wrapper.querySelector(".controls")&&R.controls){var al=document.createElement("aside");al.classList.add("controls");
ak.innerHTML='<a class="left" href="#">&#x25C4;</a><a class="right" href="#">&#x25BA;</a><a class="up" href="#">&#x25B2;</a><a class="down" href="#">&#x25BC;</a>'; al.innerHTML='<a class="left" href="#">&#x25C4;</a><a class="right" href="#">&#x25BA;</a><a class="up" href="#">&#x25B2;</a><a class="down" href="#">&#x25BC;</a>';
f.wrapper.appendChild(ak);}if(!f.wrapper.querySelector(".state-background")){var aj=document.createElement("div");aj.classList.add("state-background"); f.wrapper.appendChild(al);}if(!f.wrapper.querySelector(".state-background")){var ak=document.createElement("div");ak.classList.add("state-background");
f.wrapper.appendChild(aj);}if(!f.wrapper.querySelector(".pause-overlay")){var ai=document.createElement("div");ai.classList.add("pause-overlay");f.wrapper.appendChild(ai); f.wrapper.appendChild(ak);}if(!f.wrapper.querySelector(".pause-overlay")){var aj=document.createElement("div");aj.classList.add("pause-overlay");f.wrapper.appendChild(aj);
}f.progress=document.querySelector(".reveal .progress");f.progressbar=document.querySelector(".reveal .progress span");if(R.controls){f.controls=document.querySelector(".reveal .controls"); }f.progress=document.querySelector(".reveal .progress");f.progressbar=document.querySelector(".reveal .progress span");if(R.controls){f.controls=document.querySelector(".reveal .controls");
f.controlsLeft=document.querySelector(".reveal .controls .left");f.controlsRight=document.querySelector(".reveal .controls .right");f.controlsUp=document.querySelector(".reveal .controls .up"); f.controlsLeft=document.querySelector(".reveal .controls .left");f.controlsRight=document.querySelector(".reveal .controls .right");f.controlsUp=document.querySelector(".reveal .controls .up");
f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll"; f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
document.body.style.height="120%";window.addEventListener("load",ab,false);window.addEventListener("orientationchange",ab,false);}}function V(){var aj=[],an=[]; document.body.style.height="120%";window.addEventListener("load",ac,false);window.addEventListener("orientationchange",ac,false);}}function V(){var ak=[],ao=[];
for(var ak=0,ai=R.dependencies.length;ak<ai;ak++){var al=R.dependencies[ak];if(!al.condition||al.condition()){if(al.async){an.push(al.src);}else{aj.push(al.src); for(var al=0,aj=R.dependencies.length;al<aj;al++){var am=R.dependencies[al];if(!am.condition||am.condition()){if(am.async){ao.push(am.src);}else{ak.push(am.src);
}if(typeof al.callback==="function"){head.ready(al.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],al.callback);}}}function am(){head.js.apply(null,an);H();}if(aj.length){head.ready(am); }if(typeof am.callback==="function"){head.ready(am.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],am.callback);}}}function an(){head.js.apply(null,ao);H();}if(ak.length){head.ready(an);
head.js.apply(null,aj);}else{am();}}function H(){E();K();J();N();}function K(){if(T===false){R.transition="linear";}if(R.controls&&f.controls){f.controls.style.display="block"; head.js.apply(null,ak);}else{an();}}function H(){E();K();J();N();}function K(){if(T===false){R.transition="linear";}if(R.controls&&f.controls){f.controls.style.display="block";
}if(R.progress&&f.progress){f.progress.style.display="block";}if(R.theme&&f.theme){var ak=f.theme.getAttribute("href");var ai=/[^\/]*?(?=\.css)/;var aj=ak.match(ai)[0]; }if(R.progress&&f.progress){f.progress.style.display="block";}if(R.theme&&f.theme){var al=f.theme.getAttribute("href");var aj=/[^\/]*?(?=\.css)/;var ak=al.match(aj)[0];
if(R.theme!==aj){ak=ak.replace(ai,R.theme);f.theme.setAttribute("href",ak);}}if(R.transition!=="default"){f.wrapper.classList.add(R.transition);}if(R.mouseWheel){document.addEventListener("DOMMouseScroll",p,false); if(R.theme!==ak){al=al.replace(aj,R.theme);f.theme.setAttribute("href",al);}}if(R.transition!=="default"){f.wrapper.classList.add(R.transition);}if(R.mouseWheel){document.addEventListener("DOMMouseScroll",p,false);
document.addEventListener("mousewheel",p,false);}if(R.rollingLinks){M();}}function E(){document.addEventListener("touchstart",A,false);document.addEventListener("touchmove",ad,false); document.addEventListener("mousewheel",p,false);}if(R.rollingLinks){M();}}function E(){document.addEventListener("touchstart",A,false);document.addEventListener("touchmove",ae,false);
document.addEventListener("touchend",W,false);window.addEventListener("hashchange",w,false);if(R.keyboard){document.addEventListener("keydown",af,false); document.addEventListener("touchend",W,false);window.addEventListener("hashchange",w,false);if(R.keyboard){document.addEventListener("keydown",ag,false);
}if(R.controls&&f.controls){f.controlsLeft.addEventListener("click",q(B),false);f.controlsRight.addEventListener("click",q(j),false);f.controlsUp.addEventListener("click",q(u),false); }if(R.controls&&f.controls){f.controlsLeft.addEventListener("click",q(B),false);f.controlsRight.addEventListener("click",q(j),false);f.controlsUp.addEventListener("click",q(u),false);
f.controlsDown.addEventListener("click",q(F),false);}}function U(){document.removeEventListener("keydown",af,false);document.removeEventListener("touchstart",A,false); f.controlsDown.addEventListener("click",q(F),false);}}function U(){document.removeEventListener("keydown",ag,false);document.removeEventListener("touchstart",A,false);
document.removeEventListener("touchmove",ad,false);document.removeEventListener("touchend",W,false);window.removeEventListener("hashchange",w,false);if(R.controls&&f.controls){f.controlsLeft.removeEventListener("click",q(B),false); document.removeEventListener("touchmove",ae,false);document.removeEventListener("touchend",W,false);window.removeEventListener("hashchange",w,false);if(R.controls&&f.controls){f.controlsLeft.removeEventListener("click",q(B),false);
f.controlsRight.removeEventListener("click",q(j),false);f.controlsUp.removeEventListener("click",q(u),false);f.controlsDown.removeEventListener("click",q(F),false); f.controlsRight.removeEventListener("click",q(j),false);f.controlsUp.removeEventListener("click",q(u),false);f.controlsDown.removeEventListener("click",q(F),false);
}}function t(aj,ai){for(var ak in ai){aj[ak]=ai[ak];}}function S(ak,ai){var al=ak.x-ai.x,aj=ak.y-ai.y;return Math.sqrt(al*al+aj*aj);}function q(ai){return function(aj){aj.preventDefault(); }}function t(ak,aj){for(var al in aj){ak[al]=aj[al];}}function S(al,aj){var am=al.x-aj.x,ak=al.y-aj.y;return Math.sqrt(am*am+ak*ak);}function q(aj){return function(ak){ak.preventDefault();
ai.call();};}function ab(){setTimeout(function(){window.scrollTo(0,1);},0);}function r(aj,ai){var ak=document.createEvent("HTMLEvents",1,2);ak.initEvent(aj,true,true); aj.call();};}function ac(){setTimeout(function(){window.scrollTo(0,1);},0);}function r(ak,aj){var al=document.createEvent("HTMLEvents",1,2);al.initEvent(ak,true,true);
t(ak,ai);f.wrapper.dispatchEvent(ak);}function af(aj){if(document.querySelector(":focus")!==null||aj.shiftKey||aj.altKey||aj.ctrlKey||aj.metaKey){return; t(al,aj);f.wrapper.dispatchEvent(al);}function ag(ak){if(document.querySelector(":focus")!==null||ak.shiftKey||ak.altKey||ak.ctrlKey||ak.metaKey){return;
}var ai=true;switch(aj.keyCode){case 80:case 33:Y();break;case 78:case 34:x();break;case 72:case 37:B();break;case 76:case 39:j();break;case 75:case 38:u(); }var aj=true;switch(ak.keyCode){case 80:case 33:Z();break;case 78:case 34:x();break;case 72:case 37:B();break;case 76:case 39:j();break;case 75:case 38:u();
break;case 74:case 40:F();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:L()?ac():x();break;case 13:L()?ac():ai=false;break;case 66:case 190:Z(); break;case 74:case 40:F();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:L()?ad():x();break;case 13:L()?ad():aj=false;break;case 66:case 190:aa();
break;default:ai=false;}if(ai){aj.preventDefault();}else{if(aj.keyCode===27&&T){X();aj.preventDefault();}}N();}function A(ai){aa.startX=ai.touches[0].clientX; break;default:aj=false;}if(aj){ak.preventDefault();}else{if(ak.keyCode===27&&T){X();ak.preventDefault();}}N();}function A(aj){ab.startX=aj.touches[0].clientX;
aa.startY=ai.touches[0].clientY;aa.startCount=ai.touches.length;if(ai.touches.length===2){aa.startSpan=S({x:ai.touches[1].clientX,y:ai.touches[1].clientY},{x:aa.startX,y:aa.startY}); ab.startY=aj.touches[0].clientY;ab.startCount=aj.touches.length;if(aj.touches.length===2){ab.startSpan=S({x:aj.touches[1].clientX,y:aj.touches[1].clientY},{x:ab.startX,y:ab.startY});
}}function ad(an){if(!aa.handled){var al=an.touches[0].clientX;var ak=an.touches[0].clientY;if(an.touches.length===2&&aa.startCount===2){var am=S({x:an.touches[1].clientX,y:an.touches[1].clientY},{x:aa.startX,y:aa.startY}); }}function ae(ao){if(!ab.handled){var am=ao.touches[0].clientX;var al=ao.touches[0].clientY;if(ao.touches.length===2&&ab.startCount===2){var an=S({x:ao.touches[1].clientX,y:ao.touches[1].clientY},{x:ab.startX,y:ab.startY});
if(Math.abs(aa.startSpan-am)>aa.threshold){aa.handled=true;if(am<aa.startSpan){I();}else{ac();}}}else{if(an.touches.length===1){var aj=al-aa.startX,ai=ak-aa.startY; if(Math.abs(ab.startSpan-an)>ab.threshold){ab.handled=true;if(an<ab.startSpan){I();}else{ad();}}}else{if(ao.touches.length===1){var ak=am-ab.startX,aj=al-ab.startY;
if(aj>aa.threshold&&Math.abs(aj)>Math.abs(ai)){aa.handled=true;B();}else{if(aj<-aa.threshold&&Math.abs(aj)>Math.abs(ai)){aa.handled=true;j();}else{if(ai>aa.threshold){aa.handled=true; if(ak>ab.threshold&&Math.abs(ak)>Math.abs(aj)){ab.handled=true;B();}else{if(ak<-ab.threshold&&Math.abs(ak)>Math.abs(aj)){ab.handled=true;j();}else{if(aj>ab.threshold){ab.handled=true;
u();}else{if(ai<-aa.threshold){aa.handled=true;F();}}}}}}an.preventDefault();}else{if(navigator.userAgent.match(/android/gi)){an.preventDefault();}}}function W(ai){aa.handled=false; u();}else{if(aj<-ab.threshold){ab.handled=true;F();}}}}}}ao.preventDefault();}else{if(navigator.userAgent.match(/android/gi)){ao.preventDefault();}}}function W(aj){ab.handled=false;
}function p(ai){clearTimeout(z);z=setTimeout(function(){var aj=ai.detail||-ai.wheelDelta;if(aj>0){x();}else{Y();}},100);}function w(ai){J();}function D(ai){if(L()){ai.preventDefault(); }function p(aj){clearTimeout(z);z=setTimeout(function(){var ak=aj.detail||-aj.wheelDelta;if(ak>0){x();}else{Z();}},100);}function w(aj){J();}function C(aj){if(L()){aj.preventDefault();
ac();m=this.getAttribute("data-index-h");e=this.getAttribute("data-index-v");a();}}function M(){if(T&&!("msPerspective" in document.body.style)){var aj=document.querySelectorAll(".reveal .slides section a:not(.image)"); ad();m=this.getAttribute("data-index-h");e=this.getAttribute("data-index-v");a();}}function M(){if(T&&!("msPerspective" in document.body.style)){var ak=document.querySelectorAll(".reveal .slides section a:not(.image)");
for(var ak=0,ai=aj.length;ak<ai;ak++){var al=aj[ak];if(al.textContent&&!al.querySelector("img")&&(!al.className||!al.classList.contains(al,"roll"))){al.classList.add("roll"); for(var al=0,aj=ak.length;al<aj;al++){var am=ak[al];if(am.textContent&&!am.querySelector("img")&&(!am.className||!am.classList.contains(am,"roll"))){am.classList.add("roll");
al.innerHTML='<span data-title="'+al.text+'">'+al.innerHTML+"</span>";}}}}function I(){if(R.overview){f.wrapper.classList.add("overview");var ai=document.querySelectorAll(l); am.innerHTML='<span data-title="'+am.text+'">'+am.innerHTML+"</span>";}}}}function I(){if(R.overview){f.wrapper.classList.add("overview");var aj=document.querySelectorAll(l);
for(var an=0,al=ai.length;an<al;an++){var ak=ai[an],ar="translateZ(-2500px) translate("+((an-m)*105)+"%, 0%)";ak.setAttribute("data-index-h",an);ak.style.display="block"; for(var ao=0,am=aj.length;ao<am;ao++){var al=aj[ao],at="translateZ(-2500px) translate("+((ao-m)*105)+"%, 0%)";al.setAttribute("data-index-h",ao);al.style.display="block";
ak.style.WebkitTransform=ar;ak.style.MozTransform=ar;ak.style.msTransform=ar;ak.style.OTransform=ar;ak.style.transform=ar;if(!ak.classList.contains("stack")){ak.addEventListener("click",D,true); al.style.WebkitTransform=at;al.style.MozTransform=at;al.style.msTransform=at;al.style.OTransform=at;al.style.transform=at;if(!al.classList.contains("stack")){al.addEventListener("click",C,true);
}var aq=ak.querySelectorAll("section");for(var am=0,aj=aq.length;am<aj;am++){var ap=aq[am],ao="translate(0%, "+((am-(an===m?e:0))*105)+"%)";ap.setAttribute("data-index-h",an); }var ar=al.querySelectorAll("section");for(var an=0,ak=ar.length;an<ak;an++){var aq=ar[an],ap="translate(0%, "+((an-(ao===m?e:0))*105)+"%)";aq.setAttribute("data-index-h",ao);
ap.setAttribute("data-index-v",am);ap.style.display="block";ap.style.WebkitTransform=ao;ap.style.MozTransform=ao;ap.style.msTransform=ao;ap.style.OTransform=ao; aq.setAttribute("data-index-v",an);aq.style.display="block";aq.style.WebkitTransform=ap;aq.style.MozTransform=ap;aq.style.msTransform=ap;aq.style.OTransform=ap;
ap.style.transform=ao;ap.addEventListener("click",D,true);}}}}function ac(){if(R.overview){f.wrapper.classList.remove("overview");var al=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section")); aq.style.transform=ap;aq.addEventListener("click",C,true);}}}}function ad(){if(R.overview){f.wrapper.classList.remove("overview");var am=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
for(var ak=0,ai=al.length;ak<ai;ak++){var aj=al[ak];aj.style.WebkitTransform="";aj.style.MozTransform="";aj.style.msTransform="";aj.style.OTransform=""; for(var al=0,aj=am.length;al<aj;al++){var ak=am[al];ak.style.WebkitTransform="";ak.style.MozTransform="";ak.style.msTransform="";ak.style.OTransform="";
aj.style.transform="";aj.removeEventListener("click",D);}a();}}function X(ai){if(typeof ai==="boolean"){ai?I():ac();}else{L()?ac():I();}}function L(){return f.wrapper.classList.contains("overview"); ak.style.transform="";ak.removeEventListener("click",C);}a();}}function X(aj){if(typeof aj==="boolean"){aj?I():ad();}else{L()?ad():I();}}function L(){return f.wrapper.classList.contains("overview");
}function c(){f.wrapper.classList.add("paused");}function o(){f.wrapper.classList.remove("paused");}function Z(){if(ae()){o();}else{c();}}function ae(){return f.wrapper.classList.contains("paused"); }function c(){f.wrapper.classList.add("paused");}function o(){f.wrapper.classList.remove("paused");}function aa(){if(af()){o();}else{c();}}function af(){return f.wrapper.classList.contains("paused");
}function ag(aj,al){var an=Array.prototype.slice.call(document.querySelectorAll(aj)),ao=an.length;if(ao){if(R.loop){al%=ao;if(al<0){al=ao+al;}}al=Math.max(Math.min(al,ao-1),0); }function ah(am,ar){var ak=Array.prototype.slice.call(document.querySelectorAll(am)),aq=ak.length;if(aq){if(R.loop){ar%=aq;if(ar<0){ar=aq+ar;}}ar=Math.max(Math.min(ar,aq-1),0);
for(var am=0;am<ao;am++){var ai=an[am];if(L()===false){var ap=Math.abs((al-am)%(ao-3))||0;ai.style.display=ap>3?"none":"block";}an[am].classList.remove("past"); for(var ao=0;ao<aq;ao++){var ap=ak[ao];if(L()===false){var aj=Math.abs((ar-ao)%(aq-3))||0;ap.style.display=aj>3?"none":"block";}ak[ao].classList.remove("past");
an[am].classList.remove("present");an[am].classList.remove("future");if(am<al){an[am].classList.add("past");}else{if(am>al){an[am].classList.add("future"); ak[ao].classList.remove("present");ak[ao].classList.remove("future");if(ao<ar){ak[ao].classList.add("past");}else{if(ao>ar){ak[ao].classList.add("future");
}}if(ai.querySelector("section")){an[am].classList.add("stack");}}an[al].classList.add("present");var ak=an[al].getAttribute("data-state");if(ak){ah=ah.concat(ak.split(" ")); }}if(ap.querySelector("section")){ak[ao].classList.add("stack");}}ak[ar].classList.add("present");var al=ak[ar].getAttribute("data-state");if(al){ai=ai.concat(al.split(" "));
}}else{al=0;}return al;}function a(ao,at){y=G;var al=ah.concat();ah.length=0;var ar=m,aj=e;m=ag(l,ao===undefined?m:ao);e=ag(b,at===undefined?e:at);stateLoop:for(var am=0,ap=ah.length; }var an=ak[ar].getAttribute("data-duration");if(an){Y=parseInt(an);}else{Y=R.autoSlide;}}else{ar=0;}return ar;}function a(ap,au){y=G;var am=ai.concat();
am<ap;am++){for(var ak=0;ak<al.length;ak++){if(al[ak]===ah[am]){al.splice(ak,1);continue stateLoop;}}document.documentElement.classList.add(ah[am]);r(ah[am]); ai.length=0;var at=m,ak=e;m=ah(l,ap===undefined?m:ap);e=ah(b,au===undefined?e:au);stateLoop:for(var an=0,aq=ai.length;an<aq;an++){for(var al=0;al<am.length;
}while(al.length){document.documentElement.classList.remove(al.pop());}if(R.progress&&f.progress){f.progressbar.style.width=(m/(document.querySelectorAll(l).length-1))*window.innerWidth+"px"; al++){if(am[al]===ai[an]){am.splice(al,1);continue stateLoop;}}document.documentElement.classList.add(ai[an]);r(ai[an]);}while(am.length){document.documentElement.classList.remove(am.pop());
}if(L()){I();}s();clearTimeout(C);C=setTimeout(h,1500);var ai=document.querySelectorAll(l);var aq=ai[m],an=aq.querySelectorAll("section");G=an[e]||aq;if(m!==ar||e!==aj){r("slidechanged",{indexh:m,indexv:e,previousSlide:y,currentSlide:G}); }if(R.progress&&f.progress){f.progressbar.style.width=(m/(document.querySelectorAll(l).length-1))*window.innerWidth+"px";}if(L()){I();}s();clearTimeout(D);
}else{y=null;}if(y){y.classList.remove("present");}}function s(){if(!R.controls||!f.controls){return;}var ai=g();[f.controlsLeft,f.controlsRight,f.controlsUp,f.controlsDown].forEach(function(aj){aj.classList.remove("enabled"); D=setTimeout(h,1500);var aj=document.querySelectorAll(l);var ar=aj[m],ao=ar.querySelectorAll("section");G=ao[e]||ar;if(m!==at||e!==ak){r("slidechanged",{indexh:m,indexv:e,previousSlide:y,currentSlide:G});
});if(ai.left){f.controlsLeft.classList.add("enabled");}if(ai.right){f.controlsRight.classList.add("enabled");}if(ai.up){f.controlsUp.classList.add("enabled"); }else{y=null;}if(y){y.classList.remove("present");}}function s(){if(!R.controls||!f.controls){return;}var aj=g();[f.controlsLeft,f.controlsRight,f.controlsUp,f.controlsDown].forEach(function(ak){ak.classList.remove("enabled");
}if(ai.down){f.controlsDown.classList.add("enabled");}}function g(){var ai=document.querySelectorAll(l),aj=document.querySelectorAll(b);return{left:m>0,right:m<ai.length-1,up:e>0,down:e<aj.length-1}; });if(aj.left){f.controlsLeft.classList.add("enabled");}if(aj.right){f.controlsRight.classList.add("enabled");}if(aj.up){f.controlsUp.classList.add("enabled");
}function J(){var an=window.location.hash;var am=an.slice(2).split("/"),ak=an.replace(/#|\//gi,"");if(isNaN(parseInt(am[0],10))&&ak.length){var ai=document.querySelector("#"+ak); }if(aj.down){f.controlsDown.classList.add("enabled");}}function g(){var aj=document.querySelectorAll(l),ak=document.querySelectorAll(b);return{left:m>0,right:m<aj.length-1,up:e>0,down:e<ak.length-1};
if(ai){var ao=Reveal.getIndices(ai);O(ao.h,ao.v);}else{O(m,e);}}else{var al=parseInt(am[0],10)||0,aj=parseInt(am[1],10)||0;O(al,aj);}}function h(){if(R.history){var ai="/"; }function J(){var ao=window.location.hash;var an=ao.slice(2).split("/"),al=ao.replace(/#|\//gi,"");if(isNaN(parseInt(an[0],10))&&al.length){var aj=document.querySelector("#"+al);
if(m>0||e>0){ai+=m;}if(e>0){ai+="/"+e;}window.location.hash=ai;}}function v(){if(document.querySelector(b+".present")){var aj=document.querySelectorAll(b+".present .fragment:not(.visible)"); if(aj){var ap=Reveal.getIndices(aj);O(ap.h,ap.v);}else{O(m,e);}}else{var am=parseInt(an[0],10)||0,ak=parseInt(an[1],10)||0;O(am,ak);}}function h(){if(R.history){var aj="/";
if(aj.length){aj[0].classList.add("visible");r("fragmentshown",{fragment:aj[0]});return true;}}else{var ai=document.querySelectorAll(l+".present .fragment:not(.visible)"); if(m>0||e>0){aj+=m;}if(e>0){aj+="/"+e;}window.location.hash=aj;}}function v(){if(document.querySelector(b+".present")){var ak=document.querySelectorAll(b+".present .fragment:not(.visible)");
if(ai.length){ai[0].classList.add("visible");r("fragmentshown",{fragment:ai[0]});return true;}}return false;}function Q(){if(document.querySelector(b+".present")){var aj=document.querySelectorAll(b+".present .fragment.visible"); if(ak.length){ak[0].classList.add("visible");r("fragmentshown",{fragment:ak[0]});return true;}}else{var aj=document.querySelectorAll(l+".present .fragment:not(.visible)");
if(aj.length){aj[aj.length-1].classList.remove("visible");r("fragmenthidden",{fragment:aj[aj.length-1]});return true;}}else{var ai=document.querySelectorAll(l+".present .fragment.visible"); if(aj.length){aj[0].classList.add("visible");r("fragmentshown",{fragment:aj[0]});return true;}}return false;}function Q(){if(document.querySelector(b+".present")){var ak=document.querySelectorAll(b+".present .fragment.visible");
if(ai.length){ai[ai.length-1].classList.remove("visible");r("fragmenthidden",{fragment:ai[ai.length-1]});return true;}}return false;}function N(){clearTimeout(k); if(ak.length){ak[ak.length-1].classList.remove("visible");r("fragmenthidden",{fragment:ak[ak.length-1]});return true;}}else{var aj=document.querySelectorAll(l+".present .fragment.visible");
if(R.autoSlide){k=setTimeout(x,R.autoSlide);}}function O(aj,ai){a(aj,ai);}function B(){if(L()||Q()===false){a(m-1,0);}}function j(){if(L()||v()===false){a(m+1,0); if(aj.length){aj[aj.length-1].classList.remove("visible");r("fragmenthidden",{fragment:aj[aj.length-1]});return true;}}return false;}function N(){clearTimeout(k);
}}function u(){if(L()||Q()===false){a(m,e-1);}}function F(){if(L()||v()===false){a(m,e+1);}}function Y(){if(Q()===false){if(g().up){u();}else{var ai=document.querySelector(".reveal .slides>section.past:nth-child("+m+")"); if(Y){k=setTimeout(x,Y);}}function O(ak,aj){a(ak,aj);}function B(){if(L()||Q()===false){a(m-1,0);}}function j(){if(L()||v()===false){a(m+1,0);}}function u(){if(L()||Q()===false){a(m,e-1);
if(ai){e=(ai.querySelectorAll("section").length+1)||0;m--;a();}}}}function x(){if(v()===false){g().down?F():j();}N();}return{initialize:i,navigateTo:O,navigateLeft:B,navigateRight:j,navigateUp:u,navigateDown:F,navigatePrev:Y,navigateNext:x,toggleOverview:X,addEventListeners:E,removeEventListeners:U,getIndices:function(ai){var am=m,ak=e; }}function F(){if(L()||v()===false){a(m,e+1);}}function Z(){if(Q()===false){if(g().up){u();}else{var aj=document.querySelector(".reveal .slides>section.past:nth-child("+m+")");
if(ai){var an=!!ai.parentNode.nodeName.match(/section/gi);var al=an?ai.parentNode:ai;var aj=Array.prototype.slice.call(document.querySelectorAll(l));am=Math.max(aj.indexOf(al),0); if(aj){e=(aj.querySelectorAll("section").length+1)||0;m--;a();}}}}function x(){if(v()===false){g().down?F():j();}N();}return{initialize:i,navigateTo:O,navigateLeft:B,navigateRight:j,navigateUp:u,navigateDown:F,navigatePrev:Z,navigateNext:x,toggleOverview:X,addEventListeners:E,removeEventListeners:U,getIndices:function(aj){var an=m,al=e;
if(an){ak=Math.max(Array.prototype.slice.call(ai.parentNode.children).indexOf(ai),0);}}return{h:am,v:ak};},getPreviousSlide:function(){return y;},getCurrentSlide:function(){return G; if(aj){var ao=!!aj.parentNode.nodeName.match(/section/gi);var am=ao?aj.parentNode:aj;var ak=Array.prototype.slice.call(document.querySelectorAll(l));an=Math.max(ak.indexOf(am),0);
},getQueryHash:function(){var ai={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(aj){ai[aj.split("=").shift()]=aj.split("=").pop();});return ai; if(ao){al=Math.max(Array.prototype.slice.call(aj.parentNode.children).indexOf(aj),0);}}return{h:an,v:al};},getPreviousSlide:function(){return y;},getCurrentSlide:function(){return G;
},addEventListener:function(aj,ak,ai){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(aj,ak,ai);}},removeEventListener:function(aj,ak,ai){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(aj,ak,ai); },getQueryHash:function(){var aj={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(ak){aj[ak.split("=").shift()]=ak.split("=").pop();});return aj;
},addEventListener:function(ak,al,aj){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(ak,al,aj);}},removeEventListener:function(ak,al,aj){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(ak,al,aj);
}}};})(); }}};})();