/*!
* reveal.js 3.1.0 (2015-06-08, 21:17)
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2015 Hakim El Hattab, http://hakim.se
*/
!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(),Jb.transforms2d||Jb.transforms3d){Ib.wrapper=document.querySelector(".reveal"),Ib.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",L,!1);var d=qb.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,p(Cb,a),p(Cb,d),B(),c()}else{document.body.setAttribute("class","no-transforms");for(var e=q(document.getElementsByTagName("img")),f=q(document.getElementsByTagName("iframe")),g=e.concat(f),h=0,i=g.length;i>h;h++){var j=g[h];j.getAttribute("data-src")&&(j.setAttribute("src",j.getAttribute("data-src")),j.removeAttribute("data-src"))}}}function b(){Jb.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,Jb.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,Jb.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,Jb.requestAnimationFrame="function"==typeof Jb.requestAnimationFrameMethod,Jb.canvas=!!document.createElement("canvas").getContext,Jb.touch=!!("ontouchstart"in window),Jb.overviewTransitions=!/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),wb=/(iphone|ipod|ipad|android)/gi.test(navigator.userAgent)}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=Cb.dependencies.length;h>g;g++){var i=Cb.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(),l(),h(),ea(),m(),ya(),la(!0),setTimeout(function(){Ib.slides.classList.remove("no-transition"),Db=!0,D("ready",{indexh:rb,indexv:sb,currentSlide:ub})},1),A()&&(o(),"complete"===document.readyState?g():window.addEventListener("load",g))}function e(){Ib.slides.classList.add("no-transition"),Ib.background=i(Ib.wrapper,"div","backgrounds",null),Ib.progress=i(Ib.wrapper,"div","progress",""),Ib.progressbar=Ib.progress.querySelector("span"),i(Ib.wrapper,"aside","controls",'
'),Ib.slideNumber=i(Ib.wrapper,"div","slide-number",""),i(Ib.wrapper,"div","pause-overlay",null),Ib.controls=document.querySelector(".reveal .controls"),Ib.theme=document.querySelector("#theme"),Ib.wrapper.setAttribute("role","application"),Ib.controlsLeft=q(document.querySelectorAll(".navigate-left")),Ib.controlsRight=q(document.querySelectorAll(".navigate-right")),Ib.controlsUp=q(document.querySelectorAll(".navigate-up")),Ib.controlsDown=q(document.querySelectorAll(".navigate-down")),Ib.controlsPrev=q(document.querySelectorAll(".navigate-prev")),Ib.controlsNext=q(document.querySelectorAll(".navigate-next")),Ib.statusDiv=f()}function f(){var a=document.getElementById("aria-status-div");return a||(a=document.createElement("div"),a.style.position="absolute",a.style.height="1px",a.style.width="1px",a.style.overflow="hidden",a.style.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","aria-status-div"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),Ib.wrapper.appendChild(a)),a}function g(){var a=N(window.innerWidth,window.innerHeight),b=Math.floor(a.width*(1+Cb.margin)),c=Math.floor(a.height*(1+Cb.margin)),d=a.width,e=a.height;v("@page{size:"+b+"px "+c+"px; margin: 0;}"),v(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+d+"px; max-height:"+e+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=b+"px",document.body.style.height=c+"px",q(Ib.wrapper.querySelectorAll(yb)).forEach(function(a){if(a.classList.contains("stack")===!1){var f=(b-d)/2,g=(c-e)/2,h=y(a),i=Math.max(Math.ceil(h/c),1);(1===i&&Cb.center||a.classList.contains("center"))&&(g=Math.max((c-h)/2,0)),a.style.left=f+"px",a.style.top=g+"px",a.style.width=d+"px";var j=a.querySelector(".slide-background");j&&(j.style.width=b+"px",j.style.height=c*i+"px",j.style.top=-g+"px",j.style.left=-f+"px")}}),q(Ib.wrapper.querySelectorAll(yb+" .fragment")).forEach(function(a){a.classList.add("visible")})}function h(){Ib.slides.querySelector("iframe")&&setInterval(function(){(0!==Ib.wrapper.scrollTop||0!==Ib.wrapper.scrollLeft)&&(Ib.wrapper.scrollTop=0,Ib.wrapper.scrollLeft=0)},500)}function i(a,b,c,d){for(var e=a.querySelectorAll("."+c),f=0;f1&&Cb.autoSlide&&Cb.autoSlideStoppable&&Jb.canvas&&Jb.requestAnimationFrame&&(xb=new pb(Ib.wrapper,function(){return Math.min(Math.max((Date.now()-Pb)/Nb,0),1)}),xb.on("click",ob),Qb=!1),Cb.fragments===!1&&q(Ib.slides.querySelectorAll(".fragment")).forEach(function(a){a.classList.add("visible"),a.classList.remove("current-fragment")}),da()}function n(){if(Mb=!0,window.addEventListener("hashchange",jb,!1),window.addEventListener("resize",kb,!1),Cb.touch&&(Ib.wrapper.addEventListener("touchstart",Xa,!1),Ib.wrapper.addEventListener("touchmove",Ya,!1),Ib.wrapper.addEventListener("touchend",Za,!1),window.navigator.pointerEnabled?(Ib.wrapper.addEventListener("pointerdown",$a,!1),Ib.wrapper.addEventListener("pointermove",_a,!1),Ib.wrapper.addEventListener("pointerup",ab,!1)):window.navigator.msPointerEnabled&&(Ib.wrapper.addEventListener("MSPointerDown",$a,!1),Ib.wrapper.addEventListener("MSPointerMove",_a,!1),Ib.wrapper.addEventListener("MSPointerUp",ab,!1))),Cb.keyboard&&(document.addEventListener("keydown",Wa,!1),document.addEventListener("keypress",Va,!1)),Cb.progress&&Ib.progress&&Ib.progress.addEventListener("click",cb,!1),Cb.focusBodyOnPageVisibilityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,lb,!1)}var b=["touchstart","click"];navigator.userAgent.match(/android/gi)&&(b=["touchstart"]),b.forEach(function(a){Ib.controlsLeft.forEach(function(b){b.addEventListener(a,db,!1)}),Ib.controlsRight.forEach(function(b){b.addEventListener(a,eb,!1)}),Ib.controlsUp.forEach(function(b){b.addEventListener(a,fb,!1)}),Ib.controlsDown.forEach(function(b){b.addEventListener(a,gb,!1)}),Ib.controlsPrev.forEach(function(b){b.addEventListener(a,hb,!1)}),Ib.controlsNext.forEach(function(b){b.addEventListener(a,ib,!1)})})}function o(){Mb=!1,document.removeEventListener("keydown",Wa,!1),document.removeEventListener("keypress",Va,!1),window.removeEventListener("hashchange",jb,!1),window.removeEventListener("resize",kb,!1),Ib.wrapper.removeEventListener("touchstart",Xa,!1),Ib.wrapper.removeEventListener("touchmove",Ya,!1),Ib.wrapper.removeEventListener("touchend",Za,!1),window.navigator.pointerEnabled?(Ib.wrapper.removeEventListener("pointerdown",$a,!1),Ib.wrapper.removeEventListener("pointermove",_a,!1),Ib.wrapper.removeEventListener("pointerup",ab,!1)):window.navigator.msPointerEnabled&&(Ib.wrapper.removeEventListener("MSPointerDown",$a,!1),Ib.wrapper.removeEventListener("MSPointerMove",_a,!1),Ib.wrapper.removeEventListener("MSPointerUp",ab,!1)),Cb.progress&&Ib.progress&&Ib.progress.removeEventListener("click",cb,!1),["touchstart","click"].forEach(function(a){Ib.controlsLeft.forEach(function(b){b.removeEventListener(a,db,!1)}),Ib.controlsRight.forEach(function(b){b.removeEventListener(a,eb,!1)}),Ib.controlsUp.forEach(function(b){b.removeEventListener(a,fb,!1)}),Ib.controlsDown.forEach(function(b){b.removeEventListener(a,gb,!1)}),Ib.controlsPrev.forEach(function(b){b.removeEventListener(a,hb,!1)}),Ib.controlsNext.forEach(function(b){b.removeEventListener(a,ib,!1)})})}function p(a,b){for(var c in b)a[c]=b[c]}function q(a){return Array.prototype.slice.call(a)}function r(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 s(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function t(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.transform=b}function u(a){"string"==typeof a.layout&&(Hb.layout=a.layout),"string"==typeof a.overview&&(Hb.overview=a.overview),Hb.layout?t(Ib.slides,Hb.layout+" "+Hb.overview):t(Ib.slides,Hb.overview)}function v(a){var b=document.createElement("style");b.type="text/css",b.styleSheet?b.styleSheet.cssText=a:b.appendChild(document.createTextNode(a)),document.getElementsByTagName("head")[0].appendChild(b)}function w(a){var b=a.match(/^#([0-9a-f]{3})$/i);if(b&&b[1])return b=b[1],{r:17*parseInt(b.charAt(0),16),g:17*parseInt(b.charAt(1),16),b:17*parseInt(b.charAt(2),16)};var c=a.match(/^#([0-9a-f]{6})$/i);if(c&&c[1])return c=c[1],{r:parseInt(c.substr(0,2),16),g:parseInt(c.substr(2,2),16),b:parseInt(c.substr(4,2),16)};var d=a.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(d)return{r:parseInt(d[1],10),g:parseInt(d[2],10),b:parseInt(d[3],10)};var e=a.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return e?{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10),a:parseFloat(e[4])}:null}function x(a){return"string"==typeof a&&(a=w(a)),a?(299*a.r+587*a.g+114*a.b)/1e3:null}function y(a){var b=0;if(a){var c=0;q(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===window.getComputedStyle(a).position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function z(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 A(){return/print-pdf/gi.test(window.location.search)}function B(){Cb.hideAddressBar&&wb&&(window.addEventListener("load",C,!1),window.addEventListener("orientationchange",C,!1))}function C(){setTimeout(function(){window.scrollTo(0,1)},10)}function D(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),p(c,b),Ib.wrapper.dispatchEvent(c),Cb.postMessageEvents&&window.parent!==window.self&&window.parent.postMessage(JSON.stringify({namespace:"reveal",eventName:a,state:Ea()}),"*")}function E(){if(Jb.transforms3d&&!("msPerspective"in document.body.style))for(var a=Ib.wrapper.querySelectorAll(yb+" 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 F(){for(var a=Ib.wrapper.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 G(a){var b=q(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",nb,!1)})}function H(){var a=q(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",nb,!1)})}function I(a){K(),Ib.overlay=document.createElement("div"),Ib.overlay.classList.add("overlay"),Ib.overlay.classList.add("overlay-preview"),Ib.wrapper.appendChild(Ib.overlay),Ib.overlay.innerHTML=["",'','','',"
"].join(""),Ib.overlay.querySelector("iframe").addEventListener("load",function(a){Ib.overlay.classList.add("loaded")},!1),Ib.overlay.querySelector(".close").addEventListener("click",function(a){K(),a.preventDefault()},!1),Ib.overlay.querySelector(".external").addEventListener("click",function(a){K()},!1),setTimeout(function(){Ib.overlay.classList.add("visible")},1)}function J(){if(Cb.help){K(),Ib.overlay=document.createElement("div"),Ib.overlay.classList.add("overlay"),Ib.overlay.classList.add("overlay-help"),Ib.wrapper.appendChild(Ib.overlay);var a='Keyboard Shortcuts
';a+="KEY | ACTION | ";for(var b in Sb)a+=""+b+" | "+Sb[b]+" |
";a+="
",Ib.overlay.innerHTML=["",'"].join(""),Ib.overlay.querySelector(".close").addEventListener("click",function(a){K(),a.preventDefault()},!1),setTimeout(function(){Ib.overlay.classList.add("visible")},1)}}function K(){Ib.overlay&&(Ib.overlay.parentNode.removeChild(Ib.overlay),Ib.overlay=null)}function L(){if(Ib.wrapper&&!A()){var a=N(),b=20;M(Cb.width,Cb.height,b),Ib.slides.style.width=a.width+"px",Ib.slides.style.height=a.height+"px",Gb=Math.min(a.presentationWidth/a.width,a.presentationHeight/a.height),Gb=Math.max(Gb,Cb.minScale),Gb=Math.min(Gb,Cb.maxScale),1===Gb?(Ib.slides.style.zoom="",Ib.slides.style.left="",Ib.slides.style.top="",Ib.slides.style.bottom="",Ib.slides.style.right="",u({layout:""})):!wb&&/chrome/i.test(navigator.userAgent)&&"undefined"!=typeof Ib.slides.style.zoom?(Ib.slides.style.zoom=Gb,u({layout:""})):(Ib.slides.style.left="50%",Ib.slides.style.top="50%",Ib.slides.style.bottom="auto",Ib.slides.style.right="auto",u({layout:"translate(-50%, -50%) scale("+Gb+")"}));for(var c=q(Ib.wrapper.querySelectorAll(yb)),d=0,e=c.length;e>d;d++){var f=c[d];"none"!==f.style.display&&(Cb.center||f.classList.contains("center")?f.classList.contains("stack")?f.style.top=0:f.style.top=Math.max((a.height-y(f))/2-b,0)+"px":f.style.top="")}ia(),ma()}}function M(a,b,c){q(Ib.slides.querySelectorAll("section > .stretch")).forEach(function(c){var d=z(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 N(a,b){var c={width:Cb.width,height:Cb.height,presentationWidth:a||Ib.wrapper.offsetWidth,presentationHeight:b||Ib.wrapper.offsetHeight};return c.presentationWidth-=c.presentationWidth*Cb.margin,c.presentationHeight-=c.presentationHeight*Cb.margin,"string"==typeof c.width&&/%$/.test(c.width)&&(c.width=parseInt(c.width,10)/100*c.presentationWidth),"string"==typeof c.height&&/%$/.test(c.height)&&(c.height=parseInt(c.height,10)/100*c.presentationHeight),c}function O(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function P(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 Q(){Cb.overview&&!V()&&(Eb=!0,Ib.wrapper.classList.add("overview"),Ib.wrapper.classList.remove("overview-deactivating"),Jb.overviewTransitions&&setTimeout(function(){Ib.wrapper.classList.add("overview-animated")},1),La(),Ib.slides.appendChild(Ib.background),q(Ib.wrapper.querySelectorAll(yb)).forEach(function(a){a.classList.contains("stack")||a.addEventListener("click",mb,!0)}),ha(),R(),S(),L(),D("overviewshown",{indexh:rb,indexv:sb,currentSlide:ub}))}function R(){var a=70,b=Cb.width+a,c=Cb.height+a;Cb.rtl&&(b=-b),q(Ib.wrapper.querySelectorAll(zb)).forEach(function(a,d){a.setAttribute("data-index-h",d),t(a,"translate3d("+d*b+"px, 0, 0)"),a.classList.contains("stack")&&q(a.querySelectorAll("section")).forEach(function(a,b){a.setAttribute("data-index-h",d),a.setAttribute("data-index-v",b),t(a,"translate3d(0, "+b*c+"px, 0)")})}),q(Ib.background.childNodes).forEach(function(a,d){t(a,"translate3d("+d*b+"px, 0, 0)"),q(a.querySelectorAll(".slide-background")).forEach(function(a,b){t(a,"translate3d(0, "+b*c+"px, 0)")})})}function S(){var a=70,b=Cb.width+a,c=Cb.height+a;Cb.rtl&&(b=-b),u({overview:["translateX("+-rb*b+"px)","translateY("+-sb*c+"px)","translateZ("+(window.innerWidth<400?-1e3:-2500)+"px)"].join(" ")})}function T(){Cb.overview&&(Eb=!1,Ib.wrapper.classList.remove("overview"),Ib.wrapper.classList.remove("overview-animated"),Ib.wrapper.classList.add("overview-deactivating"),setTimeout(function(){Ib.wrapper.classList.remove("overview-deactivating")},1),Ib.wrapper.appendChild(Ib.background),q(Ib.wrapper.querySelectorAll(yb)).forEach(function(a){t(a,""),a.removeEventListener("click",mb,!0)}),q(Ib.background.querySelectorAll(".slide-background")).forEach(function(a){t(a,"")}),u({overview:""}),ca(rb,sb),L(),Ka(),D("overviewhidden",{indexh:rb,indexv:sb,currentSlide:ub}))}function U(a){"boolean"==typeof a?a?Q():T():V()?T():Q()}function V(){return Eb}function W(a){return a=a?a:ub,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function X(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;b&&b.apply(a)}function Y(){if(Cb.pause){var a=Ib.wrapper.classList.contains("paused");La(),Ib.wrapper.classList.add("paused"),a===!1&&D("paused")}}function Z(){var a=Ib.wrapper.classList.contains("paused");Ib.wrapper.classList.remove("paused"),Ka(),a&&D("resumed")}function $(a){"boolean"==typeof a?a?Y():Z():_()?Z():Y()}function _(){return Ib.wrapper.classList.contains("paused")}function aa(a){"boolean"==typeof a?a?Na():Ma():Qb?Na():Ma()}function ba(){return!(!Nb||Qb)}function ca(a,b,c,d){tb=ub;var e=Ib.wrapper.querySelectorAll(zb);void 0!==b||V()||(b=P(e[a])),tb&&tb.parentNode&&tb.parentNode.classList.contains("stack")&&O(tb.parentNode,sb);var f=Fb.concat();Fb.length=0;var g=rb||0,h=sb||0;rb=ga(zb,void 0===a?rb:a),sb=ga(Ab,void 0===b?sb:b),ha(),L();a:for(var i=0,j=Fb.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 fa(){var a=q(Ib.wrapper.querySelectorAll(zb));a.forEach(function(a){var b=q(a.querySelectorAll("section"));b.forEach(function(a,b){Ga(a.querySelectorAll(".fragment"))}),0===b.length&&Ga(a.querySelectorAll(".fragment"))})}function ga(a,b){var c=q(Ib.wrapper.querySelectorAll(a)),d=c.length,e=A();if(d){Cb.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var f=0;d>f;f++){var g=c[f],h=Cb.rtl&&!W(g);if(g.classList.remove("past"),g.classList.remove("present"),g.classList.remove("future"),g.setAttribute("hidden",""),g.setAttribute("aria-hidden","true"),g.querySelector("section")&&g.classList.add("stack"),e)g.classList.add("present");else if(b>f){if(g.classList.add(h?"future":"past"),Cb.fragments)for(var i=q(g.querySelectorAll(".fragment"));i.length;){var j=i.pop();j.classList.add("visible"),j.classList.remove("current-fragment")}}else if(f>b&&(g.classList.add(h?"past":"future"),Cb.fragments))for(var k=q(g.querySelectorAll(".fragment.visible"));k.length;){var l=k.pop();l.classList.remove("visible"),l.classList.remove("current-fragment")}}c[b].classList.add("present"),c[b].removeAttribute("hidden"),c[b].removeAttribute("aria-hidden");var m=c[b].getAttribute("data-state");m&&(Fb=Fb.concat(m.split(" ")))}else b=0;return b}function ha(){var a,b,c=q(Ib.wrapper.querySelectorAll(zb)),d=c.length;if(d&&"undefined"!=typeof rb){var e=V()?10:Cb.viewDistance;wb&&(e=V()?6:2),A()&&(e=Number.MAX_VALUE);for(var f=0;d>f;f++){var g=c[f],h=q(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((rb||0)-f)||0,Cb.loop&&(a=Math.abs(((rb||0)-f)%(d-e))||0),e>a?na(g):oa(g),i)for(var j=P(g),k=0;i>k;k++){var l=h[k];b=f===(rb||0)?Math.abs((sb||0)-k):Math.abs(k-j),e>a+b?na(l):oa(l)}}}}function ia(){Cb.progress&&Ib.progressbar&&(Ib.progressbar.style.width=wa()*Ib.wrapper.offsetWidth+"px")}function ja(){if(Cb.slideNumber&&Ib.slideNumber){var a="c";"string"==typeof Cb.slideNumber&&(a=Cb.slideNumber),Ib.slideNumber.innerHTML=a.replace(/h/g,rb).replace(/v/g,sb).replace(/c/g,va()+1).replace(/t/g,Ba())}}function ka(){var a=pa(),b=qa();Ib.controlsLeft.concat(Ib.controlsRight).concat(Ib.controlsUp).concat(Ib.controlsDown).concat(Ib.controlsPrev).concat(Ib.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&Ib.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&Ib.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&Ib.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&Ib.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&Ib.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&Ib.controlsNext.forEach(function(a){a.classList.add("enabled")}),ub&&(b.prev&&Ib.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&Ib.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),W(ub)?(b.prev&&Ib.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&Ib.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&Ib.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&Ib.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function la(a){var b=null,c=Cb.rtl?"future":"past",d=Cb.rtl?"past":"future";if(q(Ib.background.childNodes).forEach(function(e,f){e.classList.remove("past"),e.classList.remove("present"),e.classList.remove("future"),rb>f?e.classList.add(c):f>rb?e.classList.add(d):(e.classList.add("present"),b=e),(a||f===rb)&&q(e.querySelectorAll(".slide-background")).forEach(function(a,c){a.classList.remove("past"),a.classList.remove("present"),a.classList.remove("future"),sb>c?a.classList.add("past"):c>sb?a.classList.add("future"):(a.classList.add("present"),f===rb&&(b=a))})}),vb){var e=vb.querySelector("video");e&&e.pause()}if(b){var f=b.querySelector("video");f&&(f.currentTime=0,f.play());var g=b.style.backgroundImage||"";/\.gif/i.test(g)&&(b.style.backgroundImage="",window.getComputedStyle(b).opacity,b.style.backgroundImage=g);var h=vb?vb.getAttribute("data-background-hash"):null,i=b.getAttribute("data-background-hash");i&&i===h&&b!==vb&&Ib.background.classList.add("no-transition"),vb=b}ub&&["has-light-background","has-dark-background"].forEach(function(a){ub.classList.contains(a)?Ib.wrapper.classList.add(a):Ib.wrapper.classList.remove(a)}),setTimeout(function(){Ib.background.classList.remove("no-transition")},1)}function ma(){if(Cb.parallaxBackgroundImage){var a,b,c=Ib.wrapper.querySelectorAll(zb),d=Ib.wrapper.querySelectorAll(Ab),e=Ib.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,g,h=Ib.background.offsetWidth,i=c.length;f="number"==typeof Cb.parallaxBackgroundHorizontal?Cb.parallaxBackgroundHorizontal:(a-h)/(i-1),g=f*rb*-1;var j,k,l=Ib.background.offsetHeight,m=d.length;j="number"==typeof Cb.parallaxBackgroundVertical?Cb.parallaxBackgroundVertical:(b-l)/(m-1),k=m>0?j*sb*1:0,Ib.background.style.backgroundPosition=g+"px "+-k+"px"}}function na(a){a.style.display="block",q(a.querySelectorAll("img[data-src], video[data-src], audio[data-src]")).forEach(function(a){a.setAttribute("src",a.getAttribute("data-src")),a.removeAttribute("data-src")}),q(a.querySelectorAll("video, audio")).forEach(function(a){var b=0;q(a.querySelectorAll("source[data-src]")).forEach(function(a){a.setAttribute("src",a.getAttribute("data-src")),a.removeAttribute("data-src"),b+=1}),b>0&&a.load()});var b=Aa(a),c=Da(b.h,b.v);if(c&&(c.style.display="block",c.hasAttribute("data-loaded")===!1)){c.setAttribute("data-loaded","true");var d=a.getAttribute("data-background-image"),e=a.getAttribute("data-background-video"),f=a.hasAttribute("data-background-video-loop"),g=a.getAttribute("data-background-iframe");if(d)c.style.backgroundImage="url("+d+")";else if(e&&!xa()){var h=document.createElement("video");f&&h.setAttribute("loop",""),e.split(",").forEach(function(a){h.innerHTML+='