From 0605ab13dfc525fa1498a53833b83a1ad1612fa0 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Fri, 29 Nov 2013 10:57:26 -0700 Subject: add parallax horizontal and vertical properties to enable non-calculated parallax offsets --- js/reveal.js | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 98d802e..d8dc6bc 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -107,6 +107,10 @@ var Reveal = (function(){ // Parallax background size parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px" + // Amount to move parallax background (horizontal and vertical) on slide change + parallaxBackgroundHorizontal: '', // Number, e.g. 100 + parallaxBackgroundVertical: '', // Number, e.g. 10 + // Number of slides away from the current that are visible viewDistance: 3, @@ -2026,13 +2030,29 @@ var Reveal = (function(){ backgroundHeight = parseInt( backgroundSize[1], 10 ); } - var slideWidth = dom.background.offsetWidth; - var horizontalSlideCount = horizontalSlides.length; - var horizontalOffset = -( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) * indexh; + var slideWidth = dom.background.offsetWidth, + horizontalSlideCount = horizontalSlides.length, + horizontalOffsetMultiplier, horizontalOffset; + + if (typeof config.parallaxBackgroundHorizontal === 'number') { + horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal; + } else { + horizontalOffsetMultiplier = ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ); + } + + horizontalOffset = horizontalOffsetMultiplier * indexh * -1; + + var slideHeight = dom.background.offsetHeight, + verticalSlideCount = verticalSlides.length, + verticalOffsetMultiplier, verticalOffset; + + if (typeof config.parallaxBackgroundVertical === 'number') { + verticalOffsetMultiplier = config.parallaxBackgroundVertical; + } else { + verticalOffsetMultiplier = ( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 ); + } - var slideHeight = dom.background.offsetHeight; - var verticalSlideCount = verticalSlides.length; - var verticalOffset = verticalSlideCount > 0 ? -( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 ) * indexv : 0; + verticalOffset = verticalSlideCount > 0 ? verticalOffsetMultiplier * indexv * -1 : 0; dom.background.style.backgroundPosition = horizontalOffset + 'px ' + verticalOffset + 'px'; -- cgit v1.2.3 From 2976921adf38b6624eea045a2a29f95aa80f6bfa Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 20 Dec 2013 09:48:51 +0100 Subject: compile assets --- js/reveal.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.min.js b/js/reveal.min.js index 6d03c42..a17fb52 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.6.1 (2013-12-02, 23:27) + * reveal.js 2.6.1 (2013-12-20, 09:48) * http://lab.hakim.se/reveal-js * MIT licensed * -- cgit v1.2.3 From 5a8da0555cd08a97864582359ca51609badd416c Mon Sep 17 00:00:00 2001 From: rajgoel Date: Fri, 20 Dec 2013 16:22:32 +0100 Subject: Add auto-slide API and data-autoslide for fragments --- js/reveal.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ef4add9..86eb825 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1448,6 +1448,33 @@ var Reveal = (function(){ } + /** + * Toggles the auto slide mode on and off. + * + * @param {Boolean} override Optional flag which sets the desired state. + * True means autoplay starts, false means it stops. + */ + + function toggleAutoSlide( override ) { + if( typeof override === 'boolean' ) { + override ? resumeAutoSlide() : pauseAutoSlide(); + } + + else { + autoSlidePaused ? resumeAutoSlide() : pauseAutoSlide(); + } + + } + + /** + * Checks if the auto slide mode is currently on. + */ + function isSliding() { + + return !autoSlidePaused; + + } + /** * Steps from the current point in the presentation to the * slide which matches the specified horizontal and vertical @@ -2473,14 +2500,26 @@ var Reveal = (function(){ if( currentSlide ) { + var fragmentAutoSlide = null; + // it is assumed that any given data-autoslide value (for each of the current fragments) can be chosen + toArray( Reveal.getCurrentSlide().querySelectorAll( '.current-fragment' ) ).forEach( function( el ) { + if( el.hasAttribute( 'data-autoslide' ) ) { + fragmentAutoSlide = el.getAttribute( 'data-autoslide' ); + } + } ); + var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null; var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' ); // Pick value in the following priority order: - // 1. Current slide's data-autoslide - // 2. Parent slide's data-autoslide - // 3. Global autoSlide setting - if( slideAutoSlide ) { + // 1. Current fragment's data-autoslide + // 2. Current slide's data-autoslide + // 3. Parent slide's data-autoslide + // 4. Global autoSlide setting + if( fragmentAutoSlide ) { + autoSlide = parseInt( fragmentAutoSlide, 10 ); + } + else if( slideAutoSlide ) { autoSlide = parseInt( slideAutoSlide, 10 ); } else if( parentAutoSlide ) { @@ -2533,6 +2572,7 @@ var Reveal = (function(){ function pauseAutoSlide() { autoSlidePaused = true; + dispatchEvent( 'autoslidepaused' ); clearTimeout( autoSlideTimeout ); if( autoSlidePlayer ) { @@ -2544,6 +2584,7 @@ var Reveal = (function(){ function resumeAutoSlide() { autoSlidePaused = false; + dispatchEvent( 'autoslideresumed' ); cueAutoSlide(); } @@ -2661,6 +2702,8 @@ var Reveal = (function(){ */ function onDocumentKeyDown( event ) { + // store auto slide value to be able to toggle auto sliding + var currentAutoSlideValue = autoSlidePaused; onUserInput( event ); // Check if there's a focused element that could be using @@ -2737,6 +2780,8 @@ var Reveal = (function(){ case 66: case 190: case 191: togglePause(); break; // f case 70: enterFullscreen(); break; + // a + case 65: if ( config.autoSlideStoppable ) toggleAutoSlide( currentAutoSlideValue ); break; default: triggered = false; } @@ -3289,9 +3334,13 @@ var Reveal = (function(){ // Toggles the "black screen" mode on/off togglePause: togglePause, + // Toggles the auto slide mode on/off + toggleAutoSlide: toggleAutoSlide, + // State checks isOverview: isOverview, isPaused: isPaused, + isSliding: isSliding, // Adds or removes all internal event listeners (such as keyboard) addEventListeners: addEventListeners, -- cgit v1.2.3 From 137ddf54722464fad6b726e21b98cfc0580050ec Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 21 Dec 2013 17:27:33 +0100 Subject: isSliding > isAutoSliding --- js/reveal.js | 4 ++-- js/reveal.min.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 86eb825..b868d13 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1469,7 +1469,7 @@ var Reveal = (function(){ /** * Checks if the auto slide mode is currently on. */ - function isSliding() { + function isAutoSliding() { return !autoSlidePaused; @@ -3340,7 +3340,7 @@ var Reveal = (function(){ // State checks isOverview: isOverview, isPaused: isPaused, - isSliding: isSliding, + isAutoSliding: isAutoSliding, // Adds or removes all internal event listeners (such as keyboard) addEventListeners: addEventListeners, diff --git a/js/reveal.min.js b/js/reveal.min.js index 3e4a239..9d91e3f 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2013-12-20, 10:34) + * reveal.js 2.6.1 (2013-12-21, 17:25) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2013 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!ec.transforms2d&&!ec.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(_b,a),k(_b,d),r(),c()}function b(){ec.transforms3d="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,ec.transforms2d="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,ec.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ec.requestAnimationFrame="function"==typeof ec.requestAnimationFrameMethod,ec.canvas=!!document.createElement("canvas").getContext,Vb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=_b.dependencies.length;h>g;g++){var i=_b.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),Q(),h(),cb(),X(!0),setTimeout(function(){dc.slides.classList.remove("no-transition"),ac=!0,t("ready",{indexh:Qb,indexv:Rb,currentSlide:Tb})},1)}function e(){dc.theme=document.querySelector("#theme"),dc.wrapper=document.querySelector(".reveal"),dc.slides=document.querySelector(".reveal .slides"),dc.slides.classList.add("no-transition"),dc.background=f(dc.wrapper,"div","backgrounds",null),dc.progress=f(dc.wrapper,"div","progress",""),dc.progressbar=dc.progress.querySelector("span"),f(dc.wrapper,"aside","controls",''),dc.slideNumber=f(dc.wrapper,"div","slide-number",""),f(dc.wrapper,"div","state-background",null),f(dc.wrapper,"div","pause-overlay",null),dc.controls=document.querySelector(".reveal .controls"),dc.controlsLeft=l(document.querySelectorAll(".navigate-left")),dc.controlsRight=l(document.querySelectorAll(".navigate-right")),dc.controlsUp=l(document.querySelectorAll(".navigate-up")),dc.controlsDown=l(document.querySelectorAll(".navigate-down")),dc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),dc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),dc.background.innerHTML="",dc.background.classList.add("no-transition"),l(document.querySelectorAll(Yb)).forEach(function(b){var c;c=q()?a(b,b):a(b,dc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),_b.parallaxBackgroundImage?(dc.background.style.backgroundImage='url("'+_b.parallaxBackgroundImage+'")',dc.background.style.backgroundSize=_b.parallaxBackgroundSize,setTimeout(function(){dc.wrapper.classList.add("has-parallax-background")},1)):(dc.background.style.backgroundImage="",dc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Xb).length;if(dc.wrapper.classList.remove(_b.transition),"object"==typeof a&&k(_b,a),ec.transforms3d===!1&&(_b.transition="linear"),dc.wrapper.classList.add(_b.transition),dc.wrapper.setAttribute("data-transition-speed",_b.transitionSpeed),dc.wrapper.setAttribute("data-background-transition",_b.backgroundTransition),dc.controls.style.display=_b.controls?"block":"none",dc.progress.style.display=_b.progress?"block":"none",_b.rtl?dc.wrapper.classList.add("rtl"):dc.wrapper.classList.remove("rtl"),_b.center?dc.wrapper.classList.add("center"):dc.wrapper.classList.remove("center"),_b.mouseWheel?(document.addEventListener("DOMMouseScroll",Bb,!1),document.addEventListener("mousewheel",Bb,!1)):(document.removeEventListener("DOMMouseScroll",Bb,!1),document.removeEventListener("mousewheel",Bb,!1)),_b.rollingLinks?u():v(),_b.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&_b.autoSlide&&_b.autoSlideStoppable&&ec.canvas&&ec.requestAnimationFrame?(Wb=new Pb(dc.wrapper,function(){return Math.min(Math.max((Date.now()-mc)/kc,0),1)}),Wb.on("click",Ob),nc=!1):Wb&&(Wb.destroy(),Wb=null),_b.theme&&dc.theme){var c=dc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];_b.theme!==e&&(c=c.replace(d,_b.theme),dc.theme.setAttribute("href",c))}P()}function i(){if(jc=!0,window.addEventListener("hashchange",Jb,!1),window.addEventListener("resize",Kb,!1),_b.touch&&(dc.wrapper.addEventListener("touchstart",vb,!1),dc.wrapper.addEventListener("touchmove",wb,!1),dc.wrapper.addEventListener("touchend",xb,!1),window.navigator.pointerEnabled?(dc.wrapper.addEventListener("pointerdown",yb,!1),dc.wrapper.addEventListener("pointermove",zb,!1),dc.wrapper.addEventListener("pointerup",Ab,!1)):window.navigator.msPointerEnabled&&(dc.wrapper.addEventListener("MSPointerDown",yb,!1),dc.wrapper.addEventListener("MSPointerMove",zb,!1),dc.wrapper.addEventListener("MSPointerUp",Ab,!1))),_b.keyboard&&document.addEventListener("keydown",ub,!1),_b.progress&&dc.progress&&dc.progress.addEventListener("click",Cb,!1),_b.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Lb,!1)}["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.addEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.addEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.addEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.addEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.addEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.addEventListener(a,Ib,!1)})})}function j(){jc=!1,document.removeEventListener("keydown",ub,!1),window.removeEventListener("hashchange",Jb,!1),window.removeEventListener("resize",Kb,!1),dc.wrapper.removeEventListener("touchstart",vb,!1),dc.wrapper.removeEventListener("touchmove",wb,!1),dc.wrapper.removeEventListener("touchend",xb,!1),window.navigator.pointerEnabled?(dc.wrapper.removeEventListener("pointerdown",yb,!1),dc.wrapper.removeEventListener("pointermove",zb,!1),dc.wrapper.removeEventListener("pointerup",Ab,!1)):window.navigator.msPointerEnabled&&(dc.wrapper.removeEventListener("MSPointerDown",yb,!1),dc.wrapper.removeEventListener("MSPointerMove",zb,!1),dc.wrapper.removeEventListener("MSPointerUp",Ab,!1)),_b.progress&&dc.progress&&dc.progress.removeEventListener("click",Cb,!1),["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.removeEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.removeEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.removeEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.removeEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.removeEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.removeEventListener(a,Ib,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){_b.hideAddressBar&&Vb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),dc.wrapper.dispatchEvent(c)}function u(){if(ec.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Xb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Xb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Nb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Nb,!1)})}function y(a){z(),dc.preview=document.createElement("div"),dc.preview.classList.add("preview-link-overlay"),dc.wrapper.appendChild(dc.preview),dc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),dc.preview.querySelector("iframe").addEventListener("load",function(){dc.preview.classList.add("loaded")},!1),dc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),dc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){dc.preview.classList.add("visible")},1)}function z(){dc.preview&&(dc.preview.setAttribute("src",""),dc.preview.parentNode.removeChild(dc.preview),dc.preview=null)}function A(){if(dc.wrapper&&!q()){var a=dc.wrapper.offsetWidth,b=dc.wrapper.offsetHeight;a-=b*_b.margin,b-=b*_b.margin;var c=_b.width,d=_b.height,e=20;B(_b.width,_b.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),dc.slides.style.width=c+"px",dc.slides.style.height=d+"px",cc=Math.min(a/c,b/d),cc=Math.max(cc,_b.minScale),cc=Math.min(cc,_b.maxScale),"undefined"==typeof dc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(dc.slides,"translate(-50%, -50%) scale("+cc+") translate(50%, 50%)"):dc.slides.style.zoom=cc;for(var f=l(document.querySelectorAll(Xb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=_b.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}U(),Y()}}function B(a,b,c){l(dc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(_b.overview){kb();var a=dc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;dc.wrapper.classList.add("overview"),dc.wrapper.classList.remove("overview-deactivating"),clearTimeout(hc),clearTimeout(ic),hc=setTimeout(function(){for(var c=document.querySelectorAll(Yb),d=0,e=c.length;e>d;d++){var f=c[d],g=_b.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Qb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Qb?Rb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Mb,!0)}else f.addEventListener("click",Mb,!0)}T(),A(),a||t("overviewshown",{indexh:Qb,indexv:Rb,currentSlide:Tb})},10)}}function F(){_b.overview&&(clearTimeout(hc),clearTimeout(ic),dc.wrapper.classList.remove("overview"),dc.wrapper.classList.add("overview-deactivating"),ic=setTimeout(function(){dc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Xb)).forEach(function(a){n(a,""),a.removeEventListener("click",Mb,!0)}),O(Qb,Rb),jb(),t("overviewhidden",{indexh:Qb,indexv:Rb,currentSlide:Tb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return dc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Tb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=dc.wrapper.classList.contains("paused");kb(),dc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=dc.wrapper.classList.contains("paused");dc.wrapper.classList.remove("paused"),jb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return dc.wrapper.classList.contains("paused")}function O(a,b,c,d){Sb=Tb;var e=document.querySelectorAll(Yb);void 0===b&&(b=D(e[a])),Sb&&Sb.parentNode&&Sb.parentNode.classList.contains("stack")&&C(Sb.parentNode,Rb);var f=bc.concat();bc.length=0;var g=Qb||0,h=Rb||0;Qb=S(Yb,void 0===a?Qb:a),Rb=S(Zb,void 0===b?Rb:b),T(),A();a:for(var i=0,j=bc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function R(){var a=l(document.querySelectorAll(Yb));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){fb(a.querySelectorAll(".fragment"))}),0===b.length&&fb(a.querySelectorAll(".fragment"))})}function S(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){_b.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=_b.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(bc=bc.concat(m.split(" ")))}else b=0;return b}function T(){var a,b,c=l(document.querySelectorAll(Yb)),d=c.length;if(d){var e=H()?10:_b.viewDistance;Vb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Qb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Qb?Math.abs(Rb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function U(){if(_b.progress&&dc.progress){var a=l(document.querySelectorAll(Yb)),b=document.querySelectorAll(Xb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Rb),dc.slideNumber.innerHTML=a}}function W(){var a=Z(),b=$();dc.controlsLeft.concat(dc.controlsRight).concat(dc.controlsUp).concat(dc.controlsDown).concat(dc.controlsPrev).concat(dc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&dc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&dc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&dc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&dc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&dc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&dc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Tb&&(b.prev&&dc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Tb)?(b.prev&&dc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&dc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function X(a){var b=null,c=_b.rtl?"future":"past",d=_b.rtl?"past":"future";if(l(dc.background.childNodes).forEach(function(e,f){Qb>f?e.className="slide-background "+c:f>Qb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Qb)&&l(e.childNodes).forEach(function(a,c){Rb>c?a.className="slide-background past":c>Rb?a.className="slide-background future":(a.className="slide-background present",f===Qb&&(b=a))})}),b){var e=Ub?Ub.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Ub&&dc.background.classList.add("no-transition"),Ub=b}setTimeout(function(){dc.background.classList.remove("no-transition")},1)}function Y(){if(_b.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Yb),d=document.querySelectorAll(Zb),e=dc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=dc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Qb,i=dc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Rb:0;dc.background.style.backgroundPosition=h+"px "+k+"px"}}function Z(){var a=document.querySelectorAll(Yb),b=document.querySelectorAll(Zb),c={left:Qb>0||_b.loop,right:Qb0,down:Rb0,next:!!b.length}}return{prev:!1,next:!1}}function _(a){a&&!bb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function ab(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function bb(){return!!window.location.search.match(/receiver/gi)}function cb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);O(e.h,e.v)}else O(Qb||0,Rb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Qb||g!==Rb)&&O(f,g)}}function db(a){if(_b.history)if(clearTimeout(gc),"number"==typeof a)gc=setTimeout(db,a);else{var b="/";Tb&&"string"==typeof Tb.getAttribute("id")?b="/"+Tb.getAttribute("id"):((Qb>0||Rb>0)&&(b+=Qb),Rb>0&&(b+="/"+Rb)),window.location.hash=b}}function eb(a){var b,c=Qb,d=Rb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(Yb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Tb){var h=Tb.querySelectorAll(".fragment").length>0;if(h){var i=Tb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function fb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function gb(a,b){if(Tb&&_b.fragments){var c=fb(Tb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=fb(Tb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),W(),!(!e.length&&!f.length)}}return!1}function hb(){return gb(null,1)}function ib(){return gb(null,-1)}function jb(){if(kb(),Tb){var a=Tb.parentNode?Tb.parentNode.getAttribute("data-autoslide"):null,b=Tb.getAttribute("data-autoslide");kc=b?parseInt(b,10):a?parseInt(a,10):_b.autoSlide,l(Tb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&kc&&1e3*a.duration>kc&&(kc=1e3*a.duration+1e3)}),!kc||nc||N()||H()||Reveal.isLastSlide()&&_b.loop!==!0||(lc=setTimeout(sb,kc),mc=Date.now()),Wb&&Wb.setPlaying(-1!==lc)}}function kb(){clearTimeout(lc),lc=-1}function lb(){nc=!0,clearTimeout(lc),Wb&&Wb.setPlaying(!1)}function mb(){nc=!1,jb()}function nb(){_b.rtl?(H()||hb()===!1)&&Z().left&&O(Qb+1):(H()||ib()===!1)&&Z().left&&O(Qb-1)}function ob(){_b.rtl?(H()||ib()===!1)&&Z().right&&O(Qb-1):(H()||hb()===!1)&&Z().right&&O(Qb+1)}function pb(){(H()||ib()===!1)&&Z().up&&O(Qb,Rb-1)}function qb(){(H()||hb()===!1)&&Z().down&&O(Qb,Rb+1)}function rb(){if(ib()===!1)if(Z().up)pb();else{var a=document.querySelector(Yb+".past:nth-child("+Qb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Qb-1;O(c,b)}}}function sb(){hb()===!1&&(Z().down?qb():ob()),jb()}function tb(){_b.autoSlideStoppable&&lb()}function ub(a){tb(a),document.activeElement;var b=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof _b.keyboard)for(var d in _b.keyboard)if(parseInt(d,10)===a.keyCode){var e=_b.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:rb();break;case 78:case 34:sb();break;case 72:case 37:nb();break;case 76:case 39:ob();break;case 75:case 38:pb();break;case 74:case 40:qb();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?rb():sb();break;case 13:H()?F():c=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ec.transforms3d||(dc.preview?z():G(),a.preventDefault()),jb()}}function vb(a){oc.startX=a.touches[0].clientX,oc.startY=a.touches[0].clientY,oc.startCount=a.touches.length,2===a.touches.length&&_b.overview&&(oc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY}))}function wb(a){if(oc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{tb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===oc.startCount&&_b.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY});Math.abs(oc.startSpan-d)>oc.threshold&&(oc.captured=!0,doc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,nb()):e<-oc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,ob()):f>oc.threshold?(oc.captured=!0,pb()):f<-oc.threshold&&(oc.captured=!0,qb()),_b.embedded?(oc.captured||I(Tb))&&a.preventDefault():a.preventDefault()}}}function xb(){oc.captured=!1}function yb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],vb(a))}function zb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){if(Date.now()-fc>600){fc=Date.now();var b=a.detail||-a.wheelDelta;b>0?sb():rb()}}function Cb(a){tb(a),a.preventDefault();var b=l(document.querySelectorAll(Yb)).length,c=Math.floor(a.clientX/dc.wrapper.offsetWidth*b);O(c)}function Db(a){a.preventDefault(),tb(),nb()}function Eb(a){a.preventDefault(),tb(),ob()}function Fb(a){a.preventDefault(),tb(),pb()}function Gb(a){a.preventDefault(),tb(),qb()}function Hb(a){a.preventDefault(),tb(),rb()}function Ib(a){a.preventDefault(),tb(),sb()}function Jb(){cb()}function Kb(){A()}function Lb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Mb(a){if(jc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);O(c,d)}}}function Nb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Ob(){Reveal.isLastSlide()&&_b.loop===!1?(O(0,0),mb()):nc?mb():lb()}function Pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb=".reveal .slides section",Yb=".reveal .slides>section",Zb=".reveal .slides>section.present>section",$b=".reveal .slides>section:first-of-type",_b={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ac=!1,bc=[],cc=1,dc={},ec={},fc=0,gc=0,hc=0,ic=0,jc=!1,kc=0,lc=0,mc=-1,nc=!1,oc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ec.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1) -},Pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:P,slide:O,left:nb,right:ob,up:pb,down:qb,prev:rb,next:sb,navigateFragment:gb,prevFragment:ib,nextFragment:hb,navigateTo:O,navigateLeft:nb,navigateRight:ob,navigateUp:pb,navigateDown:qb,navigatePrev:rb,navigateNext:sb,layout:A,availableRoutes:Z,availableFragments:$,toggleOverview:G,togglePause:M,isOverview:H,isPaused:N,addEventListeners:i,removeEventListeners:j,getIndices:eb,getSlide:function(a,b){var c=document.querySelectorAll(Yb)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Sb},getCurrentSlide:function(){return Tb},getScale:function(){return cc},getConfig:function(){return _b},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Xb+".past")?!0:!1},isLastSlide:function(){return Tb?Tb.nextElementSibling?!1:I(Tb)&&Tb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ac},addEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame?(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1):Yb&&(Yb.destroy(),Yb=null),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!pc}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=null;l(Reveal.getCurrentSlide().querySelectorAll(".current-fragment")).forEach(function(b){b.hasAttribute("data-autoslide")&&(a=b.getAttribute("data-autoslide"))});var b=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,c=Vb.getAttribute("data-autoslide");mc=a?parseInt(a,10):c?parseInt(c,10):b?parseInt(b,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +},Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From ed4cdaf9e796fadbf2b4f2f5e9240ac56091fb73 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 21 Dec 2013 17:33:30 +0100 Subject: test isAutoSliding, isAutoSliding returns false when no autoSlide value is set #766 --- js/reveal.js | 2 +- js/reveal.min.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index b868d13..0de1d4d 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1471,7 +1471,7 @@ var Reveal = (function(){ */ function isAutoSliding() { - return !autoSlidePaused; + return !!( autoSlide && !autoSlidePaused ); } diff --git a/js/reveal.min.js b/js/reveal.min.js index 9d91e3f..186ff7f 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2013-12-21, 17:25) + * reveal.js 2.6.1 (2013-12-21, 17:31) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2013 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame?(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1):Yb&&(Yb.destroy(),Yb=null),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!pc}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=null;l(Reveal.getCurrentSlide().querySelectorAll(".current-fragment")).forEach(function(b){b.hasAttribute("data-autoslide")&&(a=b.getAttribute("data-autoslide"))});var b=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,c=Vb.getAttribute("data-autoslide");mc=a?parseInt(a,10):c?parseInt(c,10):b?parseInt(b,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame?(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1):Yb&&(Yb.destroy(),Yb=null),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=null;l(Reveal.getCurrentSlide().querySelectorAll(".current-fragment")).forEach(function(b){b.hasAttribute("data-autoslide")&&(a=b.getAttribute("data-autoslide"))});var b=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,c=Vb.getAttribute("data-autoslide");mc=a?parseInt(a,10):c?parseInt(c,10):b?parseInt(b,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From a97d73167d4dc52738e01f5ca5f2de74902276b6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 21 Dec 2013 17:54:21 +0100 Subject: simplify how data-autoslide is picked up from fragments #766 --- js/reveal.js | 10 +++------- js/reveal.min.js | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 0de1d4d..be7b8a8 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1456,6 +1456,7 @@ var Reveal = (function(){ */ function toggleAutoSlide( override ) { + if( typeof override === 'boolean' ) { override ? resumeAutoSlide() : pauseAutoSlide(); } @@ -2500,14 +2501,9 @@ var Reveal = (function(){ if( currentSlide ) { - var fragmentAutoSlide = null; - // it is assumed that any given data-autoslide value (for each of the current fragments) can be chosen - toArray( Reveal.getCurrentSlide().querySelectorAll( '.current-fragment' ) ).forEach( function( el ) { - if( el.hasAttribute( 'data-autoslide' ) ) { - fragmentAutoSlide = el.getAttribute( 'data-autoslide' ); - } - } ); + var currentFragment = currentSlide.querySelector( '.current-fragment' ); + var fragmentAutoSlide = currentFragment ? currentFragment.getAttribute( 'data-autoslide' ) : null; var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null; var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' ); diff --git a/js/reveal.min.js b/js/reveal.min.js index 186ff7f..ccebcb1 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2013-12-21, 17:31) + * reveal.js 2.6.1 (2013-12-21, 17:53) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2013 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame?(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1):Yb&&(Yb.destroy(),Yb=null),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=null;l(Reveal.getCurrentSlide().querySelectorAll(".current-fragment")).forEach(function(b){b.hasAttribute("data-autoslide")&&(a=b.getAttribute("data-autoslide"))});var b=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,c=Vb.getAttribute("data-autoslide");mc=a?parseInt(a,10):c?parseInt(c,10):b?parseInt(b,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame?(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1):Yb&&(Yb.destroy(),Yb=null),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 6215b12f6ee559c91c2b82be9f98d91f42af9ee7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 21 Dec 2013 18:12:02 +0100 Subject: naming/comment tweak --- js/reveal.js | 7 ++++--- js/reveal.min.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index be7b8a8..9d389c5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2698,8 +2698,9 @@ var Reveal = (function(){ */ function onDocumentKeyDown( event ) { - // store auto slide value to be able to toggle auto sliding - var currentAutoSlideValue = autoSlidePaused; + // Remember if auto-sliding was paused so we can toggle it + var autoSlideWasPaused = autoSlidePaused; + onUserInput( event ); // Check if there's a focused element that could be using @@ -2777,7 +2778,7 @@ var Reveal = (function(){ // f case 70: enterFullscreen(); break; // a - case 65: if ( config.autoSlideStoppable ) toggleAutoSlide( currentAutoSlideValue ); break; + case 65: if ( config.autoSlideStoppable ) toggleAutoSlide( autoSlideWasPaused ); break; default: triggered = false; } diff --git a/js/reveal.min.js b/js/reveal.min.js index ccebcb1..fb050d1 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.6.1 (2013-12-21, 17:53) + * reveal.js 2.6.1 (2013-12-21, 18:11) * http://lab.hakim.se/reveal-js * MIT licensed * -- cgit v1.2.3 From d9513b34d58da2e744719f6cc78c1bf99c2aa601 Mon Sep 17 00:00:00 2001 From: Cristiano Cortezia Date: Thu, 16 Jan 2014 14:44:32 -0200 Subject: Fixes bad NaN applied to style on updateParallax. The previous criteria "verticalSlideCount > 0" would result in verticalOffset being NaN when verticalSlideCount == 1. This would cause dom.background.style.backgroundPosition to be set to something like "123px NaNpx", ultimately preventing the parallax effect to play (silently failing so far). --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 98d802e..b7764d3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2032,7 +2032,7 @@ var Reveal = (function(){ var slideHeight = dom.background.offsetHeight; var verticalSlideCount = verticalSlides.length; - var verticalOffset = verticalSlideCount > 0 ? -( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 ) * indexv : 0; + var verticalOffset = verticalSlideCount > 1 ? -( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 ) * indexv : 0; dom.background.style.backgroundPosition = horizontalOffset + 'px ' + verticalOffset + 'px'; -- cgit v1.2.3 From 44e6f7ace070401801a50ad6cf47a8dab8d933da Mon Sep 17 00:00:00 2001 From: Armand Abric Date: Fri, 7 Feb 2014 19:03:48 +0100 Subject: Increase Logitech R400 remote compatibity. --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 9d389c5..4377400 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2773,8 +2773,8 @@ var Reveal = (function(){ case 32: isOverview() ? deactivateOverview() : event.shiftKey ? navigatePrev() : navigateNext(); break; // return case 13: isOverview() ? deactivateOverview() : triggered = false; break; - // b, period, Logitech presenter tools "black screen" button - case 66: case 190: case 191: togglePause(); break; + // two-spot, semicolon, b, period, Logitech presenter tools "black screen" button + case 58: case: 59: case 66: case 190: case 191: togglePause(); break; // f case 70: enterFullscreen(); break; // a -- cgit v1.2.3 From 2aef97584a2c459d425d3ade55633120972c1ca7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 16 Feb 2014 17:12:05 +0100 Subject: update (c) year --- js/reveal.js | 2 +- js/reveal.min.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 9d389c5..66c975e 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3,7 +3,7 @@ * http://lab.hakim.se/reveal-js * MIT licensed * - * Copyright (C) 2013 Hakim El Hattab, http://hakim.se + * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ var Reveal = (function(){ diff --git a/js/reveal.min.js b/js/reveal.min.js index fb050d1..8d9a64d 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2013-12-21, 18:11) + * reveal.js 2.6.1 (2014-02-16, 17:11) * http://lab.hakim.se/reveal-js * MIT licensed * - * Copyright (C) 2013 Hakim El Hattab, http://hakim.se + * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame?(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1):Yb&&(Yb.destroy(),Yb=null),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 26e9ce1ff7d96601a83e2baa02e46699929ceada Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 16 Feb 2014 17:37:59 +0100 Subject: avoid creating duplicate auto-slide controls #770 --- js/reveal.js | 12 +++++++----- js/reveal.min.js | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 66c975e..50cd721 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -591,7 +591,13 @@ var Reveal = (function(){ enablePreviewLinks( '[data-preview-link]' ); } - // Auto-slide playback controls + // Remove existing auto-slide controls + if( autoSlidePlayer ) { + autoSlidePlayer.destroy(); + autoSlidePlayer = null; + } + + // Generate auto-slide controls if needed if( numberOfSlides > 1 && config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame ) { autoSlidePlayer = new Playback( dom.wrapper, function() { return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 ); @@ -600,10 +606,6 @@ var Reveal = (function(){ autoSlidePlayer.on( 'click', onAutoSlidePlayerClick ); autoSlidePaused = false; } - else if( autoSlidePlayer ) { - autoSlidePlayer.destroy(); - autoSlidePlayer = null; - } // Load the theme in the config, if it's not already loaded if( config.theme && dom.theme ) { diff --git a/js/reveal.min.js b/js/reveal.min.js index 8d9a64d..3a0c19d 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2014-02-16, 17:11) + * reveal.js 2.6.1 (2014-02-16, 17:36) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame?(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1):Yb&&(Yb.destroy(),Yb=null),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),Yb&&(Yb.destroy(),Yb=null),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame&&(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From b25fa5065720a95ead521d148f5384515549d383 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 17 Feb 2014 11:55:38 +0100 Subject: remove all use of :not(.image) --- js/reveal.js | 2 +- js/reveal.min.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 50cd721..fd36f8a 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -913,7 +913,7 @@ var Reveal = (function(){ function enableRollingLinks() { if( features.transforms3d && !( 'msPerspective' in document.body.style ) ) { - var anchors = document.querySelectorAll( SLIDES_SELECTOR + ' a:not(.image)' ); + var anchors = document.querySelectorAll( SLIDES_SELECTOR + ' a' ); for( var i = 0, len = anchors.length; i < len; i++ ) { var anchor = anchors[i]; diff --git a/js/reveal.min.js b/js/reveal.min.js index 3a0c19d..0b66988 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2014-02-16, 17:36) + * reveal.js 2.6.1 (2014-02-17, 11:47) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),Yb&&(Yb.destroy(),Yb=null),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame&&(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),Yb&&(Yb.destroy(),Yb=null),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame&&(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 0b3bae1caddd9ebb0399e37752da48e110d3e539 Mon Sep 17 00:00:00 2001 From: Armand Abric Date: Tue, 18 Feb 2014 15:24:59 +0100 Subject: Typo fix. --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 4377400..ef547aa 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2774,7 +2774,7 @@ var Reveal = (function(){ // return case 13: isOverview() ? deactivateOverview() : triggered = false; break; // two-spot, semicolon, b, period, Logitech presenter tools "black screen" button - case 58: case: 59: case 66: case 190: case 191: togglePause(); break; + case 58: case 59: case 66: case 190: case 191: togglePause(); break; // f case 70: enterFullscreen(); break; // a -- cgit v1.2.3 From 11df3547f67d45a20d09b34dc4473d532aa726f2 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 28 Feb 2014 12:13:32 +0100 Subject: change version to 2.7.0 (dev) --- js/reveal.min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.min.js b/js/reveal.min.js index 0b66988..205dda2 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2014-02-17, 11:47) + * reveal.js 2.7.0-dev (2014-02-28, 12:12) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),Yb&&(Yb.destroy(),Yb=null),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame&&(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),Yb&&(Yb.destroy(),Yb=null),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame&&(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 714102c3f8bfacee2323e32963ee62c3d1511d19 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 2 Mar 2014 12:30:55 +0100 Subject: add get/setState methods for persisting and restoring presentation state --- js/reveal.js | 46 ++++++++++++++++++++++++++++++++++++++++++---- js/reveal.min.js | 6 +++--- 2 files changed, 45 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a06ce55..5cb72eb 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1430,13 +1430,13 @@ var Reveal = (function(){ /** * Toggles the paused mode on and off. */ - function togglePause() { + function togglePause( override ) { - if( isPaused() ) { - resume(); + if( typeof override === 'boolean' ) { + override ? pause() : resume(); } else { - pause(); + isPaused() ? resume() : pause(); } } @@ -2325,6 +2325,40 @@ var Reveal = (function(){ } + /** + * Retrieves the current state of the presentation as + * an object. This state can then be restored at any + * time. + */ + function getState() { + + var indices = getIndices(); + + return { + indexh: indices.h, + indexv: indices.v, + indexf: indices.f, + paused: isPaused(), + overview: isOverview() + }; + + } + + /** + * Restores the presentation to the given state. + * + * @param {Object} state As generated by getState() + */ + function setState( state ) { + + if( typeof state === 'object' ) { + slide( state.indexh, state.indexv, state.indexf ); + togglePause( state.paused ); + toggleOverview( state.overview ); + } + + } + /** * Return a sorted fragments list, ordered by an increasing * "data-fragment-index" attribute. @@ -3345,6 +3379,10 @@ var Reveal = (function(){ addEventListeners: addEventListeners, removeEventListeners: removeEventListeners, + // Facility for persisting and restoring the presentation state + getState: getState, + setState: setState, + // Returns the indices of the current, or specified, slide getIndices: getIndices, diff --git a/js/reveal.min.js b/js/reveal.min.js index 205dda2..cc2447b 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-02-28, 12:12) + * reveal.js 2.7.0-dev (2014-03-02, 12:29) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!gc.transforms2d&&!gc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(bc,a),k(bc,d),r(),c()}function b(){gc.transforms3d="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,gc.transforms2d="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,gc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,gc.requestAnimationFrame="function"==typeof gc.requestAnimationFrameMethod,gc.canvas=!!document.createElement("canvas").getContext,Xb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=bc.dependencies.length;h>g;g++){var i=bc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){fc.slides.classList.remove("no-transition"),cc=!0,t("ready",{indexh:Sb,indexv:Tb,currentSlide:Vb})},1)}function e(){fc.theme=document.querySelector("#theme"),fc.wrapper=document.querySelector(".reveal"),fc.slides=document.querySelector(".reveal .slides"),fc.slides.classList.add("no-transition"),fc.background=f(fc.wrapper,"div","backgrounds",null),fc.progress=f(fc.wrapper,"div","progress",""),fc.progressbar=fc.progress.querySelector("span"),f(fc.wrapper,"aside","controls",''),fc.slideNumber=f(fc.wrapper,"div","slide-number",""),f(fc.wrapper,"div","state-background",null),f(fc.wrapper,"div","pause-overlay",null),fc.controls=document.querySelector(".reveal .controls"),fc.controlsLeft=l(document.querySelectorAll(".navigate-left")),fc.controlsRight=l(document.querySelectorAll(".navigate-right")),fc.controlsUp=l(document.querySelectorAll(".navigate-up")),fc.controlsDown=l(document.querySelectorAll(".navigate-down")),fc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),fc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),fc.background.innerHTML="",fc.background.classList.add("no-transition"),l(document.querySelectorAll($b)).forEach(function(b){var c;c=q()?a(b,b):a(b,fc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),bc.parallaxBackgroundImage?(fc.background.style.backgroundImage='url("'+bc.parallaxBackgroundImage+'")',fc.background.style.backgroundSize=bc.parallaxBackgroundSize,setTimeout(function(){fc.wrapper.classList.add("has-parallax-background")},1)):(fc.background.style.backgroundImage="",fc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Zb).length;if(fc.wrapper.classList.remove(bc.transition),"object"==typeof a&&k(bc,a),gc.transforms3d===!1&&(bc.transition="linear"),fc.wrapper.classList.add(bc.transition),fc.wrapper.setAttribute("data-transition-speed",bc.transitionSpeed),fc.wrapper.setAttribute("data-background-transition",bc.backgroundTransition),fc.controls.style.display=bc.controls?"block":"none",fc.progress.style.display=bc.progress?"block":"none",bc.rtl?fc.wrapper.classList.add("rtl"):fc.wrapper.classList.remove("rtl"),bc.center?fc.wrapper.classList.add("center"):fc.wrapper.classList.remove("center"),bc.mouseWheel?(document.addEventListener("DOMMouseScroll",Db,!1),document.addEventListener("mousewheel",Db,!1)):(document.removeEventListener("DOMMouseScroll",Db,!1),document.removeEventListener("mousewheel",Db,!1)),bc.rollingLinks?u():v(),bc.previewLinks?w():(x(),w("[data-preview-link]")),Yb&&(Yb.destroy(),Yb=null),b>1&&bc.autoSlide&&bc.autoSlideStoppable&&gc.canvas&&gc.requestAnimationFrame&&(Yb=new Rb(fc.wrapper,function(){return Math.min(Math.max((Date.now()-oc)/mc,0),1)}),Yb.on("click",Qb),pc=!1),bc.theme&&fc.theme){var c=fc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];bc.theme!==e&&(c=c.replace(d,bc.theme),fc.theme.setAttribute("href",c))}R()}function i(){if(lc=!0,window.addEventListener("hashchange",Lb,!1),window.addEventListener("resize",Mb,!1),bc.touch&&(fc.wrapper.addEventListener("touchstart",xb,!1),fc.wrapper.addEventListener("touchmove",yb,!1),fc.wrapper.addEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.addEventListener("pointerdown",Ab,!1),fc.wrapper.addEventListener("pointermove",Bb,!1),fc.wrapper.addEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.addEventListener("MSPointerDown",Ab,!1),fc.wrapper.addEventListener("MSPointerMove",Bb,!1),fc.wrapper.addEventListener("MSPointerUp",Cb,!1))),bc.keyboard&&document.addEventListener("keydown",wb,!1),bc.progress&&fc.progress&&fc.progress.addEventListener("click",Eb,!1),bc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Nb,!1)}["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.addEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.addEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.addEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.addEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.addEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.addEventListener(a,Kb,!1)})})}function j(){lc=!1,document.removeEventListener("keydown",wb,!1),window.removeEventListener("hashchange",Lb,!1),window.removeEventListener("resize",Mb,!1),fc.wrapper.removeEventListener("touchstart",xb,!1),fc.wrapper.removeEventListener("touchmove",yb,!1),fc.wrapper.removeEventListener("touchend",zb,!1),window.navigator.pointerEnabled?(fc.wrapper.removeEventListener("pointerdown",Ab,!1),fc.wrapper.removeEventListener("pointermove",Bb,!1),fc.wrapper.removeEventListener("pointerup",Cb,!1)):window.navigator.msPointerEnabled&&(fc.wrapper.removeEventListener("MSPointerDown",Ab,!1),fc.wrapper.removeEventListener("MSPointerMove",Bb,!1),fc.wrapper.removeEventListener("MSPointerUp",Cb,!1)),bc.progress&&fc.progress&&fc.progress.removeEventListener("click",Eb,!1),["touchstart","click"].forEach(function(a){fc.controlsLeft.forEach(function(b){b.removeEventListener(a,Fb,!1)}),fc.controlsRight.forEach(function(b){b.removeEventListener(a,Gb,!1)}),fc.controlsUp.forEach(function(b){b.removeEventListener(a,Hb,!1)}),fc.controlsDown.forEach(function(b){b.removeEventListener(a,Ib,!1)}),fc.controlsPrev.forEach(function(b){b.removeEventListener(a,Jb,!1)}),fc.controlsNext.forEach(function(b){b.removeEventListener(a,Kb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){bc.hideAddressBar&&Xb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),fc.wrapper.dispatchEvent(c)}function u(){if(gc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Zb+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Zb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Pb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Pb,!1)})}function y(a){z(),fc.preview=document.createElement("div"),fc.preview.classList.add("preview-link-overlay"),fc.wrapper.appendChild(fc.preview),fc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),fc.preview.querySelector("iframe").addEventListener("load",function(){fc.preview.classList.add("loaded")},!1),fc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),fc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){fc.preview.classList.add("visible")},1)}function z(){fc.preview&&(fc.preview.setAttribute("src",""),fc.preview.parentNode.removeChild(fc.preview),fc.preview=null)}function A(){if(fc.wrapper&&!q()){var a=fc.wrapper.offsetWidth,b=fc.wrapper.offsetHeight;a-=b*bc.margin,b-=b*bc.margin;var c=bc.width,d=bc.height,e=20;B(bc.width,bc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),fc.slides.style.width=c+"px",fc.slides.style.height=d+"px",ec=Math.min(a/c,b/d),ec=Math.max(ec,bc.minScale),ec=Math.min(ec,bc.maxScale),"undefined"==typeof fc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(fc.slides,"translate(-50%, -50%) scale("+ec+") translate(50%, 50%)"):fc.slides.style.zoom=ec;for(var f=l(document.querySelectorAll(Zb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=bc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(fc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(bc.overview){mb();var a=fc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;fc.wrapper.classList.add("overview"),fc.wrapper.classList.remove("overview-deactivating"),clearTimeout(jc),clearTimeout(kc),jc=setTimeout(function(){for(var c=document.querySelectorAll($b),d=0,e=c.length;e>d;d++){var f=c[d],g=bc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Sb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Sb?Tb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ob,!0)}else f.addEventListener("click",Ob,!0)}V(),A(),a||t("overviewshown",{indexh:Sb,indexv:Tb,currentSlide:Vb})},10)}}function F(){bc.overview&&(clearTimeout(jc),clearTimeout(kc),fc.wrapper.classList.remove("overview"),fc.wrapper.classList.add("overview-deactivating"),kc=setTimeout(function(){fc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Zb)).forEach(function(a){n(a,""),a.removeEventListener("click",Ob,!0)}),Q(Sb,Tb),lb(),t("overviewhidden",{indexh:Sb,indexv:Tb,currentSlide:Vb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return fc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Vb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=fc.wrapper.classList.contains("paused");mb(),fc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=fc.wrapper.classList.contains("paused");fc.wrapper.classList.remove("paused"),lb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return fc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?ob():nb():pc?ob():nb()}function P(){return!(!mc||pc)}function Q(a,b,c,d){Ub=Vb;var e=document.querySelectorAll($b);void 0===b&&(b=D(e[a])),Ub&&Ub.parentNode&&Ub.parentNode.classList.contains("stack")&&C(Ub.parentNode,Tb);var f=dc.concat();dc.length=0;var g=Sb||0,h=Tb||0;Sb=U($b,void 0===a?Sb:a),Tb=U(_b,void 0===b?Tb:b),V(),A();a:for(var i=0,j=dc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll($b));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){hb(a.querySelectorAll(".fragment"))}),0===b.length&&hb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){bc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=bc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(dc=dc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll($b)),d=c.length;if(d){var e=H()?10:bc.viewDistance;Xb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Sb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Sb?Math.abs(Tb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(bc.progress&&fc.progress){var a=l(document.querySelectorAll($b)),b=document.querySelectorAll(Zb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Tb),fc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();fc.controlsLeft.concat(fc.controlsRight).concat(fc.controlsUp).concat(fc.controlsDown).concat(fc.controlsPrev).concat(fc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&fc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&fc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&fc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&fc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&fc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&fc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Vb&&(b.prev&&fc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Vb)?(b.prev&&fc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&fc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&fc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=bc.rtl?"future":"past",d=bc.rtl?"past":"future";if(l(fc.background.childNodes).forEach(function(e,f){Sb>f?e.className="slide-background "+c:f>Sb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Sb)&&l(e.childNodes).forEach(function(a,c){Tb>c?a.className="slide-background past":c>Tb?a.className="slide-background future":(a.className="slide-background present",f===Sb&&(b=a))})}),b){var e=Wb?Wb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Wb&&fc.background.classList.add("no-transition"),Wb=b}setTimeout(function(){fc.background.classList.remove("no-transition")},1)}function $(){if(bc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll($b),d=document.querySelectorAll(_b),e=fc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=fc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Sb,i=fc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Tb:0;fc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll($b),b=document.querySelectorAll(_b),c={left:Sb>0||bc.loop,right:Sb0,down:Tb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Sb||0,Tb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Sb||g!==Tb)&&Q(f,g)}}function fb(a){if(bc.history)if(clearTimeout(ic),"number"==typeof a)ic=setTimeout(fb,a);else{var b="/";Vb&&"string"==typeof Vb.getAttribute("id")?b="/"+Vb.getAttribute("id"):((Sb>0||Tb>0)&&(b+=Sb),Tb>0&&(b+="/"+Tb)),window.location.hash=b}}function gb(a){var b,c=Sb,d=Tb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll($b));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Vb){var h=Vb.querySelectorAll(".fragment").length>0;if(h){var i=Vb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ib(a,b){if(Vb&&bc.fragments){var c=hb(Vb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=hb(Vb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function jb(){return ib(null,1)}function kb(){return ib(null,-1)}function lb(){if(mb(),Vb){var a=Vb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Vb.parentNode?Vb.parentNode.getAttribute("data-autoslide"):null,d=Vb.getAttribute("data-autoslide");mc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):bc.autoSlide,l(Vb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&mc&&1e3*a.duration>mc&&(mc=1e3*a.duration+1e3)}),!mc||pc||N()||H()||Reveal.isLastSlide()&&bc.loop!==!0||(nc=setTimeout(ub,mc),oc=Date.now()),Yb&&Yb.setPlaying(-1!==nc)}}function mb(){clearTimeout(nc),nc=-1}function nb(){pc=!0,t("autoslidepaused"),clearTimeout(nc),Yb&&Yb.setPlaying(!1)}function ob(){pc=!1,t("autoslideresumed"),lb()}function pb(){bc.rtl?(H()||jb()===!1)&&_().left&&Q(Sb+1):(H()||kb()===!1)&&_().left&&Q(Sb-1)}function qb(){bc.rtl?(H()||kb()===!1)&&_().right&&Q(Sb-1):(H()||jb()===!1)&&_().right&&Q(Sb+1)}function rb(){(H()||kb()===!1)&&_().up&&Q(Sb,Tb-1)}function sb(){(H()||jb()===!1)&&_().down&&Q(Sb,Tb+1)}function tb(){if(kb()===!1)if(_().up)rb();else{var a=document.querySelector($b+".past:nth-child("+Sb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Sb-1;Q(c,b)}}}function ub(){jb()===!1&&(_().down?sb():qb()),lb()}function vb(){bc.autoSlideStoppable&&nb()}function wb(a){var b=pc;vb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof bc.keyboard)for(var e in bc.keyboard)if(parseInt(e,10)===a.keyCode){var f=bc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:tb();break;case 78:case 34:ub();break;case 72:case 37:pb();break;case 76:case 39:qb();break;case 75:case 38:rb();break;case 74:case 40:sb();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?tb():ub();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:bc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!gc.transforms3d||(fc.preview?z():G(),a.preventDefault()),lb()}}function xb(a){qc.startX=a.touches[0].clientX,qc.startY=a.touches[0].clientY,qc.startCount=a.touches.length,2===a.touches.length&&bc.overview&&(qc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY}))}function yb(a){if(qc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{vb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===qc.startCount&&bc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:qc.startX,y:qc.startY});Math.abs(qc.startSpan-d)>qc.threshold&&(qc.captured=!0,dqc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,pb()):e<-qc.threshold&&Math.abs(e)>Math.abs(f)?(qc.captured=!0,qb()):f>qc.threshold?(qc.captured=!0,rb()):f<-qc.threshold&&(qc.captured=!0,sb()),bc.embedded?(qc.captured||I(Vb))&&a.preventDefault():a.preventDefault()}}}function zb(){qc.captured=!1}function Ab(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){if(Date.now()-hc>600){hc=Date.now();var b=a.detail||-a.wheelDelta;b>0?ub():tb()}}function Eb(a){vb(a),a.preventDefault();var b=l(document.querySelectorAll($b)).length,c=Math.floor(a.clientX/fc.wrapper.offsetWidth*b);Q(c)}function Fb(a){a.preventDefault(),vb(),pb()}function Gb(a){a.preventDefault(),vb(),qb()}function Hb(a){a.preventDefault(),vb(),rb()}function Ib(a){a.preventDefault(),vb(),sb()}function Jb(a){a.preventDefault(),vb(),tb()}function Kb(a){a.preventDefault(),vb(),ub()}function Lb(){eb()}function Mb(){A()}function Nb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ob(a){if(lc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Pb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Qb(){Reveal.isLastSlide()&&bc.loop===!1?(Q(0,0),ob()):pc?ob():nb()}function Rb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb=".reveal .slides section",$b=".reveal .slides>section",_b=".reveal .slides>section.present>section",ac=".reveal .slides>section:first-of-type",bc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},cc=!1,dc=[],ec=1,fc={},gc={},hc=0,ic=0,jc=0,kc=0,lc=!1,mc=0,nc=0,oc=-1,pc=!1,qc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Rb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Rb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&gc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Rb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() -},Rb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Rb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Rb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:pb,right:qb,up:rb,down:sb,prev:tb,next:ub,navigateFragment:ib,prevFragment:kb,nextFragment:jb,navigateTo:Q,navigateLeft:pb,navigateRight:qb,navigateUp:rb,navigateDown:sb,navigatePrev:tb,navigateNext:ub,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll($b)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Ub},getCurrentSlide:function(){return Vb},getScale:function(){return ec},getConfig:function(){return bc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Zb+".past")?!0:!1},isLastSlide:function(){return Vb?Vb.nextElementSibling?!1:I(Vb)&&Vb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return cc},addEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(fc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!ic.transforms2d&&!ic.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(dc,a),k(dc,d),r(),c()}function b(){ic.transforms3d="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,ic.transforms2d="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,ic.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ic.requestAnimationFrame="function"==typeof ic.requestAnimationFrameMethod,ic.canvas=!!document.createElement("canvas").getContext,Zb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=dc.dependencies.length;h>g;g++){var i=dc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){hc.slides.classList.remove("no-transition"),ec=!0,t("ready",{indexh:Ub,indexv:Vb,currentSlide:Xb})},1)}function e(){hc.theme=document.querySelector("#theme"),hc.wrapper=document.querySelector(".reveal"),hc.slides=document.querySelector(".reveal .slides"),hc.slides.classList.add("no-transition"),hc.background=f(hc.wrapper,"div","backgrounds",null),hc.progress=f(hc.wrapper,"div","progress",""),hc.progressbar=hc.progress.querySelector("span"),f(hc.wrapper,"aside","controls",''),hc.slideNumber=f(hc.wrapper,"div","slide-number",""),f(hc.wrapper,"div","state-background",null),f(hc.wrapper,"div","pause-overlay",null),hc.controls=document.querySelector(".reveal .controls"),hc.controlsLeft=l(document.querySelectorAll(".navigate-left")),hc.controlsRight=l(document.querySelectorAll(".navigate-right")),hc.controlsUp=l(document.querySelectorAll(".navigate-up")),hc.controlsDown=l(document.querySelectorAll(".navigate-down")),hc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),hc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),hc.background.innerHTML="",hc.background.classList.add("no-transition"),l(document.querySelectorAll(ac)).forEach(function(b){var c;c=q()?a(b,b):a(b,hc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),dc.parallaxBackgroundImage?(hc.background.style.backgroundImage='url("'+dc.parallaxBackgroundImage+'")',hc.background.style.backgroundSize=dc.parallaxBackgroundSize,setTimeout(function(){hc.wrapper.classList.add("has-parallax-background")},1)):(hc.background.style.backgroundImage="",hc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(_b).length;if(hc.wrapper.classList.remove(dc.transition),"object"==typeof a&&k(dc,a),ic.transforms3d===!1&&(dc.transition="linear"),hc.wrapper.classList.add(dc.transition),hc.wrapper.setAttribute("data-transition-speed",dc.transitionSpeed),hc.wrapper.setAttribute("data-background-transition",dc.backgroundTransition),hc.controls.style.display=dc.controls?"block":"none",hc.progress.style.display=dc.progress?"block":"none",dc.rtl?hc.wrapper.classList.add("rtl"):hc.wrapper.classList.remove("rtl"),dc.center?hc.wrapper.classList.add("center"):hc.wrapper.classList.remove("center"),dc.mouseWheel?(document.addEventListener("DOMMouseScroll",Fb,!1),document.addEventListener("mousewheel",Fb,!1)):(document.removeEventListener("DOMMouseScroll",Fb,!1),document.removeEventListener("mousewheel",Fb,!1)),dc.rollingLinks?u():v(),dc.previewLinks?w():(x(),w("[data-preview-link]")),$b&&($b.destroy(),$b=null),b>1&&dc.autoSlide&&dc.autoSlideStoppable&&ic.canvas&&ic.requestAnimationFrame&&($b=new Tb(hc.wrapper,function(){return Math.min(Math.max((Date.now()-qc)/oc,0),1)}),$b.on("click",Sb),rc=!1),dc.theme&&hc.theme){var c=hc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];dc.theme!==e&&(c=c.replace(d,dc.theme),hc.theme.setAttribute("href",c))}R()}function i(){if(nc=!0,window.addEventListener("hashchange",Nb,!1),window.addEventListener("resize",Ob,!1),dc.touch&&(hc.wrapper.addEventListener("touchstart",zb,!1),hc.wrapper.addEventListener("touchmove",Ab,!1),hc.wrapper.addEventListener("touchend",Bb,!1),window.navigator.pointerEnabled?(hc.wrapper.addEventListener("pointerdown",Cb,!1),hc.wrapper.addEventListener("pointermove",Db,!1),hc.wrapper.addEventListener("pointerup",Eb,!1)):window.navigator.msPointerEnabled&&(hc.wrapper.addEventListener("MSPointerDown",Cb,!1),hc.wrapper.addEventListener("MSPointerMove",Db,!1),hc.wrapper.addEventListener("MSPointerUp",Eb,!1))),dc.keyboard&&document.addEventListener("keydown",yb,!1),dc.progress&&hc.progress&&hc.progress.addEventListener("click",Gb,!1),dc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Pb,!1)}["touchstart","click"].forEach(function(a){hc.controlsLeft.forEach(function(b){b.addEventListener(a,Hb,!1)}),hc.controlsRight.forEach(function(b){b.addEventListener(a,Ib,!1)}),hc.controlsUp.forEach(function(b){b.addEventListener(a,Jb,!1)}),hc.controlsDown.forEach(function(b){b.addEventListener(a,Kb,!1)}),hc.controlsPrev.forEach(function(b){b.addEventListener(a,Lb,!1)}),hc.controlsNext.forEach(function(b){b.addEventListener(a,Mb,!1)})})}function j(){nc=!1,document.removeEventListener("keydown",yb,!1),window.removeEventListener("hashchange",Nb,!1),window.removeEventListener("resize",Ob,!1),hc.wrapper.removeEventListener("touchstart",zb,!1),hc.wrapper.removeEventListener("touchmove",Ab,!1),hc.wrapper.removeEventListener("touchend",Bb,!1),window.navigator.pointerEnabled?(hc.wrapper.removeEventListener("pointerdown",Cb,!1),hc.wrapper.removeEventListener("pointermove",Db,!1),hc.wrapper.removeEventListener("pointerup",Eb,!1)):window.navigator.msPointerEnabled&&(hc.wrapper.removeEventListener("MSPointerDown",Cb,!1),hc.wrapper.removeEventListener("MSPointerMove",Db,!1),hc.wrapper.removeEventListener("MSPointerUp",Eb,!1)),dc.progress&&hc.progress&&hc.progress.removeEventListener("click",Gb,!1),["touchstart","click"].forEach(function(a){hc.controlsLeft.forEach(function(b){b.removeEventListener(a,Hb,!1)}),hc.controlsRight.forEach(function(b){b.removeEventListener(a,Ib,!1)}),hc.controlsUp.forEach(function(b){b.removeEventListener(a,Jb,!1)}),hc.controlsDown.forEach(function(b){b.removeEventListener(a,Kb,!1)}),hc.controlsPrev.forEach(function(b){b.removeEventListener(a,Lb,!1)}),hc.controlsNext.forEach(function(b){b.removeEventListener(a,Mb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){dc.hideAddressBar&&Zb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),hc.wrapper.dispatchEvent(c)}function u(){if(ic.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(_b+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(_b+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Rb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Rb,!1)})}function y(a){z(),hc.preview=document.createElement("div"),hc.preview.classList.add("preview-link-overlay"),hc.wrapper.appendChild(hc.preview),hc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),hc.preview.querySelector("iframe").addEventListener("load",function(){hc.preview.classList.add("loaded")},!1),hc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),hc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){hc.preview.classList.add("visible")},1)}function z(){hc.preview&&(hc.preview.setAttribute("src",""),hc.preview.parentNode.removeChild(hc.preview),hc.preview=null)}function A(){if(hc.wrapper&&!q()){var a=hc.wrapper.offsetWidth,b=hc.wrapper.offsetHeight;a-=b*dc.margin,b-=b*dc.margin;var c=dc.width,d=dc.height,e=20;B(dc.width,dc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),hc.slides.style.width=c+"px",hc.slides.style.height=d+"px",gc=Math.min(a/c,b/d),gc=Math.max(gc,dc.minScale),gc=Math.min(gc,dc.maxScale),"undefined"==typeof hc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(hc.slides,"translate(-50%, -50%) scale("+gc+") translate(50%, 50%)"):hc.slides.style.zoom=gc;for(var f=l(document.querySelectorAll(_b)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=dc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(hc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(dc.overview){ob();var a=hc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;hc.wrapper.classList.add("overview"),hc.wrapper.classList.remove("overview-deactivating"),clearTimeout(lc),clearTimeout(mc),lc=setTimeout(function(){for(var c=document.querySelectorAll(ac),d=0,e=c.length;e>d;d++){var f=c[d],g=dc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Ub)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Ub?Vb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Qb,!0)}else f.addEventListener("click",Qb,!0)}V(),A(),a||t("overviewshown",{indexh:Ub,indexv:Vb,currentSlide:Xb})},10)}}function F(){dc.overview&&(clearTimeout(lc),clearTimeout(mc),hc.wrapper.classList.remove("overview"),hc.wrapper.classList.add("overview-deactivating"),mc=setTimeout(function(){hc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(_b)).forEach(function(a){n(a,""),a.removeEventListener("click",Qb,!0)}),Q(Ub,Vb),nb(),t("overviewhidden",{indexh:Ub,indexv:Vb,currentSlide:Xb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return hc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Xb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=hc.wrapper.classList.contains("paused");ob(),hc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=hc.wrapper.classList.contains("paused");hc.wrapper.classList.remove("paused"),nb(),a&&t("resumed")}function M(a){"boolean"==typeof a?a?K():L():N()?L():K()}function N(){return hc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?qb():pb():rc?qb():pb()}function P(){return!(!oc||rc)}function Q(a,b,c,d){Wb=Xb;var e=document.querySelectorAll(ac);void 0===b&&(b=D(e[a])),Wb&&Wb.parentNode&&Wb.parentNode.classList.contains("stack")&&C(Wb.parentNode,Vb);var f=fc.concat();fc.length=0;var g=Ub||0,h=Vb||0;Ub=U(ac,void 0===a?Ub:a),Vb=U(bc,void 0===b?Vb:b),V(),A();a:for(var i=0,j=fc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll(ac));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){jb(a.querySelectorAll(".fragment"))}),0===b.length&&jb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){dc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=dc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(fc=fc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll(ac)),d=c.length;if(d){var e=H()?10:dc.viewDistance;Zb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Ub-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Ub?Math.abs(Vb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(dc.progress&&hc.progress){var a=l(document.querySelectorAll(ac)),b=document.querySelectorAll(_b+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Vb),hc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();hc.controlsLeft.concat(hc.controlsRight).concat(hc.controlsUp).concat(hc.controlsDown).concat(hc.controlsPrev).concat(hc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&hc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&hc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&hc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&hc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&hc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&hc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Xb&&(b.prev&&hc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&hc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Xb)?(b.prev&&hc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&hc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&hc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&hc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=dc.rtl?"future":"past",d=dc.rtl?"past":"future";if(l(hc.background.childNodes).forEach(function(e,f){Ub>f?e.className="slide-background "+c:f>Ub?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Ub)&&l(e.childNodes).forEach(function(a,c){Vb>c?a.className="slide-background past":c>Vb?a.className="slide-background future":(a.className="slide-background present",f===Ub&&(b=a))})}),b){var e=Yb?Yb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Yb&&hc.background.classList.add("no-transition"),Yb=b}setTimeout(function(){hc.background.classList.remove("no-transition")},1)}function $(){if(dc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ac),d=document.querySelectorAll(bc),e=hc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=hc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Ub,i=hc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Vb:0;hc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll(ac),b=document.querySelectorAll(bc),c={left:Ub>0||dc.loop,right:Ub0,down:Vb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Ub||0,Vb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Ub||g!==Vb)&&Q(f,g)}}function fb(a){if(dc.history)if(clearTimeout(kc),"number"==typeof a)kc=setTimeout(fb,a);else{var b="/";Xb&&"string"==typeof Xb.getAttribute("id")?b="/"+Xb.getAttribute("id"):((Ub>0||Vb>0)&&(b+=Ub),Vb>0&&(b+="/"+Vb)),window.location.hash=b}}function gb(a){var b,c=Ub,d=Vb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(ac));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Xb){var h=Xb.querySelectorAll(".fragment").length>0;if(h){var i=Xb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(){var a=gb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:N(),overview:H()}}function ib(a){"object"==typeof a&&(Q(a.indexh,a.indexv,a.indexf),M(a.paused),G(a.overview))}function jb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function kb(a,b){if(Xb&&dc.fragments){var c=jb(Xb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=jb(Xb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function lb(){return kb(null,1)}function mb(){return kb(null,-1)}function nb(){if(ob(),Xb){var a=Xb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Xb.parentNode?Xb.parentNode.getAttribute("data-autoslide"):null,d=Xb.getAttribute("data-autoslide");oc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):dc.autoSlide,l(Xb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&oc&&1e3*a.duration>oc&&(oc=1e3*a.duration+1e3)}),!oc||rc||N()||H()||Reveal.isLastSlide()&&dc.loop!==!0||(pc=setTimeout(wb,oc),qc=Date.now()),$b&&$b.setPlaying(-1!==pc)}}function ob(){clearTimeout(pc),pc=-1}function pb(){rc=!0,t("autoslidepaused"),clearTimeout(pc),$b&&$b.setPlaying(!1)}function qb(){rc=!1,t("autoslideresumed"),nb()}function rb(){dc.rtl?(H()||lb()===!1)&&_().left&&Q(Ub+1):(H()||mb()===!1)&&_().left&&Q(Ub-1)}function sb(){dc.rtl?(H()||mb()===!1)&&_().right&&Q(Ub-1):(H()||lb()===!1)&&_().right&&Q(Ub+1)}function tb(){(H()||mb()===!1)&&_().up&&Q(Ub,Vb-1)}function ub(){(H()||lb()===!1)&&_().down&&Q(Ub,Vb+1)}function vb(){if(mb()===!1)if(_().up)tb();else{var a=document.querySelector(ac+".past:nth-child("+Ub+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Ub-1;Q(c,b)}}}function wb(){lb()===!1&&(_().down?ub():sb()),nb()}function xb(){dc.autoSlideStoppable&&pb()}function yb(a){var b=rc;xb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof dc.keyboard)for(var e in dc.keyboard)if(parseInt(e,10)===a.keyCode){var f=dc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:vb();break;case 78:case 34:wb();break;case 72:case 37:rb();break;case 76:case 39:sb();break;case 75:case 38:tb();break;case 74:case 40:ub();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?vb():wb();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:dc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ic.transforms3d||(hc.preview?z():G(),a.preventDefault()),nb()}}function zb(a){sc.startX=a.touches[0].clientX,sc.startY=a.touches[0].clientY,sc.startCount=a.touches.length,2===a.touches.length&&dc.overview&&(sc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY}))}function Ab(a){if(sc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{xb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===sc.startCount&&dc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY});Math.abs(sc.startSpan-d)>sc.threshold&&(sc.captured=!0,dsc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,rb()):e<-sc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,sb()):f>sc.threshold?(sc.captured=!0,tb()):f<-sc.threshold&&(sc.captured=!0,ub()),dc.embedded?(sc.captured||I(Xb))&&a.preventDefault():a.preventDefault()}}}function Bb(){sc.captured=!1}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Ab(a))}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){if(Date.now()-jc>600){jc=Date.now();var b=a.detail||-a.wheelDelta;b>0?wb():vb()}}function Gb(a){xb(a),a.preventDefault();var b=l(document.querySelectorAll(ac)).length,c=Math.floor(a.clientX/hc.wrapper.offsetWidth*b);Q(c)}function Hb(a){a.preventDefault(),xb(),rb()}function Ib(a){a.preventDefault(),xb(),sb()}function Jb(a){a.preventDefault(),xb(),tb()}function Kb(a){a.preventDefault(),xb(),ub()}function Lb(a){a.preventDefault(),xb(),vb()}function Mb(a){a.preventDefault(),xb(),wb()}function Nb(){eb()}function Ob(){A()}function Pb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Qb(a){if(nc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Rb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Sb(){Reveal.isLastSlide()&&dc.loop===!1?(Q(0,0),qb()):rc?qb():pb()}function Tb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Ub,Vb,Wb,Xb,Yb,Zb,$b,_b=".reveal .slides section",ac=".reveal .slides>section",bc=".reveal .slides>section.present>section",cc=".reveal .slides>section:first-of-type",dc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ec=!1,fc=[],gc=1,hc={},ic={},jc=0,kc=0,lc=0,mc=0,nc=!1,oc=0,pc=0,qc=-1,rc=!1,sc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Tb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Tb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ic.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Tb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +},Tb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Tb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Tb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:rb,right:sb,up:tb,down:ub,prev:vb,next:wb,navigateFragment:kb,prevFragment:mb,nextFragment:lb,navigateTo:Q,navigateLeft:rb,navigateRight:sb,navigateUp:tb,navigateDown:ub,navigatePrev:vb,navigateNext:wb,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getState:hb,setState:ib,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll(ac)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Wb},getCurrentSlide:function(){return Xb},getScale:function(){return gc},getConfig:function(){return dc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(_b+".past")?!0:!1},isLastSlide:function(){return Xb?Xb.nextElementSibling?!1:I(Xb)&&Xb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ec},addEventListener:function(a,b,c){"addEventListener"in window&&(hc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(hc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 1c2f4a2e9243d43abf1f6606cfba079daa7d72f7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 12 Mar 2014 08:51:51 +0100 Subject: deserialize state values --- js/reveal.js | 29 ++++++++++++++++++++--------- js/reveal.min.js | 6 +++--- 2 files changed, 23 insertions(+), 12 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5cb72eb..aa9f7b1 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -754,6 +754,22 @@ var Reveal = (function(){ } + /** + * Utility for deserializing a value. + */ + function deserialize( value ) { + + if( typeof value === 'string' ) { + if( value === 'null' ) return null; + else if( value === 'true' ) return true; + else if( value === 'false' ) return false; + else if( value.match( /^\d+$/ ) ) return parseFloat( value ); + } + + return value; + + } + /** * Measures the distance in pixels between point a * and point b. @@ -2352,9 +2368,9 @@ var Reveal = (function(){ function setState( state ) { if( typeof state === 'object' ) { - slide( state.indexh, state.indexv, state.indexf ); - togglePause( state.paused ); - toggleOverview( state.overview ); + slide( deserialize( state.indexh ), deserialize( state.indexv ), deserialize( state.indexf ) ); + togglePause( deserialize( state.paused ) ); + toggleOverview( deserialize( state.overview ) ); } } @@ -3430,12 +3446,7 @@ var Reveal = (function(){ for( var i in query ) { var value = query[ i ]; - query[ i ] = unescape( value ); - - if( value === 'null' ) query[ i ] = null; - else if( value === 'true' ) query[ i ] = true; - else if( value === 'false' ) query[ i ] = false; - else if( value.match( /^\d+$/ ) ) query[ i ] = parseFloat( value ); + query[ i ] = deserialize( unescape( value ) ); } return query; diff --git a/js/reveal.min.js b/js/reveal.min.js index cc2447b..c378cbe 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-02, 12:29) + * reveal.js 2.7.0-dev (2014-03-02, 13:01) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!ic.transforms2d&&!ic.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(dc,a),k(dc,d),r(),c()}function b(){ic.transforms3d="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,ic.transforms2d="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,ic.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ic.requestAnimationFrame="function"==typeof ic.requestAnimationFrameMethod,ic.canvas=!!document.createElement("canvas").getContext,Zb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=dc.dependencies.length;h>g;g++){var i=dc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),S(),h(),eb(),Z(!0),setTimeout(function(){hc.slides.classList.remove("no-transition"),ec=!0,t("ready",{indexh:Ub,indexv:Vb,currentSlide:Xb})},1)}function e(){hc.theme=document.querySelector("#theme"),hc.wrapper=document.querySelector(".reveal"),hc.slides=document.querySelector(".reveal .slides"),hc.slides.classList.add("no-transition"),hc.background=f(hc.wrapper,"div","backgrounds",null),hc.progress=f(hc.wrapper,"div","progress",""),hc.progressbar=hc.progress.querySelector("span"),f(hc.wrapper,"aside","controls",''),hc.slideNumber=f(hc.wrapper,"div","slide-number",""),f(hc.wrapper,"div","state-background",null),f(hc.wrapper,"div","pause-overlay",null),hc.controls=document.querySelector(".reveal .controls"),hc.controlsLeft=l(document.querySelectorAll(".navigate-left")),hc.controlsRight=l(document.querySelectorAll(".navigate-right")),hc.controlsUp=l(document.querySelectorAll(".navigate-up")),hc.controlsDown=l(document.querySelectorAll(".navigate-down")),hc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),hc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),hc.background.innerHTML="",hc.background.classList.add("no-transition"),l(document.querySelectorAll(ac)).forEach(function(b){var c;c=q()?a(b,b):a(b,hc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),dc.parallaxBackgroundImage?(hc.background.style.backgroundImage='url("'+dc.parallaxBackgroundImage+'")',hc.background.style.backgroundSize=dc.parallaxBackgroundSize,setTimeout(function(){hc.wrapper.classList.add("has-parallax-background")},1)):(hc.background.style.backgroundImage="",hc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(_b).length;if(hc.wrapper.classList.remove(dc.transition),"object"==typeof a&&k(dc,a),ic.transforms3d===!1&&(dc.transition="linear"),hc.wrapper.classList.add(dc.transition),hc.wrapper.setAttribute("data-transition-speed",dc.transitionSpeed),hc.wrapper.setAttribute("data-background-transition",dc.backgroundTransition),hc.controls.style.display=dc.controls?"block":"none",hc.progress.style.display=dc.progress?"block":"none",dc.rtl?hc.wrapper.classList.add("rtl"):hc.wrapper.classList.remove("rtl"),dc.center?hc.wrapper.classList.add("center"):hc.wrapper.classList.remove("center"),dc.mouseWheel?(document.addEventListener("DOMMouseScroll",Fb,!1),document.addEventListener("mousewheel",Fb,!1)):(document.removeEventListener("DOMMouseScroll",Fb,!1),document.removeEventListener("mousewheel",Fb,!1)),dc.rollingLinks?u():v(),dc.previewLinks?w():(x(),w("[data-preview-link]")),$b&&($b.destroy(),$b=null),b>1&&dc.autoSlide&&dc.autoSlideStoppable&&ic.canvas&&ic.requestAnimationFrame&&($b=new Tb(hc.wrapper,function(){return Math.min(Math.max((Date.now()-qc)/oc,0),1)}),$b.on("click",Sb),rc=!1),dc.theme&&hc.theme){var c=hc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];dc.theme!==e&&(c=c.replace(d,dc.theme),hc.theme.setAttribute("href",c))}R()}function i(){if(nc=!0,window.addEventListener("hashchange",Nb,!1),window.addEventListener("resize",Ob,!1),dc.touch&&(hc.wrapper.addEventListener("touchstart",zb,!1),hc.wrapper.addEventListener("touchmove",Ab,!1),hc.wrapper.addEventListener("touchend",Bb,!1),window.navigator.pointerEnabled?(hc.wrapper.addEventListener("pointerdown",Cb,!1),hc.wrapper.addEventListener("pointermove",Db,!1),hc.wrapper.addEventListener("pointerup",Eb,!1)):window.navigator.msPointerEnabled&&(hc.wrapper.addEventListener("MSPointerDown",Cb,!1),hc.wrapper.addEventListener("MSPointerMove",Db,!1),hc.wrapper.addEventListener("MSPointerUp",Eb,!1))),dc.keyboard&&document.addEventListener("keydown",yb,!1),dc.progress&&hc.progress&&hc.progress.addEventListener("click",Gb,!1),dc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Pb,!1)}["touchstart","click"].forEach(function(a){hc.controlsLeft.forEach(function(b){b.addEventListener(a,Hb,!1)}),hc.controlsRight.forEach(function(b){b.addEventListener(a,Ib,!1)}),hc.controlsUp.forEach(function(b){b.addEventListener(a,Jb,!1)}),hc.controlsDown.forEach(function(b){b.addEventListener(a,Kb,!1)}),hc.controlsPrev.forEach(function(b){b.addEventListener(a,Lb,!1)}),hc.controlsNext.forEach(function(b){b.addEventListener(a,Mb,!1)})})}function j(){nc=!1,document.removeEventListener("keydown",yb,!1),window.removeEventListener("hashchange",Nb,!1),window.removeEventListener("resize",Ob,!1),hc.wrapper.removeEventListener("touchstart",zb,!1),hc.wrapper.removeEventListener("touchmove",Ab,!1),hc.wrapper.removeEventListener("touchend",Bb,!1),window.navigator.pointerEnabled?(hc.wrapper.removeEventListener("pointerdown",Cb,!1),hc.wrapper.removeEventListener("pointermove",Db,!1),hc.wrapper.removeEventListener("pointerup",Eb,!1)):window.navigator.msPointerEnabled&&(hc.wrapper.removeEventListener("MSPointerDown",Cb,!1),hc.wrapper.removeEventListener("MSPointerMove",Db,!1),hc.wrapper.removeEventListener("MSPointerUp",Eb,!1)),dc.progress&&hc.progress&&hc.progress.removeEventListener("click",Gb,!1),["touchstart","click"].forEach(function(a){hc.controlsLeft.forEach(function(b){b.removeEventListener(a,Hb,!1)}),hc.controlsRight.forEach(function(b){b.removeEventListener(a,Ib,!1)}),hc.controlsUp.forEach(function(b){b.removeEventListener(a,Jb,!1)}),hc.controlsDown.forEach(function(b){b.removeEventListener(a,Kb,!1)}),hc.controlsPrev.forEach(function(b){b.removeEventListener(a,Lb,!1)}),hc.controlsNext.forEach(function(b){b.removeEventListener(a,Mb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){dc.hideAddressBar&&Zb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),hc.wrapper.dispatchEvent(c)}function u(){if(ic.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(_b+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(_b+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Rb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Rb,!1)})}function y(a){z(),hc.preview=document.createElement("div"),hc.preview.classList.add("preview-link-overlay"),hc.wrapper.appendChild(hc.preview),hc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),hc.preview.querySelector("iframe").addEventListener("load",function(){hc.preview.classList.add("loaded")},!1),hc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),hc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){hc.preview.classList.add("visible")},1)}function z(){hc.preview&&(hc.preview.setAttribute("src",""),hc.preview.parentNode.removeChild(hc.preview),hc.preview=null)}function A(){if(hc.wrapper&&!q()){var a=hc.wrapper.offsetWidth,b=hc.wrapper.offsetHeight;a-=b*dc.margin,b-=b*dc.margin;var c=dc.width,d=dc.height,e=20;B(dc.width,dc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),hc.slides.style.width=c+"px",hc.slides.style.height=d+"px",gc=Math.min(a/c,b/d),gc=Math.max(gc,dc.minScale),gc=Math.min(gc,dc.maxScale),"undefined"==typeof hc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(hc.slides,"translate(-50%, -50%) scale("+gc+") translate(50%, 50%)"):hc.slides.style.zoom=gc;for(var f=l(document.querySelectorAll(_b)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=dc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}W(),$()}}function B(a,b,c){l(hc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(dc.overview){ob();var a=hc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;hc.wrapper.classList.add("overview"),hc.wrapper.classList.remove("overview-deactivating"),clearTimeout(lc),clearTimeout(mc),lc=setTimeout(function(){for(var c=document.querySelectorAll(ac),d=0,e=c.length;e>d;d++){var f=c[d],g=dc.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Ub)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Ub?Vb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Qb,!0)}else f.addEventListener("click",Qb,!0)}V(),A(),a||t("overviewshown",{indexh:Ub,indexv:Vb,currentSlide:Xb})},10)}}function F(){dc.overview&&(clearTimeout(lc),clearTimeout(mc),hc.wrapper.classList.remove("overview"),hc.wrapper.classList.add("overview-deactivating"),mc=setTimeout(function(){hc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(_b)).forEach(function(a){n(a,""),a.removeEventListener("click",Qb,!0)}),Q(Ub,Vb),nb(),t("overviewhidden",{indexh:Ub,indexv:Vb,currentSlide:Xb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return hc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Xb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=hc.wrapper.classList.contains("paused");ob(),hc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=hc.wrapper.classList.contains("paused");hc.wrapper.classList.remove("paused"),nb(),a&&t("resumed")}function M(a){"boolean"==typeof a?a?K():L():N()?L():K()}function N(){return hc.wrapper.classList.contains("paused")}function O(a){"boolean"==typeof a?a?qb():pb():rc?qb():pb()}function P(){return!(!oc||rc)}function Q(a,b,c,d){Wb=Xb;var e=document.querySelectorAll(ac);void 0===b&&(b=D(e[a])),Wb&&Wb.parentNode&&Wb.parentNode.classList.contains("stack")&&C(Wb.parentNode,Vb);var f=fc.concat();fc.length=0;var g=Ub||0,h=Vb||0;Ub=U(ac,void 0===a?Ub:a),Vb=U(bc,void 0===b?Vb:b),V(),A();a:for(var i=0,j=fc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function T(){var a=l(document.querySelectorAll(ac));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){jb(a.querySelectorAll(".fragment"))}),0===b.length&&jb(a.querySelectorAll(".fragment"))})}function U(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){dc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=dc.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(fc=fc.concat(m.split(" ")))}else b=0;return b}function V(){var a,b,c=l(document.querySelectorAll(ac)),d=c.length;if(d){var e=H()?10:dc.viewDistance;Zb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Ub-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Ub?Math.abs(Vb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function W(){if(dc.progress&&hc.progress){var a=l(document.querySelectorAll(ac)),b=document.querySelectorAll(_b+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Vb),hc.slideNumber.innerHTML=a}}function Y(){var a=_(),b=ab();hc.controlsLeft.concat(hc.controlsRight).concat(hc.controlsUp).concat(hc.controlsDown).concat(hc.controlsPrev).concat(hc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&hc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&hc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&hc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&hc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&hc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&hc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Xb&&(b.prev&&hc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&hc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Xb)?(b.prev&&hc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&hc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&hc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&hc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Z(a){var b=null,c=dc.rtl?"future":"past",d=dc.rtl?"past":"future";if(l(hc.background.childNodes).forEach(function(e,f){Ub>f?e.className="slide-background "+c:f>Ub?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Ub)&&l(e.childNodes).forEach(function(a,c){Vb>c?a.className="slide-background past":c>Vb?a.className="slide-background future":(a.className="slide-background present",f===Ub&&(b=a))})}),b){var e=Yb?Yb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Yb&&hc.background.classList.add("no-transition"),Yb=b}setTimeout(function(){hc.background.classList.remove("no-transition")},1)}function $(){if(dc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ac),d=document.querySelectorAll(bc),e=hc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=hc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Ub,i=hc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Vb:0;hc.background.style.backgroundPosition=h+"px "+k+"px"}}function _(){var a=document.querySelectorAll(ac),b=document.querySelectorAll(bc),c={left:Ub>0||dc.loop,right:Ub0,down:Vb0,next:!!b.length}}return{prev:!1,next:!1}}function bb(a){a&&!db()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function cb(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function db(){return!!window.location.search.match(/receiver/gi)}function eb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);Q(e.h,e.v)}else Q(Ub||0,Vb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Ub||g!==Vb)&&Q(f,g)}}function fb(a){if(dc.history)if(clearTimeout(kc),"number"==typeof a)kc=setTimeout(fb,a);else{var b="/";Xb&&"string"==typeof Xb.getAttribute("id")?b="/"+Xb.getAttribute("id"):((Ub>0||Vb>0)&&(b+=Ub),Vb>0&&(b+="/"+Vb)),window.location.hash=b}}function gb(a){var b,c=Ub,d=Vb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(ac));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Xb){var h=Xb.querySelectorAll(".fragment").length>0;if(h){var i=Xb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function hb(){var a=gb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:N(),overview:H()}}function ib(a){"object"==typeof a&&(Q(a.indexh,a.indexv,a.indexf),M(a.paused),G(a.overview))}function jb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function kb(a,b){if(Xb&&dc.fragments){var c=jb(Xb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=jb(Xb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),Y(),!(!e.length&&!f.length)}}return!1}function lb(){return kb(null,1)}function mb(){return kb(null,-1)}function nb(){if(ob(),Xb){var a=Xb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Xb.parentNode?Xb.parentNode.getAttribute("data-autoslide"):null,d=Xb.getAttribute("data-autoslide");oc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):dc.autoSlide,l(Xb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&oc&&1e3*a.duration>oc&&(oc=1e3*a.duration+1e3)}),!oc||rc||N()||H()||Reveal.isLastSlide()&&dc.loop!==!0||(pc=setTimeout(wb,oc),qc=Date.now()),$b&&$b.setPlaying(-1!==pc)}}function ob(){clearTimeout(pc),pc=-1}function pb(){rc=!0,t("autoslidepaused"),clearTimeout(pc),$b&&$b.setPlaying(!1)}function qb(){rc=!1,t("autoslideresumed"),nb()}function rb(){dc.rtl?(H()||lb()===!1)&&_().left&&Q(Ub+1):(H()||mb()===!1)&&_().left&&Q(Ub-1)}function sb(){dc.rtl?(H()||mb()===!1)&&_().right&&Q(Ub-1):(H()||lb()===!1)&&_().right&&Q(Ub+1)}function tb(){(H()||mb()===!1)&&_().up&&Q(Ub,Vb-1)}function ub(){(H()||lb()===!1)&&_().down&&Q(Ub,Vb+1)}function vb(){if(mb()===!1)if(_().up)tb();else{var a=document.querySelector(ac+".past:nth-child("+Ub+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Ub-1;Q(c,b)}}}function wb(){lb()===!1&&(_().down?ub():sb()),nb()}function xb(){dc.autoSlideStoppable&&pb()}function yb(a){var b=rc;xb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof dc.keyboard)for(var e in dc.keyboard)if(parseInt(e,10)===a.keyCode){var f=dc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:vb();break;case 78:case 34:wb();break;case 72:case 37:rb();break;case 76:case 39:sb();break;case 75:case 38:tb();break;case 74:case 40:ub();break;case 36:Q(0);break;case 35:Q(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?vb():wb();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;case 65:dc.autoSlideStoppable&&O(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ic.transforms3d||(hc.preview?z():G(),a.preventDefault()),nb()}}function zb(a){sc.startX=a.touches[0].clientX,sc.startY=a.touches[0].clientY,sc.startCount=a.touches.length,2===a.touches.length&&dc.overview&&(sc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY}))}function Ab(a){if(sc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{xb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===sc.startCount&&dc.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY});Math.abs(sc.startSpan-d)>sc.threshold&&(sc.captured=!0,dsc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,rb()):e<-sc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,sb()):f>sc.threshold?(sc.captured=!0,tb()):f<-sc.threshold&&(sc.captured=!0,ub()),dc.embedded?(sc.captured||I(Xb))&&a.preventDefault():a.preventDefault()}}}function Bb(){sc.captured=!1}function Cb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],zb(a))}function Db(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Ab(a))}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){if(Date.now()-jc>600){jc=Date.now();var b=a.detail||-a.wheelDelta;b>0?wb():vb()}}function Gb(a){xb(a),a.preventDefault();var b=l(document.querySelectorAll(ac)).length,c=Math.floor(a.clientX/hc.wrapper.offsetWidth*b);Q(c)}function Hb(a){a.preventDefault(),xb(),rb()}function Ib(a){a.preventDefault(),xb(),sb()}function Jb(a){a.preventDefault(),xb(),tb()}function Kb(a){a.preventDefault(),xb(),ub()}function Lb(a){a.preventDefault(),xb(),vb()}function Mb(a){a.preventDefault(),xb(),wb()}function Nb(){eb()}function Ob(){A()}function Pb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Qb(a){if(nc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);Q(c,d)}}}function Rb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Sb(){Reveal.isLastSlide()&&dc.loop===!1?(Q(0,0),qb()):rc?qb():pb()}function Tb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Ub,Vb,Wb,Xb,Yb,Zb,$b,_b=".reveal .slides section",ac=".reveal .slides>section",bc=".reveal .slides>section.present>section",cc=".reveal .slides>section:first-of-type",dc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ec=!1,fc=[],gc=1,hc={},ic={},jc=0,kc=0,lc=0,mc=0,nc=!1,oc=0,pc=0,qc=-1,rc=!1,sc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Tb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Tb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ic.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Tb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() -},Tb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Tb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Tb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:R,slide:Q,left:rb,right:sb,up:tb,down:ub,prev:vb,next:wb,navigateFragment:kb,prevFragment:mb,nextFragment:lb,navigateTo:Q,navigateLeft:rb,navigateRight:sb,navigateUp:tb,navigateDown:ub,navigatePrev:vb,navigateNext:wb,layout:A,availableRoutes:_,availableFragments:ab,toggleOverview:G,togglePause:M,toggleAutoSlide:O,isOverview:H,isPaused:N,isAutoSliding:P,addEventListeners:i,removeEventListeners:j,getState:hb,setState:ib,getIndices:gb,getSlide:function(a,b){var c=document.querySelectorAll(ac)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Wb},getCurrentSlide:function(){return Xb},getScale:function(){return gc},getConfig:function(){return dc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(_b+".past")?!0:!1},isLastSlide:function(){return Xb?Xb.nextElementSibling?!1:I(Xb)&&Xb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ec},addEventListener:function(a,b,c){"addEventListener"in window&&(hc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(hc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!jc.transforms2d&&!jc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(ec,a),k(ec,d),s(),c()}function b(){jc.transforms3d="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,jc.transforms2d="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,jc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,jc.requestAnimationFrame="function"==typeof jc.requestAnimationFrameMethod,jc.canvas=!!document.createElement("canvas").getContext,$b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=ec.dependencies.length;h>g;g++){var i=ec.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),fb(),$(!0),setTimeout(function(){ic.slides.classList.remove("no-transition"),fc=!0,u("ready",{indexh:Vb,indexv:Wb,currentSlide:Yb})},1)}function e(){ic.theme=document.querySelector("#theme"),ic.wrapper=document.querySelector(".reveal"),ic.slides=document.querySelector(".reveal .slides"),ic.slides.classList.add("no-transition"),ic.background=f(ic.wrapper,"div","backgrounds",null),ic.progress=f(ic.wrapper,"div","progress",""),ic.progressbar=ic.progress.querySelector("span"),f(ic.wrapper,"aside","controls",''),ic.slideNumber=f(ic.wrapper,"div","slide-number",""),f(ic.wrapper,"div","state-background",null),f(ic.wrapper,"div","pause-overlay",null),ic.controls=document.querySelector(".reveal .controls"),ic.controlsLeft=l(document.querySelectorAll(".navigate-left")),ic.controlsRight=l(document.querySelectorAll(".navigate-right")),ic.controlsUp=l(document.querySelectorAll(".navigate-up")),ic.controlsDown=l(document.querySelectorAll(".navigate-down")),ic.controlsPrev=l(document.querySelectorAll(".navigate-prev")),ic.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),ic.background.innerHTML="",ic.background.classList.add("no-transition"),l(document.querySelectorAll(bc)).forEach(function(b){var c;c=r()?a(b,b):a(b,ic.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),ec.parallaxBackgroundImage?(ic.background.style.backgroundImage='url("'+ec.parallaxBackgroundImage+'")',ic.background.style.backgroundSize=ec.parallaxBackgroundSize,setTimeout(function(){ic.wrapper.classList.add("has-parallax-background")},1)):(ic.background.style.backgroundImage="",ic.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(ac).length;if(ic.wrapper.classList.remove(ec.transition),"object"==typeof a&&k(ec,a),jc.transforms3d===!1&&(ec.transition="linear"),ic.wrapper.classList.add(ec.transition),ic.wrapper.setAttribute("data-transition-speed",ec.transitionSpeed),ic.wrapper.setAttribute("data-background-transition",ec.backgroundTransition),ic.controls.style.display=ec.controls?"block":"none",ic.progress.style.display=ec.progress?"block":"none",ec.rtl?ic.wrapper.classList.add("rtl"):ic.wrapper.classList.remove("rtl"),ec.center?ic.wrapper.classList.add("center"):ic.wrapper.classList.remove("center"),ec.mouseWheel?(document.addEventListener("DOMMouseScroll",Gb,!1),document.addEventListener("mousewheel",Gb,!1)):(document.removeEventListener("DOMMouseScroll",Gb,!1),document.removeEventListener("mousewheel",Gb,!1)),ec.rollingLinks?v():w(),ec.previewLinks?x():(y(),x("[data-preview-link]")),_b&&(_b.destroy(),_b=null),b>1&&ec.autoSlide&&ec.autoSlideStoppable&&jc.canvas&&jc.requestAnimationFrame&&(_b=new Ub(ic.wrapper,function(){return Math.min(Math.max((Date.now()-rc)/pc,0),1)}),_b.on("click",Tb),sc=!1),ec.theme&&ic.theme){var c=ic.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];ec.theme!==e&&(c=c.replace(d,ec.theme),ic.theme.setAttribute("href",c))}S()}function i(){if(oc=!0,window.addEventListener("hashchange",Ob,!1),window.addEventListener("resize",Pb,!1),ec.touch&&(ic.wrapper.addEventListener("touchstart",Ab,!1),ic.wrapper.addEventListener("touchmove",Bb,!1),ic.wrapper.addEventListener("touchend",Cb,!1),window.navigator.pointerEnabled?(ic.wrapper.addEventListener("pointerdown",Db,!1),ic.wrapper.addEventListener("pointermove",Eb,!1),ic.wrapper.addEventListener("pointerup",Fb,!1)):window.navigator.msPointerEnabled&&(ic.wrapper.addEventListener("MSPointerDown",Db,!1),ic.wrapper.addEventListener("MSPointerMove",Eb,!1),ic.wrapper.addEventListener("MSPointerUp",Fb,!1))),ec.keyboard&&document.addEventListener("keydown",zb,!1),ec.progress&&ic.progress&&ic.progress.addEventListener("click",Hb,!1),ec.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Qb,!1)}["touchstart","click"].forEach(function(a){ic.controlsLeft.forEach(function(b){b.addEventListener(a,Ib,!1)}),ic.controlsRight.forEach(function(b){b.addEventListener(a,Jb,!1)}),ic.controlsUp.forEach(function(b){b.addEventListener(a,Kb,!1)}),ic.controlsDown.forEach(function(b){b.addEventListener(a,Lb,!1)}),ic.controlsPrev.forEach(function(b){b.addEventListener(a,Mb,!1)}),ic.controlsNext.forEach(function(b){b.addEventListener(a,Nb,!1)})})}function j(){oc=!1,document.removeEventListener("keydown",zb,!1),window.removeEventListener("hashchange",Ob,!1),window.removeEventListener("resize",Pb,!1),ic.wrapper.removeEventListener("touchstart",Ab,!1),ic.wrapper.removeEventListener("touchmove",Bb,!1),ic.wrapper.removeEventListener("touchend",Cb,!1),window.navigator.pointerEnabled?(ic.wrapper.removeEventListener("pointerdown",Db,!1),ic.wrapper.removeEventListener("pointermove",Eb,!1),ic.wrapper.removeEventListener("pointerup",Fb,!1)):window.navigator.msPointerEnabled&&(ic.wrapper.removeEventListener("MSPointerDown",Db,!1),ic.wrapper.removeEventListener("MSPointerMove",Eb,!1),ic.wrapper.removeEventListener("MSPointerUp",Fb,!1)),ec.progress&&ic.progress&&ic.progress.removeEventListener("click",Hb,!1),["touchstart","click"].forEach(function(a){ic.controlsLeft.forEach(function(b){b.removeEventListener(a,Ib,!1)}),ic.controlsRight.forEach(function(b){b.removeEventListener(a,Jb,!1)}),ic.controlsUp.forEach(function(b){b.removeEventListener(a,Kb,!1)}),ic.controlsDown.forEach(function(b){b.removeEventListener(a,Lb,!1)}),ic.controlsPrev.forEach(function(b){b.removeEventListener(a,Mb,!1)}),ic.controlsNext.forEach(function(b){b.removeEventListener(a,Nb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){ec.hideAddressBar&&$b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),ic.wrapper.dispatchEvent(c)}function v(){if(jc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(ac+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(ac+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Sb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Sb,!1)})}function z(a){A(),ic.preview=document.createElement("div"),ic.preview.classList.add("preview-link-overlay"),ic.wrapper.appendChild(ic.preview),ic.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),ic.preview.querySelector("iframe").addEventListener("load",function(){ic.preview.classList.add("loaded")},!1),ic.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),ic.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){ic.preview.classList.add("visible")},1)}function A(){ic.preview&&(ic.preview.setAttribute("src",""),ic.preview.parentNode.removeChild(ic.preview),ic.preview=null)}function B(){if(ic.wrapper&&!r()){var a=ic.wrapper.offsetWidth,b=ic.wrapper.offsetHeight;a-=b*ec.margin,b-=b*ec.margin;var c=ec.width,d=ec.height,e=20;C(ec.width,ec.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),ic.slides.style.width=c+"px",ic.slides.style.height=d+"px",hc=Math.min(a/c,b/d),hc=Math.max(hc,ec.minScale),hc=Math.min(hc,ec.maxScale),"undefined"==typeof ic.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(ic.slides,"translate(-50%, -50%) scale("+hc+") translate(50%, 50%)"):ic.slides.style.zoom=hc;for(var f=l(document.querySelectorAll(ac)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=ec.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(ic.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(ec.overview){pb();var a=ic.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;ic.wrapper.classList.add("overview"),ic.wrapper.classList.remove("overview-deactivating"),clearTimeout(mc),clearTimeout(nc),mc=setTimeout(function(){for(var c=document.querySelectorAll(bc),d=0,e=c.length;e>d;d++){var f=c[d],g=ec.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Vb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Vb?Wb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Rb,!0)}else f.addEventListener("click",Rb,!0)}W(),B(),a||u("overviewshown",{indexh:Vb,indexv:Wb,currentSlide:Yb})},10)}}function G(){ec.overview&&(clearTimeout(mc),clearTimeout(nc),ic.wrapper.classList.remove("overview"),ic.wrapper.classList.add("overview-deactivating"),nc=setTimeout(function(){ic.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(ac)).forEach(function(a){o(a,""),a.removeEventListener("click",Rb,!0)}),R(Vb,Wb),ob(),u("overviewhidden",{indexh:Vb,indexv:Wb,currentSlide:Yb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return ic.wrapper.classList.contains("overview")}function J(a){return a=a?a:Yb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=ic.wrapper.classList.contains("paused");pb(),ic.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=ic.wrapper.classList.contains("paused");ic.wrapper.classList.remove("paused"),ob(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return ic.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?rb():qb():sc?rb():qb()}function Q(){return!(!pc||sc)}function R(a,b,c,d){Xb=Yb;var e=document.querySelectorAll(bc);void 0===b&&(b=E(e[a])),Xb&&Xb.parentNode&&Xb.parentNode.classList.contains("stack")&&D(Xb.parentNode,Wb);var f=gc.concat();gc.length=0;var g=Vb||0,h=Wb||0;Vb=V(bc,void 0===a?Vb:a),Wb=V(cc,void 0===b?Wb:b),W(),B();a:for(var i=0,j=gc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(bc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){kb(a.querySelectorAll(".fragment"))}),0===b.length&&kb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){ec.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=ec.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(gc=gc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(bc)),d=c.length;if(d){var e=I()?10:ec.viewDistance;$b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Vb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Vb?Math.abs(Wb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){if(ec.progress&&ic.progress){var a=l(document.querySelectorAll(bc)),b=document.querySelectorAll(ac+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Wb),ic.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();ic.controlsLeft.concat(ic.controlsRight).concat(ic.controlsUp).concat(ic.controlsDown).concat(ic.controlsPrev).concat(ic.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&ic.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&ic.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&ic.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&ic.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&ic.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&ic.controlsNext.forEach(function(a){a.classList.add("enabled")}),Yb&&(b.prev&&ic.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ic.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Yb)?(b.prev&&ic.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ic.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&ic.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ic.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=ec.rtl?"future":"past",d=ec.rtl?"past":"future";if(l(ic.background.childNodes).forEach(function(e,f){Vb>f?e.className="slide-background "+c:f>Vb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Vb)&&l(e.childNodes).forEach(function(a,c){Wb>c?a.className="slide-background past":c>Wb?a.className="slide-background future":(a.className="slide-background present",f===Vb&&(b=a))})}),b){var e=Zb?Zb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Zb&&ic.background.classList.add("no-transition"),Zb=b}setTimeout(function(){ic.background.classList.remove("no-transition")},1)}function _(){if(ec.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(bc),d=document.querySelectorAll(cc),e=ic.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=ic.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Vb,i=ic.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Wb:0;ic.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(bc),b=document.querySelectorAll(cc),c={left:Vb>0||ec.loop,right:Vb0,down:Wb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!eb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){return!!window.location.search.match(/receiver/gi)}function fb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Vb||0,Wb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Vb||g!==Wb)&&R(f,g)}}function gb(a){if(ec.history)if(clearTimeout(lc),"number"==typeof a)lc=setTimeout(gb,a);else{var b="/";Yb&&"string"==typeof Yb.getAttribute("id")?b="/"+Yb.getAttribute("id"):((Vb>0||Wb>0)&&(b+=Vb),Wb>0&&(b+="/"+Wb)),window.location.hash=b}}function hb(a){var b,c=Vb,d=Wb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(bc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Yb){var h=Yb.querySelectorAll(".fragment").length>0;if(h){var i=Yb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function ib(){var a=hb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function jb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function kb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function lb(a,b){if(Yb&&ec.fragments){var c=kb(Yb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=kb(Yb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),!(!e.length&&!f.length)}}return!1}function mb(){return lb(null,1)}function nb(){return lb(null,-1)}function ob(){if(pb(),Yb){var a=Yb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Yb.parentNode?Yb.parentNode.getAttribute("data-autoslide"):null,d=Yb.getAttribute("data-autoslide");pc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):ec.autoSlide,l(Yb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&pc&&1e3*a.duration>pc&&(pc=1e3*a.duration+1e3)}),!pc||sc||O()||I()||Reveal.isLastSlide()&&ec.loop!==!0||(qc=setTimeout(xb,pc),rc=Date.now()),_b&&_b.setPlaying(-1!==qc)}}function pb(){clearTimeout(qc),qc=-1}function qb(){sc=!0,u("autoslidepaused"),clearTimeout(qc),_b&&_b.setPlaying(!1)}function rb(){sc=!1,u("autoslideresumed"),ob()}function sb(){ec.rtl?(I()||mb()===!1)&&ab().left&&R(Vb+1):(I()||nb()===!1)&&ab().left&&R(Vb-1)}function tb(){ec.rtl?(I()||nb()===!1)&&ab().right&&R(Vb-1):(I()||mb()===!1)&&ab().right&&R(Vb+1)}function ub(){(I()||nb()===!1)&&ab().up&&R(Vb,Wb-1)}function vb(){(I()||mb()===!1)&&ab().down&&R(Vb,Wb+1)}function wb(){if(nb()===!1)if(ab().up)ub();else{var a=document.querySelector(bc+".past:nth-child("+Vb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Vb-1;R(c,b)}}}function xb(){mb()===!1&&(ab().down?vb():tb()),ob()}function yb(){ec.autoSlideStoppable&&qb()}function zb(a){var b=sc;yb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof ec.keyboard)for(var e in ec.keyboard)if(parseInt(e,10)===a.keyCode){var f=ec.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:wb();break;case 78:case 34:xb();break;case 72:case 37:sb();break;case 76:case 39:tb();break;case 75:case 38:ub();break;case 74:case 40:vb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?wb():xb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:ec.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!jc.transforms3d||(ic.preview?A():H(),a.preventDefault()),ob()}}function Ab(a){tc.startX=a.touches[0].clientX,tc.startY=a.touches[0].clientY,tc.startCount=a.touches.length,2===a.touches.length&&ec.overview&&(tc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY}))}function Bb(a){if(tc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{yb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===tc.startCount&&ec.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY});Math.abs(tc.startSpan-d)>tc.threshold&&(tc.captured=!0,dtc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,sb()):e<-tc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,tb()):f>tc.threshold?(tc.captured=!0,ub()):f<-tc.threshold&&(tc.captured=!0,vb()),ec.embedded?(tc.captured||J(Yb))&&a.preventDefault():a.preventDefault()}}}function Cb(){tc.captured=!1}function Db(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Ab(a))}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){if(Date.now()-kc>600){kc=Date.now();var b=a.detail||-a.wheelDelta;b>0?xb():wb()}}function Hb(a){yb(a),a.preventDefault();var b=l(document.querySelectorAll(bc)).length,c=Math.floor(a.clientX/ic.wrapper.offsetWidth*b);R(c)}function Ib(a){a.preventDefault(),yb(),sb()}function Jb(a){a.preventDefault(),yb(),tb()}function Kb(a){a.preventDefault(),yb(),ub()}function Lb(a){a.preventDefault(),yb(),vb()}function Mb(a){a.preventDefault(),yb(),wb()}function Nb(a){a.preventDefault(),yb(),xb()}function Ob(){fb()}function Pb(){B()}function Qb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Rb(a){if(oc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Sb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Tb(){Reveal.isLastSlide()&&ec.loop===!1?(R(0,0),rb()):sc?rb():qb()}function Ub(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Vb,Wb,Xb,Yb,Zb,$b,_b,ac=".reveal .slides section",bc=".reveal .slides>section",cc=".reveal .slides>section.present>section",dc=".reveal .slides>section:first-of-type",ec={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},fc=!1,gc=[],hc=1,ic={},jc={},kc=0,lc=0,mc=0,nc=0,oc=!1,pc=0,qc=0,rc=-1,sc=!1,tc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Ub.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Ub.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&jc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Ub.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +},Ub.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Ub.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Ub.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:sb,right:tb,up:ub,down:vb,prev:wb,next:xb,navigateFragment:lb,prevFragment:nb,nextFragment:mb,navigateTo:R,navigateLeft:sb,navigateRight:tb,navigateUp:ub,navigateDown:vb,navigatePrev:wb,navigateNext:xb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:ib,setState:jb,getIndices:hb,getSlide:function(a,b){var c=document.querySelectorAll(bc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Xb},getCurrentSlide:function(){return Yb},getScale:function(){return hc},getConfig:function(){return ec},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(ac+".past")?!0:!1},isLastSlide:function(){return Yb?Yb.nextElementSibling?!1:J(Yb)&&Yb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return fc},addEventListener:function(a,b,c){"addEventListener"in window&&(ic.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(ic.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 6e9a33cf1f5f11f5484bbc67f0f12e10061f72f5 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 12 Mar 2014 22:26:31 +0100 Subject: add api method for retrieving progress --- js/reveal.js | 85 ++++++++++++++++++++++++++++++++------------------------ js/reveal.min.js | 6 ++-- 2 files changed, 52 insertions(+), 39 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index aa9f7b1..b2869c0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1882,42 +1882,7 @@ var Reveal = (function(){ // Update progress if enabled if( config.progress && dom.progress ) { - var horizontalSlides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); - - // The number of past and total slides - var totalCount = document.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; - var pastCount = 0; - - // Step through all slides and count the past ones - mainLoop: for( var i = 0; i < horizontalSlides.length; i++ ) { - - var horizontalSlide = horizontalSlides[i]; - var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ); - - for( var j = 0; j < verticalSlides.length; j++ ) { - - // Stop as soon as we arrive at the present - if( verticalSlides[j].classList.contains( 'present' ) ) { - break mainLoop; - } - - pastCount++; - - } - - // Stop as soon as we arrive at the present - if( horizontalSlide.classList.contains( 'present' ) ) { - break; - } - - // Don't count the wrapping section for vertical slides - if( horizontalSlide.classList.contains( 'stack' ) === false ) { - pastCount++; - } - - } - - dom.progressbar.style.width = ( pastCount / ( totalCount - 1 ) ) * window.innerWidth + 'px'; + dom.progressbar.style.width = getProgress() * window.innerWidth + 'px'; } @@ -2209,6 +2174,51 @@ var Reveal = (function(){ } + /** + * Returns a value ranging from 0-1 that represents + * how far into the presentation we have navigated. + */ + function getProgress() { + + var horizontalSlides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); + + // The number of past and total slides + var totalCount = document.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; + var pastCount = 0; + + // Step through all slides and count the past ones + mainLoop: for( var i = 0; i < horizontalSlides.length; i++ ) { + + var horizontalSlide = horizontalSlides[i]; + var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ); + + for( var j = 0; j < verticalSlides.length; j++ ) { + + // Stop as soon as we arrive at the present + if( verticalSlides[j].classList.contains( 'present' ) ) { + break mainLoop; + } + + pastCount++; + + } + + // Stop as soon as we arrive at the present + if( horizontalSlide.classList.contains( 'present' ) ) { + break; + } + + // Don't count the wrapping section for vertical slides + if( horizontalSlide.classList.contains( 'stack' ) === false ) { + pastCount++; + } + + } + + return pastCount / ( totalCount - 1 ); + + } + /** * Checks if this presentation is running inside of the * speaker notes window. @@ -3399,6 +3409,9 @@ var Reveal = (function(){ getState: getState, setState: setState, + // Presentation progress on range of 0-1 + getProgress: getProgress, + // Returns the indices of the current, or specified, slide getIndices: getIndices, diff --git a/js/reveal.min.js b/js/reveal.min.js index c378cbe..0fcdf33 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-02, 13:01) + * reveal.js 2.7.0-dev (2014-03-12, 22:25) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!jc.transforms2d&&!jc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(ec,a),k(ec,d),s(),c()}function b(){jc.transforms3d="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,jc.transforms2d="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,jc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,jc.requestAnimationFrame="function"==typeof jc.requestAnimationFrameMethod,jc.canvas=!!document.createElement("canvas").getContext,$b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=ec.dependencies.length;h>g;g++){var i=ec.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),fb(),$(!0),setTimeout(function(){ic.slides.classList.remove("no-transition"),fc=!0,u("ready",{indexh:Vb,indexv:Wb,currentSlide:Yb})},1)}function e(){ic.theme=document.querySelector("#theme"),ic.wrapper=document.querySelector(".reveal"),ic.slides=document.querySelector(".reveal .slides"),ic.slides.classList.add("no-transition"),ic.background=f(ic.wrapper,"div","backgrounds",null),ic.progress=f(ic.wrapper,"div","progress",""),ic.progressbar=ic.progress.querySelector("span"),f(ic.wrapper,"aside","controls",''),ic.slideNumber=f(ic.wrapper,"div","slide-number",""),f(ic.wrapper,"div","state-background",null),f(ic.wrapper,"div","pause-overlay",null),ic.controls=document.querySelector(".reveal .controls"),ic.controlsLeft=l(document.querySelectorAll(".navigate-left")),ic.controlsRight=l(document.querySelectorAll(".navigate-right")),ic.controlsUp=l(document.querySelectorAll(".navigate-up")),ic.controlsDown=l(document.querySelectorAll(".navigate-down")),ic.controlsPrev=l(document.querySelectorAll(".navigate-prev")),ic.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),ic.background.innerHTML="",ic.background.classList.add("no-transition"),l(document.querySelectorAll(bc)).forEach(function(b){var c;c=r()?a(b,b):a(b,ic.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),ec.parallaxBackgroundImage?(ic.background.style.backgroundImage='url("'+ec.parallaxBackgroundImage+'")',ic.background.style.backgroundSize=ec.parallaxBackgroundSize,setTimeout(function(){ic.wrapper.classList.add("has-parallax-background")},1)):(ic.background.style.backgroundImage="",ic.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(ac).length;if(ic.wrapper.classList.remove(ec.transition),"object"==typeof a&&k(ec,a),jc.transforms3d===!1&&(ec.transition="linear"),ic.wrapper.classList.add(ec.transition),ic.wrapper.setAttribute("data-transition-speed",ec.transitionSpeed),ic.wrapper.setAttribute("data-background-transition",ec.backgroundTransition),ic.controls.style.display=ec.controls?"block":"none",ic.progress.style.display=ec.progress?"block":"none",ec.rtl?ic.wrapper.classList.add("rtl"):ic.wrapper.classList.remove("rtl"),ec.center?ic.wrapper.classList.add("center"):ic.wrapper.classList.remove("center"),ec.mouseWheel?(document.addEventListener("DOMMouseScroll",Gb,!1),document.addEventListener("mousewheel",Gb,!1)):(document.removeEventListener("DOMMouseScroll",Gb,!1),document.removeEventListener("mousewheel",Gb,!1)),ec.rollingLinks?v():w(),ec.previewLinks?x():(y(),x("[data-preview-link]")),_b&&(_b.destroy(),_b=null),b>1&&ec.autoSlide&&ec.autoSlideStoppable&&jc.canvas&&jc.requestAnimationFrame&&(_b=new Ub(ic.wrapper,function(){return Math.min(Math.max((Date.now()-rc)/pc,0),1)}),_b.on("click",Tb),sc=!1),ec.theme&&ic.theme){var c=ic.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];ec.theme!==e&&(c=c.replace(d,ec.theme),ic.theme.setAttribute("href",c))}S()}function i(){if(oc=!0,window.addEventListener("hashchange",Ob,!1),window.addEventListener("resize",Pb,!1),ec.touch&&(ic.wrapper.addEventListener("touchstart",Ab,!1),ic.wrapper.addEventListener("touchmove",Bb,!1),ic.wrapper.addEventListener("touchend",Cb,!1),window.navigator.pointerEnabled?(ic.wrapper.addEventListener("pointerdown",Db,!1),ic.wrapper.addEventListener("pointermove",Eb,!1),ic.wrapper.addEventListener("pointerup",Fb,!1)):window.navigator.msPointerEnabled&&(ic.wrapper.addEventListener("MSPointerDown",Db,!1),ic.wrapper.addEventListener("MSPointerMove",Eb,!1),ic.wrapper.addEventListener("MSPointerUp",Fb,!1))),ec.keyboard&&document.addEventListener("keydown",zb,!1),ec.progress&&ic.progress&&ic.progress.addEventListener("click",Hb,!1),ec.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Qb,!1)}["touchstart","click"].forEach(function(a){ic.controlsLeft.forEach(function(b){b.addEventListener(a,Ib,!1)}),ic.controlsRight.forEach(function(b){b.addEventListener(a,Jb,!1)}),ic.controlsUp.forEach(function(b){b.addEventListener(a,Kb,!1)}),ic.controlsDown.forEach(function(b){b.addEventListener(a,Lb,!1)}),ic.controlsPrev.forEach(function(b){b.addEventListener(a,Mb,!1)}),ic.controlsNext.forEach(function(b){b.addEventListener(a,Nb,!1)})})}function j(){oc=!1,document.removeEventListener("keydown",zb,!1),window.removeEventListener("hashchange",Ob,!1),window.removeEventListener("resize",Pb,!1),ic.wrapper.removeEventListener("touchstart",Ab,!1),ic.wrapper.removeEventListener("touchmove",Bb,!1),ic.wrapper.removeEventListener("touchend",Cb,!1),window.navigator.pointerEnabled?(ic.wrapper.removeEventListener("pointerdown",Db,!1),ic.wrapper.removeEventListener("pointermove",Eb,!1),ic.wrapper.removeEventListener("pointerup",Fb,!1)):window.navigator.msPointerEnabled&&(ic.wrapper.removeEventListener("MSPointerDown",Db,!1),ic.wrapper.removeEventListener("MSPointerMove",Eb,!1),ic.wrapper.removeEventListener("MSPointerUp",Fb,!1)),ec.progress&&ic.progress&&ic.progress.removeEventListener("click",Hb,!1),["touchstart","click"].forEach(function(a){ic.controlsLeft.forEach(function(b){b.removeEventListener(a,Ib,!1)}),ic.controlsRight.forEach(function(b){b.removeEventListener(a,Jb,!1)}),ic.controlsUp.forEach(function(b){b.removeEventListener(a,Kb,!1)}),ic.controlsDown.forEach(function(b){b.removeEventListener(a,Lb,!1)}),ic.controlsPrev.forEach(function(b){b.removeEventListener(a,Mb,!1)}),ic.controlsNext.forEach(function(b){b.removeEventListener(a,Nb,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){ec.hideAddressBar&&$b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),ic.wrapper.dispatchEvent(c)}function v(){if(jc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(ac+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(ac+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Sb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Sb,!1)})}function z(a){A(),ic.preview=document.createElement("div"),ic.preview.classList.add("preview-link-overlay"),ic.wrapper.appendChild(ic.preview),ic.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),ic.preview.querySelector("iframe").addEventListener("load",function(){ic.preview.classList.add("loaded")},!1),ic.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),ic.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){ic.preview.classList.add("visible")},1)}function A(){ic.preview&&(ic.preview.setAttribute("src",""),ic.preview.parentNode.removeChild(ic.preview),ic.preview=null)}function B(){if(ic.wrapper&&!r()){var a=ic.wrapper.offsetWidth,b=ic.wrapper.offsetHeight;a-=b*ec.margin,b-=b*ec.margin;var c=ec.width,d=ec.height,e=20;C(ec.width,ec.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),ic.slides.style.width=c+"px",ic.slides.style.height=d+"px",hc=Math.min(a/c,b/d),hc=Math.max(hc,ec.minScale),hc=Math.min(hc,ec.maxScale),"undefined"==typeof ic.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(ic.slides,"translate(-50%, -50%) scale("+hc+") translate(50%, 50%)"):ic.slides.style.zoom=hc;for(var f=l(document.querySelectorAll(ac)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=ec.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(ic.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(ec.overview){pb();var a=ic.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;ic.wrapper.classList.add("overview"),ic.wrapper.classList.remove("overview-deactivating"),clearTimeout(mc),clearTimeout(nc),mc=setTimeout(function(){for(var c=document.querySelectorAll(bc),d=0,e=c.length;e>d;d++){var f=c[d],g=ec.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Vb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Vb?Wb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Rb,!0)}else f.addEventListener("click",Rb,!0)}W(),B(),a||u("overviewshown",{indexh:Vb,indexv:Wb,currentSlide:Yb})},10)}}function G(){ec.overview&&(clearTimeout(mc),clearTimeout(nc),ic.wrapper.classList.remove("overview"),ic.wrapper.classList.add("overview-deactivating"),nc=setTimeout(function(){ic.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(ac)).forEach(function(a){o(a,""),a.removeEventListener("click",Rb,!0)}),R(Vb,Wb),ob(),u("overviewhidden",{indexh:Vb,indexv:Wb,currentSlide:Yb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return ic.wrapper.classList.contains("overview")}function J(a){return a=a?a:Yb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=ic.wrapper.classList.contains("paused");pb(),ic.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=ic.wrapper.classList.contains("paused");ic.wrapper.classList.remove("paused"),ob(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return ic.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?rb():qb():sc?rb():qb()}function Q(){return!(!pc||sc)}function R(a,b,c,d){Xb=Yb;var e=document.querySelectorAll(bc);void 0===b&&(b=E(e[a])),Xb&&Xb.parentNode&&Xb.parentNode.classList.contains("stack")&&D(Xb.parentNode,Wb);var f=gc.concat();gc.length=0;var g=Vb||0,h=Wb||0;Vb=V(bc,void 0===a?Vb:a),Wb=V(cc,void 0===b?Wb:b),W(),B();a:for(var i=0,j=gc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(bc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){kb(a.querySelectorAll(".fragment"))}),0===b.length&&kb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){ec.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=ec.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(gc=gc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(bc)),d=c.length;if(d){var e=I()?10:ec.viewDistance;$b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Vb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Vb?Math.abs(Wb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){if(ec.progress&&ic.progress){var a=l(document.querySelectorAll(bc)),b=document.querySelectorAll(ac+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Wb),ic.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();ic.controlsLeft.concat(ic.controlsRight).concat(ic.controlsUp).concat(ic.controlsDown).concat(ic.controlsPrev).concat(ic.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&ic.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&ic.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&ic.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&ic.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&ic.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&ic.controlsNext.forEach(function(a){a.classList.add("enabled")}),Yb&&(b.prev&&ic.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ic.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Yb)?(b.prev&&ic.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ic.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&ic.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ic.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=ec.rtl?"future":"past",d=ec.rtl?"past":"future";if(l(ic.background.childNodes).forEach(function(e,f){Vb>f?e.className="slide-background "+c:f>Vb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Vb)&&l(e.childNodes).forEach(function(a,c){Wb>c?a.className="slide-background past":c>Wb?a.className="slide-background future":(a.className="slide-background present",f===Vb&&(b=a))})}),b){var e=Zb?Zb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Zb&&ic.background.classList.add("no-transition"),Zb=b}setTimeout(function(){ic.background.classList.remove("no-transition")},1)}function _(){if(ec.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(bc),d=document.querySelectorAll(cc),e=ic.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=ic.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Vb,i=ic.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Wb:0;ic.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(bc),b=document.querySelectorAll(cc),c={left:Vb>0||ec.loop,right:Vb0,down:Wb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!eb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){return!!window.location.search.match(/receiver/gi)}function fb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Vb||0,Wb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Vb||g!==Wb)&&R(f,g)}}function gb(a){if(ec.history)if(clearTimeout(lc),"number"==typeof a)lc=setTimeout(gb,a);else{var b="/";Yb&&"string"==typeof Yb.getAttribute("id")?b="/"+Yb.getAttribute("id"):((Vb>0||Wb>0)&&(b+=Vb),Wb>0&&(b+="/"+Wb)),window.location.hash=b}}function hb(a){var b,c=Vb,d=Wb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(bc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Yb){var h=Yb.querySelectorAll(".fragment").length>0;if(h){var i=Yb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function ib(){var a=hb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function jb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function kb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function lb(a,b){if(Yb&&ec.fragments){var c=kb(Yb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=kb(Yb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),!(!e.length&&!f.length)}}return!1}function mb(){return lb(null,1)}function nb(){return lb(null,-1)}function ob(){if(pb(),Yb){var a=Yb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Yb.parentNode?Yb.parentNode.getAttribute("data-autoslide"):null,d=Yb.getAttribute("data-autoslide");pc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):ec.autoSlide,l(Yb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&pc&&1e3*a.duration>pc&&(pc=1e3*a.duration+1e3)}),!pc||sc||O()||I()||Reveal.isLastSlide()&&ec.loop!==!0||(qc=setTimeout(xb,pc),rc=Date.now()),_b&&_b.setPlaying(-1!==qc)}}function pb(){clearTimeout(qc),qc=-1}function qb(){sc=!0,u("autoslidepaused"),clearTimeout(qc),_b&&_b.setPlaying(!1)}function rb(){sc=!1,u("autoslideresumed"),ob()}function sb(){ec.rtl?(I()||mb()===!1)&&ab().left&&R(Vb+1):(I()||nb()===!1)&&ab().left&&R(Vb-1)}function tb(){ec.rtl?(I()||nb()===!1)&&ab().right&&R(Vb-1):(I()||mb()===!1)&&ab().right&&R(Vb+1)}function ub(){(I()||nb()===!1)&&ab().up&&R(Vb,Wb-1)}function vb(){(I()||mb()===!1)&&ab().down&&R(Vb,Wb+1)}function wb(){if(nb()===!1)if(ab().up)ub();else{var a=document.querySelector(bc+".past:nth-child("+Vb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Vb-1;R(c,b)}}}function xb(){mb()===!1&&(ab().down?vb():tb()),ob()}function yb(){ec.autoSlideStoppable&&qb()}function zb(a){var b=sc;yb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof ec.keyboard)for(var e in ec.keyboard)if(parseInt(e,10)===a.keyCode){var f=ec.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:wb();break;case 78:case 34:xb();break;case 72:case 37:sb();break;case 76:case 39:tb();break;case 75:case 38:ub();break;case 74:case 40:vb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?wb():xb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:ec.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!jc.transforms3d||(ic.preview?A():H(),a.preventDefault()),ob()}}function Ab(a){tc.startX=a.touches[0].clientX,tc.startY=a.touches[0].clientY,tc.startCount=a.touches.length,2===a.touches.length&&ec.overview&&(tc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY}))}function Bb(a){if(tc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{yb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===tc.startCount&&ec.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY});Math.abs(tc.startSpan-d)>tc.threshold&&(tc.captured=!0,dtc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,sb()):e<-tc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,tb()):f>tc.threshold?(tc.captured=!0,ub()):f<-tc.threshold&&(tc.captured=!0,vb()),ec.embedded?(tc.captured||J(Yb))&&a.preventDefault():a.preventDefault()}}}function Cb(){tc.captured=!1}function Db(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Ab(a))}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){if(Date.now()-kc>600){kc=Date.now();var b=a.detail||-a.wheelDelta;b>0?xb():wb()}}function Hb(a){yb(a),a.preventDefault();var b=l(document.querySelectorAll(bc)).length,c=Math.floor(a.clientX/ic.wrapper.offsetWidth*b);R(c)}function Ib(a){a.preventDefault(),yb(),sb()}function Jb(a){a.preventDefault(),yb(),tb()}function Kb(a){a.preventDefault(),yb(),ub()}function Lb(a){a.preventDefault(),yb(),vb()}function Mb(a){a.preventDefault(),yb(),wb()}function Nb(a){a.preventDefault(),yb(),xb()}function Ob(){fb()}function Pb(){B()}function Qb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Rb(a){if(oc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Sb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Tb(){Reveal.isLastSlide()&&ec.loop===!1?(R(0,0),rb()):sc?rb():qb()}function Ub(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Vb,Wb,Xb,Yb,Zb,$b,_b,ac=".reveal .slides section",bc=".reveal .slides>section",cc=".reveal .slides>section.present>section",dc=".reveal .slides>section:first-of-type",ec={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},fc=!1,gc=[],hc=1,ic={},jc={},kc=0,lc=0,mc=0,nc=0,oc=!1,pc=0,qc=0,rc=-1,sc=!1,tc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Ub.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Ub.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&jc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Ub.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() -},Ub.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Ub.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Ub.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:sb,right:tb,up:ub,down:vb,prev:wb,next:xb,navigateFragment:lb,prevFragment:nb,nextFragment:mb,navigateTo:R,navigateLeft:sb,navigateRight:tb,navigateUp:ub,navigateDown:vb,navigatePrev:wb,navigateNext:xb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:ib,setState:jb,getIndices:hb,getSlide:function(a,b){var c=document.querySelectorAll(bc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Xb},getCurrentSlide:function(){return Yb},getScale:function(){return hc},getConfig:function(){return ec},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(ac+".past")?!0:!1},isLastSlide:function(){return Yb?Yb.nextElementSibling?!1:J(Yb)&&Yb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return fc},addEventListener:function(a,b,c){"addEventListener"in window&&(ic.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(ic.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 55dceaaa0a6fa02f76384046ae1ba0d792d7f1ef Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 16 Feb 2014 17:12:05 +0100 Subject: update (c) year --- js/reveal.js | 2 +- js/reveal.min.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 98d802e..5cbb3ff 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3,7 +3,7 @@ * http://lab.hakim.se/reveal-js * MIT licensed * - * Copyright (C) 2013 Hakim El Hattab, http://hakim.se + * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ var Reveal = (function(){ diff --git a/js/reveal.min.js b/js/reveal.min.js index e7cec6f..a13bd48 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2013-12-02, 12:23) + * reveal.js 2.6.1 (2014-03-13, 09:22) * http://lab.hakim.se/reveal-js * MIT licensed * - * Copyright (C) 2013 Hakim El Hattab, http://hakim.se + * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ var Reveal=function(){"use strict";function a(a){if(b(),!ec.transforms2d&&!ec.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(_b,a),k(_b,d),r(),c()}function b(){ec.transforms3d="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,ec.transforms2d="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,ec.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ec.requestAnimationFrame="function"==typeof ec.requestAnimationFrameMethod,ec.canvas=!!document.createElement("canvas").getContext,Vb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=_b.dependencies.length;h>g;g++){var i=_b.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),Q(),h(),cb(),X(!0),setTimeout(function(){dc.slides.classList.remove("no-transition"),ac=!0,t("ready",{indexh:Qb,indexv:Rb,currentSlide:Tb})},1)}function e(){dc.theme=document.querySelector("#theme"),dc.wrapper=document.querySelector(".reveal"),dc.slides=document.querySelector(".reveal .slides"),dc.slides.classList.add("no-transition"),dc.background=f(dc.wrapper,"div","backgrounds",null),dc.progress=f(dc.wrapper,"div","progress",""),dc.progressbar=dc.progress.querySelector("span"),f(dc.wrapper,"aside","controls",''),dc.slideNumber=f(dc.wrapper,"div","slide-number",""),f(dc.wrapper,"div","state-background",null),f(dc.wrapper,"div","pause-overlay",null),dc.controls=document.querySelector(".reveal .controls"),dc.controlsLeft=l(document.querySelectorAll(".navigate-left")),dc.controlsRight=l(document.querySelectorAll(".navigate-right")),dc.controlsUp=l(document.querySelectorAll(".navigate-up")),dc.controlsDown=l(document.querySelectorAll(".navigate-down")),dc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),dc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),dc.background.innerHTML="",dc.background.classList.add("no-transition"),l(document.querySelectorAll(Yb)).forEach(function(b){var c;c=q()?a(b,b):a(b,dc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),_b.parallaxBackgroundImage?(dc.background.style.backgroundImage='url("'+_b.parallaxBackgroundImage+'")',dc.background.style.backgroundSize=_b.parallaxBackgroundSize,setTimeout(function(){dc.wrapper.classList.add("has-parallax-background")},1)):(dc.background.style.backgroundImage="",dc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Xb).length;if(dc.wrapper.classList.remove(_b.transition),"object"==typeof a&&k(_b,a),ec.transforms3d===!1&&(_b.transition="linear"),dc.wrapper.classList.add(_b.transition),dc.wrapper.setAttribute("data-transition-speed",_b.transitionSpeed),dc.wrapper.setAttribute("data-background-transition",_b.backgroundTransition),dc.controls.style.display=_b.controls?"block":"none",dc.progress.style.display=_b.progress?"block":"none",_b.rtl?dc.wrapper.classList.add("rtl"):dc.wrapper.classList.remove("rtl"),_b.center?dc.wrapper.classList.add("center"):dc.wrapper.classList.remove("center"),_b.mouseWheel?(document.addEventListener("DOMMouseScroll",Bb,!1),document.addEventListener("mousewheel",Bb,!1)):(document.removeEventListener("DOMMouseScroll",Bb,!1),document.removeEventListener("mousewheel",Bb,!1)),_b.rollingLinks?u():v(),_b.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&_b.autoSlide&&_b.autoSlideStoppable&&ec.canvas&&ec.requestAnimationFrame?(Wb=new Pb(dc.wrapper,function(){return Math.min(Math.max((Date.now()-mc)/kc,0),1)}),Wb.on("click",Ob),nc=!1):Wb&&(Wb.destroy(),Wb=null),_b.theme&&dc.theme){var c=dc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];_b.theme!==e&&(c=c.replace(d,_b.theme),dc.theme.setAttribute("href",c))}P()}function i(){if(jc=!0,window.addEventListener("hashchange",Jb,!1),window.addEventListener("resize",Kb,!1),_b.touch&&(dc.wrapper.addEventListener("touchstart",vb,!1),dc.wrapper.addEventListener("touchmove",wb,!1),dc.wrapper.addEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.addEventListener("MSPointerDown",yb,!1),dc.wrapper.addEventListener("MSPointerMove",zb,!1),dc.wrapper.addEventListener("MSPointerUp",Ab,!1))),_b.keyboard&&document.addEventListener("keydown",ub,!1),_b.progress&&dc.progress&&dc.progress.addEventListener("click",Cb,!1),_b.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Lb,!1)}["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.addEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.addEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.addEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.addEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.addEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.addEventListener(a,Ib,!1)})})}function j(){jc=!1,document.removeEventListener("keydown",ub,!1),window.removeEventListener("hashchange",Jb,!1),window.removeEventListener("resize",Kb,!1),dc.wrapper.removeEventListener("touchstart",vb,!1),dc.wrapper.removeEventListener("touchmove",wb,!1),dc.wrapper.removeEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.removeEventListener("MSPointerDown",yb,!1),dc.wrapper.removeEventListener("MSPointerMove",zb,!1),dc.wrapper.removeEventListener("MSPointerUp",Ab,!1)),_b.progress&&dc.progress&&dc.progress.removeEventListener("click",Cb,!1),["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.removeEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.removeEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.removeEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.removeEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.removeEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.removeEventListener(a,Ib,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){_b.hideAddressBar&&Vb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),dc.wrapper.dispatchEvent(c)}function u(){if(ec.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Xb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Xb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Nb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Nb,!1)})}function y(a){z(),dc.preview=document.createElement("div"),dc.preview.classList.add("preview-link-overlay"),dc.wrapper.appendChild(dc.preview),dc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),dc.preview.querySelector("iframe").addEventListener("load",function(){dc.preview.classList.add("loaded")},!1),dc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),dc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){dc.preview.classList.add("visible")},1)}function z(){dc.preview&&(dc.preview.setAttribute("src",""),dc.preview.parentNode.removeChild(dc.preview),dc.preview=null)}function A(){if(dc.wrapper&&!q()){var a=dc.wrapper.offsetWidth,b=dc.wrapper.offsetHeight;a-=b*_b.margin,b-=b*_b.margin;var c=_b.width,d=_b.height,e=20;B(_b.width,_b.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),dc.slides.style.width=c+"px",dc.slides.style.height=d+"px",cc=Math.min(a/c,b/d),cc=Math.max(cc,_b.minScale),cc=Math.min(cc,_b.maxScale),"undefined"==typeof dc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(dc.slides,"translate(-50%, -50%) scale("+cc+") translate(50%, 50%)"):dc.slides.style.zoom=cc;for(var f=l(document.querySelectorAll(Xb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=_b.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}U(),Y()}}function B(a,b,c){l(dc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(_b.overview){kb();var a=dc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;dc.wrapper.classList.add("overview"),dc.wrapper.classList.remove("overview-deactivating"),clearTimeout(hc),clearTimeout(ic),hc=setTimeout(function(){for(var c=document.querySelectorAll(Yb),d=0,e=c.length;e>d;d++){var f=c[d],g=_b.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Qb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Qb?Rb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Mb,!0)}else f.addEventListener("click",Mb,!0)}T(),A(),a||t("overviewshown",{indexh:Qb,indexv:Rb,currentSlide:Tb})},10)}}function F(){_b.overview&&(clearTimeout(hc),clearTimeout(ic),dc.wrapper.classList.remove("overview"),dc.wrapper.classList.add("overview-deactivating"),ic=setTimeout(function(){dc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Xb)).forEach(function(a){n(a,""),a.removeEventListener("click",Mb,!0)}),O(Qb,Rb),jb(),t("overviewhidden",{indexh:Qb,indexv:Rb,currentSlide:Tb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return dc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Tb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=dc.wrapper.classList.contains("paused");kb(),dc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=dc.wrapper.classList.contains("paused");dc.wrapper.classList.remove("paused"),jb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return dc.wrapper.classList.contains("paused")}function O(a,b,c,d){Sb=Tb;var e=document.querySelectorAll(Yb);void 0===b&&(b=D(e[a])),Sb&&Sb.parentNode&&Sb.parentNode.classList.contains("stack")&&C(Sb.parentNode,Rb);var f=bc.concat();bc.length=0;var g=Qb||0,h=Rb||0;Qb=S(Yb,void 0===a?Qb:a),Rb=S(Zb,void 0===b?Rb:b),T(),A();a:for(var i=0,j=bc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function R(){var a=l(document.querySelectorAll(Yb));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){fb(a.querySelectorAll(".fragment"))}),0===b.length&&fb(a.querySelectorAll(".fragment"))})}function S(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){_b.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=_b.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(bc=bc.concat(m.split(" ")))}else b=0;return b}function T(){var a,b,c=l(document.querySelectorAll(Yb)),d=c.length;if(d){var e=H()?10:_b.viewDistance;Vb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Qb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Qb?Math.abs(Rb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function U(){if(_b.progress&&dc.progress){var a=l(document.querySelectorAll(Yb)),b=document.querySelectorAll(Xb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Rb),dc.slideNumber.innerHTML=a}}function W(){var a=Z(),b=$();dc.controlsLeft.concat(dc.controlsRight).concat(dc.controlsUp).concat(dc.controlsDown).concat(dc.controlsPrev).concat(dc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&dc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&dc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&dc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&dc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&dc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&dc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Tb&&(b.prev&&dc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Tb)?(b.prev&&dc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&dc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function X(a){var b=null,c=_b.rtl?"future":"past",d=_b.rtl?"past":"future";if(l(dc.background.childNodes).forEach(function(e,f){Qb>f?e.className="slide-background "+c:f>Qb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Qb)&&l(e.childNodes).forEach(function(a,c){Rb>c?a.className="slide-background past":c>Rb?a.className="slide-background future":(a.className="slide-background present",f===Qb&&(b=a))})}),b){var e=Ub?Ub.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Ub&&dc.background.classList.add("no-transition"),Ub=b}setTimeout(function(){dc.background.classList.remove("no-transition")},1)}function Y(){if(_b.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Yb),d=document.querySelectorAll(Zb),e=dc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=dc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Qb,i=dc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Rb:0;dc.background.style.backgroundPosition=h+"px "+k+"px"}}function Z(){var a=document.querySelectorAll(Yb),b=document.querySelectorAll(Zb),c={left:Qb>0||_b.loop,right:Qb0,down:Rb0,next:!!b.length}}return{prev:!1,next:!1}}function _(a){a&&!bb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function ab(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function bb(){return!!window.location.search.match(/receiver/gi)}function cb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);O(e.h,e.v)}else O(Qb||0,Rb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Qb||g!==Rb)&&O(f,g)}}function db(a){if(_b.history)if(clearTimeout(gc),"number"==typeof a)gc=setTimeout(db,a);else{var b="/";Tb&&"string"==typeof Tb.getAttribute("id")?b="/"+Tb.getAttribute("id"):((Qb>0||Rb>0)&&(b+=Qb),Rb>0&&(b+="/"+Rb)),window.location.hash=b}}function eb(a){var b,c=Qb,d=Rb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(Yb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Tb){var h=Tb.querySelectorAll(".fragment").length>0;if(h){var i=Tb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function fb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function gb(a,b){if(Tb&&_b.fragments){var c=fb(Tb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=fb(Tb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),W(),!(!e.length&&!f.length)}}return!1}function hb(){return gb(null,1)}function ib(){return gb(null,-1)}function jb(){if(kb(),Tb){var a=Tb.parentNode?Tb.parentNode.getAttribute("data-autoslide"):null,b=Tb.getAttribute("data-autoslide");kc=b?parseInt(b,10):a?parseInt(a,10):_b.autoSlide,l(Tb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&kc&&1e3*a.duration>kc&&(kc=1e3*a.duration+1e3)}),!kc||nc||N()||H()||Reveal.isLastSlide()&&_b.loop!==!0||(lc=setTimeout(sb,kc),mc=Date.now()),Wb&&Wb.setPlaying(-1!==lc)}}function kb(){clearTimeout(lc),lc=-1}function lb(){nc=!0,clearTimeout(lc),Wb&&Wb.setPlaying(!1)}function mb(){nc=!1,jb()}function nb(){_b.rtl?(H()||hb()===!1)&&Z().left&&O(Qb+1):(H()||ib()===!1)&&Z().left&&O(Qb-1)}function ob(){_b.rtl?(H()||ib()===!1)&&Z().right&&O(Qb-1):(H()||hb()===!1)&&Z().right&&O(Qb+1)}function pb(){(H()||ib()===!1)&&Z().up&&O(Qb,Rb-1)}function qb(){(H()||hb()===!1)&&Z().down&&O(Qb,Rb+1)}function rb(){if(ib()===!1)if(Z().up)pb();else{var a=document.querySelector(Yb+".past:nth-child("+Qb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Qb-1;O(c,b)}}}function sb(){hb()===!1&&(Z().down?qb():ob()),jb()}function tb(){_b.autoSlideStoppable&&lb()}function ub(a){tb(a),document.activeElement;var b=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof _b.keyboard)for(var d in _b.keyboard)if(parseInt(d,10)===a.keyCode){var e=_b.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:rb();break;case 78:case 34:sb();break;case 72:case 37:nb();break;case 76:case 39:ob();break;case 75:case 38:pb();break;case 74:case 40:qb();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?rb():sb();break;case 13:H()?F():c=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ec.transforms3d||(dc.preview?z():G(),a.preventDefault()),jb()}}function vb(a){oc.startX=a.touches[0].clientX,oc.startY=a.touches[0].clientY,oc.startCount=a.touches.length,2===a.touches.length&&_b.overview&&(oc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY}))}function wb(a){if(oc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{tb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===oc.startCount&&_b.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY});Math.abs(oc.startSpan-d)>oc.threshold&&(oc.captured=!0,doc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,nb()):e<-oc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,ob()):f>oc.threshold?(oc.captured=!0,pb()):f<-oc.threshold&&(oc.captured=!0,qb()),_b.embedded?(oc.captured||I(Tb))&&a.preventDefault():a.preventDefault()}}}function xb(){oc.captured=!1}function yb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],vb(a))}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){if(Date.now()-fc>600){fc=Date.now();var b=a.detail||-a.wheelDelta;b>0?sb():rb()}}function Cb(a){tb(a),a.preventDefault();var b=l(document.querySelectorAll(Yb)).length,c=Math.floor(a.clientX/dc.wrapper.offsetWidth*b);O(c)}function Db(a){a.preventDefault(),tb(),nb()}function Eb(a){a.preventDefault(),tb(),ob()}function Fb(a){a.preventDefault(),tb(),pb()}function Gb(a){a.preventDefault(),tb(),qb()}function Hb(a){a.preventDefault(),tb(),rb()}function Ib(a){a.preventDefault(),tb(),sb()}function Jb(){cb()}function Kb(){A()}function Lb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Mb(a){if(jc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);O(c,d)}}}function Nb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Ob(){Reveal.isLastSlide()&&_b.loop===!1?(O(0,0),mb()):nc?mb():lb()}function Pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb=".reveal .slides section",Yb=".reveal .slides>section",Zb=".reveal .slides>section.present>section",$b=".reveal .slides>section:first-of-type",_b={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ac=!1,bc=[],cc=1,dc={},ec={},fc=0,gc=0,hc=0,ic=0,jc=!1,kc=0,lc=0,mc=-1,nc=!1,oc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ec.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:P,slide:O,left:nb,right:ob,up:pb,down:qb,prev:rb,next:sb,navigateFragment:gb,prevFragment:ib,nextFragment:hb,navigateTo:O,navigateLeft:nb,navigateRight:ob,navigateUp:pb,navigateDown:qb,navigatePrev:rb,navigateNext:sb,layout:A,availableRoutes:Z,availableFragments:$,toggleOverview:G,togglePause:M,isOverview:H,isPaused:N,addEventListeners:i,removeEventListeners:j,getIndices:eb,getSlide:function(a,b){var c=document.querySelectorAll(Yb)[a],d=c&&c.querySelectorAll("section"); return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Sb},getCurrentSlide:function(){return Tb},getScale:function(){return cc},getConfig:function(){return _b},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Xb+".past")?!0:!1},isLastSlide:function(){return Tb?Tb.nextElementSibling?!1:I(Tb)&&Tb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ac},addEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 0140fd9ee6e8d0f193ab594d1df4a9f923c8a0df Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 13 Mar 2014 10:32:57 +0100 Subject: include fragments in progress bar calculation --- js/reveal.js | 20 ++++++++++++++++++++ js/reveal.min.js | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index b2869c0..f6edd45 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2215,6 +2215,25 @@ var Reveal = (function(){ } + if( currentSlide ) { + + var allFragments = currentSlide.querySelectorAll( '.fragment' ); + + // If there are fragments in the current slide those should be + // accounted for in the progress. + if( allFragments.length > 0 ) { + var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' ); + + // This value represents how big a portion of the slide progress + // that is made up by its fragments (0-1) + var fragmentWeight = 0.9; + + // Add fragment progress to the past slide count + pastCount += ( visibleFragments.length / allFragments.length ) * fragmentWeight; + } + + } + return pastCount / ( totalCount - 1 ); } @@ -2519,6 +2538,7 @@ var Reveal = (function(){ } updateControls(); + updateProgress(); return !!( fragmentsShown.length || fragmentsHidden.length ); diff --git a/js/reveal.min.js b/js/reveal.min.js index 0fcdf33..f5838e1 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-12, 22:25) + * reveal.js 2.7.0-dev (2014-03-13, 10:31) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Wb||0,Xb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Wb||g!==Xb)&&R(f,g)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/";Zb&&"string"==typeof Zb.getAttribute("id")?b="/"+Zb.getAttribute("id"):((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 1a7732c235df0076dd77bc396266e7c94c024040 Mon Sep 17 00:00:00 2001 From: Daniel Moore Date: Thu, 13 Mar 2014 18:22:30 -0500 Subject: More robost calculation of .stretch height --- js/reveal.js | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index f6edd45..c5bd3ae 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -836,40 +836,26 @@ var Reveal = (function(){ /** * Returns the remaining height within the parent of the - * target element after subtracting the height of all - * siblings. + * target element. * - * remaining height = [parent height] - [ siblings height] + * remaining height = [ configured parent height ] - [ current parent height ] */ function getRemainingHeight( element, height ) { height = height || 0; if( element ) { - var parent = element.parentNode; - var siblings = parent.childNodes; + var newHeight, oldHeight = element.style.height; - // Subtract the height of each sibling - toArray( siblings ).forEach( function( sibling ) { + // Change the .stretch element height to 0 in order find the height of all + // the other elements + element.style.height = '0px'; + newHeight = height - element.parentNode.offsetHeight; - if( typeof sibling.offsetHeight === 'number' && sibling !== element ) { - - var styles = window.getComputedStyle( sibling ), - marginTop = parseInt( styles.marginTop, 10 ), - marginBottom = parseInt( styles.marginBottom, 10 ); - - height -= sibling.offsetHeight + marginTop + marginBottom; - - } - - } ); - - var elementStyles = window.getComputedStyle( element ); - - // Subtract the margins of the target element - height -= parseInt( elementStyles.marginTop, 10 ) + - parseInt( elementStyles.marginBottom, 10 ); + // Restore the old height, just in case + element.style.height = oldHeight + 'px'; + return newHeight; } return height; @@ -1149,7 +1135,7 @@ var Reveal = (function(){ toArray( dom.slides.querySelectorAll( 'section > .stretch' ) ).forEach( function( element ) { // Determine how much vertical space we can use - var remainingHeight = getRemainingHeight( element, ( height - ( padding * 2 ) ) ); + var remainingHeight = getRemainingHeight( element, height ); // Consider the aspect ratio of media elements if( /(img|video)/gi.test( element.nodeName ) ) { -- cgit v1.2.3 From 6936c5029ea99f59dba423a6bc2e295e1ee505e4 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 25 Mar 2014 13:59:48 +0100 Subject: correct ms fullscreen api method name #843 --- js/reveal.js | 2 +- js/reveal.min.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index f6edd45..58fecf9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1402,7 +1402,7 @@ var Reveal = (function(){ element.webkitRequestFullscreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || - element.msRequestFullScreen; + element.msRequestFullscreen; if( requestMethod ) { requestMethod.apply( element ); diff --git a/js/reveal.min.js b/js/reveal.min.js index f5838e1..10a57ed 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-13, 10:31) + * reveal.js 2.7.0-dev (2014-03-25, 13:59) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Wb||0,Xb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Wb||g!==Xb)&&R(f,g)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/";Zb&&"string"==typeof Zb.getAttribute("id")?b="/"+Zb.getAttribute("id"):((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Wb||0,Xb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Wb||g!==Xb)&&R(f,g)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/";Zb&&"string"==typeof Zb.getAttribute("id")?b="/"+Zb.getAttribute("id"):((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 3d7c21256cee8dc96ce43b08c3776b277b93f0ba Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 25 Mar 2014 14:28:22 +0100 Subject: fix 'fragments' config option (#849) --- js/reveal.js | 36 ++++++++++++++++++++++++------------ js/reveal.min.js | 6 +++--- 2 files changed, 27 insertions(+), 15 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 58fecf9..8dc2e63 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -607,6 +607,14 @@ var Reveal = (function(){ autoSlidePaused = false; } + // When fragments are turned off they should be visible + if( config.fragments === false ) { + toArray( dom.slides.querySelectorAll( '.fragment' ) ).forEach( function( element ) { + element.classList.add( 'visible' ); + element.classList.remove( 'current-fragment' ); + } ); + } + // Load the theme in the config, if it's not already loaded if( config.theme && dom.theme ) { var themeURL = dom.theme.getAttribute( 'href' ); @@ -1768,26 +1776,30 @@ var Reveal = (function(){ // Any element previous to index is given the 'past' class element.classList.add( reverse ? 'future' : 'past' ); - var pastFragments = toArray( element.querySelectorAll( '.fragment' ) ); + if( config.fragments ) { + var pastFragments = toArray( element.querySelectorAll( '.fragment' ) ); - // Show all fragments on prior slides - while( pastFragments.length ) { - var pastFragment = pastFragments.pop(); - pastFragment.classList.add( 'visible' ); - pastFragment.classList.remove( 'current-fragment' ); + // Show all fragments on prior slides + while( pastFragments.length ) { + var pastFragment = pastFragments.pop(); + pastFragment.classList.add( 'visible' ); + pastFragment.classList.remove( 'current-fragment' ); + } } } else if( i > index ) { // Any element subsequent to index is given the 'future' class element.classList.add( reverse ? 'past' : 'future' ); - var futureFragments = toArray( element.querySelectorAll( '.fragment.visible' ) ); + if( config.fragments ) { + var futureFragments = toArray( element.querySelectorAll( '.fragment.visible' ) ); - // No fragments in future slides should be visible ahead of time - while( futureFragments.length ) { - var futureFragment = futureFragments.pop(); - futureFragment.classList.remove( 'visible' ); - futureFragment.classList.remove( 'current-fragment' ); + // No fragments in future slides should be visible ahead of time + while( futureFragments.length ) { + var futureFragment = futureFragments.pop(); + futureFragment.classList.remove( 'visible' ); + futureFragment.classList.remove( 'current-fragment' ); + } } } diff --git a/js/reveal.min.js b/js/reveal.min.js index 10a57ed..d6b6308 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-25, 13:59) + * reveal.js 2.7.0-dev (2014-03-25, 14:27) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Wb||0,Xb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Wb||g!==Xb)&&R(f,g)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/";Zb&&"string"==typeof Zb.getAttribute("id")?b="/"+Zb.getAttribute("id"):((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() -},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.fragments===!1&&l(jc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),fc.fragments)for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),fc.fragments))for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Wb||0,Xb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Wb||g!==Xb)&&R(f,g)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/";Zb&&"string"==typeof Zb.getAttribute("id")?b="/"+Zb.getAttribute("id"):((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI; +this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From da82c8ce81a5acc8b14002a5818a32ce0c89f7b8 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 25 Mar 2014 15:12:10 +0100 Subject: limit named links to [a-zA-Z0-9\-\_\:\.] #836 --- js/reveal.js | 23 +++++++++++++++++++---- js/reveal.min.js | 6 +++--- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 8dc2e63..cfdbc2f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2274,8 +2274,16 @@ var Reveal = (function(){ // If the first bit is invalid and there is a name we can // assume that this is a named link if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) { - // Find the slide with the specified name - var element = document.querySelector( '#' + name ); + var element; + + try { + // Find the slide with the specified name + element = document.querySelector( '#' + name ); + } + catch( e ) { + // If the ID is an invalid selector a harmless SyntaxError + // may be thrown here. + } if( element ) { // Find the position of the named slide and navigate to it @@ -2320,9 +2328,16 @@ var Reveal = (function(){ else { var url = '/'; + // Attempt to create a named link based on the slide's ID + var id = currentSlide.getAttribute( 'id' ); + if( id ) { + id = id.toLowerCase(); + id = id.replace( /[^a-zA-Z0-9\-\_\:\.]/g, '' ); + } + // If the current slide has an ID, use that as a named link - if( currentSlide && typeof currentSlide.getAttribute( 'id' ) === 'string' ) { - url = '/' + currentSlide.getAttribute( 'id' ); + if( currentSlide && typeof id === 'string' && id.length ) { + url = '/' + id; } // Otherwise use the /h/v index else { diff --git a/js/reveal.min.js b/js/reveal.min.js index d6b6308..3d94658 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-25, 14:27) + * reveal.js 2.7.0-dev (2014-03-25, 15:10) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.fragments===!1&&l(jc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),fc.fragments)for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),fc.fragments))for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);R(e.h,e.v)}else R(Wb||0,Xb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Wb||g!==Xb)&&R(f,g)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/";Zb&&"string"==typeof Zb.getAttribute("id")?b="/"+Zb.getAttribute("id"):((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI; -this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.fragments===!1&&l(jc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),fc.fragments)for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),fc.fragments))for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);R(f.h,f.v)}else R(Wb||0,Xb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Wb||h!==Xb)&&R(g,h)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/",c=Zb.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),Zb&&"string"==typeof c&&c.length?b="/"+c:((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14; +this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From a9c2d4d6635462e40d6446d1be465ae0c2fdbd7f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 25 Mar 2014 17:46:10 +0100 Subject: disable transition into and out of overview mode #829 --- js/reveal.js | 89 ++++++++++++++++++++++---------------------------------- js/reveal.min.js | 6 ++-- 2 files changed, 38 insertions(+), 57 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index cfdbc2f..7e77079 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -151,12 +151,6 @@ var Reveal = (function(){ // Delays updates to the URL due to a Chrome thumbnailer bug writeURLTimeout = 0, - // A delay used to activate the overview mode - activateOverviewTimeout = 0, - - // A delay used to deactivate the overview mode - deactivateOverviewTimeout = 0, - // Flags if the interaction event listeners are bound eventsAreBound = false, @@ -1238,67 +1232,57 @@ var Reveal = (function(){ dom.wrapper.classList.add( 'overview' ); dom.wrapper.classList.remove( 'overview-deactivating' ); - clearTimeout( activateOverviewTimeout ); - clearTimeout( deactivateOverviewTimeout ); - - // Not the pretties solution, but need to let the overview - // class apply first so that slides are measured accurately - // before we can position them - activateOverviewTimeout = setTimeout( function() { - - var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); - - for( var i = 0, len1 = horizontalSlides.length; i < len1; i++ ) { - var hslide = horizontalSlides[i], - hoffset = config.rtl ? -105 : 105; + var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); - hslide.setAttribute( 'data-index-h', i ); + for( var i = 0, len1 = horizontalSlides.length; i < len1; i++ ) { + var hslide = horizontalSlides[i], + hoffset = config.rtl ? -105 : 105; - // Apply CSS transform - transformElement( hslide, 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)' ); + hslide.setAttribute( 'data-index-h', i ); - if( hslide.classList.contains( 'stack' ) ) { + // Apply CSS transform + transformElement( hslide, 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)' ); - var verticalSlides = hslide.querySelectorAll( 'section' ); + if( hslide.classList.contains( 'stack' ) ) { - for( var j = 0, len2 = verticalSlides.length; j < len2; j++ ) { - var verticalIndex = i === indexh ? indexv : getPreviousVerticalIndex( hslide ); + var verticalSlides = hslide.querySelectorAll( 'section' ); - var vslide = verticalSlides[j]; + for( var j = 0, len2 = verticalSlides.length; j < len2; j++ ) { + var verticalIndex = i === indexh ? indexv : getPreviousVerticalIndex( hslide ); - vslide.setAttribute( 'data-index-h', i ); - vslide.setAttribute( 'data-index-v', j ); + var vslide = verticalSlides[j]; - // Apply CSS transform - transformElement( vslide, 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)' ); + vslide.setAttribute( 'data-index-h', i ); + vslide.setAttribute( 'data-index-v', j ); - // Navigate to this slide on click - vslide.addEventListener( 'click', onOverviewSlideClicked, true ); - } - - } - else { + // Apply CSS transform + transformElement( vslide, 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)' ); // Navigate to this slide on click - hslide.addEventListener( 'click', onOverviewSlideClicked, true ); - + vslide.addEventListener( 'click', onOverviewSlideClicked, true ); } - } - updateSlidesVisibility(); + } + else { - layout(); + // Navigate to this slide on click + hslide.addEventListener( 'click', onOverviewSlideClicked, true ); - if( !wasActive ) { - // Notify observers of the overview showing - dispatchEvent( 'overviewshown', { - 'indexh': indexh, - 'indexv': indexv, - 'currentSlide': currentSlide - } ); } + } + + updateSlidesVisibility(); - }, 10 ); + layout(); + + if( !wasActive ) { + // Notify observers of the overview showing + dispatchEvent( 'overviewshown', { + 'indexh': indexh, + 'indexv': indexv, + 'currentSlide': currentSlide + } ); + } } @@ -1313,9 +1297,6 @@ var Reveal = (function(){ // Only proceed if enabled in config if( config.overview ) { - clearTimeout( activateOverviewTimeout ); - clearTimeout( deactivateOverviewTimeout ); - dom.wrapper.classList.remove( 'overview' ); // Temporarily add a class so that transitions can do different things @@ -1323,7 +1304,7 @@ var Reveal = (function(){ // moving from slide to slide dom.wrapper.classList.add( 'overview-deactivating' ); - deactivateOverviewTimeout = setTimeout( function () { + setTimeout( function () { dom.wrapper.classList.remove( 'overview-deactivating' ); }, 1 ); diff --git a/js/reveal.min.js b/js/reveal.min.js index 3d94658..ae762ab 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-25, 15:10) + * reveal.js 2.7.0-dev (2014-03-25, 17:44) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),ac.on("click",Ub),tc=!1),fc.fragments===!1&&l(jc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(pc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){pc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating"),clearTimeout(nc),clearTimeout(oc),nc=setTimeout(function(){for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})},10)}}function G(){fc.overview&&(clearTimeout(nc),clearTimeout(oc),jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),oc=setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():tc?sb():rb()}function Q(){return!(!qc||tc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),fc.fragments)for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),fc.fragments))for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);R(f.h,f.v)}else R(Wb||0,Xb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Wb||h!==Xb)&&R(g,h)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/",c=Zb.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),Zb&&"string"==typeof c&&c.length?b="/"+c:((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(rc=setTimeout(yb,qc),sc=Date.now()),ac&&ac.setPlaying(-1!==rc)}}function qb(){clearTimeout(rc),rc=-1}function rb(){tc=!0,u("autoslidepaused"),clearTimeout(rc),ac&&ac.setPlaying(!1)}function sb(){tc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=tc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(uc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Cb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,tb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,ub()):f>uc.threshold?(uc.captured=!0,vb()):f<-uc.threshold&&(uc.captured=!0,wb()),fc.embedded?(uc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){uc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(pc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):tc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14; -this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-qc)/oc,0),1)}),ac.on("click",Ub),rc=!1),fc.fragments===!1&&l(jc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(nc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){nc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b,c){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})}}function G(){fc.overview&&(jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():rc?sb():rb()}function Q(){return!(!oc||rc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),fc.fragments)for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),fc.fragments))for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);R(f.h,f.v)}else R(Wb||0,Xb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Wb||h!==Xb)&&R(g,h)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/",c=Zb.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),Zb&&"string"==typeof c&&c.length?b="/"+c:((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");oc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&oc&&1e3*a.duration>oc&&(oc=1e3*a.duration+1e3)}),!oc||rc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(pc=setTimeout(yb,oc),qc=Date.now()),ac&&ac.setPlaying(-1!==pc)}}function qb(){clearTimeout(pc),pc=-1}function rb(){rc=!0,u("autoslidepaused"),clearTimeout(pc),ac&&ac.setPlaying(!1)}function sb(){rc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=rc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){sc.startX=a.touches[0].clientX,sc.startY=a.touches[0].clientY,sc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(sc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY}))}function Cb(a){if(sc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===sc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY});Math.abs(sc.startSpan-d)>sc.threshold&&(sc.captured=!0,dsc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,tb()):e<-sc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,ub()):f>sc.threshold?(sc.captured=!0,vb()):f<-sc.threshold&&(sc.captured=!0,wb()),fc.embedded?(sc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){sc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(nc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):rc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=!1,oc=0,pc=0,qc=-1,rc=!1,sc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI; +this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From ccbeaf4c32a70cfd89c5af5c8c65b0b90f0c9252 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 26 Mar 2014 15:20:12 +0100 Subject: optimization, only declare background creation method once --- js/reveal.js | 103 +++++++++++++++++++++++++++++-------------------------- js/reveal.min.js | 6 ++-- 2 files changed, 57 insertions(+), 52 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ffcb489..40d26df 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -425,71 +425,26 @@ var Reveal = (function(){ dom.background.innerHTML = ''; dom.background.classList.add( 'no-transition' ); - // Helper method for creating a background element for the - // given slide - function _createBackground( slide, container ) { - - var data = { - background: slide.getAttribute( 'data-background' ), - backgroundSize: slide.getAttribute( 'data-background-size' ), - backgroundImage: slide.getAttribute( 'data-background-image' ), - backgroundColor: slide.getAttribute( 'data-background-color' ), - backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), - backgroundPosition: slide.getAttribute( 'data-background-position' ), - backgroundTransition: slide.getAttribute( 'data-background-transition' ) - }; - - var element = document.createElement( 'div' ); - element.className = 'slide-background'; - - if( data.background ) { - // Auto-wrap image urls in url(...) - if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) { - element.style.backgroundImage = 'url('+ data.background +')'; - } - else { - element.style.background = data.background; - } - } - - if( data.background || data.backgroundColor || data.backgroundImage ) { - element.setAttribute( 'data-background-hash', data.background + data.backgroundSize + data.backgroundImage + data.backgroundColor + data.backgroundRepeat + data.backgroundPosition + data.backgroundTransition ); - } - - // Additional and optional background properties - if( data.backgroundSize ) element.style.backgroundSize = data.backgroundSize; - if( data.backgroundImage ) element.style.backgroundImage = 'url("' + data.backgroundImage + '")'; - if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor; - if( data.backgroundRepeat ) element.style.backgroundRepeat = data.backgroundRepeat; - if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; - if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); - - container.appendChild( element ); - - return element; - - } - // Iterate over all horizontal slides toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( slideh ) { var backgroundStack; if( isPrintingPDF() ) { - backgroundStack = _createBackground( slideh, slideh ); + backgroundStack = createBackground( slideh, slideh ); } else { - backgroundStack = _createBackground( slideh, dom.background ); + backgroundStack = createBackground( slideh, dom.background ); } // Iterate over all vertical slides toArray( slideh.querySelectorAll( 'section' ) ).forEach( function( slidev ) { if( isPrintingPDF() ) { - _createBackground( slidev, slidev ); + createBackground( slidev, slidev ); } else { - _createBackground( slidev, backgroundStack ); + createBackground( slidev, backgroundStack ); } } ); @@ -520,6 +475,56 @@ var Reveal = (function(){ } + /** + * Creates a background for the given slide. + * + * @param {HTMLElement} slide + * @param {HTMLElement} container The element that the background + * should be appended to + */ + function createBackground( slide, container ) { + + var data = { + background: slide.getAttribute( 'data-background' ), + backgroundSize: slide.getAttribute( 'data-background-size' ), + backgroundImage: slide.getAttribute( 'data-background-image' ), + backgroundColor: slide.getAttribute( 'data-background-color' ), + backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), + backgroundPosition: slide.getAttribute( 'data-background-position' ), + backgroundTransition: slide.getAttribute( 'data-background-transition' ) + }; + + var element = document.createElement( 'div' ); + element.className = 'slide-background'; + + if( data.background ) { + // Auto-wrap image urls in url(...) + if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) { + element.style.backgroundImage = 'url('+ data.background +')'; + } + else { + element.style.background = data.background; + } + } + + if( data.background || data.backgroundColor || data.backgroundImage ) { + element.setAttribute( 'data-background-hash', data.background + data.backgroundSize + data.backgroundImage + data.backgroundColor + data.backgroundRepeat + data.backgroundPosition + data.backgroundTransition ); + } + + // Additional and optional background properties + if( data.backgroundSize ) element.style.backgroundSize = data.backgroundSize; + if( data.backgroundImage ) element.style.backgroundImage = 'url("' + data.backgroundImage + '")'; + if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor; + if( data.backgroundRepeat ) element.style.backgroundRepeat = data.backgroundRepeat; + if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; + if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); + + container.appendChild( element ); + + return element; + + } + /** * Applies the configuration settings from the config * object. May be called multiple times. diff --git a/js/reveal.min.js b/js/reveal.min.js index ba9ab6d..549d755 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-25, 21:37) + * reveal.js 2.7.0-dev (2014-03-26, 15:19) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!kc.transforms2d&&!kc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(fc,a),k(fc,d),s(),c()}function b(){kc.transforms3d="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,kc.transforms2d="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,kc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,kc.requestAnimationFrame="function"==typeof kc.requestAnimationFrameMethod,kc.canvas=!!document.createElement("canvas").getContext,_b=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=fc.dependencies.length;h>g;g++){var i=fc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),T(),h(),gb(),$(!0),setTimeout(function(){jc.slides.classList.remove("no-transition"),gc=!0,u("ready",{indexh:Wb,indexv:Xb,currentSlide:Zb})},1)}function e(){jc.theme=document.querySelector("#theme"),jc.wrapper=document.querySelector(".reveal"),jc.slides=document.querySelector(".reveal .slides"),jc.slides.classList.add("no-transition"),jc.background=f(jc.wrapper,"div","backgrounds",null),jc.progress=f(jc.wrapper,"div","progress",""),jc.progressbar=jc.progress.querySelector("span"),f(jc.wrapper,"aside","controls",''),jc.slideNumber=f(jc.wrapper,"div","slide-number",""),f(jc.wrapper,"div","state-background",null),f(jc.wrapper,"div","pause-overlay",null),jc.controls=document.querySelector(".reveal .controls"),jc.controlsLeft=l(document.querySelectorAll(".navigate-left")),jc.controlsRight=l(document.querySelectorAll(".navigate-right")),jc.controlsUp=l(document.querySelectorAll(".navigate-up")),jc.controlsDown=l(document.querySelectorAll(".navigate-down")),jc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),jc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),jc.background.innerHTML="",jc.background.classList.add("no-transition"),l(document.querySelectorAll(cc)).forEach(function(b){var c;c=r()?a(b,b):a(b,jc.background),l(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),fc.parallaxBackgroundImage?(jc.background.style.backgroundImage='url("'+fc.parallaxBackgroundImage+'")',jc.background.style.backgroundSize=fc.parallaxBackgroundSize,setTimeout(function(){jc.wrapper.classList.add("has-parallax-background")},1)):(jc.background.style.backgroundImage="",jc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(bc).length;if(jc.wrapper.classList.remove(fc.transition),"object"==typeof a&&k(fc,a),kc.transforms3d===!1&&(fc.transition="linear"),jc.wrapper.classList.add(fc.transition),jc.wrapper.setAttribute("data-transition-speed",fc.transitionSpeed),jc.wrapper.setAttribute("data-background-transition",fc.backgroundTransition),jc.controls.style.display=fc.controls?"block":"none",jc.progress.style.display=fc.progress?"block":"none",fc.rtl?jc.wrapper.classList.add("rtl"):jc.wrapper.classList.remove("rtl"),fc.center?jc.wrapper.classList.add("center"):jc.wrapper.classList.remove("center"),fc.mouseWheel?(document.addEventListener("DOMMouseScroll",Hb,!1),document.addEventListener("mousewheel",Hb,!1)):(document.removeEventListener("DOMMouseScroll",Hb,!1),document.removeEventListener("mousewheel",Hb,!1)),fc.rollingLinks?v():w(),fc.previewLinks?x():(y(),x("[data-preview-link]")),ac&&(ac.destroy(),ac=null),b>1&&fc.autoSlide&&fc.autoSlideStoppable&&kc.canvas&&kc.requestAnimationFrame&&(ac=new Vb(jc.wrapper,function(){return Math.min(Math.max((Date.now()-qc)/oc,0),1)}),ac.on("click",Ub),rc=!1),fc.fragments===!1&&l(jc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),fc.theme&&jc.theme){var c=jc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];fc.theme!==e&&(c=c.replace(d,fc.theme),jc.theme.setAttribute("href",c))}S()}function i(){if(nc=!0,window.addEventListener("hashchange",Pb,!1),window.addEventListener("resize",Qb,!1),fc.touch&&(jc.wrapper.addEventListener("touchstart",Bb,!1),jc.wrapper.addEventListener("touchmove",Cb,!1),jc.wrapper.addEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.addEventListener("pointerdown",Eb,!1),jc.wrapper.addEventListener("pointermove",Fb,!1),jc.wrapper.addEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.addEventListener("MSPointerDown",Eb,!1),jc.wrapper.addEventListener("MSPointerMove",Fb,!1),jc.wrapper.addEventListener("MSPointerUp",Gb,!1))),fc.keyboard&&document.addEventListener("keydown",Ab,!1),fc.progress&&jc.progress&&jc.progress.addEventListener("click",Ib,!1),fc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Rb,!1)}["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.addEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.addEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.addEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.addEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.addEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.addEventListener(a,Ob,!1)})})}function j(){nc=!1,document.removeEventListener("keydown",Ab,!1),window.removeEventListener("hashchange",Pb,!1),window.removeEventListener("resize",Qb,!1),jc.wrapper.removeEventListener("touchstart",Bb,!1),jc.wrapper.removeEventListener("touchmove",Cb,!1),jc.wrapper.removeEventListener("touchend",Db,!1),window.navigator.pointerEnabled?(jc.wrapper.removeEventListener("pointerdown",Eb,!1),jc.wrapper.removeEventListener("pointermove",Fb,!1),jc.wrapper.removeEventListener("pointerup",Gb,!1)):window.navigator.msPointerEnabled&&(jc.wrapper.removeEventListener("MSPointerDown",Eb,!1),jc.wrapper.removeEventListener("MSPointerMove",Fb,!1),jc.wrapper.removeEventListener("MSPointerUp",Gb,!1)),fc.progress&&jc.progress&&jc.progress.removeEventListener("click",Ib,!1),["touchstart","click"].forEach(function(a){jc.controlsLeft.forEach(function(b){b.removeEventListener(a,Jb,!1)}),jc.controlsRight.forEach(function(b){b.removeEventListener(a,Kb,!1)}),jc.controlsUp.forEach(function(b){b.removeEventListener(a,Lb,!1)}),jc.controlsDown.forEach(function(b){b.removeEventListener(a,Mb,!1)}),jc.controlsPrev.forEach(function(b){b.removeEventListener(a,Nb,!1)}),jc.controlsNext.forEach(function(b){b.removeEventListener(a,Ob,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){fc.hideAddressBar&&_b&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),jc.wrapper.dispatchEvent(c)}function v(){if(kc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(bc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(bc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Tb,!1)})}function y(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Tb,!1)})}function z(a){A(),jc.preview=document.createElement("div"),jc.preview.classList.add("preview-link-overlay"),jc.wrapper.appendChild(jc.preview),jc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),jc.preview.querySelector("iframe").addEventListener("load",function(){jc.preview.classList.add("loaded")},!1),jc.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),jc.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){jc.preview.classList.add("visible")},1)}function A(){jc.preview&&(jc.preview.setAttribute("src",""),jc.preview.parentNode.removeChild(jc.preview),jc.preview=null)}function B(){if(jc.wrapper&&!r()){var a=jc.wrapper.offsetWidth,b=jc.wrapper.offsetHeight;a-=b*fc.margin,b-=b*fc.margin;var c=fc.width,d=fc.height,e=20;C(fc.width,fc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),jc.slides.style.width=c+"px",jc.slides.style.height=d+"px",ic=Math.min(a/c,b/d),ic=Math.max(ic,fc.minScale),ic=Math.min(ic,fc.maxScale),"undefined"==typeof jc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(jc.slides,"translate(-50%, -50%) scale("+ic+") translate(50%, 50%)"):jc.slides.style.zoom=ic;for(var f=l(document.querySelectorAll(bc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=fc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}X(),_()}}function C(a,b){l(jc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=q(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(fc.overview){qb();var a=jc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;jc.wrapper.classList.add("overview"),jc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(cc),d=0,e=c.length;e>d;d++){var f=c[d],g=fc.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Wb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Wb?Xb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Sb,!0)}else f.addEventListener("click",Sb,!0)}W(),B(),a||u("overviewshown",{indexh:Wb,indexv:Xb,currentSlide:Zb})}}function G(){fc.overview&&(jc.wrapper.classList.remove("overview"),jc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){jc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(bc)).forEach(function(a){o(a,""),a.removeEventListener("click",Sb,!0)}),R(Wb,Xb),pb(),u("overviewhidden",{indexh:Wb,indexv:Xb,currentSlide:Zb}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return jc.wrapper.classList.contains("overview")}function J(a){return a=a?a:Zb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function L(){var a=jc.wrapper.classList.contains("paused");qb(),jc.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=jc.wrapper.classList.contains("paused");jc.wrapper.classList.remove("paused"),pb(),a&&u("resumed")}function N(a){"boolean"==typeof a?a?L():M():O()?M():L()}function O(){return jc.wrapper.classList.contains("paused")}function P(a){"boolean"==typeof a?a?sb():rb():rc?sb():rb()}function Q(){return!(!oc||rc)}function R(a,b,c,d){Yb=Zb;var e=document.querySelectorAll(cc);void 0===b&&(b=E(e[a])),Yb&&Yb.parentNode&&Yb.parentNode.classList.contains("stack")&&D(Yb.parentNode,Xb);var f=hc.concat();hc.length=0;var g=Wb||0,h=Xb||0;Wb=V(cc,void 0===a?Wb:a),Xb=V(dc,void 0===b?Xb:b),W(),B();a:for(var i=0,j=hc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function U(){var a=l(document.querySelectorAll(cc));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){lb(a.querySelectorAll(".fragment"))}),0===b.length&&lb(a.querySelectorAll(".fragment"))})}function V(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){fc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=fc.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),fc.fragments)for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),fc.fragments))for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(hc=hc.concat(m.split(" ")))}else b=0;return b}function W(){var a,b,c=l(document.querySelectorAll(cc)),d=c.length;if(d){var e=I()?10:fc.viewDistance;_b&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Wb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var m=h[k];b=f===Wb?Math.abs(Xb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function X(){fc.progress&&jc.progress&&(jc.progressbar.style.width=eb()*window.innerWidth+"px")}function Y(){if(fc.slideNumber&&jc.slideNumber){var a=Wb;Xb>0&&(a+=" - "+Xb),jc.slideNumber.innerHTML=a}}function Z(){var a=ab(),b=bb();jc.controlsLeft.concat(jc.controlsRight).concat(jc.controlsUp).concat(jc.controlsDown).concat(jc.controlsPrev).concat(jc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&jc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&jc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&jc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&jc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&jc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&jc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Zb&&(b.prev&&jc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Zb)?(b.prev&&jc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&jc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&jc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function $(a){var b=null,c=fc.rtl?"future":"past",d=fc.rtl?"past":"future";if(l(jc.background.childNodes).forEach(function(e,f){Wb>f?e.className="slide-background "+c:f>Wb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Wb)&&l(e.childNodes).forEach(function(a,c){Xb>c?a.className="slide-background past":c>Xb?a.className="slide-background future":(a.className="slide-background present",f===Wb&&(b=a))})}),b){var e=$b?$b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==$b&&jc.background.classList.add("no-transition"),$b=b}setTimeout(function(){jc.background.classList.remove("no-transition")},1)}function _(){if(fc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(cc),d=document.querySelectorAll(dc),e=jc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=jc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Wb,i=jc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Xb:0;jc.background.style.backgroundPosition=h+"px "+k+"px"}}function ab(){var a=document.querySelectorAll(cc),b=document.querySelectorAll(dc),c={left:Wb>0||fc.loop,right:Wb0,down:Xb0,next:!!b.length}}return{prev:!1,next:!1}}function cb(a){a&&!fb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function db(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function eb(){var a=l(document.querySelectorAll(cc)),b=document.querySelectorAll(bc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=Zb.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function fb(){return!!window.location.search.match(/receiver/gi)}function gb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);R(f.h,f.v)}else R(Wb||0,Xb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Wb||h!==Xb)&&R(g,h)}}function hb(a){if(fc.history)if(clearTimeout(mc),"number"==typeof a)mc=setTimeout(hb,a);else{var b="/",c=Zb.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),Zb&&"string"==typeof c&&c.length?b="/"+c:((Wb>0||Xb>0)&&(b+=Wb),Xb>0&&(b+="/"+Xb)),window.location.hash=b}}function ib(a){var b,c=Wb,d=Xb;if(a){var e=J(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(cc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Zb){var h=Zb.querySelectorAll(".fragment").length>0;if(h){var i=Zb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function jb(){var a=ib();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:O(),overview:I()}}function kb(a){"object"==typeof a&&(R(m(a.indexh),m(a.indexv),m(a.indexf)),N(m(a.paused)),H(m(a.overview)))}function lb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function mb(a,b){if(Zb&&fc.fragments){var c=lb(Zb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=lb(Zb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),Z(),X(),!(!e.length&&!f.length)}}return!1}function nb(){return mb(null,1)}function ob(){return mb(null,-1)}function pb(){if(qb(),Zb){var a=Zb.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=Zb.parentNode?Zb.parentNode.getAttribute("data-autoslide"):null,d=Zb.getAttribute("data-autoslide");oc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):fc.autoSlide,l(Zb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&oc&&1e3*a.duration>oc&&(oc=1e3*a.duration+1e3)}),!oc||rc||O()||I()||Reveal.isLastSlide()&&fc.loop!==!0||(pc=setTimeout(yb,oc),qc=Date.now()),ac&&ac.setPlaying(-1!==pc)}}function qb(){clearTimeout(pc),pc=-1}function rb(){rc=!0,u("autoslidepaused"),clearTimeout(pc),ac&&ac.setPlaying(!1)}function sb(){rc=!1,u("autoslideresumed"),pb()}function tb(){fc.rtl?(I()||nb()===!1)&&ab().left&&R(Wb+1):(I()||ob()===!1)&&ab().left&&R(Wb-1)}function ub(){fc.rtl?(I()||ob()===!1)&&ab().right&&R(Wb-1):(I()||nb()===!1)&&ab().right&&R(Wb+1)}function vb(){(I()||ob()===!1)&&ab().up&&R(Wb,Xb-1)}function wb(){(I()||nb()===!1)&&ab().down&&R(Wb,Xb+1)}function xb(){if(ob()===!1)if(ab().up)vb();else{var a=document.querySelector(cc+".past:nth-child("+Wb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Wb-1;R(c,b)}}}function yb(){nb()===!1&&(ab().down?wb():ub()),pb()}function zb(){fc.autoSlideStoppable&&rb()}function Ab(a){var b=rc;zb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof fc.keyboard)for(var e in fc.keyboard)if(parseInt(e,10)===a.keyCode){var f=fc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:xb();break;case 78:case 34:yb();break;case 72:case 37:tb();break;case 76:case 39:ub();break;case 75:case 38:vb();break;case 74:case 40:wb();break;case 36:R(0);break;case 35:R(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?xb():yb();break;case 13:I()?G():d=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;case 65:fc.autoSlideStoppable&&P(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!kc.transforms3d||(jc.preview?A():H(),a.preventDefault()),pb()}}function Bb(a){sc.startX=a.touches[0].clientX,sc.startY=a.touches[0].clientY,sc.startCount=a.touches.length,2===a.touches.length&&fc.overview&&(sc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY}))}function Cb(a){if(sc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{zb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===sc.startCount&&fc.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:sc.startX,y:sc.startY});Math.abs(sc.startSpan-d)>sc.threshold&&(sc.captured=!0,dsc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,tb()):e<-sc.threshold&&Math.abs(e)>Math.abs(f)?(sc.captured=!0,ub()):f>sc.threshold?(sc.captured=!0,vb()):f<-sc.threshold&&(sc.captured=!0,wb()),fc.embedded?(sc.captured||J(Zb))&&a.preventDefault():a.preventDefault()}}}function Db(){sc.captured=!1}function Eb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Bb(a))}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){if(Date.now()-lc>600){lc=Date.now();var b=a.detail||-a.wheelDelta;b>0?yb():xb()}}function Ib(a){zb(a),a.preventDefault();var b=l(document.querySelectorAll(cc)).length,c=Math.floor(a.clientX/jc.wrapper.offsetWidth*b);R(c)}function Jb(a){a.preventDefault(),zb(),tb()}function Kb(a){a.preventDefault(),zb(),ub()}function Lb(a){a.preventDefault(),zb(),vb()}function Mb(a){a.preventDefault(),zb(),wb()}function Nb(a){a.preventDefault(),zb(),xb()}function Ob(a){a.preventDefault(),zb(),yb()}function Pb(){gb()}function Qb(){B()}function Rb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Sb(a){if(nc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);R(c,d)}}}function Tb(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Ub(){Reveal.isLastSlide()&&fc.loop===!1?(R(0,0),sb()):rc?sb():rb()}function Vb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Wb,Xb,Yb,Zb,$b,_b,ac,bc=".reveal .slides section",cc=".reveal .slides>section",dc=".reveal .slides>section.present>section",ec=".reveal .slides>section:first-of-type",fc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},gc=!1,hc=[],ic=1,jc={},kc={},lc=0,mc=0,nc=!1,oc=0,pc=0,qc=-1,rc=!1,sc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Vb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Vb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&kc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Vb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() -},Vb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Vb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Vb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:S,slide:R,left:tb,right:ub,up:vb,down:wb,prev:xb,next:yb,navigateFragment:mb,prevFragment:ob,nextFragment:nb,navigateTo:R,navigateLeft:tb,navigateRight:ub,navigateUp:vb,navigateDown:wb,navigatePrev:xb,navigateNext:yb,layout:B,availableRoutes:ab,availableFragments:bb,toggleOverview:H,togglePause:N,toggleAutoSlide:P,isOverview:I,isPaused:O,isAutoSliding:Q,addEventListeners:i,removeEventListeners:j,getState:jb,setState:kb,getProgress:eb,getIndices:ib,getSlide:function(a,b){var c=document.querySelectorAll(cc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Yb},getCurrentSlide:function(){return Zb},getScale:function(){return ic},getConfig:function(){return fc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=m(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(bc+".past")?!0:!1},isLastSlide:function(){return Zb?Zb.nextElementSibling?!1:J(Zb)&&Zb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return gc},addEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(jc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!lc.transforms2d&&!lc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(gc,a),l(gc,d),t(),c()}function b(){lc.transforms3d="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,lc.transforms2d="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,lc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,lc.requestAnimationFrame="function"==typeof lc.requestAnimationFrameMethod,lc.canvas=!!document.createElement("canvas").getContext,ac=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=gc.dependencies.length;h>g;g++){var i=gc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){kc.slides.classList.remove("no-transition"),hc=!0,v("ready",{indexh:Xb,indexv:Yb,currentSlide:$b})},1)}function e(){kc.theme=document.querySelector("#theme"),kc.wrapper=document.querySelector(".reveal"),kc.slides=document.querySelector(".reveal .slides"),kc.slides.classList.add("no-transition"),kc.background=f(kc.wrapper,"div","backgrounds",null),kc.progress=f(kc.wrapper,"div","progress",""),kc.progressbar=kc.progress.querySelector("span"),f(kc.wrapper,"aside","controls",''),kc.slideNumber=f(kc.wrapper,"div","slide-number",""),f(kc.wrapper,"div","state-background",null),f(kc.wrapper,"div","pause-overlay",null),kc.controls=document.querySelector(".reveal .controls"),kc.controlsLeft=m(document.querySelectorAll(".navigate-left")),kc.controlsRight=m(document.querySelectorAll(".navigate-right")),kc.controlsUp=m(document.querySelectorAll(".navigate-up")),kc.controlsDown=m(document.querySelectorAll(".navigate-down")),kc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),kc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),kc.background.innerHTML="",kc.background.classList.add("no-transition"),m(document.querySelectorAll(dc)).forEach(function(a){var b;b=s()?h(a,a):h(a,kc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),gc.parallaxBackgroundImage?(kc.background.style.backgroundImage='url("'+gc.parallaxBackgroundImage+'")',kc.background.style.backgroundSize=gc.parallaxBackgroundSize,setTimeout(function(){kc.wrapper.classList.add("has-parallax-background")},1)):(kc.background.style.backgroundImage="",kc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}function i(a){var b=document.querySelectorAll(cc).length;if(kc.wrapper.classList.remove(gc.transition),"object"==typeof a&&l(gc,a),lc.transforms3d===!1&&(gc.transition="linear"),kc.wrapper.classList.add(gc.transition),kc.wrapper.setAttribute("data-transition-speed",gc.transitionSpeed),kc.wrapper.setAttribute("data-background-transition",gc.backgroundTransition),kc.controls.style.display=gc.controls?"block":"none",kc.progress.style.display=gc.progress?"block":"none",gc.rtl?kc.wrapper.classList.add("rtl"):kc.wrapper.classList.remove("rtl"),gc.center?kc.wrapper.classList.add("center"):kc.wrapper.classList.remove("center"),gc.mouseWheel?(document.addEventListener("DOMMouseScroll",Ib,!1),document.addEventListener("mousewheel",Ib,!1)):(document.removeEventListener("DOMMouseScroll",Ib,!1),document.removeEventListener("mousewheel",Ib,!1)),gc.rollingLinks?w():x(),gc.previewLinks?y():(z(),y("[data-preview-link]")),bc&&(bc.destroy(),bc=null),b>1&&gc.autoSlide&&gc.autoSlideStoppable&&lc.canvas&&lc.requestAnimationFrame&&(bc=new Wb(kc.wrapper,function(){return Math.min(Math.max((Date.now()-rc)/pc,0),1)}),bc.on("click",Vb),sc=!1),gc.fragments===!1&&m(kc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),gc.theme&&kc.theme){var c=kc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];gc.theme!==e&&(c=c.replace(d,gc.theme),kc.theme.setAttribute("href",c))}T()}function j(){if(oc=!0,window.addEventListener("hashchange",Qb,!1),window.addEventListener("resize",Rb,!1),gc.touch&&(kc.wrapper.addEventListener("touchstart",Cb,!1),kc.wrapper.addEventListener("touchmove",Db,!1),kc.wrapper.addEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.addEventListener("pointerdown",Fb,!1),kc.wrapper.addEventListener("pointermove",Gb,!1),kc.wrapper.addEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.addEventListener("MSPointerDown",Fb,!1),kc.wrapper.addEventListener("MSPointerMove",Gb,!1),kc.wrapper.addEventListener("MSPointerUp",Hb,!1))),gc.keyboard&&document.addEventListener("keydown",Bb,!1),gc.progress&&kc.progress&&kc.progress.addEventListener("click",Jb,!1),gc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Sb,!1)}["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.addEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.addEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.addEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.addEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.addEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.addEventListener(a,Pb,!1)})})}function k(){oc=!1,document.removeEventListener("keydown",Bb,!1),window.removeEventListener("hashchange",Qb,!1),window.removeEventListener("resize",Rb,!1),kc.wrapper.removeEventListener("touchstart",Cb,!1),kc.wrapper.removeEventListener("touchmove",Db,!1),kc.wrapper.removeEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.removeEventListener("pointerdown",Fb,!1),kc.wrapper.removeEventListener("pointermove",Gb,!1),kc.wrapper.removeEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.removeEventListener("MSPointerDown",Fb,!1),kc.wrapper.removeEventListener("MSPointerMove",Gb,!1),kc.wrapper.removeEventListener("MSPointerUp",Hb,!1)),gc.progress&&kc.progress&&kc.progress.removeEventListener("click",Jb,!1),["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.removeEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.removeEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.removeEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.removeEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.removeEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.removeEventListener(a,Pb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){gc.hideAddressBar&&ac&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),kc.wrapper.dispatchEvent(c)}function w(){if(lc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(cc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(cc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ub,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ub,!1)})}function A(a){B(),kc.preview=document.createElement("div"),kc.preview.classList.add("preview-link-overlay"),kc.wrapper.appendChild(kc.preview),kc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),kc.preview.querySelector("iframe").addEventListener("load",function(){kc.preview.classList.add("loaded")},!1),kc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),kc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){kc.preview.classList.add("visible")},1)}function B(){kc.preview&&(kc.preview.setAttribute("src",""),kc.preview.parentNode.removeChild(kc.preview),kc.preview=null)}function C(){if(kc.wrapper&&!s()){var a=kc.wrapper.offsetWidth,b=kc.wrapper.offsetHeight;a-=b*gc.margin,b-=b*gc.margin;var c=gc.width,d=gc.height,e=20;D(gc.width,gc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),kc.slides.style.width=c+"px",kc.slides.style.height=d+"px",jc=Math.min(a/c,b/d),jc=Math.max(jc,gc.minScale),jc=Math.min(jc,gc.maxScale),"undefined"==typeof kc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?p(kc.slides,"translate(-50%, -50%) scale("+jc+") translate(50%, 50%)"):kc.slides.style.zoom=jc;for(var f=m(document.querySelectorAll(cc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=gc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(q(i)/2)-e,-d/2)+"px":"")}Y(),ab()}}function D(a,b){m(kc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(gc.overview){rb();var a=kc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;kc.wrapper.classList.add("overview"),kc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(dc),d=0,e=c.length;e>d;d++){var f=c[d],g=gc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Xb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Xb?Yb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Tb,!0)}else f.addEventListener("click",Tb,!0)}X(),C(),a||v("overviewshown",{indexh:Xb,indexv:Yb,currentSlide:$b})}}function H(){gc.overview&&(kc.wrapper.classList.remove("overview"),kc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){kc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(cc)).forEach(function(a){p(a,""),a.removeEventListener("click",Tb,!0)}),S(Xb,Yb),qb(),v("overviewhidden",{indexh:Xb,indexv:Yb,currentSlide:$b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return kc.wrapper.classList.contains("overview")}function K(a){return a=a?a:$b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=kc.wrapper.classList.contains("paused");rb(),kc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=kc.wrapper.classList.contains("paused");kc.wrapper.classList.remove("paused"),qb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return kc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?tb():sb():sc?tb():sb()}function R(){return!(!pc||sc)}function S(a,b,c,d){Zb=$b;var e=document.querySelectorAll(dc);void 0===b&&(b=F(e[a])),Zb&&Zb.parentNode&&Zb.parentNode.classList.contains("stack")&&E(Zb.parentNode,Yb);var f=ic.concat();ic.length=0;var g=Xb||0,h=Yb||0;Xb=W(dc,void 0===a?Xb:a),Yb=W(ec,void 0===b?Yb:b),X(),C();a:for(var i=0,j=ic.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(dc));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){mb(a.querySelectorAll(".fragment"))}),0===b.length&&mb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){gc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=gc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),gc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),gc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(ic=ic.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(dc)),d=c.length;if(d){var e=J()?10:gc.viewDistance;ac&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Xb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Xb?Math.abs(Yb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){gc.progress&&kc.progress&&(kc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(gc.slideNumber&&kc.slideNumber){var a=Xb;Yb>0&&(a+=" - "+Yb),kc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();kc.controlsLeft.concat(kc.controlsRight).concat(kc.controlsUp).concat(kc.controlsDown).concat(kc.controlsPrev).concat(kc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&kc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&kc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&kc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&kc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&kc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&kc.controlsNext.forEach(function(a){a.classList.add("enabled")}),$b&&(b.prev&&kc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K($b)?(b.prev&&kc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&kc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=gc.rtl?"future":"past",d=gc.rtl?"past":"future";if(m(kc.background.childNodes).forEach(function(e,f){Xb>f?e.className="slide-background "+c:f>Xb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Xb)&&m(e.childNodes).forEach(function(a,c){Yb>c?a.className="slide-background past":c>Yb?a.className="slide-background future":(a.className="slide-background present",f===Xb&&(b=a))})}),b){var e=_b?_b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==_b&&kc.background.classList.add("no-transition"),_b=b}setTimeout(function(){kc.background.classList.remove("no-transition")},1)}function ab(){if(gc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(dc),d=document.querySelectorAll(ec),e=kc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=kc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Xb,i=kc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Yb:0;kc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(dc),b=document.querySelectorAll(ec),c={left:Xb>0||gc.loop,right:Xb0,down:Yb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(dc)),b=document.querySelectorAll(cc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=$b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Xb||0,Yb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Xb||h!==Yb)&&S(g,h)}}function ib(a){if(gc.history)if(clearTimeout(nc),"number"==typeof a)nc=setTimeout(ib,a);else{var b="/",c=$b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),$b&&"string"==typeof c&&c.length?b="/"+c:((Xb>0||Yb>0)&&(b+=Xb),Yb>0&&(b+="/"+Yb)),window.location.hash=b}}function jb(a){var b,c=Xb,d=Yb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(dc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&$b){var h=$b.querySelectorAll(".fragment").length>0;if(h){var i=$b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function lb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function mb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function nb(a,b){if($b&&gc.fragments){var c=mb($b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=mb($b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function ob(){return nb(null,1)}function pb(){return nb(null,-1)}function qb(){if(rb(),$b){var a=$b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=$b.parentNode?$b.parentNode.getAttribute("data-autoslide"):null,d=$b.getAttribute("data-autoslide");pc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):gc.autoSlide,m($b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&pc&&1e3*a.duration>pc&&(pc=1e3*a.duration+1e3)}),!pc||sc||P()||J()||Reveal.isLastSlide()&&gc.loop!==!0||(qc=setTimeout(zb,pc),rc=Date.now()),bc&&bc.setPlaying(-1!==qc)}}function rb(){clearTimeout(qc),qc=-1}function sb(){sc=!0,v("autoslidepaused"),clearTimeout(qc),bc&&bc.setPlaying(!1)}function tb(){sc=!1,v("autoslideresumed"),qb()}function ub(){gc.rtl?(J()||ob()===!1)&&bb().left&&S(Xb+1):(J()||pb()===!1)&&bb().left&&S(Xb-1)}function vb(){gc.rtl?(J()||pb()===!1)&&bb().right&&S(Xb-1):(J()||ob()===!1)&&bb().right&&S(Xb+1)}function wb(){(J()||pb()===!1)&&bb().up&&S(Xb,Yb-1)}function xb(){(J()||ob()===!1)&&bb().down&&S(Xb,Yb+1)}function yb(){if(pb()===!1)if(bb().up)wb();else{var a=document.querySelector(dc+".past:nth-child("+Xb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Xb-1;S(c,b)}}}function zb(){ob()===!1&&(bb().down?xb():vb()),qb()}function Ab(){gc.autoSlideStoppable&&sb()}function Bb(a){var b=sc;Ab(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof gc.keyboard)for(var e in gc.keyboard)if(parseInt(e,10)===a.keyCode){var f=gc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:yb();break;case 78:case 34:zb();break;case 72:case 37:ub();break;case 76:case 39:vb();break;case 75:case 38:wb();break;case 74:case 40:xb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?yb():zb();break;case 13:J()?H():d=!1;break;case 66:case 190:case 191:O();break;case 70:L();break;case 65:gc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!lc.transforms3d||(kc.preview?B():I(),a.preventDefault()),qb()}}function Cb(a){tc.startX=a.touches[0].clientX,tc.startY=a.touches[0].clientY,tc.startCount=a.touches.length,2===a.touches.length&&gc.overview&&(tc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY}))}function Db(a){if(tc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Ab(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===tc.startCount&&gc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY});Math.abs(tc.startSpan-d)>tc.threshold&&(tc.captured=!0,dtc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,ub()):e<-tc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,vb()):f>tc.threshold?(tc.captured=!0,wb()):f<-tc.threshold&&(tc.captured=!0,xb()),gc.embedded?(tc.captured||K($b))&&a.preventDefault():a.preventDefault()}}}function Eb(){tc.captured=!1}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){if(Date.now()-mc>600){mc=Date.now();var b=a.detail||-a.wheelDelta;b>0?zb():yb()}}function Jb(a){Ab(a),a.preventDefault();var b=m(document.querySelectorAll(dc)).length,c=Math.floor(a.clientX/kc.wrapper.offsetWidth*b);S(c)}function Kb(a){a.preventDefault(),Ab(),ub()}function Lb(a){a.preventDefault(),Ab(),vb()}function Mb(a){a.preventDefault(),Ab(),wb()}function Nb(a){a.preventDefault(),Ab(),xb()}function Ob(a){a.preventDefault(),Ab(),yb()}function Pb(a){a.preventDefault(),Ab(),zb()}function Qb(){hb()}function Rb(){C()}function Sb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Tb(a){if(oc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Ub(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Vb(){Reveal.isLastSlide()&&gc.loop===!1?(S(0,0),tb()):sc?tb():sb()}function Wb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Xb,Yb,Zb,$b,_b,ac,bc,cc=".reveal .slides section",dc=".reveal .slides>section",ec=".reveal .slides>section.present>section",fc=".reveal .slides>section:first-of-type",gc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},hc=!1,ic=[],jc=1,kc={},lc={},mc=0,nc=0,oc=!1,pc=0,qc=0,rc=-1,sc=!1,tc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Wb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Wb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&lc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Wb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +},Wb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Wb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Wb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:ub,right:vb,up:wb,down:xb,prev:yb,next:zb,navigateFragment:nb,prevFragment:pb,nextFragment:ob,navigateTo:S,navigateLeft:ub,navigateRight:vb,navigateUp:wb,navigateDown:xb,navigatePrev:yb,navigateNext:zb,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:kb,setState:lb,getProgress:fb,getIndices:jb,getSlide:function(a,b){var c=document.querySelectorAll(dc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Zb},getCurrentSlide:function(){return $b},getScale:function(){return jc},getConfig:function(){return gc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(cc+".past")?!0:!1},isLastSlide:function(){return $b?$b.nextElementSibling?!1:K($b)&&$b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return hc},addEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 1de159c4f4dd83118805499858b21b830428d9ce Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 26 Mar 2014 15:48:28 +0100 Subject: start work on video backgrounds #751 --- js/reveal.js | 27 +++++++++++++++++++++++++-- js/reveal.min.js | 6 +++--- 2 files changed, 28 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 40d26df..5eb377b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -488,6 +488,7 @@ var Reveal = (function(){ background: slide.getAttribute( 'data-background' ), backgroundSize: slide.getAttribute( 'data-background-size' ), backgroundImage: slide.getAttribute( 'data-background-image' ), + backgroundVideo: slide.getAttribute( 'data-background-video' ), backgroundColor: slide.getAttribute( 'data-background-color' ), backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), backgroundPosition: slide.getAttribute( 'data-background-position' ), @@ -507,8 +508,18 @@ var Reveal = (function(){ } } - if( data.background || data.backgroundColor || data.backgroundImage ) { - element.setAttribute( 'data-background-hash', data.background + data.backgroundSize + data.backgroundImage + data.backgroundColor + data.backgroundRepeat + data.backgroundPosition + data.backgroundTransition ); + // Create a hash for this combination of background settings. + // This is used to determine when two slide backgrounds are + // the same. + if( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo ) { + element.setAttribute( 'data-background-hash', data.background + + data.backgroundSize + + data.backgroundImage + + data.backgroundVideo + + data.backgroundColor + + data.backgroundRepeat + + data.backgroundPosition + + data.backgroundTransition ); } // Additional and optional background properties @@ -519,6 +530,18 @@ var Reveal = (function(){ if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); + // Create video background element + if( data.backgroundVideo ) { + var video = document.createElement( 'video' ); + + // Support comma separated lists of video sources + data.backgroundVideo.split( ',' ).forEach( function( source ) { + video.innerHTML += ''; + } ); + + element.appendChild( video ); + } + container.appendChild( element ); return element; diff --git a/js/reveal.min.js b/js/reveal.min.js index 549d755..aa7d640 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-26, 15:19) + * reveal.js 2.7.0-dev (2014-03-26, 15:45) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!lc.transforms2d&&!lc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(gc,a),l(gc,d),t(),c()}function b(){lc.transforms3d="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,lc.transforms2d="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,lc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,lc.requestAnimationFrame="function"==typeof lc.requestAnimationFrameMethod,lc.canvas=!!document.createElement("canvas").getContext,ac=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=gc.dependencies.length;h>g;g++){var i=gc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){kc.slides.classList.remove("no-transition"),hc=!0,v("ready",{indexh:Xb,indexv:Yb,currentSlide:$b})},1)}function e(){kc.theme=document.querySelector("#theme"),kc.wrapper=document.querySelector(".reveal"),kc.slides=document.querySelector(".reveal .slides"),kc.slides.classList.add("no-transition"),kc.background=f(kc.wrapper,"div","backgrounds",null),kc.progress=f(kc.wrapper,"div","progress",""),kc.progressbar=kc.progress.querySelector("span"),f(kc.wrapper,"aside","controls",''),kc.slideNumber=f(kc.wrapper,"div","slide-number",""),f(kc.wrapper,"div","state-background",null),f(kc.wrapper,"div","pause-overlay",null),kc.controls=document.querySelector(".reveal .controls"),kc.controlsLeft=m(document.querySelectorAll(".navigate-left")),kc.controlsRight=m(document.querySelectorAll(".navigate-right")),kc.controlsUp=m(document.querySelectorAll(".navigate-up")),kc.controlsDown=m(document.querySelectorAll(".navigate-down")),kc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),kc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),kc.background.innerHTML="",kc.background.classList.add("no-transition"),m(document.querySelectorAll(dc)).forEach(function(a){var b;b=s()?h(a,a):h(a,kc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),gc.parallaxBackgroundImage?(kc.background.style.backgroundImage='url("'+gc.parallaxBackgroundImage+'")',kc.background.style.backgroundSize=gc.parallaxBackgroundSize,setTimeout(function(){kc.wrapper.classList.add("has-parallax-background")},1)):(kc.background.style.backgroundImage="",kc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}function i(a){var b=document.querySelectorAll(cc).length;if(kc.wrapper.classList.remove(gc.transition),"object"==typeof a&&l(gc,a),lc.transforms3d===!1&&(gc.transition="linear"),kc.wrapper.classList.add(gc.transition),kc.wrapper.setAttribute("data-transition-speed",gc.transitionSpeed),kc.wrapper.setAttribute("data-background-transition",gc.backgroundTransition),kc.controls.style.display=gc.controls?"block":"none",kc.progress.style.display=gc.progress?"block":"none",gc.rtl?kc.wrapper.classList.add("rtl"):kc.wrapper.classList.remove("rtl"),gc.center?kc.wrapper.classList.add("center"):kc.wrapper.classList.remove("center"),gc.mouseWheel?(document.addEventListener("DOMMouseScroll",Ib,!1),document.addEventListener("mousewheel",Ib,!1)):(document.removeEventListener("DOMMouseScroll",Ib,!1),document.removeEventListener("mousewheel",Ib,!1)),gc.rollingLinks?w():x(),gc.previewLinks?y():(z(),y("[data-preview-link]")),bc&&(bc.destroy(),bc=null),b>1&&gc.autoSlide&&gc.autoSlideStoppable&&lc.canvas&&lc.requestAnimationFrame&&(bc=new Wb(kc.wrapper,function(){return Math.min(Math.max((Date.now()-rc)/pc,0),1)}),bc.on("click",Vb),sc=!1),gc.fragments===!1&&m(kc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),gc.theme&&kc.theme){var c=kc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];gc.theme!==e&&(c=c.replace(d,gc.theme),kc.theme.setAttribute("href",c))}T()}function j(){if(oc=!0,window.addEventListener("hashchange",Qb,!1),window.addEventListener("resize",Rb,!1),gc.touch&&(kc.wrapper.addEventListener("touchstart",Cb,!1),kc.wrapper.addEventListener("touchmove",Db,!1),kc.wrapper.addEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.addEventListener("pointerdown",Fb,!1),kc.wrapper.addEventListener("pointermove",Gb,!1),kc.wrapper.addEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.addEventListener("MSPointerDown",Fb,!1),kc.wrapper.addEventListener("MSPointerMove",Gb,!1),kc.wrapper.addEventListener("MSPointerUp",Hb,!1))),gc.keyboard&&document.addEventListener("keydown",Bb,!1),gc.progress&&kc.progress&&kc.progress.addEventListener("click",Jb,!1),gc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Sb,!1)}["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.addEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.addEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.addEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.addEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.addEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.addEventListener(a,Pb,!1)})})}function k(){oc=!1,document.removeEventListener("keydown",Bb,!1),window.removeEventListener("hashchange",Qb,!1),window.removeEventListener("resize",Rb,!1),kc.wrapper.removeEventListener("touchstart",Cb,!1),kc.wrapper.removeEventListener("touchmove",Db,!1),kc.wrapper.removeEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.removeEventListener("pointerdown",Fb,!1),kc.wrapper.removeEventListener("pointermove",Gb,!1),kc.wrapper.removeEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.removeEventListener("MSPointerDown",Fb,!1),kc.wrapper.removeEventListener("MSPointerMove",Gb,!1),kc.wrapper.removeEventListener("MSPointerUp",Hb,!1)),gc.progress&&kc.progress&&kc.progress.removeEventListener("click",Jb,!1),["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.removeEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.removeEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.removeEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.removeEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.removeEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.removeEventListener(a,Pb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){gc.hideAddressBar&&ac&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),kc.wrapper.dispatchEvent(c)}function w(){if(lc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(cc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(cc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ub,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ub,!1)})}function A(a){B(),kc.preview=document.createElement("div"),kc.preview.classList.add("preview-link-overlay"),kc.wrapper.appendChild(kc.preview),kc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),kc.preview.querySelector("iframe").addEventListener("load",function(){kc.preview.classList.add("loaded")},!1),kc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),kc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){kc.preview.classList.add("visible")},1)}function B(){kc.preview&&(kc.preview.setAttribute("src",""),kc.preview.parentNode.removeChild(kc.preview),kc.preview=null)}function C(){if(kc.wrapper&&!s()){var a=kc.wrapper.offsetWidth,b=kc.wrapper.offsetHeight;a-=b*gc.margin,b-=b*gc.margin;var c=gc.width,d=gc.height,e=20;D(gc.width,gc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),kc.slides.style.width=c+"px",kc.slides.style.height=d+"px",jc=Math.min(a/c,b/d),jc=Math.max(jc,gc.minScale),jc=Math.min(jc,gc.maxScale),"undefined"==typeof kc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?p(kc.slides,"translate(-50%, -50%) scale("+jc+") translate(50%, 50%)"):kc.slides.style.zoom=jc;for(var f=m(document.querySelectorAll(cc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=gc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(q(i)/2)-e,-d/2)+"px":"")}Y(),ab()}}function D(a,b){m(kc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(gc.overview){rb();var a=kc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;kc.wrapper.classList.add("overview"),kc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(dc),d=0,e=c.length;e>d;d++){var f=c[d],g=gc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Xb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Xb?Yb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Tb,!0)}else f.addEventListener("click",Tb,!0)}X(),C(),a||v("overviewshown",{indexh:Xb,indexv:Yb,currentSlide:$b})}}function H(){gc.overview&&(kc.wrapper.classList.remove("overview"),kc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){kc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(cc)).forEach(function(a){p(a,""),a.removeEventListener("click",Tb,!0)}),S(Xb,Yb),qb(),v("overviewhidden",{indexh:Xb,indexv:Yb,currentSlide:$b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return kc.wrapper.classList.contains("overview")}function K(a){return a=a?a:$b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=kc.wrapper.classList.contains("paused");rb(),kc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=kc.wrapper.classList.contains("paused");kc.wrapper.classList.remove("paused"),qb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return kc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?tb():sb():sc?tb():sb()}function R(){return!(!pc||sc)}function S(a,b,c,d){Zb=$b;var e=document.querySelectorAll(dc);void 0===b&&(b=F(e[a])),Zb&&Zb.parentNode&&Zb.parentNode.classList.contains("stack")&&E(Zb.parentNode,Yb);var f=ic.concat();ic.length=0;var g=Xb||0,h=Yb||0;Xb=W(dc,void 0===a?Xb:a),Yb=W(ec,void 0===b?Yb:b),X(),C();a:for(var i=0,j=ic.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(dc));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){mb(a.querySelectorAll(".fragment"))}),0===b.length&&mb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){gc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=gc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),gc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),gc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(ic=ic.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(dc)),d=c.length;if(d){var e=J()?10:gc.viewDistance;ac&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Xb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Xb?Math.abs(Yb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){gc.progress&&kc.progress&&(kc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(gc.slideNumber&&kc.slideNumber){var a=Xb;Yb>0&&(a+=" - "+Yb),kc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();kc.controlsLeft.concat(kc.controlsRight).concat(kc.controlsUp).concat(kc.controlsDown).concat(kc.controlsPrev).concat(kc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&kc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&kc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&kc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&kc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&kc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&kc.controlsNext.forEach(function(a){a.classList.add("enabled")}),$b&&(b.prev&&kc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K($b)?(b.prev&&kc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&kc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=gc.rtl?"future":"past",d=gc.rtl?"past":"future";if(m(kc.background.childNodes).forEach(function(e,f){Xb>f?e.className="slide-background "+c:f>Xb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Xb)&&m(e.childNodes).forEach(function(a,c){Yb>c?a.className="slide-background past":c>Yb?a.className="slide-background future":(a.className="slide-background present",f===Xb&&(b=a))})}),b){var e=_b?_b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==_b&&kc.background.classList.add("no-transition"),_b=b}setTimeout(function(){kc.background.classList.remove("no-transition")},1)}function ab(){if(gc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(dc),d=document.querySelectorAll(ec),e=kc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=kc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Xb,i=kc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Yb:0;kc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(dc),b=document.querySelectorAll(ec),c={left:Xb>0||gc.loop,right:Xb0,down:Yb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(dc)),b=document.querySelectorAll(cc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=$b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Xb||0,Yb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Xb||h!==Yb)&&S(g,h)}}function ib(a){if(gc.history)if(clearTimeout(nc),"number"==typeof a)nc=setTimeout(ib,a);else{var b="/",c=$b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),$b&&"string"==typeof c&&c.length?b="/"+c:((Xb>0||Yb>0)&&(b+=Xb),Yb>0&&(b+="/"+Yb)),window.location.hash=b}}function jb(a){var b,c=Xb,d=Yb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(dc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&$b){var h=$b.querySelectorAll(".fragment").length>0;if(h){var i=$b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function lb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function mb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function nb(a,b){if($b&&gc.fragments){var c=mb($b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=mb($b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function ob(){return nb(null,1)}function pb(){return nb(null,-1)}function qb(){if(rb(),$b){var a=$b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=$b.parentNode?$b.parentNode.getAttribute("data-autoslide"):null,d=$b.getAttribute("data-autoslide");pc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):gc.autoSlide,m($b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&pc&&1e3*a.duration>pc&&(pc=1e3*a.duration+1e3)}),!pc||sc||P()||J()||Reveal.isLastSlide()&&gc.loop!==!0||(qc=setTimeout(zb,pc),rc=Date.now()),bc&&bc.setPlaying(-1!==qc)}}function rb(){clearTimeout(qc),qc=-1}function sb(){sc=!0,v("autoslidepaused"),clearTimeout(qc),bc&&bc.setPlaying(!1)}function tb(){sc=!1,v("autoslideresumed"),qb()}function ub(){gc.rtl?(J()||ob()===!1)&&bb().left&&S(Xb+1):(J()||pb()===!1)&&bb().left&&S(Xb-1)}function vb(){gc.rtl?(J()||pb()===!1)&&bb().right&&S(Xb-1):(J()||ob()===!1)&&bb().right&&S(Xb+1)}function wb(){(J()||pb()===!1)&&bb().up&&S(Xb,Yb-1)}function xb(){(J()||ob()===!1)&&bb().down&&S(Xb,Yb+1)}function yb(){if(pb()===!1)if(bb().up)wb();else{var a=document.querySelector(dc+".past:nth-child("+Xb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Xb-1;S(c,b)}}}function zb(){ob()===!1&&(bb().down?xb():vb()),qb()}function Ab(){gc.autoSlideStoppable&&sb()}function Bb(a){var b=sc;Ab(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof gc.keyboard)for(var e in gc.keyboard)if(parseInt(e,10)===a.keyCode){var f=gc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:yb();break;case 78:case 34:zb();break;case 72:case 37:ub();break;case 76:case 39:vb();break;case 75:case 38:wb();break;case 74:case 40:xb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?yb():zb();break;case 13:J()?H():d=!1;break;case 66:case 190:case 191:O();break;case 70:L();break;case 65:gc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!lc.transforms3d||(kc.preview?B():I(),a.preventDefault()),qb()}}function Cb(a){tc.startX=a.touches[0].clientX,tc.startY=a.touches[0].clientY,tc.startCount=a.touches.length,2===a.touches.length&&gc.overview&&(tc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY}))}function Db(a){if(tc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Ab(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===tc.startCount&&gc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY});Math.abs(tc.startSpan-d)>tc.threshold&&(tc.captured=!0,dtc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,ub()):e<-tc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,vb()):f>tc.threshold?(tc.captured=!0,wb()):f<-tc.threshold&&(tc.captured=!0,xb()),gc.embedded?(tc.captured||K($b))&&a.preventDefault():a.preventDefault()}}}function Eb(){tc.captured=!1}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){if(Date.now()-mc>600){mc=Date.now();var b=a.detail||-a.wheelDelta;b>0?zb():yb()}}function Jb(a){Ab(a),a.preventDefault();var b=m(document.querySelectorAll(dc)).length,c=Math.floor(a.clientX/kc.wrapper.offsetWidth*b);S(c)}function Kb(a){a.preventDefault(),Ab(),ub()}function Lb(a){a.preventDefault(),Ab(),vb()}function Mb(a){a.preventDefault(),Ab(),wb()}function Nb(a){a.preventDefault(),Ab(),xb()}function Ob(a){a.preventDefault(),Ab(),yb()}function Pb(a){a.preventDefault(),Ab(),zb()}function Qb(){hb()}function Rb(){C()}function Sb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Tb(a){if(oc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Ub(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Vb(){Reveal.isLastSlide()&&gc.loop===!1?(S(0,0),tb()):sc?tb():sb()}function Wb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Xb,Yb,Zb,$b,_b,ac,bc,cc=".reveal .slides section",dc=".reveal .slides>section",ec=".reveal .slides>section.present>section",fc=".reveal .slides>section:first-of-type",gc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},hc=!1,ic=[],jc=1,kc={},lc={},mc=0,nc=0,oc=!1,pc=0,qc=0,rc=-1,sc=!1,tc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Wb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Wb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&lc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Wb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() -},Wb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Wb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Wb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:ub,right:vb,up:wb,down:xb,prev:yb,next:zb,navigateFragment:nb,prevFragment:pb,nextFragment:ob,navigateTo:S,navigateLeft:ub,navigateRight:vb,navigateUp:wb,navigateDown:xb,navigatePrev:yb,navigateNext:zb,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:kb,setState:lb,getProgress:fb,getIndices:jb,getSlide:function(a,b){var c=document.querySelectorAll(dc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Zb},getCurrentSlide:function(){return $b},getScale:function(){return jc},getConfig:function(){return gc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(cc+".past")?!0:!1},isLastSlide:function(){return $b?$b.nextElementSibling?!1:K($b)&&$b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return hc},addEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!lc.transforms2d&&!lc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(gc,a),l(gc,d),t(),c()}function b(){lc.transforms3d="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,lc.transforms2d="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,lc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,lc.requestAnimationFrame="function"==typeof lc.requestAnimationFrameMethod,lc.canvas=!!document.createElement("canvas").getContext,ac=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=gc.dependencies.length;h>g;g++){var i=gc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){kc.slides.classList.remove("no-transition"),hc=!0,v("ready",{indexh:Xb,indexv:Yb,currentSlide:$b})},1)}function e(){kc.theme=document.querySelector("#theme"),kc.wrapper=document.querySelector(".reveal"),kc.slides=document.querySelector(".reveal .slides"),kc.slides.classList.add("no-transition"),kc.background=f(kc.wrapper,"div","backgrounds",null),kc.progress=f(kc.wrapper,"div","progress",""),kc.progressbar=kc.progress.querySelector("span"),f(kc.wrapper,"aside","controls",''),kc.slideNumber=f(kc.wrapper,"div","slide-number",""),f(kc.wrapper,"div","state-background",null),f(kc.wrapper,"div","pause-overlay",null),kc.controls=document.querySelector(".reveal .controls"),kc.controlsLeft=m(document.querySelectorAll(".navigate-left")),kc.controlsRight=m(document.querySelectorAll(".navigate-right")),kc.controlsUp=m(document.querySelectorAll(".navigate-up")),kc.controlsDown=m(document.querySelectorAll(".navigate-down")),kc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),kc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),kc.background.innerHTML="",kc.background.classList.add("no-transition"),m(document.querySelectorAll(dc)).forEach(function(a){var b;b=s()?h(a,a):h(a,kc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),gc.parallaxBackgroundImage?(kc.background.style.backgroundImage='url("'+gc.parallaxBackgroundImage+'")',kc.background.style.backgroundSize=gc.parallaxBackgroundSize,setTimeout(function(){kc.wrapper.classList.add("has-parallax-background")},1)):(kc.background.style.backgroundImage="",kc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(cc).length;if(kc.wrapper.classList.remove(gc.transition),"object"==typeof a&&l(gc,a),lc.transforms3d===!1&&(gc.transition="linear"),kc.wrapper.classList.add(gc.transition),kc.wrapper.setAttribute("data-transition-speed",gc.transitionSpeed),kc.wrapper.setAttribute("data-background-transition",gc.backgroundTransition),kc.controls.style.display=gc.controls?"block":"none",kc.progress.style.display=gc.progress?"block":"none",gc.rtl?kc.wrapper.classList.add("rtl"):kc.wrapper.classList.remove("rtl"),gc.center?kc.wrapper.classList.add("center"):kc.wrapper.classList.remove("center"),gc.mouseWheel?(document.addEventListener("DOMMouseScroll",Ib,!1),document.addEventListener("mousewheel",Ib,!1)):(document.removeEventListener("DOMMouseScroll",Ib,!1),document.removeEventListener("mousewheel",Ib,!1)),gc.rollingLinks?w():x(),gc.previewLinks?y():(z(),y("[data-preview-link]")),bc&&(bc.destroy(),bc=null),b>1&&gc.autoSlide&&gc.autoSlideStoppable&&lc.canvas&&lc.requestAnimationFrame&&(bc=new Wb(kc.wrapper,function(){return Math.min(Math.max((Date.now()-rc)/pc,0),1)}),bc.on("click",Vb),sc=!1),gc.fragments===!1&&m(kc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),gc.theme&&kc.theme){var c=kc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];gc.theme!==e&&(c=c.replace(d,gc.theme),kc.theme.setAttribute("href",c))}T()}function j(){if(oc=!0,window.addEventListener("hashchange",Qb,!1),window.addEventListener("resize",Rb,!1),gc.touch&&(kc.wrapper.addEventListener("touchstart",Cb,!1),kc.wrapper.addEventListener("touchmove",Db,!1),kc.wrapper.addEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.addEventListener("pointerdown",Fb,!1),kc.wrapper.addEventListener("pointermove",Gb,!1),kc.wrapper.addEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.addEventListener("MSPointerDown",Fb,!1),kc.wrapper.addEventListener("MSPointerMove",Gb,!1),kc.wrapper.addEventListener("MSPointerUp",Hb,!1))),gc.keyboard&&document.addEventListener("keydown",Bb,!1),gc.progress&&kc.progress&&kc.progress.addEventListener("click",Jb,!1),gc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Sb,!1)}["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.addEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.addEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.addEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.addEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.addEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.addEventListener(a,Pb,!1)})})}function k(){oc=!1,document.removeEventListener("keydown",Bb,!1),window.removeEventListener("hashchange",Qb,!1),window.removeEventListener("resize",Rb,!1),kc.wrapper.removeEventListener("touchstart",Cb,!1),kc.wrapper.removeEventListener("touchmove",Db,!1),kc.wrapper.removeEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.removeEventListener("pointerdown",Fb,!1),kc.wrapper.removeEventListener("pointermove",Gb,!1),kc.wrapper.removeEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.removeEventListener("MSPointerDown",Fb,!1),kc.wrapper.removeEventListener("MSPointerMove",Gb,!1),kc.wrapper.removeEventListener("MSPointerUp",Hb,!1)),gc.progress&&kc.progress&&kc.progress.removeEventListener("click",Jb,!1),["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.removeEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.removeEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.removeEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.removeEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.removeEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.removeEventListener(a,Pb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){gc.hideAddressBar&&ac&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),kc.wrapper.dispatchEvent(c)}function w(){if(lc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(cc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(cc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ub,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ub,!1)})}function A(a){B(),kc.preview=document.createElement("div"),kc.preview.classList.add("preview-link-overlay"),kc.wrapper.appendChild(kc.preview),kc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),kc.preview.querySelector("iframe").addEventListener("load",function(){kc.preview.classList.add("loaded")},!1),kc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),kc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){kc.preview.classList.add("visible")},1)}function B(){kc.preview&&(kc.preview.setAttribute("src",""),kc.preview.parentNode.removeChild(kc.preview),kc.preview=null)}function C(){if(kc.wrapper&&!s()){var a=kc.wrapper.offsetWidth,b=kc.wrapper.offsetHeight;a-=b*gc.margin,b-=b*gc.margin;var c=gc.width,d=gc.height,e=20;D(gc.width,gc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),kc.slides.style.width=c+"px",kc.slides.style.height=d+"px",jc=Math.min(a/c,b/d),jc=Math.max(jc,gc.minScale),jc=Math.min(jc,gc.maxScale),"undefined"==typeof kc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?p(kc.slides,"translate(-50%, -50%) scale("+jc+") translate(50%, 50%)"):kc.slides.style.zoom=jc;for(var f=m(document.querySelectorAll(cc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=gc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(q(i)/2)-e,-d/2)+"px":"")}Y(),ab()}}function D(a,b){m(kc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(gc.overview){rb();var a=kc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;kc.wrapper.classList.add("overview"),kc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(dc),d=0,e=c.length;e>d;d++){var f=c[d],g=gc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Xb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Xb?Yb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Tb,!0)}else f.addEventListener("click",Tb,!0)}X(),C(),a||v("overviewshown",{indexh:Xb,indexv:Yb,currentSlide:$b})}}function H(){gc.overview&&(kc.wrapper.classList.remove("overview"),kc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){kc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(cc)).forEach(function(a){p(a,""),a.removeEventListener("click",Tb,!0)}),S(Xb,Yb),qb(),v("overviewhidden",{indexh:Xb,indexv:Yb,currentSlide:$b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return kc.wrapper.classList.contains("overview")}function K(a){return a=a?a:$b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=kc.wrapper.classList.contains("paused");rb(),kc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=kc.wrapper.classList.contains("paused");kc.wrapper.classList.remove("paused"),qb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return kc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?tb():sb():sc?tb():sb()}function R(){return!(!pc||sc)}function S(a,b,c,d){Zb=$b;var e=document.querySelectorAll(dc);void 0===b&&(b=F(e[a])),Zb&&Zb.parentNode&&Zb.parentNode.classList.contains("stack")&&E(Zb.parentNode,Yb);var f=ic.concat();ic.length=0;var g=Xb||0,h=Yb||0;Xb=W(dc,void 0===a?Xb:a),Yb=W(ec,void 0===b?Yb:b),X(),C();a:for(var i=0,j=ic.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(dc));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){mb(a.querySelectorAll(".fragment"))}),0===b.length&&mb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){gc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=gc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),gc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),gc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(ic=ic.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(dc)),d=c.length;if(d){var e=J()?10:gc.viewDistance;ac&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Xb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Xb?Math.abs(Yb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){gc.progress&&kc.progress&&(kc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(gc.slideNumber&&kc.slideNumber){var a=Xb;Yb>0&&(a+=" - "+Yb),kc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();kc.controlsLeft.concat(kc.controlsRight).concat(kc.controlsUp).concat(kc.controlsDown).concat(kc.controlsPrev).concat(kc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&kc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&kc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&kc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&kc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&kc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&kc.controlsNext.forEach(function(a){a.classList.add("enabled")}),$b&&(b.prev&&kc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K($b)?(b.prev&&kc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&kc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=gc.rtl?"future":"past",d=gc.rtl?"past":"future";if(m(kc.background.childNodes).forEach(function(e,f){Xb>f?e.className="slide-background "+c:f>Xb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Xb)&&m(e.childNodes).forEach(function(a,c){Yb>c?a.className="slide-background past":c>Yb?a.className="slide-background future":(a.className="slide-background present",f===Xb&&(b=a))})}),b){var e=_b?_b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==_b&&kc.background.classList.add("no-transition"),_b=b}setTimeout(function(){kc.background.classList.remove("no-transition")},1)}function ab(){if(gc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(dc),d=document.querySelectorAll(ec),e=kc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=kc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Xb,i=kc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Yb:0;kc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(dc),b=document.querySelectorAll(ec),c={left:Xb>0||gc.loop,right:Xb0,down:Yb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(dc)),b=document.querySelectorAll(cc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=$b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Xb||0,Yb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Xb||h!==Yb)&&S(g,h)}}function ib(a){if(gc.history)if(clearTimeout(nc),"number"==typeof a)nc=setTimeout(ib,a);else{var b="/",c=$b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),$b&&"string"==typeof c&&c.length?b="/"+c:((Xb>0||Yb>0)&&(b+=Xb),Yb>0&&(b+="/"+Yb)),window.location.hash=b}}function jb(a){var b,c=Xb,d=Yb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(dc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&$b){var h=$b.querySelectorAll(".fragment").length>0;if(h){var i=$b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function lb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function mb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function nb(a,b){if($b&&gc.fragments){var c=mb($b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=mb($b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function ob(){return nb(null,1)}function pb(){return nb(null,-1)}function qb(){if(rb(),$b){var a=$b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=$b.parentNode?$b.parentNode.getAttribute("data-autoslide"):null,d=$b.getAttribute("data-autoslide");pc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):gc.autoSlide,m($b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&pc&&1e3*a.duration>pc&&(pc=1e3*a.duration+1e3)}),!pc||sc||P()||J()||Reveal.isLastSlide()&&gc.loop!==!0||(qc=setTimeout(zb,pc),rc=Date.now()),bc&&bc.setPlaying(-1!==qc)}}function rb(){clearTimeout(qc),qc=-1}function sb(){sc=!0,v("autoslidepaused"),clearTimeout(qc),bc&&bc.setPlaying(!1)}function tb(){sc=!1,v("autoslideresumed"),qb()}function ub(){gc.rtl?(J()||ob()===!1)&&bb().left&&S(Xb+1):(J()||pb()===!1)&&bb().left&&S(Xb-1)}function vb(){gc.rtl?(J()||pb()===!1)&&bb().right&&S(Xb-1):(J()||ob()===!1)&&bb().right&&S(Xb+1)}function wb(){(J()||pb()===!1)&&bb().up&&S(Xb,Yb-1)}function xb(){(J()||ob()===!1)&&bb().down&&S(Xb,Yb+1)}function yb(){if(pb()===!1)if(bb().up)wb();else{var a=document.querySelector(dc+".past:nth-child("+Xb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Xb-1;S(c,b)}}}function zb(){ob()===!1&&(bb().down?xb():vb()),qb()}function Ab(){gc.autoSlideStoppable&&sb()}function Bb(a){var b=sc;Ab(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof gc.keyboard)for(var e in gc.keyboard)if(parseInt(e,10)===a.keyCode){var f=gc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:yb();break;case 78:case 34:zb();break;case 72:case 37:ub();break;case 76:case 39:vb();break;case 75:case 38:wb();break;case 74:case 40:xb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?yb():zb();break;case 13:J()?H():d=!1;break;case 66:case 190:case 191:O();break;case 70:L();break;case 65:gc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!lc.transforms3d||(kc.preview?B():I(),a.preventDefault()),qb()}}function Cb(a){tc.startX=a.touches[0].clientX,tc.startY=a.touches[0].clientY,tc.startCount=a.touches.length,2===a.touches.length&&gc.overview&&(tc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY}))}function Db(a){if(tc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Ab(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===tc.startCount&&gc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY});Math.abs(tc.startSpan-d)>tc.threshold&&(tc.captured=!0,dtc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,ub()):e<-tc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,vb()):f>tc.threshold?(tc.captured=!0,wb()):f<-tc.threshold&&(tc.captured=!0,xb()),gc.embedded?(tc.captured||K($b))&&a.preventDefault():a.preventDefault()}}}function Eb(){tc.captured=!1}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){if(Date.now()-mc>600){mc=Date.now();var b=a.detail||-a.wheelDelta;b>0?zb():yb()}}function Jb(a){Ab(a),a.preventDefault();var b=m(document.querySelectorAll(dc)).length,c=Math.floor(a.clientX/kc.wrapper.offsetWidth*b);S(c)}function Kb(a){a.preventDefault(),Ab(),ub()}function Lb(a){a.preventDefault(),Ab(),vb()}function Mb(a){a.preventDefault(),Ab(),wb()}function Nb(a){a.preventDefault(),Ab(),xb()}function Ob(a){a.preventDefault(),Ab(),yb()}function Pb(a){a.preventDefault(),Ab(),zb()}function Qb(){hb()}function Rb(){C()}function Sb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Tb(a){if(oc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Ub(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Vb(){Reveal.isLastSlide()&&gc.loop===!1?(S(0,0),tb()):sc?tb():sb()}function Wb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Xb,Yb,Zb,$b,_b,ac,bc,cc=".reveal .slides section",dc=".reveal .slides>section",ec=".reveal .slides>section.present>section",fc=".reveal .slides>section:first-of-type",gc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},hc=!1,ic=[],jc=1,kc={},lc={},mc=0,nc=0,oc=!1,pc=0,qc=0,rc=-1,sc=!1,tc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Wb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Wb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&lc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Wb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI; +this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Wb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Wb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Wb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:ub,right:vb,up:wb,down:xb,prev:yb,next:zb,navigateFragment:nb,prevFragment:pb,nextFragment:ob,navigateTo:S,navigateLeft:ub,navigateRight:vb,navigateUp:wb,navigateDown:xb,navigatePrev:yb,navigateNext:zb,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:kb,setState:lb,getProgress:fb,getIndices:jb,getSlide:function(a,b){var c=document.querySelectorAll(dc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Zb},getCurrentSlide:function(){return $b},getScale:function(){return jc},getConfig:function(){return gc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(cc+".past")?!0:!1},isLastSlide:function(){return $b?$b.nextElementSibling?!1:K($b)&&$b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return hc},addEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 20a725222bf538fa21561d78b89031063ba83647 Mon Sep 17 00:00:00 2001 From: Nawaz Date: Thu, 27 Mar 2014 16:39:27 +0530 Subject: Make revealJS screen reader friendly by announcing the contents of each slide presented --- js/reveal.js | 34 ++++++++++++++++++++++++++++++++++ js/reveal.min.js | 6 +++--- 2 files changed, 37 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5cbb3ff..a923efd 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -386,6 +386,8 @@ var Reveal = (function(){ // Cache references to elements dom.controls = document.querySelector( '.reveal .controls' ); + dom.wrapper.setAttribute( 'role','application' ); + // There can be multiple instances of controls throughout the page dom.controlsLeft = toArray( document.querySelectorAll( '.navigate-left' ) ); dom.controlsRight = toArray( document.querySelectorAll( '.navigate-right' ) ); @@ -394,6 +396,31 @@ var Reveal = (function(){ dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) ); dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) ); + dom.statusDiv = createStatusDiv(); + } + + /** + * Creates a hidden div with role aria-live to announce the current slide content + * Hide the div off-screen to make it available only to Assistive Technologies + */ + function createStatusDiv() { + + var statusDiv = document.getElementById( 'statusDiv' ); + if( !statusDiv ){ + statusDiv = document.createElement( 'div' ); + var statusStyle = statusDiv.style; + statusStyle.position = "absolute"; + statusStyle.height = "1px"; + statusStyle.width = "1px"; + statusStyle.overflow ="hidden"; + statusStyle.clip = "rect( 1px, 1px, 1px, 1px )"; + statusDiv.setAttribute( 'id', 'statusDiv' ); + statusDiv.setAttribute( 'aria-live', 'polite' ); + statusDiv.setAttribute( 'aria-atomic','true' ); + dom.wrapper.appendChild( statusDiv ); + } + return statusDiv; + } /** @@ -1544,6 +1571,7 @@ var Reveal = (function(){ // stacks if( previousSlide ) { previousSlide.classList.remove( 'present' ); + previousSlide.setAttribute( 'aria-hidden', 'true' ); // Reset all slides upon navigate to home // Issue: #285 @@ -1628,6 +1656,7 @@ var Reveal = (function(){ verticalSlide.classList.remove( 'present' ); verticalSlide.classList.remove( 'past' ); verticalSlide.classList.add( 'future' ); + verticalSlide.setAttribute( 'aria-hidden', 'true' ); } } ); @@ -1703,6 +1732,7 @@ var Reveal = (function(){ // http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute element.setAttribute( 'hidden', '' ); + element.setAttribute( 'aria-hidden', 'true' ); if( i < index ) { // Any element previous to index is given the 'past' class @@ -1740,6 +1770,8 @@ var Reveal = (function(){ // Mark the current slide as present slides[index].classList.add( 'present' ); slides[index].removeAttribute( 'hidden' ); + slides[index].removeAttribute( 'aria-hidden' ); + dom.statusDiv.innerHTML = slides[index].innerHTML; // If this slide has a state associated with it, add it // onto the current state of the deck @@ -2391,6 +2423,8 @@ var Reveal = (function(){ if( !element.classList.contains( 'visible' ) ) fragmentsShown.push( element ); element.classList.add( 'visible' ); element.classList.remove( 'current-fragment' ); + //Announce the fragments one by one to the Screen Reader + dom.statusDiv.innerHTML = element.innerHTML; if( i === index ) { element.classList.add( 'current-fragment' ); diff --git a/js/reveal.min.js b/js/reveal.min.js index a13bd48..f3d1e04 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2014-03-13, 09:22) + * reveal.js 2.6.2 (2014-03-27, 16:30) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!ec.transforms2d&&!ec.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(_b,a),k(_b,d),r(),c()}function b(){ec.transforms3d="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,ec.transforms2d="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,ec.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ec.requestAnimationFrame="function"==typeof ec.requestAnimationFrameMethod,ec.canvas=!!document.createElement("canvas").getContext,Vb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=_b.dependencies.length;h>g;g++){var i=_b.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),Q(),h(),cb(),X(!0),setTimeout(function(){dc.slides.classList.remove("no-transition"),ac=!0,t("ready",{indexh:Qb,indexv:Rb,currentSlide:Tb})},1)}function e(){dc.theme=document.querySelector("#theme"),dc.wrapper=document.querySelector(".reveal"),dc.slides=document.querySelector(".reveal .slides"),dc.slides.classList.add("no-transition"),dc.background=f(dc.wrapper,"div","backgrounds",null),dc.progress=f(dc.wrapper,"div","progress",""),dc.progressbar=dc.progress.querySelector("span"),f(dc.wrapper,"aside","controls",''),dc.slideNumber=f(dc.wrapper,"div","slide-number",""),f(dc.wrapper,"div","state-background",null),f(dc.wrapper,"div","pause-overlay",null),dc.controls=document.querySelector(".reveal .controls"),dc.controlsLeft=l(document.querySelectorAll(".navigate-left")),dc.controlsRight=l(document.querySelectorAll(".navigate-right")),dc.controlsUp=l(document.querySelectorAll(".navigate-up")),dc.controlsDown=l(document.querySelectorAll(".navigate-down")),dc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),dc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),dc.background.innerHTML="",dc.background.classList.add("no-transition"),l(document.querySelectorAll(Yb)).forEach(function(b){var c;c=q()?a(b,b):a(b,dc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),_b.parallaxBackgroundImage?(dc.background.style.backgroundImage='url("'+_b.parallaxBackgroundImage+'")',dc.background.style.backgroundSize=_b.parallaxBackgroundSize,setTimeout(function(){dc.wrapper.classList.add("has-parallax-background")},1)):(dc.background.style.backgroundImage="",dc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Xb).length;if(dc.wrapper.classList.remove(_b.transition),"object"==typeof a&&k(_b,a),ec.transforms3d===!1&&(_b.transition="linear"),dc.wrapper.classList.add(_b.transition),dc.wrapper.setAttribute("data-transition-speed",_b.transitionSpeed),dc.wrapper.setAttribute("data-background-transition",_b.backgroundTransition),dc.controls.style.display=_b.controls?"block":"none",dc.progress.style.display=_b.progress?"block":"none",_b.rtl?dc.wrapper.classList.add("rtl"):dc.wrapper.classList.remove("rtl"),_b.center?dc.wrapper.classList.add("center"):dc.wrapper.classList.remove("center"),_b.mouseWheel?(document.addEventListener("DOMMouseScroll",Bb,!1),document.addEventListener("mousewheel",Bb,!1)):(document.removeEventListener("DOMMouseScroll",Bb,!1),document.removeEventListener("mousewheel",Bb,!1)),_b.rollingLinks?u():v(),_b.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&_b.autoSlide&&_b.autoSlideStoppable&&ec.canvas&&ec.requestAnimationFrame?(Wb=new Pb(dc.wrapper,function(){return Math.min(Math.max((Date.now()-mc)/kc,0),1)}),Wb.on("click",Ob),nc=!1):Wb&&(Wb.destroy(),Wb=null),_b.theme&&dc.theme){var c=dc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];_b.theme!==e&&(c=c.replace(d,_b.theme),dc.theme.setAttribute("href",c))}P()}function i(){if(jc=!0,window.addEventListener("hashchange",Jb,!1),window.addEventListener("resize",Kb,!1),_b.touch&&(dc.wrapper.addEventListener("touchstart",vb,!1),dc.wrapper.addEventListener("touchmove",wb,!1),dc.wrapper.addEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.addEventListener("MSPointerDown",yb,!1),dc.wrapper.addEventListener("MSPointerMove",zb,!1),dc.wrapper.addEventListener("MSPointerUp",Ab,!1))),_b.keyboard&&document.addEventListener("keydown",ub,!1),_b.progress&&dc.progress&&dc.progress.addEventListener("click",Cb,!1),_b.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Lb,!1)}["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.addEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.addEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.addEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.addEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.addEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.addEventListener(a,Ib,!1)})})}function j(){jc=!1,document.removeEventListener("keydown",ub,!1),window.removeEventListener("hashchange",Jb,!1),window.removeEventListener("resize",Kb,!1),dc.wrapper.removeEventListener("touchstart",vb,!1),dc.wrapper.removeEventListener("touchmove",wb,!1),dc.wrapper.removeEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.removeEventListener("MSPointerDown",yb,!1),dc.wrapper.removeEventListener("MSPointerMove",zb,!1),dc.wrapper.removeEventListener("MSPointerUp",Ab,!1)),_b.progress&&dc.progress&&dc.progress.removeEventListener("click",Cb,!1),["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.removeEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.removeEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.removeEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.removeEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.removeEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.removeEventListener(a,Ib,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){_b.hideAddressBar&&Vb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),dc.wrapper.dispatchEvent(c)}function u(){if(ec.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Xb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Xb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Nb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Nb,!1)})}function y(a){z(),dc.preview=document.createElement("div"),dc.preview.classList.add("preview-link-overlay"),dc.wrapper.appendChild(dc.preview),dc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),dc.preview.querySelector("iframe").addEventListener("load",function(){dc.preview.classList.add("loaded")},!1),dc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),dc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){dc.preview.classList.add("visible")},1)}function z(){dc.preview&&(dc.preview.setAttribute("src",""),dc.preview.parentNode.removeChild(dc.preview),dc.preview=null)}function A(){if(dc.wrapper&&!q()){var a=dc.wrapper.offsetWidth,b=dc.wrapper.offsetHeight;a-=b*_b.margin,b-=b*_b.margin;var c=_b.width,d=_b.height,e=20;B(_b.width,_b.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),dc.slides.style.width=c+"px",dc.slides.style.height=d+"px",cc=Math.min(a/c,b/d),cc=Math.max(cc,_b.minScale),cc=Math.min(cc,_b.maxScale),"undefined"==typeof dc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(dc.slides,"translate(-50%, -50%) scale("+cc+") translate(50%, 50%)"):dc.slides.style.zoom=cc;for(var f=l(document.querySelectorAll(Xb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=_b.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}U(),Y()}}function B(a,b,c){l(dc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(_b.overview){kb();var a=dc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;dc.wrapper.classList.add("overview"),dc.wrapper.classList.remove("overview-deactivating"),clearTimeout(hc),clearTimeout(ic),hc=setTimeout(function(){for(var c=document.querySelectorAll(Yb),d=0,e=c.length;e>d;d++){var f=c[d],g=_b.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Qb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Qb?Rb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Mb,!0)}else f.addEventListener("click",Mb,!0)}T(),A(),a||t("overviewshown",{indexh:Qb,indexv:Rb,currentSlide:Tb})},10)}}function F(){_b.overview&&(clearTimeout(hc),clearTimeout(ic),dc.wrapper.classList.remove("overview"),dc.wrapper.classList.add("overview-deactivating"),ic=setTimeout(function(){dc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Xb)).forEach(function(a){n(a,""),a.removeEventListener("click",Mb,!0)}),O(Qb,Rb),jb(),t("overviewhidden",{indexh:Qb,indexv:Rb,currentSlide:Tb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return dc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Tb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=dc.wrapper.classList.contains("paused");kb(),dc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=dc.wrapper.classList.contains("paused");dc.wrapper.classList.remove("paused"),jb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return dc.wrapper.classList.contains("paused")}function O(a,b,c,d){Sb=Tb;var e=document.querySelectorAll(Yb);void 0===b&&(b=D(e[a])),Sb&&Sb.parentNode&&Sb.parentNode.classList.contains("stack")&&C(Sb.parentNode,Rb);var f=bc.concat();bc.length=0;var g=Qb||0,h=Rb||0;Qb=S(Yb,void 0===a?Qb:a),Rb=S(Zb,void 0===b?Rb:b),T(),A();a:for(var i=0,j=bc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function R(){var a=l(document.querySelectorAll(Yb));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){fb(a.querySelectorAll(".fragment"))}),0===b.length&&fb(a.querySelectorAll(".fragment"))})}function S(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){_b.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=_b.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(bc=bc.concat(m.split(" ")))}else b=0;return b}function T(){var a,b,c=l(document.querySelectorAll(Yb)),d=c.length;if(d){var e=H()?10:_b.viewDistance;Vb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Qb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Qb?Math.abs(Rb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function U(){if(_b.progress&&dc.progress){var a=l(document.querySelectorAll(Yb)),b=document.querySelectorAll(Xb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Rb),dc.slideNumber.innerHTML=a}}function W(){var a=Z(),b=$();dc.controlsLeft.concat(dc.controlsRight).concat(dc.controlsUp).concat(dc.controlsDown).concat(dc.controlsPrev).concat(dc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&dc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&dc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&dc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&dc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&dc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&dc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Tb&&(b.prev&&dc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Tb)?(b.prev&&dc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&dc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function X(a){var b=null,c=_b.rtl?"future":"past",d=_b.rtl?"past":"future";if(l(dc.background.childNodes).forEach(function(e,f){Qb>f?e.className="slide-background "+c:f>Qb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Qb)&&l(e.childNodes).forEach(function(a,c){Rb>c?a.className="slide-background past":c>Rb?a.className="slide-background future":(a.className="slide-background present",f===Qb&&(b=a))})}),b){var e=Ub?Ub.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Ub&&dc.background.classList.add("no-transition"),Ub=b}setTimeout(function(){dc.background.classList.remove("no-transition")},1)}function Y(){if(_b.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Yb),d=document.querySelectorAll(Zb),e=dc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=dc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Qb,i=dc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Rb:0;dc.background.style.backgroundPosition=h+"px "+k+"px"}}function Z(){var a=document.querySelectorAll(Yb),b=document.querySelectorAll(Zb),c={left:Qb>0||_b.loop,right:Qb0,down:Rb0,next:!!b.length}}return{prev:!1,next:!1}}function _(a){a&&!bb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function ab(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function bb(){return!!window.location.search.match(/receiver/gi)}function cb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);O(e.h,e.v)}else O(Qb||0,Rb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Qb||g!==Rb)&&O(f,g)}}function db(a){if(_b.history)if(clearTimeout(gc),"number"==typeof a)gc=setTimeout(db,a);else{var b="/";Tb&&"string"==typeof Tb.getAttribute("id")?b="/"+Tb.getAttribute("id"):((Qb>0||Rb>0)&&(b+=Qb),Rb>0&&(b+="/"+Rb)),window.location.hash=b}}function eb(a){var b,c=Qb,d=Rb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(Yb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Tb){var h=Tb.querySelectorAll(".fragment").length>0;if(h){var i=Tb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function fb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function gb(a,b){if(Tb&&_b.fragments){var c=fb(Tb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=fb(Tb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),W(),!(!e.length&&!f.length)}}return!1}function hb(){return gb(null,1)}function ib(){return gb(null,-1)}function jb(){if(kb(),Tb){var a=Tb.parentNode?Tb.parentNode.getAttribute("data-autoslide"):null,b=Tb.getAttribute("data-autoslide");kc=b?parseInt(b,10):a?parseInt(a,10):_b.autoSlide,l(Tb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&kc&&1e3*a.duration>kc&&(kc=1e3*a.duration+1e3)}),!kc||nc||N()||H()||Reveal.isLastSlide()&&_b.loop!==!0||(lc=setTimeout(sb,kc),mc=Date.now()),Wb&&Wb.setPlaying(-1!==lc)}}function kb(){clearTimeout(lc),lc=-1}function lb(){nc=!0,clearTimeout(lc),Wb&&Wb.setPlaying(!1)}function mb(){nc=!1,jb()}function nb(){_b.rtl?(H()||hb()===!1)&&Z().left&&O(Qb+1):(H()||ib()===!1)&&Z().left&&O(Qb-1)}function ob(){_b.rtl?(H()||ib()===!1)&&Z().right&&O(Qb-1):(H()||hb()===!1)&&Z().right&&O(Qb+1)}function pb(){(H()||ib()===!1)&&Z().up&&O(Qb,Rb-1)}function qb(){(H()||hb()===!1)&&Z().down&&O(Qb,Rb+1)}function rb(){if(ib()===!1)if(Z().up)pb();else{var a=document.querySelector(Yb+".past:nth-child("+Qb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Qb-1;O(c,b)}}}function sb(){hb()===!1&&(Z().down?qb():ob()),jb()}function tb(){_b.autoSlideStoppable&&lb()}function ub(a){tb(a),document.activeElement;var b=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof _b.keyboard)for(var d in _b.keyboard)if(parseInt(d,10)===a.keyCode){var e=_b.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:rb();break;case 78:case 34:sb();break;case 72:case 37:nb();break;case 76:case 39:ob();break;case 75:case 38:pb();break;case 74:case 40:qb();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?rb():sb();break;case 13:H()?F():c=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ec.transforms3d||(dc.preview?z():G(),a.preventDefault()),jb()}}function vb(a){oc.startX=a.touches[0].clientX,oc.startY=a.touches[0].clientY,oc.startCount=a.touches.length,2===a.touches.length&&_b.overview&&(oc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY}))}function wb(a){if(oc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{tb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===oc.startCount&&_b.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY});Math.abs(oc.startSpan-d)>oc.threshold&&(oc.captured=!0,doc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,nb()):e<-oc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,ob()):f>oc.threshold?(oc.captured=!0,pb()):f<-oc.threshold&&(oc.captured=!0,qb()),_b.embedded?(oc.captured||I(Tb))&&a.preventDefault():a.preventDefault()}}}function xb(){oc.captured=!1}function yb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],vb(a))}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){if(Date.now()-fc>600){fc=Date.now();var b=a.detail||-a.wheelDelta;b>0?sb():rb()}}function Cb(a){tb(a),a.preventDefault();var b=l(document.querySelectorAll(Yb)).length,c=Math.floor(a.clientX/dc.wrapper.offsetWidth*b);O(c)}function Db(a){a.preventDefault(),tb(),nb()}function Eb(a){a.preventDefault(),tb(),ob()}function Fb(a){a.preventDefault(),tb(),pb()}function Gb(a){a.preventDefault(),tb(),qb()}function Hb(a){a.preventDefault(),tb(),rb()}function Ib(a){a.preventDefault(),tb(),sb()}function Jb(){cb()}function Kb(){A()}function Lb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Mb(a){if(jc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);O(c,d)}}}function Nb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Ob(){Reveal.isLastSlide()&&_b.loop===!1?(O(0,0),mb()):nc?mb():lb()}function Pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb=".reveal .slides section",Yb=".reveal .slides>section",Zb=".reveal .slides>section.present>section",$b=".reveal .slides>section:first-of-type",_b={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ac=!1,bc=[],cc=1,dc={},ec={},fc=0,gc=0,hc=0,ic=0,jc=!1,kc=0,lc=0,mc=-1,nc=!1,oc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ec.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:P,slide:O,left:nb,right:ob,up:pb,down:qb,prev:rb,next:sb,navigateFragment:gb,prevFragment:ib,nextFragment:hb,navigateTo:O,navigateLeft:nb,navigateRight:ob,navigateUp:pb,navigateDown:qb,navigatePrev:rb,navigateNext:sb,layout:A,availableRoutes:Z,availableFragments:$,toggleOverview:G,togglePause:M,isOverview:H,isPaused:N,addEventListeners:i,removeEventListeners:j,getIndices:eb,getSlide:function(a,b){var c=document.querySelectorAll(Yb)[a],d=c&&c.querySelectorAll("section"); -return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Sb},getCurrentSlide:function(){return Tb},getScale:function(){return cc},getConfig:function(){return _b},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Xb+".past")?!0:!1},isLastSlide:function(){return Tb?Tb.nextElementSibling?!1:I(Tb)&&Tb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ac},addEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!fc.transforms2d&&!fc.transforms3d)return void document.body.setAttribute("class","no-transforms");window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(ac,a),l(ac,d),s(),c()}function b(){fc.transforms3d="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,fc.transforms2d="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,fc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,fc.requestAnimationFrame="function"==typeof fc.requestAnimationFrameMethod,fc.canvas=!!document.createElement("canvas").getContext,Wb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=ac.dependencies.length;h>g;g++){var i=ac.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),R(),i(),db(),Y(!0),setTimeout(function(){ec.slides.classList.remove("no-transition"),bc=!0,u("ready",{indexh:Rb,indexv:Sb,currentSlide:Ub})},1)}function e(){ec.theme=document.querySelector("#theme"),ec.wrapper=document.querySelector(".reveal"),ec.slides=document.querySelector(".reveal .slides"),ec.slides.classList.add("no-transition"),ec.background=g(ec.wrapper,"div","backgrounds",null),ec.progress=g(ec.wrapper,"div","progress",""),ec.progressbar=ec.progress.querySelector("span"),g(ec.wrapper,"aside","controls",''),ec.slideNumber=g(ec.wrapper,"div","slide-number",""),g(ec.wrapper,"div","state-background",null),g(ec.wrapper,"div","pause-overlay",null),ec.controls=document.querySelector(".reveal .controls"),ec.wrapper.setAttribute("role","application"),ec.controlsLeft=m(document.querySelectorAll(".navigate-left")),ec.controlsRight=m(document.querySelectorAll(".navigate-right")),ec.controlsUp=m(document.querySelectorAll(".navigate-up")),ec.controlsDown=m(document.querySelectorAll(".navigate-down")),ec.controlsPrev=m(document.querySelectorAll(".navigate-prev")),ec.controlsNext=m(document.querySelectorAll(".navigate-next")),ec.statusDiv=f()}function f(){var a=document.getElementById("statusDiv");if(!a){a=document.createElement("div");var b=a.style;b.position="absolute",b.height="1px",b.width="1px",b.overflow="hidden",b.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","statusDiv"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),ec.wrapper.appendChild(a)}return a}function g(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function h(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),ec.background.innerHTML="",ec.background.classList.add("no-transition"),m(document.querySelectorAll(Zb)).forEach(function(b){var c;c=r()?a(b,b):a(b,ec.background),m(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),ac.parallaxBackgroundImage?(ec.background.style.backgroundImage='url("'+ac.parallaxBackgroundImage+'")',ec.background.style.backgroundSize=ac.parallaxBackgroundSize,setTimeout(function(){ec.wrapper.classList.add("has-parallax-background")},1)):(ec.background.style.backgroundImage="",ec.wrapper.classList.remove("has-parallax-background"))}function i(a){var b=document.querySelectorAll(Yb).length;if(ec.wrapper.classList.remove(ac.transition),"object"==typeof a&&l(ac,a),fc.transforms3d===!1&&(ac.transition="linear"),ec.wrapper.classList.add(ac.transition),ec.wrapper.setAttribute("data-transition-speed",ac.transitionSpeed),ec.wrapper.setAttribute("data-background-transition",ac.backgroundTransition),ec.controls.style.display=ac.controls?"block":"none",ec.progress.style.display=ac.progress?"block":"none",ac.rtl?ec.wrapper.classList.add("rtl"):ec.wrapper.classList.remove("rtl"),ac.center?ec.wrapper.classList.add("center"):ec.wrapper.classList.remove("center"),ac.mouseWheel?(document.addEventListener("DOMMouseScroll",Cb,!1),document.addEventListener("mousewheel",Cb,!1)):(document.removeEventListener("DOMMouseScroll",Cb,!1),document.removeEventListener("mousewheel",Cb,!1)),ac.rollingLinks?v():w(),ac.previewLinks?x():(y(),x("[data-preview-link]")),b>1&&ac.autoSlide&&ac.autoSlideStoppable&&fc.canvas&&fc.requestAnimationFrame?(Xb=new Qb(ec.wrapper,function(){return Math.min(Math.max((Date.now()-nc)/lc,0),1)}),Xb.on("click",Pb),oc=!1):Xb&&(Xb.destroy(),Xb=null),ac.theme&&ec.theme){var c=ec.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];ac.theme!==e&&(c=c.replace(d,ac.theme),ec.theme.setAttribute("href",c))}Q()}function j(){if(kc=!0,window.addEventListener("hashchange",Kb,!1),window.addEventListener("resize",Lb,!1),ac.touch&&(ec.wrapper.addEventListener("touchstart",wb,!1),ec.wrapper.addEventListener("touchmove",xb,!1),ec.wrapper.addEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.addEventListener("MSPointerDown",zb,!1),ec.wrapper.addEventListener("MSPointerMove",Ab,!1),ec.wrapper.addEventListener("MSPointerUp",Bb,!1))),ac.keyboard&&document.addEventListener("keydown",vb,!1),ac.progress&&ec.progress&&ec.progress.addEventListener("click",Db,!1),ac.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Mb,!1)}["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.addEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.addEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.addEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.addEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.addEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.addEventListener(a,Jb,!1)})})}function k(){kc=!1,document.removeEventListener("keydown",vb,!1),window.removeEventListener("hashchange",Kb,!1),window.removeEventListener("resize",Lb,!1),ec.wrapper.removeEventListener("touchstart",wb,!1),ec.wrapper.removeEventListener("touchmove",xb,!1),ec.wrapper.removeEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.removeEventListener("MSPointerDown",zb,!1),ec.wrapper.removeEventListener("MSPointerMove",Ab,!1),ec.wrapper.removeEventListener("MSPointerUp",Bb,!1)),ac.progress&&ec.progress&&ec.progress.removeEventListener("click",Db,!1),["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.removeEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.removeEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.removeEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.removeEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.removeEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.removeEventListener(a,Jb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;m(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){ac.hideAddressBar&&Wb&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),ec.wrapper.dispatchEvent(c)}function v(){if(fc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Yb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(Yb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ob,!1)})}function y(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ob,!1)})}function z(a){A(),ec.preview=document.createElement("div"),ec.preview.classList.add("preview-link-overlay"),ec.wrapper.appendChild(ec.preview),ec.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),ec.preview.querySelector("iframe").addEventListener("load",function(){ec.preview.classList.add("loaded")},!1),ec.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),ec.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){ec.preview.classList.add("visible")},1)}function A(){ec.preview&&(ec.preview.setAttribute("src",""),ec.preview.parentNode.removeChild(ec.preview),ec.preview=null)}function B(){if(ec.wrapper&&!r()){var a=ec.wrapper.offsetWidth,b=ec.wrapper.offsetHeight;a-=b*ac.margin,b-=b*ac.margin;var c=ac.width,d=ac.height,e=20;C(ac.width,ac.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),ec.slides.style.width=c+"px",ec.slides.style.height=d+"px",dc=Math.min(a/c,b/d),dc=Math.max(dc,ac.minScale),dc=Math.min(dc,ac.maxScale),"undefined"==typeof ec.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(ec.slides,"translate(-50%, -50%) scale("+dc+") translate(50%, 50%)"):ec.slides.style.zoom=dc;for(var f=m(document.querySelectorAll(Yb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=ac.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}V(),Z()}}function C(a,b,c){m(ec.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(ac.overview){lb();var a=ec.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;ec.wrapper.classList.add("overview"),ec.wrapper.classList.remove("overview-deactivating"),clearTimeout(ic),clearTimeout(jc),ic=setTimeout(function(){for(var c=document.querySelectorAll(Zb),d=0,e=c.length;e>d;d++){var f=c[d],g=ac.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Rb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Rb?Sb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Nb,!0)}else f.addEventListener("click",Nb,!0)}U(),B(),a||u("overviewshown",{indexh:Rb,indexv:Sb,currentSlide:Ub})},10)}}function G(){ac.overview&&(clearTimeout(ic),clearTimeout(jc),ec.wrapper.classList.remove("overview"),ec.wrapper.classList.add("overview-deactivating"),jc=setTimeout(function(){ec.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(Yb)).forEach(function(a){o(a,""),a.removeEventListener("click",Nb,!0)}),P(Rb,Sb),kb(),u("overviewhidden",{indexh:Rb,indexv:Sb,currentSlide:Ub}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return ec.wrapper.classList.contains("overview")}function J(a){return a=a?a:Ub,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=ec.wrapper.classList.contains("paused");lb(),ec.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=ec.wrapper.classList.contains("paused");ec.wrapper.classList.remove("paused"),kb(),a&&u("resumed")}function N(){O()?M():L()}function O(){return ec.wrapper.classList.contains("paused")}function P(a,b,c,d){Tb=Ub;var e=document.querySelectorAll(Zb);void 0===b&&(b=E(e[a])),Tb&&Tb.parentNode&&Tb.parentNode.classList.contains("stack")&&D(Tb.parentNode,Sb);var f=cc.concat();cc.length=0;var g=Rb||0,h=Sb||0;Rb=T(Zb,void 0===a?Rb:a),Sb=T($b,void 0===b?Sb:b),U(),B();a:for(var i=0,j=cc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"),a.setAttribute("aria-hidden","true"))})})}function S(){var a=m(document.querySelectorAll(Zb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){gb(a.querySelectorAll(".fragment"))}),0===b.length&&gb(a.querySelectorAll(".fragment"))})}function T(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){ac.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=ac.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),f.setAttribute("aria-hidden","true"),b>e){f.classList.add(g?"future":"past");for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden"),c[b].removeAttribute("aria-hidden"),ec.statusDiv.innerHTML=c[b].innerHTML;var l=c[b].getAttribute("data-state");l&&(cc=cc.concat(l.split(" ")))}else b=0;return b}function U(){var a,b,c=m(document.querySelectorAll(Zb)),d=c.length;if(d){var e=I()?10:ac.viewDistance;Wb&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Rb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var l=h[k];b=Math.abs(f===Rb?Sb-k:k-j),l.style.display=a+b>e?"none":"block"}}}}function V(){if(ac.progress&&ec.progress){var a=m(document.querySelectorAll(Zb)),b=document.querySelectorAll(Yb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Sb),ec.slideNumber.innerHTML=a}}function X(){var a=$(),b=_();ec.controlsLeft.concat(ec.controlsRight).concat(ec.controlsUp).concat(ec.controlsDown).concat(ec.controlsPrev).concat(ec.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&ec.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&ec.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&ec.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&ec.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&ec.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&ec.controlsNext.forEach(function(a){a.classList.add("enabled")}),Ub&&(b.prev&&ec.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Ub)?(b.prev&&ec.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&ec.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Y(a){var b=null,c=ac.rtl?"future":"past",d=ac.rtl?"past":"future";if(m(ec.background.childNodes).forEach(function(e,f){Rb>f?e.className="slide-background "+c:f>Rb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Rb)&&m(e.childNodes).forEach(function(a,c){Sb>c?a.className="slide-background past":c>Sb?a.className="slide-background future":(a.className="slide-background present",f===Rb&&(b=a))})}),b){var e=Vb?Vb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Vb&&ec.background.classList.add("no-transition"),Vb=b}setTimeout(function(){ec.background.classList.remove("no-transition")},1)}function Z(){if(ac.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Zb),d=document.querySelectorAll($b),e=ec.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=ec.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Rb,i=ec.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Sb:0;ec.background.style.backgroundPosition=h+"px "+k+"px"}}function $(){var a=document.querySelectorAll(Zb),b=document.querySelectorAll($b),c={left:Rb>0||ac.loop,right:Rb0,down:Sb0,next:!!b.length}}return{prev:!1,next:!1}}function ab(a){a&&!cb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function bb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function cb(){return!!window.location.search.match(/receiver/gi)}function db(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);P(e.h,e.v)}else P(Rb||0,Sb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Rb||g!==Sb)&&P(f,g)}}function eb(a){if(ac.history)if(clearTimeout(hc),"number"==typeof a)hc=setTimeout(eb,a);else{var b="/";Ub&&"string"==typeof Ub.getAttribute("id")?b="/"+Ub.getAttribute("id"):((Rb>0||Sb>0)&&(b+=Rb),Sb>0&&(b+="/"+Sb)),window.location.hash=b}}function fb(a){var b,c=Rb,d=Sb;if(a){var e=J(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(Zb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Ub){var h=Ub.querySelectorAll(".fragment").length>0;if(h){var i=Ub.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function gb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function hb(a,b){if(Ub&&ac.fragments){var c=gb(Ub.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=gb(Ub.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),ec.statusDiv.innerHTML=b.innerHTML,c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),X(),!(!e.length&&!f.length)}}return!1}function ib(){return hb(null,1)}function jb(){return hb(null,-1)}function kb(){if(lb(),Ub){var a=Ub.parentNode?Ub.parentNode.getAttribute("data-autoslide"):null,b=Ub.getAttribute("data-autoslide");lc=b?parseInt(b,10):a?parseInt(a,10):ac.autoSlide,m(Ub.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&lc&&1e3*a.duration>lc&&(lc=1e3*a.duration+1e3)}),!lc||oc||O()||I()||Reveal.isLastSlide()&&ac.loop!==!0||(mc=setTimeout(tb,lc),nc=Date.now()),Xb&&Xb.setPlaying(-1!==mc)}}function lb(){clearTimeout(mc),mc=-1}function mb(){oc=!0,clearTimeout(mc),Xb&&Xb.setPlaying(!1)}function nb(){oc=!1,kb()}function ob(){ac.rtl?(I()||ib()===!1)&&$().left&&P(Rb+1):(I()||jb()===!1)&&$().left&&P(Rb-1)}function pb(){ac.rtl?(I()||jb()===!1)&&$().right&&P(Rb-1):(I()||ib()===!1)&&$().right&&P(Rb+1)}function qb(){(I()||jb()===!1)&&$().up&&P(Rb,Sb-1)}function rb(){(I()||ib()===!1)&&$().down&&P(Rb,Sb+1)}function sb(){if(jb()===!1)if($().up)qb();else{var a=document.querySelector(Zb+".past:nth-child("+Rb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Rb-1;P(c,b)}}}function tb(){ib()===!1&&($().down?rb():pb()),kb()}function ub(){ac.autoSlideStoppable&&mb()}function vb(a){ub(a);var b=(document.activeElement,!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable));if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof ac.keyboard)for(var d in ac.keyboard)if(parseInt(d,10)===a.keyCode){var e=ac.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:sb();break;case 78:case 34:tb();break;case 72:case 37:ob();break;case 76:case 39:pb();break;case 75:case 38:qb();break;case 74:case 40:rb();break;case 36:P(0);break;case 35:P(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?sb():tb();break;case 13:I()?G():c=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!fc.transforms3d||(ec.preview?A():H(),a.preventDefault()),kb()}}function wb(a){pc.startX=a.touches[0].clientX,pc.startY=a.touches[0].clientY,pc.startCount=a.touches.length,2===a.touches.length&&ac.overview&&(pc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY}))}function xb(a){if(pc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{ub(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===pc.startCount&&ac.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY});Math.abs(pc.startSpan-d)>pc.threshold&&(pc.captured=!0,dpc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,ob()):e<-pc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,pb()):f>pc.threshold?(pc.captured=!0,qb()):f<-pc.threshold&&(pc.captured=!0,rb()),ac.embedded?(pc.captured||J(Ub))&&a.preventDefault():a.preventDefault()}}}function yb(){pc.captured=!1}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){if(Date.now()-gc>600){gc=Date.now();var b=a.detail||-a.wheelDelta;b>0?tb():sb()}}function Db(a){ub(a),a.preventDefault();var b=m(document.querySelectorAll(Zb)).length,c=Math.floor(a.clientX/ec.wrapper.offsetWidth*b);P(c)}function Eb(a){a.preventDefault(),ub(),ob()}function Fb(a){a.preventDefault(),ub(),pb()}function Gb(a){a.preventDefault(),ub(),qb()}function Hb(a){a.preventDefault(),ub(),rb()}function Ib(a){a.preventDefault(),ub(),sb()}function Jb(a){a.preventDefault(),ub(),tb()}function Kb(){db()}function Lb(){B()}function Mb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Nb(a){if(kc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);P(c,d)}}}function Ob(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Pb(){Reveal.isLastSlide()&&ac.loop===!1?(P(0,0),nb()):oc?nb():mb()}function Qb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb=".reveal .slides section",Zb=".reveal .slides>section",$b=".reveal .slides>section.present>section",_b=".reveal .slides>section:first-of-type",ac={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},bc=!1,cc=[],dc=1,ec={},fc={},gc=0,hc=0,ic=0,jc=0,kc=!1,lc=0,mc=0,nc=-1,oc=!1,pc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Qb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Qb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&fc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Qb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+2*a*Math.PI,g=-Math.PI/2+2*this.progressOffset*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +},Qb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Qb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Qb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:Q,slide:P,left:ob,right:pb,up:qb,down:rb,prev:sb,next:tb,navigateFragment:hb,prevFragment:jb,nextFragment:ib,navigateTo:P,navigateLeft:ob,navigateRight:pb,navigateUp:qb,navigateDown:rb,navigatePrev:sb,navigateNext:tb,layout:B,availableRoutes:$,availableFragments:_,toggleOverview:H,togglePause:N,isOverview:I,isPaused:O,addEventListeners:j,removeEventListeners:k,getIndices:fb,getSlide:function(a,b){var c=document.querySelectorAll(Zb)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Tb},getCurrentSlide:function(){return Ub},getScale:function(){return dc},getConfig:function(){return ac},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Yb+".past")?!0:!1},isLastSlide:function(){return Ub?Ub.nextElementSibling?!1:J(Ub)&&Ub.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return bc},addEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 9947b7a5324c9783de43f867c1f7a3ac0687144f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 1 Apr 2014 09:12:41 +0200 Subject: add getTotalSlides #858 --- js/reveal.js | 11 +++++++++++ js/reveal.min.js | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5eb377b..fc0a2c0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2392,6 +2392,15 @@ var Reveal = (function(){ } + /** + * Retrieves the total number of slides in this presentation. + */ + function getTotalSlides() { + + return document.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; + + } + /** * Retrieves the current state of the presentation as * an object. This state can then be restored at any @@ -3457,6 +3466,8 @@ var Reveal = (function(){ // Returns the indices of the current, or specified, slide getIndices: getIndices, + getTotalSlides: getTotalSlides, + // Returns the slide at the specified index, y is optional getSlide: function( x, y ) { var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; diff --git a/js/reveal.min.js b/js/reveal.min.js index aa7d640..27078e2 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-03-26, 15:45) + * reveal.js 2.7.0-dev (2014-04-01, 09:10) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!lc.transforms2d&&!lc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(gc,a),l(gc,d),t(),c()}function b(){lc.transforms3d="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,lc.transforms2d="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,lc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,lc.requestAnimationFrame="function"==typeof lc.requestAnimationFrameMethod,lc.canvas=!!document.createElement("canvas").getContext,ac=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=gc.dependencies.length;h>g;g++){var i=gc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){kc.slides.classList.remove("no-transition"),hc=!0,v("ready",{indexh:Xb,indexv:Yb,currentSlide:$b})},1)}function e(){kc.theme=document.querySelector("#theme"),kc.wrapper=document.querySelector(".reveal"),kc.slides=document.querySelector(".reveal .slides"),kc.slides.classList.add("no-transition"),kc.background=f(kc.wrapper,"div","backgrounds",null),kc.progress=f(kc.wrapper,"div","progress",""),kc.progressbar=kc.progress.querySelector("span"),f(kc.wrapper,"aside","controls",''),kc.slideNumber=f(kc.wrapper,"div","slide-number",""),f(kc.wrapper,"div","state-background",null),f(kc.wrapper,"div","pause-overlay",null),kc.controls=document.querySelector(".reveal .controls"),kc.controlsLeft=m(document.querySelectorAll(".navigate-left")),kc.controlsRight=m(document.querySelectorAll(".navigate-right")),kc.controlsUp=m(document.querySelectorAll(".navigate-up")),kc.controlsDown=m(document.querySelectorAll(".navigate-down")),kc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),kc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),kc.background.innerHTML="",kc.background.classList.add("no-transition"),m(document.querySelectorAll(dc)).forEach(function(a){var b;b=s()?h(a,a):h(a,kc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),gc.parallaxBackgroundImage?(kc.background.style.backgroundImage='url("'+gc.parallaxBackgroundImage+'")',kc.background.style.backgroundSize=gc.parallaxBackgroundSize,setTimeout(function(){kc.wrapper.classList.add("has-parallax-background")},1)):(kc.background.style.backgroundImage="",kc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(cc).length;if(kc.wrapper.classList.remove(gc.transition),"object"==typeof a&&l(gc,a),lc.transforms3d===!1&&(gc.transition="linear"),kc.wrapper.classList.add(gc.transition),kc.wrapper.setAttribute("data-transition-speed",gc.transitionSpeed),kc.wrapper.setAttribute("data-background-transition",gc.backgroundTransition),kc.controls.style.display=gc.controls?"block":"none",kc.progress.style.display=gc.progress?"block":"none",gc.rtl?kc.wrapper.classList.add("rtl"):kc.wrapper.classList.remove("rtl"),gc.center?kc.wrapper.classList.add("center"):kc.wrapper.classList.remove("center"),gc.mouseWheel?(document.addEventListener("DOMMouseScroll",Ib,!1),document.addEventListener("mousewheel",Ib,!1)):(document.removeEventListener("DOMMouseScroll",Ib,!1),document.removeEventListener("mousewheel",Ib,!1)),gc.rollingLinks?w():x(),gc.previewLinks?y():(z(),y("[data-preview-link]")),bc&&(bc.destroy(),bc=null),b>1&&gc.autoSlide&&gc.autoSlideStoppable&&lc.canvas&&lc.requestAnimationFrame&&(bc=new Wb(kc.wrapper,function(){return Math.min(Math.max((Date.now()-rc)/pc,0),1)}),bc.on("click",Vb),sc=!1),gc.fragments===!1&&m(kc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),gc.theme&&kc.theme){var c=kc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];gc.theme!==e&&(c=c.replace(d,gc.theme),kc.theme.setAttribute("href",c))}T()}function j(){if(oc=!0,window.addEventListener("hashchange",Qb,!1),window.addEventListener("resize",Rb,!1),gc.touch&&(kc.wrapper.addEventListener("touchstart",Cb,!1),kc.wrapper.addEventListener("touchmove",Db,!1),kc.wrapper.addEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.addEventListener("pointerdown",Fb,!1),kc.wrapper.addEventListener("pointermove",Gb,!1),kc.wrapper.addEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.addEventListener("MSPointerDown",Fb,!1),kc.wrapper.addEventListener("MSPointerMove",Gb,!1),kc.wrapper.addEventListener("MSPointerUp",Hb,!1))),gc.keyboard&&document.addEventListener("keydown",Bb,!1),gc.progress&&kc.progress&&kc.progress.addEventListener("click",Jb,!1),gc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Sb,!1)}["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.addEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.addEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.addEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.addEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.addEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.addEventListener(a,Pb,!1)})})}function k(){oc=!1,document.removeEventListener("keydown",Bb,!1),window.removeEventListener("hashchange",Qb,!1),window.removeEventListener("resize",Rb,!1),kc.wrapper.removeEventListener("touchstart",Cb,!1),kc.wrapper.removeEventListener("touchmove",Db,!1),kc.wrapper.removeEventListener("touchend",Eb,!1),window.navigator.pointerEnabled?(kc.wrapper.removeEventListener("pointerdown",Fb,!1),kc.wrapper.removeEventListener("pointermove",Gb,!1),kc.wrapper.removeEventListener("pointerup",Hb,!1)):window.navigator.msPointerEnabled&&(kc.wrapper.removeEventListener("MSPointerDown",Fb,!1),kc.wrapper.removeEventListener("MSPointerMove",Gb,!1),kc.wrapper.removeEventListener("MSPointerUp",Hb,!1)),gc.progress&&kc.progress&&kc.progress.removeEventListener("click",Jb,!1),["touchstart","click"].forEach(function(a){kc.controlsLeft.forEach(function(b){b.removeEventListener(a,Kb,!1)}),kc.controlsRight.forEach(function(b){b.removeEventListener(a,Lb,!1)}),kc.controlsUp.forEach(function(b){b.removeEventListener(a,Mb,!1)}),kc.controlsDown.forEach(function(b){b.removeEventListener(a,Nb,!1)}),kc.controlsPrev.forEach(function(b){b.removeEventListener(a,Ob,!1)}),kc.controlsNext.forEach(function(b){b.removeEventListener(a,Pb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){gc.hideAddressBar&&ac&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),kc.wrapper.dispatchEvent(c)}function w(){if(lc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(cc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(cc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ub,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ub,!1)})}function A(a){B(),kc.preview=document.createElement("div"),kc.preview.classList.add("preview-link-overlay"),kc.wrapper.appendChild(kc.preview),kc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),kc.preview.querySelector("iframe").addEventListener("load",function(){kc.preview.classList.add("loaded")},!1),kc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),kc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){kc.preview.classList.add("visible")},1)}function B(){kc.preview&&(kc.preview.setAttribute("src",""),kc.preview.parentNode.removeChild(kc.preview),kc.preview=null)}function C(){if(kc.wrapper&&!s()){var a=kc.wrapper.offsetWidth,b=kc.wrapper.offsetHeight;a-=b*gc.margin,b-=b*gc.margin;var c=gc.width,d=gc.height,e=20;D(gc.width,gc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),kc.slides.style.width=c+"px",kc.slides.style.height=d+"px",jc=Math.min(a/c,b/d),jc=Math.max(jc,gc.minScale),jc=Math.min(jc,gc.maxScale),"undefined"==typeof kc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?p(kc.slides,"translate(-50%, -50%) scale("+jc+") translate(50%, 50%)"):kc.slides.style.zoom=jc;for(var f=m(document.querySelectorAll(cc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=gc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(q(i)/2)-e,-d/2)+"px":"")}Y(),ab()}}function D(a,b){m(kc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(gc.overview){rb();var a=kc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;kc.wrapper.classList.add("overview"),kc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(dc),d=0,e=c.length;e>d;d++){var f=c[d],g=gc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Xb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Xb?Yb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Tb,!0)}else f.addEventListener("click",Tb,!0)}X(),C(),a||v("overviewshown",{indexh:Xb,indexv:Yb,currentSlide:$b})}}function H(){gc.overview&&(kc.wrapper.classList.remove("overview"),kc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){kc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(cc)).forEach(function(a){p(a,""),a.removeEventListener("click",Tb,!0)}),S(Xb,Yb),qb(),v("overviewhidden",{indexh:Xb,indexv:Yb,currentSlide:$b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return kc.wrapper.classList.contains("overview")}function K(a){return a=a?a:$b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=kc.wrapper.classList.contains("paused");rb(),kc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=kc.wrapper.classList.contains("paused");kc.wrapper.classList.remove("paused"),qb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return kc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?tb():sb():sc?tb():sb()}function R(){return!(!pc||sc)}function S(a,b,c,d){Zb=$b;var e=document.querySelectorAll(dc);void 0===b&&(b=F(e[a])),Zb&&Zb.parentNode&&Zb.parentNode.classList.contains("stack")&&E(Zb.parentNode,Yb);var f=ic.concat();ic.length=0;var g=Xb||0,h=Yb||0;Xb=W(dc,void 0===a?Xb:a),Yb=W(ec,void 0===b?Yb:b),X(),C();a:for(var i=0,j=ic.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(dc));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){mb(a.querySelectorAll(".fragment"))}),0===b.length&&mb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){gc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=gc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),gc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),gc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(ic=ic.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(dc)),d=c.length;if(d){var e=J()?10:gc.viewDistance;ac&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Xb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Xb?Math.abs(Yb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){gc.progress&&kc.progress&&(kc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(gc.slideNumber&&kc.slideNumber){var a=Xb;Yb>0&&(a+=" - "+Yb),kc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();kc.controlsLeft.concat(kc.controlsRight).concat(kc.controlsUp).concat(kc.controlsDown).concat(kc.controlsPrev).concat(kc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&kc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&kc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&kc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&kc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&kc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&kc.controlsNext.forEach(function(a){a.classList.add("enabled")}),$b&&(b.prev&&kc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K($b)?(b.prev&&kc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&kc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&kc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=gc.rtl?"future":"past",d=gc.rtl?"past":"future";if(m(kc.background.childNodes).forEach(function(e,f){Xb>f?e.className="slide-background "+c:f>Xb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Xb)&&m(e.childNodes).forEach(function(a,c){Yb>c?a.className="slide-background past":c>Yb?a.className="slide-background future":(a.className="slide-background present",f===Xb&&(b=a))})}),b){var e=_b?_b.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==_b&&kc.background.classList.add("no-transition"),_b=b}setTimeout(function(){kc.background.classList.remove("no-transition")},1)}function ab(){if(gc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(dc),d=document.querySelectorAll(ec),e=kc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=kc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Xb,i=kc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Yb:0;kc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(dc),b=document.querySelectorAll(ec),c={left:Xb>0||gc.loop,right:Xb0,down:Yb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(dc)),b=document.querySelectorAll(cc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=$b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Xb||0,Yb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Xb||h!==Yb)&&S(g,h)}}function ib(a){if(gc.history)if(clearTimeout(nc),"number"==typeof a)nc=setTimeout(ib,a);else{var b="/",c=$b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),$b&&"string"==typeof c&&c.length?b="/"+c:((Xb>0||Yb>0)&&(b+=Xb),Yb>0&&(b+="/"+Yb)),window.location.hash=b}}function jb(a){var b,c=Xb,d=Yb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(dc));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&$b){var h=$b.querySelectorAll(".fragment").length>0;if(h){var i=$b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function lb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function mb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function nb(a,b){if($b&&gc.fragments){var c=mb($b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=mb($b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function ob(){return nb(null,1)}function pb(){return nb(null,-1)}function qb(){if(rb(),$b){var a=$b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=$b.parentNode?$b.parentNode.getAttribute("data-autoslide"):null,d=$b.getAttribute("data-autoslide");pc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):gc.autoSlide,m($b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&pc&&1e3*a.duration>pc&&(pc=1e3*a.duration+1e3)}),!pc||sc||P()||J()||Reveal.isLastSlide()&&gc.loop!==!0||(qc=setTimeout(zb,pc),rc=Date.now()),bc&&bc.setPlaying(-1!==qc)}}function rb(){clearTimeout(qc),qc=-1}function sb(){sc=!0,v("autoslidepaused"),clearTimeout(qc),bc&&bc.setPlaying(!1)}function tb(){sc=!1,v("autoslideresumed"),qb()}function ub(){gc.rtl?(J()||ob()===!1)&&bb().left&&S(Xb+1):(J()||pb()===!1)&&bb().left&&S(Xb-1)}function vb(){gc.rtl?(J()||pb()===!1)&&bb().right&&S(Xb-1):(J()||ob()===!1)&&bb().right&&S(Xb+1)}function wb(){(J()||pb()===!1)&&bb().up&&S(Xb,Yb-1)}function xb(){(J()||ob()===!1)&&bb().down&&S(Xb,Yb+1)}function yb(){if(pb()===!1)if(bb().up)wb();else{var a=document.querySelector(dc+".past:nth-child("+Xb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Xb-1;S(c,b)}}}function zb(){ob()===!1&&(bb().down?xb():vb()),qb()}function Ab(){gc.autoSlideStoppable&&sb()}function Bb(a){var b=sc;Ab(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof gc.keyboard)for(var e in gc.keyboard)if(parseInt(e,10)===a.keyCode){var f=gc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:yb();break;case 78:case 34:zb();break;case 72:case 37:ub();break;case 76:case 39:vb();break;case 75:case 38:wb();break;case 74:case 40:xb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?yb():zb();break;case 13:J()?H():d=!1;break;case 66:case 190:case 191:O();break;case 70:L();break;case 65:gc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!lc.transforms3d||(kc.preview?B():I(),a.preventDefault()),qb()}}function Cb(a){tc.startX=a.touches[0].clientX,tc.startY=a.touches[0].clientY,tc.startCount=a.touches.length,2===a.touches.length&&gc.overview&&(tc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY}))}function Db(a){if(tc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Ab(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===tc.startCount&&gc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:tc.startX,y:tc.startY});Math.abs(tc.startSpan-d)>tc.threshold&&(tc.captured=!0,dtc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,ub()):e<-tc.threshold&&Math.abs(e)>Math.abs(f)?(tc.captured=!0,vb()):f>tc.threshold?(tc.captured=!0,wb()):f<-tc.threshold&&(tc.captured=!0,xb()),gc.embedded?(tc.captured||K($b))&&a.preventDefault():a.preventDefault()}}}function Eb(){tc.captured=!1}function Fb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Cb(a))}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){if(Date.now()-mc>600){mc=Date.now();var b=a.detail||-a.wheelDelta;b>0?zb():yb()}}function Jb(a){Ab(a),a.preventDefault();var b=m(document.querySelectorAll(dc)).length,c=Math.floor(a.clientX/kc.wrapper.offsetWidth*b);S(c)}function Kb(a){a.preventDefault(),Ab(),ub()}function Lb(a){a.preventDefault(),Ab(),vb()}function Mb(a){a.preventDefault(),Ab(),wb()}function Nb(a){a.preventDefault(),Ab(),xb()}function Ob(a){a.preventDefault(),Ab(),yb()}function Pb(a){a.preventDefault(),Ab(),zb()}function Qb(){hb()}function Rb(){C()}function Sb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Tb(a){if(oc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Ub(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Vb(){Reveal.isLastSlide()&&gc.loop===!1?(S(0,0),tb()):sc?tb():sb()}function Wb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Xb,Yb,Zb,$b,_b,ac,bc,cc=".reveal .slides section",dc=".reveal .slides>section",ec=".reveal .slides>section.present>section",fc=".reveal .slides>section:first-of-type",gc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},hc=!1,ic=[],jc=1,kc={},lc={},mc=0,nc=0,oc=!1,pc=0,qc=0,rc=-1,sc=!1,tc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Wb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Wb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&lc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Wb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI; -this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Wb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Wb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Wb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:ub,right:vb,up:wb,down:xb,prev:yb,next:zb,navigateFragment:nb,prevFragment:pb,nextFragment:ob,navigateTo:S,navigateLeft:ub,navigateRight:vb,navigateUp:wb,navigateDown:xb,navigatePrev:yb,navigateNext:zb,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:kb,setState:lb,getProgress:fb,getIndices:jb,getSlide:function(a,b){var c=document.querySelectorAll(dc)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Zb},getCurrentSlide:function(){return $b},getScale:function(){return jc},getConfig:function(){return gc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(cc+".past")?!0:!1},isLastSlide:function(){return $b?$b.nextElementSibling?!1:K($b)&&$b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return hc},addEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(kc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),"undefined"==typeof lc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?p(lc.slides,"translate(-50%, -50%) scale("+kc+") translate(50%, 50%)"):lc.slides.style.zoom=kc;for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(q(i)/2)-e,-d/2)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.childNodes).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),b){var e=ac?ac.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14; +this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Xb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Xb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Xb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:vb,right:wb,up:xb,down:yb,prev:zb,next:Ab,navigateFragment:ob,prevFragment:qb,nextFragment:pb,navigateTo:S,navigateLeft:vb,navigateRight:wb,navigateUp:xb,navigateDown:yb,navigatePrev:zb,navigateNext:Ab,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:lb,setState:mb,getProgress:fb,getIndices:jb,getTotalSlides:kb,getSlide:function(a,b){var c=document.querySelectorAll(ec)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return $b},getCurrentSlide:function(){return _b},getScale:function(){return kc},getConfig:function(){return hc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(dc+".past")?!0:!1},isLastSlide:function(){return _b?_b.nextElementSibling?!1:K(_b)&&_b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ic},addEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 43bf882d0800c30f024b2c3e097d98dde65bc7c9 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 3 Apr 2014 11:58:15 +0200 Subject: revamped and greatly simplified the layout of .slides --- js/reveal.js | 8 ++++++-- js/reveal.min.js | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 41be56b..b229453 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1118,7 +1118,11 @@ var Reveal = (function(){ } // Apply scale transform as a fallback else { - transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +') translate(50%, 50%)' ); + dom.slides.style.left = '50%'; + dom.slides.style.top = '50%'; + dom.slides.style.bottom = 'auto'; + dom.slides.style.right = 'auto'; + transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' ); } // Select all slides, vertical and horizontal @@ -1139,7 +1143,7 @@ var Reveal = (function(){ slide.style.top = 0; } else { - slide.style.top = Math.max( - ( getAbsoluteHeight( slide ) / 2 ) - slidePadding, -slideHeight / 2 ) + 'px'; + slide.style.top = Math.max( ( ( slideHeight - getAbsoluteHeight( slide ) ) / 2 ) - slidePadding, 0 ) + 'px'; } } else { diff --git a/js/reveal.min.js b/js/reveal.min.js index 27078e2..89ea604 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-04-01, 09:10) + * reveal.js 2.7.0-dev (2014-04-03, 11:56) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),"undefined"==typeof lc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?p(lc.slides,"translate(-50%, -50%) scale("+kc+") translate(50%, 50%)"):lc.slides.style.zoom=kc;for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(q(i)/2)-e,-d/2)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.childNodes).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),b){var e=ac?ac.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14; +var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),"undefined"==typeof lc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?(lc.slides.style.left="50%",lc.slides.style.top="50%",lc.slides.style.bottom="auto",lc.slides.style.right="auto",p(lc.slides,"translate(-50%, -50%) scale("+kc+")")):lc.slides.style.zoom=kc;for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max((d-q(i))/2-e,0)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.childNodes).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),b){var e=ac?ac.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 58:case 59:case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14; this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Xb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Xb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Xb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:vb,right:wb,up:xb,down:yb,prev:zb,next:Ab,navigateFragment:ob,prevFragment:qb,nextFragment:pb,navigateTo:S,navigateLeft:vb,navigateRight:wb,navigateUp:xb,navigateDown:yb,navigatePrev:zb,navigateNext:Ab,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:lb,setState:mb,getProgress:fb,getIndices:jb,getTotalSlides:kb,getSlide:function(a,b){var c=document.querySelectorAll(ec)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return $b},getCurrentSlide:function(){return _b},getScale:function(){return kc},getConfig:function(){return hc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(dc+".past")?!0:!1},isLastSlide:function(){return _b?_b.nextElementSibling?!1:K(_b)&&_b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ic},addEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 170aa31d6f78130f62bffeb1cb7cc7f342fc5966 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 4 Apr 2014 09:22:15 +0200 Subject: video background playback --- js/reveal.js | 20 +++++++++++++++++--- js/reveal.min.js | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index b229453..04350d0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2001,7 +2001,7 @@ var Reveal = (function(){ } if( includeAll || h === indexh ) { - toArray( backgroundh.childNodes ).forEach( function( backgroundv, v ) { + toArray( backgroundh.querySelectorAll( 'section' ) ).forEach( function( backgroundv, v ) { if( v < indexv ) { backgroundv.className = 'slide-background past'; @@ -2021,9 +2021,22 @@ var Reveal = (function(){ } ); - // Don't transition between identical backgrounds. This - // prevents unwanted flicker. + // Stop any currently playing video background + if( previousBackground ) { + + var previousVideo = previousBackground.querySelector( 'video' ); + if( previousVideo ) previousVideo.pause(); + + } + if( currentBackground ) { + + // Start video playback + var currentVideo = currentBackground.querySelector( 'video' ); + if( currentVideo ) currentVideo.play(); + + // Don't transition between identical backgrounds. This + // prevents unwanted flicker. var previousBackgroundHash = previousBackground ? previousBackground.getAttribute( 'data-background-hash' ) : null; var currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' ); if( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== previousBackground ) { @@ -2031,6 +2044,7 @@ var Reveal = (function(){ } previousBackground = currentBackground; + } // Allow the first background to apply without transition diff --git a/js/reveal.min.js b/js/reveal.min.js index 89ea604..3c481bc 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-04-03, 11:56) + * reveal.js 2.7.0-dev (2014-04-04, 09:21) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),"undefined"==typeof lc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?(lc.slides.style.left="50%",lc.slides.style.top="50%",lc.slides.style.bottom="auto",lc.slides.style.right="auto",p(lc.slides,"translate(-50%, -50%) scale("+kc+")")):lc.slides.style.zoom=kc;for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max((d-q(i))/2-e,0)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.childNodes).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),b){var e=ac?ac.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 58:case 59:case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14; -this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Xb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Xb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Xb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:vb,right:wb,up:xb,down:yb,prev:zb,next:Ab,navigateFragment:ob,prevFragment:qb,nextFragment:pb,navigateTo:S,navigateLeft:vb,navigateRight:wb,navigateUp:xb,navigateDown:yb,navigatePrev:zb,navigateNext:Ab,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:lb,setState:mb,getProgress:fb,getIndices:jb,getTotalSlides:kb,getSlide:function(a,b){var c=document.querySelectorAll(ec)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return $b},getCurrentSlide:function(){return _b},getScale:function(){return kc},getConfig:function(){return hc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(dc+".past")?!0:!1},isLastSlide:function(){return _b?_b.nextElementSibling?!1:K(_b)&&_b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ic},addEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),"undefined"==typeof lc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?(lc.slides.style.left="50%",lc.slides.style.top="50%",lc.slides.style.bottom="auto",lc.slides.style.right="auto",p(lc.slides,"translate(-50%, -50%) scale("+kc+")")):lc.slides.style.zoom=kc;for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max((d-q(i))/2-e,0)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.querySelectorAll("section")).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),ac){var e=ac.querySelector("video");e&&e.pause()}if(b){var f=b.querySelector("video");f&&f.play();var g=ac?ac.getAttribute("data-background-hash"):null,h=b.getAttribute("data-background-hash");h&&h===g&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 58:case 59:case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this)) +},Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Xb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Xb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Xb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:vb,right:wb,up:xb,down:yb,prev:zb,next:Ab,navigateFragment:ob,prevFragment:qb,nextFragment:pb,navigateTo:S,navigateLeft:vb,navigateRight:wb,navigateUp:xb,navigateDown:yb,navigatePrev:zb,navigateNext:Ab,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:lb,setState:mb,getProgress:fb,getIndices:jb,getTotalSlides:kb,getSlide:function(a,b){var c=document.querySelectorAll(ec)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return $b},getCurrentSlide:function(){return _b},getScale:function(){return kc},getConfig:function(){return hc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(dc+".past")?!0:!1},isLastSlide:function(){return _b?_b.nextElementSibling?!1:K(_b)&&_b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ic},addEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 1d13760f0ee2de7bd698585701f42054c1a46b86 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 4 Apr 2014 11:35:54 +0200 Subject: only use zoom to scale content in webkit --- js/reveal.js | 5 ++--- js/reveal.min.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 04350d0..06b217b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1111,9 +1111,8 @@ var Reveal = (function(){ scale = Math.max( scale, config.minScale ); scale = Math.min( scale, config.maxScale ); - // Prefer applying scale via zoom since Chrome blurs scaled content - // with nested transforms - if( typeof dom.slides.style.zoom !== 'undefined' && !navigator.userAgent.match( /(iphone|ipod|ipad|android)/gi ) ) { + // Prefer zooming in WebKit so that content remains crisp + if( /webkit/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; } // Apply scale transform as a fallback diff --git a/js/reveal.min.js b/js/reveal.min.js index 3c481bc..b91011c 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.7.0-dev (2014-04-04, 09:21) + * reveal.js 2.7.0-dev (2014-04-04, 11:35) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),"undefined"==typeof lc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?(lc.slides.style.left="50%",lc.slides.style.top="50%",lc.slides.style.bottom="auto",lc.slides.style.right="auto",p(lc.slides,"translate(-50%, -50%) scale("+kc+")")):lc.slides.style.zoom=kc;for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max((d-q(i))/2-e,0)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.querySelectorAll("section")).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),ac){var e=ac.querySelector("video");e&&e.pause()}if(b){var f=b.querySelector("video");f&&f.play();var g=ac?ac.getAttribute("data-background-hash"):null,h=b.getAttribute("data-background-hash");h&&h===g&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 58:case 59:case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this)) +var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),/webkit/i.test(navigator.userAgent)&&"undefined"!=typeof lc.slides.style.zoom?lc.slides.style.zoom=kc:(lc.slides.style.left="50%",lc.slides.style.top="50%",lc.slides.style.bottom="auto",lc.slides.style.right="auto",p(lc.slides,"translate(-50%, -50%) scale("+kc+")"));for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max((d-q(i))/2-e,0)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.querySelectorAll("section")).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),ac){var e=ac.querySelector("video");e&&e.pause()}if(b){var f=b.querySelector("video");f&&f.play();var g=ac?ac.getAttribute("data-background-hash"):null,h=b.getAttribute("data-background-hash");h&&h===g&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 58:case 59:case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this)) },Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Xb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Xb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Xb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:vb,right:wb,up:xb,down:yb,prev:zb,next:Ab,navigateFragment:ob,prevFragment:qb,nextFragment:pb,navigateTo:S,navigateLeft:vb,navigateRight:wb,navigateUp:xb,navigateDown:yb,navigatePrev:zb,navigateNext:Ab,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:lb,setState:mb,getProgress:fb,getIndices:jb,getTotalSlides:kb,getSlide:function(a,b){var c=document.querySelectorAll(ec)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return $b},getCurrentSlide:function(){return _b},getScale:function(){return kc},getConfig:function(){return hc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(dc+".past")?!0:!1},isLastSlide:function(){return _b?_b.nextElementSibling?!1:K(_b)&&_b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ic},addEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From d45892ff32f65e7f0f3bb9f308f50791108d51b0 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 6 Apr 2014 10:03:46 +0200 Subject: next release will be 3.0.0 --- js/reveal.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.min.js b/js/reveal.min.js index b91011c..ae4be38 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.7.0-dev (2014-04-04, 11:35) + * reveal.js 3.0.0-dev (2014-04-06, 10:03) * http://lab.hakim.se/reveal-js * MIT licensed * -- cgit v1.2.3 From 3aaca471b193cf2ff4bb54432e59798b6c688a43 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 6 Apr 2014 10:09:25 +0200 Subject: stop tracking minified files #783 --- js/reveal.min.js | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 js/reveal.min.js (limited to 'js') diff --git a/js/reveal.min.js b/js/reveal.min.js deleted file mode 100644 index ae4be38..0000000 --- a/js/reveal.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * reveal.js 3.0.0-dev (2014-04-06, 10:03) - * http://lab.hakim.se/reveal-js - * MIT licensed - * - * Copyright (C) 2014 Hakim El Hattab, http://hakim.se - */ -var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.transforms3d="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,mc.transforms2d="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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=hc.dependencies.length;h>g;g++){var i=hc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress",""),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",''),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage||c.backgroundVideo)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundVideo+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),c.backgroundVideo){var e=document.createElement("video");c.backgroundVideo.split(",").forEach(function(a){e.innerHTML+=''}),d.appendChild(e)}return b.appendChild(d),d}function i(a){var b=document.querySelectorAll(dc).length;if(lc.wrapper.classList.remove(hc.transition),"object"==typeof a&&l(hc,a),mc.transforms3d===!1&&(hc.transition="linear"),lc.wrapper.classList.add(hc.transition),lc.wrapper.setAttribute("data-transition-speed",hc.transitionSpeed),lc.wrapper.setAttribute("data-background-transition",hc.backgroundTransition),lc.controls.style.display=hc.controls?"block":"none",lc.progress.style.display=hc.progress?"block":"none",hc.rtl?lc.wrapper.classList.add("rtl"):lc.wrapper.classList.remove("rtl"),hc.center?lc.wrapper.classList.add("center"):lc.wrapper.classList.remove("center"),hc.mouseWheel?(document.addEventListener("DOMMouseScroll",Jb,!1),document.addEventListener("mousewheel",Jb,!1)):(document.removeEventListener("DOMMouseScroll",Jb,!1),document.removeEventListener("mousewheel",Jb,!1)),hc.rollingLinks?w():x(),hc.previewLinks?y():(z(),y("[data-preview-link]")),cc&&(cc.destroy(),cc=null),b>1&&hc.autoSlide&&hc.autoSlideStoppable&&mc.canvas&&mc.requestAnimationFrame&&(cc=new Xb(lc.wrapper,function(){return Math.min(Math.max((Date.now()-sc)/qc,0),1)}),cc.on("click",Wb),tc=!1),hc.fragments===!1&&m(lc.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),hc.theme&&lc.theme){var c=lc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];hc.theme!==e&&(c=c.replace(d,hc.theme),lc.theme.setAttribute("href",c))}T()}function j(){if(pc=!0,window.addEventListener("hashchange",Rb,!1),window.addEventListener("resize",Sb,!1),hc.touch&&(lc.wrapper.addEventListener("touchstart",Db,!1),lc.wrapper.addEventListener("touchmove",Eb,!1),lc.wrapper.addEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.addEventListener("pointerdown",Gb,!1),lc.wrapper.addEventListener("pointermove",Hb,!1),lc.wrapper.addEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.addEventListener("MSPointerDown",Gb,!1),lc.wrapper.addEventListener("MSPointerMove",Hb,!1),lc.wrapper.addEventListener("MSPointerUp",Ib,!1))),hc.keyboard&&document.addEventListener("keydown",Cb,!1),hc.progress&&lc.progress&&lc.progress.addEventListener("click",Kb,!1),hc.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Tb,!1)}["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.addEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.addEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.addEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.addEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.addEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.addEventListener(a,Qb,!1)})})}function k(){pc=!1,document.removeEventListener("keydown",Cb,!1),window.removeEventListener("hashchange",Rb,!1),window.removeEventListener("resize",Sb,!1),lc.wrapper.removeEventListener("touchstart",Db,!1),lc.wrapper.removeEventListener("touchmove",Eb,!1),lc.wrapper.removeEventListener("touchend",Fb,!1),window.navigator.pointerEnabled?(lc.wrapper.removeEventListener("pointerdown",Gb,!1),lc.wrapper.removeEventListener("pointermove",Hb,!1),lc.wrapper.removeEventListener("pointerup",Ib,!1)):window.navigator.msPointerEnabled&&(lc.wrapper.removeEventListener("MSPointerDown",Gb,!1),lc.wrapper.removeEventListener("MSPointerMove",Hb,!1),lc.wrapper.removeEventListener("MSPointerUp",Ib,!1)),hc.progress&&lc.progress&&lc.progress.removeEventListener("click",Kb,!1),["touchstart","click"].forEach(function(a){lc.controlsLeft.forEach(function(b){b.removeEventListener(a,Lb,!1)}),lc.controlsRight.forEach(function(b){b.removeEventListener(a,Mb,!1)}),lc.controlsUp.forEach(function(b){b.removeEventListener(a,Nb,!1)}),lc.controlsDown.forEach(function(b){b.removeEventListener(a,Ob,!1)}),lc.controlsPrev.forEach(function(b){b.removeEventListener(a,Pb,!1)}),lc.controlsNext.forEach(function(b){b.removeEventListener(a,Qb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a){if("string"==typeof a){if("null"===a)return null;if("true"===a)return!0;if("false"===a)return!1;if(a.match(/^\d+$/))return parseFloat(a)}return a}function o(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function p(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function q(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function r(a,b){if(b=b||0,a){var c,d=a.style.height;return a.style.height="0px",c=b-a.parentNode.offsetHeight,a.style.height=d+"px",c}return b}function s(){return/print-pdf/gi.test(window.location.search)}function t(){hc.hideAddressBar&&bc&&(window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u,!1))}function u(){setTimeout(function(){window.scrollTo(0,1)},10)}function v(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),lc.wrapper.dispatchEvent(c)}function w(){if(mc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(dc+" a"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function x(){for(var a=document.querySelectorAll(dc+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function y(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Vb,!1)})}function z(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Vb,!1)})}function A(a){B(),lc.preview=document.createElement("div"),lc.preview.classList.add("preview-link-overlay"),lc.wrapper.appendChild(lc.preview),lc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),lc.preview.querySelector("iframe").addEventListener("load",function(){lc.preview.classList.add("loaded")},!1),lc.preview.querySelector(".close").addEventListener("click",function(a){B(),a.preventDefault()},!1),lc.preview.querySelector(".external").addEventListener("click",function(){B()},!1),setTimeout(function(){lc.preview.classList.add("visible")},1)}function B(){lc.preview&&(lc.preview.setAttribute("src",""),lc.preview.parentNode.removeChild(lc.preview),lc.preview=null)}function C(){if(lc.wrapper&&!s()){var a=lc.wrapper.offsetWidth,b=lc.wrapper.offsetHeight;a-=b*hc.margin,b-=b*hc.margin;var c=hc.width,d=hc.height,e=20;D(hc.width,hc.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),lc.slides.style.width=c+"px",lc.slides.style.height=d+"px",kc=Math.min(a/c,b/d),kc=Math.max(kc,hc.minScale),kc=Math.min(kc,hc.maxScale),/webkit/i.test(navigator.userAgent)&&"undefined"!=typeof lc.slides.style.zoom?lc.slides.style.zoom=kc:(lc.slides.style.left="50%",lc.slides.style.top="50%",lc.slides.style.bottom="auto",lc.slides.style.right="auto",p(lc.slides,"translate(-50%, -50%) scale("+kc+")"));for(var f=m(document.querySelectorAll(dc)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=hc.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max((d-q(i))/2-e,0)+"px":"")}Y(),ab()}}function D(a,b){m(lc.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=r(c,b);if(/(img|video)/gi.test(c.nodeName)){var e=c.naturalWidth||c.videoWidth,f=c.naturalHeight||c.videoHeight,g=Math.min(a/e,d/f);c.style.width=e*g+"px",c.style.height=f*g+"px"}else c.style.width=a+"px",c.style.height=d+"px"})}function E(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function F(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function G(){if(hc.overview){sb();var a=lc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;lc.wrapper.classList.add("overview"),lc.wrapper.classList.remove("overview-deactivating");for(var c=document.querySelectorAll(ec),d=0,e=c.length;e>d;d++){var f=c[d],g=hc.rtl?-105:105;if(f.setAttribute("data-index-h",d),p(f,"translateZ(-"+b+"px) translate("+(d-Yb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Yb?Zb:F(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),p(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Ub,!0)}else f.addEventListener("click",Ub,!0)}X(),C(),a||v("overviewshown",{indexh:Yb,indexv:Zb,currentSlide:_b})}}function H(){hc.overview&&(lc.wrapper.classList.remove("overview"),lc.wrapper.classList.add("overview-deactivating"),setTimeout(function(){lc.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(dc)).forEach(function(a){p(a,""),a.removeEventListener("click",Ub,!0)}),S(Yb,Zb),rb(),v("overviewhidden",{indexh:Yb,indexv:Zb,currentSlide:_b}))}function I(a){"boolean"==typeof a?a?G():H():J()?H():G()}function J(){return lc.wrapper.classList.contains("overview")}function K(a){return a=a?a:_b,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function L(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function M(){var a=lc.wrapper.classList.contains("paused");sb(),lc.wrapper.classList.add("paused"),a===!1&&v("paused")}function N(){var a=lc.wrapper.classList.contains("paused");lc.wrapper.classList.remove("paused"),rb(),a&&v("resumed")}function O(a){"boolean"==typeof a?a?M():N():P()?N():M()}function P(){return lc.wrapper.classList.contains("paused")}function Q(a){"boolean"==typeof a?a?ub():tb():tc?ub():tb()}function R(){return!(!qc||tc)}function S(a,b,c,d){$b=_b;var e=document.querySelectorAll(ec);void 0===b&&(b=F(e[a])),$b&&$b.parentNode&&$b.parentNode.classList.contains("stack")&&E($b.parentNode,Zb);var f=jc.concat();jc.length=0;var g=Yb||0,h=Zb||0;Yb=W(ec,void 0===a?Yb:a),Zb=W(fc,void 0===b?Zb:b),X(),C();a:for(var i=0,j=jc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function V(){var a=m(document.querySelectorAll(ec));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){nb(a.querySelectorAll(".fragment"))}),0===b.length&&nb(a.querySelectorAll(".fragment"))})}function W(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){hc.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=hc.rtl&&!K(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){if(f.classList.add(g?"future":"past"),hc.fragments)for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b&&(f.classList.add(g?"past":"future"),hc.fragments))for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var l=c[b].getAttribute("data-state");l&&(jc=jc.concat(l.split(" ")))}else b=0;return b}function X(){var a,b,c=m(document.querySelectorAll(ec)),d=c.length;if(d){var e=J()?10:hc.viewDistance;bc&&(e=J()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Yb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=F(g),k=0;i>k;k++){var l=h[k];b=f===Yb?Math.abs(Zb-k):Math.abs(k-j),l.style.display=a+b>e?"none":"block"}}}}function Y(){hc.progress&&lc.progress&&(lc.progressbar.style.width=fb()*window.innerWidth+"px")}function Z(){if(hc.slideNumber&&lc.slideNumber){var a=Yb;Zb>0&&(a+=" - "+Zb),lc.slideNumber.innerHTML=a}}function $(){var a=bb(),b=cb();lc.controlsLeft.concat(lc.controlsRight).concat(lc.controlsUp).concat(lc.controlsDown).concat(lc.controlsPrev).concat(lc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&lc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&lc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&lc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&lc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&lc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&lc.controlsNext.forEach(function(a){a.classList.add("enabled")}),_b&&(b.prev&&lc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),K(_b)?(b.prev&&lc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&lc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&lc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function _(a){var b=null,c=hc.rtl?"future":"past",d=hc.rtl?"past":"future";if(m(lc.background.childNodes).forEach(function(e,f){Yb>f?e.className="slide-background "+c:f>Yb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Yb)&&m(e.querySelectorAll("section")).forEach(function(a,c){Zb>c?a.className="slide-background past":c>Zb?a.className="slide-background future":(a.className="slide-background present",f===Yb&&(b=a))})}),ac){var e=ac.querySelector("video");e&&e.pause()}if(b){var f=b.querySelector("video");f&&f.play();var g=ac?ac.getAttribute("data-background-hash"):null,h=b.getAttribute("data-background-hash");h&&h===g&&b!==ac&&lc.background.classList.add("no-transition"),ac=b}setTimeout(function(){lc.background.classList.remove("no-transition")},1)}function ab(){if(hc.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(ec),d=document.querySelectorAll(fc),e=lc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=lc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Yb,i=lc.background.offsetHeight,j=d.length,k=j>1?-(b-i)/(j-1)*Zb:0;lc.background.style.backgroundPosition=h+"px "+k+"px"}}function bb(){var a=document.querySelectorAll(ec),b=document.querySelectorAll(fc),c={left:Yb>0||hc.loop,right:Yb0,down:Zb0,next:!!b.length}}return{prev:!1,next:!1}}function db(a){a&&!gb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function eb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function fb(){var a=m(document.querySelectorAll(ec)),b=document.querySelectorAll(dc+":not(.stack)").length,c=0;a:for(var d=0;d0){var i=_b.querySelectorAll(".fragment.visible"),j=.9;c+=i.length/h.length*j}}return c/(b-1)}function gb(){return!!window.location.search.match(/receiver/gi)}function hb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d;try{d=document.querySelector("#"+c)}catch(e){}if(d){var f=Reveal.getIndices(d);S(f.h,f.v)}else S(Yb||0,Zb||0)}else{var g=parseInt(b[0],10)||0,h=parseInt(b[1],10)||0;(g!==Yb||h!==Zb)&&S(g,h)}}function ib(a){if(hc.history)if(clearTimeout(oc),"number"==typeof a)oc=setTimeout(ib,a);else{var b="/",c=_b.getAttribute("id");c&&(c=c.toLowerCase(),c=c.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),_b&&"string"==typeof c&&c.length?b="/"+c:((Yb>0||Zb>0)&&(b+=Yb),Zb>0&&(b+="/"+Zb)),window.location.hash=b}}function jb(a){var b,c=Yb,d=Zb;if(a){var e=K(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(ec));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&_b){var h=_b.querySelectorAll(".fragment").length>0;if(h){var i=_b.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function kb(){return document.querySelectorAll(dc+":not(.stack)").length}function lb(){var a=jb();return{indexh:a.h,indexv:a.v,indexf:a.f,paused:P(),overview:J()}}function mb(a){"object"==typeof a&&(S(n(a.indexh),n(a.indexv),n(a.indexf)),O(n(a.paused)),I(n(a.overview)))}function nb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function ob(a,b){if(_b&&hc.fragments){var c=nb(_b.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=nb(_b.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&v("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&v("fragmentshown",{fragment:e[0],fragments:e}),$(),Y(),!(!e.length&&!f.length)}}return!1}function pb(){return ob(null,1)}function qb(){return ob(null,-1)}function rb(){if(sb(),_b){var a=_b.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=_b.parentNode?_b.parentNode.getAttribute("data-autoslide"):null,d=_b.getAttribute("data-autoslide");qc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):hc.autoSlide,m(_b.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&qc&&1e3*a.duration>qc&&(qc=1e3*a.duration+1e3)}),!qc||tc||P()||J()||Reveal.isLastSlide()&&hc.loop!==!0||(rc=setTimeout(Ab,qc),sc=Date.now()),cc&&cc.setPlaying(-1!==rc)}}function sb(){clearTimeout(rc),rc=-1}function tb(){tc=!0,v("autoslidepaused"),clearTimeout(rc),cc&&cc.setPlaying(!1)}function ub(){tc=!1,v("autoslideresumed"),rb()}function vb(){hc.rtl?(J()||pb()===!1)&&bb().left&&S(Yb+1):(J()||qb()===!1)&&bb().left&&S(Yb-1)}function wb(){hc.rtl?(J()||qb()===!1)&&bb().right&&S(Yb-1):(J()||pb()===!1)&&bb().right&&S(Yb+1)}function xb(){(J()||qb()===!1)&&bb().up&&S(Yb,Zb-1)}function yb(){(J()||pb()===!1)&&bb().down&&S(Yb,Zb+1)}function zb(){if(qb()===!1)if(bb().up)xb();else{var a=document.querySelector(ec+".past:nth-child("+Yb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Yb-1;S(c,b)}}}function Ab(){pb()===!1&&(bb().down?yb():wb()),rb()}function Bb(){hc.autoSlideStoppable&&tb()}function Cb(a){var b=tc;Bb(a),document.activeElement;var c=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(c||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(P()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof hc.keyboard)for(var e in hc.keyboard)if(parseInt(e,10)===a.keyCode){var f=hc.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:zb();break;case 78:case 34:Ab();break;case 72:case 37:vb();break;case 76:case 39:wb();break;case 75:case 38:xb();break;case 74:case 40:yb();break;case 36:S(0);break;case 35:S(Number.MAX_VALUE);break;case 32:J()?H():a.shiftKey?zb():Ab();break;case 13:J()?H():d=!1;break;case 58:case 59:case 66:case 190:case 191:O();break;case 70:L();break;case 65:hc.autoSlideStoppable&&Q(b);break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!mc.transforms3d||(lc.preview?B():I(),a.preventDefault()),rb()}}function Db(a){uc.startX=a.touches[0].clientX,uc.startY=a.touches[0].clientY,uc.startCount=a.touches.length,2===a.touches.length&&hc.overview&&(uc.startSpan=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY}))}function Eb(a){if(uc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{Bb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===uc.startCount&&hc.overview){var d=o({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:uc.startX,y:uc.startY});Math.abs(uc.startSpan-d)>uc.threshold&&(uc.captured=!0,duc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,vb()):e<-uc.threshold&&Math.abs(e)>Math.abs(f)?(uc.captured=!0,wb()):f>uc.threshold?(uc.captured=!0,xb()):f<-uc.threshold&&(uc.captured=!0,yb()),hc.embedded?(uc.captured||K(_b))&&a.preventDefault():a.preventDefault()}}}function Fb(){uc.captured=!1}function Gb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Db(a))}function Hb(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Eb(a))}function Ib(a){(a.pointerType===a.MSPOINTER_TYPE_TOUCH||"touch"===a.pointerType)&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],Fb(a))}function Jb(a){if(Date.now()-nc>600){nc=Date.now();var b=a.detail||-a.wheelDelta;b>0?Ab():zb()}}function Kb(a){Bb(a),a.preventDefault();var b=m(document.querySelectorAll(ec)).length,c=Math.floor(a.clientX/lc.wrapper.offsetWidth*b);S(c)}function Lb(a){a.preventDefault(),Bb(),vb()}function Mb(a){a.preventDefault(),Bb(),wb()}function Nb(a){a.preventDefault(),Bb(),xb()}function Ob(a){a.preventDefault(),Bb(),yb()}function Pb(a){a.preventDefault(),Bb(),zb()}function Qb(a){a.preventDefault(),Bb(),Ab()}function Rb(){hb()}function Sb(){C()}function Tb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Ub(a){if(pc&&J()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(H(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);S(c,d)}}}function Vb(a){var b=a.target.getAttribute("href");b&&(A(b),a.preventDefault())}function Wb(){Reveal.isLastSlide()&&hc.loop===!1?(S(0,0),ub()):tc?ub():tb()}function Xb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Yb,Zb,$b,_b,ac,bc,cc,dc=".reveal .slides section",ec=".reveal .slides>section",fc=".reveal .slides>section.present>section",gc=".reveal .slides>section:first-of-type",hc={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ic=!1,jc=[],kc=1,lc={},mc={},nc=0,oc=0,pc=!1,qc=0,rc=0,sc=-1,tc=!1,uc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Xb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Xb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&mc.requestAnimationFrameMethod.call(window,this.animate.bind(this)) -},Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Xb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Xb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Xb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:vb,right:wb,up:xb,down:yb,prev:zb,next:Ab,navigateFragment:ob,prevFragment:qb,nextFragment:pb,navigateTo:S,navigateLeft:vb,navigateRight:wb,navigateUp:xb,navigateDown:yb,navigatePrev:zb,navigateNext:Ab,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:lb,setState:mb,getProgress:fb,getIndices:jb,getTotalSlides:kb,getSlide:function(a,b){var c=document.querySelectorAll(ec)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return $b},getCurrentSlide:function(){return _b},getScale:function(){return kc},getConfig:function(){return hc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(dc+".past")?!0:!1},isLastSlide:function(){return _b?_b.nextElementSibling?!1:K(_b)&&_b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ic},addEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From a3d4afeeed1aec725a42cb404e62f89739c8faa3 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 6 Apr 2014 11:04:58 +0200 Subject: better transition names, fix background images in vertical slides --- js/reveal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 06b217b..6daa9f8 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -93,13 +93,13 @@ var Reveal = (function(){ theme: null, // Transition style - transition: 'default', // default/cube/page/concave/zoom/linear/fade/none + transition: 'default', // none/fade/slide/convex/concave/zoom // Transition speed transitionSpeed: 'default', // default/fast/slow // Transition style for full page slide backgrounds - backgroundTransition: 'default', // default/linear/none + backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom // Parallax background image parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg" @@ -2000,7 +2000,7 @@ var Reveal = (function(){ } if( includeAll || h === indexh ) { - toArray( backgroundh.querySelectorAll( 'section' ) ).forEach( function( backgroundv, v ) { + toArray( backgroundh.querySelectorAll( '.slide-background' ) ).forEach( function( backgroundv, v ) { if( v < indexv ) { backgroundv.className = 'slide-background past'; -- cgit v1.2.3 From e70d07b45da3a60d9f79bb65af3ded3d6d79f81f Mon Sep 17 00:00:00 2001 From: Nawaz Date: Mon, 7 Apr 2014 10:49:07 +0530 Subject: Change innerHTML to textContent to avoid video replays inside status Div, for not text content is enough --- js/reveal.js | 4 ++-- js/reveal.min.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a923efd..9ee81e4 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1771,7 +1771,7 @@ var Reveal = (function(){ slides[index].classList.add( 'present' ); slides[index].removeAttribute( 'hidden' ); slides[index].removeAttribute( 'aria-hidden' ); - dom.statusDiv.innerHTML = slides[index].innerHTML; + dom.statusDiv.innerHTML = slides[index].textContent; // If this slide has a state associated with it, add it // onto the current state of the deck @@ -2424,7 +2424,7 @@ var Reveal = (function(){ element.classList.add( 'visible' ); element.classList.remove( 'current-fragment' ); //Announce the fragments one by one to the Screen Reader - dom.statusDiv.innerHTML = element.innerHTML; + dom.statusDiv.innerHTML = element.textContent; if( i === index ) { element.classList.add( 'current-fragment' ); diff --git a/js/reveal.min.js b/js/reveal.min.js index f3d1e04..d97df96 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.2 (2014-03-27, 16:30) + * reveal.js 2.6.2 (2014-04-07, 10:45) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!fc.transforms2d&&!fc.transforms3d)return void document.body.setAttribute("class","no-transforms");window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(ac,a),l(ac,d),s(),c()}function b(){fc.transforms3d="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,fc.transforms2d="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,fc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,fc.requestAnimationFrame="function"==typeof fc.requestAnimationFrameMethod,fc.canvas=!!document.createElement("canvas").getContext,Wb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=ac.dependencies.length;h>g;g++){var i=ac.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),R(),i(),db(),Y(!0),setTimeout(function(){ec.slides.classList.remove("no-transition"),bc=!0,u("ready",{indexh:Rb,indexv:Sb,currentSlide:Ub})},1)}function e(){ec.theme=document.querySelector("#theme"),ec.wrapper=document.querySelector(".reveal"),ec.slides=document.querySelector(".reveal .slides"),ec.slides.classList.add("no-transition"),ec.background=g(ec.wrapper,"div","backgrounds",null),ec.progress=g(ec.wrapper,"div","progress",""),ec.progressbar=ec.progress.querySelector("span"),g(ec.wrapper,"aside","controls",''),ec.slideNumber=g(ec.wrapper,"div","slide-number",""),g(ec.wrapper,"div","state-background",null),g(ec.wrapper,"div","pause-overlay",null),ec.controls=document.querySelector(".reveal .controls"),ec.wrapper.setAttribute("role","application"),ec.controlsLeft=m(document.querySelectorAll(".navigate-left")),ec.controlsRight=m(document.querySelectorAll(".navigate-right")),ec.controlsUp=m(document.querySelectorAll(".navigate-up")),ec.controlsDown=m(document.querySelectorAll(".navigate-down")),ec.controlsPrev=m(document.querySelectorAll(".navigate-prev")),ec.controlsNext=m(document.querySelectorAll(".navigate-next")),ec.statusDiv=f()}function f(){var a=document.getElementById("statusDiv");if(!a){a=document.createElement("div");var b=a.style;b.position="absolute",b.height="1px",b.width="1px",b.overflow="hidden",b.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","statusDiv"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),ec.wrapper.appendChild(a)}return a}function g(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function h(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),ec.background.innerHTML="",ec.background.classList.add("no-transition"),m(document.querySelectorAll(Zb)).forEach(function(b){var c;c=r()?a(b,b):a(b,ec.background),m(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),ac.parallaxBackgroundImage?(ec.background.style.backgroundImage='url("'+ac.parallaxBackgroundImage+'")',ec.background.style.backgroundSize=ac.parallaxBackgroundSize,setTimeout(function(){ec.wrapper.classList.add("has-parallax-background")},1)):(ec.background.style.backgroundImage="",ec.wrapper.classList.remove("has-parallax-background"))}function i(a){var b=document.querySelectorAll(Yb).length;if(ec.wrapper.classList.remove(ac.transition),"object"==typeof a&&l(ac,a),fc.transforms3d===!1&&(ac.transition="linear"),ec.wrapper.classList.add(ac.transition),ec.wrapper.setAttribute("data-transition-speed",ac.transitionSpeed),ec.wrapper.setAttribute("data-background-transition",ac.backgroundTransition),ec.controls.style.display=ac.controls?"block":"none",ec.progress.style.display=ac.progress?"block":"none",ac.rtl?ec.wrapper.classList.add("rtl"):ec.wrapper.classList.remove("rtl"),ac.center?ec.wrapper.classList.add("center"):ec.wrapper.classList.remove("center"),ac.mouseWheel?(document.addEventListener("DOMMouseScroll",Cb,!1),document.addEventListener("mousewheel",Cb,!1)):(document.removeEventListener("DOMMouseScroll",Cb,!1),document.removeEventListener("mousewheel",Cb,!1)),ac.rollingLinks?v():w(),ac.previewLinks?x():(y(),x("[data-preview-link]")),b>1&&ac.autoSlide&&ac.autoSlideStoppable&&fc.canvas&&fc.requestAnimationFrame?(Xb=new Qb(ec.wrapper,function(){return Math.min(Math.max((Date.now()-nc)/lc,0),1)}),Xb.on("click",Pb),oc=!1):Xb&&(Xb.destroy(),Xb=null),ac.theme&&ec.theme){var c=ec.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];ac.theme!==e&&(c=c.replace(d,ac.theme),ec.theme.setAttribute("href",c))}Q()}function j(){if(kc=!0,window.addEventListener("hashchange",Kb,!1),window.addEventListener("resize",Lb,!1),ac.touch&&(ec.wrapper.addEventListener("touchstart",wb,!1),ec.wrapper.addEventListener("touchmove",xb,!1),ec.wrapper.addEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.addEventListener("MSPointerDown",zb,!1),ec.wrapper.addEventListener("MSPointerMove",Ab,!1),ec.wrapper.addEventListener("MSPointerUp",Bb,!1))),ac.keyboard&&document.addEventListener("keydown",vb,!1),ac.progress&&ec.progress&&ec.progress.addEventListener("click",Db,!1),ac.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Mb,!1)}["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.addEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.addEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.addEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.addEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.addEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.addEventListener(a,Jb,!1)})})}function k(){kc=!1,document.removeEventListener("keydown",vb,!1),window.removeEventListener("hashchange",Kb,!1),window.removeEventListener("resize",Lb,!1),ec.wrapper.removeEventListener("touchstart",wb,!1),ec.wrapper.removeEventListener("touchmove",xb,!1),ec.wrapper.removeEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.removeEventListener("MSPointerDown",zb,!1),ec.wrapper.removeEventListener("MSPointerMove",Ab,!1),ec.wrapper.removeEventListener("MSPointerUp",Bb,!1)),ac.progress&&ec.progress&&ec.progress.removeEventListener("click",Db,!1),["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.removeEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.removeEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.removeEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.removeEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.removeEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.removeEventListener(a,Jb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;m(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){ac.hideAddressBar&&Wb&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),ec.wrapper.dispatchEvent(c)}function v(){if(fc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Yb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(Yb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ob,!1)})}function y(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ob,!1)})}function z(a){A(),ec.preview=document.createElement("div"),ec.preview.classList.add("preview-link-overlay"),ec.wrapper.appendChild(ec.preview),ec.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),ec.preview.querySelector("iframe").addEventListener("load",function(){ec.preview.classList.add("loaded")},!1),ec.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),ec.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){ec.preview.classList.add("visible")},1)}function A(){ec.preview&&(ec.preview.setAttribute("src",""),ec.preview.parentNode.removeChild(ec.preview),ec.preview=null)}function B(){if(ec.wrapper&&!r()){var a=ec.wrapper.offsetWidth,b=ec.wrapper.offsetHeight;a-=b*ac.margin,b-=b*ac.margin;var c=ac.width,d=ac.height,e=20;C(ac.width,ac.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),ec.slides.style.width=c+"px",ec.slides.style.height=d+"px",dc=Math.min(a/c,b/d),dc=Math.max(dc,ac.minScale),dc=Math.min(dc,ac.maxScale),"undefined"==typeof ec.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(ec.slides,"translate(-50%, -50%) scale("+dc+") translate(50%, 50%)"):ec.slides.style.zoom=dc;for(var f=m(document.querySelectorAll(Yb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=ac.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}V(),Z()}}function C(a,b,c){m(ec.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(ac.overview){lb();var a=ec.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;ec.wrapper.classList.add("overview"),ec.wrapper.classList.remove("overview-deactivating"),clearTimeout(ic),clearTimeout(jc),ic=setTimeout(function(){for(var c=document.querySelectorAll(Zb),d=0,e=c.length;e>d;d++){var f=c[d],g=ac.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Rb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Rb?Sb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Nb,!0)}else f.addEventListener("click",Nb,!0)}U(),B(),a||u("overviewshown",{indexh:Rb,indexv:Sb,currentSlide:Ub})},10)}}function G(){ac.overview&&(clearTimeout(ic),clearTimeout(jc),ec.wrapper.classList.remove("overview"),ec.wrapper.classList.add("overview-deactivating"),jc=setTimeout(function(){ec.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(Yb)).forEach(function(a){o(a,""),a.removeEventListener("click",Nb,!0)}),P(Rb,Sb),kb(),u("overviewhidden",{indexh:Rb,indexv:Sb,currentSlide:Ub}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return ec.wrapper.classList.contains("overview")}function J(a){return a=a?a:Ub,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=ec.wrapper.classList.contains("paused");lb(),ec.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=ec.wrapper.classList.contains("paused");ec.wrapper.classList.remove("paused"),kb(),a&&u("resumed")}function N(){O()?M():L()}function O(){return ec.wrapper.classList.contains("paused")}function P(a,b,c,d){Tb=Ub;var e=document.querySelectorAll(Zb);void 0===b&&(b=E(e[a])),Tb&&Tb.parentNode&&Tb.parentNode.classList.contains("stack")&&D(Tb.parentNode,Sb);var f=cc.concat();cc.length=0;var g=Rb||0,h=Sb||0;Rb=T(Zb,void 0===a?Rb:a),Sb=T($b,void 0===b?Sb:b),U(),B();a:for(var i=0,j=cc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"),a.setAttribute("aria-hidden","true"))})})}function S(){var a=m(document.querySelectorAll(Zb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){gb(a.querySelectorAll(".fragment"))}),0===b.length&&gb(a.querySelectorAll(".fragment"))})}function T(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){ac.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=ac.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),f.setAttribute("aria-hidden","true"),b>e){f.classList.add(g?"future":"past");for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden"),c[b].removeAttribute("aria-hidden"),ec.statusDiv.innerHTML=c[b].innerHTML;var l=c[b].getAttribute("data-state");l&&(cc=cc.concat(l.split(" ")))}else b=0;return b}function U(){var a,b,c=m(document.querySelectorAll(Zb)),d=c.length;if(d){var e=I()?10:ac.viewDistance;Wb&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Rb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var l=h[k];b=Math.abs(f===Rb?Sb-k:k-j),l.style.display=a+b>e?"none":"block"}}}}function V(){if(ac.progress&&ec.progress){var a=m(document.querySelectorAll(Zb)),b=document.querySelectorAll(Yb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Sb),ec.slideNumber.innerHTML=a}}function X(){var a=$(),b=_();ec.controlsLeft.concat(ec.controlsRight).concat(ec.controlsUp).concat(ec.controlsDown).concat(ec.controlsPrev).concat(ec.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&ec.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&ec.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&ec.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&ec.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&ec.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&ec.controlsNext.forEach(function(a){a.classList.add("enabled")}),Ub&&(b.prev&&ec.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Ub)?(b.prev&&ec.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&ec.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Y(a){var b=null,c=ac.rtl?"future":"past",d=ac.rtl?"past":"future";if(m(ec.background.childNodes).forEach(function(e,f){Rb>f?e.className="slide-background "+c:f>Rb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Rb)&&m(e.childNodes).forEach(function(a,c){Sb>c?a.className="slide-background past":c>Sb?a.className="slide-background future":(a.className="slide-background present",f===Rb&&(b=a))})}),b){var e=Vb?Vb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Vb&&ec.background.classList.add("no-transition"),Vb=b}setTimeout(function(){ec.background.classList.remove("no-transition")},1)}function Z(){if(ac.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Zb),d=document.querySelectorAll($b),e=ec.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=ec.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Rb,i=ec.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Sb:0;ec.background.style.backgroundPosition=h+"px "+k+"px"}}function $(){var a=document.querySelectorAll(Zb),b=document.querySelectorAll($b),c={left:Rb>0||ac.loop,right:Rb0,down:Sb0,next:!!b.length}}return{prev:!1,next:!1}}function ab(a){a&&!cb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function bb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function cb(){return!!window.location.search.match(/receiver/gi)}function db(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);P(e.h,e.v)}else P(Rb||0,Sb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Rb||g!==Sb)&&P(f,g)}}function eb(a){if(ac.history)if(clearTimeout(hc),"number"==typeof a)hc=setTimeout(eb,a);else{var b="/";Ub&&"string"==typeof Ub.getAttribute("id")?b="/"+Ub.getAttribute("id"):((Rb>0||Sb>0)&&(b+=Rb),Sb>0&&(b+="/"+Sb)),window.location.hash=b}}function fb(a){var b,c=Rb,d=Sb;if(a){var e=J(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(Zb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Ub){var h=Ub.querySelectorAll(".fragment").length>0;if(h){var i=Ub.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function gb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function hb(a,b){if(Ub&&ac.fragments){var c=gb(Ub.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=gb(Ub.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),ec.statusDiv.innerHTML=b.innerHTML,c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),X(),!(!e.length&&!f.length)}}return!1}function ib(){return hb(null,1)}function jb(){return hb(null,-1)}function kb(){if(lb(),Ub){var a=Ub.parentNode?Ub.parentNode.getAttribute("data-autoslide"):null,b=Ub.getAttribute("data-autoslide");lc=b?parseInt(b,10):a?parseInt(a,10):ac.autoSlide,m(Ub.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&lc&&1e3*a.duration>lc&&(lc=1e3*a.duration+1e3)}),!lc||oc||O()||I()||Reveal.isLastSlide()&&ac.loop!==!0||(mc=setTimeout(tb,lc),nc=Date.now()),Xb&&Xb.setPlaying(-1!==mc)}}function lb(){clearTimeout(mc),mc=-1}function mb(){oc=!0,clearTimeout(mc),Xb&&Xb.setPlaying(!1)}function nb(){oc=!1,kb()}function ob(){ac.rtl?(I()||ib()===!1)&&$().left&&P(Rb+1):(I()||jb()===!1)&&$().left&&P(Rb-1)}function pb(){ac.rtl?(I()||jb()===!1)&&$().right&&P(Rb-1):(I()||ib()===!1)&&$().right&&P(Rb+1)}function qb(){(I()||jb()===!1)&&$().up&&P(Rb,Sb-1)}function rb(){(I()||ib()===!1)&&$().down&&P(Rb,Sb+1)}function sb(){if(jb()===!1)if($().up)qb();else{var a=document.querySelector(Zb+".past:nth-child("+Rb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Rb-1;P(c,b)}}}function tb(){ib()===!1&&($().down?rb():pb()),kb()}function ub(){ac.autoSlideStoppable&&mb()}function vb(a){ub(a);var b=(document.activeElement,!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable));if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof ac.keyboard)for(var d in ac.keyboard)if(parseInt(d,10)===a.keyCode){var e=ac.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:sb();break;case 78:case 34:tb();break;case 72:case 37:ob();break;case 76:case 39:pb();break;case 75:case 38:qb();break;case 74:case 40:rb();break;case 36:P(0);break;case 35:P(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?sb():tb();break;case 13:I()?G():c=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!fc.transforms3d||(ec.preview?A():H(),a.preventDefault()),kb()}}function wb(a){pc.startX=a.touches[0].clientX,pc.startY=a.touches[0].clientY,pc.startCount=a.touches.length,2===a.touches.length&&ac.overview&&(pc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY}))}function xb(a){if(pc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{ub(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===pc.startCount&&ac.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY});Math.abs(pc.startSpan-d)>pc.threshold&&(pc.captured=!0,dpc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,ob()):e<-pc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,pb()):f>pc.threshold?(pc.captured=!0,qb()):f<-pc.threshold&&(pc.captured=!0,rb()),ac.embedded?(pc.captured||J(Ub))&&a.preventDefault():a.preventDefault()}}}function yb(){pc.captured=!1}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){if(Date.now()-gc>600){gc=Date.now();var b=a.detail||-a.wheelDelta;b>0?tb():sb()}}function Db(a){ub(a),a.preventDefault();var b=m(document.querySelectorAll(Zb)).length,c=Math.floor(a.clientX/ec.wrapper.offsetWidth*b);P(c)}function Eb(a){a.preventDefault(),ub(),ob()}function Fb(a){a.preventDefault(),ub(),pb()}function Gb(a){a.preventDefault(),ub(),qb()}function Hb(a){a.preventDefault(),ub(),rb()}function Ib(a){a.preventDefault(),ub(),sb()}function Jb(a){a.preventDefault(),ub(),tb()}function Kb(){db()}function Lb(){B()}function Mb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Nb(a){if(kc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);P(c,d)}}}function Ob(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Pb(){Reveal.isLastSlide()&&ac.loop===!1?(P(0,0),nb()):oc?nb():mb()}function Qb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb=".reveal .slides section",Zb=".reveal .slides>section",$b=".reveal .slides>section.present>section",_b=".reveal .slides>section:first-of-type",ac={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},bc=!1,cc=[],dc=1,ec={},fc={},gc=0,hc=0,ic=0,jc=0,kc=!1,lc=0,mc=0,nc=-1,oc=!1,pc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Qb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Qb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&fc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Qb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+2*a*Math.PI,g=-Math.PI/2+2*this.progressOffset*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() +var Reveal=function(){"use strict";function a(a){if(b(),!fc.transforms2d&&!fc.transforms3d)return void document.body.setAttribute("class","no-transforms");window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(ac,a),l(ac,d),s(),c()}function b(){fc.transforms3d="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,fc.transforms2d="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,fc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,fc.requestAnimationFrame="function"==typeof fc.requestAnimationFrameMethod,fc.canvas=!!document.createElement("canvas").getContext,Wb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=ac.dependencies.length;h>g;g++){var i=ac.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),R(),i(),db(),Y(!0),setTimeout(function(){ec.slides.classList.remove("no-transition"),bc=!0,u("ready",{indexh:Rb,indexv:Sb,currentSlide:Ub})},1)}function e(){ec.theme=document.querySelector("#theme"),ec.wrapper=document.querySelector(".reveal"),ec.slides=document.querySelector(".reveal .slides"),ec.slides.classList.add("no-transition"),ec.background=g(ec.wrapper,"div","backgrounds",null),ec.progress=g(ec.wrapper,"div","progress",""),ec.progressbar=ec.progress.querySelector("span"),g(ec.wrapper,"aside","controls",''),ec.slideNumber=g(ec.wrapper,"div","slide-number",""),g(ec.wrapper,"div","state-background",null),g(ec.wrapper,"div","pause-overlay",null),ec.controls=document.querySelector(".reveal .controls"),ec.wrapper.setAttribute("role","application"),ec.controlsLeft=m(document.querySelectorAll(".navigate-left")),ec.controlsRight=m(document.querySelectorAll(".navigate-right")),ec.controlsUp=m(document.querySelectorAll(".navigate-up")),ec.controlsDown=m(document.querySelectorAll(".navigate-down")),ec.controlsPrev=m(document.querySelectorAll(".navigate-prev")),ec.controlsNext=m(document.querySelectorAll(".navigate-next")),ec.statusDiv=f()}function f(){var a=document.getElementById("statusDiv");if(!a){a=document.createElement("div");var b=a.style;b.position="absolute",b.height="1px",b.width="1px",b.overflow="hidden",b.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","statusDiv"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),ec.wrapper.appendChild(a)}return a}function g(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function h(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),ec.background.innerHTML="",ec.background.classList.add("no-transition"),m(document.querySelectorAll(Zb)).forEach(function(b){var c;c=r()?a(b,b):a(b,ec.background),m(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),ac.parallaxBackgroundImage?(ec.background.style.backgroundImage='url("'+ac.parallaxBackgroundImage+'")',ec.background.style.backgroundSize=ac.parallaxBackgroundSize,setTimeout(function(){ec.wrapper.classList.add("has-parallax-background")},1)):(ec.background.style.backgroundImage="",ec.wrapper.classList.remove("has-parallax-background"))}function i(a){var b=document.querySelectorAll(Yb).length;if(ec.wrapper.classList.remove(ac.transition),"object"==typeof a&&l(ac,a),fc.transforms3d===!1&&(ac.transition="linear"),ec.wrapper.classList.add(ac.transition),ec.wrapper.setAttribute("data-transition-speed",ac.transitionSpeed),ec.wrapper.setAttribute("data-background-transition",ac.backgroundTransition),ec.controls.style.display=ac.controls?"block":"none",ec.progress.style.display=ac.progress?"block":"none",ac.rtl?ec.wrapper.classList.add("rtl"):ec.wrapper.classList.remove("rtl"),ac.center?ec.wrapper.classList.add("center"):ec.wrapper.classList.remove("center"),ac.mouseWheel?(document.addEventListener("DOMMouseScroll",Cb,!1),document.addEventListener("mousewheel",Cb,!1)):(document.removeEventListener("DOMMouseScroll",Cb,!1),document.removeEventListener("mousewheel",Cb,!1)),ac.rollingLinks?v():w(),ac.previewLinks?x():(y(),x("[data-preview-link]")),b>1&&ac.autoSlide&&ac.autoSlideStoppable&&fc.canvas&&fc.requestAnimationFrame?(Xb=new Qb(ec.wrapper,function(){return Math.min(Math.max((Date.now()-nc)/lc,0),1)}),Xb.on("click",Pb),oc=!1):Xb&&(Xb.destroy(),Xb=null),ac.theme&&ec.theme){var c=ec.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];ac.theme!==e&&(c=c.replace(d,ac.theme),ec.theme.setAttribute("href",c))}Q()}function j(){if(kc=!0,window.addEventListener("hashchange",Kb,!1),window.addEventListener("resize",Lb,!1),ac.touch&&(ec.wrapper.addEventListener("touchstart",wb,!1),ec.wrapper.addEventListener("touchmove",xb,!1),ec.wrapper.addEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.addEventListener("MSPointerDown",zb,!1),ec.wrapper.addEventListener("MSPointerMove",Ab,!1),ec.wrapper.addEventListener("MSPointerUp",Bb,!1))),ac.keyboard&&document.addEventListener("keydown",vb,!1),ac.progress&&ec.progress&&ec.progress.addEventListener("click",Db,!1),ac.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Mb,!1)}["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.addEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.addEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.addEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.addEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.addEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.addEventListener(a,Jb,!1)})})}function k(){kc=!1,document.removeEventListener("keydown",vb,!1),window.removeEventListener("hashchange",Kb,!1),window.removeEventListener("resize",Lb,!1),ec.wrapper.removeEventListener("touchstart",wb,!1),ec.wrapper.removeEventListener("touchmove",xb,!1),ec.wrapper.removeEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.removeEventListener("MSPointerDown",zb,!1),ec.wrapper.removeEventListener("MSPointerMove",Ab,!1),ec.wrapper.removeEventListener("MSPointerUp",Bb,!1)),ac.progress&&ec.progress&&ec.progress.removeEventListener("click",Db,!1),["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.removeEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.removeEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.removeEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.removeEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.removeEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.removeEventListener(a,Jb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;m(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){ac.hideAddressBar&&Wb&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),ec.wrapper.dispatchEvent(c)}function v(){if(fc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Yb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(Yb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ob,!1)})}function y(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ob,!1)})}function z(a){A(),ec.preview=document.createElement("div"),ec.preview.classList.add("preview-link-overlay"),ec.wrapper.appendChild(ec.preview),ec.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),ec.preview.querySelector("iframe").addEventListener("load",function(){ec.preview.classList.add("loaded")},!1),ec.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),ec.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){ec.preview.classList.add("visible")},1)}function A(){ec.preview&&(ec.preview.setAttribute("src",""),ec.preview.parentNode.removeChild(ec.preview),ec.preview=null)}function B(){if(ec.wrapper&&!r()){var a=ec.wrapper.offsetWidth,b=ec.wrapper.offsetHeight;a-=b*ac.margin,b-=b*ac.margin;var c=ac.width,d=ac.height,e=20;C(ac.width,ac.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),ec.slides.style.width=c+"px",ec.slides.style.height=d+"px",dc=Math.min(a/c,b/d),dc=Math.max(dc,ac.minScale),dc=Math.min(dc,ac.maxScale),"undefined"==typeof ec.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(ec.slides,"translate(-50%, -50%) scale("+dc+") translate(50%, 50%)"):ec.slides.style.zoom=dc;for(var f=m(document.querySelectorAll(Yb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=ac.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}V(),Z()}}function C(a,b,c){m(ec.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(ac.overview){lb();var a=ec.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;ec.wrapper.classList.add("overview"),ec.wrapper.classList.remove("overview-deactivating"),clearTimeout(ic),clearTimeout(jc),ic=setTimeout(function(){for(var c=document.querySelectorAll(Zb),d=0,e=c.length;e>d;d++){var f=c[d],g=ac.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Rb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Rb?Sb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Nb,!0)}else f.addEventListener("click",Nb,!0)}U(),B(),a||u("overviewshown",{indexh:Rb,indexv:Sb,currentSlide:Ub})},10)}}function G(){ac.overview&&(clearTimeout(ic),clearTimeout(jc),ec.wrapper.classList.remove("overview"),ec.wrapper.classList.add("overview-deactivating"),jc=setTimeout(function(){ec.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(Yb)).forEach(function(a){o(a,""),a.removeEventListener("click",Nb,!0)}),P(Rb,Sb),kb(),u("overviewhidden",{indexh:Rb,indexv:Sb,currentSlide:Ub}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return ec.wrapper.classList.contains("overview")}function J(a){return a=a?a:Ub,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=ec.wrapper.classList.contains("paused");lb(),ec.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=ec.wrapper.classList.contains("paused");ec.wrapper.classList.remove("paused"),kb(),a&&u("resumed")}function N(){O()?M():L()}function O(){return ec.wrapper.classList.contains("paused")}function P(a,b,c,d){Tb=Ub;var e=document.querySelectorAll(Zb);void 0===b&&(b=E(e[a])),Tb&&Tb.parentNode&&Tb.parentNode.classList.contains("stack")&&D(Tb.parentNode,Sb);var f=cc.concat();cc.length=0;var g=Rb||0,h=Sb||0;Rb=T(Zb,void 0===a?Rb:a),Sb=T($b,void 0===b?Sb:b),U(),B();a:for(var i=0,j=cc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"),a.setAttribute("aria-hidden","true"))})})}function S(){var a=m(document.querySelectorAll(Zb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){gb(a.querySelectorAll(".fragment"))}),0===b.length&&gb(a.querySelectorAll(".fragment"))})}function T(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){ac.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=ac.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),f.setAttribute("aria-hidden","true"),b>e){f.classList.add(g?"future":"past");for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden"),c[b].removeAttribute("aria-hidden"),ec.statusDiv.innerHTML=c[b].textContent;var l=c[b].getAttribute("data-state");l&&(cc=cc.concat(l.split(" ")))}else b=0;return b}function U(){var a,b,c=m(document.querySelectorAll(Zb)),d=c.length;if(d){var e=I()?10:ac.viewDistance;Wb&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Rb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var l=h[k];b=Math.abs(f===Rb?Sb-k:k-j),l.style.display=a+b>e?"none":"block"}}}}function V(){if(ac.progress&&ec.progress){var a=m(document.querySelectorAll(Zb)),b=document.querySelectorAll(Yb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Sb),ec.slideNumber.innerHTML=a}}function X(){var a=$(),b=_();ec.controlsLeft.concat(ec.controlsRight).concat(ec.controlsUp).concat(ec.controlsDown).concat(ec.controlsPrev).concat(ec.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&ec.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&ec.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&ec.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&ec.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&ec.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&ec.controlsNext.forEach(function(a){a.classList.add("enabled")}),Ub&&(b.prev&&ec.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Ub)?(b.prev&&ec.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&ec.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Y(a){var b=null,c=ac.rtl?"future":"past",d=ac.rtl?"past":"future";if(m(ec.background.childNodes).forEach(function(e,f){Rb>f?e.className="slide-background "+c:f>Rb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Rb)&&m(e.childNodes).forEach(function(a,c){Sb>c?a.className="slide-background past":c>Sb?a.className="slide-background future":(a.className="slide-background present",f===Rb&&(b=a))})}),b){var e=Vb?Vb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Vb&&ec.background.classList.add("no-transition"),Vb=b}setTimeout(function(){ec.background.classList.remove("no-transition")},1)}function Z(){if(ac.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Zb),d=document.querySelectorAll($b),e=ec.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=ec.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Rb,i=ec.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Sb:0;ec.background.style.backgroundPosition=h+"px "+k+"px"}}function $(){var a=document.querySelectorAll(Zb),b=document.querySelectorAll($b),c={left:Rb>0||ac.loop,right:Rb0,down:Sb0,next:!!b.length}}return{prev:!1,next:!1}}function ab(a){a&&!cb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function bb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function cb(){return!!window.location.search.match(/receiver/gi)}function db(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);P(e.h,e.v)}else P(Rb||0,Sb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Rb||g!==Sb)&&P(f,g)}}function eb(a){if(ac.history)if(clearTimeout(hc),"number"==typeof a)hc=setTimeout(eb,a);else{var b="/";Ub&&"string"==typeof Ub.getAttribute("id")?b="/"+Ub.getAttribute("id"):((Rb>0||Sb>0)&&(b+=Rb),Sb>0&&(b+="/"+Sb)),window.location.hash=b}}function fb(a){var b,c=Rb,d=Sb;if(a){var e=J(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(Zb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Ub){var h=Ub.querySelectorAll(".fragment").length>0;if(h){var i=Ub.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function gb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function hb(a,b){if(Ub&&ac.fragments){var c=gb(Ub.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=gb(Ub.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),ec.statusDiv.innerHTML=b.textContent,c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),X(),!(!e.length&&!f.length)}}return!1}function ib(){return hb(null,1)}function jb(){return hb(null,-1)}function kb(){if(lb(),Ub){var a=Ub.parentNode?Ub.parentNode.getAttribute("data-autoslide"):null,b=Ub.getAttribute("data-autoslide");lc=b?parseInt(b,10):a?parseInt(a,10):ac.autoSlide,m(Ub.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&lc&&1e3*a.duration>lc&&(lc=1e3*a.duration+1e3)}),!lc||oc||O()||I()||Reveal.isLastSlide()&&ac.loop!==!0||(mc=setTimeout(tb,lc),nc=Date.now()),Xb&&Xb.setPlaying(-1!==mc)}}function lb(){clearTimeout(mc),mc=-1}function mb(){oc=!0,clearTimeout(mc),Xb&&Xb.setPlaying(!1)}function nb(){oc=!1,kb()}function ob(){ac.rtl?(I()||ib()===!1)&&$().left&&P(Rb+1):(I()||jb()===!1)&&$().left&&P(Rb-1)}function pb(){ac.rtl?(I()||jb()===!1)&&$().right&&P(Rb-1):(I()||ib()===!1)&&$().right&&P(Rb+1)}function qb(){(I()||jb()===!1)&&$().up&&P(Rb,Sb-1)}function rb(){(I()||ib()===!1)&&$().down&&P(Rb,Sb+1)}function sb(){if(jb()===!1)if($().up)qb();else{var a=document.querySelector(Zb+".past:nth-child("+Rb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Rb-1;P(c,b)}}}function tb(){ib()===!1&&($().down?rb():pb()),kb()}function ub(){ac.autoSlideStoppable&&mb()}function vb(a){ub(a);var b=(document.activeElement,!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable));if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof ac.keyboard)for(var d in ac.keyboard)if(parseInt(d,10)===a.keyCode){var e=ac.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:sb();break;case 78:case 34:tb();break;case 72:case 37:ob();break;case 76:case 39:pb();break;case 75:case 38:qb();break;case 74:case 40:rb();break;case 36:P(0);break;case 35:P(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?sb():tb();break;case 13:I()?G():c=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!fc.transforms3d||(ec.preview?A():H(),a.preventDefault()),kb()}}function wb(a){pc.startX=a.touches[0].clientX,pc.startY=a.touches[0].clientY,pc.startCount=a.touches.length,2===a.touches.length&&ac.overview&&(pc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY}))}function xb(a){if(pc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{ub(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===pc.startCount&&ac.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY});Math.abs(pc.startSpan-d)>pc.threshold&&(pc.captured=!0,dpc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,ob()):e<-pc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,pb()):f>pc.threshold?(pc.captured=!0,qb()):f<-pc.threshold&&(pc.captured=!0,rb()),ac.embedded?(pc.captured||J(Ub))&&a.preventDefault():a.preventDefault()}}}function yb(){pc.captured=!1}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){if(Date.now()-gc>600){gc=Date.now();var b=a.detail||-a.wheelDelta;b>0?tb():sb()}}function Db(a){ub(a),a.preventDefault();var b=m(document.querySelectorAll(Zb)).length,c=Math.floor(a.clientX/ec.wrapper.offsetWidth*b);P(c)}function Eb(a){a.preventDefault(),ub(),ob()}function Fb(a){a.preventDefault(),ub(),pb()}function Gb(a){a.preventDefault(),ub(),qb()}function Hb(a){a.preventDefault(),ub(),rb()}function Ib(a){a.preventDefault(),ub(),sb()}function Jb(a){a.preventDefault(),ub(),tb()}function Kb(){db()}function Lb(){B()}function Mb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Nb(a){if(kc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);P(c,d)}}}function Ob(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Pb(){Reveal.isLastSlide()&&ac.loop===!1?(P(0,0),nb()):oc?nb():mb()}function Qb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb=".reveal .slides section",Zb=".reveal .slides>section",$b=".reveal .slides>section.present>section",_b=".reveal .slides>section:first-of-type",ac={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},bc=!1,cc=[],dc=1,ec={},fc={},gc=0,hc=0,ic=0,jc=0,kc=!1,lc=0,mc=0,nc=-1,oc=!1,pc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Qb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Qb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&fc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Qb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+2*a*Math.PI,g=-Math.PI/2+2*this.progressOffset*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore() },Qb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Qb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Qb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:Q,slide:P,left:ob,right:pb,up:qb,down:rb,prev:sb,next:tb,navigateFragment:hb,prevFragment:jb,nextFragment:ib,navigateTo:P,navigateLeft:ob,navigateRight:pb,navigateUp:qb,navigateDown:rb,navigatePrev:sb,navigateNext:tb,layout:B,availableRoutes:$,availableFragments:_,toggleOverview:H,togglePause:N,isOverview:I,isPaused:O,addEventListeners:j,removeEventListeners:k,getIndices:fb,getSlide:function(a,b){var c=document.querySelectorAll(Zb)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Tb},getCurrentSlide:function(){return Ub},getScale:function(){return dc},getConfig:function(){return ac},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Yb+".past")?!0:!1},isLastSlide:function(){return Ub?Ub.nextElementSibling?!1:J(Ub)&&Ub.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return bc},addEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 613a05f1544d21d5a16ffcefd960c24daec91873 Mon Sep 17 00:00:00 2001 From: Michael Williams Date: Tue, 8 Apr 2014 17:08:21 -0700 Subject: add UMD support. fix #787 --- js/reveal.js | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5cbb3ff..2fd07a8 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -5,10 +5,28 @@ * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal = (function(){ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(function () { + root.Reveal = factory(); + return root.Reveal; + }); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals + root.Reveal = factory(); + } +}(this, function(){ 'use strict'; + var Reveal; + var SLIDES_SELECTOR = '.reveal .slides section', HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section', VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section', @@ -3232,7 +3250,7 @@ var Reveal = (function(){ // --------------------------------------------------------------------// - return { + Reveal = { initialize: initialize, configure: configure, sync: sync, @@ -3379,4 +3397,6 @@ var Reveal = (function(){ } }; -})(); + return Reveal; + +})); -- cgit v1.2.3 From c67e6d2e490f95e0f3e679f07ba347572a840c97 Mon Sep 17 00:00:00 2001 From: Michael Williams Date: Tue, 8 Apr 2014 17:08:43 -0700 Subject: build reveal.min.js --- js/reveal.min.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.min.js b/js/reveal.min.js index a13bd48..5527464 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2014-03-13, 09:22) + * reveal.js 2.6.2 (2014-04-08, 17:06) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!ec.transforms2d&&!ec.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(_b,a),k(_b,d),r(),c()}function b(){ec.transforms3d="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,ec.transforms2d="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,ec.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ec.requestAnimationFrame="function"==typeof ec.requestAnimationFrameMethod,ec.canvas=!!document.createElement("canvas").getContext,Vb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=_b.dependencies.length;h>g;g++){var i=_b.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),Q(),h(),cb(),X(!0),setTimeout(function(){dc.slides.classList.remove("no-transition"),ac=!0,t("ready",{indexh:Qb,indexv:Rb,currentSlide:Tb})},1)}function e(){dc.theme=document.querySelector("#theme"),dc.wrapper=document.querySelector(".reveal"),dc.slides=document.querySelector(".reveal .slides"),dc.slides.classList.add("no-transition"),dc.background=f(dc.wrapper,"div","backgrounds",null),dc.progress=f(dc.wrapper,"div","progress",""),dc.progressbar=dc.progress.querySelector("span"),f(dc.wrapper,"aside","controls",''),dc.slideNumber=f(dc.wrapper,"div","slide-number",""),f(dc.wrapper,"div","state-background",null),f(dc.wrapper,"div","pause-overlay",null),dc.controls=document.querySelector(".reveal .controls"),dc.controlsLeft=l(document.querySelectorAll(".navigate-left")),dc.controlsRight=l(document.querySelectorAll(".navigate-right")),dc.controlsUp=l(document.querySelectorAll(".navigate-up")),dc.controlsDown=l(document.querySelectorAll(".navigate-down")),dc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),dc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),dc.background.innerHTML="",dc.background.classList.add("no-transition"),l(document.querySelectorAll(Yb)).forEach(function(b){var c;c=q()?a(b,b):a(b,dc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),_b.parallaxBackgroundImage?(dc.background.style.backgroundImage='url("'+_b.parallaxBackgroundImage+'")',dc.background.style.backgroundSize=_b.parallaxBackgroundSize,setTimeout(function(){dc.wrapper.classList.add("has-parallax-background")},1)):(dc.background.style.backgroundImage="",dc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Xb).length;if(dc.wrapper.classList.remove(_b.transition),"object"==typeof a&&k(_b,a),ec.transforms3d===!1&&(_b.transition="linear"),dc.wrapper.classList.add(_b.transition),dc.wrapper.setAttribute("data-transition-speed",_b.transitionSpeed),dc.wrapper.setAttribute("data-background-transition",_b.backgroundTransition),dc.controls.style.display=_b.controls?"block":"none",dc.progress.style.display=_b.progress?"block":"none",_b.rtl?dc.wrapper.classList.add("rtl"):dc.wrapper.classList.remove("rtl"),_b.center?dc.wrapper.classList.add("center"):dc.wrapper.classList.remove("center"),_b.mouseWheel?(document.addEventListener("DOMMouseScroll",Bb,!1),document.addEventListener("mousewheel",Bb,!1)):(document.removeEventListener("DOMMouseScroll",Bb,!1),document.removeEventListener("mousewheel",Bb,!1)),_b.rollingLinks?u():v(),_b.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&_b.autoSlide&&_b.autoSlideStoppable&&ec.canvas&&ec.requestAnimationFrame?(Wb=new Pb(dc.wrapper,function(){return Math.min(Math.max((Date.now()-mc)/kc,0),1)}),Wb.on("click",Ob),nc=!1):Wb&&(Wb.destroy(),Wb=null),_b.theme&&dc.theme){var c=dc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];_b.theme!==e&&(c=c.replace(d,_b.theme),dc.theme.setAttribute("href",c))}P()}function i(){if(jc=!0,window.addEventListener("hashchange",Jb,!1),window.addEventListener("resize",Kb,!1),_b.touch&&(dc.wrapper.addEventListener("touchstart",vb,!1),dc.wrapper.addEventListener("touchmove",wb,!1),dc.wrapper.addEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.addEventListener("MSPointerDown",yb,!1),dc.wrapper.addEventListener("MSPointerMove",zb,!1),dc.wrapper.addEventListener("MSPointerUp",Ab,!1))),_b.keyboard&&document.addEventListener("keydown",ub,!1),_b.progress&&dc.progress&&dc.progress.addEventListener("click",Cb,!1),_b.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Lb,!1)}["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.addEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.addEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.addEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.addEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.addEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.addEventListener(a,Ib,!1)})})}function j(){jc=!1,document.removeEventListener("keydown",ub,!1),window.removeEventListener("hashchange",Jb,!1),window.removeEventListener("resize",Kb,!1),dc.wrapper.removeEventListener("touchstart",vb,!1),dc.wrapper.removeEventListener("touchmove",wb,!1),dc.wrapper.removeEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.removeEventListener("MSPointerDown",yb,!1),dc.wrapper.removeEventListener("MSPointerMove",zb,!1),dc.wrapper.removeEventListener("MSPointerUp",Ab,!1)),_b.progress&&dc.progress&&dc.progress.removeEventListener("click",Cb,!1),["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.removeEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.removeEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.removeEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.removeEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.removeEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.removeEventListener(a,Ib,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){_b.hideAddressBar&&Vb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),dc.wrapper.dispatchEvent(c)}function u(){if(ec.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Xb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Xb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Nb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Nb,!1)})}function y(a){z(),dc.preview=document.createElement("div"),dc.preview.classList.add("preview-link-overlay"),dc.wrapper.appendChild(dc.preview),dc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),dc.preview.querySelector("iframe").addEventListener("load",function(){dc.preview.classList.add("loaded")},!1),dc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),dc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){dc.preview.classList.add("visible")},1)}function z(){dc.preview&&(dc.preview.setAttribute("src",""),dc.preview.parentNode.removeChild(dc.preview),dc.preview=null)}function A(){if(dc.wrapper&&!q()){var a=dc.wrapper.offsetWidth,b=dc.wrapper.offsetHeight;a-=b*_b.margin,b-=b*_b.margin;var c=_b.width,d=_b.height,e=20;B(_b.width,_b.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),dc.slides.style.width=c+"px",dc.slides.style.height=d+"px",cc=Math.min(a/c,b/d),cc=Math.max(cc,_b.minScale),cc=Math.min(cc,_b.maxScale),"undefined"==typeof dc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(dc.slides,"translate(-50%, -50%) scale("+cc+") translate(50%, 50%)"):dc.slides.style.zoom=cc;for(var f=l(document.querySelectorAll(Xb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=_b.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}U(),Y()}}function B(a,b,c){l(dc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(_b.overview){kb();var a=dc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;dc.wrapper.classList.add("overview"),dc.wrapper.classList.remove("overview-deactivating"),clearTimeout(hc),clearTimeout(ic),hc=setTimeout(function(){for(var c=document.querySelectorAll(Yb),d=0,e=c.length;e>d;d++){var f=c[d],g=_b.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Qb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Qb?Rb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Mb,!0)}else f.addEventListener("click",Mb,!0)}T(),A(),a||t("overviewshown",{indexh:Qb,indexv:Rb,currentSlide:Tb})},10)}}function F(){_b.overview&&(clearTimeout(hc),clearTimeout(ic),dc.wrapper.classList.remove("overview"),dc.wrapper.classList.add("overview-deactivating"),ic=setTimeout(function(){dc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Xb)).forEach(function(a){n(a,""),a.removeEventListener("click",Mb,!0)}),O(Qb,Rb),jb(),t("overviewhidden",{indexh:Qb,indexv:Rb,currentSlide:Tb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return dc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Tb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=dc.wrapper.classList.contains("paused");kb(),dc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=dc.wrapper.classList.contains("paused");dc.wrapper.classList.remove("paused"),jb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return dc.wrapper.classList.contains("paused")}function O(a,b,c,d){Sb=Tb;var e=document.querySelectorAll(Yb);void 0===b&&(b=D(e[a])),Sb&&Sb.parentNode&&Sb.parentNode.classList.contains("stack")&&C(Sb.parentNode,Rb);var f=bc.concat();bc.length=0;var g=Qb||0,h=Rb||0;Qb=S(Yb,void 0===a?Qb:a),Rb=S(Zb,void 0===b?Rb:b),T(),A();a:for(var i=0,j=bc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function R(){var a=l(document.querySelectorAll(Yb));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){fb(a.querySelectorAll(".fragment"))}),0===b.length&&fb(a.querySelectorAll(".fragment"))})}function S(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){_b.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=_b.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(bc=bc.concat(m.split(" ")))}else b=0;return b}function T(){var a,b,c=l(document.querySelectorAll(Yb)),d=c.length;if(d){var e=H()?10:_b.viewDistance;Vb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Qb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Qb?Math.abs(Rb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function U(){if(_b.progress&&dc.progress){var a=l(document.querySelectorAll(Yb)),b=document.querySelectorAll(Xb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Rb),dc.slideNumber.innerHTML=a}}function W(){var a=Z(),b=$();dc.controlsLeft.concat(dc.controlsRight).concat(dc.controlsUp).concat(dc.controlsDown).concat(dc.controlsPrev).concat(dc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&dc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&dc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&dc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&dc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&dc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&dc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Tb&&(b.prev&&dc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Tb)?(b.prev&&dc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&dc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function X(a){var b=null,c=_b.rtl?"future":"past",d=_b.rtl?"past":"future";if(l(dc.background.childNodes).forEach(function(e,f){Qb>f?e.className="slide-background "+c:f>Qb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Qb)&&l(e.childNodes).forEach(function(a,c){Rb>c?a.className="slide-background past":c>Rb?a.className="slide-background future":(a.className="slide-background present",f===Qb&&(b=a))})}),b){var e=Ub?Ub.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Ub&&dc.background.classList.add("no-transition"),Ub=b}setTimeout(function(){dc.background.classList.remove("no-transition")},1)}function Y(){if(_b.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Yb),d=document.querySelectorAll(Zb),e=dc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=dc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Qb,i=dc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Rb:0;dc.background.style.backgroundPosition=h+"px "+k+"px"}}function Z(){var a=document.querySelectorAll(Yb),b=document.querySelectorAll(Zb),c={left:Qb>0||_b.loop,right:Qb0,down:Rb0,next:!!b.length}}return{prev:!1,next:!1}}function _(a){a&&!bb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function ab(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function bb(){return!!window.location.search.match(/receiver/gi)}function cb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);O(e.h,e.v)}else O(Qb||0,Rb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Qb||g!==Rb)&&O(f,g)}}function db(a){if(_b.history)if(clearTimeout(gc),"number"==typeof a)gc=setTimeout(db,a);else{var b="/";Tb&&"string"==typeof Tb.getAttribute("id")?b="/"+Tb.getAttribute("id"):((Qb>0||Rb>0)&&(b+=Qb),Rb>0&&(b+="/"+Rb)),window.location.hash=b}}function eb(a){var b,c=Qb,d=Rb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(Yb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Tb){var h=Tb.querySelectorAll(".fragment").length>0;if(h){var i=Tb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function fb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function gb(a,b){if(Tb&&_b.fragments){var c=fb(Tb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=fb(Tb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),W(),!(!e.length&&!f.length)}}return!1}function hb(){return gb(null,1)}function ib(){return gb(null,-1)}function jb(){if(kb(),Tb){var a=Tb.parentNode?Tb.parentNode.getAttribute("data-autoslide"):null,b=Tb.getAttribute("data-autoslide");kc=b?parseInt(b,10):a?parseInt(a,10):_b.autoSlide,l(Tb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&kc&&1e3*a.duration>kc&&(kc=1e3*a.duration+1e3)}),!kc||nc||N()||H()||Reveal.isLastSlide()&&_b.loop!==!0||(lc=setTimeout(sb,kc),mc=Date.now()),Wb&&Wb.setPlaying(-1!==lc)}}function kb(){clearTimeout(lc),lc=-1}function lb(){nc=!0,clearTimeout(lc),Wb&&Wb.setPlaying(!1)}function mb(){nc=!1,jb()}function nb(){_b.rtl?(H()||hb()===!1)&&Z().left&&O(Qb+1):(H()||ib()===!1)&&Z().left&&O(Qb-1)}function ob(){_b.rtl?(H()||ib()===!1)&&Z().right&&O(Qb-1):(H()||hb()===!1)&&Z().right&&O(Qb+1)}function pb(){(H()||ib()===!1)&&Z().up&&O(Qb,Rb-1)}function qb(){(H()||hb()===!1)&&Z().down&&O(Qb,Rb+1)}function rb(){if(ib()===!1)if(Z().up)pb();else{var a=document.querySelector(Yb+".past:nth-child("+Qb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Qb-1;O(c,b)}}}function sb(){hb()===!1&&(Z().down?qb():ob()),jb()}function tb(){_b.autoSlideStoppable&&lb()}function ub(a){tb(a),document.activeElement;var b=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof _b.keyboard)for(var d in _b.keyboard)if(parseInt(d,10)===a.keyCode){var e=_b.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:rb();break;case 78:case 34:sb();break;case 72:case 37:nb();break;case 76:case 39:ob();break;case 75:case 38:pb();break;case 74:case 40:qb();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?rb():sb();break;case 13:H()?F():c=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ec.transforms3d||(dc.preview?z():G(),a.preventDefault()),jb()}}function vb(a){oc.startX=a.touches[0].clientX,oc.startY=a.touches[0].clientY,oc.startCount=a.touches.length,2===a.touches.length&&_b.overview&&(oc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY}))}function wb(a){if(oc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{tb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===oc.startCount&&_b.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY});Math.abs(oc.startSpan-d)>oc.threshold&&(oc.captured=!0,doc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,nb()):e<-oc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,ob()):f>oc.threshold?(oc.captured=!0,pb()):f<-oc.threshold&&(oc.captured=!0,qb()),_b.embedded?(oc.captured||I(Tb))&&a.preventDefault():a.preventDefault()}}}function xb(){oc.captured=!1}function yb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],vb(a))}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){if(Date.now()-fc>600){fc=Date.now();var b=a.detail||-a.wheelDelta;b>0?sb():rb()}}function Cb(a){tb(a),a.preventDefault();var b=l(document.querySelectorAll(Yb)).length,c=Math.floor(a.clientX/dc.wrapper.offsetWidth*b);O(c)}function Db(a){a.preventDefault(),tb(),nb()}function Eb(a){a.preventDefault(),tb(),ob()}function Fb(a){a.preventDefault(),tb(),pb()}function Gb(a){a.preventDefault(),tb(),qb()}function Hb(a){a.preventDefault(),tb(),rb()}function Ib(a){a.preventDefault(),tb(),sb()}function Jb(){cb()}function Kb(){A()}function Lb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Mb(a){if(jc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);O(c,d)}}}function Nb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Ob(){Reveal.isLastSlide()&&_b.loop===!1?(O(0,0),mb()):nc?mb():lb()}function Pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb=".reveal .slides section",Yb=".reveal .slides>section",Zb=".reveal .slides>section.present>section",$b=".reveal .slides>section:first-of-type",_b={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ac=!1,bc=[],cc=1,dc={},ec={},fc=0,gc=0,hc=0,ic=0,jc=!1,kc=0,lc=0,mc=-1,nc=!1,oc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ec.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:P,slide:O,left:nb,right:ob,up:pb,down:qb,prev:rb,next:sb,navigateFragment:gb,prevFragment:ib,nextFragment:hb,navigateTo:O,navigateLeft:nb,navigateRight:ob,navigateUp:pb,navigateDown:qb,navigatePrev:rb,navigateNext:sb,layout:A,availableRoutes:Z,availableFragments:$,toggleOverview:G,togglePause:M,isOverview:H,isPaused:N,addEventListeners:i,removeEventListeners:j,getIndices:eb,getSlide:function(a,b){var c=document.querySelectorAll(Yb)[a],d=c&&c.querySelectorAll("section"); -return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Sb},getCurrentSlide:function(){return Tb},getScale:function(){return cc},getConfig:function(){return _b},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Xb+".past")?!0:!1},isLastSlide:function(){return Tb?Tb.nextElementSibling?!1:I(Tb)&&Tb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ac},addEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(function(){return a.Reveal=b(),a.Reveal}):"object"==typeof exports?module.exports=b():a.Reveal=b()}(this,function(){"use strict";function a(a){if(b(),!fc.transforms2d&&!fc.transforms3d)return void document.body.setAttribute("class","no-transforms");window.addEventListener("load",A,!1);var d=Qb.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(ac,a),k(ac,d),r(),c()}function b(){fc.transforms3d="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,fc.transforms2d="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,fc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,fc.requestAnimationFrame="function"==typeof fc.requestAnimationFrameMethod,fc.canvas=!!document.createElement("canvas").getContext,Wb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=ac.dependencies.length;h>g;g++){var i=ac.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),Q(),h(),cb(),X(!0),setTimeout(function(){ec.slides.classList.remove("no-transition"),bc=!0,t("ready",{indexh:Rb,indexv:Sb,currentSlide:Ub})},1)}function e(){ec.theme=document.querySelector("#theme"),ec.wrapper=document.querySelector(".reveal"),ec.slides=document.querySelector(".reveal .slides"),ec.slides.classList.add("no-transition"),ec.background=f(ec.wrapper,"div","backgrounds",null),ec.progress=f(ec.wrapper,"div","progress",""),ec.progressbar=ec.progress.querySelector("span"),f(ec.wrapper,"aside","controls",''),ec.slideNumber=f(ec.wrapper,"div","slide-number",""),f(ec.wrapper,"div","state-background",null),f(ec.wrapper,"div","pause-overlay",null),ec.controls=document.querySelector(".reveal .controls"),ec.controlsLeft=l(document.querySelectorAll(".navigate-left")),ec.controlsRight=l(document.querySelectorAll(".navigate-right")),ec.controlsUp=l(document.querySelectorAll(".navigate-up")),ec.controlsDown=l(document.querySelectorAll(".navigate-down")),ec.controlsPrev=l(document.querySelectorAll(".navigate-prev")),ec.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),ec.background.innerHTML="",ec.background.classList.add("no-transition"),l(document.querySelectorAll(Zb)).forEach(function(b){var c;c=q()?a(b,b):a(b,ec.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),ac.parallaxBackgroundImage?(ec.background.style.backgroundImage='url("'+ac.parallaxBackgroundImage+'")',ec.background.style.backgroundSize=ac.parallaxBackgroundSize,setTimeout(function(){ec.wrapper.classList.add("has-parallax-background")},1)):(ec.background.style.backgroundImage="",ec.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Yb).length;if(ec.wrapper.classList.remove(ac.transition),"object"==typeof a&&k(ac,a),fc.transforms3d===!1&&(ac.transition="linear"),ec.wrapper.classList.add(ac.transition),ec.wrapper.setAttribute("data-transition-speed",ac.transitionSpeed),ec.wrapper.setAttribute("data-background-transition",ac.backgroundTransition),ec.controls.style.display=ac.controls?"block":"none",ec.progress.style.display=ac.progress?"block":"none",ac.rtl?ec.wrapper.classList.add("rtl"):ec.wrapper.classList.remove("rtl"),ac.center?ec.wrapper.classList.add("center"):ec.wrapper.classList.remove("center"),ac.mouseWheel?(document.addEventListener("DOMMouseScroll",Bb,!1),document.addEventListener("mousewheel",Bb,!1)):(document.removeEventListener("DOMMouseScroll",Bb,!1),document.removeEventListener("mousewheel",Bb,!1)),ac.rollingLinks?u():v(),ac.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&ac.autoSlide&&ac.autoSlideStoppable&&fc.canvas&&fc.requestAnimationFrame?(Xb=new Pb(ec.wrapper,function(){return Math.min(Math.max((Date.now()-nc)/lc,0),1)}),Xb.on("click",Ob),oc=!1):Xb&&(Xb.destroy(),Xb=null),ac.theme&&ec.theme){var c=ec.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];ac.theme!==e&&(c=c.replace(d,ac.theme),ec.theme.setAttribute("href",c))}P()}function i(){if(kc=!0,window.addEventListener("hashchange",Jb,!1),window.addEventListener("resize",Kb,!1),ac.touch&&(ec.wrapper.addEventListener("touchstart",vb,!1),ec.wrapper.addEventListener("touchmove",wb,!1),ec.wrapper.addEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.addEventListener("MSPointerDown",yb,!1),ec.wrapper.addEventListener("MSPointerMove",zb,!1),ec.wrapper.addEventListener("MSPointerUp",Ab,!1))),ac.keyboard&&document.addEventListener("keydown",ub,!1),ac.progress&&ec.progress&&ec.progress.addEventListener("click",Cb,!1),ac.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Lb,!1)}["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.addEventListener(a,Db,!1)}),ec.controlsRight.forEach(function(b){b.addEventListener(a,Eb,!1)}),ec.controlsUp.forEach(function(b){b.addEventListener(a,Fb,!1)}),ec.controlsDown.forEach(function(b){b.addEventListener(a,Gb,!1)}),ec.controlsPrev.forEach(function(b){b.addEventListener(a,Hb,!1)}),ec.controlsNext.forEach(function(b){b.addEventListener(a,Ib,!1)})})}function j(){kc=!1,document.removeEventListener("keydown",ub,!1),window.removeEventListener("hashchange",Jb,!1),window.removeEventListener("resize",Kb,!1),ec.wrapper.removeEventListener("touchstart",vb,!1),ec.wrapper.removeEventListener("touchmove",wb,!1),ec.wrapper.removeEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.removeEventListener("MSPointerDown",yb,!1),ec.wrapper.removeEventListener("MSPointerMove",zb,!1),ec.wrapper.removeEventListener("MSPointerUp",Ab,!1)),ac.progress&&ec.progress&&ec.progress.removeEventListener("click",Cb,!1),["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.removeEventListener(a,Db,!1)}),ec.controlsRight.forEach(function(b){b.removeEventListener(a,Eb,!1)}),ec.controlsUp.forEach(function(b){b.removeEventListener(a,Fb,!1)}),ec.controlsDown.forEach(function(b){b.removeEventListener(a,Gb,!1)}),ec.controlsPrev.forEach(function(b){b.removeEventListener(a,Hb,!1)}),ec.controlsNext.forEach(function(b){b.removeEventListener(a,Ib,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){ac.hideAddressBar&&Wb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),ec.wrapper.dispatchEvent(c)}function u(){if(fc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Yb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Yb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Nb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Nb,!1)})}function y(a){z(),ec.preview=document.createElement("div"),ec.preview.classList.add("preview-link-overlay"),ec.wrapper.appendChild(ec.preview),ec.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),ec.preview.querySelector("iframe").addEventListener("load",function(){ec.preview.classList.add("loaded")},!1),ec.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),ec.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){ec.preview.classList.add("visible")},1)}function z(){ec.preview&&(ec.preview.setAttribute("src",""),ec.preview.parentNode.removeChild(ec.preview),ec.preview=null)}function A(){if(ec.wrapper&&!q()){var a=ec.wrapper.offsetWidth,b=ec.wrapper.offsetHeight;a-=b*ac.margin,b-=b*ac.margin;var c=ac.width,d=ac.height,e=20;B(ac.width,ac.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),ec.slides.style.width=c+"px",ec.slides.style.height=d+"px",dc=Math.min(a/c,b/d),dc=Math.max(dc,ac.minScale),dc=Math.min(dc,ac.maxScale),"undefined"==typeof ec.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(ec.slides,"translate(-50%, -50%) scale("+dc+") translate(50%, 50%)"):ec.slides.style.zoom=dc;for(var f=l(document.querySelectorAll(Yb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=ac.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}U(),Y()}}function B(a,b,c){l(ec.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(ac.overview){kb();var a=ec.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;ec.wrapper.classList.add("overview"),ec.wrapper.classList.remove("overview-deactivating"),clearTimeout(ic),clearTimeout(jc),ic=setTimeout(function(){for(var c=document.querySelectorAll(Zb),d=0,e=c.length;e>d;d++){var f=c[d],g=ac.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Rb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Rb?Sb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Mb,!0)}else f.addEventListener("click",Mb,!0)}T(),A(),a||t("overviewshown",{indexh:Rb,indexv:Sb,currentSlide:Ub})},10)}}function F(){ac.overview&&(clearTimeout(ic),clearTimeout(jc),ec.wrapper.classList.remove("overview"),ec.wrapper.classList.add("overview-deactivating"),jc=setTimeout(function(){ec.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Yb)).forEach(function(a){n(a,""),a.removeEventListener("click",Mb,!0)}),O(Rb,Sb),jb(),t("overviewhidden",{indexh:Rb,indexv:Sb,currentSlide:Ub}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return ec.wrapper.classList.contains("overview")}function I(a){return a=a?a:Ub,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=ec.wrapper.classList.contains("paused");kb(),ec.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=ec.wrapper.classList.contains("paused");ec.wrapper.classList.remove("paused"),jb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return ec.wrapper.classList.contains("paused")}function O(a,b,c,d){Tb=Ub;var e=document.querySelectorAll(Zb);void 0===b&&(b=D(e[a])),Tb&&Tb.parentNode&&Tb.parentNode.classList.contains("stack")&&C(Tb.parentNode,Sb);var f=cc.concat();cc.length=0;var g=Rb||0,h=Sb||0;Rb=S(Zb,void 0===a?Rb:a),Sb=S($b,void 0===b?Sb:b),T(),A();a:for(var i=0,j=cc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function R(){var a=l(document.querySelectorAll(Zb));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){fb(a.querySelectorAll(".fragment"))}),0===b.length&&fb(a.querySelectorAll(".fragment"))})}function S(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){ac.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=ac.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(cc=cc.concat(m.split(" ")))}else b=0;return b}function T(){var a,b,c=l(document.querySelectorAll(Zb)),d=c.length;if(d){var e=H()?10:ac.viewDistance;Wb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Rb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=Math.abs(f===Rb?Sb-k:k-j),m.style.display=a+b>e?"none":"block"}}}}function U(){if(ac.progress&&ec.progress){var a=l(document.querySelectorAll(Zb)),b=document.querySelectorAll(Yb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Sb),ec.slideNumber.innerHTML=a}}function W(){var a=Z(),b=$();ec.controlsLeft.concat(ec.controlsRight).concat(ec.controlsUp).concat(ec.controlsDown).concat(ec.controlsPrev).concat(ec.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&ec.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&ec.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&ec.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&ec.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&ec.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&ec.controlsNext.forEach(function(a){a.classList.add("enabled")}),Ub&&(b.prev&&ec.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Ub)?(b.prev&&ec.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&ec.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function X(a){var b=null,c=ac.rtl?"future":"past",d=ac.rtl?"past":"future";if(l(ec.background.childNodes).forEach(function(e,f){Rb>f?e.className="slide-background "+c:f>Rb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Rb)&&l(e.childNodes).forEach(function(a,c){Sb>c?a.className="slide-background past":c>Sb?a.className="slide-background future":(a.className="slide-background present",f===Rb&&(b=a))})}),b){var e=Vb?Vb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Vb&&ec.background.classList.add("no-transition"),Vb=b}setTimeout(function(){ec.background.classList.remove("no-transition")},1)}function Y(){if(ac.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Zb),d=document.querySelectorAll($b),e=ec.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=ec.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Rb,i=ec.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Sb:0;ec.background.style.backgroundPosition=h+"px "+k+"px"}}function Z(){var a=document.querySelectorAll(Zb),b=document.querySelectorAll($b),c={left:Rb>0||ac.loop,right:Rb0,down:Sb0,next:!!b.length}}return{prev:!1,next:!1}}function _(a){a&&!bb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function ab(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function bb(){return!!window.location.search.match(/receiver/gi)}function cb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Qb.getIndices(d);O(e.h,e.v)}else O(Rb||0,Sb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Rb||g!==Sb)&&O(f,g)}}function db(a){if(ac.history)if(clearTimeout(hc),"number"==typeof a)hc=setTimeout(db,a);else{var b="/";Ub&&"string"==typeof Ub.getAttribute("id")?b="/"+Ub.getAttribute("id"):((Rb>0||Sb>0)&&(b+=Rb),Sb>0&&(b+="/"+Sb)),window.location.hash=b}}function eb(a){var b,c=Rb,d=Sb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(Zb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Ub){var h=Ub.querySelectorAll(".fragment").length>0;if(h){var i=Ub.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function fb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function gb(a,b){if(Ub&&ac.fragments){var c=fb(Ub.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=fb(Ub.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),W(),!(!e.length&&!f.length)}}return!1}function hb(){return gb(null,1)}function ib(){return gb(null,-1)}function jb(){if(kb(),Ub){var a=Ub.parentNode?Ub.parentNode.getAttribute("data-autoslide"):null,b=Ub.getAttribute("data-autoslide");lc=b?parseInt(b,10):a?parseInt(a,10):ac.autoSlide,l(Ub.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&lc&&1e3*a.duration>lc&&(lc=1e3*a.duration+1e3)}),!lc||oc||N()||H()||Qb.isLastSlide()&&ac.loop!==!0||(mc=setTimeout(sb,lc),nc=Date.now()),Xb&&Xb.setPlaying(-1!==mc)}}function kb(){clearTimeout(mc),mc=-1}function lb(){oc=!0,clearTimeout(mc),Xb&&Xb.setPlaying(!1)}function mb(){oc=!1,jb()}function nb(){ac.rtl?(H()||hb()===!1)&&Z().left&&O(Rb+1):(H()||ib()===!1)&&Z().left&&O(Rb-1)}function ob(){ac.rtl?(H()||ib()===!1)&&Z().right&&O(Rb-1):(H()||hb()===!1)&&Z().right&&O(Rb+1)}function pb(){(H()||ib()===!1)&&Z().up&&O(Rb,Sb-1)}function qb(){(H()||hb()===!1)&&Z().down&&O(Rb,Sb+1)}function rb(){if(ib()===!1)if(Z().up)pb();else{var a=document.querySelector(Zb+".past:nth-child("+Rb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Rb-1;O(c,b)}}}function sb(){hb()===!1&&(Z().down?qb():ob()),jb()}function tb(){ac.autoSlideStoppable&&lb()}function ub(a){tb(a);var b=(document.activeElement,!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable));if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof ac.keyboard)for(var d in ac.keyboard)if(parseInt(d,10)===a.keyCode){var e=ac.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Qb[e]&&Qb[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:rb();break;case 78:case 34:sb();break;case 72:case 37:nb();break;case 76:case 39:ob();break;case 75:case 38:pb();break;case 74:case 40:qb();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?rb():sb();break;case 13:H()?F():c=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!fc.transforms3d||(ec.preview?z():G(),a.preventDefault()),jb()}}function vb(a){pc.startX=a.touches[0].clientX,pc.startY=a.touches[0].clientY,pc.startCount=a.touches.length,2===a.touches.length&&ac.overview&&(pc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY}))}function wb(a){if(pc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{tb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===pc.startCount&&ac.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY});Math.abs(pc.startSpan-d)>pc.threshold&&(pc.captured=!0,dpc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,nb()):e<-pc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,ob()):f>pc.threshold?(pc.captured=!0,pb()):f<-pc.threshold&&(pc.captured=!0,qb()),ac.embedded?(pc.captured||I(Ub))&&a.preventDefault():a.preventDefault()}}}function xb(){pc.captured=!1}function yb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],vb(a))}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){if(Date.now()-gc>600){gc=Date.now();var b=a.detail||-a.wheelDelta;b>0?sb():rb()}}function Cb(a){tb(a),a.preventDefault();var b=l(document.querySelectorAll(Zb)).length,c=Math.floor(a.clientX/ec.wrapper.offsetWidth*b);O(c)}function Db(a){a.preventDefault(),tb(),nb()}function Eb(a){a.preventDefault(),tb(),ob()}function Fb(a){a.preventDefault(),tb(),pb()}function Gb(a){a.preventDefault(),tb(),qb()}function Hb(a){a.preventDefault(),tb(),rb()}function Ib(a){a.preventDefault(),tb(),sb()}function Jb(){cb()}function Kb(){A()}function Lb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Mb(a){if(kc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);O(c,d)}}}function Nb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Ob(){Qb.isLastSlide()&&ac.loop===!1?(O(0,0),mb()):oc?mb():lb()}function Pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb=".reveal .slides section",Zb=".reveal .slides>section",$b=".reveal .slides>section.present>section",_b=".reveal .slides>section:first-of-type",ac={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},bc=!1,cc=[],dc=1,ec={},fc={},gc=0,hc=0,ic=0,jc=0,kc=!1,lc=0,mc=0,nc=-1,oc=!1,pc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&fc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+2*a*Math.PI,g=-Math.PI/2+2*this.progressOffset*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},Qb={initialize:a,configure:h,sync:P,slide:O,left:nb,right:ob,up:pb,down:qb,prev:rb,next:sb,navigateFragment:gb,prevFragment:ib,nextFragment:hb,navigateTo:O,navigateLeft:nb,navigateRight:ob,navigateUp:pb,navigateDown:qb,navigatePrev:rb,navigateNext:sb,layout:A,availableRoutes:Z,availableFragments:$,toggleOverview:G,togglePause:M,isOverview:H,isPaused:N,addEventListeners:i,removeEventListeners:j,getIndices:eb,getSlide:function(a,b){var c=document.querySelectorAll(Zb)[a],d=c&&c.querySelectorAll("section"); +return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Tb},getCurrentSlide:function(){return Ub},getScale:function(){return dc},getConfig:function(){return ac},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Yb+".past")?!0:!1},isLastSlide:function(){return Ub?Ub.nextElementSibling?!1:I(Ub)&&Ub.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return bc},addEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}); \ No newline at end of file -- cgit v1.2.3 From 731598f7c8fdb2b5fa6ade3f3e351958a5ba1a28 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 11 Apr 2014 09:40:44 +0200 Subject: make all slides 'present' while printing --- js/reveal.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 6daa9f8..962a7cd 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1744,6 +1744,8 @@ var Reveal = (function(){ var slides = toArray( document.querySelectorAll( selector ) ), slidesLength = slides.length; + var printMode = isPrintingPDF(); + if( slidesLength ) { // Should the index loop? @@ -1770,6 +1772,17 @@ var Reveal = (function(){ // http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute element.setAttribute( 'hidden', '' ); + // If this element contains vertical slides + if( element.querySelector( 'section' ) ) { + element.classList.add( 'stack' ); + } + + // If we're printing static slides, all slides are "present" + if( printMode ) { + element.classList.add( 'present' ); + continue; + } + if( i < index ) { // Any element previous to index is given the 'past' class element.classList.add( reverse ? 'future' : 'past' ); @@ -1800,11 +1813,6 @@ var Reveal = (function(){ } } } - - // If this element contains vertical slides - if( element.querySelector( 'section' ) ) { - element.classList.add( 'stack' ); - } } // Mark the current slide as present -- cgit v1.2.3 From 3b111a1cd4cd8fe4a7bd27f70ea270e09a0073ce Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 13 Apr 2014 11:55:06 +0200 Subject: add support for custom keyboard availability condition --- js/reveal.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 962a7cd..fe499ea 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -44,6 +44,9 @@ var Reveal = (function(){ // Enable keyboard shortcuts for navigation keyboard: true, + // Optional function that blocks keyboard events when retuning false + keyboardCondition: null, + // Enable the slide overview mode overview: true, @@ -2836,6 +2839,12 @@ var Reveal = (function(){ */ function onDocumentKeyDown( event ) { + // If there's a condition specified and it returns false, + // ignore this event + if( typeof config.keyboardCondition === 'function' && config.keyboardCondition() === false ) { + return true; + } + // Remember if auto-sliding was paused so we can toggle it var autoSlideWasPaused = autoSlidePaused; -- cgit v1.2.3 From 11ea0aa3e13e665dc882a432381c27898c86e569 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 18 Apr 2014 13:56:51 +0200 Subject: postmessage plugin is now part of reveal.js core --- js/reveal.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index fe499ea..57f0872 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -239,7 +239,6 @@ var Reveal = (function(){ } - /** * Loads the dependencies of reveal.js. Dependencies are * defined via the configuration option 'dependencies' @@ -313,6 +312,9 @@ var Reveal = (function(){ // Make sure we've got all the DOM elements we need setupDOM(); + // Listen to messages posted to this window + setupPostMessage(); + // Resets all vertical slides so that only the first is visible resetVerticalSlides(); @@ -551,6 +553,28 @@ var Reveal = (function(){ } + /** + * Registers a listener to postMessage events, this makes it + * possible to call all reveal.js API methods from another + * window. For example: + * + * revealWindow.postMessage( JSON.stringify({ + * method: 'slide', + * args: [ 2 ] + * }), '*' ); + */ + function setupPostMessage() { + + window.addEventListener( 'message', function ( event ) { + var data = JSON.parse( event.data ); + var method = Reveal[data.method]; + if( typeof method === 'function' ) { + method.apply( Reveal, data.args ); + } + }, false); + + } + /** * Applies the configuration settings from the config * object. May be called multiple times. -- cgit v1.2.3 From a4b09aecda8f70837c44a18c846ab892a2c0800c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 18 Apr 2014 20:03:50 +0200 Subject: bubble all reveal.js events to parent window through postMessage --- js/reveal.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 57f0872..81cbd16 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -568,10 +568,11 @@ var Reveal = (function(){ window.addEventListener( 'message', function ( event ) { var data = JSON.parse( event.data ); var method = Reveal[data.method]; + if( typeof method === 'function' ) { method.apply( Reveal, data.args ); } - }, false); + }, false ); } @@ -957,13 +958,22 @@ var Reveal = (function(){ * Dispatches an event of the specified type from the * reveal DOM element. */ - function dispatchEvent( type, properties ) { + function dispatchEvent( type, args ) { - var event = document.createEvent( "HTMLEvents", 1, 2 ); + var event = document.createEvent( 'HTMLEvents', 1, 2 ); event.initEvent( type, true, true ); - extend( event, properties ); + extend( event, args ); dom.wrapper.dispatchEvent( event ); + // If we're in an iframe, post each reveal.js event to the + // parent window. Used by the notes plugin + if( window.parent !== window.self ) { + // Remove arguments that can't be stringified (circular structures) + if( args && args.currentSlide ) delete args.currentSlide; + if( args && args.previousSlide ) delete args.previousSlide; + window.parent.postMessage( JSON.stringify({ namespace: 'reveal', eventName: type, eventArgs: args || null }), '*' ); + } + } /** -- cgit v1.2.3 From fea11d24bc7b93ef516fa52a04e32b5ae5e419de Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 18 Apr 2014 20:07:03 +0200 Subject: add config option for postMessage features --- js/reveal.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 81cbd16..a575956 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -89,6 +89,9 @@ var Reveal = (function(){ // Opens links in an iframe preview overlay previewLinks: false, + // Flags if we should listen to and dispatch events through window.postMessage + postMessage: true, + // Focuses body when page changes visiblity to ensure keyboard shortcuts work focusBodyOnPageVisiblityChange: true, @@ -565,14 +568,16 @@ var Reveal = (function(){ */ function setupPostMessage() { - window.addEventListener( 'message', function ( event ) { - var data = JSON.parse( event.data ); - var method = Reveal[data.method]; + if( config.postMessage ) { + window.addEventListener( 'message', function ( event ) { + var data = JSON.parse( event.data ); + var method = Reveal[data.method]; - if( typeof method === 'function' ) { - method.apply( Reveal, data.args ); - } - }, false ); + if( typeof method === 'function' ) { + method.apply( Reveal, data.args ); + } + }, false ); + } } @@ -967,7 +972,7 @@ var Reveal = (function(){ // If we're in an iframe, post each reveal.js event to the // parent window. Used by the notes plugin - if( window.parent !== window.self ) { + if( config.postMessage && window.parent !== window.self ) { // Remove arguments that can't be stringified (circular structures) if( args && args.currentSlide ) delete args.currentSlide; if( args && args.previousSlide ) delete args.previousSlide; -- cgit v1.2.3 From ce31184bf30fcfbc45dab480d0072e51f626b15a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 19 Apr 2014 10:53:33 +0200 Subject: split postmessage config into two options --- js/reveal.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a575956..8b7b158 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -89,9 +89,12 @@ var Reveal = (function(){ // Opens links in an iframe preview overlay previewLinks: false, - // Flags if we should listen to and dispatch events through window.postMessage + // Exposes the reveal.js API through window.postMessage postMessage: true, + // Dispatches all reveal.js events to the parent window through postMessage + postMessageEvents: false, + // Focuses body when page changes visiblity to ensure keyboard shortcuts work focusBodyOnPageVisiblityChange: true, @@ -972,11 +975,8 @@ var Reveal = (function(){ // If we're in an iframe, post each reveal.js event to the // parent window. Used by the notes plugin - if( config.postMessage && window.parent !== window.self ) { - // Remove arguments that can't be stringified (circular structures) - if( args && args.currentSlide ) delete args.currentSlide; - if( args && args.previousSlide ) delete args.previousSlide; - window.parent.postMessage( JSON.stringify({ namespace: 'reveal', eventName: type, eventArgs: args || null }), '*' ); + if( config.postMessageEvents && window.parent !== window.self ) { + window.parent.postMessage( JSON.stringify({ namespace: 'reveal', eventName: type, state: getState() }), '*' ); } } -- cgit v1.2.3 From 4a39aecbab17652b03bd863474dc0c458c96881a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 20 Apr 2014 10:52:27 +0200 Subject: prevent repeated autoslidepaused/resumed events --- js/reveal.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 8b7b158..cba8121 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -968,6 +968,8 @@ var Reveal = (function(){ */ function dispatchEvent( type, args ) { + console.log('event', type); + var event = document.createEvent( 'HTMLEvents', 1, 2 ); event.initEvent( type, true, true ); extend( event, args ); @@ -2747,21 +2749,25 @@ var Reveal = (function(){ function pauseAutoSlide() { - autoSlidePaused = true; - dispatchEvent( 'autoslidepaused' ); - clearTimeout( autoSlideTimeout ); + if( autoSlide && !autoSlidePaused ) { + autoSlidePaused = true; + dispatchEvent( 'autoslidepaused' ); + clearTimeout( autoSlideTimeout ); - if( autoSlidePlayer ) { - autoSlidePlayer.setPlaying( false ); + if( autoSlidePlayer ) { + autoSlidePlayer.setPlaying( false ); + } } } function resumeAutoSlide() { - autoSlidePaused = false; - dispatchEvent( 'autoslideresumed' ); - cueAutoSlide(); + if( autoSlide && autoSlidePaused ) { + autoSlidePaused = false; + dispatchEvent( 'autoslideresumed' ); + cueAutoSlide(); + } } -- cgit v1.2.3 From ce05138f9a9065526ee584d2f59e48952910522f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 22 Apr 2014 14:06:58 +0200 Subject: dont toggle paused/overview modes needlessly when setting state --- js/reveal.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index cba8121..e133887 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -968,8 +968,6 @@ var Reveal = (function(){ */ function dispatchEvent( type, args ) { - console.log('event', type); - var event = document.createEvent( 'HTMLEvents', 1, 2 ); event.initEvent( type, true, true ); extend( event, args ); @@ -2498,8 +2496,17 @@ var Reveal = (function(){ if( typeof state === 'object' ) { slide( deserialize( state.indexh ), deserialize( state.indexv ), deserialize( state.indexf ) ); - togglePause( deserialize( state.paused ) ); - toggleOverview( deserialize( state.overview ) ); + + var pausedFlag = deserialize( state.paused ), + overviewFlag = deserialize( state.overview ); + + if( typeof pausedFlag === 'boolean' && pausedFlag !== isPaused() ) { + togglePause( pausedFlag ); + } + + if( typeof overviewFlag === 'boolean' && overviewFlag !== isOverview() ) { + toggleOverview( overviewFlag ); + } } } -- cgit v1.2.3 From 5d39b5eabf97a39936c70558e836253f9bbca931 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 22 Apr 2014 15:16:53 +0200 Subject: carry slide classes over to generated background elements --- js/reveal.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index e133887..160b90f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -507,7 +507,9 @@ var Reveal = (function(){ }; var element = document.createElement( 'div' ); - element.className = 'slide-background'; + + // Carry over custom classes from the slide to the background + element.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' ); if( data.background ) { // Auto-wrap image urls in url(...) @@ -2036,14 +2038,18 @@ var Reveal = (function(){ // states of their slides (past/present/future) toArray( dom.background.childNodes ).forEach( function( backgroundh, h ) { + backgroundh.classList.remove( 'past' ); + backgroundh.classList.remove( 'present' ); + backgroundh.classList.remove( 'future' ); + if( h < indexh ) { - backgroundh.className = 'slide-background ' + horizontalPast; + backgroundh.classList.add( horizontalPast ); } else if ( h > indexh ) { - backgroundh.className = 'slide-background ' + horizontalFuture; + backgroundh.classList.add( horizontalFuture ); } else { - backgroundh.className = 'slide-background present'; + backgroundh.classList.add( 'present' ); // Store a reference to the current background element currentBackground = backgroundh; @@ -2052,14 +2058,18 @@ var Reveal = (function(){ if( includeAll || h === indexh ) { toArray( backgroundh.querySelectorAll( '.slide-background' ) ).forEach( function( backgroundv, v ) { + backgroundv.classList.remove( 'past' ); + backgroundv.classList.remove( 'present' ); + backgroundv.classList.remove( 'future' ); + if( v < indexv ) { - backgroundv.className = 'slide-background past'; + backgroundv.classList.add( 'past' ); } else if ( v > indexv ) { - backgroundv.className = 'slide-background future'; + backgroundv.classList.add( 'future' ); } else { - backgroundv.className = 'slide-background present'; + backgroundv.classList.add( 'present' ); // Only if this is the present horizontal and vertical slide if( h === indexh ) currentBackground = backgroundv; -- cgit v1.2.3 From 343765b7ab1ce5392389063b0513ce54a0a76506 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 22 Apr 2014 15:41:08 +0200 Subject: images with data-src attribute are now lazy-loaded #793 --- js/reveal.js | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 160b90f..524678d 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1905,6 +1905,11 @@ var Reveal = (function(){ viewDistance = isOverview() ? 6 : 1; } + // Limit view distance on weaker devices + if( isPrintingPDF() ) { + viewDistance = Number.MAX_VALUE; + } + for( var x = 0; x < horizontalSlidesLength; x++ ) { var horizontalSlide = horizontalSlides[x]; @@ -1915,7 +1920,13 @@ var Reveal = (function(){ distanceX = Math.abs( ( indexh - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; // Show the horizontal slide if it's within the view distance - horizontalSlide.style.display = distanceX > viewDistance ? 'none' : 'block'; + if( distanceX < viewDistance ) { + horizontalSlide.style.display = 'block'; + loadSlide( horizontalSlide ); + } + else { + horizontalSlide.style.display = 'none'; + } if( verticalSlidesLength ) { @@ -1926,7 +1937,13 @@ var Reveal = (function(){ distanceY = x === indexh ? Math.abs( indexv - y ) : Math.abs( y - oy ); - verticalSlide.style.display = ( distanceX + distanceY ) > viewDistance ? 'none' : 'block'; + if( distanceX + distanceY < viewDistance ) { + verticalSlide.style.display = 'block'; + loadSlide( verticalSlide ); + } + else { + verticalSlide.style.display = 'none'; + } } } @@ -2149,6 +2166,19 @@ var Reveal = (function(){ } + /** + * Loads any content that is set to load lazily (data-src) + * inside of the given slide. + */ + function loadSlide( slide ) { + + toArray( slide.querySelectorAll( 'img[data-src]' ) ).forEach( function( element ) { + element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); + element.removeAttribute( 'data-src' ); + } ); + + } + /** * Determine what available routes there are for navigation. * -- cgit v1.2.3 From bbd596e434969b446c2dff0929e3117285974fc4 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 22 Apr 2014 15:52:44 +0200 Subject: lazy loading support for video #793 --- js/reveal.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 524678d..e910682 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2172,11 +2172,29 @@ var Reveal = (function(){ */ function loadSlide( slide ) { - toArray( slide.querySelectorAll( 'img[data-src]' ) ).forEach( function( element ) { + // Media elements with data-src attributes + toArray( slide.querySelectorAll( 'img[data-src], video[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); element.removeAttribute( 'data-src' ); } ); + // Video elements with multiple s + toArray( slide.querySelectorAll( 'video' ) ).forEach( function( video ) { + var sources = 0; + + toArray( slide.querySelectorAll( 'source[data-src]' ) ).forEach( function( source ) { + source.setAttribute( 'src', source.getAttribute( 'data-src' ) ); + source.removeAttribute( 'data-src' ); + sources += 1; + } ); + + // If we rewrote sources for this video, we need to manually + // tell it to load from its new origin + if( sources > 0 ) { + video.load(); + } + } ); + } /** -- cgit v1.2.3 From 73f96f1d284bca6e01c36c888c2620b376c06598 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 22 Apr 2014 16:10:08 +0200 Subject: lazy-load support for audio #793 --- js/reveal.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index e910682..42edf90 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2173,25 +2173,25 @@ var Reveal = (function(){ function loadSlide( slide ) { // Media elements with data-src attributes - toArray( slide.querySelectorAll( 'img[data-src], video[data-src]' ) ).forEach( function( element ) { + toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); element.removeAttribute( 'data-src' ); } ); - // Video elements with multiple s - toArray( slide.querySelectorAll( 'video' ) ).forEach( function( video ) { + // Media elements with multiple s + toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( media ) { var sources = 0; - toArray( slide.querySelectorAll( 'source[data-src]' ) ).forEach( function( source ) { + toArray( media.querySelectorAll( 'source[data-src]' ) ).forEach( function( source ) { source.setAttribute( 'src', source.getAttribute( 'data-src' ) ); source.removeAttribute( 'data-src' ); sources += 1; } ); - // If we rewrote sources for this video, we need to manually - // tell it to load from its new origin + // If we rewrote sources for this video/audio element, we need + // to manually tell it to load from its new origin if( sources > 0 ) { - video.load(); + media.load(); } } ); -- cgit v1.2.3 From 53238c47ce85b2746d8d3375dc909aff892de3e7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 22 Apr 2014 19:01:59 +0200 Subject: null and type check what comes through postmessage --- js/reveal.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 42edf90..1238f9f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -575,11 +575,16 @@ var Reveal = (function(){ if( config.postMessage ) { window.addEventListener( 'message', function ( event ) { - var data = JSON.parse( event.data ); - var method = Reveal[data.method]; + var data = event.data; - if( typeof method === 'function' ) { - method.apply( Reveal, data.args ); + // Make sure we're dealing with JSON + if( data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}' ) { + data = JSON.parse( data ); + + // Check if the requested method can be found + if( data.method && typeof Reveal[data.method] === 'function' ) { + Reveal[data.method].apply( Reveal, data.args ); + } } }, false ); } -- cgit v1.2.3 From 54ca9edeed077c4f7e564d0fa26c086af28a02ee Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 23 Apr 2014 15:36:22 +0200 Subject: lazy load support for iframes #793 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 1238f9f..7a032d0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2178,7 +2178,7 @@ var Reveal = (function(){ function loadSlide( slide ) { // Media elements with data-src attributes - toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src]' ) ).forEach( function( element ) { + toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); element.removeAttribute( 'data-src' ); } ); -- cgit v1.2.3 From 646203f038fcddbc15c35e891d3bbd7aa1d8be1f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 23 Apr 2014 19:47:30 +0200 Subject: revert from flexbox for pdf centering, use js for PDF setup --- js/reveal.js | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 7a032d0..982b951 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -333,6 +333,11 @@ var Reveal = (function(){ // Update all backgrounds updateBackground( true ); + // Special setup and config is required when printing to PDF + if( isPrintingPDF() ) { + setupPDF(); + } + // Notify listeners that the presentation is ready but use a 1ms // timeout to ensure it's not fired synchronously after #initialize() setTimeout( function() { @@ -401,6 +406,66 @@ var Reveal = (function(){ } + /** + * Configures the presentation for printing to a static + * PDF. + */ + function setupPDF() { + + // Dimensions of the content + var pageWidth = 1122, + pageHeight = 867; + + var slideWidth = 960, + slideHeight = 700; + + document.body.classList.add( 'print-pdf' ); + document.body.style.width = pageWidth + 'px'; + document.body.style.height = pageHeight + 'px'; + + // Slide and slide background layout + toArray( document.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { + + // Vertical stacks are not centred since their section + // children will be + if( slide.classList.contains( 'stack' ) ) { + slide.style.top = 0; + } + else { + var left = ( pageWidth - slideWidth ) / 2; + var top = ( pageHeight - slideHeight ) / 2; + + if( config.center || slide.classList.contains( 'center' ) ) { + top = Math.max( ( pageHeight - getAbsoluteHeight( slide ) ) / 2, 0 ); + } + + slide.style.left = left + 'px'; + slide.style.top = top + 'px'; + slide.style.width = slideWidth + 'px'; + slide.style.height = slideHeight + 'px'; + + if( slide.scrollHeight > slideHeight ) { + slide.style.overflow = 'hidden'; + } + + var background = slide.querySelector( '.slide-background' ); + if( background ) { + background.style.width = pageWidth + 'px'; + background.style.height = pageHeight + 'px'; + background.style.top = -top + 'px'; + background.style.left = -left + 'px'; + } + } + + } ); + + // Show all fragments + toArray( document.querySelectorAll( SLIDES_SELECTOR + ' .fragment' ) ).forEach( function( fragment ) { + fragment.classList.add( 'visible' ); + } ); + + } + /** * Creates an HTML element and returns a reference to it. * If the element already exists the existing instance will @@ -428,9 +493,7 @@ var Reveal = (function(){ */ function createBackgrounds() { - if( isPrintingPDF() ) { - document.body.classList.add( 'print-pdf' ); - } + var printMode = isPrintingPDF(); // Clear prior backgrounds dom.background.innerHTML = ''; @@ -441,7 +504,7 @@ var Reveal = (function(){ var backgroundStack; - if( isPrintingPDF() ) { + if( printMode ) { backgroundStack = createBackground( slideh, slideh ); } else { @@ -451,7 +514,7 @@ var Reveal = (function(){ // Iterate over all vertical slides toArray( slideh.querySelectorAll( 'section' ) ).forEach( function( slidev ) { - if( isPrintingPDF() ) { + if( printMode ) { createBackground( slidev, slidev ); } else { @@ -887,7 +950,7 @@ var Reveal = (function(){ if( typeof child.offsetTop === 'number' && child.style ) { // Count # of abs children - if( child.style.position === 'absolute' ) { + if( window.getComputedStyle( child ).position === 'absolute' ) { absoluteChildren += 1; } -- cgit v1.2.3 From a49a78c454ab88120af37b0cc44df75cd0c31601 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 23 Apr 2014 21:18:13 +0200 Subject: remove needless condition --- js/reveal.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 982b951..3ca9d6f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -412,10 +412,11 @@ var Reveal = (function(){ */ function setupPDF() { - // Dimensions of the content + // Dimensions of the PDF pages var pageWidth = 1122, pageHeight = 867; + // Dimensions of slides within the pages var slideWidth = 960, slideHeight = 700; @@ -428,12 +429,9 @@ var Reveal = (function(){ // Vertical stacks are not centred since their section // children will be - if( slide.classList.contains( 'stack' ) ) { - slide.style.top = 0; - } - else { - var left = ( pageWidth - slideWidth ) / 2; - var top = ( pageHeight - slideHeight ) / 2; + if( slide.classList.contains( 'stack' ) === false ) { + var left = ( pageWidth - slideWidth ) / 2, + top = ( pageHeight - slideHeight ) / 2; if( config.center || slide.classList.contains( 'center' ) ) { top = Math.max( ( pageHeight - getAbsoluteHeight( slide ) ) / 2, 0 ); -- cgit v1.2.3 From 3adaed2a1ee1bb3306cb30aa86b90819d1c03af6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 08:26:20 +0200 Subject: allow tall slides to spread over pages in pdf export --- js/reveal.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3ca9d6f..00c3aa0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -430,22 +430,30 @@ var Reveal = (function(){ // Vertical stacks are not centred since their section // children will be if( slide.classList.contains( 'stack' ) === false ) { + // Center the slide inside of the page, giving the slide some margin var left = ( pageWidth - slideWidth ) / 2, top = ( pageHeight - slideHeight ) / 2; - if( config.center || slide.classList.contains( 'center' ) ) { - top = Math.max( ( pageHeight - getAbsoluteHeight( slide ) ) / 2, 0 ); + var contentHeight = getAbsoluteHeight( slide ); + var numberOfPages = Math.ceil( contentHeight / slideHeight ); + + // Top align when we're taller than a single page + if( numberOfPages > 1 ) { + top = 0; + } + // Center the slide vertically + else if( config.center || slide.classList.contains( 'center' ) ) { + top = Math.max( ( pageHeight - contentHeight ) / 2, 0 ); } + // Position the slide inside of the page slide.style.left = left + 'px'; slide.style.top = top + 'px'; slide.style.width = slideWidth + 'px'; - slide.style.height = slideHeight + 'px'; - - if( slide.scrollHeight > slideHeight ) { - slide.style.overflow = 'hidden'; - } + slide.style.height = ( slideHeight * numberOfPages ) + 'px'; + // TODO Backgrounds need to be multiplied when the slide + // stretches over multiple pages var background = slide.querySelector( '.slide-background' ); if( background ) { background.style.width = pageWidth + 'px'; -- cgit v1.2.3 From 059cca6fa4925de7e31c4f600b7954d9215fe878 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 08:51:33 +0200 Subject: abide by configured slide width when exporting to pdf --- js/reveal.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 00c3aa0..b91ca98 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -412,13 +412,18 @@ var Reveal = (function(){ */ function setupPDF() { + // The aspect ratio of pages when saving to PDF in Chrome, + // we need to abide by this ratio when determining the pixel + // size of our pages + var pageAspectRatio = 1.295; + // Dimensions of the PDF pages - var pageWidth = 1122, - pageHeight = 867; + var pageWidth = config.width * 1.3, + pageHeight = Math.round( pageWidth / pageAspectRatio ); // Dimensions of slides within the pages - var slideWidth = 960, - slideHeight = 700; + var slideWidth = config.width, + slideHeight = config.height; document.body.classList.add( 'print-pdf' ); document.body.style.width = pageWidth + 'px'; -- cgit v1.2.3 From 2f90e9198d2387ca0e7eeca082e710759c02c57a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 09:34:58 +0200 Subject: some more flexibility for pdf export sizes --- js/reveal.js | 78 +++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 30 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index b91ca98..523709c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -417,13 +417,15 @@ var Reveal = (function(){ // size of our pages var pageAspectRatio = 1.295; + var slideSize = getComputedSlideSize( window.innerWidth, window.innerHeight ); + // Dimensions of the PDF pages - var pageWidth = config.width * 1.3, + var pageWidth = Math.round( slideSize.width * ( 1 + config.margin ) ), pageHeight = Math.round( pageWidth / pageAspectRatio ); // Dimensions of slides within the pages - var slideWidth = config.width, - slideHeight = config.height; + var slideWidth = slideSize.width, + slideHeight = slideSize.height; document.body.classList.add( 'print-pdf' ); document.body.style.width = pageWidth + 'px'; @@ -440,7 +442,7 @@ var Reveal = (function(){ top = ( pageHeight - slideHeight ) / 2; var contentHeight = getAbsoluteHeight( slide ); - var numberOfPages = Math.ceil( contentHeight / slideHeight ); + var numberOfPages = Math.ceil( contentHeight / pageHeight ); // Top align when we're taller than a single page if( numberOfPages > 1 ) { @@ -462,7 +464,7 @@ var Reveal = (function(){ var background = slide.querySelector( '.slide-background' ); if( background ) { background.style.width = pageWidth + 'px'; - background.style.height = pageHeight + 'px'; + background.style.height = ( pageHeight * numberOfPages ) + 'px'; background.style.top = -top + 'px'; background.style.left = -left + 'px'; } @@ -1198,37 +1200,18 @@ var Reveal = (function(){ if( dom.wrapper && !isPrintingPDF() ) { - // Available space to scale within - var availableWidth = dom.wrapper.offsetWidth, - availableHeight = dom.wrapper.offsetHeight; - - // Reduce available space by margin - availableWidth -= ( availableHeight * config.margin ); - availableHeight -= ( availableHeight * config.margin ); + var size = getComputedSlideSize(); - // Dimensions of the content - var slideWidth = config.width, - slideHeight = config.height, - slidePadding = 20; // TODO Dig this out of DOM + var slidePadding = 20; // TODO Dig this out of DOM // Layout the contents of the slides layoutSlideContents( config.width, config.height, slidePadding ); - // Slide width may be a percentage of available width - if( typeof slideWidth === 'string' && /%$/.test( slideWidth ) ) { - slideWidth = parseInt( slideWidth, 10 ) / 100 * availableWidth; - } - - // Slide height may be a percentage of available height - if( typeof slideHeight === 'string' && /%$/.test( slideHeight ) ) { - slideHeight = parseInt( slideHeight, 10 ) / 100 * availableHeight; - } - - dom.slides.style.width = slideWidth + 'px'; - dom.slides.style.height = slideHeight + 'px'; + dom.slides.style.width = size.width + 'px'; + dom.slides.style.height = size.height + 'px'; // Determine scale of content to fit within available space - scale = Math.min( availableWidth / slideWidth, availableHeight / slideHeight ); + scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); // Respect max/min scale settings scale = Math.max( scale, config.minScale ); @@ -1265,7 +1248,7 @@ var Reveal = (function(){ slide.style.top = 0; } else { - slide.style.top = Math.max( ( ( slideHeight - getAbsoluteHeight( slide ) ) / 2 ) - slidePadding, 0 ) + 'px'; + slide.style.top = Math.max( ( ( size.height - getAbsoluteHeight( slide ) ) / 2 ) - slidePadding, 0 ) + 'px'; } } else { @@ -1313,6 +1296,41 @@ var Reveal = (function(){ } + /** + * Calculates the computed pixel size of our slides. These + * values are based on the width and height configuration + * options. + */ + function getComputedSlideSize( presentationWidth, presentationHeight ) { + + var size = { + // Slide size + width: config.width, + height: config.height, + + // Presentation size + presentationWidth: presentationWidth || dom.wrapper.offsetWidth, + presentationHeight: presentationHeight || dom.wrapper.offsetHeight + }; + + // Reduce available space by margin + size.presentationWidth -= ( size.presentationHeight * config.margin ); + size.presentationHeight -= ( size.presentationHeight * config.margin ); + + // Slide width may be a percentage of available width + if( typeof size.width === 'string' && /%$/.test( size.width ) ) { + size.width = parseInt( size.width, 10 ) / 100 * size.presentationWidth; + } + + // Slide height may be a percentage of available height + if( typeof size.height === 'string' && /%$/.test( size.height ) ) { + size.height = parseInt( size.height, 10 ) / 100 * size.presentationHeight; + } + + return size; + + } + /** * Stores the vertical index of a stack so that the same * vertical slide can be selected when navigating to and -- cgit v1.2.3 From 704022d948b11fd8a03b09c8c82f15b9073aa2ec Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 10:22:18 +0200 Subject: simplify pdf layout --- js/reveal.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 523709c..0ede8de 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -444,12 +444,8 @@ var Reveal = (function(){ var contentHeight = getAbsoluteHeight( slide ); var numberOfPages = Math.ceil( contentHeight / pageHeight ); - // Top align when we're taller than a single page - if( numberOfPages > 1 ) { - top = 0; - } - // Center the slide vertically - else if( config.center || slide.classList.contains( 'center' ) ) { + // Center slides vertically + if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) { top = Math.max( ( pageHeight - contentHeight ) / 2, 0 ); } @@ -457,7 +453,6 @@ var Reveal = (function(){ slide.style.left = left + 'px'; slide.style.top = top + 'px'; slide.style.width = slideWidth + 'px'; - slide.style.height = ( slideHeight * numberOfPages ) + 'px'; // TODO Backgrounds need to be multiplied when the slide // stretches over multiple pages -- cgit v1.2.3 From b797bbb61b2b07242e82812bf2f94e5af1371569 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 11:02:54 +0200 Subject: readme update, kill event listeners when printing pdf --- js/reveal.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 0ede8de..55a10a2 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -335,6 +335,7 @@ var Reveal = (function(){ // Special setup and config is required when printing to PDF if( isPrintingPDF() ) { + removeEventListeners(); setupPDF(); } -- cgit v1.2.3 From 1e5ca748a49b35ec698fc73d0420bb63534b9ae7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 11:35:55 +0200 Subject: enable reveal.js keyboard shortcuts anywhere in notes window --- js/reveal.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 7a032d0..d81a19d 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3702,6 +3702,11 @@ var Reveal = (function(){ if( 'addEventListener' in window ) { ( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture ); } + }, + + // Programatically triggers a keyboard event + triggerKey: function( keyCode ) { + onDocumentKeyDown( { keyCode: keyCode } ); } }; -- cgit v1.2.3 From ae962d729be2b6e1b8db0c5e207c55887ff9f8dc Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 19:16:10 +0200 Subject: fix non-pdf printing (closes #881) --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a203418..222a5a1 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2014,7 +2014,7 @@ var Reveal = (function(){ // Show the horizontal slide if it's within the view distance if( distanceX < viewDistance ) { - horizontalSlide.style.display = 'block'; + horizontalSlide.style.display = ''; loadSlide( horizontalSlide ); } else { @@ -2031,7 +2031,7 @@ var Reveal = (function(){ distanceY = x === indexh ? Math.abs( indexv - y ) : Math.abs( y - oy ); if( distanceX + distanceY < viewDistance ) { - verticalSlide.style.display = 'block'; + verticalSlide.style.display = ''; loadSlide( verticalSlide ); } else { -- cgit v1.2.3 From e7d82f1316a51cae3f33bc3c37faeb65280f62a9 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 20:23:40 +0200 Subject: fix transitions in firefox --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 222a5a1..a203418 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2014,7 +2014,7 @@ var Reveal = (function(){ // Show the horizontal slide if it's within the view distance if( distanceX < viewDistance ) { - horizontalSlide.style.display = ''; + horizontalSlide.style.display = 'block'; loadSlide( horizontalSlide ); } else { @@ -2031,7 +2031,7 @@ var Reveal = (function(){ distanceY = x === indexh ? Math.abs( indexv - y ) : Math.abs( y - oy ); if( distanceX + distanceY < viewDistance ) { - verticalSlide.style.display = ''; + verticalSlide.style.display = 'block'; loadSlide( verticalSlide ); } else { -- cgit v1.2.3 From ddfb0aa86fdfc8e92d0b81fbe36dc79c4585dd86 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 26 Apr 2014 21:41:54 +0200 Subject: abide by configured width/height when printing to pdf --- js/reveal.js | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a203418..5dc6856 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -413,21 +413,19 @@ var Reveal = (function(){ */ function setupPDF() { - // The aspect ratio of pages when saving to PDF in Chrome, - // we need to abide by this ratio when determining the pixel - // size of our pages - var pageAspectRatio = 1.295; - var slideSize = getComputedSlideSize( window.innerWidth, window.innerHeight ); // Dimensions of the PDF pages var pageWidth = Math.round( slideSize.width * ( 1 + config.margin ) ), - pageHeight = Math.round( pageWidth / pageAspectRatio ); + pageHeight = Math.round( slideSize.height * ( 1 + config.margin ) ); // Dimensions of slides within the pages var slideWidth = slideSize.width, slideHeight = slideSize.height; + // Let the browser know what page size we want to print + injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0;}' ); + document.body.classList.add( 'print-pdf' ); document.body.style.width = pageWidth + 'px'; document.body.style.height = pageHeight + 'px'; @@ -944,6 +942,23 @@ var Reveal = (function(){ } + /** + * Injects the given CSS styles into the DOM. + */ + function injectStyleSheet( value ) { + + var tag = document.createElement( 'style' ); + tag.type = 'text/css'; + if( tag.styleSheet ) { + tag.styleSheet.cssText = value; + } + else { + tag.appendChild( document.createTextNode( value ) ); + } + document.getElementsByTagName( 'head' )[0].appendChild( tag ); + + } + /** * Retrieves the height of the given element by looking * at the position and height of its immediate children. -- cgit v1.2.3 From eea437f4be92bafbe96d5276233d4fdff7b5f814 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 27 Apr 2014 14:46:49 +0200 Subject: new api method: getBackgroundSlide --- js/reveal.js | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5dc6856..55642e2 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2286,7 +2286,7 @@ var Reveal = (function(){ element.removeAttribute( 'data-src' ); } ); - // Media elements with multiple s + // Media elements with children toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( media ) { var sources = 0; @@ -2634,6 +2634,38 @@ var Reveal = (function(){ } + function getSlide( x, y ) { + + var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; + var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' ); + + if( typeof y === 'number' ) { + return verticalSlides ? verticalSlides[ y ] : undefined; + } + + return horizontalSlide; + + } + + /** + * Returns the background element for the given slide. + * All slides, even the ones with no background properties + * defined, have a background element so this never returns + * null. + */ + function getSlideBackground( x, y ) { + + var horizontalBackground = document.querySelectorAll( '.backgrounds>.slide-background' )[ x ]; + var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' ); + + if( typeof y === 'number' ) { + return verticalBackgrounds ? verticalBackgrounds[ y ] : undefined; + } + + return horizontalBackground; + + } + /** * Retrieves the current state of the presentation as * an object. This state can then be restored at any @@ -3720,17 +3752,11 @@ var Reveal = (function(){ getTotalSlides: getTotalSlides, - // Returns the slide at the specified index, y is optional - getSlide: function( x, y ) { - var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; - var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' ); - - if( typeof y !== 'undefined' ) { - return verticalSlides ? verticalSlides[ y ] : undefined; - } + // Returns the slide element at the specified index + getSlide: getSlide, - return horizontalSlide; - }, + // Returns the slide background element at the specified index + getSlideBackground: getSlideBackground, // Returns the previous slide element, may be null getPreviousSlide: function() { -- cgit v1.2.3 From 902e36c0228478083d9f2ef487c12f9de401d404 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 27 Apr 2014 14:54:23 +0200 Subject: break showing/hiding of slides into separate methods --- js/reveal.js | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 55642e2..2c87c87 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2029,11 +2029,10 @@ var Reveal = (function(){ // Show the horizontal slide if it's within the view distance if( distanceX < viewDistance ) { - horizontalSlide.style.display = 'block'; - loadSlide( horizontalSlide ); + showSlide( horizontalSlide ); } else { - horizontalSlide.style.display = 'none'; + hideSlide( horizontalSlide ); } if( verticalSlidesLength ) { @@ -2046,11 +2045,10 @@ var Reveal = (function(){ distanceY = x === indexh ? Math.abs( indexv - y ) : Math.abs( y - oy ); if( distanceX + distanceY < viewDistance ) { - verticalSlide.style.display = 'block'; - loadSlide( verticalSlide ); + showSlide( verticalSlide ); } else { - verticalSlide.style.display = 'none'; + hideSlide( verticalSlide ); } } @@ -2275,10 +2273,13 @@ var Reveal = (function(){ } /** - * Loads any content that is set to load lazily (data-src) - * inside of the given slide. + * Called when the given slide is within the configured view + * distance. Shows the slide element and loads any content + * that is set to load lazily (data-src). */ - function loadSlide( slide ) { + function showSlide( slide ) { + + slide.style.display = 'block'; // Media elements with data-src attributes toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ) ).forEach( function( element ) { @@ -2305,6 +2306,16 @@ var Reveal = (function(){ } + /** + * Called when the given slide is moved outside of the + * configured view distance. + */ + function hideSlide( slide ) { + + slide.style.display = 'none'; + + } + /** * Determine what available routes there are for navigation. * -- cgit v1.2.3 From c58096ea991771425f61b9a3a6fc0de8abab07d6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 27 Apr 2014 15:04:37 +0200 Subject: disregard v index when there is no vertical slides/backgrounds in getSlide/getSlideBackground --- js/reveal.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 2c87c87..d0c8272 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2645,12 +2645,15 @@ var Reveal = (function(){ } + /** + * Returns the slide element matching the specified index. + */ function getSlide( x, y ) { var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' ); - if( typeof y === 'number' ) { + if( verticalSlides && verticalSlides.length && typeof y === 'number' ) { return verticalSlides ? verticalSlides[ y ] : undefined; } @@ -2669,7 +2672,7 @@ var Reveal = (function(){ var horizontalBackground = document.querySelectorAll( '.backgrounds>.slide-background' )[ x ]; var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' ); - if( typeof y === 'number' ) { + if( verticalBackgrounds && verticalBackgrounds.length && typeof y === 'number' ) { return verticalBackgrounds ? verticalBackgrounds[ y ] : undefined; } -- cgit v1.2.3 From 7158c12effbce8a52c1a6385c1f9ee479c81c9fe Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 27 Apr 2014 15:39:11 +0200 Subject: lazy load all slide backgrounds --- js/reveal.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index d0c8272..9b03d5a 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -528,6 +528,8 @@ var Reveal = (function(){ createBackground( slidev, backgroundStack ); } + backgroundStack.classList.add( 'stack' ); + } ); } ); @@ -2279,8 +2281,14 @@ var Reveal = (function(){ */ function showSlide( slide ) { + // Show the slide element slide.style.display = 'block'; + // Show the corresponding background element + var indices = getIndices( slide ); + var background = getSlideBackground( indices.h, indices.v ); + background.style.display = 'block'; + // Media elements with data-src attributes toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); @@ -2312,8 +2320,14 @@ var Reveal = (function(){ */ function hideSlide( slide ) { + // Hide the slide element slide.style.display = 'none'; + // Hide the corresponding background element + var indices = getIndices( slide ); + var background = getSlideBackground( indices.h, indices.v ); + background.style.display = 'none'; + } /** @@ -2618,6 +2632,9 @@ var Reveal = (function(){ // Now that we know which the horizontal slide is, get its index h = Math.max( horizontalSlides.indexOf( slideh ), 0 ); + // Assume we're not vertical + v = 0; + // If this is a vertical slide, grab the vertical index if( isVertical ) { v = Math.max( toArray( slide.parentNode.querySelectorAll( 'section' ) ).indexOf( slide ), 0 ); -- cgit v1.2.3 From 41e1e013b8c86683fd042e65bc3fc0f4e1655559 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 27 Apr 2014 15:55:57 +0200 Subject: better defered loading of background media --- js/reveal.js | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 9b03d5a..a4dba10 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -586,7 +586,7 @@ var Reveal = (function(){ if( data.background ) { // Auto-wrap image urls in url(...) if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) { - element.style.backgroundImage = 'url('+ data.background +')'; + slide.setAttribute( 'data-background-image', 'url('+ data.background +')' ); } else { element.style.background = data.background; @@ -609,24 +609,11 @@ var Reveal = (function(){ // Additional and optional background properties if( data.backgroundSize ) element.style.backgroundSize = data.backgroundSize; - if( data.backgroundImage ) element.style.backgroundImage = 'url("' + data.backgroundImage + '")'; if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor; if( data.backgroundRepeat ) element.style.backgroundRepeat = data.backgroundRepeat; if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); - // Create video background element - if( data.backgroundVideo ) { - var video = document.createElement( 'video' ); - - // Support comma separated lists of video sources - data.backgroundVideo.split( ',' ).forEach( function( source ) { - video.innerHTML += ''; - } ); - - element.appendChild( video ); - } - container.appendChild( element ); return element; @@ -2284,11 +2271,6 @@ var Reveal = (function(){ // Show the slide element slide.style.display = 'block'; - // Show the corresponding background element - var indices = getIndices( slide ); - var background = getSlideBackground( indices.h, indices.v ); - background.style.display = 'block'; - // Media elements with data-src attributes toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); @@ -2312,6 +2294,36 @@ var Reveal = (function(){ } } ); + + // Show the corresponding background element + var indices = getIndices( slide ); + var background = getSlideBackground( indices.h, indices.v ); + background.style.display = 'block'; + + // If the background contains media, load it + if( background.hasAttribute( 'data-loaded' ) === false ) { + background.setAttribute( 'data-loaded', 'true' ); + + var backgroundImage = slide.getAttribute( 'data-background-image' ); + var backgroundVideo = slide.getAttribute( 'data-background-video' ); + + // Images + if( backgroundImage ) { + background.style.backgroundImage = backgroundImage; + } + // Videos + else if ( backgroundVideo ) { + var video = document.createElement( 'video' ); + + // Support comma separated lists of video sources + backgroundVideo.split( ',' ).forEach( function( source ) { + video.innerHTML += ''; + } ); + + background.appendChild( video ); + } + } + } /** -- cgit v1.2.3 From 860580d4d0d10646b59a9b3663c0c1cc504bc1c2 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 27 Apr 2014 17:31:50 +0200 Subject: getSlideBackground now works in pdf mode, add pdf tests --- js/reveal.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a4dba10..d1f2fb0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2693,11 +2693,18 @@ var Reveal = (function(){ /** * Returns the background element for the given slide. * All slides, even the ones with no background properties - * defined, have a background element so this never returns - * null. + * defined, have a background element so as long as the + * index is valid an element will be returned. */ function getSlideBackground( x, y ) { + // When printing to PDF the slide backgrounds are nested + // inside of the slides + if( isPrintingPDF() ) { + var slide = getSlide( x, y ); + return slide ? slide.querySelector( '.slide-background' ) : undefined; + } + var horizontalBackground = document.querySelectorAll( '.backgrounds>.slide-background' )[ x ]; var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' ); -- cgit v1.2.3 From b42fae96e5836abd1207b6fc8d55b5a6127892bc Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 09:13:57 +0200 Subject: load all images directly when in 'no-transform'-mode --- js/reveal.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 01472a6..4b84019 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -208,6 +208,17 @@ if( !features.transforms2d && !features.transforms3d ) { document.body.setAttribute( 'class', 'no-transforms' ); + // Since JS won't be running any further, we need to load all + // images that were intended to lazy load now + var images = document.getElementsByTagName( 'img' ); + for( var i = 0, len = images.length; i < len; i++ ) { + var image = images[i]; + if( image.getAttribute( 'data-src' ) ) { + image.setAttribute( 'src', image.getAttribute( 'data-src' ) ); + image.removeAttribute( 'data-src' ); + } + } + // If the browser doesn't support core features we won't be // using JavaScript to control the presentation return; -- cgit v1.2.3 From fa2413ec73b72fea831b64ac983d3006fae59fcd Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 09:44:54 +0200 Subject: fix slide transitions in iOS --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 4b84019..d3ca1fe 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2026,7 +2026,7 @@ // Limit view distance on weaker devices if( isMobileDevice ) { - viewDistance = isOverview() ? 6 : 1; + viewDistance = isOverview() ? 6 : 2; } // Limit view distance on weaker devices -- cgit v1.2.3 From fcec8d058d981593b1d237d7760f42354ee7684a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 09:58:13 +0200 Subject: fix lazy loading bug related to data-background-image attribute --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index d3ca1fe..c6187ec 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -613,7 +613,7 @@ if( data.background ) { // Auto-wrap image urls in url(...) if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) { - slide.setAttribute( 'data-background-image', 'url('+ data.background +')' ); + slide.setAttribute( 'data-background-image', data.background ); } else { element.style.background = data.background; @@ -2336,7 +2336,7 @@ // Images if( backgroundImage ) { - background.style.backgroundImage = backgroundImage; + background.style.backgroundImage = 'url('+ backgroundImage +')'; } // Videos else if ( backgroundVideo ) { -- cgit v1.2.3 From 02725cf728488edc89b66229b8e634a87b1d8d20 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 10:41:31 +0200 Subject: prefer scaling over zooming on mobile devices --- js/reveal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index c6187ec..1c866b9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -268,7 +268,7 @@ features.canvas = !!document.createElement( 'canvas' ).getContext; - isMobileDevice = navigator.userAgent.match( /(iphone|ipod|android)/gi ); + isMobileDevice = navigator.userAgent.match( /(iphone|ipod|ipad|android)/gi ); } @@ -1244,8 +1244,8 @@ scale = Math.max( scale, config.minScale ); scale = Math.min( scale, config.maxScale ); - // Prefer zooming in WebKit so that content remains crisp - if( /webkit/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { + // Prefer zooming in desktop WebKit so that content remains crisp + if( !isMobileDevice && /webkit/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; } // Apply scale transform as a fallback -- cgit v1.2.3 From 9f0224adf9c33d466292c5917533cee15c8536ed Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 10:59:31 +0200 Subject: update visibility of slides as part of sync --- js/reveal.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 1c866b9..8c8b619 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1843,6 +1843,7 @@ updateProgress(); updateBackground( true ); updateSlideNumber(); + updateSlidesVisibility(); } -- cgit v1.2.3 From 9873839a50bffa9ef57050cf583588db2f66fde6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 11:51:21 +0200 Subject: fix issue with background images on first vertical sldie --- js/reveal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 8c8b619..df1b1f5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2332,8 +2332,8 @@ if( background.hasAttribute( 'data-loaded' ) === false ) { background.setAttribute( 'data-loaded', 'true' ); - var backgroundImage = slide.getAttribute( 'data-background-image' ); - var backgroundVideo = slide.getAttribute( 'data-background-video' ); + var backgroundImage = slide.getAttribute( 'data-background-image' ), + backgroundVideo = slide.getAttribute( 'data-background-video' ); // Images if( backgroundImage ) { @@ -2673,7 +2673,7 @@ h = Math.max( horizontalSlides.indexOf( slideh ), 0 ); // Assume we're not vertical - v = 0; + v = undefined; // If this is a vertical slide, grab the vertical index if( isVertical ) { -- cgit v1.2.3 From fbf999ec8125980f5dde6c20c056c6ad9cf245a7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 12:31:34 +0200 Subject: null check background --- js/reveal.js | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index df1b1f5..aefb514 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2326,29 +2326,31 @@ // Show the corresponding background element var indices = getIndices( slide ); var background = getSlideBackground( indices.h, indices.v ); - background.style.display = 'block'; + if( background ) { + background.style.display = 'block'; - // If the background contains media, load it - if( background.hasAttribute( 'data-loaded' ) === false ) { - background.setAttribute( 'data-loaded', 'true' ); + // If the background contains media, load it + if( background.hasAttribute( 'data-loaded' ) === false ) { + background.setAttribute( 'data-loaded', 'true' ); - var backgroundImage = slide.getAttribute( 'data-background-image' ), - backgroundVideo = slide.getAttribute( 'data-background-video' ); + var backgroundImage = slide.getAttribute( 'data-background-image' ), + backgroundVideo = slide.getAttribute( 'data-background-video' ); - // Images - if( backgroundImage ) { - background.style.backgroundImage = 'url('+ backgroundImage +')'; - } - // Videos - else if ( backgroundVideo ) { - var video = document.createElement( 'video' ); + // Images + if( backgroundImage ) { + background.style.backgroundImage = 'url('+ backgroundImage +')'; + } + // Videos + else if ( backgroundVideo ) { + var video = document.createElement( 'video' ); - // Support comma separated lists of video sources - backgroundVideo.split( ',' ).forEach( function( source ) { - video.innerHTML += ''; - } ); + // Support comma separated lists of video sources + backgroundVideo.split( ',' ).forEach( function( source ) { + video.innerHTML += ''; + } ); - background.appendChild( video ); + background.appendChild( video ); + } } } @@ -2366,7 +2368,9 @@ // Hide the corresponding background element var indices = getIndices( slide ); var background = getSlideBackground( indices.h, indices.v ); - background.style.display = 'none'; + if( background ) { + background.style.display = 'none'; + } } -- cgit v1.2.3 From eec14b9c9200abda683bc8e532d1e6500f0a652d Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 29 Apr 2014 10:46:58 +0200 Subject: pdf background size rounding error --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index aefb514..4e8f9f2 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -443,8 +443,8 @@ var slideSize = getComputedSlideSize( window.innerWidth, window.innerHeight ); // Dimensions of the PDF pages - var pageWidth = Math.round( slideSize.width * ( 1 + config.margin ) ), - pageHeight = Math.round( slideSize.height * ( 1 + config.margin ) ); + var pageWidth = Math.ceil( slideSize.width * ( 1 + config.margin ) ), + pageHeight = Math.ceil( slideSize.height * ( 1 + config.margin ) ); // Dimensions of slides within the pages var slideWidth = slideSize.width, -- cgit v1.2.3 From 2ac0a55ccf0e8f881ff48f3500865bff37ec6fa3 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 29 Apr 2014 13:30:56 +0200 Subject: ensure pdf pages are never zero-height --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 4e8f9f2..6e6c12b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -468,7 +468,7 @@ top = ( pageHeight - slideHeight ) / 2; var contentHeight = getAbsoluteHeight( slide ); - var numberOfPages = Math.ceil( contentHeight / pageHeight ); + var numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 ); // Center slides vertically if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) { -- cgit v1.2.3 From 1b236bdf211ac2a9600a89fe4efae9619193a410 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 29 Apr 2014 13:40:55 +0200 Subject: wait for document to load before triggering pdf layout --- js/reveal.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 6e6c12b..49b2e7c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -360,12 +360,6 @@ // Update all backgrounds updateBackground( true ); - // Special setup and config is required when printing to PDF - if( isPrintingPDF() ) { - removeEventListeners(); - setupPDF(); - } - // Notify listeners that the presentation is ready but use a 1ms // timeout to ensure it's not fired synchronously after #initialize() setTimeout( function() { @@ -381,6 +375,20 @@ } ); }, 1 ); + // Special setup and config is required when printing to PDF + if( isPrintingPDF() ) { + removeEventListeners(); + + // The document needs to have loaded for the PDF layout + // measurements to be accurate + if( document.readyState === 'complete' ) { + setupPDF(); + } + else { + window.addEventListener( 'load', setupPDF ); + } + } + } /** -- cgit v1.2.3 From 54e256764ce98204caad708b654f6250fb781664 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 4 May 2014 08:29:45 +0200 Subject: limit size of media elements when printing to pdf --- js/reveal.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 49b2e7c..ad332a3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -461,6 +461,9 @@ // Let the browser know what page size we want to print injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0;}' ); + // Limit the size of certain elements to the dimensions of the slide + injectStyleSheet( '.reveal img, .reveal video, .reveal iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' ); + document.body.classList.add( 'print-pdf' ); document.body.style.width = pageWidth + 'px'; document.body.style.height = pageHeight + 'px'; -- cgit v1.2.3 From 5e85f02eb1596d0c5a71aa35430c0914e0b6d35a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 4 May 2014 09:32:10 +0200 Subject: ensure default can be prevented --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ad332a3..11d6cda 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3278,7 +3278,7 @@ // If the input resulted in a triggered action we should prevent // the browsers default behavior if( triggered ) { - event.preventDefault(); + event.preventDefault && event.preventDefault(); } // ESC or O key else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && features.transforms3d ) { @@ -3289,7 +3289,7 @@ toggleOverview(); } - event.preventDefault(); + event.preventDefault && event.preventDefault(); } // If auto-sliding is enabled we need to cue up -- cgit v1.2.3 From f31f0ffa700f860a6d4492bdb3b5c0dee6d565d7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 7 May 2014 21:47:47 +0200 Subject: createSingletonNode now ensures found nodes are in the correct container --- js/reveal.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 11d6cda..cccc387 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -519,14 +519,17 @@ function createSingletonNode( container, tagname, classname, innerHTML ) { var node = container.querySelector( '.' + classname ); - if( !node ) { + + // If no node was found or the node is inside another container + if( !node || node.parentNode !== container ) { node = document.createElement( tagname ); node.classList.add( classname ); - if( innerHTML !== null ) { + if( typeof innerHTML === 'string' ) { node.innerHTML = innerHTML; } container.appendChild( node ); } + return node; } @@ -2093,7 +2096,7 @@ function updateProgress() { // Update progress if enabled - if( config.progress && dom.progress ) { + if( config.progress && dom.progressbar ) { dom.progressbar.style.width = getProgress() * window.innerWidth + 'px'; -- cgit v1.2.3 From c4e202cd0ffeedc817c0506116744102dd63419a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 7 May 2014 22:02:05 +0200 Subject: fix edge case in singleton node creation --- js/reveal.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index cccc387..da43738 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -518,18 +518,26 @@ */ function createSingletonNode( container, tagname, classname, innerHTML ) { - var node = container.querySelector( '.' + classname ); + // Find all nodes matching the description + var nodes = container.querySelectorAll( '.' + classname ); - // If no node was found or the node is inside another container - if( !node || node.parentNode !== container ) { - node = document.createElement( tagname ); - node.classList.add( classname ); - if( typeof innerHTML === 'string' ) { - node.innerHTML = innerHTML; + // Check all matches to find one which is a direct child of + // the specified container + for( var i = 0; i < nodes.length; i++ ) { + var testNode = nodes[i]; + if( testNode.parentNode === container ) { + return testNode; } - container.appendChild( node ); } + // If no node was found, create it now + var node = document.createElement( tagname ); + node.classList.add( classname ); + if( typeof innerHTML === 'string' ) { + node.innerHTML = innerHTML; + } + container.appendChild( node ); + return node; } -- cgit v1.2.3 From cb4fe35bac514fcacf98b76f094071b9d50a722b Mon Sep 17 00:00:00 2001 From: fabiano Date: Fri, 9 May 2014 15:58:56 -0300 Subject: fixed a problem in the function isFirstSlide when visiting a vertical slide and then going back to the first slide, the function would return false. made it more fail proof by checking the indices directly. --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index da43738..3bd75a2 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3902,7 +3902,7 @@ // Returns true if we're currently on the first slide isFirstSlide: function() { - return document.querySelector( SLIDES_SELECTOR + '.past' ) == null ? true : false; + return ( indexh == 0 && indexv == 0 ); }, // Returns true if we're currently on the last slide -- cgit v1.2.3 From ffecac6df30b00cf35588a00299b610b76a953f2 Mon Sep 17 00:00:00 2001 From: fabiano Date: Fri, 9 May 2014 16:11:04 -0300 Subject: == --> === --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3bd75a2..dd2f990 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3902,7 +3902,7 @@ // Returns true if we're currently on the first slide isFirstSlide: function() { - return ( indexh == 0 && indexv == 0 ); + return ( indexh === 0 && indexv === 0 ); }, // Returns true if we're currently on the last slide -- cgit v1.2.3 From 54c3c23e363e99772be4f0db30b177c2bffc1b39 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 10 May 2014 11:18:13 +0200 Subject: fix bug in retrieval or background images while in pdf mode --- js/reveal.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index da43738..8c0889b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -451,8 +451,8 @@ var slideSize = getComputedSlideSize( window.innerWidth, window.innerHeight ); // Dimensions of the PDF pages - var pageWidth = Math.ceil( slideSize.width * ( 1 + config.margin ) ), - pageHeight = Math.ceil( slideSize.height * ( 1 + config.margin ) ); + var pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ), + pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) ); // Dimensions of slides within the pages var slideWidth = slideSize.width, @@ -2756,7 +2756,14 @@ // inside of the slides if( isPrintingPDF() ) { var slide = getSlide( x, y ); - return slide ? slide.querySelector( '.slide-background' ) : undefined; + if( slide ) { + var background = slide.querySelector( '.slide-background' ); + if( background && background.parentNode === slide ) { + return background; + } + } + + return undefined; } var horizontalBackground = document.querySelectorAll( '.backgrounds>.slide-background' )[ x ]; -- cgit v1.2.3 From c974756326b25d14be3d5cd31e400a2b8e63ac3c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 17 May 2014 16:00:40 +0200 Subject: relax keyboard blocking condition #899 --- js/reveal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 1ff0dcb..a1d9caa 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3213,8 +3213,7 @@ // Check if there's a focused element that could be using // the keyboard - var activeElement = document.activeElement; - var hasFocus = !!( document.activeElement && ( document.activeElement.type || document.activeElement.href || document.activeElement.contentEditable !== 'inherit' ) ); + var hasFocus = !!( document.activeElement && ( document.activeElement.type || document.activeElement.contentEditable !== 'inherit' ) ); // Disregard the event if there's a focused element or a // keyboard modifier key is present -- cgit v1.2.3 From 8c9c0ab0a64f32e8aa567009a82bac57464f4f93 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 20 May 2014 08:14:48 +0200 Subject: validate named links according to html id spec #914 --- js/reveal.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a1d9caa..6097eea 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2595,14 +2595,11 @@ if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) { var element; - try { - // Find the slide with the specified name + // Ensure the named link is a valid HTML ID attribute + if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) { + // Find the slide with the specified ID element = document.querySelector( '#' + name ); } - catch( e ) { - // If the ID is an invalid selector a harmless SyntaxError - // may be thrown here. - } if( element ) { // Find the position of the named slide and navigate to it -- cgit v1.2.3 From c1ea5282e1f632a2e9cacc02be8bd4e7ab88dba1 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 20 May 2014 08:53:25 +0200 Subject: fix data-autoplay on first slide --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 6097eea..d2a28c2 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1818,7 +1818,7 @@ } // Handle embedded content - if( slideChanged ) { + if( slideChanged || !previousSlide ) { stopEmbeddedContent( previousSlide ); startEmbeddedContent( currentSlide ); } -- cgit v1.2.3 From ba00afbc38d7c1ec71561a1d23404d27f4c9e594 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 21 May 2014 10:08:23 +0200 Subject: only use zoom to scale in chrome --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index d2a28c2..f172c13 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1266,8 +1266,8 @@ scale = Math.max( scale, config.minScale ); scale = Math.min( scale, config.maxScale ); - // Prefer zooming in desktop WebKit so that content remains crisp - if( !isMobileDevice && /webkit/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { + // Prefer zooming in desktop Chrome so that content remains crisp + if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; } // Apply scale transform as a fallback -- cgit v1.2.3 From 09bddce42700b1dd4a1e102209de1873b8eee1ae Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 24 May 2014 15:23:03 +0200 Subject: limit scope of all slide selectors, avoids multiple .reveal classes on one page causing errors --- js/reveal.js | 76 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index f172c13..4b539b5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -25,10 +25,10 @@ var Reveal; - var SLIDES_SELECTOR = '.reveal .slides section', - HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section', - VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section', - HOME_SLIDE_SELECTOR = '.reveal .slides>section:first-of-type', + var SLIDES_SELECTOR = '.slides section', + HORIZONTAL_SLIDES_SELECTOR = '.slides>section', + VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section', + HOME_SLIDE_SELECTOR = '.slides>section:first-of-type', // Configurations defaults, can be overridden at initialization time config = { @@ -224,6 +224,10 @@ return; } + // Cache references to key DOM elements + dom.wrapper = document.querySelector( '.reveal' ); + dom.slides = document.querySelector( '.reveal .slides' ); + // Force a layout when the whole page, incl fonts, has loaded window.addEventListener( 'load', layout, false ); @@ -398,11 +402,6 @@ */ function setupDOM() { - // Cache references to key DOM elements - dom.theme = document.querySelector( '#theme' ); - dom.wrapper = document.querySelector( '.reveal' ); - dom.slides = document.querySelector( '.reveal .slides' ); - // Prevent transitions while we're loading dom.slides.classList.add( 'no-transition' ); @@ -431,6 +430,7 @@ // Cache references to elements dom.controls = document.querySelector( '.reveal .controls' ); + dom.theme = document.querySelector( '#theme' ); // There can be multiple instances of controls throughout the page dom.controlsLeft = toArray( document.querySelectorAll( '.navigate-left' ) ); @@ -469,7 +469,7 @@ document.body.style.height = pageHeight + 'px'; // Slide and slide background layout - toArray( document.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { + toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { // Vertical stacks are not centred since their section // children will be @@ -505,7 +505,7 @@ } ); // Show all fragments - toArray( document.querySelectorAll( SLIDES_SELECTOR + ' .fragment' ) ).forEach( function( fragment ) { + toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' .fragment' ) ).forEach( function( fragment ) { fragment.classList.add( 'visible' ); } ); @@ -556,7 +556,7 @@ dom.background.classList.add( 'no-transition' ); // Iterate over all horizontal slides - toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( slideh ) { + toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( slideh ) { var backgroundStack; @@ -705,7 +705,7 @@ */ function configure( options ) { - var numberOfSlides = document.querySelectorAll( SLIDES_SELECTOR ).length; + var numberOfSlides = dom.wrapper.querySelectorAll( SLIDES_SELECTOR ).length; dom.wrapper.classList.remove( config.transition ); @@ -1119,7 +1119,7 @@ function enableRollingLinks() { if( features.transforms3d && !( 'msPerspective' in document.body.style ) ) { - var anchors = document.querySelectorAll( SLIDES_SELECTOR + ' a' ); + var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a' ); for( var i = 0, len = anchors.length; i < len; i++ ) { var anchor = anchors[i]; @@ -1143,7 +1143,7 @@ */ function disableRollingLinks() { - var anchors = document.querySelectorAll( SLIDES_SELECTOR + ' a.roll' ); + var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a.roll' ); for( var i = 0, len = anchors.length; i < len; i++ ) { var anchor = anchors[i]; @@ -1280,7 +1280,7 @@ } // Select all slides, vertical and horizontal - var slides = toArray( document.querySelectorAll( SLIDES_SELECTOR ) ); + var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ); for( var i = 0, len = slides.length; i < len; i++ ) { var slide = slides[ i ]; @@ -1439,7 +1439,7 @@ dom.wrapper.classList.add( 'overview' ); dom.wrapper.classList.remove( 'overview-deactivating' ); - var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); + var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); for( var i = 0, len1 = horizontalSlides.length; i < len1; i++ ) { var hslide = horizontalSlides[i], @@ -1516,7 +1516,7 @@ }, 1 ); // Select all slides - toArray( document.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { + toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { // Resets all transforms to use the external styles transformElement( slide, '' ); @@ -1707,7 +1707,7 @@ previousSlide = currentSlide; // Query all horizontal slides in the deck - var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); + var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); // If no vertical index is specified and the upcoming slide is a // stack, resume at its previous vertical index @@ -1803,10 +1803,10 @@ // Reset all slides upon navigate to home // Issue: #285 - if ( document.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) { + if ( dom.wrapper.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) { // Launch async task setTimeout( function () { - var slides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i; + var slides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i; for( i in slides ) { if( slides[i] ) { // Reset stack @@ -1875,7 +1875,7 @@ */ function resetVerticalSlides() { - var horizontalSlides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); + var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); horizontalSlides.forEach( function( horizontalSlide ) { var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ); @@ -1899,7 +1899,7 @@ */ function sortAllFragments() { - var horizontalSlides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); + var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); horizontalSlides.forEach( function( horizontalSlide ) { var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ); @@ -1932,7 +1932,7 @@ // Select all slides and convert the NodeList result to // an array - var slides = toArray( document.querySelectorAll( selector ) ), + var slides = toArray( dom.wrapper.querySelectorAll( selector ) ), slidesLength = slides.length; var printMode = isPrintingPDF(); @@ -2036,7 +2036,7 @@ // Select all slides and convert the NodeList result to // an array - var horizontalSlides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ), + var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ), horizontalSlidesLength = horizontalSlides.length, distanceX, distanceY; @@ -2283,8 +2283,8 @@ if( config.parallaxBackgroundImage ) { - var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), - verticalSlides = document.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); + var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), + verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); var backgroundSize = dom.background.style.backgroundSize.split( ' ' ), backgroundWidth, backgroundHeight; @@ -2364,7 +2364,7 @@ } // Videos else if ( backgroundVideo ) { - var video = document.createElement( 'video' ); + var video = dom.wrapper.createElement( 'video' ); // Support comma separated lists of video sources backgroundVideo.split( ',' ).forEach( function( source ) { @@ -2403,8 +2403,8 @@ */ function availableRoutes() { - var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), - verticalSlides = document.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); + var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), + verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); var routes = { left: indexh > 0 || config.loop, @@ -2511,10 +2511,10 @@ */ function getProgress() { - var horizontalSlides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); + var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); // The number of past and total slides - var totalCount = document.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; + var totalCount = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; var pastCount = 0; // Step through all slides and count the past ones @@ -2690,7 +2690,7 @@ var slideh = isVertical ? slide.parentNode : slide; // Select all horizontal slides - var horizontalSlides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); + var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); // Now that we know which the horizontal slide is, get its index h = Math.max( horizontalSlides.indexOf( slideh ), 0 ); @@ -2721,7 +2721,7 @@ */ function getTotalSlides() { - return document.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; + return dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; } @@ -2730,7 +2730,7 @@ */ function getSlide( x, y ) { - var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; + var horizontalSlide = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' ); if( verticalSlides && verticalSlides.length && typeof y === 'number' ) { @@ -2763,7 +2763,7 @@ return undefined; } - var horizontalBackground = document.querySelectorAll( '.backgrounds>.slide-background' )[ x ]; + var horizontalBackground = dom.wrapper.querySelectorAll( '.backgrounds>.slide-background' )[ x ]; var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' ); if( verticalBackgrounds && verticalBackgrounds.length && typeof y === 'number' ) { @@ -3147,7 +3147,7 @@ } else { // Fetch the previous horizontal slide, if there is one - var previousSlide = document.querySelector( HORIZONTAL_SLIDES_SELECTOR + '.past:nth-child(' + indexh + ')' ); + var previousSlide = dom.wrapper.querySelector( HORIZONTAL_SLIDES_SELECTOR + '.past:nth-child(' + indexh + ')' ); if( previousSlide ) { var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined; @@ -3502,7 +3502,7 @@ event.preventDefault(); - var slidesTotal = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).length; + var slidesTotal = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).length; var slideIndex = Math.floor( ( event.clientX / dom.wrapper.offsetWidth ) * slidesTotal ); slide( slideIndex ); -- cgit v1.2.3 From 9c96a56e3330b75ca3b3205c79b2c4c1f74edd25 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 29 May 2014 10:36:56 +0200 Subject: adjust check for focused text inputs --- js/reveal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 4b539b5..927670c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3210,11 +3210,12 @@ // Check if there's a focused element that could be using // the keyboard - var hasFocus = !!( document.activeElement && ( document.activeElement.type || document.activeElement.contentEditable !== 'inherit' ) ); + var activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit'; + var activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName ); // Disregard the event if there's a focused element or a // keyboard modifier key is present - if( hasFocus || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return; + if( activeElementIsCE || activeElementIsInput || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return; // While paused only allow "unpausing" keyboard events (b and .) if( isPaused() && [66,190,191].indexOf( event.keyCode ) === -1 ) { -- cgit v1.2.3 From 6d1a66c2bcb3e859bcf011a3af60b8196c0d4c1f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 30 May 2014 08:12:57 +0200 Subject: fix search & replace error --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 927670c..1990e8f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2364,7 +2364,7 @@ } // Videos else if ( backgroundVideo ) { - var video = dom.wrapper.createElement( 'video' ); + var video = document.createElement( 'video' ); // Support comma separated lists of video sources backgroundVideo.split( ',' ).forEach( function( source ) { -- cgit v1.2.3 From c5daba6a1fda21573620852b9041d3a922a07e70 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 5 Jun 2014 10:43:12 +0200 Subject: write current hash when history is toggled on #934 --- js/reveal.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 1990e8f..d9451cb 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1859,6 +1859,9 @@ // Re-create the slide backgrounds createBackgrounds(); + // Write the current hash to the URL + writeURL(); + sortAllFragments(); updateControls(); @@ -2641,7 +2644,7 @@ if( typeof delay === 'number' ) { writeURLTimeout = setTimeout( writeURL, delay ); } - else { + else if( currentSlide ) { var url = '/'; // Attempt to create a named link based on the slide's ID @@ -2652,7 +2655,7 @@ } // If the current slide has an ID, use that as a named link - if( currentSlide && typeof id === 'string' && id.length ) { + if( typeof id === 'string' && id.length ) { url = '/' + id; } // Otherwise use the /h/v index -- cgit v1.2.3 From 8973f0c3e19ffafee489a3dcfce03303120ed22b Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 5 Jun 2014 10:59:30 +0200 Subject: typo #938 --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index d9451cb..68d29a8 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -112,7 +112,7 @@ postMessageEvents: false, // Focuses body when page changes visiblity to ensure keyboard shortcuts work - focusBodyOnPageVisiblityChange: true, + focusBodyOnPageVisibilityChange: true, // Theme (see /css/theme) theme: null, @@ -842,7 +842,7 @@ dom.progress.addEventListener( 'click', onProgressClicked, false ); } - if( config.focusBodyOnPageVisiblityChange ) { + if( config.focusBodyOnPageVisibilityChange ) { var visibilityChange; if( 'hidden' in document ) { -- cgit v1.2.3 From 75a53da9e54a462fe9bb313f2cd44320e0e4445a Mon Sep 17 00:00:00 2001 From: nava teja Date: Sun, 8 Jun 2014 00:59:29 +0530 Subject: Shows keyboard shorcuts overlay on pressing question mark --- js/reveal.js | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5cbb3ff..27fcb49 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -177,6 +177,20 @@ var Reveal = (function(){ startCount: 0, captured: false, threshold: 40 + }, + + // Holds information about the keyboard shortcuts + keyboard_shortcuts = { + 'p': "Previous slide", + 'n': "Next slide", + 'h': "Navigate left", + 'l': "Navigate right", + 'k': "Navigate up", + 'j': "Navigate down", + 'Home': "First slide", + 'End': "Last slide", + 'b': "Pause", + 'f': "Fullscreen" }; /** @@ -646,6 +660,7 @@ var Reveal = (function(){ if( config.keyboard ) { document.addEventListener( 'keydown', onDocumentKeyDown, false ); + document.addEventListener( 'keypress', onDocumentKeyPress, false ); } if( config.progress && dom.progress ) { @@ -689,6 +704,7 @@ var Reveal = (function(){ eventsAreBound = false; document.removeEventListener( 'keydown', onDocumentKeyDown, false ); + document.removeEventListener( 'keypress', onDocumentKeyPress, false ); window.removeEventListener( 'hashchange', onWindowHashChange, false ); window.removeEventListener( 'resize', onWindowResize, false ); @@ -1019,6 +1035,44 @@ var Reveal = (function(){ } + /** + * Opens a overlay window for the keyboard shortcuts. + */ + function openShortcutsOverlay() { + + closePreview(); + + dom.preview = document.createElement( 'div' ); + dom.preview.classList.add( 'preview-link-overlay' ); + dom.wrapper.appendChild( dom.preview ); + + var html = '
Keyboard Shortcuts

'; + html += ''; + for( var key in keyboard_shortcuts ) { + html += '' + } + html += '
KEY ACTION
' + key + ' ' + keyboard_shortcuts[key] + '
'; + + dom.preview.innerHTML = [ + '
', + '', + '
', + '
', + '
'+html+'
', + '
' + ].join(''); + + dom.preview.querySelector( '.close' ).addEventListener( 'click', function( event ) { + closePreview(); + event.preventDefault(); + }, false ); + + setTimeout( function() { + dom.preview.classList.add( 'visible' ); + }, 1 ); + + } + /** * Applies JavaScript-controlled layout rules to the * presentation. @@ -2642,6 +2696,17 @@ var Reveal = (function(){ } + /** + * Handler for the document level 'keypress' event. + */ + + function onDocumentKeyPress( event ) { + // Check if the pressed key is question mark + if( event.shiftKey && event.charCode == 63 ) { + openShortcutsOverlay(); + } + } + /** * Handler for the document level 'keydown' event. */ -- cgit v1.2.3 From ab7efe6bf2da9b31b31a3af859e9f7f413fd2d0d Mon Sep 17 00:00:00 2001 From: navateja Date: Mon, 9 Jun 2014 14:35:59 +0530 Subject: creates a new branch for the feature --- js/reveal.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 27fcb49..e668d48 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -181,16 +181,16 @@ var Reveal = (function(){ // Holds information about the keyboard shortcuts keyboard_shortcuts = { - 'p': "Previous slide", - 'n': "Next slide", - 'h': "Navigate left", - 'l': "Navigate right", - 'k': "Navigate up", - 'j': "Navigate down", - 'Home': "First slide", - 'End': "Last slide", - 'b': "Pause", - 'f': "Fullscreen" + 'p': 'Previous slide', + 'n': 'Next slide', + 'h': 'Navigate left', + 'l': 'Navigate right', + 'k': 'Navigate up', + 'j': 'Navigate down', + 'Home': 'First slide', + 'End': 'Last slide', + 'b': 'Pause', + 'f': 'Fullscreen' }; /** -- cgit v1.2.3 From 0a58df8390030288e6764b9a52d6f2c26b12a455 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 9 Jun 2014 11:36:28 +0200 Subject: don't trim aria status --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index fdaa928..cbfa859 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2966,7 +2966,7 @@ element.classList.remove( 'current-fragment' ); // Announce the fragments one by one to the Screen Reader - dom.statusDiv.innerHTML = element.textContent.trim(); + dom.statusDiv.innerHTML = element.textContent; if( i === index ) { element.classList.add( 'current-fragment' ); -- cgit v1.2.3 From 9ff00a72ae0cbf96b3c12d515ccfb31dbbc2283f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 9 Jun 2014 17:35:46 +0200 Subject: merge and tweak key shortcuts overlay #943 --- js/reveal.js | 111 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 58 insertions(+), 53 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a4d5f02..f32ee1f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -199,13 +199,13 @@ }, // Holds information about the keyboard shortcuts - keyboard_shortcuts = { - 'p': 'Previous slide', - 'n': 'Next slide', - 'h': 'Navigate left', - 'l': 'Navigate right', - 'k': 'Navigate up', - 'j': 'Navigate down', + keyboardShortcuts = { + 'P': 'Previous slide', + 'N': 'Next slide', + 'H': 'Navigate left', + 'L': 'Navigate right', + 'K': 'Navigate up', + 'J': 'Navigate down', 'Home': 'First slide', 'End': 'Last slide', 'b': 'Pause', @@ -1233,15 +1233,16 @@ /** * Opens a preview window for the target URL. */ - function openPreview( url ) { + function showPreview( url ) { - closePreview(); + closeOverlay(); - dom.preview = document.createElement( 'div' ); - dom.preview.classList.add( 'preview-link-overlay' ); - dom.wrapper.appendChild( dom.preview ); + dom.overlay = document.createElement( 'div' ); + dom.overlay.classList.add( 'overlay' ); + dom.overlay.classList.add( 'overlay-preview' ); + dom.wrapper.appendChild( dom.overlay ); - dom.preview.innerHTML = [ + dom.overlay.innerHTML = [ '
', '', '', @@ -1252,76 +1253,79 @@ '' ].join(''); - dom.preview.querySelector( 'iframe' ).addEventListener( 'load', function( event ) { - dom.preview.classList.add( 'loaded' ); + dom.overlay.querySelector( 'iframe' ).addEventListener( 'load', function( event ) { + dom.overlay.classList.add( 'loaded' ); }, false ); - dom.preview.querySelector( '.close' ).addEventListener( 'click', function( event ) { - closePreview(); + dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) { + closeOverlay(); event.preventDefault(); }, false ); - dom.preview.querySelector( '.external' ).addEventListener( 'click', function( event ) { - closePreview(); + dom.overlay.querySelector( '.external' ).addEventListener( 'click', function( event ) { + closeOverlay(); }, false ); setTimeout( function() { - dom.preview.classList.add( 'visible' ); + dom.overlay.classList.add( 'visible' ); }, 1 ); } /** - * Closes the iframe preview window. + * Opens a overlay window with help material. */ - function closePreview() { + function showHelp() { - if( dom.preview ) { - dom.preview.setAttribute( 'src', '' ); - dom.preview.parentNode.removeChild( dom.preview ); - dom.preview = null; - } - - } + closeOverlay(); - /** - * Opens a overlay window for the keyboard shortcuts. - */ - function openShortcutsOverlay() { + dom.overlay = document.createElement( 'div' ); + dom.overlay.classList.add( 'overlay' ); + dom.overlay.classList.add( 'overlay-help' ); + dom.wrapper.appendChild( dom.overlay ); - closePreview(); + var html = '

Keyboard Shortcuts


'; - dom.preview = document.createElement( 'div' ); - dom.preview.classList.add( 'preview-link-overlay' ); - dom.wrapper.appendChild( dom.preview ); - - var html = '
Keyboard Shortcuts

'; - html += ''; - for( var key in keyboard_shortcuts ) { - html += '' + html += '
KEY ACTION
' + key + ' ' + keyboard_shortcuts[key] + '
'; + for( var key in keyboardShortcuts ) { + html += ''; } + html += '
KEYACTION
' + key + '' + keyboardShortcuts[ key ] + '
'; - dom.preview.innerHTML = [ + dom.overlay.innerHTML = [ '
', '', '
', '
', - '
'+html+'
', + '
'+ html +'
', '
' ].join(''); - dom.preview.querySelector( '.close' ).addEventListener( 'click', function( event ) { - closePreview(); + dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) { + closeOverlay(); event.preventDefault(); }, false ); setTimeout( function() { - dom.preview.classList.add( 'visible' ); + dom.overlay.classList.add( 'visible' ); }, 1 ); } + /** + * Closes any currently open overlay. + */ + function closeOverlay() { + + if( dom.overlay ) { + dom.overlay.setAttribute( 'src', '' ); + dom.overlay.parentNode.removeChild( dom.overlay ); + dom.overlay = null; + } + + } + /** * Applies JavaScript-controlled layout rules to the * presentation. @@ -3289,12 +3293,13 @@ /** * Handler for the document level 'keypress' event. */ - function onDocumentKeyPress( event ) { + // Check if the pressed key is question mark - if( event.shiftKey && event.charCode == 63 ) { - openShortcutsOverlay(); + if( event.shiftKey && event.charCode === 63 ) { + showHelp(); } + } /** @@ -3402,8 +3407,8 @@ } // ESC or O key else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && features.transforms3d ) { - if( dom.preview ) { - closePreview(); + if( dom.overlay ) { + closeOverlay(); } else { toggleOverview(); @@ -3701,7 +3706,7 @@ var url = event.target.getAttribute( 'href' ); if( url ) { - openPreview( url ); + showPreview( url ); event.preventDefault(); } -- cgit v1.2.3 From 645734832dd264bb257a90256748cdf6f12a759f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 9 Jun 2014 17:53:14 +0200 Subject: adjust list of displayed key shortcuts #943 --- js/reveal.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index f32ee1f..3f56435 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -200,16 +200,17 @@ // Holds information about the keyboard shortcuts keyboardShortcuts = { - 'P': 'Previous slide', - 'N': 'Next slide', - 'H': 'Navigate left', - 'L': 'Navigate right', - 'K': 'Navigate up', - 'J': 'Navigate down', - 'Home': 'First slide', - 'End': 'Last slide', - 'b': 'Pause', - 'f': 'Fullscreen' + 'N , SPACE': 'Next slide', + 'P': 'Previous slide', + '← , H': 'Navigate left', + '→ , L': 'Navigate right', + '↑ , K': 'Navigate up', + '↓ , J': 'Navigate down', + 'Home': 'First slide', + 'End': 'Last slide', + 'B , .': 'Pause', + 'F': 'Fullscreen', + 'ESC, O': 'Slide overview' }; /** @@ -1319,7 +1320,6 @@ function closeOverlay() { if( dom.overlay ) { - dom.overlay.setAttribute( 'src', '' ); dom.overlay.parentNode.removeChild( dom.overlay ); dom.overlay = null; } -- cgit v1.2.3 From f5ac0b35d1f9886de8782dbbc573d0ef12dcd131 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 9 Jun 2014 18:24:47 +0200 Subject: toggle instead of always showing the help overlay when ? is pressed --- js/reveal.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3f56435..c311fb0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3297,7 +3297,12 @@ // Check if the pressed key is question mark if( event.shiftKey && event.charCode === 63 ) { - showHelp(); + if( dom.overlay ) { + closeOverlay(); + } + else { + showHelp( true ); + } } } -- cgit v1.2.3 From af61d9d10baee982fe82132acc4cd2dd604a6c61 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 12 Jun 2014 18:15:32 +0200 Subject: rewrite youtube iframe embeds to force ?enablejsapi=1 (fixes #856) --- js/reveal.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index c311fb0..f98d511 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1959,6 +1959,8 @@ updateSlideNumber(); updateSlidesVisibility(); + formatEmbeddedContent(); + } /** @@ -2542,6 +2544,21 @@ } + /** + * Enforces origin-specific format rules for embedded content. + */ + function formatEmbeddedContent() { + + // YouTube frames must include "?enablejsapi=1" + toArray( dom.slides.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) { + var src = el.getAttribute( 'src' ); + if( !/enablejsapi\=1/gi.test( src ) ) { + el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '' ) + 'enablejsapi=1' ); + } + }); + + } + /** * Start playback of any embedded content inside of * the targeted slide. -- cgit v1.2.3 From a7a32f941cb8c09c85865e5a287be82bc2e14adb Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 12 Jun 2014 18:20:15 +0200 Subject: vimeo support for autoplay/pause --- js/reveal.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index f98d511..df8c0f6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2545,7 +2545,7 @@ } /** - * Enforces origin-specific format rules for embedded content. + * Enforces origin-specific format rules for embedded media. */ function formatEmbeddedContent() { @@ -2557,6 +2557,14 @@ } }); + // Vimeo frames must include "?api=1" + toArray( dom.slides.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { + var src = el.getAttribute( 'src' ); + if( !/api\=1/gi.test( src ) ) { + el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '' ) + 'api=1' ); + } + }); + } /** @@ -2584,6 +2592,14 @@ el.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' ); } }); + + // Vimeo embeds + toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { + if( el.hasAttribute( 'data-autoplay' ) ) { + console.log(11); + el.contentWindow.postMessage( '{"method":"play"}', '*' ); + } + }); } } @@ -2613,6 +2629,13 @@ el.contentWindow.postMessage( '{"event":"command","func":"pauseVideo","args":""}', '*' ); } }); + + // Vimeo embeds + toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { + if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) { + el.contentWindow.postMessage( '{"method":"pause"}', '*' ); + } + }); } } -- cgit v1.2.3 From 2e0fe815a65f7431a51812bbf695b2fbda0927c8 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 12 Jun 2014 18:27:52 +0200 Subject: fix append to existing embed query --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index df8c0f6..a49493c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2553,7 +2553,7 @@ toArray( dom.slides.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) { var src = el.getAttribute( 'src' ); if( !/enablejsapi\=1/gi.test( src ) ) { - el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '' ) + 'enablejsapi=1' ); + el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'enablejsapi=1' ); } }); @@ -2561,7 +2561,7 @@ toArray( dom.slides.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { var src = el.getAttribute( 'src' ); if( !/api\=1/gi.test( src ) ) { - el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '' ) + 'api=1' ); + el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'api=1' ); } }); -- cgit v1.2.3 From ebfb49674308e51b1089e0451afc74d678482a09 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 16 Jun 2014 18:46:38 +0200 Subject: config option for disabling the help overlay --- js/reveal.js | 60 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 26 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a49493c..75e88e4 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -85,6 +85,10 @@ // i.e. contained within a limited portion of the screen embedded: false, + // Flags if we should show a help overlay when the questionmark + // key is pressed + help: true, + // Number of milliseconds between automatically proceeding to the // next slide, disabled when set to 0, this value can be overwritten // by using a data-autoslide attribute on your slides @@ -1278,39 +1282,43 @@ */ function showHelp() { - closeOverlay(); + if( config.help ) { - dom.overlay = document.createElement( 'div' ); - dom.overlay.classList.add( 'overlay' ); - dom.overlay.classList.add( 'overlay-help' ); - dom.wrapper.appendChild( dom.overlay ); + closeOverlay(); - var html = '

Keyboard Shortcuts


'; + dom.overlay = document.createElement( 'div' ); + dom.overlay.classList.add( 'overlay' ); + dom.overlay.classList.add( 'overlay-help' ); + dom.wrapper.appendChild( dom.overlay ); - html += ''; - for( var key in keyboardShortcuts ) { - html += ''; - } + var html = '

Keyboard Shortcuts


'; - html += '
KEYACTION
' + key + '' + keyboardShortcuts[ key ] + '
'; + html += ''; + for( var key in keyboardShortcuts ) { + html += ''; + } - dom.overlay.innerHTML = [ - '
', - '', - '
', - '
', - '
'+ html +'
', - '
' - ].join(''); + html += '
KEYACTION
' + key + '' + keyboardShortcuts[ key ] + '
'; - dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) { - closeOverlay(); - event.preventDefault(); - }, false ); + dom.overlay.innerHTML = [ + '
', + '', + '
', + '
', + '
'+ html +'
', + '
' + ].join(''); - setTimeout( function() { - dom.overlay.classList.add( 'visible' ); - }, 1 ); + dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) { + closeOverlay(); + event.preventDefault(); + }, false ); + + setTimeout( function() { + dom.overlay.classList.add( 'visible' ); + }, 1 ); + + } } -- cgit v1.2.3 From e4761d3a37a5fc3a9e11e22ae12435843ca04416 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 18 Jun 2014 10:50:00 +0200 Subject: only allow text in aria status div --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 75e88e4..6d98679 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1918,7 +1918,7 @@ } // Announce the current slide contents, for screen readers - dom.statusDiv.innerHTML = currentSlide.textContent; + dom.statusDiv.textContent = currentSlide.textContent; updateControls(); updateProgress(); -- cgit v1.2.3 From 4e70cf8126e7e6bd3667479efeecc348dec7e6c0 Mon Sep 17 00:00:00 2001 From: Calyhre Date: Wed, 18 Jun 2014 14:18:08 +0200 Subject: Add ability to prevent swipe for specific elements --- js/reveal.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 6d98679..b4cb17f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3482,6 +3482,8 @@ */ function onTouchStart( event ) { + if(preventSwipe(event.target)) return true; + touch.startX = event.touches[0].clientX; touch.startY = event.touches[0].clientY; touch.startCount = event.touches.length; @@ -3505,6 +3507,8 @@ */ function onTouchMove( event ) { + if(preventSwipe(event.target)) return true; + // Each touch should only trigger one action if( !touch.captured ) { onUserInput( event ); @@ -3786,6 +3790,15 @@ } + function preventSwipe(target) { + while( target && typeof target.hasAttribute == 'function' ) { + if(target.hasAttribute('prevent-swipe')) return true; + target = target.parentNode; + } + + return false; + } + // --------------------------------------------------------------------// // ------------------------ PLAYBACK COMPONENT ------------------------// -- cgit v1.2.3 From ed8d90bc58b811a921cdad53fd6d418be8bb9765 Mon Sep 17 00:00:00 2001 From: Calyhre Date: Wed, 18 Jun 2014 14:23:42 +0200 Subject: Fix tests --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index b4cb17f..f844456 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3791,7 +3791,7 @@ } function preventSwipe(target) { - while( target && typeof target.hasAttribute == 'function' ) { + while( target && typeof target.hasAttribute === 'function' ) { if(target.hasAttribute('prevent-swipe')) return true; target = target.parentNode; } -- cgit v1.2.3 From c6b9da7000bc87f29dde25a859fee0e8858a31df Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 18 Jun 2014 18:42:45 +0200 Subject: more specific targeting for pdf printing hack --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 6d98679..0cb82cf 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -508,7 +508,7 @@ injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0;}' ); // Limit the size of certain elements to the dimensions of the slide - injectStyleSheet( '.reveal img, .reveal video, .reveal iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' ); + injectStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' ); document.body.classList.add( 'print-pdf' ); document.body.style.width = pageWidth + 'px'; -- cgit v1.2.3 From 8cb8229aac9ee81e06c8ee52d7ffa291e61795c4 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Jun 2014 11:44:10 +0200 Subject: prevent incorrect showSlide calls at startup --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 0cb82cf..ae35bf0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2169,7 +2169,7 @@ verticalSlidesLength = verticalSlides.length; // Loops so that it measures 1 between the first and last slides - distanceX = Math.abs( ( indexh - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; + distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; // Show the horizontal slide if it's within the view distance if( distanceX < viewDistance ) { @@ -2186,7 +2186,7 @@ for( var y = 0; y < verticalSlidesLength; y++ ) { var verticalSlide = verticalSlides[y]; - distanceY = x === indexh ? Math.abs( indexv - y ) : Math.abs( y - oy ); + distanceY = x === ( indexh || 0 ) ? Math.abs( ( indexv || 0 ) - y ) : Math.abs( y - oy ); if( distanceX + distanceY < viewDistance ) { showSlide( verticalSlide ); -- cgit v1.2.3 From ef333300a20b7412176525e542b5fd61ef776e94 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Jun 2014 11:50:31 +0200 Subject: prevent additional inaccurate showSlide calls --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ae35bf0..2355098 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2146,7 +2146,7 @@ distanceX, distanceY; - if( horizontalSlidesLength ) { + if( horizontalSlidesLength && typeof indexh !== 'undefined' ) { // The number of steps away from the present slide that will // be visible -- cgit v1.2.3 From 7e8fd09376a75ac793bbea4efff30d5056fea559 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Jun 2014 13:56:24 +0200 Subject: fix npe --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 2355098..edf3073 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2618,7 +2618,7 @@ */ function stopEmbeddedContent( slide ) { - if( slide ) { + if( slide && slide.parentNode ) { // HTML5 media elements toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { if( !el.hasAttribute( 'data-ignore' ) ) { -- cgit v1.2.3 From a078c87f106955d4cbc94e5857360f5d9907fc27 Mon Sep 17 00:00:00 2001 From: David Banham Date: Wed, 25 Jun 2014 23:22:13 +1000 Subject: Listen to custom mapped togglePause keys This resolves issue #941 --- js/reveal.js | 9 +++++++-- js/reveal.min.js | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5cbb3ff..bdd4a15 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2658,8 +2658,13 @@ var Reveal = (function(){ // keyboard modifier key is present if( hasFocus || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return; - // While paused only allow "unpausing" keyboard events (b and .) - if( isPaused() && [66,190,191].indexOf( event.keyCode ) === -1 ) { + // While paused only allow "unpausing" keyboard events ('b', '.' or any key specifically mapped to togglePause ) + var allowedKeys = [66,190,191].concat(Object.keys(config.keyboard).map(function(key){ + if (config.keyboard[key] === 'togglePause') { + return parseInt(key, 10); + } + })); + if( isPaused() && allowedKeys.indexOf( event.keyCode ) === -1 ) { return false; } diff --git a/js/reveal.min.js b/js/reveal.min.js index a13bd48..8834cf6 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,9 +1,9 @@ /*! - * reveal.js 2.6.1 (2014-03-13, 09:22) + * reveal.js 2.6.2-2 (2014-06-25, 23:21) * http://lab.hakim.se/reveal-js * MIT licensed * * Copyright (C) 2014 Hakim El Hattab, http://hakim.se */ -var Reveal=function(){"use strict";function a(a){if(b(),!ec.transforms2d&&!ec.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(_b,a),k(_b,d),r(),c()}function b(){ec.transforms3d="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,ec.transforms2d="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,ec.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ec.requestAnimationFrame="function"==typeof ec.requestAnimationFrameMethod,ec.canvas=!!document.createElement("canvas").getContext,Vb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=_b.dependencies.length;h>g;g++){var i=_b.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),Q(),h(),cb(),X(!0),setTimeout(function(){dc.slides.classList.remove("no-transition"),ac=!0,t("ready",{indexh:Qb,indexv:Rb,currentSlide:Tb})},1)}function e(){dc.theme=document.querySelector("#theme"),dc.wrapper=document.querySelector(".reveal"),dc.slides=document.querySelector(".reveal .slides"),dc.slides.classList.add("no-transition"),dc.background=f(dc.wrapper,"div","backgrounds",null),dc.progress=f(dc.wrapper,"div","progress",""),dc.progressbar=dc.progress.querySelector("span"),f(dc.wrapper,"aside","controls",''),dc.slideNumber=f(dc.wrapper,"div","slide-number",""),f(dc.wrapper,"div","state-background",null),f(dc.wrapper,"div","pause-overlay",null),dc.controls=document.querySelector(".reveal .controls"),dc.controlsLeft=l(document.querySelectorAll(".navigate-left")),dc.controlsRight=l(document.querySelectorAll(".navigate-right")),dc.controlsUp=l(document.querySelectorAll(".navigate-up")),dc.controlsDown=l(document.querySelectorAll(".navigate-down")),dc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),dc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),dc.background.innerHTML="",dc.background.classList.add("no-transition"),l(document.querySelectorAll(Yb)).forEach(function(b){var c;c=q()?a(b,b):a(b,dc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),_b.parallaxBackgroundImage?(dc.background.style.backgroundImage='url("'+_b.parallaxBackgroundImage+'")',dc.background.style.backgroundSize=_b.parallaxBackgroundSize,setTimeout(function(){dc.wrapper.classList.add("has-parallax-background")},1)):(dc.background.style.backgroundImage="",dc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Xb).length;if(dc.wrapper.classList.remove(_b.transition),"object"==typeof a&&k(_b,a),ec.transforms3d===!1&&(_b.transition="linear"),dc.wrapper.classList.add(_b.transition),dc.wrapper.setAttribute("data-transition-speed",_b.transitionSpeed),dc.wrapper.setAttribute("data-background-transition",_b.backgroundTransition),dc.controls.style.display=_b.controls?"block":"none",dc.progress.style.display=_b.progress?"block":"none",_b.rtl?dc.wrapper.classList.add("rtl"):dc.wrapper.classList.remove("rtl"),_b.center?dc.wrapper.classList.add("center"):dc.wrapper.classList.remove("center"),_b.mouseWheel?(document.addEventListener("DOMMouseScroll",Bb,!1),document.addEventListener("mousewheel",Bb,!1)):(document.removeEventListener("DOMMouseScroll",Bb,!1),document.removeEventListener("mousewheel",Bb,!1)),_b.rollingLinks?u():v(),_b.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&_b.autoSlide&&_b.autoSlideStoppable&&ec.canvas&&ec.requestAnimationFrame?(Wb=new Pb(dc.wrapper,function(){return Math.min(Math.max((Date.now()-mc)/kc,0),1)}),Wb.on("click",Ob),nc=!1):Wb&&(Wb.destroy(),Wb=null),_b.theme&&dc.theme){var c=dc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];_b.theme!==e&&(c=c.replace(d,_b.theme),dc.theme.setAttribute("href",c))}P()}function i(){if(jc=!0,window.addEventListener("hashchange",Jb,!1),window.addEventListener("resize",Kb,!1),_b.touch&&(dc.wrapper.addEventListener("touchstart",vb,!1),dc.wrapper.addEventListener("touchmove",wb,!1),dc.wrapper.addEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.addEventListener("MSPointerDown",yb,!1),dc.wrapper.addEventListener("MSPointerMove",zb,!1),dc.wrapper.addEventListener("MSPointerUp",Ab,!1))),_b.keyboard&&document.addEventListener("keydown",ub,!1),_b.progress&&dc.progress&&dc.progress.addEventListener("click",Cb,!1),_b.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Lb,!1)}["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.addEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.addEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.addEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.addEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.addEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.addEventListener(a,Ib,!1)})})}function j(){jc=!1,document.removeEventListener("keydown",ub,!1),window.removeEventListener("hashchange",Jb,!1),window.removeEventListener("resize",Kb,!1),dc.wrapper.removeEventListener("touchstart",vb,!1),dc.wrapper.removeEventListener("touchmove",wb,!1),dc.wrapper.removeEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.removeEventListener("MSPointerDown",yb,!1),dc.wrapper.removeEventListener("MSPointerMove",zb,!1),dc.wrapper.removeEventListener("MSPointerUp",Ab,!1)),_b.progress&&dc.progress&&dc.progress.removeEventListener("click",Cb,!1),["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.removeEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.removeEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.removeEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.removeEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.removeEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.removeEventListener(a,Ib,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){_b.hideAddressBar&&Vb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),dc.wrapper.dispatchEvent(c)}function u(){if(ec.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Xb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Xb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Nb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Nb,!1)})}function y(a){z(),dc.preview=document.createElement("div"),dc.preview.classList.add("preview-link-overlay"),dc.wrapper.appendChild(dc.preview),dc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),dc.preview.querySelector("iframe").addEventListener("load",function(){dc.preview.classList.add("loaded")},!1),dc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),dc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){dc.preview.classList.add("visible")},1)}function z(){dc.preview&&(dc.preview.setAttribute("src",""),dc.preview.parentNode.removeChild(dc.preview),dc.preview=null)}function A(){if(dc.wrapper&&!q()){var a=dc.wrapper.offsetWidth,b=dc.wrapper.offsetHeight;a-=b*_b.margin,b-=b*_b.margin;var c=_b.width,d=_b.height,e=20;B(_b.width,_b.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),dc.slides.style.width=c+"px",dc.slides.style.height=d+"px",cc=Math.min(a/c,b/d),cc=Math.max(cc,_b.minScale),cc=Math.min(cc,_b.maxScale),"undefined"==typeof dc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(dc.slides,"translate(-50%, -50%) scale("+cc+") translate(50%, 50%)"):dc.slides.style.zoom=cc;for(var f=l(document.querySelectorAll(Xb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=_b.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}U(),Y()}}function B(a,b,c){l(dc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(_b.overview){kb();var a=dc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;dc.wrapper.classList.add("overview"),dc.wrapper.classList.remove("overview-deactivating"),clearTimeout(hc),clearTimeout(ic),hc=setTimeout(function(){for(var c=document.querySelectorAll(Yb),d=0,e=c.length;e>d;d++){var f=c[d],g=_b.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Qb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Qb?Rb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Mb,!0)}else f.addEventListener("click",Mb,!0)}T(),A(),a||t("overviewshown",{indexh:Qb,indexv:Rb,currentSlide:Tb})},10)}}function F(){_b.overview&&(clearTimeout(hc),clearTimeout(ic),dc.wrapper.classList.remove("overview"),dc.wrapper.classList.add("overview-deactivating"),ic=setTimeout(function(){dc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Xb)).forEach(function(a){n(a,""),a.removeEventListener("click",Mb,!0)}),O(Qb,Rb),jb(),t("overviewhidden",{indexh:Qb,indexv:Rb,currentSlide:Tb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return dc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Tb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=dc.wrapper.classList.contains("paused");kb(),dc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=dc.wrapper.classList.contains("paused");dc.wrapper.classList.remove("paused"),jb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return dc.wrapper.classList.contains("paused")}function O(a,b,c,d){Sb=Tb;var e=document.querySelectorAll(Yb);void 0===b&&(b=D(e[a])),Sb&&Sb.parentNode&&Sb.parentNode.classList.contains("stack")&&C(Sb.parentNode,Rb);var f=bc.concat();bc.length=0;var g=Qb||0,h=Rb||0;Qb=S(Yb,void 0===a?Qb:a),Rb=S(Zb,void 0===b?Rb:b),T(),A();a:for(var i=0,j=bc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function R(){var a=l(document.querySelectorAll(Yb));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){fb(a.querySelectorAll(".fragment"))}),0===b.length&&fb(a.querySelectorAll(".fragment"))})}function S(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){_b.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=_b.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(bc=bc.concat(m.split(" ")))}else b=0;return b}function T(){var a,b,c=l(document.querySelectorAll(Yb)),d=c.length;if(d){var e=H()?10:_b.viewDistance;Vb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Qb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=f===Qb?Math.abs(Rb-k):Math.abs(k-j),m.style.display=a+b>e?"none":"block"}}}}function U(){if(_b.progress&&dc.progress){var a=l(document.querySelectorAll(Yb)),b=document.querySelectorAll(Xb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Rb),dc.slideNumber.innerHTML=a}}function W(){var a=Z(),b=$();dc.controlsLeft.concat(dc.controlsRight).concat(dc.controlsUp).concat(dc.controlsDown).concat(dc.controlsPrev).concat(dc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&dc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&dc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&dc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&dc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&dc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&dc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Tb&&(b.prev&&dc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Tb)?(b.prev&&dc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&dc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function X(a){var b=null,c=_b.rtl?"future":"past",d=_b.rtl?"past":"future";if(l(dc.background.childNodes).forEach(function(e,f){Qb>f?e.className="slide-background "+c:f>Qb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Qb)&&l(e.childNodes).forEach(function(a,c){Rb>c?a.className="slide-background past":c>Rb?a.className="slide-background future":(a.className="slide-background present",f===Qb&&(b=a))})}),b){var e=Ub?Ub.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Ub&&dc.background.classList.add("no-transition"),Ub=b}setTimeout(function(){dc.background.classList.remove("no-transition")},1)}function Y(){if(_b.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Yb),d=document.querySelectorAll(Zb),e=dc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=dc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Qb,i=dc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Rb:0;dc.background.style.backgroundPosition=h+"px "+k+"px"}}function Z(){var a=document.querySelectorAll(Yb),b=document.querySelectorAll(Zb),c={left:Qb>0||_b.loop,right:Qb0,down:Rb0,next:!!b.length}}return{prev:!1,next:!1}}function _(a){a&&!bb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function ab(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function bb(){return!!window.location.search.match(/receiver/gi)}function cb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);O(e.h,e.v)}else O(Qb||0,Rb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Qb||g!==Rb)&&O(f,g)}}function db(a){if(_b.history)if(clearTimeout(gc),"number"==typeof a)gc=setTimeout(db,a);else{var b="/";Tb&&"string"==typeof Tb.getAttribute("id")?b="/"+Tb.getAttribute("id"):((Qb>0||Rb>0)&&(b+=Qb),Rb>0&&(b+="/"+Rb)),window.location.hash=b}}function eb(a){var b,c=Qb,d=Rb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(Yb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Tb){var h=Tb.querySelectorAll(".fragment").length>0;if(h){var i=Tb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function fb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function gb(a,b){if(Tb&&_b.fragments){var c=fb(Tb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=fb(Tb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),W(),!(!e.length&&!f.length)}}return!1}function hb(){return gb(null,1)}function ib(){return gb(null,-1)}function jb(){if(kb(),Tb){var a=Tb.parentNode?Tb.parentNode.getAttribute("data-autoslide"):null,b=Tb.getAttribute("data-autoslide");kc=b?parseInt(b,10):a?parseInt(a,10):_b.autoSlide,l(Tb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&kc&&1e3*a.duration>kc&&(kc=1e3*a.duration+1e3)}),!kc||nc||N()||H()||Reveal.isLastSlide()&&_b.loop!==!0||(lc=setTimeout(sb,kc),mc=Date.now()),Wb&&Wb.setPlaying(-1!==lc)}}function kb(){clearTimeout(lc),lc=-1}function lb(){nc=!0,clearTimeout(lc),Wb&&Wb.setPlaying(!1)}function mb(){nc=!1,jb()}function nb(){_b.rtl?(H()||hb()===!1)&&Z().left&&O(Qb+1):(H()||ib()===!1)&&Z().left&&O(Qb-1)}function ob(){_b.rtl?(H()||ib()===!1)&&Z().right&&O(Qb-1):(H()||hb()===!1)&&Z().right&&O(Qb+1)}function pb(){(H()||ib()===!1)&&Z().up&&O(Qb,Rb-1)}function qb(){(H()||hb()===!1)&&Z().down&&O(Qb,Rb+1)}function rb(){if(ib()===!1)if(Z().up)pb();else{var a=document.querySelector(Yb+".past:nth-child("+Qb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Qb-1;O(c,b)}}}function sb(){hb()===!1&&(Z().down?qb():ob()),jb()}function tb(){_b.autoSlideStoppable&&lb()}function ub(a){tb(a),document.activeElement;var b=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable);if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(N()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof _b.keyboard)for(var d in _b.keyboard)if(parseInt(d,10)===a.keyCode){var e=_b.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:rb();break;case 78:case 34:sb();break;case 72:case 37:nb();break;case 76:case 39:ob();break;case 75:case 38:pb();break;case 74:case 40:qb();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?rb():sb();break;case 13:H()?F():c=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ec.transforms3d||(dc.preview?z():G(),a.preventDefault()),jb()}}function vb(a){oc.startX=a.touches[0].clientX,oc.startY=a.touches[0].clientY,oc.startCount=a.touches.length,2===a.touches.length&&_b.overview&&(oc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY}))}function wb(a){if(oc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{tb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===oc.startCount&&_b.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY});Math.abs(oc.startSpan-d)>oc.threshold&&(oc.captured=!0,doc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,nb()):e<-oc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,ob()):f>oc.threshold?(oc.captured=!0,pb()):f<-oc.threshold&&(oc.captured=!0,qb()),_b.embedded?(oc.captured||I(Tb))&&a.preventDefault():a.preventDefault()}}}function xb(){oc.captured=!1}function yb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],vb(a))}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){if(Date.now()-fc>600){fc=Date.now();var b=a.detail||-a.wheelDelta;b>0?sb():rb()}}function Cb(a){tb(a),a.preventDefault();var b=l(document.querySelectorAll(Yb)).length,c=Math.floor(a.clientX/dc.wrapper.offsetWidth*b);O(c)}function Db(a){a.preventDefault(),tb(),nb()}function Eb(a){a.preventDefault(),tb(),ob()}function Fb(a){a.preventDefault(),tb(),pb()}function Gb(a){a.preventDefault(),tb(),qb()}function Hb(a){a.preventDefault(),tb(),rb()}function Ib(a){a.preventDefault(),tb(),sb()}function Jb(){cb()}function Kb(){A()}function Lb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Mb(a){if(jc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);O(c,d)}}}function Nb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Ob(){Reveal.isLastSlide()&&_b.loop===!1?(O(0,0),mb()):nc?mb():lb()}function Pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb=".reveal .slides section",Yb=".reveal .slides>section",Zb=".reveal .slides>section.present>section",$b=".reveal .slides>section:first-of-type",_b={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ac=!1,bc=[],cc=1,dc={},ec={},fc=0,gc=0,hc=0,ic=0,jc=!1,kc=0,lc=0,mc=-1,nc=!1,oc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ec.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:P,slide:O,left:nb,right:ob,up:pb,down:qb,prev:rb,next:sb,navigateFragment:gb,prevFragment:ib,nextFragment:hb,navigateTo:O,navigateLeft:nb,navigateRight:ob,navigateUp:pb,navigateDown:qb,navigatePrev:rb,navigateNext:sb,layout:A,availableRoutes:Z,availableFragments:$,toggleOverview:G,togglePause:M,isOverview:H,isPaused:N,addEventListeners:i,removeEventListeners:j,getIndices:eb,getSlide:function(a,b){var c=document.querySelectorAll(Yb)[a],d=c&&c.querySelectorAll("section"); +var Reveal=function(){"use strict";function a(a){if(b(),!ec.transforms2d&&!ec.transforms3d)return void document.body.setAttribute("class","no-transforms");window.addEventListener("load",A,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,k(_b,a),k(_b,d),r(),c()}function b(){ec.transforms3d="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,ec.transforms2d="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,ec.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,ec.requestAnimationFrame="function"==typeof ec.requestAnimationFrameMethod,ec.canvas=!!document.createElement("canvas").getContext,Vb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=_b.dependencies.length;h>g;g++){var i=_b.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),Q(),h(),cb(),X(!0),setTimeout(function(){dc.slides.classList.remove("no-transition"),ac=!0,t("ready",{indexh:Qb,indexv:Rb,currentSlide:Tb})},1)}function e(){dc.theme=document.querySelector("#theme"),dc.wrapper=document.querySelector(".reveal"),dc.slides=document.querySelector(".reveal .slides"),dc.slides.classList.add("no-transition"),dc.background=f(dc.wrapper,"div","backgrounds",null),dc.progress=f(dc.wrapper,"div","progress",""),dc.progressbar=dc.progress.querySelector("span"),f(dc.wrapper,"aside","controls",''),dc.slideNumber=f(dc.wrapper,"div","slide-number",""),f(dc.wrapper,"div","state-background",null),f(dc.wrapper,"div","pause-overlay",null),dc.controls=document.querySelector(".reveal .controls"),dc.controlsLeft=l(document.querySelectorAll(".navigate-left")),dc.controlsRight=l(document.querySelectorAll(".navigate-right")),dc.controlsUp=l(document.querySelectorAll(".navigate-up")),dc.controlsDown=l(document.querySelectorAll(".navigate-down")),dc.controlsPrev=l(document.querySelectorAll(".navigate-prev")),dc.controlsNext=l(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}q()&&document.body.classList.add("print-pdf"),dc.background.innerHTML="",dc.background.classList.add("no-transition"),l(document.querySelectorAll(Yb)).forEach(function(b){var c;c=q()?a(b,b):a(b,dc.background),l(b.querySelectorAll("section")).forEach(function(b){q()?a(b,b):a(b,c)})}),_b.parallaxBackgroundImage?(dc.background.style.backgroundImage='url("'+_b.parallaxBackgroundImage+'")',dc.background.style.backgroundSize=_b.parallaxBackgroundSize,setTimeout(function(){dc.wrapper.classList.add("has-parallax-background")},1)):(dc.background.style.backgroundImage="",dc.wrapper.classList.remove("has-parallax-background"))}function h(a){var b=document.querySelectorAll(Xb).length;if(dc.wrapper.classList.remove(_b.transition),"object"==typeof a&&k(_b,a),ec.transforms3d===!1&&(_b.transition="linear"),dc.wrapper.classList.add(_b.transition),dc.wrapper.setAttribute("data-transition-speed",_b.transitionSpeed),dc.wrapper.setAttribute("data-background-transition",_b.backgroundTransition),dc.controls.style.display=_b.controls?"block":"none",dc.progress.style.display=_b.progress?"block":"none",_b.rtl?dc.wrapper.classList.add("rtl"):dc.wrapper.classList.remove("rtl"),_b.center?dc.wrapper.classList.add("center"):dc.wrapper.classList.remove("center"),_b.mouseWheel?(document.addEventListener("DOMMouseScroll",Bb,!1),document.addEventListener("mousewheel",Bb,!1)):(document.removeEventListener("DOMMouseScroll",Bb,!1),document.removeEventListener("mousewheel",Bb,!1)),_b.rollingLinks?u():v(),_b.previewLinks?w():(x(),w("[data-preview-link]")),b>1&&_b.autoSlide&&_b.autoSlideStoppable&&ec.canvas&&ec.requestAnimationFrame?(Wb=new Pb(dc.wrapper,function(){return Math.min(Math.max((Date.now()-mc)/kc,0),1)}),Wb.on("click",Ob),nc=!1):Wb&&(Wb.destroy(),Wb=null),_b.theme&&dc.theme){var c=dc.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];_b.theme!==e&&(c=c.replace(d,_b.theme),dc.theme.setAttribute("href",c))}P()}function i(){if(jc=!0,window.addEventListener("hashchange",Jb,!1),window.addEventListener("resize",Kb,!1),_b.touch&&(dc.wrapper.addEventListener("touchstart",vb,!1),dc.wrapper.addEventListener("touchmove",wb,!1),dc.wrapper.addEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.addEventListener("MSPointerDown",yb,!1),dc.wrapper.addEventListener("MSPointerMove",zb,!1),dc.wrapper.addEventListener("MSPointerUp",Ab,!1))),_b.keyboard&&document.addEventListener("keydown",ub,!1),_b.progress&&dc.progress&&dc.progress.addEventListener("click",Cb,!1),_b.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Lb,!1)}["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.addEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.addEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.addEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.addEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.addEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.addEventListener(a,Ib,!1)})})}function j(){jc=!1,document.removeEventListener("keydown",ub,!1),window.removeEventListener("hashchange",Jb,!1),window.removeEventListener("resize",Kb,!1),dc.wrapper.removeEventListener("touchstart",vb,!1),dc.wrapper.removeEventListener("touchmove",wb,!1),dc.wrapper.removeEventListener("touchend",xb,!1),window.navigator.msPointerEnabled&&(dc.wrapper.removeEventListener("MSPointerDown",yb,!1),dc.wrapper.removeEventListener("MSPointerMove",zb,!1),dc.wrapper.removeEventListener("MSPointerUp",Ab,!1)),_b.progress&&dc.progress&&dc.progress.removeEventListener("click",Cb,!1),["touchstart","click"].forEach(function(a){dc.controlsLeft.forEach(function(b){b.removeEventListener(a,Db,!1)}),dc.controlsRight.forEach(function(b){b.removeEventListener(a,Eb,!1)}),dc.controlsUp.forEach(function(b){b.removeEventListener(a,Fb,!1)}),dc.controlsDown.forEach(function(b){b.removeEventListener(a,Gb,!1)}),dc.controlsPrev.forEach(function(b){b.removeEventListener(a,Hb,!1)}),dc.controlsNext.forEach(function(b){b.removeEventListener(a,Ib,!1)})})}function k(a,b){for(var c in b)a[c]=b[c]}function l(a){return Array.prototype.slice.call(a)}function m(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function n(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function o(a){var b=0;if(a){var c=0;l(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function p(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;l(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function q(){return/print-pdf/gi.test(window.location.search)}function r(){_b.hideAddressBar&&Vb&&(window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1))}function s(){setTimeout(function(){window.scrollTo(0,1)},10)}function t(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),k(c,b),dc.wrapper.dispatchEvent(c)}function u(){if(ec.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Xb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function v(){for(var a=document.querySelectorAll(Xb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function w(a){var b=l(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Nb,!1)})}function x(){var a=l(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Nb,!1)})}function y(a){z(),dc.preview=document.createElement("div"),dc.preview.classList.add("preview-link-overlay"),dc.wrapper.appendChild(dc.preview),dc.preview.innerHTML=["
",'','',"
",'
','
','',"
"].join(""),dc.preview.querySelector("iframe").addEventListener("load",function(){dc.preview.classList.add("loaded")},!1),dc.preview.querySelector(".close").addEventListener("click",function(a){z(),a.preventDefault()},!1),dc.preview.querySelector(".external").addEventListener("click",function(){z()},!1),setTimeout(function(){dc.preview.classList.add("visible")},1)}function z(){dc.preview&&(dc.preview.setAttribute("src",""),dc.preview.parentNode.removeChild(dc.preview),dc.preview=null)}function A(){if(dc.wrapper&&!q()){var a=dc.wrapper.offsetWidth,b=dc.wrapper.offsetHeight;a-=b*_b.margin,b-=b*_b.margin;var c=_b.width,d=_b.height,e=20;B(_b.width,_b.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),dc.slides.style.width=c+"px",dc.slides.style.height=d+"px",cc=Math.min(a/c,b/d),cc=Math.max(cc,_b.minScale),cc=Math.min(cc,_b.maxScale),"undefined"==typeof dc.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?n(dc.slides,"translate(-50%, -50%) scale("+cc+") translate(50%, 50%)"):dc.slides.style.zoom=cc;for(var f=l(document.querySelectorAll(Xb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=_b.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(o(i)/2)-e,-d/2)+"px":"")}U(),Y()}}function B(a,b,c){l(dc.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=p(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function C(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function D(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function E(){if(_b.overview){kb();var a=dc.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;dc.wrapper.classList.add("overview"),dc.wrapper.classList.remove("overview-deactivating"),clearTimeout(hc),clearTimeout(ic),hc=setTimeout(function(){for(var c=document.querySelectorAll(Yb),d=0,e=c.length;e>d;d++){var f=c[d],g=_b.rtl?-105:105;if(f.setAttribute("data-index-h",d),n(f,"translateZ(-"+b+"px) translate("+(d-Qb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Qb?Rb:D(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),n(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Mb,!0)}else f.addEventListener("click",Mb,!0)}T(),A(),a||t("overviewshown",{indexh:Qb,indexv:Rb,currentSlide:Tb})},10)}}function F(){_b.overview&&(clearTimeout(hc),clearTimeout(ic),dc.wrapper.classList.remove("overview"),dc.wrapper.classList.add("overview-deactivating"),ic=setTimeout(function(){dc.wrapper.classList.remove("overview-deactivating")},1),l(document.querySelectorAll(Xb)).forEach(function(a){n(a,""),a.removeEventListener("click",Mb,!0)}),O(Qb,Rb),jb(),t("overviewhidden",{indexh:Qb,indexv:Rb,currentSlide:Tb}))}function G(a){"boolean"==typeof a?a?E():F():H()?F():E()}function H(){return dc.wrapper.classList.contains("overview")}function I(a){return a=a?a:Tb,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function J(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function K(){var a=dc.wrapper.classList.contains("paused");kb(),dc.wrapper.classList.add("paused"),a===!1&&t("paused")}function L(){var a=dc.wrapper.classList.contains("paused");dc.wrapper.classList.remove("paused"),jb(),a&&t("resumed")}function M(){N()?L():K()}function N(){return dc.wrapper.classList.contains("paused")}function O(a,b,c,d){Sb=Tb;var e=document.querySelectorAll(Yb);void 0===b&&(b=D(e[a])),Sb&&Sb.parentNode&&Sb.parentNode.classList.contains("stack")&&C(Sb.parentNode,Rb);var f=bc.concat();bc.length=0;var g=Qb||0,h=Rb||0;Qb=S(Yb,void 0===a?Qb:a),Rb=S(Zb,void 0===b?Rb:b),T(),A();a:for(var i=0,j=bc.length;j>i;i++){for(var k=0;k0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"))})})}function R(){var a=l(document.querySelectorAll(Yb));a.forEach(function(a){var b=l(a.querySelectorAll("section"));b.forEach(function(a){fb(a.querySelectorAll(".fragment"))}),0===b.length&&fb(a.querySelectorAll(".fragment"))})}function S(a,b){var c=l(document.querySelectorAll(a)),d=c.length;if(d){_b.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=_b.rtl&&!I(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),b>e){f.classList.add(g?"future":"past");for(var h=l(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=l(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden");var m=c[b].getAttribute("data-state");m&&(bc=bc.concat(m.split(" ")))}else b=0;return b}function T(){var a,b,c=l(document.querySelectorAll(Yb)),d=c.length;if(d){var e=H()?10:_b.viewDistance;Vb&&(e=H()?6:1);for(var f=0;d>f;f++){var g=c[f],h=l(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Qb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=D(g),k=0;i>k;k++){var m=h[k];b=Math.abs(f===Qb?Rb-k:k-j),m.style.display=a+b>e?"none":"block"}}}}function U(){if(_b.progress&&dc.progress){var a=l(document.querySelectorAll(Yb)),b=document.querySelectorAll(Xb+":not(.stack)").length,c=0;a:for(var d=0;d0&&(a+=" - "+Rb),dc.slideNumber.innerHTML=a}}function W(){var a=Z(),b=$();dc.controlsLeft.concat(dc.controlsRight).concat(dc.controlsUp).concat(dc.controlsDown).concat(dc.controlsPrev).concat(dc.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&dc.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&dc.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&dc.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&dc.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&dc.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&dc.controlsNext.forEach(function(a){a.classList.add("enabled")}),Tb&&(b.prev&&dc.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),I(Tb)?(b.prev&&dc.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&dc.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&dc.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function X(a){var b=null,c=_b.rtl?"future":"past",d=_b.rtl?"past":"future";if(l(dc.background.childNodes).forEach(function(e,f){Qb>f?e.className="slide-background "+c:f>Qb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Qb)&&l(e.childNodes).forEach(function(a,c){Rb>c?a.className="slide-background past":c>Rb?a.className="slide-background future":(a.className="slide-background present",f===Qb&&(b=a))})}),b){var e=Ub?Ub.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Ub&&dc.background.classList.add("no-transition"),Ub=b}setTimeout(function(){dc.background.classList.remove("no-transition")},1)}function Y(){if(_b.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Yb),d=document.querySelectorAll(Zb),e=dc.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=dc.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Qb,i=dc.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Rb:0;dc.background.style.backgroundPosition=h+"px "+k+"px"}}function Z(){var a=document.querySelectorAll(Yb),b=document.querySelectorAll(Zb),c={left:Qb>0||_b.loop,right:Qb0,down:Rb0,next:!!b.length}}return{prev:!1,next:!1}}function _(a){a&&!bb()&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function ab(a){a&&(l(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),l(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),l(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function bb(){return!!window.location.search.match(/receiver/gi)}function cb(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);O(e.h,e.v)}else O(Qb||0,Rb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Qb||g!==Rb)&&O(f,g)}}function db(a){if(_b.history)if(clearTimeout(gc),"number"==typeof a)gc=setTimeout(db,a);else{var b="/";Tb&&"string"==typeof Tb.getAttribute("id")?b="/"+Tb.getAttribute("id"):((Qb>0||Rb>0)&&(b+=Qb),Rb>0&&(b+="/"+Rb)),window.location.hash=b}}function eb(a){var b,c=Qb,d=Rb;if(a){var e=I(a),f=e?a.parentNode:a,g=l(document.querySelectorAll(Yb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(l(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Tb){var h=Tb.querySelectorAll(".fragment").length>0;if(h){var i=Tb.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function fb(a){a=l(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function gb(a,b){if(Tb&&_b.fragments){var c=fb(Tb.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=fb(Tb.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return l(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&t("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&t("fragmentshown",{fragment:e[0],fragments:e}),W(),!(!e.length&&!f.length)}}return!1}function hb(){return gb(null,1)}function ib(){return gb(null,-1)}function jb(){if(kb(),Tb){var a=Tb.parentNode?Tb.parentNode.getAttribute("data-autoslide"):null,b=Tb.getAttribute("data-autoslide");kc=b?parseInt(b,10):a?parseInt(a,10):_b.autoSlide,l(Tb.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&kc&&1e3*a.duration>kc&&(kc=1e3*a.duration+1e3)}),!kc||nc||N()||H()||Reveal.isLastSlide()&&_b.loop!==!0||(lc=setTimeout(sb,kc),mc=Date.now()),Wb&&Wb.setPlaying(-1!==lc)}}function kb(){clearTimeout(lc),lc=-1}function lb(){nc=!0,clearTimeout(lc),Wb&&Wb.setPlaying(!1)}function mb(){nc=!1,jb()}function nb(){_b.rtl?(H()||hb()===!1)&&Z().left&&O(Qb+1):(H()||ib()===!1)&&Z().left&&O(Qb-1)}function ob(){_b.rtl?(H()||ib()===!1)&&Z().right&&O(Qb-1):(H()||hb()===!1)&&Z().right&&O(Qb+1)}function pb(){(H()||ib()===!1)&&Z().up&&O(Qb,Rb-1)}function qb(){(H()||hb()===!1)&&Z().down&&O(Qb,Rb+1)}function rb(){if(ib()===!1)if(Z().up)pb();else{var a=document.querySelector(Yb+".past:nth-child("+Qb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Qb-1;O(c,b)}}}function sb(){hb()===!1&&(Z().down?qb():ob()),jb()}function tb(){_b.autoSlideStoppable&&lb()}function ub(a){tb(a);var b=(document.activeElement,!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable));if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){var c=[66,190,191].concat(Object.keys(_b.keyboard).map(function(a){return"togglePause"===_b.keyboard[a]?parseInt(a,10):void 0}));if(N()&&-1===c.indexOf(a.keyCode))return!1;var d=!1;if("object"==typeof _b.keyboard)for(var e in _b.keyboard)if(parseInt(e,10)===a.keyCode){var f=_b.keyboard[e];"function"==typeof f?f.apply(null,[a]):"string"==typeof f&&"function"==typeof Reveal[f]&&Reveal[f].call(),d=!0}if(d===!1)switch(d=!0,a.keyCode){case 80:case 33:rb();break;case 78:case 34:sb();break;case 72:case 37:nb();break;case 76:case 39:ob();break;case 75:case 38:pb();break;case 74:case 40:qb();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:H()?F():a.shiftKey?rb():sb();break;case 13:H()?F():d=!1;break;case 66:case 190:case 191:M();break;case 70:J();break;default:d=!1}d?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!ec.transforms3d||(dc.preview?z():G(),a.preventDefault()),jb()}}function vb(a){oc.startX=a.touches[0].clientX,oc.startY=a.touches[0].clientY,oc.startCount=a.touches.length,2===a.touches.length&&_b.overview&&(oc.startSpan=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY}))}function wb(a){if(oc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{tb(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===oc.startCount&&_b.overview){var d=m({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:oc.startX,y:oc.startY});Math.abs(oc.startSpan-d)>oc.threshold&&(oc.captured=!0,doc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,nb()):e<-oc.threshold&&Math.abs(e)>Math.abs(f)?(oc.captured=!0,ob()):f>oc.threshold?(oc.captured=!0,pb()):f<-oc.threshold&&(oc.captured=!0,qb()),_b.embedded?(oc.captured||I(Tb))&&a.preventDefault():a.preventDefault()}}}function xb(){oc.captured=!1}function yb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],vb(a))}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){if(Date.now()-fc>600){fc=Date.now();var b=a.detail||-a.wheelDelta;b>0?sb():rb()}}function Cb(a){tb(a),a.preventDefault();var b=l(document.querySelectorAll(Yb)).length,c=Math.floor(a.clientX/dc.wrapper.offsetWidth*b);O(c)}function Db(a){a.preventDefault(),tb(),nb()}function Eb(a){a.preventDefault(),tb(),ob()}function Fb(a){a.preventDefault(),tb(),pb()}function Gb(a){a.preventDefault(),tb(),qb()}function Hb(a){a.preventDefault(),tb(),rb()}function Ib(a){a.preventDefault(),tb(),sb()}function Jb(){cb()}function Kb(){A()}function Lb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Mb(a){if(jc&&H()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(F(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);O(c,d)}}}function Nb(a){var b=a.target.getAttribute("href");b&&(y(b),a.preventDefault())}function Ob(){Reveal.isLastSlide()&&_b.loop===!1?(O(0,0),mb()):nc?mb():lb()}function Pb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb=".reveal .slides section",Yb=".reveal .slides>section",Zb=".reveal .slides>section.present>section",$b=".reveal .slides>section:first-of-type",_b={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},ac=!1,bc=[],cc=1,dc={},ec={},fc=0,gc=0,hc=0,ic=0,jc=!1,kc=0,lc=0,mc=-1,nc=!1,oc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Pb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Pb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&ec.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Pb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+2*a*Math.PI,g=-Math.PI/2+2*this.progressOffset*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Pb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Pb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Pb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:h,sync:P,slide:O,left:nb,right:ob,up:pb,down:qb,prev:rb,next:sb,navigateFragment:gb,prevFragment:ib,nextFragment:hb,navigateTo:O,navigateLeft:nb,navigateRight:ob,navigateUp:pb,navigateDown:qb,navigatePrev:rb,navigateNext:sb,layout:A,availableRoutes:Z,availableFragments:$,toggleOverview:G,togglePause:M,isOverview:H,isPaused:N,addEventListeners:i,removeEventListeners:j,getIndices:eb,getSlide:function(a,b){var c=document.querySelectorAll(Yb)[a],d=c&&c.querySelectorAll("section"); return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Sb},getCurrentSlide:function(){return Tb},getScale:function(){return cc},getConfig:function(){return _b},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Xb+".past")?!0:!1},isLastSlide:function(){return Tb?Tb.nextElementSibling?!1:I(Tb)&&Tb.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ac},addEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(dc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}(); \ No newline at end of file -- cgit v1.2.3 From 213c8d13541f3ac4c68098a6528d1bdcc716ab32 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 28 Jun 2014 12:58:33 +0200 Subject: fix double-navigation on touch for some android systems --- js/reveal.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index edf3073..270bf63 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -291,6 +291,8 @@ features.canvas = !!document.createElement( 'canvas' ).getContext; + features.touch = !!( 'ontouchstart' in window ); + isMobileDevice = navigator.userAgent.match( /(iphone|ipod|ipad|android)/gi ); } @@ -907,14 +909,13 @@ } } - [ 'touchstart', 'click' ].forEach( function( eventName ) { - dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } ); - dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } ); - dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } ); - dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } ); - dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } ); - dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } ); - } ); + var eventName = features.touch ? 'touchstart' : 'click'; + dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } ); + dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } ); + dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } ); + dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } ); + dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } ); + dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } ); } @@ -2604,7 +2605,6 @@ // Vimeo embeds toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { if( el.hasAttribute( 'data-autoplay' ) ) { - console.log(11); el.contentWindow.postMessage( '{"method":"play"}', '*' ); } }); -- cgit v1.2.3 From 57844ad827523be8ca8992837a5a591c472d77a7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 6 Jul 2014 14:31:10 +0200 Subject: listen for touch + click on all devices except android --- js/reveal.js | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 270bf63..b4065d6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -909,13 +909,24 @@ } } - var eventName = features.touch ? 'touchstart' : 'click'; - dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } ); - dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } ); - dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } ); - dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } ); - dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } ); - dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } ); + // Listen to both touch and click events, in case the device + // supports both + var pointerEvents = [ 'touchstart', 'click' ]; + + // Only support touch for Android, fixes double navigations in + // stock browser + if( navigator.userAgent.match( /android/gi ) ) { + pointerEvents = [ 'touchstart' ]; + } + + pointerEvents.forEach( function( eventName ) { + dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } ); + dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } ); + dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } ); + dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } ); + dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } ); + dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } ); + } ); } -- cgit v1.2.3 From 80c375fae85d5b1edc2656641e03942739daa28b Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 12 Aug 2014 16:01:27 +0200 Subject: the paused mode can now be disabled via the 'pause' config option --- js/reveal.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index b4065d6..8110afc 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -89,6 +89,9 @@ // key is pressed help: true, + // Flags if it should be possible to pause the presentation (blackout) + pause: true, + // Number of milliseconds between automatically proceeding to the // next slide, disabled when set to 0, this value can be overwritten // by using a data-autoslide attribute on your slides @@ -786,6 +789,11 @@ dom.wrapper.classList.remove( 'center' ); } + // Exit the paused mode if it was configured off + if( config.pause === false ) { + resume(); + } + if( config.mouseWheel ) { document.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF document.addEventListener( 'mousewheel', onDocumentMouseScroll, false ); @@ -1717,13 +1725,15 @@ */ function pause() { - var wasPaused = dom.wrapper.classList.contains( 'paused' ); + if( config.pause ) { + var wasPaused = dom.wrapper.classList.contains( 'paused' ); - cancelAutoSlide(); - dom.wrapper.classList.add( 'paused' ); + cancelAutoSlide(); + dom.wrapper.classList.add( 'paused' ); - if( wasPaused === false ) { - dispatchEvent( 'paused' ); + if( wasPaused === false ) { + dispatchEvent( 'paused' ); + } } } -- cgit v1.2.3 From 2cd988a7a347ddad39b4315b2f63e7c1105ecd19 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 4 Sep 2014 18:00:21 +0200 Subject: fix previewLinks target --- js/reveal.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 8110afc..25f0dcf 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3778,10 +3778,12 @@ */ function onPreviewLinkClicked( event ) { - var url = event.target.getAttribute( 'href' ); - if( url ) { - showPreview( url ); - event.preventDefault(); + if( event.currentTarget && event.currentTarget.hasAttribute( 'href' ) ) { + var url = event.currentTarget.getAttribute( 'href' ); + if( url ) { + showPreview( url ); + event.preventDefault(); + } } } -- cgit v1.2.3 From cbef64b860e75e010a383543de3c5f478fc4227a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 6 Sep 2014 08:20:38 +0200 Subject: fix current fragment index check when multiple fragments have same index --- js/reveal.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 25f0dcf..e756110 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2871,8 +2871,13 @@ if( !slide && currentSlide ) { var hasFragments = currentSlide.querySelectorAll( '.fragment' ).length > 0; if( hasFragments ) { - var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' ); - f = visibleFragments.length - 1; + var currentFragment = currentSlide.querySelector( '.current-fragment' ); + if( currentFragment && currentFragment.hasAttribute( 'data-fragment-index' ) ) { + f = parseInt( currentFragment.getAttribute( 'data-fragment-index' ), 10 ); + } + else { + f = currentSlide.querySelectorAll( '.fragment.visible' ).length - 1; + } } } -- cgit v1.2.3 From 8a50a46665b699236920dd7f0aca74beb3fb0077 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 9 Sep 2014 16:14:24 +0200 Subject: util methods for calculating color brightness --- js/reveal.js | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index e756110..f92eca9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -714,6 +714,10 @@ if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); + if( data.backgroundColor ) { + + } + container.appendChild( element ); return element; @@ -1065,6 +1069,63 @@ } + /** + * Measures the distance in pixels between point a and point b. + * + * @param {String} color The string representation of a color, + * the following formats are supported: + * - #000 + * - #000000 + * - rgb(0,0,0) + */ + function colorToRgb( color ) { + + var hex3 = color.match( /^#([0-9a-f]{3})$/i ); + if( hex3 && hex3[1] ) { + hex3 = hex3[1]; + return { + r: parseInt( hex3.charAt( 0 ), 16 ) * 0x11, + g: parseInt( hex3.charAt( 1 ), 16 ) * 0x11, + b: parseInt( hex3.charAt( 2 ), 16 ) * 0x11 + }; + } + + var hex6 = color.match( /^#([0-9a-f]{6})$/i ); + if( hex6 && hex6[1] ) { + hex6 = hex6[1]; + return { + r: parseInt( hex6.substr( 0, 2 ), 16 ), + g: parseInt( hex6.substr( 2, 2 ), 16 ), + b: parseInt( hex6.substr( 4, 2 ), 16 ) + }; + } + + var rgb = color.match( /^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i ); + if( rgb ) { + return { + r: rgb[1], + g: rgb[2], + b: rgb[3] + }; + } + + return null; + + } + + /** + * Calculates brightness on a scale of 0-255. + * + * @param color See colorStringToRgb for supported formats. + */ + function colorBrightness( color ) { + + if( typeof color === 'string' ) color = colorToRgb( color ); + + return ( color.r * 299 + color.g * 587 + color.b * 114 ) / 1000; + + } + /** * Retrieves the height of the given element by looking * at the position and height of its immediate children. @@ -4039,6 +4100,9 @@ addEventListeners: addEventListeners, removeEventListeners: removeEventListeners, + colorToRgb: colorToRgb, + colorBrightness: colorBrightness, + // Facility for persisting and restoring the presentation state getState: getState, setState: setState, -- cgit v1.2.3 From 20e72df4bf3f284604e15c6384983055b3641baa Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 9 Sep 2014 16:50:23 +0200 Subject: add is-background-light class to slides/backgrounds that are > 128 brightness --- js/reveal.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index f92eca9..df4e8a0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -714,8 +714,11 @@ if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); - if( data.backgroundColor ) { - + // If this slide has a background color, add a class that + // signals if it is light + if( element.style.backgroundColor && colorBrightness( element.style.backgroundColor ) > 128 ) { + slide.classList.add( 'is-background-light' ); + element.classList.add( 'is-background-light' ); } container.appendChild( element ); @@ -1122,7 +1125,11 @@ if( typeof color === 'string' ) color = colorToRgb( color ); - return ( color.r * 299 + color.g * 587 + color.b * 114 ) / 1000; + if( color ) { + return ( color.r * 299 + color.g * 587 + color.b * 114 ) / 1000; + } + + return null; } @@ -4100,9 +4107,6 @@ addEventListeners: addEventListeners, removeEventListeners: removeEventListeners, - colorToRgb: colorToRgb, - colorBrightness: colorBrightness, - // Facility for persisting and restoring the presentation state getState: getState, setState: setState, -- cgit v1.2.3 From 9fb0c5f3d3df1b207c444114a3ea0a6dc909cde4 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 9 Sep 2014 17:18:15 +0200 Subject: use computed style when calculating bg birghtness --- js/reveal.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index df4e8a0..24093e4 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -714,15 +714,16 @@ if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); + container.appendChild( element ); + // If this slide has a background color, add a class that // signals if it is light - if( element.style.backgroundColor && colorBrightness( element.style.backgroundColor ) > 128 ) { + var computedBackgroundColor = window.getComputedStyle( element ).backgroundColor; + if( computedBackgroundColor && colorBrightness( computedBackgroundColor ) > 128 ) { slide.classList.add( 'is-background-light' ); element.classList.add( 'is-background-light' ); } - container.appendChild( element ); - return element; } -- cgit v1.2.3 From 2479883d3cdec0a810f95e4fe80696877e5ae227 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 9 Sep 2014 17:33:52 +0200 Subject: is-light-background -> has-light-background, doesn't apply to background itself --- js/reveal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 24093e4..ca0dde6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -720,8 +720,7 @@ // signals if it is light var computedBackgroundColor = window.getComputedStyle( element ).backgroundColor; if( computedBackgroundColor && colorBrightness( computedBackgroundColor ) > 128 ) { - slide.classList.add( 'is-background-light' ); - element.classList.add( 'is-background-light' ); + slide.classList.add( 'has-light-background' ); } return element; -- cgit v1.2.3 From bc2974fef879a273fa5600b9b2e7d1481ebe8afd Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 9 Sep 2014 17:51:36 +0200 Subject: bubble has-light-background to .reveal container --- js/reveal.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ca0dde6..81c100c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2463,6 +2463,15 @@ } + // If the slide has a light background, bubble that up as a + // class to .reveal container + if( currentSlide && currentSlide.classList.contains( 'has-light-background' ) ) { + dom.wrapper.classList.add( 'has-light-background' ); + } + else { + dom.wrapper.classList.remove( 'has-light-background' ); + } + // Allow the first background to apply without transition setTimeout( function() { dom.background.classList.remove( 'no-transition' ); -- cgit v1.2.3 From 41f20301b6a634003ed89f222f5fe1995ca29ce5 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 10 Sep 2014 10:12:25 +0200 Subject: has-dark-background --- js/reveal.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 81c100c..7cc551c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -717,10 +717,16 @@ container.appendChild( element ); // If this slide has a background color, add a class that - // signals if it is light + // signals if it is light or dark. If the slide has no background + // color, no class will be set var computedBackgroundColor = window.getComputedStyle( element ).backgroundColor; - if( computedBackgroundColor && colorBrightness( computedBackgroundColor ) > 128 ) { - slide.classList.add( 'has-light-background' ); + if( computedBackgroundColor ) { + if( colorBrightness( computedBackgroundColor ) < 128 ) { + slide.classList.add( 'has-dark-background' ); + } + else { + slide.classList.add( 'has-light-background' ); + } } return element; @@ -2463,13 +2469,17 @@ } - // If the slide has a light background, bubble that up as a - // class to .reveal container - if( currentSlide && currentSlide.classList.contains( 'has-light-background' ) ) { - dom.wrapper.classList.add( 'has-light-background' ); - } - else { - dom.wrapper.classList.remove( 'has-light-background' ); + // If there's a background brightness flag for this slide, + // bubble it to the .reveal container + if( currentSlide ) { + [ 'has-light-background', 'has-dark-background' ].forEach( function( classToBubble ) { + if( currentSlide.classList.contains( classToBubble ) ) { + dom.wrapper.classList.add( classToBubble ); + } + else { + dom.wrapper.classList.remove( classToBubble ); + } + } ); } // Allow the first background to apply without transition -- cgit v1.2.3 From 0d14d87f1a039584eaa5c9720b30b154e6b2e10e Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 10 Sep 2014 10:53:24 +0200 Subject: rgba color parsing support, ignore brightness of transparent colors --- js/reveal.js | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 7cc551c..3cc1cae 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -721,11 +721,18 @@ // color, no class will be set var computedBackgroundColor = window.getComputedStyle( element ).backgroundColor; if( computedBackgroundColor ) { - if( colorBrightness( computedBackgroundColor ) < 128 ) { - slide.classList.add( 'has-dark-background' ); - } - else { - slide.classList.add( 'has-light-background' ); + var rgb = colorToRgb( computedBackgroundColor ); + + // Ignore fully transparent backgrounds. Some browsers return + // rgba(0,0,0,0) when reading the computed background color of + // an element with no background + if( rgb && rgb.a !== 0 ) { + if( colorBrightness( computedBackgroundColor ) < 128 ) { + slide.classList.add( 'has-dark-background' ); + } + else { + slide.classList.add( 'has-light-background' ); + } } } @@ -1112,9 +1119,19 @@ var rgb = color.match( /^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i ); if( rgb ) { return { - r: rgb[1], - g: rgb[2], - b: rgb[3] + r: parseInt( rgb[1], 10 ), + g: parseInt( rgb[2], 10 ), + b: parseInt( rgb[3], 10 ) + }; + } + + var rgba = color.match( /^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i ); + if( rgba ) { + return { + r: parseInt( rgba[1], 10 ), + g: parseInt( rgba[2], 10 ), + b: parseInt( rgba[3], 10 ), + a: parseFloat( rgba[4] ) }; } -- cgit v1.2.3 From 03c3031cb4de22f2cd8070547c2bb8085d435c69 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 10 Sep 2014 11:28:29 +0200 Subject: cleanup classes when backgrounds are synced --- js/reveal.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3cc1cae..a0b92ac 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -716,6 +716,10 @@ container.appendChild( element ); + // If backgrounds are being recreated, clear old classes + slide.classList.remove( 'has-dark-background' ); + slide.classList.remove( 'has-light-background' ); + // If this slide has a background color, add a class that // signals if it is light or dark. If the slide has no background // color, no class will be set -- cgit v1.2.3 From 490ae90de40b87509b260e44dae4104ac54f8b28 Mon Sep 17 00:00:00 2001 From: lutangar Date: Thu, 9 Oct 2014 12:34:10 +0200 Subject: add support for iframe backgrounds --- js/reveal.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a0b92ac..0c339f5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -672,6 +672,7 @@ backgroundSize: slide.getAttribute( 'data-background-size' ), backgroundImage: slide.getAttribute( 'data-background-image' ), backgroundVideo: slide.getAttribute( 'data-background-video' ), + backgroundIframe: slide.getAttribute( 'data-background-iframe' ), backgroundColor: slide.getAttribute( 'data-background-color' ), backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), backgroundPosition: slide.getAttribute( 'data-background-position' ), @@ -696,11 +697,12 @@ // Create a hash for this combination of background settings. // This is used to determine when two slide backgrounds are // the same. - if( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo ) { + if( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) { element.setAttribute( 'data-background-hash', data.background + data.backgroundSize + data.backgroundImage + data.backgroundVideo + + data.backgroundIframe + data.backgroundColor + data.backgroundRepeat + data.backgroundPosition + @@ -1875,7 +1877,7 @@ /** * Toggles the auto slide mode on and off. * - * @param {Boolean} override Optional flag which sets the desired state. + * @param {Boolean} override Optional flag which sets the desired state. * True means autoplay starts, false means it stops. */ @@ -2591,7 +2593,8 @@ background.setAttribute( 'data-loaded', 'true' ); var backgroundImage = slide.getAttribute( 'data-background-image' ), - backgroundVideo = slide.getAttribute( 'data-background-video' ); + backgroundVideo = slide.getAttribute( 'data-background-video' ), + backgroundIframe = slide.getAttribute( 'data-background-iframe' ); // Images if( backgroundImage ) { @@ -2608,6 +2611,17 @@ background.appendChild( video ); } + // Iframes + else if ( backgroundIframe ) { + var iframe = document.createElement( 'iframe' ); + iframe.setAttribute('src', backgroundIframe); + iframe.style.width = '100%'; + iframe.style.height = '100%'; + iframe.style.maxHeight = '100%'; + iframe.style.maxWidth = '100%'; + + background.appendChild( iframe ); + } } } -- cgit v1.2.3 From ccdb4ff248c9883c3f2e922e243ec426a918bfcb Mon Sep 17 00:00:00 2001 From: Ira Abramov Date: Sat, 11 Oct 2014 18:59:36 +0300 Subject: Fix RTL Navigation with space bar --- js/reveal.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a0b92ac..52cc615 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3432,6 +3432,9 @@ if( previousSlide ) { var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined; var h = indexh - 1; + if( config.rtl ) { + h = indexh + 1; + } slide( h, v ); } } @@ -3446,7 +3449,11 @@ // Prioritize revealing fragments if( nextFragment() === false ) { - availableRoutes().down ? navigateDown() : navigateRight(); + if( config.rtl ) { + availableRoutes().down ? navigateDown() : navigateLeft(); + } else { + availableRoutes().down ? navigateDown() : navigateRight(); + } } // If auto-sliding is enabled we need to cue up -- cgit v1.2.3 From 136d27936141586ddd16e78a3bfa44f2ea2f25fb Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 16 Oct 2014 13:27:58 +0200 Subject: continue auto-sliding through fragments on last slide #974 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a0b92ac..ef52ac6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3317,7 +3317,7 @@ // - The presentation isn't paused // - The overview isn't active // - The presentation isn't over - if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || config.loop === true ) ) { + if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || availableFragments().next || config.loop === true ) ) { autoSlideTimeout = setTimeout( navigateNext, autoSlide ); autoSlideStartTime = Date.now(); } -- cgit v1.2.3 From 82342672ea09ed46580b25bd2d137f056d5faaa0 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 16 Oct 2014 16:17:41 +0200 Subject: fix navigatePrev in rtl mode #1030 --- js/reveal.js | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 4b1fbc8..1b7e432 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3426,10 +3426,20 @@ navigateUp(); } else { + // Fetch the previous horizontal slide, if there is one + var previousSlide; + if( config.rtl ) { - navigateRight(); - } else { - navigateLeft(); + previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.future' ) ).pop(); + } + else { + previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.past' ) ).pop(); + } + + if( previousSlide ) { + var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined; + var h = indexh - 1; + slide( h, v ); } } } @@ -3437,16 +3447,20 @@ } /** - * Same as #navigatePrev() but navigates forwards. + * The reverse of #navigatePrev(). */ function navigateNext() { // Prioritize revealing fragments if( nextFragment() === false ) { - if( config.rtl ) { - availableRoutes().down ? navigateDown() : navigateLeft(); - } else { - availableRoutes().down ? navigateDown() : navigateRight(); + if( availableRoutes().down ) { + navigateDown(); + } + else if( config.rtl ) { + navigateLeft(); + } + else { + navigateRight(); } } -- cgit v1.2.3 From 16f9e95d87b1a5cede29490d9a1822fce5769ffe Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 17 Oct 2014 08:52:38 +0200 Subject: update slide bg example presentation to include iframes and videos #1029 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index d5d9cbf..9ea61db 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2614,7 +2614,7 @@ // Iframes else if ( backgroundIframe ) { var iframe = document.createElement( 'iframe' ); - iframe.setAttribute('src', backgroundIframe); + iframe.setAttribute( 'src', backgroundIframe ); iframe.style.width = '100%'; iframe.style.height = '100%'; iframe.style.maxHeight = '100%'; -- cgit v1.2.3 From 82a692c394e894d603590789ab92893807ed71b7 Mon Sep 17 00:00:00 2001 From: Jaan Pullerits Date: Fri, 24 Oct 2014 12:35:49 +0000 Subject: Do not add video backgrounds to speaker notes. --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 9ea61db..6605505 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2601,7 +2601,7 @@ background.style.backgroundImage = 'url('+ backgroundImage +')'; } // Videos - else if ( backgroundVideo ) { + else if ( backgroundVideo && !isSpeakerNotes() ) { var video = document.createElement( 'video' ); // Support comma separated lists of video sources -- cgit v1.2.3 From d84233df98e92b08004d427da2ec9c0887ac4fef Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 5 Nov 2014 12:28:09 +0100 Subject: default to slide transitions --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 6605505..fd651e1 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -125,13 +125,13 @@ theme: null, // Transition style - transition: 'default', // none/fade/slide/convex/concave/zoom + transition: 'slide', // none/fade/slide/convex/concave/zoom // Transition speed transitionSpeed: 'default', // default/fast/slow // Transition style for full page slide backgrounds - backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom + backgroundTransition: 'slide', // none/fade/slide/convex/concave/zoom // Parallax background image parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg" -- cgit v1.2.3 From 96b1ee9c39cc3dbffb704b34215775c91ce402c8 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 5 Nov 2014 19:28:09 +0100 Subject: ignore calculating scale if only possible outcome is 1 --- js/reveal.js | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index fd651e1..312d5d1 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -125,13 +125,13 @@ theme: null, // Transition style - transition: 'slide', // none/fade/slide/convex/concave/zoom + transition: 'default', // none/fade/slide/convex/concave/zoom // Transition speed transitionSpeed: 'default', // default/fast/slow // Transition style for full page slide backgrounds - backgroundTransition: 'slide', // none/fade/slide/convex/concave/zoom + backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom // Parallax background image parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg" @@ -1469,24 +1469,28 @@ dom.slides.style.width = size.width + 'px'; dom.slides.style.height = size.height + 'px'; - // Determine scale of content to fit within available space - scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); + // No point in calculating scale if the only possible + // result is 1 + if( config.minScale !== 1 || config.maxScale !== 1 ) { + // Determine scale of content to fit within available space + scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); - // Respect max/min scale settings - scale = Math.max( scale, config.minScale ); - scale = Math.min( scale, config.maxScale ); + // Respect max/min scale settings + scale = Math.max( scale, config.minScale ); + scale = Math.min( scale, config.maxScale ); - // Prefer zooming in desktop Chrome so that content remains crisp - if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { - dom.slides.style.zoom = scale; - } - // Apply scale transform as a fallback - else { - dom.slides.style.left = '50%'; - dom.slides.style.top = '50%'; - dom.slides.style.bottom = 'auto'; - dom.slides.style.right = 'auto'; - transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' ); + // Prefer zooming in desktop Chrome so that content remains crisp + if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { + dom.slides.style.zoom = scale; + } + // Apply scale transform as a fallback + else { + dom.slides.style.left = '50%'; + dom.slides.style.top = '50%'; + dom.slides.style.bottom = 'auto'; + dom.slides.style.right = 'auto'; + transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' ); + } } // Select all slides, vertical and horizontal -- cgit v1.2.3 From 54e44ef4e20029da95bd34e26fd640f4b7ed5809 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 6 Nov 2014 19:19:14 +0100 Subject: add missing condition for recalculating scale --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 312d5d1..a6bd81a 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1471,7 +1471,7 @@ // No point in calculating scale if the only possible // result is 1 - if( config.minScale !== 1 || config.maxScale !== 1 ) { + if( scale !== -1 || config.minScale !== 1 || config.maxScale !== 1 ) { // Determine scale of content to fit within available space scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); -- cgit v1.2.3 From 8c76f85e34564e8fa2d38f2c2424ed4edc6d6c74 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 8 Nov 2014 09:06:17 +0100 Subject: reorder scale condition; if calculated scale is exactly 1 don't apply any scale styles --- js/reveal.js | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a6bd81a..ef3471c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1469,16 +1469,23 @@ dom.slides.style.width = size.width + 'px'; dom.slides.style.height = size.height + 'px'; - // No point in calculating scale if the only possible - // result is 1 - if( scale !== -1 || config.minScale !== 1 || config.maxScale !== 1 ) { - // Determine scale of content to fit within available space - scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); - - // Respect max/min scale settings - scale = Math.max( scale, config.minScale ); - scale = Math.min( scale, config.maxScale ); - + // Determine scale of content to fit within available space + scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); + + // Respect max/min scale settings + scale = Math.max( scale, config.minScale ); + scale = Math.min( scale, config.maxScale ); + + // Don't apply any scaling styles if scale is 1 + if( scale === 1 ) { + dom.slides.style.zoom = ''; + dom.slides.style.left = ''; + dom.slides.style.top = ''; + dom.slides.style.bottom = ''; + dom.slides.style.right = ''; + transformElement( dom.slides, '' ); + } + else { // Prefer zooming in desktop Chrome so that content remains crisp if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; -- cgit v1.2.3 From 05403bcf16e44863e97af776cc566e75f570eef7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 10 Dec 2014 18:18:57 +0100 Subject: first revision of new default theme #1018 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ef3471c..9681694 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -43,7 +43,7 @@ // Bounds for smallest/largest possible scale to apply to content minScale: 0.2, - maxScale: 1.0, + maxScale: 1.5, // Display controls in the bottom right corner controls: true, -- cgit v1.2.3 From 7c03d6018617a3430ae10fd855467175ad17c096 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 18 Dec 2014 17:45:51 +0100 Subject: remove theme config option #1061 --- js/reveal.js | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 9681694..5690a27 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -121,9 +121,6 @@ // Focuses body when page changes visiblity to ensure keyboard shortcuts work focusBodyOnPageVisibilityChange: true, - // Theme (see /css/theme) - theme: null, - // Transition style transition: 'default', // none/fade/slide/convex/concave/zoom @@ -870,18 +867,6 @@ } ); } - // Load the theme in the config, if it's not already loaded - if( config.theme && dom.theme ) { - var themeURL = dom.theme.getAttribute( 'href' ); - var themeFinder = /[^\/]*?(?=\.css)/; - var themeName = themeURL.match(themeFinder)[0]; - - if( config.theme !== themeName ) { - themeURL = themeURL.replace(themeFinder, config.theme); - dom.theme.setAttribute( 'href', themeURL ); - } - } - sync(); } -- cgit v1.2.3 From abf402d044948893d77194988ca6504661e7f3df Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 27 Dec 2014 21:16:54 +0100 Subject: change transition defaults --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5690a27..c8aa84a 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -122,13 +122,13 @@ focusBodyOnPageVisibilityChange: true, // Transition style - transition: 'default', // none/fade/slide/convex/concave/zoom + transition: 'slide', // none/fade/slide/convex/concave/zoom // Transition speed transitionSpeed: 'default', // default/fast/slow // Transition style for full page slide backgrounds - backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom + backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom // Parallax background image parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg" -- cgit v1.2.3 From 5bdbc2dc7b4c957f6df6540bdccc29e00c2e49a3 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 27 Dec 2014 21:27:53 +0100 Subject: remove deprecated data-state background colors --- js/reveal.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index c8aa84a..224ce99 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -443,9 +443,6 @@ // Slide number dom.slideNumber = createSingletonNode( dom.wrapper, 'div', 'slide-number', '' ); - // State background element [DEPRECATED] - createSingletonNode( dom.wrapper, 'div', 'state-background', null ); - // Overlay graphic which is displayed during the paused mode createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null ); -- cgit v1.2.3 From 9c3a7b49d0c9f39d6f65b9af4a90a5c3ff782343 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 5 Jan 2015 09:40:53 +0100 Subject: (c) 2015 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 224ce99..4f44c5f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3,7 +3,7 @@ * http://lab.hakim.se/reveal-js * MIT licensed * - * Copyright (C) 2014 Hakim El Hattab, http://hakim.se + * Copyright (C) 2015 Hakim El Hattab, http://hakim.se */ (function( root, factory ) { if( typeof define === 'function' && define.amd ) { -- cgit v1.2.3 From 0e0a4ec6e6e5996c6619ec6ff5452c3017e1ca27 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 5 Jan 2015 09:51:36 +0100 Subject: avoid repetition --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 4f44c5f..46b92b5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2793,7 +2793,7 @@ var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); // The number of past and total slides - var totalCount = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length; + var totalCount = getTotalSlides(); var pastCount = 0; // Step through all slides and count the past ones -- cgit v1.2.3 From 21d034bffebc971b6ee75a07f59977db1f81dd74 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 6 Jan 2015 09:32:21 +0100 Subject: reveal container size determines progress bar width --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 46b92b5..3c2b1c8 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2323,7 +2323,7 @@ // Update progress if enabled if( config.progress && dom.progressbar ) { - dom.progressbar.style.width = getProgress() * window.innerWidth + 'px'; + dom.progressbar.style.width = getProgress() * dom.wrapper.offsetWidth + 'px'; } -- cgit v1.2.3 From 40f12acf2dc2996ab8db81f474e8903364e94d87 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 6 Jan 2015 12:49:52 +0100 Subject: always play background video from the start #1049 --- js/reveal.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3c2b1c8..e5576ed 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2471,7 +2471,10 @@ // Start video playback var currentVideo = currentBackground.querySelector( 'video' ); - if( currentVideo ) currentVideo.play(); + if( currentVideo ) { + currentVideo.currentTime = 0; + currentVideo.play(); + } // Don't transition between identical backgrounds. This // prevents unwanted flicker. -- cgit v1.2.3 From 9a89e39367dda0d39a618c9672df59b95b7eb3a8 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 14 Jan 2015 17:01:28 +0100 Subject: only read textContent for aria callout #1100 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index e5576ed..65ac29f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3216,7 +3216,7 @@ element.classList.remove( 'current-fragment' ); // Announce the fragments one by one to the Screen Reader - dom.statusDiv.innerHTML = element.textContent; + dom.statusDiv.textContent = element.textContent; if( i === index ) { element.classList.add( 'current-fragment' ); -- cgit v1.2.3 From 817bb3bf43879009ae445e52d4b6ef88053c5583 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 15 Jan 2015 11:25:20 +0100 Subject: use getElementByID when looking up linked slides #1086 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 65ac29f..867dd15 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2880,7 +2880,7 @@ // Ensure the named link is a valid HTML ID attribute if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) { // Find the slide with the specified ID - element = document.querySelector( '#' + name ); + element = document.getElementById( name ); } if( element ) { -- cgit v1.2.3 From 5fb81b1b3cb058f3a9bbd5f190a12e44b47b8df2 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 16 Jan 2015 13:48:13 +0100 Subject: support for custom slide number formatting #965 --- js/reveal.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 867dd15..3ee2cd0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2331,19 +2331,33 @@ /** * Updates the slide number div to reflect the current slide. + * + * Slide number format can be defined as a string using the + * following variables: + * h: current slide's horizontal index + * v: current slide's vertical index + * c: current slide index (flattened) + * t: total number of slides (flattened) */ function updateSlideNumber() { // Update slide number if enabled if( config.slideNumber && dom.slideNumber) { - // Display the number of the page using 'indexh - indexv' format - var indexString = indexh; - if( indexv > 0 ) { - indexString += ' - ' + indexv; + // Default to only showing the current slide number + var format = 'c'; + + // Check if a custom slide number format is available + if( typeof config.slideNumber === 'string' ) { + format = config.slideNumber; } - dom.slideNumber.innerHTML = indexString; + var totalSlides = getTotalSlides(); + + dom.slideNumber.innerHTML = format.replace( /h/g, indexh ) + .replace( /v/g, indexv ) + .replace( /c/g, Math.round( getProgress() * totalSlides ) + 1 ) + .replace( /t/g, totalSlides + 1 ); } } -- cgit v1.2.3 From b71705c76ff867ac2601d17cec4228ca3b1d5870 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 16 Jan 2015 16:12:54 +0100 Subject: background images now work in overview mode #1088 --- js/reveal.js | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3ee2cd0..8d547dd 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1642,31 +1642,41 @@ dom.wrapper.classList.add( 'overview' ); dom.wrapper.classList.remove( 'overview-deactivating' ); - var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); + // Move the backgrounds element into the slide container to + // that the same scaling is applied + dom.slides.appendChild( dom.background ); + + var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), + horizontalBackgrounds = dom.background.childNodes; for( var i = 0, len1 = horizontalSlides.length; i < len1; i++ ) { var hslide = horizontalSlides[i], + hbackground = horizontalBackgrounds[i], hoffset = config.rtl ? -105 : 105; hslide.setAttribute( 'data-index-h', i ); // Apply CSS transform transformElement( hslide, 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)' ); + transformElement( hbackground, 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)' ); if( hslide.classList.contains( 'stack' ) ) { - var verticalSlides = hslide.querySelectorAll( 'section' ); + var verticalSlides = hslide.querySelectorAll( 'section' ), + verticalBackgrounds = hbackground.querySelectorAll( '.slide-background' ); for( var j = 0, len2 = verticalSlides.length; j < len2; j++ ) { var verticalIndex = i === indexh ? indexv : getPreviousVerticalIndex( hslide ); - var vslide = verticalSlides[j]; + var vslide = verticalSlides[j], + vbackground = verticalBackgrounds[j]; vslide.setAttribute( 'data-index-h', i ); vslide.setAttribute( 'data-index-v', j ); // Apply CSS transform transformElement( vslide, 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)' ); + transformElement( vbackground, 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)' ); // Navigate to this slide on click vslide.addEventListener( 'click', onOverviewSlideClicked, true ); @@ -1709,6 +1719,9 @@ dom.wrapper.classList.remove( 'overview' ); + // Move the background element back out + dom.wrapper.appendChild( dom.background ); + // Temporarily add a class so that transitions can do different things // depending on whether they are exiting/entering overview, or just // moving from slide to slide @@ -1718,14 +1731,18 @@ dom.wrapper.classList.remove( 'overview-deactivating' ); }, 1 ); - // Select all slides + // Clean up changes made to slides toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { - // Resets all transforms to use the external styles transformElement( slide, '' ); slide.removeEventListener( 'click', onOverviewSlideClicked, true ); } ); + // Clean up changes made to backgrounds + toArray( dom.background.querySelectorAll( '.slide-background' ) ).forEach( function( background ) { + transformElement( background, '' ); + } ); + slide( indexh, indexv ); cueAutoSlide(); -- cgit v1.2.3 From 99d92362c8e50e81554610b18a2f5a4f76491e0f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 16 Jan 2015 16:15:28 +0100 Subject: no longer set o-transforms --- js/reveal.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 8d547dd..4d5fdd3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1051,7 +1051,6 @@ element.style.WebkitTransform = transform; element.style.MozTransform = transform; element.style.msTransform = transform; - element.style.OTransform = transform; element.style.transform = transform; } @@ -1654,11 +1653,13 @@ hbackground = horizontalBackgrounds[i], hoffset = config.rtl ? -105 : 105; + var htransform = 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)'; + hslide.setAttribute( 'data-index-h', i ); // Apply CSS transform - transformElement( hslide, 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)' ); - transformElement( hbackground, 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)' ); + transformElement( hslide, htransform ); + transformElement( hbackground, htransform ); if( hslide.classList.contains( 'stack' ) ) { @@ -1671,12 +1672,14 @@ var vslide = verticalSlides[j], vbackground = verticalBackgrounds[j]; + var vtransform = 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)'; + vslide.setAttribute( 'data-index-h', i ); vslide.setAttribute( 'data-index-v', j ); // Apply CSS transform - transformElement( vslide, 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)' ); - transformElement( vbackground, 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)' ); + transformElement( vslide, vtransform ); + transformElement( vbackground, vtransform ); // Navigate to this slide on click vslide.addEventListener( 'click', onOverviewSlideClicked, true ); -- cgit v1.2.3 From e0aba9f5aec9d1bea9f1b1729d5f6022e412196c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 17 Jan 2015 10:33:18 +0100 Subject: apply z position to slide container, rather than individual slides --- js/reveal.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 4d5fdd3..5805ee9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -165,6 +165,9 @@ // The current scale of the presentation (see width/height config) scale = 1, + // The current z position of the presentation container + z = 0, + // Cached references to DOM elements dom = {}, @@ -1470,6 +1473,7 @@ // Prefer zooming in desktop Chrome so that content remains crisp if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; + transformElement( dom.slides, 'translateZ(-'+ z +'px)' ); } // Apply scale transform as a fallback else { @@ -1477,7 +1481,7 @@ dom.slides.style.top = '50%'; dom.slides.style.bottom = 'auto'; dom.slides.style.right = 'auto'; - transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' ); + transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' + ' translateZ(-'+ z +'px)' ); } } @@ -1635,8 +1639,10 @@ var wasActive = dom.wrapper.classList.contains( 'overview' ); - // Vary the depth of the overview based on screen size - var depth = window.innerWidth < 400 ? 1000 : 2500; + // Set the depth of the presentation. This determinse how far we + // zoom out and varies based on display size. It gets applied at + // the layout step. + z = window.innerWidth < 400 ? 1000 : 2500; dom.wrapper.classList.add( 'overview' ); dom.wrapper.classList.remove( 'overview-deactivating' ); @@ -1653,7 +1659,7 @@ hbackground = horizontalBackgrounds[i], hoffset = config.rtl ? -105 : 105; - var htransform = 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)'; + var htransform = 'translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)'; hslide.setAttribute( 'data-index-h', i ); -- cgit v1.2.3 From 9e14b261eafc007c257d64bab5a0df270067b59c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 19 Jan 2015 08:41:26 +0100 Subject: fix for #1088 when presentation is not scaled --- js/reveal.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 5805ee9..9634c6b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1446,6 +1446,7 @@ var size = getComputedSlideSize(); var slidePadding = 20; // TODO Dig this out of DOM + var zTransform = z !== 0 ? 'translateZ(-'+ z +'px)' : ''; // Layout the contents of the slides layoutSlideContents( config.width, config.height, slidePadding ); @@ -1467,13 +1468,13 @@ dom.slides.style.top = ''; dom.slides.style.bottom = ''; dom.slides.style.right = ''; - transformElement( dom.slides, '' ); + transformElement( dom.slides, zTransform ); } else { // Prefer zooming in desktop Chrome so that content remains crisp if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; - transformElement( dom.slides, 'translateZ(-'+ z +'px)' ); + transformElement( dom.slides, zTransform ); } // Apply scale transform as a fallback else { @@ -1481,7 +1482,7 @@ dom.slides.style.top = '50%'; dom.slides.style.bottom = 'auto'; dom.slides.style.right = 'auto'; - transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' + ' translateZ(-'+ z +'px)' ); + transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +') ' + zTransform ); } } -- cgit v1.2.3 From 11293d7c9415862007dbc1e3936b0fcbf4626da1 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 26 Jan 2015 20:38:21 +0100 Subject: refactoring and optimization of overview mode --- js/reveal.js | 99 +++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 31 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 9634c6b..74fcf5f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -147,6 +147,9 @@ // Flags if reveal.js is loaded (has dispatched the 'ready' event) loaded = false, + // Flags if the overview mode is currently active + overview = false, + // The horizontal and vertical index of the currently active slide indexh, indexv, @@ -165,8 +168,9 @@ // The current scale of the presentation (see width/height config) scale = 1, - // The current z position of the presentation container - z = 0, + // The transform that is currently applied to the slides container + slidesTransform = '', + layoutTransform = '', // Cached references to DOM elements dom = {}, @@ -1058,6 +1062,12 @@ } + function transformSlides() { + + transformElement( dom.slides, layoutTransform ? layoutTransform + ' ' + slidesTransform : slidesTransform ); + + } + /** * Injects the given CSS styles into the DOM. */ @@ -1446,7 +1456,6 @@ var size = getComputedSlideSize(); var slidePadding = 20; // TODO Dig this out of DOM - var zTransform = z !== 0 ? 'translateZ(-'+ z +'px)' : ''; // Layout the contents of the slides layoutSlideContents( config.width, config.height, slidePadding ); @@ -1468,13 +1477,12 @@ dom.slides.style.top = ''; dom.slides.style.bottom = ''; dom.slides.style.right = ''; - transformElement( dom.slides, zTransform ); + layoutTransform = ''; } else { // Prefer zooming in desktop Chrome so that content remains crisp if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; - transformElement( dom.slides, zTransform ); } // Apply scale transform as a fallback else { @@ -1482,10 +1490,12 @@ dom.slides.style.top = '50%'; dom.slides.style.bottom = 'auto'; dom.slides.style.right = 'auto'; - transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +') ' + zTransform ); + layoutTransform = 'translate(-50%, -50%) scale('+ scale +')'; } } + transformSlides(); + // Select all slides, vertical and horizontal var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ); @@ -1633,21 +1643,24 @@ function activateOverview() { // Only proceed if enabled in config - if( config.overview ) { - - // Don't auto-slide while in overview mode - cancelAutoSlide(); - - var wasActive = dom.wrapper.classList.contains( 'overview' ); + if( config.overview && !isOverview() ) { - // Set the depth of the presentation. This determinse how far we - // zoom out and varies based on display size. It gets applied at - // the layout step. - z = window.innerWidth < 400 ? 1000 : 2500; + overview = true; dom.wrapper.classList.add( 'overview' ); dom.wrapper.classList.remove( 'overview-deactivating' ); + setTimeout( function() { + dom.wrapper.classList.add( 'overview-animated' ); + }, 1 ); + + // Don't auto-slide while in overview mode + cancelAutoSlide(); + + var margin = 70; + var slideWidth = config.width + margin, + slideHeight = config.height + margin; + // Move the backgrounds element into the slide container to // that the same scaling is applied dom.slides.appendChild( dom.background ); @@ -1658,9 +1671,9 @@ for( var i = 0, len1 = horizontalSlides.length; i < len1; i++ ) { var hslide = horizontalSlides[i], hbackground = horizontalBackgrounds[i], - hoffset = config.rtl ? -105 : 105; + hoffset = config.rtl ? -slideWidth : slideWidth; - var htransform = 'translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)'; + var htransform = 'translateX(' + ( i * hoffset ) + 'px)'; hslide.setAttribute( 'data-index-h', i ); @@ -1679,7 +1692,7 @@ var vslide = verticalSlides[j], vbackground = verticalBackgrounds[j]; - var vtransform = 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)'; + var vtransform = 'translateY(' + ( j * slideHeight ) + 'px)'; vslide.setAttribute( 'data-index-h', i ); vslide.setAttribute( 'data-index-v', j ); @@ -1702,22 +1715,38 @@ } updateSlidesVisibility(); + updateOverview(); layout(); - if( !wasActive ) { - // Notify observers of the overview showing - dispatchEvent( 'overviewshown', { - 'indexh': indexh, - 'indexv': indexv, - 'currentSlide': currentSlide - } ); - } + // Notify observers of the overview showing + dispatchEvent( 'overviewshown', { + 'indexh': indexh, + 'indexv': indexv, + 'currentSlide': currentSlide + } ); } } + function updateOverview() { + + var z = window.innerWidth < 400 ? 1000 : 2500; + var margin = 70; + var slideWidth = config.width + margin, + slideHeight = config.height + margin; + + slidesTransform = [ + 'translateX('+ ( -indexh * slideWidth ) +'px)', + 'translateY('+ ( -indexv * slideHeight ) +'px)', + 'translateZ('+ ( -z ) +'px)' + ].join( ' ' ); + + transformSlides(); + + } + /** * Exits the slide overview and enters the currently * active slide. @@ -1727,11 +1756,17 @@ // Only proceed if enabled in config if( config.overview ) { + slidesTransform = ''; + + overview = false; + dom.wrapper.classList.remove( 'overview' ); // Move the background element back out dom.wrapper.appendChild( dom.background ); + dom.wrapper.classList.remove( 'overview-animated' ); + // Temporarily add a class so that transitions can do different things // depending on whether they are exiting/entering overview, or just // moving from slide to slide @@ -1755,6 +1790,8 @@ slide( indexh, indexv ); + layout(); + cueAutoSlide(); // Notify observers of the overview hiding @@ -1793,7 +1830,7 @@ */ function isOverview() { - return dom.wrapper.classList.contains( 'overview' ); + return overview; } @@ -1995,7 +2032,7 @@ // If the overview is active, re-activate it to update positions if( isOverview() ) { - activateOverview(); + updateOverview(); } // Find the current horizontal slide and any possible vertical slides @@ -2289,11 +2326,11 @@ // The number of steps away from the present slide that will // be visible - var viewDistance = isOverview() ? 10 : config.viewDistance; + var viewDistance = isOverview() ? 7 : config.viewDistance; // Limit view distance on weaker devices if( isMobileDevice ) { - viewDistance = isOverview() ? 6 : 2; + viewDistance = isOverview() ? 7 : 2; } // Limit view distance on weaker devices -- cgit v1.2.3 From e29c706533c227682cfde1ac0b187e90738b9bbc Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 27 Jan 2015 09:21:49 +0100 Subject: further overview refactoring --- js/reveal.js | 121 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 68 insertions(+), 53 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 74fcf5f..ddbe800 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1636,9 +1636,6 @@ /** * Displays the overview of slides (quick nav) by * scaling down and arranging all slide elements. - * - * Experimental feature, might be dropped if perf - * can't be improved. */ function activateOverview() { @@ -1657,64 +1654,32 @@ // Don't auto-slide while in overview mode cancelAutoSlide(); - var margin = 70; - var slideWidth = config.width + margin, - slideHeight = config.height + margin; - // Move the backgrounds element into the slide container to // that the same scaling is applied dom.slides.appendChild( dom.background ); - var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), - horizontalBackgrounds = dom.background.childNodes; - - for( var i = 0, len1 = horizontalSlides.length; i < len1; i++ ) { - var hslide = horizontalSlides[i], - hbackground = horizontalBackgrounds[i], - hoffset = config.rtl ? -slideWidth : slideWidth; + // Bind events so that clicking on a slide navigates to it + toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) { - var htransform = 'translateX(' + ( i * hoffset ) + 'px)'; - - hslide.setAttribute( 'data-index-h', i ); - - // Apply CSS transform - transformElement( hslide, htransform ); - transformElement( hbackground, htransform ); + hslide.setAttribute( 'data-index-h', h ); if( hslide.classList.contains( 'stack' ) ) { + toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) { - var verticalSlides = hslide.querySelectorAll( 'section' ), - verticalBackgrounds = hbackground.querySelectorAll( '.slide-background' ); - - for( var j = 0, len2 = verticalSlides.length; j < len2; j++ ) { - var verticalIndex = i === indexh ? indexv : getPreviousVerticalIndex( hslide ); - - var vslide = verticalSlides[j], - vbackground = verticalBackgrounds[j]; - - var vtransform = 'translateY(' + ( j * slideHeight ) + 'px)'; - - vslide.setAttribute( 'data-index-h', i ); - vslide.setAttribute( 'data-index-v', j ); - - // Apply CSS transform - transformElement( vslide, vtransform ); - transformElement( vbackground, vtransform ); - - // Navigate to this slide on click + vslide.setAttribute( 'data-index-h', h ); + vslide.setAttribute( 'data-index-v', v ); vslide.addEventListener( 'click', onOverviewSlideClicked, true ); - } + } ); } else { - - // Navigate to this slide on click hslide.addEventListener( 'click', onOverviewSlideClicked, true ); - } - } + + } ); updateSlidesVisibility(); + layoutOverview(); updateOverview(); layout(); @@ -1730,17 +1695,64 @@ } + /** + * Moves the slides into a grid for display in the + * overview mode. + */ + function layoutOverview() { + + var margin = 70; + var slideWidth = config.width + margin, + slideHeight = config.height + margin; + + // Reverse in RTL mode + if( config.rtl ) { + slideWidth = -slideWidth; + } + + // Layout slides + toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) { + transformElement( hslide, 'translateX(' + ( h * slideWidth ) + 'px)' ); + + if( hslide.classList.contains( 'stack' ) ) { + + toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) { + transformElement( vslide, 'translateY(' + ( v * slideHeight ) + 'px)' ); + } ); + + } + } ); + + // Layout slide backgrounds + toArray( dom.background.childNodes ).forEach( function( hbackground, h ) { + transformElement( hbackground, 'translateX(' + ( h * slideWidth ) + 'px)' ); + + toArray( hbackground.querySelectorAll( '.slide-background' ) ).forEach( function( vbackground, v ) { + transformElement( vbackground, 'translateY(' + ( v * slideHeight ) + 'px)' ); + } ); + } ); + + } + + /** + * Moves the overview viewport to the current slides. + * Called each time the current slide changes. + */ function updateOverview() { - var z = window.innerWidth < 400 ? 1000 : 2500; var margin = 70; var slideWidth = config.width + margin, slideHeight = config.height + margin; + // Reverse in RTL mode + if( config.rtl ) { + slideWidth = -slideWidth; + } + slidesTransform = [ 'translateX('+ ( -indexh * slideWidth ) +'px)', 'translateY('+ ( -indexv * slideHeight ) +'px)', - 'translateZ('+ ( -z ) +'px)' + 'translateZ('+ ( window.innerWidth < 400 ? -1000 : -2500 ) +'px)' ].join( ' ' ); transformSlides(); @@ -1761,10 +1773,6 @@ overview = false; dom.wrapper.classList.remove( 'overview' ); - - // Move the background element back out - dom.wrapper.appendChild( dom.background ); - dom.wrapper.classList.remove( 'overview-animated' ); // Temporarily add a class so that transitions can do different things @@ -1776,6 +1784,9 @@ dom.wrapper.classList.remove( 'overview-deactivating' ); }, 1 ); + // Move the background element back out + dom.wrapper.appendChild( dom.background ); + // Clean up changes made to slides toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { transformElement( slide, '' ); @@ -2145,6 +2156,10 @@ formatEmbeddedContent(); + if( isOverview() ) { + layoutOverview(); + } + } /** @@ -2326,11 +2341,11 @@ // The number of steps away from the present slide that will // be visible - var viewDistance = isOverview() ? 7 : config.viewDistance; + var viewDistance = isOverview() ? 10 : config.viewDistance; // Limit view distance on weaker devices if( isMobileDevice ) { - viewDistance = isOverview() ? 7 : 2; + viewDistance = isOverview() ? 6 : 2; } // Limit view distance on weaker devices -- cgit v1.2.3 From c8569e2d9ff675b806e5d5bf94ba1a07d121e74b Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 27 Jan 2015 19:27:55 +0100 Subject: cross browser adjustments for overview mode --- js/reveal.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ddbe800..37c6831 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -300,7 +300,11 @@ features.touch = !!( 'ontouchstart' in window ); - isMobileDevice = navigator.userAgent.match( /(iphone|ipod|ipad|android)/gi ); + // Transitions in the overview are disabled in desktop and + // mobile Safari since they lag terribly + features.overviewTransitions = !/Version\/[\d\.]+.*Safari/.test( navigator.userAgent ); + + isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( navigator.userAgent ); } @@ -1647,9 +1651,11 @@ dom.wrapper.classList.add( 'overview' ); dom.wrapper.classList.remove( 'overview-deactivating' ); - setTimeout( function() { - dom.wrapper.classList.add( 'overview-animated' ); - }, 1 ); + if( features.overviewTransitions ) { + setTimeout( function() { + dom.wrapper.classList.add( 'overview-animated' ); + }, 1 ); + } // Don't auto-slide while in overview mode cancelAutoSlide(); @@ -1712,12 +1718,12 @@ // Layout slides toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) { - transformElement( hslide, 'translateX(' + ( h * slideWidth ) + 'px)' ); + transformElement( hslide, 'translate3d(' + ( h * slideWidth ) + 'px, 0, 0)' ); if( hslide.classList.contains( 'stack' ) ) { toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) { - transformElement( vslide, 'translateY(' + ( v * slideHeight ) + 'px)' ); + transformElement( vslide, 'translate3d(0, ' + ( v * slideHeight ) + 'px, 0)' ); } ); } @@ -1725,10 +1731,10 @@ // Layout slide backgrounds toArray( dom.background.childNodes ).forEach( function( hbackground, h ) { - transformElement( hbackground, 'translateX(' + ( h * slideWidth ) + 'px)' ); + transformElement( hbackground, 'translate3d(' + ( h * slideWidth ) + 'px, 0, 0)' ); toArray( hbackground.querySelectorAll( '.slide-background' ) ).forEach( function( vbackground, v ) { - transformElement( vbackground, 'translateY(' + ( v * slideHeight ) + 'px)' ); + transformElement( vbackground, 'translate3d(0, ' + ( v * slideHeight ) + 'px, 0)' ); } ); } ); -- cgit v1.2.3 From 64e72781b4d576a2a32e7c4b3e1692d03a182c7d Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 28 Jan 2015 08:33:50 +0100 Subject: ensure overview indices are up to date if a slide moves --- js/reveal.js | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 37c6831..9ed7b7e 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1664,24 +1664,11 @@ // that the same scaling is applied dom.slides.appendChild( dom.background ); - // Bind events so that clicking on a slide navigates to it - toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) { - - hslide.setAttribute( 'data-index-h', h ); - - if( hslide.classList.contains( 'stack' ) ) { - toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) { - - vslide.setAttribute( 'data-index-h', h ); - vslide.setAttribute( 'data-index-v', v ); - vslide.addEventListener( 'click', onOverviewSlideClicked, true ); - - } ); - } - else { - hslide.addEventListener( 'click', onOverviewSlideClicked, true ); + // Clicking on an overview slide navigates to it + toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { + if( !slide.classList.contains( 'stack' ) ) { + slide.addEventListener( 'click', onOverviewSlideClicked, true ); } - } ); updateSlidesVisibility(); @@ -1718,11 +1705,15 @@ // Layout slides toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) { + hslide.setAttribute( 'data-index-h', h ); transformElement( hslide, 'translate3d(' + ( h * slideWidth ) + 'px, 0, 0)' ); if( hslide.classList.contains( 'stack' ) ) { toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) { + vslide.setAttribute( 'data-index-h', h ); + vslide.setAttribute( 'data-index-v', v ); + transformElement( vslide, 'translate3d(0, ' + ( v * slideHeight ) + 'px, 0)' ); } ); @@ -1997,7 +1988,7 @@ // If no vertical index is specified and the upcoming slide is a // stack, resume at its previous vertical index - if( v === undefined ) { + if( v === undefined && !isOverview() ) { v = getPreviousVerticalIndex( horizontalSlides[ h ] ); } -- cgit v1.2.3 From 18e29a898af3fb2d412320ab0c784dfc46bf2a06 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 29 Jan 2015 11:59:47 +0100 Subject: cleaner approach to applying transforms to slides container --- js/reveal.js | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 9ed7b7e..61afab4 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -168,9 +168,9 @@ // The current scale of the presentation (see width/height config) scale = 1, - // The transform that is currently applied to the slides container - slidesTransform = '', - layoutTransform = '', + // CSS transform that is currently applied to the slides container, + // split into two groups + slidesTransform = { layout: '', overview: '' }, // Cached references to DOM elements dom = {}, @@ -301,7 +301,7 @@ features.touch = !!( 'ontouchstart' in window ); // Transitions in the overview are disabled in desktop and - // mobile Safari since they lag terribly + // mobile Safari due to lag features.overviewTransitions = !/Version\/[\d\.]+.*Safari/.test( navigator.userAgent ); isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( navigator.userAgent ); @@ -1066,9 +1066,25 @@ } - function transformSlides() { + /** + * Applies CSS transforms to the slides container. The container + * is transformed from two separate sources: layout and the overview + * mode. + */ + function transformSlides( transforms ) { + + // Pick up new transforms from arguments + if( transforms.layout ) slidesTransform.layout = transforms.layout; + if( transforms.overview ) slidesTransform.overview = transforms.overview; + + // Apply the transforms to the slides container + if( slidesTransform.layout ) { + transformElement( dom.slides, slidesTransform.layout + ' ' + slidesTransform.overview ); + } + else { + transformElement( dom.slides, slidesTransform.overview ); + } - transformElement( dom.slides, layoutTransform ? layoutTransform + ' ' + slidesTransform : slidesTransform ); } @@ -1481,12 +1497,13 @@ dom.slides.style.top = ''; dom.slides.style.bottom = ''; dom.slides.style.right = ''; - layoutTransform = ''; + transformSlides( { layout: '' } ); } else { // Prefer zooming in desktop Chrome so that content remains crisp if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; + transformSlides( { layout: '' } ); } // Apply scale transform as a fallback else { @@ -1494,12 +1511,10 @@ dom.slides.style.top = '50%'; dom.slides.style.bottom = 'auto'; dom.slides.style.right = 'auto'; - layoutTransform = 'translate(-50%, -50%) scale('+ scale +')'; + transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } ); } } - transformSlides(); - // Select all slides, vertical and horizontal var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ); @@ -1746,13 +1761,13 @@ slideWidth = -slideWidth; } - slidesTransform = [ - 'translateX('+ ( -indexh * slideWidth ) +'px)', - 'translateY('+ ( -indexv * slideHeight ) +'px)', - 'translateZ('+ ( window.innerWidth < 400 ? -1000 : -2500 ) +'px)' - ].join( ' ' ); - - transformSlides(); + transformSlides( { + overview: [ + 'translateX('+ ( -indexh * slideWidth ) +'px)', + 'translateY('+ ( -indexv * slideHeight ) +'px)', + 'translateZ('+ ( window.innerWidth < 400 ? -1000 : -2500 ) +'px)' + ].join( ' ' ) + } ); } @@ -1765,7 +1780,7 @@ // Only proceed if enabled in config if( config.overview ) { - slidesTransform = ''; + transformSlides( { overview: '' } ); overview = false; -- cgit v1.2.3 From c8d7451142520c3999335e5ca958d27402071f30 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 29 Jan 2015 12:03:02 +0100 Subject: comments --- js/reveal.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 61afab4..ac21f33 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1653,8 +1653,8 @@ } /** - * Displays the overview of slides (quick nav) by - * scaling down and arranging all slide elements. + * Displays the overview of slides (quick nav) by scaling + * down and arranging all slide elements. */ function activateOverview() { @@ -1704,8 +1704,8 @@ } /** - * Moves the slides into a grid for display in the - * overview mode. + * Uses CSS transforms to position all slides in a grid for + * display inside of the overview mode. */ function layoutOverview() { -- cgit v1.2.3 From 8e66876c4e5881d3a85516e0070094bc8b0d8b9f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 29 Jan 2015 12:21:05 +0100 Subject: fix error when exiting overview --- js/reveal.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ac21f33..ad2d5a3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1074,8 +1074,8 @@ function transformSlides( transforms ) { // Pick up new transforms from arguments - if( transforms.layout ) slidesTransform.layout = transforms.layout; - if( transforms.overview ) slidesTransform.overview = transforms.overview; + if( typeof transforms.layout === 'string' ) slidesTransform.layout = transforms.layout; + if( typeof transforms.overview === 'string' ) slidesTransform.overview = transforms.overview; // Apply the transforms to the slides container if( slidesTransform.layout ) { @@ -1085,7 +1085,6 @@ transformElement( dom.slides, slidesTransform.overview ); } - } /** @@ -1780,8 +1779,6 @@ // Only proceed if enabled in config if( config.overview ) { - transformSlides( { overview: '' } ); - overview = false; dom.wrapper.classList.remove( 'overview' ); @@ -1811,6 +1808,8 @@ transformElement( background, '' ); } ); + transformSlides( { overview: '' } ); + slide( indexh, indexv ); layout(); @@ -2053,7 +2052,7 @@ document.documentElement.classList.remove( stateBefore.pop() ); } - // If the overview is active, re-activate it to update positions + // Update the overview if it's currently active if( isOverview() ) { updateOverview(); } -- cgit v1.2.3 From 49f462e6ce329b9c569d4735ab617ac07385b17b Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 30 Jan 2015 10:52:28 +0100 Subject: gifs now restart when their slide container is shown --- js/reveal.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ad2d5a3..afbfb6e 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2580,6 +2580,15 @@ currentVideo.play(); } + var backgroundImageURL = currentBackground.style.backgroundImage || ''; + + // Restart GIFs (doesn't work in Firefox) + if( /\.gif/i.test( backgroundImageURL ) ) { + currentBackground.style.backgroundImage = ''; + window.getComputedStyle( currentBackground ).opacity; + currentBackground.style.backgroundImage = backgroundImageURL; + } + // Don't transition between identical backgrounds. This // prevents unwanted flicker. var previousBackgroundHash = previousBackground ? previousBackground.getAttribute( 'data-background-hash' ) : null; @@ -2826,6 +2835,13 @@ function startEmbeddedContent( slide ) { if( slide && !isSpeakerNotes() ) { + // Restart GIFs + toArray( slide.querySelectorAll( 'img[src$=".gif"]' ) ).forEach( function( el ) { + // Setting the same unchanged source like this was confirmed + // to work in Chrome, FF & Safari + el.setAttribute( 'src', el.getAttribute( 'src' ) ); + } ); + // HTML5 media elements toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { if( el.hasAttribute( 'data-autoplay' ) ) { -- cgit v1.2.3 From 1c8a6e47a6374332caeb62ae84ca109ec59be54a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 2 Feb 2015 09:14:09 +0100 Subject: only preload last slides if presentation is looped --- js/reveal.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index afbfb6e..dbe3679 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2359,7 +2359,7 @@ viewDistance = isOverview() ? 6 : 2; } - // Limit view distance on weaker devices + // All slides need to be visible when exporting to PDF if( isPrintingPDF() ) { viewDistance = Number.MAX_VALUE; } @@ -2370,8 +2370,14 @@ var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ), verticalSlidesLength = verticalSlides.length; - // Loops so that it measures 1 between the first and last slides - distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; + // Determine how far away this slide is from the present + distanceX = Math.abs( ( indexh || 0 ) - x ) || 0; + + // If the presentation is looped, distance should measure + // 1 between the first and last slides + if( config.loop ) { + distanceX = distanceX % ( horizontalSlidesLength - viewDistance ); + } // Show the horizontal slide if it's within the view distance if( distanceX < viewDistance ) { -- cgit v1.2.3 From a4852c7cb2a5792d0ead3ee59435371225755dea Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 3 Feb 2015 11:56:54 +0100 Subject: prevent iframes from offsetting presentation --- js/reveal.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index dbe3679..fdf3204 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -384,6 +384,9 @@ // Listen to messages posted to this window setupPostMessage(); + // Prevent iframes from scrolling the slides out of view + setupIframeScrollPrevention(); + // Resets all vertical slides so that only the first is visible resetVerticalSlides(); @@ -567,6 +570,26 @@ } + /** + * This is an unfortunate necessity. Iframes can trigger the + * parent window to scroll, for example by focusing an input. + * This scrolling can not be prevented by hiding overflow in + * CSS so we have to resort to repeatedly checking if the + * browser has decided to offset our slides :( + */ + function setupIframeScrollPrevention() { + + if( dom.slides.querySelector( 'iframe' ) ) { + setInterval( function() { + if( dom.wrapper.scrollTop !== 0 || dom.wrapper.scrollLeft !== 0 ) { + dom.wrapper.scrollTop = 0; + dom.wrapper.scrollLeft = 0; + } + }, 500 ); + } + + } + /** * Creates an HTML element and returns a reference to it. * If the element already exists the existing instance will -- cgit v1.2.3 From 2ed1d6fb5dd7aa24918342197554fd7a6fbf6797 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 9 Feb 2015 09:35:05 +0100 Subject: fix looped view distance calculation --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index fdf3204..3c06f8d 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2399,7 +2399,7 @@ // If the presentation is looped, distance should measure // 1 between the first and last slides if( config.loop ) { - distanceX = distanceX % ( horizontalSlidesLength - viewDistance ); + distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; } // Show the horizontal slide if it's within the view distance -- cgit v1.2.3 From 00fa1c818dc5806297c3ab3ec68abc13911774d1 Mon Sep 17 00:00:00 2001 From: Greg Denehy Date: Thu, 19 Feb 2015 17:04:41 +1030 Subject: Added option to loop background videos --- js/reveal.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 65ac29f..5a3f1af 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2590,6 +2590,7 @@ var backgroundImage = slide.getAttribute( 'data-background-image' ), backgroundVideo = slide.getAttribute( 'data-background-video' ), + backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ), backgroundIframe = slide.getAttribute( 'data-background-iframe' ); // Images @@ -2599,6 +2600,9 @@ // Videos else if ( backgroundVideo && !isSpeakerNotes() ) { var video = document.createElement( 'video' ); + if ( backgroundVideoLoop ) { + video.setAttribute( 'loop', '' ); + } // Support comma separated lists of video sources backgroundVideo.split( ',' ).forEach( function( source ) { -- cgit v1.2.3 From 76c5726c040000a6d8ae3122681b3afb5e309c85 Mon Sep 17 00:00:00 2001 From: Jordan Hofker Date: Thu, 19 Feb 2015 16:09:08 -0600 Subject: Check before calling blur on activeElement. It's possible for slides to be in a situation where the last clicked thing was an SVG before the tab/window loses focus. When returning, `.blur()` is called on the previously-active element, but can result in an exception. This protects against that and will only call `.blur()` when `document.activeElement` supports it. --- js/reveal.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 65ac29f..6a8c2a3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3872,7 +3872,10 @@ // If, after clicking a link or similar and we're coming back, // focus the document.body to ensure we can use keyboard shortcuts if( isHidden === false && document.activeElement !== document.body ) { - document.activeElement.blur(); + // Not all elements support .blur() - SVGs among them. + if (typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } document.body.focus(); } -- cgit v1.2.3 From ea735f0a2f4983a54bed94e2ce83f6ebe297a225 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Feb 2015 13:26:45 +0100 Subject: ensure postmessage data is a string #1143 --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 0e60745..850f431 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -795,7 +795,7 @@ var data = event.data; // Make sure we're dealing with JSON - if( data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}' ) { + if( typeof data === 'string' && data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}' ) { data = JSON.parse( data ); // Check if the requested method can be found -- cgit v1.2.3 From f772c7eb508cb1373d509d8cfea3b89984290ae9 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Feb 2015 13:31:41 +0100 Subject: fix progress bar clicks in rtl mode #1131 --- js/reveal.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 850f431..d5294e6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -4001,6 +4001,10 @@ var slidesTotal = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).length; var slideIndex = Math.floor( ( event.clientX / dom.wrapper.offsetWidth ) * slidesTotal ); + if( config.rtl ) { + slideIndex = slidesTotal - slideIndex; + } + slide( slideIndex ); } -- cgit v1.2.3 From 53b9dbc65431882b9f316b4fbfe5d6cece928ad1 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Feb 2015 15:52:10 +0100 Subject: code format --- js/reveal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 7d3973e..3520f0c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2766,7 +2766,8 @@ // Videos else if ( backgroundVideo && !isSpeakerNotes() ) { var video = document.createElement( 'video' ); - if ( backgroundVideoLoop ) { + + if( backgroundVideoLoop ) { video.setAttribute( 'loop', '' ); } @@ -2778,7 +2779,7 @@ background.appendChild( video ); } // Iframes - else if ( backgroundIframe ) { + else if( backgroundIframe ) { var iframe = document.createElement( 'iframe' ); iframe.setAttribute( 'src', backgroundIframe ); iframe.style.width = '100%'; -- cgit v1.2.3 From 364a3f9845a41f72c399ca1b602a4f96281965af Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 2 Mar 2015 12:11:05 +0100 Subject: code format --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a1a91d0..3edd301 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -4055,7 +4055,7 @@ // focus the document.body to ensure we can use keyboard shortcuts if( isHidden === false && document.activeElement !== document.body ) { // Not all elements support .blur() - SVGs among them. - if (typeof document.activeElement.blur === 'function') { + if( typeof document.activeElement.blur === 'function' ) { document.activeElement.blur(); } document.body.focus(); -- cgit v1.2.3 From 25c46ccc37f932c04d5c2af7de1d12c6cdaed055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Chr=C3=A9tien?= Date: Sun, 8 Mar 2015 18:11:01 +0100 Subject: Fix slide numbering for custom slide number formatting. Numbering was off when dealing with fragments. --- js/reveal.js | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3edd301..58edc56 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2476,11 +2476,12 @@ } var totalSlides = getTotalSlides(); + var currentSlide = getSlidePastCount() + 1; dom.slideNumber.innerHTML = format.replace( /h/g, indexh ) .replace( /v/g, indexv ) - .replace( /c/g, Math.round( getProgress() * totalSlides ) + 1 ) - .replace( /t/g, totalSlides + 1 ); + .replace( /c/g, currentSlide ) + .replace( /t/g, totalSlides ); } } @@ -2966,15 +2967,14 @@ } /** - * Returns a value ranging from 0-1 that represents - * how far into the presentation we have navigated. + * Returns the number of past slides. This can be used as a global + * flattened index for slides. */ - function getProgress() { + function getSlidePastCount() { var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); - // The number of past and total slides - var totalCount = getTotalSlides(); + // The number of past slides var pastCount = 0; // Step through all slides and count the past ones @@ -3006,6 +3006,20 @@ } + return pastCount; + + } + + /** + * Returns a value ranging from 0-1 that represents + * how far into the presentation we have navigated. + */ + function getProgress() { + + // The number of past and total slides + var totalCount = getTotalSlides(); + var pastCount = getSlidePastCount(); + if( currentSlide ) { var allFragments = currentSlide.querySelectorAll( '.fragment' ); -- cgit v1.2.3 From 41cf154a605db67d0845e74ca021d6ac171cb64b Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 19 Mar 2015 11:49:19 +0800 Subject: Update reveal.js --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 65ac29f..915f8bb 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1566,7 +1566,7 @@ }; // Reduce available space by margin - size.presentationWidth -= ( size.presentationHeight * config.margin ); + size.presentationWidth -= ( size.presentationWidth * config.margin ); size.presentationHeight -= ( size.presentationHeight * config.margin ); // Slide width may be a percentage of available width -- cgit v1.2.3 From 70ab0ae80b37c077d3ba799b74bca613d049868c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Mar 2015 14:51:54 +0100 Subject: remove variable definitions #1158 --- js/reveal.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index f5ca21f..8162a17 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2475,13 +2475,10 @@ format = config.slideNumber; } - var totalSlides = getTotalSlides(); - var currentSlide = getSlidePastCount() + 1; - dom.slideNumber.innerHTML = format.replace( /h/g, indexh ) .replace( /v/g, indexv ) - .replace( /c/g, currentSlide ) - .replace( /t/g, totalSlides ); + .replace( /c/g, getSlidePastCount() + 1 ) + .replace( /t/g, getTotalSlides() ); } } -- cgit v1.2.3 From e19931ababbcbb416a3918f68b1f755a4bacaaff Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Mar 2015 15:48:10 +0100 Subject: fix #1170 --- js/reveal.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 8162a17..d9ba333 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3501,14 +3501,17 @@ // If there are media elements with data-autoplay, // automatically set the autoSlide duration to the - // length of that media - toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { - if( el.hasAttribute( 'data-autoplay' ) ) { - if( autoSlide && el.duration * 1000 > autoSlide ) { - autoSlide = ( el.duration * 1000 ) + 1000; + // length of that media. Not applicable if the slide + // is divided up into fragments. + if( currentSlide.querySelectorAll( '.fragment' ).length === 0 ) { + toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { + if( el.hasAttribute( 'data-autoplay' ) ) { + if( autoSlide && el.duration * 1000 > autoSlide ) { + autoSlide = ( el.duration * 1000 ) + 1000; + } } - } - } ); + } ); + } // Cue the next auto-slide if: // - There is an autoSlide value -- cgit v1.2.3 From 152271efb26034c0fe8b898a5cad61939f542c99 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 4 May 2015 20:22:32 -0400 Subject: lazy loading fallback also considers iframes --- js/reveal.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index d9ba333..79c8bbb 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -238,14 +238,18 @@ if( !features.transforms2d && !features.transforms3d ) { document.body.setAttribute( 'class', 'no-transforms' ); - // Since JS won't be running any further, we need to load all - // images that were intended to lazy load now - var images = document.getElementsByTagName( 'img' ); - for( var i = 0, len = images.length; i < len; i++ ) { - var image = images[i]; - if( image.getAttribute( 'data-src' ) ) { - image.setAttribute( 'src', image.getAttribute( 'data-src' ) ); - image.removeAttribute( 'data-src' ); + // Since JS won't be running any further, we load all lazy + // loading elements upfront + var images = toArray( document.getElementsByTagName( 'img' ) ), + iframes = toArray( document.getElementsByTagName( 'iframe' ) ); + + var lazyLoadable = images.concat( iframes ); + + for( var i = 0, len = lazyLoadable.length; i < len; i++ ) { + var element = lazyLoadable[i]; + if( element.getAttribute( 'data-src' ) ) { + element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); + element.removeAttribute( 'data-src' ); } } -- cgit v1.2.3 From 7dd33f188fe14fd3cfa358aad523410d646c98fb Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 4 May 2015 20:58:58 -0400 Subject: lazy-load iframes only for current slide, unload when hidden --- js/reveal.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 79c8bbb..ad99fdc 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2723,7 +2723,7 @@ slide.style.display = 'block'; // Media elements with data-src attributes - toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ) ).forEach( function( element ) { + toArray( slide.querySelectorAll( 'img[data-src]', 'video[data-src]', 'audio[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); element.removeAttribute( 'data-src' ); } ); @@ -2909,19 +2909,24 @@ } } ); - // iframe embeds + // Lazy loading iframes + toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( element ) { + element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); + } ); + + // Generic postMessage API for non-lazy loaded iframes toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) { el.contentWindow.postMessage( 'slide:start', '*' ); }); - // YouTube embeds + // YouTube postMessage API toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) { if( el.hasAttribute( 'data-autoplay' ) ) { el.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' ); } }); - // Vimeo embeds + // Vimeo postMessage API toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { if( el.hasAttribute( 'data-autoplay' ) ) { el.contentWindow.postMessage( '{"method":"play"}', '*' ); @@ -2945,19 +2950,24 @@ } } ); - // iframe embeds + // Lazy loading iframes + toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( element ) { + element.removeAttribute( 'src' ); + } ); + + // Generic postMessage API for non-lazy loaded iframes toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) { el.contentWindow.postMessage( 'slide:stop', '*' ); }); - // YouTube embeds + // YouTube postMessage API toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) { if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) { el.contentWindow.postMessage( '{"event":"command","func":"pauseVideo","args":""}', '*' ); } }); - // Vimeo embeds + // Vimeo postMessage API toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) { el.contentWindow.postMessage( '{"method":"pause"}', '*' ); -- cgit v1.2.3 From 3cd871eac0d1b737b344fc79fdafde22be848896 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 4 May 2015 21:08:41 -0400 Subject: typo --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ad99fdc..3bd292a 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -30,7 +30,7 @@ VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section', HOME_SLIDE_SELECTOR = '.slides>section:first-of-type', - // Configurations defaults, can be overridden at initialization time + // Configuration defaults, can be overridden at initialization time config = { // The "normal" size of the presentation, aspect ratio will be preserved @@ -1136,7 +1136,7 @@ } /** - * Measures the distance in pixels between point a and point b. + * Converts various color input formats to an {r:0,g:0,b:0} object. * * @param {String} color The string representation of a color, * the following formats are supported: -- cgit v1.2.3 From 207b0c71ede4a37ec06797802c22e7c5d61346f6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 6 May 2015 11:25:50 +0200 Subject: fix lazy load selector error --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 3bd292a..ecba3a9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2723,7 +2723,7 @@ slide.style.display = 'block'; // Media elements with data-src attributes - toArray( slide.querySelectorAll( 'img[data-src]', 'video[data-src]', 'audio[data-src]' ) ).forEach( function( element ) { + toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); element.removeAttribute( 'data-src' ); } ); -- cgit v1.2.3 From d14727b40747a032fe6f5aec89afea03e4bbb9cb Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 6 May 2015 11:28:21 +0200 Subject: type check to ensure we don't call media api before media has loaded --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ecba3a9..7619005 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2904,7 +2904,7 @@ // HTML5 media elements toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { - if( el.hasAttribute( 'data-autoplay' ) ) { + if( el.hasAttribute( 'data-autoplay' ) && typeof el.play === 'function' ) { el.play(); } } ); @@ -2945,7 +2945,7 @@ if( slide && slide.parentNode ) { // HTML5 media elements toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { - if( !el.hasAttribute( 'data-ignore' ) ) { + if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) { el.pause(); } } ); -- cgit v1.2.3 From bf6a426cf29a675fb3d8f6e20376207bee10838f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 6 May 2015 17:30:08 +0200 Subject: sync starts playing new embedded content --- js/reveal.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 7619005..60b8292 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2197,6 +2197,7 @@ updateSlidesVisibility(); formatEmbeddedContent(); + startEmbeddedContent( currentSlide ); if( isOverview() ) { layoutOverview(); -- cgit v1.2.3 From af270a909cdbf0de6edd25dfac4aeae0a58e8ab7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 7 May 2015 10:09:50 +0200 Subject: iframe postmesssage api works with lazy loaded iframes --- js/reveal.js | 60 +++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 23 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 60b8292..2c55833 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2910,29 +2910,42 @@ } } ); + // Normal iframes + toArray( slide.querySelectorAll( 'iframe[src]' ) ).forEach( function( el ) { + startEmbeddedIframe( { target: el } ); + } ); + // Lazy loading iframes - toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( element ) { - element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); + toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) { + if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) { + el.removeEventListener( 'load', startEmbeddedIframe ); // remove first to avoid dupes + el.addEventListener( 'load', startEmbeddedIframe ); + el.setAttribute( 'src', el.getAttribute( 'data-src' ) ); + } } ); + } - // Generic postMessage API for non-lazy loaded iframes - toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) { - el.contentWindow.postMessage( 'slide:start', '*' ); - }); + } - // YouTube postMessage API - toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) { - if( el.hasAttribute( 'data-autoplay' ) ) { - el.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' ); - } - }); + /** + * "Starts" the content of an embedded iframe using the + * postmessage API. + */ + function startEmbeddedIframe( event ) { - // Vimeo postMessage API - toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { - if( el.hasAttribute( 'data-autoplay' ) ) { - el.contentWindow.postMessage( '{"method":"play"}', '*' ); - } - }); + var iframe = event.target; + + // YouTube postMessage API + if( /youtube\.com\/embed\//.test( iframe.getAttribute( 'src' ) ) && iframe.hasAttribute( 'data-autoplay' ) ) { + iframe.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' ); + } + // Vimeo postMessage API + else if( /player\.vimeo\.com\//.test( iframe.getAttribute( 'src' ) ) && iframe.hasAttribute( 'data-autoplay' ) ) { + iframe.contentWindow.postMessage( '{"method":"play"}', '*' ); + } + // Generic postMessage API + else { + iframe.contentWindow.postMessage( 'slide:start', '*' ); } } @@ -2951,14 +2964,10 @@ } } ); - // Lazy loading iframes - toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( element ) { - element.removeAttribute( 'src' ); - } ); - // Generic postMessage API for non-lazy loaded iframes toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) { el.contentWindow.postMessage( 'slide:stop', '*' ); + el.removeEventListener( 'load', startEmbeddedIframe ); }); // YouTube postMessage API @@ -2974,6 +2983,11 @@ el.contentWindow.postMessage( '{"method":"pause"}', '*' ); } }); + + // Lazy loading iframes + toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) { + el.removeAttribute( 'src' ); + } ); } } -- cgit v1.2.3 From e16a220a624cc3f9888ae59feebbd989669a7f31 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 7 May 2015 16:36:57 +0200 Subject: fix iframe unload in firefox --- js/reveal.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 2c55833..c46ddb6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2986,6 +2986,9 @@ // Lazy loading iframes toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) { + // Only removing the src doesn't actually unload the frame + // in all browsers (Firefox) so we set it to blank first + el.setAttribute( 'src', 'about:blank' ); el.removeAttribute( 'src' ); } ); } -- cgit v1.2.3 From 5f90a449cf1fa6edc93aaa4e69e6152c6096cd2e Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 8 May 2015 08:55:26 +0200 Subject: consider lazy loaded iframes when formatting src --- js/reveal.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index c46ddb6..ff5ea53 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2871,21 +2871,22 @@ */ function formatEmbeddedContent() { + var _appendParamToIframeSource = function( sourceAttribute, sourceURL, param ) { + toArray( dom.slides.querySelectorAll( 'iframe['+ sourceAttribute +'*="'+ sourceURL +'"]' ) ).forEach( function( el ) { + var src = el.getAttribute( sourceAttribute ); + if( src && src.indexOf( param ) === -1 ) { + el.setAttribute( sourceAttribute, src + ( !/\?/.test( src ) ? '?' : '&' ) + param ); + } + }); + }; + // YouTube frames must include "?enablejsapi=1" - toArray( dom.slides.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) { - var src = el.getAttribute( 'src' ); - if( !/enablejsapi\=1/gi.test( src ) ) { - el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'enablejsapi=1' ); - } - }); + _appendParamToIframeSource( 'src', 'youtube.com/embed/', 'enablejsapi=1' ); + _appendParamToIframeSource( 'data-src', 'youtube.com/embed/', 'enablejsapi=1' ); // Vimeo frames must include "?api=1" - toArray( dom.slides.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { - var src = el.getAttribute( 'src' ); - if( !/api\=1/gi.test( src ) ) { - el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'api=1' ); - } - }); + _appendParamToIframeSource( 'src', 'player.vimeo.com/', 'api=1' ); + _appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' ); } -- cgit v1.2.3 From 242f2d6c964111dc3d9a3dd958f80537a6223f13 Mon Sep 17 00:00:00 2001 From: marcysutton Date: Fri, 5 Jun 2015 14:02:46 -0400 Subject: accessibility: controls as buttons, not divs --- js/reveal.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ff5ea53..8964a0c 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -457,10 +457,10 @@ // Arrow controls createSingletonNode( dom.wrapper, 'aside', 'controls', - '' + - '' + - '' + - '' ); + '' + + '' + + '' + + '' ); // Slide number dom.slideNumber = createSingletonNode( dom.wrapper, 'div', 'slide-number', '' ); -- cgit v1.2.3 From b7470fa3239bca8858ee215adf59118ed12fa581 Mon Sep 17 00:00:00 2001 From: teawithfruit Date: Tue, 21 Jul 2015 15:59:19 +0200 Subject: solves early access error with video element This will maybe solve the "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable" error in firefox. --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a0120b4..2b8476f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2612,7 +2612,7 @@ // Start video playback var currentVideo = currentBackground.querySelector( 'video' ); if( currentVideo ) { - currentVideo.currentTime = 0; + if(currentVideo.currentTime > 0) currentVideo.currentTime = 0; currentVideo.play(); } -- cgit v1.2.3 From de3e1daab43a0e126747660b9a62d14512b0f703 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 3 Aug 2015 12:24:38 +0200 Subject: only use zoom to scale presentations up, fixes shifts in text layout --- js/reveal.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a0120b4..738d8a9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1530,13 +1530,20 @@ transformSlides( { layout: '' } ); } else { - // Prefer zooming in desktop Chrome so that content remains crisp - if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { + // Use zoom to scale up in desktop Chrome so that content + // remains crisp. We don't use zoom to scale down since that + // can lead to shifts in text layout/line breaks. + if( scale > 1 && !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; + dom.slides.style.left = ''; + dom.slides.style.top = ''; + dom.slides.style.bottom = ''; + dom.slides.style.right = ''; transformSlides( { layout: '' } ); } // Apply scale transform as a fallback else { + dom.slides.style.zoom = ''; dom.slides.style.left = '50%'; dom.slides.style.top = '50%'; dom.slides.style.bottom = 'auto'; -- cgit v1.2.3 From 0c2898d29fd1548a861f242ec73fa23b1740a15c Mon Sep 17 00:00:00 2001 From: gruber76 Date: Mon, 3 Aug 2015 15:03:10 -0600 Subject: Update reveal.js Removed toLowerCase call --- js/reveal.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ff5ea53..e578412 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3151,7 +3151,6 @@ // Attempt to create a named link based on the slide's ID var id = currentSlide.getAttribute( 'id' ); if( id ) { - id = id.toLowerCase(); id = id.replace( /[^a-zA-Z0-9\-\_\:\.]/g, '' ); } -- cgit v1.2.3 From 1bf236a07932307e4018dc6d376714d71783587f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 14 Aug 2015 23:16:59 +0200 Subject: fix object.keys call on non-object --- js/reveal.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 738d8a9..7a000dc 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3771,13 +3771,17 @@ // keyboard modifier key is present if( activeElementIsCE || activeElementIsInput || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return; - // While paused only allow resume keyboard events; - // 'b', '.' or any key specifically mapped to togglePause - var resumeKeyCodes = [66,190,191].concat( Object.keys( config.keyboard ).map( function( key ) { - if( config.keyboard[key] === 'togglePause' ) { - return parseInt( key, 10 ); - } - })); + // While paused only allow resume keyboard events; 'b', '.'' + var resumeKeyCodes = [66,190,191]; + + // Custom key bindings for togglePause should be able to resume + if( typeof config.keyboard === 'object' ) { + resumeKeyCodes = resumeKeyCodes.concat( Object.keys( config.keyboard ).map( function( key ) { + if( config.keyboard[key] === 'togglePause' ) { + return parseInt( key, 10 ); + } + })); + } if( isPaused() && resumeKeyCodes.indexOf( event.keyCode ) === -1 ) { return false; -- cgit v1.2.3 From b9d9632531308a5d36a8c8bd02871506c217a44b Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 14 Aug 2015 23:25:30 +0200 Subject: simplify --- js/reveal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 7a000dc..bb43188 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3776,11 +3776,11 @@ // Custom key bindings for togglePause should be able to resume if( typeof config.keyboard === 'object' ) { - resumeKeyCodes = resumeKeyCodes.concat( Object.keys( config.keyboard ).map( function( key ) { + for( var key in config.keyboard ) { if( config.keyboard[key] === 'togglePause' ) { - return parseInt( key, 10 ); + resumeKeyCodes.push( parseInt( key, 10 ) ); } - })); + } } if( isPaused() && resumeKeyCodes.indexOf( event.keyCode ) === -1 ) { -- cgit v1.2.3 From b3b8738238ce185329640204b5289d5ec507c5ed Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 14 Aug 2015 23:34:19 +0200 Subject: avoid duplicate var --- js/reveal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index bb43188..90b21d2 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3773,10 +3773,11 @@ // While paused only allow resume keyboard events; 'b', '.'' var resumeKeyCodes = [66,190,191]; + var key; // Custom key bindings for togglePause should be able to resume if( typeof config.keyboard === 'object' ) { - for( var key in config.keyboard ) { + for( key in config.keyboard ) { if( config.keyboard[key] === 'togglePause' ) { resumeKeyCodes.push( parseInt( key, 10 ) ); } @@ -3792,7 +3793,7 @@ // 1. User defined key bindings if( typeof config.keyboard === 'object' ) { - for( var key in config.keyboard ) { + for( key in config.keyboard ) { // Check if this binding matches the pressed key if( parseInt( key, 10 ) === event.keyCode ) { -- cgit v1.2.3 From 5e3bbdeecff0d74d56c2c05f491e1dacfa539059 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 2 Sep 2015 12:58:08 +0200 Subject: formatting --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 913aa28..ad7eaa0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2619,7 +2619,7 @@ // Start video playback var currentVideo = currentBackground.querySelector( 'video' ); if( currentVideo ) { - if(currentVideo.currentTime > 0) currentVideo.currentTime = 0; + if( currentVideo.currentTime > 0 ) currentVideo.currentTime = 0; currentVideo.play(); } -- cgit v1.2.3 From 2ad4065500875f1878ab35c039054e8609b9aaa6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 9 Sep 2015 14:09:37 +0200 Subject: ability to share presentation with speaker notes #304 --- js/reveal.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index ad7eaa0..a19e486 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -92,6 +92,9 @@ // Flags if it should be possible to pause the presentation (blackout) pause: true, + // Flags if speaker notes should be visible to all viewers + showNotes: false, + // Number of milliseconds between automatically proceeding to the // next slide, disabled when set to 0, this value can be overwritten // by using a data-autoslide attribute on your slides @@ -465,6 +468,9 @@ // Slide number dom.slideNumber = createSingletonNode( dom.wrapper, 'div', 'slide-number', '' ); + // Element containing notes that are visible to the audience + dom.speakerNotes = createSingletonNode( dom.wrapper, 'div', 'speaker-notes', null ); + // Overlay graphic which is displayed during the paused mode createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null ); @@ -856,6 +862,13 @@ resume(); } + if( config.showNotes ) { + dom.speakerNotes.classList.add( 'visible' ); + } + else { + dom.speakerNotes.classList.remove( 'visible' ); + } + if( config.mouseWheel ) { document.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF document.addEventListener( 'mousewheel', onDocumentMouseScroll, false ); @@ -2161,6 +2174,7 @@ updateBackground(); updateParallax(); updateSlideNumber(); + updateNotes(); // Update the URL hash writeURL(); @@ -2202,6 +2216,7 @@ updateBackground( true ); updateSlideNumber(); updateSlidesVisibility(); + updateNotes(); formatEmbeddedContent(); startEmbeddedContent( currentSlide ); @@ -2450,6 +2465,37 @@ } + /** + * Pick up notes from the current slide and display tham + * to the viewer. + * + * @see `showNotes` config value + */ + function updateNotes() { + + if( config.showNotes && dom.speakerNotes && currentSlide ) { + + var notes = ''; + + // Notes can be specified via the data-notes attribute... + if( currentSlide.hasAttribute( 'data-notes' ) ) { + notes = currentSlide.getAttribute( 'data-notes' ); + } + + // ... or using an