aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2020-03-07 18:22:19 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2020-03-07 18:22:19 +0100
commitd4a030f953df0e34ad288ab12fe9b8d09e5cade9 (patch)
treefc841fd3f61586ed9c1525b25db321979aaa5c8e
parent0814176f3c22f511afd88fc0dc514e4c7338a5e7 (diff)
downloadfosdem-2021-minimalism-presentation-d4a030f953df0e34ad288ab12fe9b8d09e5cade9.tar
fosdem-2021-minimalism-presentation-d4a030f953df0e34ad288ab12fe9b8d09e5cade9.tar.gz
move plugin logic to Plugins controller
-rw-r--r--demo.html6
-rw-r--r--dist/reveal.css2
-rw-r--r--dist/reveal.min.js2
-rw-r--r--gulpfile.js6
-rw-r--r--js/controllers/plugins.js193
-rw-r--r--js/index.js15
-rw-r--r--js/reveal.js198
7 files changed, 235 insertions, 187 deletions
diff --git a/demo.html b/demo.html
index 8249a0b..d68215d 100644
--- a/demo.html
+++ b/demo.html
@@ -411,8 +411,10 @@ Reveal.addEventListener( 'customevent', function() {
<script type="module">
// WIP support for multiple reveal.js instances
- // let a = new Reveal(document.querySelector( '.reveal' ), {controls: false});
- // let b = new Reveal(document.querySelector( '.reveal' ), {controls: true});
+ // window.a = new Reveal(document.querySelector( '.reveal' ), {controls: false});
+ // a.initialize();
+ // window.b = new Reveal(document.querySelector( '.reveal' ), {controls: true});
+ // b.initialize();
// console.log(a.getConfig().controls,b.getConfig().controls);
// More info https://github.com/hakimel/reveal.js#configuration
diff --git a/dist/reveal.css b/dist/reveal.css
index 406c611..d0835a7 100644
--- a/dist/reveal.css
+++ b/dist/reveal.css
@@ -1,5 +1,5 @@
/*!
-* reveal.js 4.0.0-dev (Fri Mar 06 2020)
+* reveal.js 4.0.0-dev (Sat Mar 07 2020)
* https://revealjs.com
* MIT licensed
*
diff --git a/dist/reveal.min.js b/dist/reveal.min.js
index d642437..0231cfc 100644
--- a/dist/reveal.min.js
+++ b/dist/reveal.min.js
@@ -5,4 +5,4 @@
*
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
*/
-!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,a){"use strict";a.r(t);class r{constructor(e,t){this.diameter=100,this.diameter2=this.diameter/2,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=e,this.progressCheck=t,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}setPlaying(e){const t=this.playing;this.playing=e,!t&&this.playing?this.animate():this.render()}animate(){const e=this.progress;this.progress=this.progressCheck(),e>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&requestAnimationFrame(this.animate.bind(this))}render(){let e=this.playing?this.progress:0,t=this.diameter2-this.thickness,a=this.diameter2,r=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);const n=-Math.PI/2+e*(2*Math.PI),i=-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(a,r,t+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(a,r,t,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(a,r,t,i,n,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(a-14,r-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,28),this.context.fillRect(18,0,10,28)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,28),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()}on(e,t){this.canvas.addEventListener(e,t,!1)}off(e,t){this.canvas.removeEventListener(e,t,!1)}destroy(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)}}var n={width:960,height:700,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,showSlideNumber:"all",hashOneBasedIndex:!1,hash:!1,history:!1,keyboard:!0,keyboardCondition:null,overview:!0,disableLayout:!1,center:!0,touch:!0,loop:!1,rtl:!1,navigationMode:"default",shuffle:!1,fragments:!0,fragmentInURL:!1,embedded:!1,help:!0,pause:!0,showNotes:!1,autoPlayMedia:null,preloadIframes:null,autoAnimate:!0,autoAnimateMatcher:null,autoAnimateEasing:"ease",autoAnimateDuration:1,autoAnimateUnmatched:!0,autoAnimateStyles:["opacity","color","background-color","padding","font-size","line-height","letter-spacing","border-width","border-color","border-radius","outline","outline-offset"],autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,mobileViewDistance:2,display:"block",hideInactiveCursor:!0,hideCursorTime:5e3,dependencies:[]};const i=(e,t)=>{for(let a in t)e[a]=t[a];return e},o=e=>Array.prototype.slice.call(e),s=e=>{if("string"==typeof e){if("null"===e)return null;if("true"===e)return!0;if("false"===e)return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e},l=(e,t)=>{e.style.transform=t},d=e=>{let t=document.createElement("style");t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)},c=(e,t)=>{let a=e.parentNode;for(;a;){let e=a.matches||a.matchesSelector||a.msMatchesSelector;if(e&&e.call(a,t))return a;a=a.parentNode}return null},u=e=>{let t=e.match(/^#([0-9a-f]{3})$/i);if(t&&t[1])return t=t[1],{r:17*parseInt(t.charAt(0),16),g:17*parseInt(t.charAt(1),16),b:17*parseInt(t.charAt(2),16)};let a=e.match(/^#([0-9a-f]{6})$/i);if(a&&a[1])return a=a[1],{r:parseInt(a.substr(0,2),16),g:parseInt(a.substr(2,2),16),b:parseInt(a.substr(4,2),16)};let r=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(r)return{r:parseInt(r[1],10),g:parseInt(r[2],10),b:parseInt(r[3],10)};let n=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return n?{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10),a:parseFloat(n[4])}:null};var p=function(e,t){let a;const p=navigator.userAgent,h=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/;let f,g,m,v,b,y,w,A,k,E,S=!1,L=!1,x=null,M=null,N=!1,q=!1,I=[],P=1,T={layout:"",overview:""},C={},O={},R=[],D={},B=0,H=0,z=!1,j=0,$=!1,W=0,F=0,U=0,V=-1,X=!1,Y={startX:0,startY:0,startCount:0,captured:!1,threshold:40},K={},_={};function J(){let e=Object.keys(O).length;if(0===e)Q();else{let t=()=>{0==--e&&Q()};for(let e in O){let a=O[e];if("function"==typeof a.init){let e=a.init();e&&"function"==typeof e.then?e.then(t):t()}else t()}}}function Q(){R.length&&R.forEach(e=>{Z(e.src,e.callback)}),S=!0,C.slides.classList.add("no-transition"),w?C.wrapper.classList.add("no-hover"):C.wrapper.classList.remove("no-hover"),/iphone/gi.test(p)?C.wrapper.classList.add("ua-iphone"):C.wrapper.classList.remove("ua-iphone"),C.background=te(C.wrapper,"div","backgrounds",null),C.progress=te(C.wrapper,"div","progress","<span></span>"),C.progressbar=C.progress.querySelector("span"),C.controls=te(C.wrapper,"aside","controls",`<button class="navigate-left" aria-label="${f.rtl?"next slide":"previous slide"}"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-right" aria-label="${f.rtl?"previous slide":"next slide"}"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-up" aria-label="above slide"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-down" aria-label="below slide"><div class="controls-arrow"></div></button>`),C.slideNumber=te(C.wrapper,"div","slide-number",""),C.speakerNotes=te(C.wrapper,"div","speaker-notes",null),C.speakerNotes.setAttribute("data-prevent-swipe",""),C.speakerNotes.setAttribute("tabindex","0"),C.pauseOverlay=te(C.wrapper,"div","pause-overlay",f.controls?'<button class="resume-button">Resume presentation</button>':null),C.wrapper.setAttribute("role","application"),C.controlsLeft=o(C.wrapper.querySelectorAll(".navigate-left")),C.controlsRight=o(C.wrapper.querySelectorAll(".navigate-right")),C.controlsUp=o(C.wrapper.querySelectorAll(".navigate-up")),C.controlsDown=o(C.wrapper.querySelectorAll(".navigate-down")),C.controlsPrev=o(C.wrapper.querySelectorAll(".navigate-prev")),C.controlsNext=o(C.wrapper.querySelectorAll(".navigate-next")),C.controlsRightArrow=C.controls.querySelector(".navigate-right"),C.controlsLeftArrow=C.controls.querySelector(".navigate-left"),C.controlsDownArrow=C.controls.querySelector(".navigate-down"),C.statusDiv=function(){let e=C.wrapper.querySelector(".aria-status");return e||(e=document.createElement("div"),e.style.position="absolute",e.style.height="1px",e.style.width="1px",e.style.overflow="hidden",e.style.clip="rect( 1px, 1px, 1px, 1px )",e.classList.add("aria-status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),C.wrapper.appendChild(e)),e}(),f.postMessage&&window.addEventListener("message",e=>{const t=e.data;if("string"==typeof t&&"{"===t.charAt(0)&&"}"===t.charAt(t.length-1)&&(t=JSON.parse(t),t.method&&"function"==typeof a[t.method]))if(!1===h.test(t.method)){const e=a[t.method].apply(a,t.args);ce("callback",{method:t.method,result:e})}else console.warn('reveal.js: "'+t.method+'" is is blacklisted from the postMessage API')},!1),setInterval(()=>{0===C.wrapper.scrollTop&&0===C.wrapper.scrollLeft||(C.wrapper.scrollTop=0,C.wrapper.scrollLeft=0)},1e3),vt().forEach(e=>{o(e.querySelectorAll("section")).forEach((e,t)=>{t>0&&(e.classList.remove("present"),e.classList.remove("past"),e.classList.add("future"),e.setAttribute("aria-hidden","true"))})}),ne(),ht(),Ye(!0),setTimeout(()=>{C.slides.classList.remove("no-transition"),C.wrapper.classList.add("ready"),de("ready",{indexh:g,indexv:m,currentSlide:b})},1),le()&&(oe(),"complete"===document.readyState?ee():window.addEventListener("load",ee))}function Z(e,t){const a=document.createElement("script");a.type="text/javascript",a.async=!1,a.defer=!1,a.src=e,t&&(a.onload=a.onreadystatechange=e=>{("load"===e.type||/loaded|complete/.test(a.readyState))&&(a.onload=a.onreadystatechange=a.onerror=null,t())},a.onerror=e=>{a.onload=a.onreadystatechange=a.onerror=null,t(new Error("Failed loading script: "+a.src+"\n"+e))});const r=document.querySelector("head");r.insertBefore(a,r.lastChild)}function G(e){let t="";if(3===e.nodeType)t+=e.textContent;else if(1===e.nodeType){let a=e.getAttribute("aria-hidden"),r="none"===window.getComputedStyle(e).display;"true"===a||r||o(e.childNodes).forEach(e=>{t+=G(e)})}return t=t.trim(),""===t?"":t+" "}function ee(){let e=be(window.innerWidth,window.innerHeight),t=Math.floor(e.width*(1+f.margin)),a=Math.floor(e.height*(1+f.margin)),r=e.width,n=e.height;d("@page{size:"+t+"px "+a+"px; margin: 0px;}"),d(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+r+"px; max-height:"+n+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=t+"px",document.body.style.height=a+"px",ve(r,n);let i=f.slideNumber&&/all|print/i.test(f.showSlideNumber);o(C.wrapper.querySelectorAll(".slides section")).forEach((function(e){e.setAttribute("data-slide-number",Ve(e))})),o(C.wrapper.querySelectorAll(".slides section")).forEach((function(e){if(!1===e.classList.contains("stack")){let s=(t-r)/2,l=(a-n)/2,d=e.scrollHeight,c=Math.max(Math.ceil(d/a),1);c=Math.min(c,f.pdfMaxPagesPerSlide),(1===c&&f.center||e.classList.contains("center"))&&(l=Math.max((a-d)/2,0));let u=document.createElement("div");if(u.className="pdf-page",u.style.height=(a+f.pdfPageHeightOffset)*c+"px",e.parentNode.insertBefore(u,e),u.appendChild(e),e.style.left=s+"px",e.style.top=l+"px",e.style.width=r+"px",e.slideBackgroundElement&&u.insertBefore(e.slideBackgroundElement,e),f.showNotes){let a=St(e);if(a){let e=8,r="string"==typeof f.showNotes?f.showNotes:"inline",n=document.createElement("div");n.classList.add("speaker-notes"),n.classList.add("speaker-notes-pdf"),n.setAttribute("data-layout",r),n.innerHTML=a,"separate-page"===r?u.parentNode.insertBefore(n,u.nextSibling):(n.style.left=e+"px",n.style.bottom=e+"px",n.style.width=t-2*e+"px",u.appendChild(n))}}if(i){let t=document.createElement("div");t.classList.add("slide-number"),t.classList.add("slide-number-pdf"),t.innerHTML=e.getAttribute("data-slide-number"),u.appendChild(t)}if(f.pdfSeparateFragments){let e,t,a=xt(u.querySelectorAll(".fragment"),!0);a.forEach((function(a){e&&e.forEach((function(e){e.classList.remove("current-fragment")})),a.forEach((function(e){e.classList.add("visible","current-fragment")}));let r=u.cloneNode(!0);u.parentNode.insertBefore(r,(t||u).nextSibling),e=a,t=r})),a.forEach((function(e){e.forEach((function(e){e.classList.remove("visible","current-fragment")}))}))}else o(u.querySelectorAll(".fragment:not(.fade-out)")).forEach((function(e){e.classList.add("visible")}))}})),de("pdf-ready")}function te(e,t,a,r=""){let n=e.querySelectorAll("."+a);for(let t=0;t<n.length;t++){let a=n[t];if(a.parentNode===e)return a}let i=document.createElement(t);return i.className=a,i.innerHTML=r,e.appendChild(i),i}function ae(e,t){let a=document.createElement("div");a.className="slide-background "+e.className.replace(/present|past|future/,"");let r=document.createElement("div");return r.className="slide-background-content",a.appendChild(r),t.appendChild(a),e.slideBackgroundElement=a,e.slideBackgroundContentElement=r,re(e),a}function re(e){let t=e.slideBackgroundElement,a=e.slideBackgroundContentElement;e.classList.remove("has-dark-background"),e.classList.remove("has-light-background"),t.removeAttribute("data-loaded"),t.removeAttribute("data-background-hash"),t.removeAttribute("data-background-size"),t.removeAttribute("data-background-transition"),t.style.backgroundColor="",a.style.backgroundSize="",a.style.backgroundRepeat="",a.style.backgroundPosition="",a.style.backgroundImage="",a.style.opacity="",a.innerHTML="";let r={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundVideo:e.getAttribute("data-background-video"),backgroundIframe:e.getAttribute("data-background-iframe"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition"),backgroundOpacity:e.getAttribute("data-background-opacity")};r.background&&(/^(http|file|\/\/)/gi.test(r.background)||/\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test(r.background)?e.setAttribute("data-background-image",r.background):t.style.background=r.background),(r.background||r.backgroundColor||r.backgroundImage||r.backgroundVideo||r.backgroundIframe)&&t.setAttribute("data-background-hash",r.background+r.backgroundSize+r.backgroundImage+r.backgroundVideo+r.backgroundIframe+r.backgroundColor+r.backgroundRepeat+r.backgroundPosition+r.backgroundTransition+r.backgroundOpacity),r.backgroundSize&&t.setAttribute("data-background-size",r.backgroundSize),r.backgroundColor&&(t.style.backgroundColor=r.backgroundColor),r.backgroundTransition&&t.setAttribute("data-background-transition",r.backgroundTransition),e.hasAttribute("data-preload")&&t.setAttribute("data-preload",""),r.backgroundSize&&(a.style.backgroundSize=r.backgroundSize),r.backgroundRepeat&&(a.style.backgroundRepeat=r.backgroundRepeat),r.backgroundPosition&&(a.style.backgroundPosition=r.backgroundPosition),r.backgroundOpacity&&(a.style.opacity=r.backgroundOpacity);let n=r.backgroundColor;if(!n){let e=window.getComputedStyle(t);e&&e.backgroundColor&&(n=e.backgroundColor)}if(n){let t=u(n);t&&0!==t.a&&("string"==typeof(i=n)&&(i=u(i)),(i?(299*i.r+587*i.g+114*i.b)/1e3:null)<128?e.classList.add("has-dark-background"):e.classList.add("has-light-background"))}var i}function ne(e){const t=f.transition;if("object"==typeof e&&i(f,e),!1===S)return;const a=C.wrapper.querySelectorAll(".slides section").length;C.wrapper.classList.remove(t),C.wrapper.classList.add(f.transition),C.wrapper.setAttribute("data-transition-speed",f.transitionSpeed),C.wrapper.setAttribute("data-background-transition",f.backgroundTransition),C.controls.style.display=f.controls?"block":"none",C.progress.style.display=f.progress?"block":"none",C.controls.setAttribute("data-controls-layout",f.controlsLayout),C.controls.setAttribute("data-controls-back-arrows",f.controlsBackArrows),f.shuffle&&ze(),f.rtl?C.wrapper.classList.add("rtl"):C.wrapper.classList.remove("rtl"),f.center?C.wrapper.classList.add("center"):C.wrapper.classList.remove("center"),!1===f.pause&&Te(),f.showNotes&&C.speakerNotes.setAttribute("data-layout","string"==typeof f.showNotes?f.showNotes:"inline"),f.mouseWheel?(document.addEventListener("DOMMouseScroll",Zt,!1),document.addEventListener("mousewheel",Zt,!1)):(document.removeEventListener("DOMMouseScroll",Zt,!1),document.removeEventListener("mousewheel",Zt,!1)),f.hideInactiveCursor?(document.addEventListener("mousemove",Ft,!1),document.addEventListener("mousedown",Ft,!1)):(qe(),document.removeEventListener("mousemove",Ft,!1),document.removeEventListener("mousedown",Ft,!1)),f.previewLinks?(ue(),pe("[data-preview-link=false]")):(pe(),ue("[data-preview-link]:not([data-preview-link=false])")),o(C.slides.querySelectorAll('[data-auto-animate]:not([data-auto-animate=""])')).forEach(e=>{e.dataset.autoAnimate=""}),_e(),k&&k.parentNode&&(k.parentNode.removeChild(k),k=null),E&&(E.destroy(),E=null),a>1&&f.autoSlide&&f.autoSlideStoppable&&(E=new r(C.wrapper,()=>Math.min(Math.max((Date.now()-V)/F,0),1)),E.on("click",ua),X=!1),!1===f.fragments&&o(C.slides.querySelectorAll(".fragment")).forEach(e=>{e.classList.add("visible"),e.classList.remove("current-fragment")});let n="none";f.slideNumber&&!le()&&("all"===f.showSlideNumber||"speaker"===f.showSlideNumber&&pt())&&(n="block"),C.slideNumber.style.display=n,"default"!==f.navigationMode?C.wrapper.setAttribute("data-navigation-mode",f.navigationMode):C.wrapper.removeAttribute("data-navigation-mode"),"linear"===f.navigationMode?(K["&#8594; , &#8595; , SPACE , N , L , J"]="Next slide",K["&#8592; , &#8593; , P , H , K"]="Previous slide"):(K["N , SPACE"]="Next slide",K.P="Previous slide",K["&#8592; , H"]="Navigate left",K["&#8594; , L"]="Navigate right",K["&#8593; , K"]="Navigate up",K["&#8595; , J"]="Navigate down"),K["Home , Shift &#8592;"]="First slide",K["End , Shift &#8594;"]="Last slide",K["B , ."]="Pause",K.F="Fullscreen",K["ESC, O"]="Slide overview",Be()}function ie(){$=!0,window.addEventListener("hashchange",oa,!1),window.addEventListener("resize",sa,!1),f.touch&&("onpointerdown"in window?(C.wrapper.addEventListener("pointerdown",_t,!1),C.wrapper.addEventListener("pointermove",Jt,!1),C.wrapper.addEventListener("pointerup",Qt,!1)):window.navigator.msPointerEnabled?(C.wrapper.addEventListener("MSPointerDown",_t,!1),C.wrapper.addEventListener("MSPointerMove",Jt,!1),C.wrapper.addEventListener("MSPointerUp",Qt,!1)):(C.wrapper.addEventListener("touchstart",Xt,!1),C.wrapper.addEventListener("touchmove",Yt,!1),C.wrapper.addEventListener("touchend",Kt,!1))),f.keyboard&&(document.addEventListener("keydown",Vt,!1),document.addEventListener("keypress",Ut,!1)),f.progress&&C.progress&&C.progress.addEventListener("click",Gt,!1),C.pauseOverlay.addEventListener("click",Te,!1),f.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",la,!1);let e=["touchstart","click"];p.match(/android/gi)&&(e=["touchstart"]),e.forEach(e=>{C.controlsLeft.forEach(t=>t.addEventListener(e,ea,!1)),C.controlsRight.forEach(t=>t.addEventListener(e,ta,!1)),C.controlsUp.forEach(t=>t.addEventListener(e,aa,!1)),C.controlsDown.forEach(t=>t.addEventListener(e,ra,!1)),C.controlsPrev.forEach(t=>t.addEventListener(e,na,!1)),C.controlsNext.forEach(t=>t.addEventListener(e,ia,!1))})}function oe(){$=!1,document.removeEventListener("keydown",Vt,!1),document.removeEventListener("keypress",Ut,!1),window.removeEventListener("hashchange",oa,!1),window.removeEventListener("resize",sa,!1),C.wrapper.removeEventListener("pointerdown",_t,!1),C.wrapper.removeEventListener("pointermove",Jt,!1),C.wrapper.removeEventListener("pointerup",Qt,!1),C.wrapper.removeEventListener("MSPointerDown",_t,!1),C.wrapper.removeEventListener("MSPointerMove",Jt,!1),C.wrapper.removeEventListener("MSPointerUp",Qt,!1),C.wrapper.removeEventListener("touchstart",Xt,!1),C.wrapper.removeEventListener("touchmove",Yt,!1),C.wrapper.removeEventListener("touchend",Kt,!1),C.pauseOverlay.removeEventListener("click",Te,!1),f.progress&&C.progress&&C.progress.removeEventListener("click",Gt,!1),["touchstart","click"].forEach(e=>{C.controlsLeft.forEach(t=>t.removeEventListener(e,ea,!1)),C.controlsRight.forEach(t=>t.removeEventListener(e,ta,!1)),C.controlsUp.forEach(t=>t.removeEventListener(e,aa,!1)),C.controlsDown.forEach(t=>t.removeEventListener(e,ra,!1)),C.controlsPrev.forEach(t=>t.removeEventListener(e,na,!1)),C.controlsNext.forEach(t=>t.removeEventListener(e,ia,!1))})}function se(e){"string"==typeof e.layout&&(T.layout=e.layout),"string"==typeof e.overview&&(T.overview=e.overview),T.layout?l(C.slides,T.layout+" "+T.overview):l(C.slides,T.overview)}function le(){return/print-pdf/gi.test(window.location.search)}function de(e,t){let a=document.createEvent("HTMLEvents",1,2);a.initEvent(e,!0,!0),i(a,t),C.wrapper.dispatchEvent(a),ce(e)}function ce(e,t){if(f.postMessageEvents&&window.parent!==window.self){let a={namespace:"reveal",eventName:e,state:Lt()};i(a,t),window.parent.postMessage(JSON.stringify(a),"*")}}function ue(e="a"){o(C.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",ca,!1)})}function pe(e="a"){o(C.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",ca,!1)})}function he(e){"boolean"==typeof e?e?fe():ge():C.overlay?ge():fe()}function fe(){if(f.help){ge(),C.overlay=document.createElement("div"),C.overlay.classList.add("overlay"),C.overlay.classList.add("overlay-help"),C.wrapper.appendChild(C.overlay);let e='<p class="title">Keyboard Shortcuts</p><br/>';e+="<table><th>KEY</th><th>ACTION</th>";for(let t in K)e+=`<tr><td>${t}</td><td>${K[t]}</td></tr>`;for(let t in _)_[t].key&&_[t].description&&(e+=`<tr><td>${_[t].key}</td><td>${_[t].description}</td></tr>`);e+="</table>",C.overlay.innerHTML=`\n\t\t\t\t<header>\n\t\t\t\t\t<a class="close" href="#"><span class="icon"></span></a>\n\t\t\t\t</header>\n\t\t\t\t<div class="viewport">\n\t\t\t\t\t<div class="viewport-inner">${e}</div>\n\t\t\t\t</div>\n\t\t\t`,C.overlay.querySelector(".close").addEventListener("click",e=>{ge(),e.preventDefault()},!1)}}function ge(){C.overlay&&(C.overlay.parentNode.removeChild(C.overlay),C.overlay=null)}function me(){if(C.wrapper&&!le()){if(!f.disableLayout){w&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");const e=be(),t=P;ve(f.width,f.height),C.slides.style.width=e.width+"px",C.slides.style.height=e.height+"px",P=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),P=Math.max(P,f.minScale),P=Math.min(P,f.maxScale),1===P?(C.slides.style.zoom="",C.slides.style.left="",C.slides.style.top="",C.slides.style.bottom="",C.slides.style.right="",se({layout:""})):P>1&&D.zoom&&window.devicePixelRatio<2?(C.slides.style.zoom=P,C.slides.style.left="",C.slides.style.top="",C.slides.style.bottom="",C.slides.style.right="",se({layout:""})):(C.slides.style.zoom="",C.slides.style.left="50%",C.slides.style.top="50%",C.slides.style.bottom="auto",C.slides.style.right="auto",se({layout:"translate(-50%, -50%) scale("+P+")"}));const a=o(C.wrapper.querySelectorAll(".slides section"));for(let t=0,r=a.length;t<r;t++){const r=a[t];"none"!==r.style.display&&(f.center||r.classList.contains("center")?r.classList.contains("stack")?r.style.top=0:r.style.top=Math.max((e.height-r.scrollHeight)/2,0)+"px":r.style.top="")}t!==P&&de("resize",{oldScale:t,scale:P,size:e})}Fe(),Ke(),xe()&&Ee()}}function ve(e,t){o(C.slides.querySelectorAll("section > .stretch")).forEach(a=>{let r=function(e,t=0){if(e){let a,r=e.style.height;return e.style.height="0px",e.parentNode.style.height="auto",a=t-e.parentNode.offsetHeight,e.style.height=r+"px",e.parentNode.style.removeProperty("height"),a}return t}(a,t);if(/(img|video)/gi.test(a.nodeName)){const t=a.naturalWidth||a.videoWidth,n=a.naturalHeight||a.videoHeight,i=Math.min(e/t,r/n);a.style.width=t*i+"px",a.style.height=n*i+"px"}else a.style.width=e+"px",a.style.height=r+"px"})}function be(e,t){const a={width:f.width,height:f.height,presentationWidth:e||C.wrapper.offsetWidth,presentationHeight:t||C.wrapper.offsetHeight};return a.presentationWidth-=a.presentationWidth*f.margin,a.presentationHeight-=a.presentationHeight*f.margin,"string"==typeof a.width&&/%$/.test(a.width)&&(a.width=parseInt(a.width,10)/100*a.presentationWidth),"string"==typeof a.height&&/%$/.test(a.height)&&(a.height=parseInt(a.height,10)/100*a.presentationHeight),a}function ye(e,t){"object"==typeof e&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",t||0)}function we(e){if("object"==typeof e&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){const t=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(t)||0,10)}return 0}function Ae(){if(f.overview&&!xe()){L=!0,C.wrapper.classList.add("overview"),Tt(),C.slides.appendChild(C.background),o(C.wrapper.querySelectorAll(".slides section")).forEach(e=>{e.classList.contains("stack")||e.addEventListener("click",da,!0)});const e=70,t=be();x=t.width+e,M=t.height+e,f.rtl&&(x=-x),$e(),ke(),Ee(),me(),de("overviewshown",{indexh:g,indexv:m,currentSlide:b})}}function ke(){o(C.wrapper.querySelectorAll(".slides>section")).forEach((e,t)=>{e.setAttribute("data-index-h",t),l(e,"translate3d("+t*x+"px, 0, 0)"),e.classList.contains("stack")&&o(e.querySelectorAll("section")).forEach((e,a)=>{e.setAttribute("data-index-h",t),e.setAttribute("data-index-v",a),l(e,"translate3d(0, "+a*M+"px, 0)")})}),o(C.background.childNodes).forEach((e,t)=>{l(e,"translate3d("+t*x+"px, 0, 0)"),o(e.querySelectorAll(".slide-background")).forEach((e,t)=>{l(e,"translate3d(0, "+t*M+"px, 0)")})})}function Ee(){const e=Math.min(window.innerWidth,window.innerHeight);se({overview:["scale("+Math.max(e/5,150)/e+")","translateX("+-g*x+"px)","translateY("+-m*M+"px)"].join(" ")})}function Se(){f.overview&&(L=!1,C.wrapper.classList.remove("overview"),C.wrapper.classList.add("overview-deactivating"),setTimeout(()=>{C.wrapper.classList.remove("overview-deactivating")},1),C.wrapper.appendChild(C.background),o(C.wrapper.querySelectorAll(".slides section")).forEach(e=>{l(e,""),e.removeEventListener("click",da,!0)}),o(C.background.querySelectorAll(".slide-background")).forEach(e=>{l(e,"")}),se({overview:""}),De(g,m),me(),Pt(),de("overviewhidden",{indexh:g,indexv:m,currentSlide:b}))}function Le(e){"boolean"==typeof e?e?Ae():Se():xe()?Se():Ae()}function xe(){return L}function Me(e){let t="/",a=e||b,r=a?a.getAttribute("id"):null;r&&(r=encodeURIComponent(r));let n=gt(e);if(f.fragmentInURL||(n.f=void 0),"string"==typeof r&&r.length&&void 0===n.f)t="/"+r;else{let e=f.hashOneBasedIndex?1:0;(n.h>0||n.v>0||void 0!==n.f)&&(t+=n.h+e),(n.v>0||void 0!==n.f)&&(t+="/"+(n.v+e)),void 0!==n.f&&(t+="/"+n.f)}return t}function Ne(e=b){return e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function qe(){z&&(z=!1,C.wrapper.style.cursor="")}function Ie(){!1===z&&(z=!0,C.wrapper.style.cursor="none")}function Pe(){if(f.pause){const e=C.wrapper.classList.contains("paused");Tt(),C.wrapper.classList.add("paused"),!1===e&&de("paused")}}function Te(){const e=C.wrapper.classList.contains("paused");C.wrapper.classList.remove("paused"),Pt(),e&&de("resumed")}function Ce(e){"boolean"==typeof e?e?Pe():Te():Oe()?Te():Pe()}function Oe(){return C.wrapper.classList.contains("paused")}function Re(e){"boolean"==typeof e?e?Ot():Ct():X?Ot():Ct()}function De(e,t,r,n){v=b;const i=C.wrapper.querySelectorAll(".slides>section");if(0===i.length)return;void 0!==t||xe()||(t=we(i[e])),v&&v.parentNode&&v.parentNode.classList.contains("stack")&&ye(v.parentNode,m);const s=I.concat();I.length=0;let l=g||0,d=m||0;g=je(".slides>section",void 0===e?g:e),m=je(".slides>section.present>section",void 0===t?m:t),$e(),me(),xe()&&Ee();let c=i[g],u=c.querySelectorAll("section");b=u[m]||c,void 0!==r&&Nt(r);let p=g!==l||m!==d;p||(v=null),v&&v!==b&&(v.classList.remove("present"),v.setAttribute("aria-hidden","true"),a.isFirstSlide()&&setTimeout(()=>{o(C.wrapper.querySelectorAll(".slides>section.stack")).forEach(e=>{ye(e,0)})},0));e:for(let e=0,t=I.length;e<t;e++){for(let t=0;t<s.length;t++)if(s[t]===I[e]){s.splice(t,1);continue e}document.documentElement.classList.add(I[e]),de(I[e])}for(;s.length;)document.documentElement.classList.remove(s.pop());p&&de("slidechanged",{indexh:g,indexv:m,previousSlide:v,currentSlide:b,origin:n}),!p&&v||(dt(v),ot(b)),C.statusDiv.textContent=G(b),Xe(),Fe(),Ye(),Ke(),Ue(),We(),Mt(),ft(),Pt(),p&&v&&b&&!xe()&&v.hasAttribute("data-auto-animate")&&b.hasAttribute("data-auto-animate")&&(C.slides.classList.add("disable-slide-transitions"),setTimeout(()=>{C.slides.classList.remove("disable-slide-transitions")},0),f.autoAnimate&&function(e,t){_e(),k&&k.parentNode&&(k.parentNode.removeChild(k),k=null);if(e.hasAttribute("data-auto-animate")&&t.hasAttribute("data-auto-animate")){k=k||document.createElement("style"),k.type="text/css",document.head.appendChild(k);let r=Je(t);e.dataset.autoAnimate="pending",t.dataset.autoAnimate="pending";let n=function(e,t){let a=("function"==typeof f.autoAnimateMatcher?f.autoAnimateMatcher:Ze)(e,t),r=[];return a.filter((e,t)=>{if(-1===r.indexOf(e.to))return r.push(e.to),!0})}(e,t).map(e=>function(e,t,r,n,i){e.dataset.autoAnimateTarget="",t.dataset.autoAnimateTarget=i;let o=Je(t,n);void 0!==r.delay&&(o.delay=r.delay);void 0!==r.duration&&(o.duration=r.duration);void 0!==r.easing&&(o.easing=r.easing);let s=Qe("from",e,r),l=Qe("to",t,r);if(!1!==r.translate||!1!==r.scale){let e=a.getScale(),t={x:(s.x-l.x)/e,y:(s.y-l.y)/e,scaleX:s.width/l.width,scaleY:s.height/l.height};t.x=Math.round(1e3*t.x)/1e3,t.y=Math.round(1e3*t.y)/1e3,t.scaleX=Math.round(1e3*t.scaleX)/1e3,t.scaleX=Math.round(1e3*t.scaleX)/1e3;let n=!1!==r.translate&&(0!==t.x||0!==t.y),i=!1!==r.scale&&(0!==t.scaleX||0!==t.scaleY);if(n||i){let e=[];n&&e.push(`translate(${t.x}px, ${t.y}px)`),i&&e.push(`scale(${t.scaleX}, ${t.scaleY})`),s.styles.transform=e.join(" "),s.styles["transform-origin"]="top left",l.styles.transform="none"}}for(let e in l.styles){const t=l.styles[e],a=s.styles[e];t===a?delete l.styles[e]:(!0===t.explicitValue&&(l.styles[e]=t.value),!0===a.explicitValue&&(s.styles[e]=a.value))}let d="",c=Object.keys(l.styles);if(c.length>0){s.styles.transition="none",l.styles.transition=`all ${o.duration}s ${o.easing} ${o.delay}s`,l.styles["transition-property"]=c.join(", "),l.styles["will-change"]=c.join(", ");let e=Object.keys(s.styles).map(e=>e+": "+s.styles[e]+" !important;").join(""),t=Object.keys(l.styles).map(e=>e+": "+l.styles[e]+" !important;").join("");d='[data-auto-animate-target="'+i+'"] {'+e+'}[data-auto-animate="running"] [data-auto-animate-target="'+i+'"] {'+t+"}"}return d}(e.from,e.to,e.options||{},r,W++));"false"!==t.dataset.autoAnimateUnmatched&&!0===f.autoAnimateUnmatched&&(function e(t){return[].slice.call(t.children).reduce((t,a)=>{const r=a.querySelector("[data-auto-animate-target]");return a.hasAttribute("data-auto-animate-target")||r||t.push(a),a.querySelector("[data-auto-animate-target]")&&(t=t.concat(e(a))),t},[])}(t).forEach(e=>{e.dataset.autoAnimateTarget="unmatched"}),n.push(`[data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: opacity ${.8*r.duration}s ease ${.2*r.duration}s; }`)),k.innerHTML=n.join(""),requestAnimationFrame(()=>{k&&(getComputedStyle(k).fontWeight,t.dataset.autoAnimate="running")}),de("autoanimate",{fromSlide:e,toSlide:t,sheet:k})}}(v,b))}function Be(){oe(),ie(),me(),F=f.autoSlide,Pt(),le(),C.background.innerHTML="",C.background.classList.add("no-transition"),o(C.wrapper.querySelectorAll(".slides>section")).forEach(e=>{let t=ae(e,C.background);o(e.querySelectorAll("section")).forEach(e=>{ae(e,t),t.classList.add("stack")})}),f.parallaxBackgroundImage?(C.background.style.backgroundImage='url("'+f.parallaxBackgroundImage+'")',C.background.style.backgroundSize=f.parallaxBackgroundSize,C.background.style.backgroundRepeat=f.parallaxBackgroundRepeat,C.background.style.backgroundPosition=f.parallaxBackgroundPosition,setTimeout(()=>{C.wrapper.classList.add("has-parallax-background")},1)):(C.background.style.backgroundImage="",C.wrapper.classList.remove("has-parallax-background")),ft(),vt().forEach(e=>{let t=o(e.querySelectorAll("section"));t.forEach((e,t)=>{xt(e.querySelectorAll(".fragment"))}),0===t.length&&xt(e.querySelectorAll(".fragment"))}),Xe(),Fe(),Ue(),$e(),Ye(!0),f.showNotes&&C.slides.querySelectorAll("[data-notes], aside.notes").length>0?C.wrapper.classList.add("show-notes"):C.wrapper.classList.remove("show-notes"),We(),function(){let e=(e,t,a)=>{o(C.slides.querySelectorAll("iframe["+e+'*="'+t+'"]')).forEach(t=>{let r=t.getAttribute(e);r&&-1===r.indexOf(a)&&t.setAttribute(e,r+(/\?/.test(r)?"&":"?")+a)})};e("src","youtube.com/embed/","enablejsapi=1"),e("data-src","youtube.com/embed/","enablejsapi=1"),e("src","player.vimeo.com/","api=1"),e("data-src","player.vimeo.com/","api=1")}(),!1===f.autoPlayMedia?dt(b,{unloadIframes:!1}):ot(b),xe()&&ke()}function He(e=b){return xt(e.querySelectorAll(".fragment"))}function ze(){vt().forEach((e,t,a)=>{C.slides.insertBefore(e,a[Math.floor(Math.random()*a.length)])})}function je(e,t){let a=o(C.wrapper.querySelectorAll(e)),r=a.length,n=le();if(r){f.loop&&(t%=r)<0&&(t=r+t),t=Math.max(Math.min(t,r-1),0);for(let e=0;e<r;e++){let r=a[e],i=f.rtl&&!Ne(r);r.classList.remove("past","present","future"),r.setAttribute("hidden",""),r.setAttribute("aria-hidden","true"),r.querySelector("section")&&r.classList.add("stack"),n?r.classList.add("present"):e<t?(r.classList.add(i?"future":"past"),f.fragments&&o(r.querySelectorAll(".fragment")).forEach(e=>{e.classList.add("visible"),e.classList.remove("current-fragment")})):e>t&&(r.classList.add(i?"past":"future"),f.fragments&&o(r.querySelectorAll(".fragment.visible")).forEach(e=>{e.classList.remove("visible","current-fragment")}))}a[t].classList.add("present"),a[t].removeAttribute("hidden"),a[t].removeAttribute("aria-hidden");let e=a[t].getAttribute("data-state");e&&(I=I.concat(e.split(" ")))}else t=0;return t}function $e(){let e,t,a=vt(),r=a.length;if(r&&void 0!==g){let n=xe()?10:f.viewDistance;w&&(n=xe()?6:f.mobileViewDistance),le()&&(n=Number.MAX_VALUE);for(let i=0;i<r;i++){let s=a[i],l=o(s.querySelectorAll("section")),d=l.length;if(e=Math.abs((g||0)-i)||0,f.loop&&(e=Math.abs(((g||0)-i)%(r-n))||0),e<n?at(s):rt(s),d){let a=we(s);for(let r=0;r<d;r++){let o=l[r];t=i===(g||0)?Math.abs((m||0)-r):Math.abs(r-a),e+t<n?at(o):rt(o)}}}wt()?C.wrapper.classList.add("has-vertical-slides"):C.wrapper.classList.remove("has-vertical-slides"),yt()?C.wrapper.classList.add("has-horizontal-slides"):C.wrapper.classList.remove("has-horizontal-slides")}}function We(){f.showNotes&&C.speakerNotes&&b&&!le()&&(C.speakerNotes.innerHTML=St()||'<span class="notes-placeholder">No notes on this slide.</span>')}function Fe(){f.progress&&C.progressbar&&(C.progressbar.style.width=ut()*C.wrapper.offsetWidth+"px")}function Ue(){f.slideNumber&&C.slideNumber&&(C.slideNumber.innerHTML=Ve())}function Ve(e=b){let t,a="h.v";if("function"==typeof f.slideNumber)t=f.slideNumber(e);else switch("string"==typeof f.slideNumber&&(a=f.slideNumber),/c/.test(a)||1!==C.wrapper.querySelectorAll(".slides>section").length||(a="c"),t=[],a){case"c":t.push(ct(e)+1);break;case"c/t":t.push(ct(e)+1,"/",At());break;default:let r=gt(e);t.push(r.h+1);let n="h/v"===a?"/":".";Ne(e)&&t.push(n,r.v+1)}let r="#"+Me(e);return function(e,t,a,r="#"+Me()){return"number"!=typeof a||isNaN(a)?`<a href="${r}">\n\t\t\t\t\t<span class="slide-number-a">${e}</span>\n\t\t\t\t\t</a>`:`<a href="${r}">\n\t\t\t\t\t<span class="slide-number-a">${e}</span>\n\t\t\t\t\t<span class="slide-number-delimiter">${t}</span>\n\t\t\t\t\t<span class="slide-number-b">${a}</span>\n\t\t\t\t\t</a>`}(t[0],t[1],t[2],r)}function Xe(){let e=nt(),t=it();[...C.controlsLeft,...C.controlsRight,...C.controlsUp,...C.controlsDown,...C.controlsPrev,...C.controlsNext].forEach(e=>{e.classList.remove("enabled","fragmented"),e.setAttribute("disabled","disabled")}),e.left&&C.controlsLeft.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&C.controlsRight.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&C.controlsUp.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&C.controlsDown.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&C.controlsPrev.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&C.controlsNext.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),b&&(t.prev&&C.controlsPrev.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&C.controlsNext.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),Ne(b)?(t.prev&&C.controlsUp.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&C.controlsDown.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&C.controlsLeft.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&C.controlsRight.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),f.controlsTutorial&&(!q&&e.down?C.controlsDownArrow.classList.add("highlight"):(C.controlsDownArrow.classList.remove("highlight"),f.rtl?!N&&e.left&&0===m?C.controlsLeftArrow.classList.add("highlight"):C.controlsLeftArrow.classList.remove("highlight"):!N&&e.right&&0===m?C.controlsRightArrow.classList.add("highlight"):C.controlsRightArrow.classList.remove("highlight")))}function Ye(e=!1){let t=null,a=f.rtl?"future":"past",r=f.rtl?"past":"future";if(o(C.background.childNodes).forEach((n,i)=>{n.classList.remove("past","present","future"),i<g?n.classList.add(a):i>g?n.classList.add(r):(n.classList.add("present"),t=n),(e||i===g)&&o(n.querySelectorAll(".slide-background")).forEach((e,a)=>{e.classList.remove("past","present","future"),a<m?e.classList.add("past"):a>m?e.classList.add("future"):(e.classList.add("present"),i===g&&(t=e))})}),y&&dt(y,{unloadIframes:!tt(y)}),t){ot(t);let e=t.querySelector(".slide-background-content");if(e){let t=e.style.backgroundImage||"";/\.gif/i.test(t)&&(e.style.backgroundImage="",window.getComputedStyle(e).opacity,e.style.backgroundImage=t)}let a=y?y.getAttribute("data-background-hash"):null,r=t.getAttribute("data-background-hash");r&&r===a&&t!==y&&C.background.classList.add("no-transition"),y=t}b&&["has-light-background","has-dark-background"].forEach(e=>{b.classList.contains(e)?C.wrapper.classList.add(e):C.wrapper.classList.remove(e)}),setTimeout(()=>{C.background.classList.remove("no-transition")},1)}function Ke(){if(f.parallaxBackgroundImage){let e,t,a=vt(),r=bt(),n=C.background.style.backgroundSize.split(" ");1===n.length?e=t=parseInt(n[0],10):(e=parseInt(n[0],10),t=parseInt(n[1],10));let i,o,s=C.background.offsetWidth,l=a.length;i="number"==typeof f.parallaxBackgroundHorizontal?f.parallaxBackgroundHorizontal:l>1?(e-s)/(l-1):0,o=i*g*-1;let d,c,u=C.background.offsetHeight,p=r.length;d="number"==typeof f.parallaxBackgroundVertical?f.parallaxBackgroundVertical:(t-u)/(p-1),c=p>0?d*m:0,C.background.style.backgroundPosition=o+"px "+-c+"px"}}function _e(){o(C.wrapper.querySelectorAll("[data-auto-animate-target]")).forEach(e=>{delete e.dataset.autoAnimateTarget})}function Je(e,t){let a={easing:f.autoAnimateEasing,duration:f.autoAnimateDuration,delay:0};if(a=i(a,t),e.closest&&e.parentNode){let t=e.parentNode.closest("[data-auto-animate-target]");t&&(a=Je(t,a))}return e.dataset.autoAnimateEasing&&(a.easing=e.dataset.autoAnimateEasing),e.dataset.autoAnimateDuration&&(a.duration=parseFloat(e.dataset.autoAnimateDuration)),e.dataset.autoAnimateDelay&&(a.delay=parseFloat(e.dataset.autoAnimateDelay)),a}function Qe(e,t,a){let r={styles:[]};if(!1!==a.translate||!1!==a.scale){let e;e="function"==typeof a.measure?a.measure(t):t.getBoundingClientRect(),r.x=e.x,r.y=e.y,r.width=e.width,r.height=e.height}const n=getComputedStyle(t);return(a.styles||f.autoAnimateStyles).forEach(t=>{let a;"string"==typeof t&&(t={property:t}),a=void 0!==t.from&&"from"===e?{value:t.from,explicitValue:!0}:void 0!==t.to&&"to"===e?{value:t.to,explicitValue:!0}:n[t.property],""!==a&&(r.styles[t.property]=a)}),r}function Ze(e,t){let a=[];const r="h1, h2, h3, h4, h5, h6, p, li";return et(a,e,t,"[data-id]",e=>e.nodeName+":::"+e.getAttribute("data-id")),et(a,e,t,r,e=>e.nodeName+":::"+e.innerText),et(a,e,t,"img, video, iframe",e=>e.nodeName+":::"+(e.getAttribute("src")||e.getAttribute("data-src"))),et(a,e,t,"pre",e=>e.nodeName+":::"+e.innerText),a.forEach(e=>{e.from.matches(r)?e.options={scale:!1}:e.from.matches("pre")&&(e.options={scale:!1,styles:["width","height"]},et(a,e.from,e.to,".hljs .hljs-ln-code",e=>e.textContent,{scale:!1,styles:[],measure:Ge}),et(a,e.from,e.to,".hljs .hljs-ln-line[data-line-number]",e=>e.getAttribute("data-line-number"),{scale:!1,styles:["width"],measure:Ge}))}),a}function Ge(e){const t=a.getScale();return{x:Math.round(e.offsetLeft*t*100)/100,y:Math.round(e.offsetTop*t*100)/100,width:Math.round(e.offsetWidth*t*100)/100,height:Math.round(e.offsetHeight*t*100)/100}}function et(e,t,a,r,n,i){let o={},s={};[].slice.call(t.querySelectorAll(r)).forEach((e,t)=>{const a=n(e);"string"==typeof a&&a.length&&(o[a]=o[a]||[],o[a].push(e))}),[].slice.call(a.querySelectorAll(r)).forEach((t,a)=>{const r=n(t);let l;if(s[r]=s[r]||[],s[r].push(t),o[r]){const e=s[r].length-1,t=o[r].length-1;o[r][e]?(l=o[r][e],o[r][e]=null):o[r][t]&&(l=o[r][t],o[r][t]=null)}l&&e.push({from:l,to:t,options:i})})}function tt(e){let t=f.preloadIframes;return"boolean"!=typeof t&&(t=e.hasAttribute("data-preload")),t}function at(e,t={}){e.style.display=f.display,o(e.querySelectorAll("img[data-src], video[data-src], audio[data-src], iframe[data-src]")).forEach(e=>{("IFRAME"!==e.tagName||tt(e))&&(e.setAttribute("src",e.getAttribute("data-src")),e.setAttribute("data-lazy-loaded",""),e.removeAttribute("data-src"))}),o(e.querySelectorAll("video, audio")).forEach(e=>{let t=0;o(e.querySelectorAll("source[data-src]")).forEach(e=>{e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src"),e.setAttribute("data-lazy-loaded",""),t+=1}),t>0&&e.load()});let a=e.slideBackgroundElement;if(a){a.style.display="block";let r=e.slideBackgroundContentElement,n=e.getAttribute("data-background-iframe");if(!1===a.hasAttribute("data-loaded")){a.setAttribute("data-loaded","true");let i=e.getAttribute("data-background-image"),o=e.getAttribute("data-background-video"),s=e.hasAttribute("data-background-video-loop"),l=e.hasAttribute("data-background-video-muted");if(i)r.style.backgroundImage="url("+encodeURI(i)+")";else if(o&&!pt()){let e=document.createElement("video");s&&e.setAttribute("loop",""),l&&(e.muted=!0),w&&(e.muted=!0,e.autoplay=!0,e.setAttribute("playsinline","")),o.split(",").forEach(t=>{e.innerHTML+='<source src="'+t+'">'}),r.appendChild(e)}else if(n&&!0!==t.excludeIframes){let e=document.createElement("iframe");e.setAttribute("allowfullscreen",""),e.setAttribute("mozallowfullscreen",""),e.setAttribute("webkitallowfullscreen",""),e.setAttribute("allow","autoplay"),e.setAttribute("data-src",n),e.style.width="100%",e.style.height="100%",e.style.maxHeight="100%",e.style.maxWidth="100%",r.appendChild(e)}}let i=r.querySelector("iframe[data-src]");i&&tt(a)&&!/autoplay=(1|true|yes)/gi.test(n)&&i.getAttribute("src")!==n&&i.setAttribute("src",n)}}function rt(e){e.style.display="none";let t=Et(e);t&&(t.style.display="none",o(t.querySelectorAll("iframe[src]")).forEach(e=>{e.removeAttribute("src")})),o(e.querySelectorAll("video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]")).forEach(e=>{e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")}),o(e.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]")).forEach(e=>{e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")})}function nt(){let e=C.wrapper.querySelectorAll(".slides>section"),t=C.wrapper.querySelectorAll(".slides>section.present>section"),a={left:g>0,right:g<e.length-1,up:m>0,down:m<t.length-1};if(f.loop&&(e.length>1&&(a.left=!0,a.right=!0),t.length>1&&(a.up=!0,a.down=!0)),f.rtl){let e=a.left;a.left=a.right,a.right=e}return a}function it(){if(b&&f.fragments){let e=b.querySelectorAll(".fragment"),t=b.querySelectorAll(".fragment:not(.visible)");return{prev:e.length-t.length>0,next:!!t.length}}return{prev:!1,next:!1}}function ot(e){e&&!pt()&&(o(e.querySelectorAll('img[src$=".gif"]')).forEach(e=>{e.setAttribute("src",e.getAttribute("src"))}),o(e.querySelectorAll("video, audio")).forEach(e=>{if(c(e,".fragment")&&!c(e,".fragment.visible"))return;let t=f.autoPlayMedia;if("boolean"!=typeof t&&(t=e.hasAttribute("data-autoplay")||!!c(e,".slide-background")),t&&"function"==typeof e.play)if(e.readyState>1)st({target:e});else if(w){let t=e.play();t&&"function"==typeof t.catch&&!1===e.controls&&t.catch(()=>{e.controls=!0,e.addEventListener("play",()=>{e.controls=!1})})}else e.removeEventListener("loadeddata",st),e.addEventListener("loadeddata",st)}),o(e.querySelectorAll("iframe[src]")).forEach(e=>{c(e,".fragment")&&!c(e,".fragment.visible")||lt({target:e})}),o(e.querySelectorAll("iframe[data-src]")).forEach(e=>{c(e,".fragment")&&!c(e,".fragment.visible")||e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",lt),e.addEventListener("load",lt),e.setAttribute("src",e.getAttribute("data-src")))}))}function st(e){let t=!!c(e.target,"html"),a=!!c(e.target,".present");t&&a&&(e.target.currentTime=0,e.target.play()),e.target.removeEventListener("loadeddata",st)}function lt(e){let t=e.target;if(t&&t.contentWindow){let a=!!c(e.target,"html"),r=!!c(e.target,".present");if(a&&r){let e=f.autoPlayMedia;"boolean"!=typeof e&&(e=t.hasAttribute("data-autoplay")||!!c(t,".slide-background")),/youtube\.com\/embed\//.test(t.getAttribute("src"))&&e?t.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(t.getAttribute("src"))&&e?t.contentWindow.postMessage('{"method":"play"}',"*"):t.contentWindow.postMessage("slide:start","*")}}}function dt(e,t={}){t=i({unloadIframes:!0},t),e&&e.parentNode&&(o(e.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-ignore")||"function"!=typeof e.pause||(e.setAttribute("data-paused-by-reveal",""),e.pause())}),o(e.querySelectorAll("iframe")).forEach(e=>{e.contentWindow&&e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",lt)}),o(e.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(e=>{!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),o(e.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(e=>{!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"method":"pause"}',"*")}),!0===t.unloadIframes&&o(e.querySelectorAll("iframe[data-src]")).forEach(e=>{e.setAttribute("src","about:blank"),e.removeAttribute("src")}))}function ct(e=b){let t=vt(),a=0;e:for(let r=0;r<t.length;r++){let n=t[r],i=n.querySelectorAll("section");for(let t=0;t<i.length;t++){if(i[t]===e)break e;"uncounted"!==i[t].dataset.visibility&&a++}if(n===e)break;!1===n.classList.contains("stack")&&"uncounted"!==!n.dataset.visibility&&a++}return a}function ut(){let e=At(),t=ct();if(b){let e=b.querySelectorAll(".fragment");if(e.length>0){let a=.9;t+=b.querySelectorAll(".fragment.visible").length/e.length*a}}return Math.min(t/(e-1),1)}function pt(){return!!window.location.search.match(/receiver/gi)}function ht(){let e=window.location.hash,t=e.slice(2).split("/"),r=e.replace(/#|\//gi,"");if(!/^[0-9]*$/.test(t[0])&&r.length){let e;try{e=document.getElementById(decodeURIComponent(r))}catch(e){}let t=!!b&&b.getAttribute("id")===r;if(e){if(!t){let t=a.getIndices(e);De(t.h,t.v)}}else De(g||0,m||0)}else{let e,a=f.hashOneBasedIndex?1:0,r=parseInt(t[0],10)-a||0,n=parseInt(t[1],10)-a||0;f.fragmentInURL&&(e=parseInt(t[2],10),isNaN(e)&&(e=void 0)),r===g&&n===m&&void 0===e||De(r,n,e)}}function ft(e){clearTimeout(H),"number"==typeof e?H=setTimeout(ft,e):b&&(f.history||!window.history?window.location.hash=Me():f.hash?window.history.replaceState(null,null,"#"+Me()):window.history.replaceState(null,null,window.location.pathname+window.location.search))}function gt(e){let t,a=g,r=m;if(e){let t=Ne(e),n=t?e.parentNode:e,i=o(C.wrapper.querySelectorAll(".slides>section"));a=Math.max(i.indexOf(n),0),r=void 0,t&&(r=Math.max(o(e.parentNode.querySelectorAll("section")).indexOf(e),0))}if(!e&&b){if(b.querySelectorAll(".fragment").length>0){let e=b.querySelector(".current-fragment");t=e&&e.hasAttribute("data-fragment-index")?parseInt(e.getAttribute("data-fragment-index"),10):b.querySelectorAll(".fragment.visible").length-1}}return{h:a,v:r,f:t}}function mt(){return o(C.wrapper.querySelectorAll('.slides section:not(.stack):not([data-visibility="uncounted"])'))}function vt(){return o(C.wrapper.querySelectorAll(".slides>section"))}function bt(){return o(C.wrapper.querySelectorAll(".slides>section>section"))}function yt(){return vt().length>1}function wt(){return bt().length>1}function At(){return mt().length}function kt(e,t){let a=vt()[e],r=a&&a.querySelectorAll("section");return r&&r.length&&"number"==typeof t?r?r[t]:void 0:a}function Et(e,t){let a="number"==typeof e?kt(e,t):e;if(a)return a.slideBackgroundElement}function St(e=b){if(e.hasAttribute("data-notes"))return e.getAttribute("data-notes");let t=e.querySelector("aside.notes");return t?t.innerHTML:null}function Lt(){let e=gt();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:Oe(),overview:xe()}}function xt(e,t=!1){e=o(e);let a=[],r=[],n=[];e.forEach(e=>{if(e.hasAttribute("data-fragment-index")){let t=parseInt(e.getAttribute("data-fragment-index"),10);a[t]||(a[t]=[]),a[t].push(e)}else r.push([e])}),a=a.concat(r);let i=0;return a.forEach(e=>{e.forEach(e=>{n.push(e),e.setAttribute("data-fragment-index",i)}),i++}),!0===t?a:n}function Mt(e,t){let a={shown:[],hidden:[]};if(b&&f.fragments&&(t=t||xt(b.querySelectorAll(".fragment"))).length){let r=0;if("number"!=typeof e){let t=xt(b.querySelectorAll(".fragment.visible")).pop();t&&(e=parseInt(t.getAttribute("data-fragment-index")||0,10))}o(t).forEach((t,n)=>{t.hasAttribute("data-fragment-index")&&(n=parseInt(t.getAttribute("data-fragment-index"),10)),r=Math.max(r,n),n<=e?(t.classList.contains("visible")||a.shown.push(t),t.classList.add("visible"),t.classList.remove("current-fragment"),C.statusDiv.textContent=G(t),n===e&&(t.classList.add("current-fragment"),ot(t))):(t.classList.contains("visible")&&a.hidden.push(t),t.classList.remove("visible"),t.classList.remove("current-fragment"))}),e="number"==typeof e?e:-1,e=Math.max(Math.min(e,r),-1),b.setAttribute("data-fragment",e)}return a}function Nt(e,t=0){if(b&&f.fragments){let a=xt(b.querySelectorAll(".fragment"));if(a.length){if("number"!=typeof e){let t=xt(b.querySelectorAll(".fragment.visible")).pop();e=t?parseInt(t.getAttribute("data-fragment-index")||0,10):-1}let r=Mt(e+=t,a);return r.hidden.length&&de("fragmenthidden",{fragment:r.hidden[0],fragments:r.hidden}),r.shown.length&&de("fragmentshown",{fragment:r.shown[0],fragments:r.shown}),Xe(),Fe(),f.fragmentInURL&&ft(),!(!r.shown.length&&!r.hidden.length)}}return!1}function qt(){return Nt(null,1)}function It(){return Nt(null,-1)}function Pt(){if(Tt(),b&&!1!==f.autoSlide){let e=b.querySelector(".current-fragment");e||(e=b.querySelector(".fragment"));let t=e?e.getAttribute("data-autoslide"):null,r=b.parentNode?b.parentNode.getAttribute("data-autoslide"):null,n=b.getAttribute("data-autoslide");F=t?parseInt(t,10):n?parseInt(n,10):r?parseInt(r,10):f.autoSlide,0===b.querySelectorAll(".fragment").length&&o(b.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-autoplay")&&F&&1e3*e.duration/e.playbackRate>F&&(F=1e3*e.duration/e.playbackRate+1e3)}),!F||X||Oe()||xe()||a.isLastSlide()&&!it().next&&!0!==f.loop||(U=setTimeout(()=>{"function"==typeof f.autoSlideMethod?f.autoSlideMethod():jt(),Pt()},F),V=Date.now()),E&&E.setPlaying(-1!==U)}}function Tt(){clearTimeout(U),U=-1}function Ct(){F&&!X&&(X=!0,de("autoslidepaused"),clearTimeout(U),E&&E.setPlaying(!1))}function Ot(){F&&X&&(X=!1,de("autoslideresumed"),Pt())}function Rt(){N=!0,f.rtl?(xe()||!1===qt())&&nt().left&&De(g+1,"grid"===f.navigationMode?m:void 0):(xe()||!1===It())&&nt().left&&De(g-1,"grid"===f.navigationMode?m:void 0)}function Dt(){N=!0,f.rtl?(xe()||!1===It())&&nt().right&&De(g-1,"grid"===f.navigationMode?m:void 0):(xe()||!1===qt())&&nt().right&&De(g+1,"grid"===f.navigationMode?m:void 0)}function Bt(){(xe()||!1===It())&&nt().up&&De(g,m-1)}function Ht(){q=!0,(xe()||!1===qt())&&nt().down&&De(g,m+1)}function zt(){if(!1===It())if(nt().up)Bt();else{let e;if(e=f.rtl?o(C.wrapper.querySelectorAll(".slides>section.future")).pop():o(C.wrapper.querySelectorAll(".slides>section.past")).pop(),e){let t=e.querySelectorAll("section").length-1||void 0;De(g-1,t)}}}function jt(){if(N=!0,q=!0,!1===qt()){let e=nt();e.down&&e.right&&f.loop&&a.isLastVerticalSlide(b)&&(e.down=!1),e.down?Ht():f.rtl?Rt():Dt()}}function $t(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function Wt(e){f.autoSlideStoppable&&Ct()}function Ft(e){qe(),clearTimeout(j),j=setTimeout(Ie,f.hideCursorTime)}function Ut(e){e.shiftKey&&63===e.charCode&&he()}function Vt(e){if("function"==typeof f.keyboardCondition&&!1===f.keyboardCondition(e))return!0;let t=e.keyCode,r=X;Wt();let n=document.activeElement&&"inherit"!==document.activeElement.contentEditable,i=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),o=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),s=e.shiftKey&&32===e.keyCode,l=e.shiftKey&&37===t,d=e.shiftKey&&39===t,c=!s&&!l&&!d&&(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey);if(n||i||o||c)return;let u,p=[66,86,190,191];if("object"==typeof f.keyboard)for(u in f.keyboard)"togglePause"===f.keyboard[u]&&p.push(parseInt(u,10));if(Oe()&&-1===p.indexOf(t))return!1;let h="linear"===f.navigationMode||!yt()||!wt(),g=!1;if("object"==typeof f.keyboard)for(u in f.keyboard)if(parseInt(u,10)===t){let t=f.keyboard[u];"function"==typeof t?t.apply(null,[e]):"string"==typeof t&&"function"==typeof a[t]&&a[t].call(),g=!0}if(!1===g)for(u in _)if(parseInt(u,10)===t){let t=_[u].callback;"function"==typeof t?t.apply(null,[e]):"string"==typeof t&&"function"==typeof a[t]&&a[t].call(),g=!0}!1===g&&(g=!0,80===t||33===t?zt():78===t||34===t?jt():72===t||37===t?l?De(0):!xe()&&h?zt():Rt():76===t||39===t?d?De(Number.MAX_VALUE):!xe()&&h?jt():Dt():75===t||38===t?!xe()&&h?zt():Bt():74===t||40===t?!xe()&&h?jt():Ht():36===t?De(0):35===t?De(Number.MAX_VALUE):32===t?(xe()&&Se(),e.shiftKey?zt():jt()):58===t||59===t||66===t||86===t||190===t||191===t?Ce():70===t?(()=>{let e=document.documentElement,t=e.requestFullscreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t&&t.apply(e)})():65===t?f.autoSlideStoppable&&Re(r):g=!1),g?e.preventDefault&&e.preventDefault():27!==t&&79!==t||(C.overlay?ge():Le(),e.preventDefault&&e.preventDefault()),Pt()}function Xt(e){if($t(e.target))return!0;Y.startX=e.touches[0].clientX,Y.startY=e.touches[0].clientY,Y.startCount=e.touches.length}function Yt(e){if($t(e.target))return!0;if(Y.captured)p.match(/android/gi)&&e.preventDefault();else{Wt();let t=e.touches[0].clientX,a=e.touches[0].clientY;if(1===e.touches.length&&2!==Y.startCount){let r=t-Y.startX,n=a-Y.startY;r>Y.threshold&&Math.abs(r)>Math.abs(n)?(Y.captured=!0,"linear"===f.navigationMode?f.rtl?jt():zt():Rt()):r<-Y.threshold&&Math.abs(r)>Math.abs(n)?(Y.captured=!0,"linear"===f.navigationMode?f.rtl?zt():jt():Dt()):n>Y.threshold?(Y.captured=!0,"linear"===f.navigationMode?zt():Bt()):n<-Y.threshold&&(Y.captured=!0,"linear"===f.navigationMode?jt():Ht()),f.embedded?(Y.captured||Ne(b))&&e.preventDefault():e.preventDefault()}}}function Kt(e){Y.captured=!1}function _t(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Xt(e))}function Jt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Yt(e))}function Qt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Kt())}function Zt(e){if(Date.now()-B>600){B=Date.now();let t=e.detail||-e.wheelDelta;t>0?jt():t<0&&zt()}}function Gt(e){Wt(),e.preventDefault();let t=vt().length,a=Math.floor(e.clientX/C.wrapper.offsetWidth*t);f.rtl&&(a=t-a),De(a)}function ea(e){e.preventDefault(),Wt(),"linear"===f.navigationMode?zt():Rt()}function ta(e){e.preventDefault(),Wt(),"linear"===f.navigationMode?jt():Dt()}function aa(e){e.preventDefault(),Wt(),Bt()}function ra(e){e.preventDefault(),Wt(),Ht()}function na(e){e.preventDefault(),Wt(),zt()}function ia(e){e.preventDefault(),Wt(),jt()}function oa(e){ht()}function sa(e){me()}function la(e){!1===document.hidden&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function da(e){if($&&xe()){e.preventDefault();let t=e.target;for(;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled")&&(Se(),t.nodeName.match(/section/gi))){De(parseInt(t.getAttribute("data-index-h"),10),parseInt(t.getAttribute("data-index-v"),10))}}}function ca(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){let t=e.currentTarget.getAttribute("href");t&&(!function(e){ge(),C.overlay=document.createElement("div"),C.overlay.classList.add("overlay"),C.overlay.classList.add("overlay-preview"),C.wrapper.appendChild(C.overlay),C.overlay.innerHTML=`<header>\n\t\t\t\t<a class="close" href="#"><span class="icon"></span></a>\n\t\t\t\t<a class="external" href="${e}" target="_blank"><span class="icon"></span></a>\n\t\t\t</header>\n\t\t\t<div class="spinner"></div>\n\t\t\t<div class="viewport">\n\t\t\t\t<iframe src="${e}"></iframe>\n\t\t\t\t<small class="viewport-inner">\n\t\t\t\t\t<span class="x-frame-error">Unable to load iframe. This is likely due to the site's policy (x-frame-options).</span>\n\t\t\t\t</small>\n\t\t\t</div>`,C.overlay.querySelector("iframe").addEventListener("load",e=>{C.overlay.classList.add("loaded")},!1),C.overlay.querySelector(".close").addEventListener("click",e=>{ge(),e.preventDefault()},!1),C.overlay.querySelector(".external").addEventListener("click",e=>{ge()},!1)}(t),e.preventDefault())}}function ua(e){a.isLastSlide()&&!1===f.loop?(De(0,0),Ot()):X?Ot():Ct()}return a={VERSION:"4.0.0-dev",configure:ne,sync:Be,syncSlide:function(e=b){re(e),He(e),at(e),Ye(),We()},syncFragments:He,slide:De,left:Rt,right:Dt,up:Bt,down:Ht,prev:zt,next:jt,navigateTo:De,navigateLeft:Rt,navigateRight:Dt,navigateUp:Bt,navigateDown:Ht,navigatePrev:zt,navigateNext:jt,navigateFragment:Nt,prevFragment:It,nextFragment:qt,layout:me,shuffle:ze,availableRoutes:nt,availableFragments:it,toggleHelp:he,toggleOverview:Le,togglePause:Ce,toggleAutoSlide:Re,isOverview:xe,isPaused:Oe,isAutoSliding:function(){return!(!F||X)},isSpeakerNotes:pt,loadSlide:at,unloadSlide:rt,addEventListeners:ie,removeEventListeners:oe,getState:Lt,setState:function(e){if("object"==typeof e){De(s(e.indexh),s(e.indexv),s(e.indexf));let t=s(e.paused),a=s(e.overview);"boolean"==typeof t&&t!==Oe()&&Ce(t),"boolean"==typeof a&&a!==xe()&&Le(a)}},getSlidePastCount:ct,getProgress:ut,getIndices:gt,getSlides:mt,getSlidesAttributes:function(){return mt().map(e=>{let t={};for(let a=0;a<e.attributes.length;a++){let r=e.attributes[a];t[r.name]=r.value}return t})},getTotalSlides:At,getSlide:kt,getSlideBackground:Et,getSlideNotes:St,getHorizontalSlides:vt,getVerticalSlides:bt,hasHorizontalSlides:yt,hasVerticalSlides:wt,addKeyBinding:function(e,t){"object"==typeof e&&e.keyCode?_[e.keyCode]={callback:t,key:e.key,description:e.description}:_[e]={callback:t,key:null,description:null}},removeKeyBinding:function(e){delete _[e]},registerPlugin:function(e,t){void 0===O[e]?(O[e]=t,S&&"function"==typeof t.init&&t.init()):console.warn('reveal.js: "'+e+'" plugin has already been registered')},hasPlugin:function(e){return!!O[e]},getPlugin:function(e){return O[e]},getComputedSlideSize:be,getPreviousSlide:()=>v,getCurrentSlide:()=>b,getScale:()=>P,getConfig:()=>f,getQueryHash:()=>{let e={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,t=>{e[t.split("=").shift()]=t.split("=").pop()});for(let t in e){let a=e[t];e[t]=s(unescape(a))}return e},getRevealElement:()=>C.wrapper||document.querySelector(".reveal"),getPlugins:()=>O,isFirstSlide:()=>0===g&&0===m,isLastSlide:()=>!!b&&(!b.nextElementSibling&&(!Ne(b)||!b.parentNode.nextElementSibling)),isLastVerticalSlide:()=>!(!b||!Ne(b))&&!b.nextElementSibling,isReady:()=>S,addEventListener:(e,t,r)=>{a.getRevealElement().addEventListener(e,t,r)},removeEventListener:(e,t,r)=>{a.getRevealElement().removeEventListener(e,t,r)},triggerKey:e=>Vt({keyCode:e}),registerKeyboardShortcut:(e,t)=>K[e]=t},function(){if(!e)return void console.warn("reveal.js must be instantiated with a valid .reveal element");!function(){w=/(iphone|ipod|ipad|android)/gi.test(p)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,A=/chrome/i.test(p)&&!/edge/i.test(p);let e=document.createElement("div");D.zoom="zoom"in e.style&&!w&&(A||/Version\/[\d\.]+.*Safari/.test(p))}(),C.wrapper=e,C.slides=e.querySelector(".slides"),window.addEventListener("load",me,!1);let r=a.getQueryHash();return void 0!==r.dependencies&&delete r.dependencies,f={...n,...t,...r},function(){let e=[],t=0;f.dependencies.forEach(t=>{t.condition&&!t.condition()||(t.async?R.push(t):e.push(t))}),e.length?(t=e.length,e.forEach(e=>{Z(e.src,()=>{"function"==typeof e.callback&&e.callback(),0==--t&&J()})})):J()}(),a}()};window.Reveal=p,window.Reveal.initialize=e=>{window.Reveal=new p(document.querySelector(".reveal"),e)}}]); \ No newline at end of file
+!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,a){"use strict";a.r(t);const r=(e,t)=>{for(let a in t)e[a]=t[a];return e},n=e=>Array.prototype.slice.call(e),i=e=>{if("string"==typeof e){if("null"===e)return null;if("true"===e)return!0;if("false"===e)return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e},o=(e,t)=>{e.style.transform=t},s=(e,t)=>{let a=e.parentNode;for(;a;){let e=a.matches||a.matchesSelector||a.msMatchesSelector;if(e&&e.call(a,t))return a;a=a.parentNode}return null},l=e=>{let t=e.match(/^#([0-9a-f]{3})$/i);if(t&&t[1])return t=t[1],{r:17*parseInt(t.charAt(0),16),g:17*parseInt(t.charAt(1),16),b:17*parseInt(t.charAt(2),16)};let a=e.match(/^#([0-9a-f]{6})$/i);if(a&&a[1])return a=a[1],{r:parseInt(a.substr(0,2),16),g:parseInt(a.substr(2,2),16),b:parseInt(a.substr(4,2),16)};let r=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(r)return{r:parseInt(r[1],10),g:parseInt(r[2],10),b:parseInt(r[3],10)};let n=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return n?{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10),a:parseFloat(n[4])}:null},d=e=>{let t=document.createElement("style");t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)},c=(e,t)=>{const a=document.createElement("script");a.type="text/javascript",a.async=!1,a.defer=!1,a.src=e,"function"==typeof t&&(a.onload=a.onreadystatechange=e=>{("load"===e.type||/loaded|complete/.test(a.readyState))&&(a.onload=a.onreadystatechange=a.onerror=null,t())},a.onerror=e=>{a.onload=a.onreadystatechange=a.onerror=null,t(new Error("Failed loading script: "+a.src+"\n"+e))});const r=document.querySelector("head");r.insertBefore(a,r.lastChild)};class u{constructor(){this.state="pending",this.registeredPlugins={},this.asyncDependencies=[]}load(e){return this.state="loading",new Promise(t=>{let a=[],r=0;e.forEach(e=>{e.condition&&!e.condition()||(e.async?this.asyncDependencies.push(e):a.push(e))}),a.length?(r=a.length,a.forEach(e=>{c(e.src,()=>{"function"==typeof e.callback&&e.callback(),0==--r&&this.initPlugins().then(t)})})):this.initPlugins().then(t)})}initPlugins(){return new Promise(e=>{let t=Object.keys(this.registeredPlugins).length;if(0===t)this.loadAsync().then(e);else{let a=()=>{0==--t&&this.loadAsync().then(e)};for(let e in this.registeredPlugins){let t=this.registeredPlugins[e];if("function"==typeof t.init){let e=t.init();e&&"function"==typeof e.then?e.then(a):a()}else a()}}})}loadAsync(){return this.state="loaded",this.asyncDependencies.length&&this.asyncDependencies.forEach(e=>{c(e.src,e.callback)}),Promise.resolve()}registerPlugin(e,t){void 0===this.registeredPlugins[e]?(this.registeredPlugins[e]=t,"loaded"===this.state&&"function"==typeof t.init&&t.init()):console.warn('reveal.js: "'+e+'" plugin has already been registered')}hasPlugin(e){return!!this.registeredPlugins[e]}getPlugin(e){return this.registeredPlugins[e]}getRegisteredPlugins(){return this.registeredPlugins}}class p{constructor(e,t){this.diameter=100,this.diameter2=this.diameter/2,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=e,this.progressCheck=t,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}setPlaying(e){const t=this.playing;this.playing=e,!t&&this.playing?this.animate():this.render()}animate(){const e=this.progress;this.progress=this.progressCheck(),e>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&requestAnimationFrame(this.animate.bind(this))}render(){let e=this.playing?this.progress:0,t=this.diameter2-this.thickness,a=this.diameter2,r=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);const n=-Math.PI/2+e*(2*Math.PI),i=-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(a,r,t+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(a,r,t,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(a,r,t,i,n,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(a-14,r-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,28),this.context.fillRect(18,0,10,28)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,28),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()}on(e,t){this.canvas.addEventListener(e,t,!1)}off(e,t){this.canvas.removeEventListener(e,t,!1)}destroy(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)}}var h={width:960,height:700,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,showSlideNumber:"all",hashOneBasedIndex:!1,hash:!1,history:!1,keyboard:!0,keyboardCondition:null,overview:!0,disableLayout:!1,center:!0,touch:!0,loop:!1,rtl:!1,navigationMode:"default",shuffle:!1,fragments:!0,fragmentInURL:!1,embedded:!1,help:!0,pause:!0,showNotes:!1,autoPlayMedia:null,preloadIframes:null,autoAnimate:!0,autoAnimateMatcher:null,autoAnimateEasing:"ease",autoAnimateDuration:1,autoAnimateUnmatched:!0,autoAnimateStyles:["opacity","color","background-color","padding","font-size","line-height","letter-spacing","border-width","border-color","border-radius","outline","outline-offset"],autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,mobileViewDistance:2,display:"block",hideInactiveCursor:!0,hideCursorTime:5e3,dependencies:[]},g=function(e,t){let a;const c=navigator.userAgent,g=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/;let f,m,v,y,b,w,A,k,E,S,L=!1,x=!1,M=null,N=null,q=!1,P=!1,I=[],T=1,C={layout:"",overview:""},R={},D=new u,O={},z=0,B=0,H=!1,j=0,$=!1,W=0,F=0,U=0,V=-1,X=!1,Y={startX:0,startY:0,startCount:0,captured:!1,threshold:40},K={},_={};function J(){L=!0,function(){R.slides.classList.add("no-transition"),A?R.wrapper.classList.add("no-hover"):R.wrapper.classList.remove("no-hover");/iphone/gi.test(c)?R.wrapper.classList.add("ua-iphone"):R.wrapper.classList.remove("ua-iphone");R.background=G(R.wrapper,"div","backgrounds",null),R.progress=G(R.wrapper,"div","progress","<span></span>"),R.progressbar=R.progress.querySelector("span"),R.controls=G(R.wrapper,"aside","controls",`<button class="navigate-left" aria-label="${f.rtl?"next slide":"previous slide"}"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-right" aria-label="${f.rtl?"previous slide":"next slide"}"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-up" aria-label="above slide"><div class="controls-arrow"></div></button>\n\t\t\t<button class="navigate-down" aria-label="below slide"><div class="controls-arrow"></div></button>`),R.slideNumber=G(R.wrapper,"div","slide-number",""),R.speakerNotes=G(R.wrapper,"div","speaker-notes",null),R.speakerNotes.setAttribute("data-prevent-swipe",""),R.speakerNotes.setAttribute("tabindex","0"),R.pauseOverlay=G(R.wrapper,"div","pause-overlay",f.controls?'<button class="resume-button">Resume presentation</button>':null),R.wrapper.setAttribute("role","application"),R.controlsLeft=n(R.wrapper.querySelectorAll(".navigate-left")),R.controlsRight=n(R.wrapper.querySelectorAll(".navigate-right")),R.controlsUp=n(R.wrapper.querySelectorAll(".navigate-up")),R.controlsDown=n(R.wrapper.querySelectorAll(".navigate-down")),R.controlsPrev=n(R.wrapper.querySelectorAll(".navigate-prev")),R.controlsNext=n(R.wrapper.querySelectorAll(".navigate-next")),R.controlsRightArrow=R.controls.querySelector(".navigate-right"),R.controlsLeftArrow=R.controls.querySelector(".navigate-left"),R.controlsDownArrow=R.controls.querySelector(".navigate-down"),R.statusDiv=function(){let e=R.wrapper.querySelector(".aria-status");e||(e=document.createElement("div"),e.style.position="absolute",e.style.height="1px",e.style.width="1px",e.style.overflow="hidden",e.style.clip="rect( 1px, 1px, 1px, 1px )",e.classList.add("aria-status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),R.wrapper.appendChild(e));return e}()}(),f.postMessage&&window.addEventListener("message",e=>{const t=e.data;if("string"==typeof t&&"{"===t.charAt(0)&&"}"===t.charAt(t.length-1)&&(t=JSON.parse(t),t.method&&"function"==typeof a[t.method]))if(!1===g.test(t.method)){const e=a[t.method].apply(a,t.args);le("callback",{method:t.method,result:e})}else console.warn('reveal.js: "'+t.method+'" is is blacklisted from the postMessage API')},!1),setInterval(()=>{0===R.wrapper.scrollTop&&0===R.wrapper.scrollLeft||(R.wrapper.scrollTop=0,R.wrapper.scrollLeft=0)},1e3),ft().forEach(e=>{n(e.querySelectorAll("section")).forEach((e,t)=>{t>0&&(e.classList.remove("present"),e.classList.remove("past"),e.classList.add("future"),e.setAttribute("aria-hidden","true"))})}),ae(),ut(),Ve(!0),setTimeout(()=>{R.slides.classList.remove("no-transition"),R.wrapper.classList.add("ready"),se("ready",{indexh:m,indexv:v,currentSlide:b})},1),oe()&&(ne(),"complete"===document.readyState?Z():window.addEventListener("load",Z))}function Q(e){let t="";if(3===e.nodeType)t+=e.textContent;else if(1===e.nodeType){let a=e.getAttribute("aria-hidden"),r="none"===window.getComputedStyle(e).display;"true"===a||r||n(e.childNodes).forEach(e=>{t+=Q(e)})}return t=t.trim(),""===t?"":t+" "}function Z(){let e=me(window.innerWidth,window.innerHeight),t=Math.floor(e.width*(1+f.margin)),a=Math.floor(e.height*(1+f.margin)),r=e.width,i=e.height;d("@page{size:"+t+"px "+a+"px; margin: 0px;}"),d(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+r+"px; max-height:"+i+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=t+"px",document.body.style.height=a+"px",fe(r,i);let o=f.slideNumber&&/all|print/i.test(f.showSlideNumber);n(R.wrapper.querySelectorAll(".slides section")).forEach((function(e){e.setAttribute("data-slide-number",Fe(e))})),n(R.wrapper.querySelectorAll(".slides section")).forEach((function(e){if(!1===e.classList.contains("stack")){let s=(t-r)/2,l=(a-i)/2,d=e.scrollHeight,c=Math.max(Math.ceil(d/a),1);c=Math.min(c,f.pdfMaxPagesPerSlide),(1===c&&f.center||e.classList.contains("center"))&&(l=Math.max((a-d)/2,0));let u=document.createElement("div");if(u.className="pdf-page",u.style.height=(a+f.pdfPageHeightOffset)*c+"px",e.parentNode.insertBefore(u,e),u.appendChild(e),e.style.left=s+"px",e.style.top=l+"px",e.style.width=r+"px",e.slideBackgroundElement&&u.insertBefore(e.slideBackgroundElement,e),f.showNotes){let a=kt(e);if(a){let e=8,r="string"==typeof f.showNotes?f.showNotes:"inline",n=document.createElement("div");n.classList.add("speaker-notes"),n.classList.add("speaker-notes-pdf"),n.setAttribute("data-layout",r),n.innerHTML=a,"separate-page"===r?u.parentNode.insertBefore(n,u.nextSibling):(n.style.left=e+"px",n.style.bottom=e+"px",n.style.width=t-2*e+"px",u.appendChild(n))}}if(o){let t=document.createElement("div");t.classList.add("slide-number"),t.classList.add("slide-number-pdf"),t.innerHTML=e.getAttribute("data-slide-number"),u.appendChild(t)}if(f.pdfSeparateFragments){let e,t,a=St(u.querySelectorAll(".fragment"),!0);a.forEach((function(a){e&&e.forEach((function(e){e.classList.remove("current-fragment")})),a.forEach((function(e){e.classList.add("visible","current-fragment")}));let r=u.cloneNode(!0);u.parentNode.insertBefore(r,(t||u).nextSibling),e=a,t=r})),a.forEach((function(e){e.forEach((function(e){e.classList.remove("visible","current-fragment")}))}))}else n(u.querySelectorAll(".fragment:not(.fade-out)")).forEach((function(e){e.classList.add("visible")}))}})),se("pdf-ready")}function G(e,t,a,r=""){let n=e.querySelectorAll("."+a);for(let t=0;t<n.length;t++){let a=n[t];if(a.parentNode===e)return a}let i=document.createElement(t);return i.className=a,i.innerHTML=r,e.appendChild(i),i}function ee(e,t){let a=document.createElement("div");a.className="slide-background "+e.className.replace(/present|past|future/,"");let r=document.createElement("div");return r.className="slide-background-content",a.appendChild(r),t.appendChild(a),e.slideBackgroundElement=a,e.slideBackgroundContentElement=r,te(e),a}function te(e){let t=e.slideBackgroundElement,a=e.slideBackgroundContentElement;e.classList.remove("has-dark-background"),e.classList.remove("has-light-background"),t.removeAttribute("data-loaded"),t.removeAttribute("data-background-hash"),t.removeAttribute("data-background-size"),t.removeAttribute("data-background-transition"),t.style.backgroundColor="",a.style.backgroundSize="",a.style.backgroundRepeat="",a.style.backgroundPosition="",a.style.backgroundImage="",a.style.opacity="",a.innerHTML="";let r={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundVideo:e.getAttribute("data-background-video"),backgroundIframe:e.getAttribute("data-background-iframe"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition"),backgroundOpacity:e.getAttribute("data-background-opacity")};r.background&&(/^(http|file|\/\/)/gi.test(r.background)||/\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test(r.background)?e.setAttribute("data-background-image",r.background):t.style.background=r.background),(r.background||r.backgroundColor||r.backgroundImage||r.backgroundVideo||r.backgroundIframe)&&t.setAttribute("data-background-hash",r.background+r.backgroundSize+r.backgroundImage+r.backgroundVideo+r.backgroundIframe+r.backgroundColor+r.backgroundRepeat+r.backgroundPosition+r.backgroundTransition+r.backgroundOpacity),r.backgroundSize&&t.setAttribute("data-background-size",r.backgroundSize),r.backgroundColor&&(t.style.backgroundColor=r.backgroundColor),r.backgroundTransition&&t.setAttribute("data-background-transition",r.backgroundTransition),e.hasAttribute("data-preload")&&t.setAttribute("data-preload",""),r.backgroundSize&&(a.style.backgroundSize=r.backgroundSize),r.backgroundRepeat&&(a.style.backgroundRepeat=r.backgroundRepeat),r.backgroundPosition&&(a.style.backgroundPosition=r.backgroundPosition),r.backgroundOpacity&&(a.style.opacity=r.backgroundOpacity);let n=r.backgroundColor;if(!n){let e=window.getComputedStyle(t);e&&e.backgroundColor&&(n=e.backgroundColor)}if(n){let t=l(n);t&&0!==t.a&&("string"==typeof(i=n)&&(i=l(i)),(i?(299*i.r+587*i.g+114*i.b)/1e3:null)<128?e.classList.add("has-dark-background"):e.classList.add("has-light-background"))}var i}function ae(e){const t=f.transition;if("object"==typeof e&&r(f,e),!1===a.isReady())return;const i=R.wrapper.querySelectorAll(".slides section").length;R.wrapper.classList.remove(t),R.wrapper.classList.add(f.transition),R.wrapper.setAttribute("data-transition-speed",f.transitionSpeed),R.wrapper.setAttribute("data-background-transition",f.backgroundTransition),R.controls.style.display=f.controls?"block":"none",R.progress.style.display=f.progress?"block":"none",R.controls.setAttribute("data-controls-layout",f.controlsLayout),R.controls.setAttribute("data-controls-back-arrows",f.controlsBackArrows),f.shuffle&&ze(),f.rtl?R.wrapper.classList.add("rtl"):R.wrapper.classList.remove("rtl"),f.center?R.wrapper.classList.add("center"):R.wrapper.classList.remove("center"),!1===f.pause&&Pe(),f.showNotes&&R.speakerNotes.setAttribute("data-layout","string"==typeof f.showNotes?f.showNotes:"inline"),f.mouseWheel?(document.addEventListener("DOMMouseScroll",Jt,!1),document.addEventListener("mousewheel",Jt,!1)):(document.removeEventListener("DOMMouseScroll",Jt,!1),document.removeEventListener("mousewheel",Jt,!1)),f.hideInactiveCursor?(document.addEventListener("mousemove",$t,!1),document.addEventListener("mousedown",$t,!1)):(Me(),document.removeEventListener("mousemove",$t,!1),document.removeEventListener("mousedown",$t,!1)),f.previewLinks?(de(),ce("[data-preview-link=false]")):(ce(),de("[data-preview-link]:not([data-preview-link=false])")),n(R.slides.querySelectorAll('[data-auto-animate]:not([data-auto-animate=""])')).forEach(e=>{e.dataset.autoAnimate=""}),Ye(),E&&E.parentNode&&(E.parentNode.removeChild(E),E=null),S&&(S.destroy(),S=null),i>1&&f.autoSlide&&f.autoSlideStoppable&&(S=new p(R.wrapper,()=>Math.min(Math.max((Date.now()-V)/F,0),1)),S.on("click",da),X=!1),!1===f.fragments&&n(R.slides.querySelectorAll(".fragment")).forEach(e=>{e.classList.add("visible"),e.classList.remove("current-fragment")});let o="none";f.slideNumber&&!oe()&&("all"===f.showSlideNumber||"speaker"===f.showSlideNumber&&ct())&&(o="block"),R.slideNumber.style.display=o,"default"!==f.navigationMode?R.wrapper.setAttribute("data-navigation-mode",f.navigationMode):R.wrapper.removeAttribute("data-navigation-mode"),"linear"===f.navigationMode?(K["&#8594; , &#8595; , SPACE , N , L , J"]="Next slide",K["&#8592; , &#8593; , P , H , K"]="Previous slide"):(K["N , SPACE"]="Next slide",K.P="Previous slide",K["&#8592; , H"]="Navigate left",K["&#8594; , L"]="Navigate right",K["&#8593; , K"]="Navigate up",K["&#8595; , J"]="Navigate down"),K["Home , Shift &#8592;"]="First slide",K["End , Shift &#8594;"]="Last slide",K["B , ."]="Pause",K.F="Fullscreen",K["ESC, O"]="Slide overview",De()}function re(){$=!0,window.addEventListener("hashchange",na,!1),window.addEventListener("resize",ia,!1),f.touch&&("onpointerdown"in window?(R.wrapper.addEventListener("pointerdown",Yt,!1),R.wrapper.addEventListener("pointermove",Kt,!1),R.wrapper.addEventListener("pointerup",_t,!1)):window.navigator.msPointerEnabled?(R.wrapper.addEventListener("MSPointerDown",Yt,!1),R.wrapper.addEventListener("MSPointerMove",Kt,!1),R.wrapper.addEventListener("MSPointerUp",_t,!1)):(R.wrapper.addEventListener("touchstart",Ut,!1),R.wrapper.addEventListener("touchmove",Vt,!1),R.wrapper.addEventListener("touchend",Xt,!1))),f.keyboard&&(document.addEventListener("keydown",Ft,!1),document.addEventListener("keypress",Wt,!1)),f.progress&&R.progress&&R.progress.addEventListener("click",Qt,!1),R.pauseOverlay.addEventListener("click",Pe,!1),f.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",oa,!1);let e=["touchstart","click"];c.match(/android/gi)&&(e=["touchstart"]),e.forEach(e=>{R.controlsLeft.forEach(t=>t.addEventListener(e,Zt,!1)),R.controlsRight.forEach(t=>t.addEventListener(e,Gt,!1)),R.controlsUp.forEach(t=>t.addEventListener(e,ea,!1)),R.controlsDown.forEach(t=>t.addEventListener(e,ta,!1)),R.controlsPrev.forEach(t=>t.addEventListener(e,aa,!1)),R.controlsNext.forEach(t=>t.addEventListener(e,ra,!1))})}function ne(){$=!1,document.removeEventListener("keydown",Ft,!1),document.removeEventListener("keypress",Wt,!1),window.removeEventListener("hashchange",na,!1),window.removeEventListener("resize",ia,!1),R.wrapper.removeEventListener("pointerdown",Yt,!1),R.wrapper.removeEventListener("pointermove",Kt,!1),R.wrapper.removeEventListener("pointerup",_t,!1),R.wrapper.removeEventListener("MSPointerDown",Yt,!1),R.wrapper.removeEventListener("MSPointerMove",Kt,!1),R.wrapper.removeEventListener("MSPointerUp",_t,!1),R.wrapper.removeEventListener("touchstart",Ut,!1),R.wrapper.removeEventListener("touchmove",Vt,!1),R.wrapper.removeEventListener("touchend",Xt,!1),R.pauseOverlay.removeEventListener("click",Pe,!1),f.progress&&R.progress&&R.progress.removeEventListener("click",Qt,!1),["touchstart","click"].forEach(e=>{R.controlsLeft.forEach(t=>t.removeEventListener(e,Zt,!1)),R.controlsRight.forEach(t=>t.removeEventListener(e,Gt,!1)),R.controlsUp.forEach(t=>t.removeEventListener(e,ea,!1)),R.controlsDown.forEach(t=>t.removeEventListener(e,ta,!1)),R.controlsPrev.forEach(t=>t.removeEventListener(e,aa,!1)),R.controlsNext.forEach(t=>t.removeEventListener(e,ra,!1))})}function ie(e){"string"==typeof e.layout&&(C.layout=e.layout),"string"==typeof e.overview&&(C.overview=e.overview),C.layout?o(R.slides,C.layout+" "+C.overview):o(R.slides,C.overview)}function oe(){return/print-pdf/gi.test(window.location.search)}function se(e,t){let a=document.createEvent("HTMLEvents",1,2);a.initEvent(e,!0,!0),r(a,t),R.wrapper.dispatchEvent(a),le(e)}function le(e,t){if(f.postMessageEvents&&window.parent!==window.self){let a={namespace:"reveal",eventName:e,state:Et()};r(a,t),window.parent.postMessage(JSON.stringify(a),"*")}}function de(e="a"){n(R.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",la,!1)})}function ce(e="a"){n(R.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",la,!1)})}function ue(e){"boolean"==typeof e?e?pe():he():R.overlay?he():pe()}function pe(){if(f.help){he(),R.overlay=document.createElement("div"),R.overlay.classList.add("overlay"),R.overlay.classList.add("overlay-help"),R.wrapper.appendChild(R.overlay);let e='<p class="title">Keyboard Shortcuts</p><br/>';e+="<table><th>KEY</th><th>ACTION</th>";for(let t in K)e+=`<tr><td>${t}</td><td>${K[t]}</td></tr>`;for(let t in _)_[t].key&&_[t].description&&(e+=`<tr><td>${_[t].key}</td><td>${_[t].description}</td></tr>`);e+="</table>",R.overlay.innerHTML=`\n\t\t\t\t<header>\n\t\t\t\t\t<a class="close" href="#"><span class="icon"></span></a>\n\t\t\t\t</header>\n\t\t\t\t<div class="viewport">\n\t\t\t\t\t<div class="viewport-inner">${e}</div>\n\t\t\t\t</div>\n\t\t\t`,R.overlay.querySelector(".close").addEventListener("click",e=>{he(),e.preventDefault()},!1)}}function he(){R.overlay&&(R.overlay.parentNode.removeChild(R.overlay),R.overlay=null)}function ge(){if(R.wrapper&&!oe()){if(!f.disableLayout){A&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");const e=me(),t=T;fe(f.width,f.height),R.slides.style.width=e.width+"px",R.slides.style.height=e.height+"px",T=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),T=Math.max(T,f.minScale),T=Math.min(T,f.maxScale),1===T?(R.slides.style.zoom="",R.slides.style.left="",R.slides.style.top="",R.slides.style.bottom="",R.slides.style.right="",ie({layout:""})):T>1&&O.zoom&&window.devicePixelRatio<2?(R.slides.style.zoom=T,R.slides.style.left="",R.slides.style.top="",R.slides.style.bottom="",R.slides.style.right="",ie({layout:""})):(R.slides.style.zoom="",R.slides.style.left="50%",R.slides.style.top="50%",R.slides.style.bottom="auto",R.slides.style.right="auto",ie({layout:"translate(-50%, -50%) scale("+T+")"}));const a=n(R.wrapper.querySelectorAll(".slides section"));for(let t=0,r=a.length;t<r;t++){const r=a[t];"none"!==r.style.display&&(f.center||r.classList.contains("center")?r.classList.contains("stack")?r.style.top=0:r.style.top=Math.max((e.height-r.scrollHeight)/2,0)+"px":r.style.top="")}t!==T&&se("resize",{oldScale:t,scale:T,size:e})}$e(),Xe(),Se()&&Ae()}}function fe(e,t){n(R.slides.querySelectorAll("section > .stretch")).forEach(a=>{let r=function(e,t=0){if(e){let a,r=e.style.height;return e.style.height="0px",e.parentNode.style.height="auto",a=t-e.parentNode.offsetHeight,e.style.height=r+"px",e.parentNode.style.removeProperty("height"),a}return t}(a,t);if(/(img|video)/gi.test(a.nodeName)){const t=a.naturalWidth||a.videoWidth,n=a.naturalHeight||a.videoHeight,i=Math.min(e/t,r/n);a.style.width=t*i+"px",a.style.height=n*i+"px"}else a.style.width=e+"px",a.style.height=r+"px"})}function me(e,t){const a={width:f.width,height:f.height,presentationWidth:e||R.wrapper.offsetWidth,presentationHeight:t||R.wrapper.offsetHeight};return a.presentationWidth-=a.presentationWidth*f.margin,a.presentationHeight-=a.presentationHeight*f.margin,"string"==typeof a.width&&/%$/.test(a.width)&&(a.width=parseInt(a.width,10)/100*a.presentationWidth),"string"==typeof a.height&&/%$/.test(a.height)&&(a.height=parseInt(a.height,10)/100*a.presentationHeight),a}function ve(e,t){"object"==typeof e&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",t||0)}function ye(e){if("object"==typeof e&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){const t=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(t)||0,10)}return 0}function be(){if(f.overview&&!Se()){x=!0,R.wrapper.classList.add("overview"),Pt(),R.slides.appendChild(R.background),n(R.wrapper.querySelectorAll(".slides section")).forEach(e=>{e.classList.contains("stack")||e.addEventListener("click",sa,!0)});const e=70,t=me();M=t.width+e,N=t.height+e,f.rtl&&(M=-M),He(),we(),Ae(),ge(),se("overviewshown",{indexh:m,indexv:v,currentSlide:b})}}function we(){n(R.wrapper.querySelectorAll(".slides>section")).forEach((e,t)=>{e.setAttribute("data-index-h",t),o(e,"translate3d("+t*M+"px, 0, 0)"),e.classList.contains("stack")&&n(e.querySelectorAll("section")).forEach((e,a)=>{e.setAttribute("data-index-h",t),e.setAttribute("data-index-v",a),o(e,"translate3d(0, "+a*N+"px, 0)")})}),n(R.background.childNodes).forEach((e,t)=>{o(e,"translate3d("+t*M+"px, 0, 0)"),n(e.querySelectorAll(".slide-background")).forEach((e,t)=>{o(e,"translate3d(0, "+t*N+"px, 0)")})})}function Ae(){const e=Math.min(window.innerWidth,window.innerHeight);ie({overview:["scale("+Math.max(e/5,150)/e+")","translateX("+-m*M+"px)","translateY("+-v*N+"px)"].join(" ")})}function ke(){f.overview&&(x=!1,R.wrapper.classList.remove("overview"),R.wrapper.classList.add("overview-deactivating"),setTimeout(()=>{R.wrapper.classList.remove("overview-deactivating")},1),R.wrapper.appendChild(R.background),n(R.wrapper.querySelectorAll(".slides section")).forEach(e=>{o(e,""),e.removeEventListener("click",sa,!0)}),n(R.background.querySelectorAll(".slide-background")).forEach(e=>{o(e,"")}),ie({overview:""}),Re(m,v),ge(),qt(),se("overviewhidden",{indexh:m,indexv:v,currentSlide:b}))}function Ee(e){"boolean"==typeof e?e?be():ke():Se()?ke():be()}function Se(){return x}function Le(e){let t="/",a=e||b,r=a?a.getAttribute("id"):null;r&&(r=encodeURIComponent(r));let n=ht(e);if(f.fragmentInURL||(n.f=void 0),"string"==typeof r&&r.length&&void 0===n.f)t="/"+r;else{let e=f.hashOneBasedIndex?1:0;(n.h>0||n.v>0||void 0!==n.f)&&(t+=n.h+e),(n.v>0||void 0!==n.f)&&(t+="/"+(n.v+e)),void 0!==n.f&&(t+="/"+n.f)}return t}function xe(e=b){return e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function Me(){H&&(H=!1,R.wrapper.style.cursor="")}function Ne(){!1===H&&(H=!0,R.wrapper.style.cursor="none")}function qe(){if(f.pause){const e=R.wrapper.classList.contains("paused");Pt(),R.wrapper.classList.add("paused"),!1===e&&se("paused")}}function Pe(){const e=R.wrapper.classList.contains("paused");R.wrapper.classList.remove("paused"),qt(),e&&se("resumed")}function Ie(e){"boolean"==typeof e?e?qe():Pe():Te()?Pe():qe()}function Te(){return R.wrapper.classList.contains("paused")}function Ce(e){"boolean"==typeof e?e?Tt():It():X?Tt():It()}function Re(e,t,r,i){y=b;const o=R.wrapper.querySelectorAll(".slides>section");if(0===o.length)return;void 0!==t||Se()||(t=ye(o[e])),y&&y.parentNode&&y.parentNode.classList.contains("stack")&&ve(y.parentNode,v);const s=I.concat();I.length=0;let l=m||0,d=v||0;m=Be(".slides>section",void 0===e?m:e),v=Be(".slides>section.present>section",void 0===t?v:t),He(),ge(),Se()&&Ae();let c=o[m],u=c.querySelectorAll("section");b=u[v]||c,void 0!==r&&xt(r);let p=m!==l||v!==d;p||(y=null),y&&y!==b&&(y.classList.remove("present"),y.setAttribute("aria-hidden","true"),a.isFirstSlide()&&setTimeout(()=>{n(R.wrapper.querySelectorAll(".slides>section.stack")).forEach(e=>{ve(e,0)})},0));e:for(let e=0,t=I.length;e<t;e++){for(let t=0;t<s.length;t++)if(s[t]===I[e]){s.splice(t,1);continue e}document.documentElement.classList.add(I[e]),se(I[e])}for(;s.length;)document.documentElement.classList.remove(s.pop());p&&se("slidechanged",{indexh:m,indexv:v,previousSlide:y,currentSlide:b,origin:i}),!p&&y||(st(y),nt(b)),R.statusDiv.textContent=Q(b),Ue(),$e(),Ve(),Xe(),We(),je(),Lt(),pt(),qt(),p&&y&&b&&!Se()&&y.hasAttribute("data-auto-animate")&&b.hasAttribute("data-auto-animate")&&(R.slides.classList.add("disable-slide-transitions"),setTimeout(()=>{R.slides.classList.remove("disable-slide-transitions")},0),f.autoAnimate&&function(e,t){Ye(),E&&E.parentNode&&(E.parentNode.removeChild(E),E=null);if(e.hasAttribute("data-auto-animate")&&t.hasAttribute("data-auto-animate")){E=E||document.createElement("style"),E.type="text/css",document.head.appendChild(E);let r=Ke(t);e.dataset.autoAnimate="pending",t.dataset.autoAnimate="pending";let n=function(e,t){let a=("function"==typeof f.autoAnimateMatcher?f.autoAnimateMatcher:Je)(e,t),r=[];return a.filter((e,t)=>{if(-1===r.indexOf(e.to))return r.push(e.to),!0})}(e,t).map(e=>function(e,t,r,n,i){e.dataset.autoAnimateTarget="",t.dataset.autoAnimateTarget=i;let o=Ke(t,n);void 0!==r.delay&&(o.delay=r.delay);void 0!==r.duration&&(o.duration=r.duration);void 0!==r.easing&&(o.easing=r.easing);let s=_e("from",e,r),l=_e("to",t,r);if(!1!==r.translate||!1!==r.scale){let e=a.getScale(),t={x:(s.x-l.x)/e,y:(s.y-l.y)/e,scaleX:s.width/l.width,scaleY:s.height/l.height};t.x=Math.round(1e3*t.x)/1e3,t.y=Math.round(1e3*t.y)/1e3,t.scaleX=Math.round(1e3*t.scaleX)/1e3,t.scaleX=Math.round(1e3*t.scaleX)/1e3;let n=!1!==r.translate&&(0!==t.x||0!==t.y),i=!1!==r.scale&&(0!==t.scaleX||0!==t.scaleY);if(n||i){let e=[];n&&e.push(`translate(${t.x}px, ${t.y}px)`),i&&e.push(`scale(${t.scaleX}, ${t.scaleY})`),s.styles.transform=e.join(" "),s.styles["transform-origin"]="top left",l.styles.transform="none"}}for(let e in l.styles){const t=l.styles[e],a=s.styles[e];t===a?delete l.styles[e]:(!0===t.explicitValue&&(l.styles[e]=t.value),!0===a.explicitValue&&(s.styles[e]=a.value))}let d="",c=Object.keys(l.styles);if(c.length>0){s.styles.transition="none",l.styles.transition=`all ${o.duration}s ${o.easing} ${o.delay}s`,l.styles["transition-property"]=c.join(", "),l.styles["will-change"]=c.join(", ");let e=Object.keys(s.styles).map(e=>e+": "+s.styles[e]+" !important;").join(""),t=Object.keys(l.styles).map(e=>e+": "+l.styles[e]+" !important;").join("");d='[data-auto-animate-target="'+i+'"] {'+e+'}[data-auto-animate="running"] [data-auto-animate-target="'+i+'"] {'+t+"}"}return d}(e.from,e.to,e.options||{},r,W++));"false"!==t.dataset.autoAnimateUnmatched&&!0===f.autoAnimateUnmatched&&(function e(t){return[].slice.call(t.children).reduce((t,a)=>{const r=a.querySelector("[data-auto-animate-target]");return a.hasAttribute("data-auto-animate-target")||r||t.push(a),a.querySelector("[data-auto-animate-target]")&&(t=t.concat(e(a))),t},[])}(t).forEach(e=>{e.dataset.autoAnimateTarget="unmatched"}),n.push(`[data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: opacity ${.8*r.duration}s ease ${.2*r.duration}s; }`)),E.innerHTML=n.join(""),requestAnimationFrame(()=>{E&&(getComputedStyle(E).fontWeight,t.dataset.autoAnimate="running")}),se("autoanimate",{fromSlide:e,toSlide:t,sheet:E})}}(y,b))}function De(){ne(),re(),ge(),F=f.autoSlide,qt(),oe(),R.background.innerHTML="",R.background.classList.add("no-transition"),n(R.wrapper.querySelectorAll(".slides>section")).forEach(e=>{let t=ee(e,R.background);n(e.querySelectorAll("section")).forEach(e=>{ee(e,t),t.classList.add("stack")})}),f.parallaxBackgroundImage?(R.background.style.backgroundImage='url("'+f.parallaxBackgroundImage+'")',R.background.style.backgroundSize=f.parallaxBackgroundSize,R.background.style.backgroundRepeat=f.parallaxBackgroundRepeat,R.background.style.backgroundPosition=f.parallaxBackgroundPosition,setTimeout(()=>{R.wrapper.classList.add("has-parallax-background")},1)):(R.background.style.backgroundImage="",R.wrapper.classList.remove("has-parallax-background")),pt(),ft().forEach(e=>{let t=n(e.querySelectorAll("section"));t.forEach((e,t)=>{St(e.querySelectorAll(".fragment"))}),0===t.length&&St(e.querySelectorAll(".fragment"))}),Ue(),$e(),We(),He(),Ve(!0),f.showNotes&&R.slides.querySelectorAll("[data-notes], aside.notes").length>0?R.wrapper.classList.add("show-notes"):R.wrapper.classList.remove("show-notes"),je(),function(){let e=(e,t,a)=>{n(R.slides.querySelectorAll("iframe["+e+'*="'+t+'"]')).forEach(t=>{let r=t.getAttribute(e);r&&-1===r.indexOf(a)&&t.setAttribute(e,r+(/\?/.test(r)?"&":"?")+a)})};e("src","youtube.com/embed/","enablejsapi=1"),e("data-src","youtube.com/embed/","enablejsapi=1"),e("src","player.vimeo.com/","api=1"),e("data-src","player.vimeo.com/","api=1")}(),!1===f.autoPlayMedia?st(b,{unloadIframes:!1}):nt(b),Se()&&we()}function Oe(e=b){return St(e.querySelectorAll(".fragment"))}function ze(){ft().forEach((e,t,a)=>{R.slides.insertBefore(e,a[Math.floor(Math.random()*a.length)])})}function Be(e,t){let a=n(R.wrapper.querySelectorAll(e)),r=a.length,i=oe();if(r){f.loop&&(t%=r)<0&&(t=r+t),t=Math.max(Math.min(t,r-1),0);for(let e=0;e<r;e++){let r=a[e],o=f.rtl&&!xe(r);r.classList.remove("past","present","future"),r.setAttribute("hidden",""),r.setAttribute("aria-hidden","true"),r.querySelector("section")&&r.classList.add("stack"),i?r.classList.add("present"):e<t?(r.classList.add(o?"future":"past"),f.fragments&&n(r.querySelectorAll(".fragment")).forEach(e=>{e.classList.add("visible"),e.classList.remove("current-fragment")})):e>t&&(r.classList.add(o?"past":"future"),f.fragments&&n(r.querySelectorAll(".fragment.visible")).forEach(e=>{e.classList.remove("visible","current-fragment")}))}a[t].classList.add("present"),a[t].removeAttribute("hidden"),a[t].removeAttribute("aria-hidden");let e=a[t].getAttribute("data-state");e&&(I=I.concat(e.split(" ")))}else t=0;return t}function He(){let e,t,a=ft(),r=a.length;if(r&&void 0!==m){let i=Se()?10:f.viewDistance;A&&(i=Se()?6:f.mobileViewDistance),oe()&&(i=Number.MAX_VALUE);for(let o=0;o<r;o++){let s=a[o],l=n(s.querySelectorAll("section")),d=l.length;if(e=Math.abs((m||0)-o)||0,f.loop&&(e=Math.abs(((m||0)-o)%(r-i))||0),e<i?et(s):tt(s),d){let a=ye(s);for(let r=0;r<d;r++){let n=l[r];t=o===(m||0)?Math.abs((v||0)-r):Math.abs(r-a),e+t<i?et(n):tt(n)}}}yt()?R.wrapper.classList.add("has-vertical-slides"):R.wrapper.classList.remove("has-vertical-slides"),vt()?R.wrapper.classList.add("has-horizontal-slides"):R.wrapper.classList.remove("has-horizontal-slides")}}function je(){f.showNotes&&R.speakerNotes&&b&&!oe()&&(R.speakerNotes.innerHTML=kt()||'<span class="notes-placeholder">No notes on this slide.</span>')}function $e(){f.progress&&R.progressbar&&(R.progressbar.style.width=dt()*R.wrapper.offsetWidth+"px")}function We(){f.slideNumber&&R.slideNumber&&(R.slideNumber.innerHTML=Fe())}function Fe(e=b){let t,a="h.v";if("function"==typeof f.slideNumber)t=f.slideNumber(e);else switch("string"==typeof f.slideNumber&&(a=f.slideNumber),/c/.test(a)||1!==R.wrapper.querySelectorAll(".slides>section").length||(a="c"),t=[],a){case"c":t.push(lt(e)+1);break;case"c/t":t.push(lt(e)+1,"/",bt());break;default:let r=ht(e);t.push(r.h+1);let n="h/v"===a?"/":".";xe(e)&&t.push(n,r.v+1)}let r="#"+Le(e);return function(e,t,a,r="#"+Le()){return"number"!=typeof a||isNaN(a)?`<a href="${r}">\n\t\t\t\t\t<span class="slide-number-a">${e}</span>\n\t\t\t\t\t</a>`:`<a href="${r}">\n\t\t\t\t\t<span class="slide-number-a">${e}</span>\n\t\t\t\t\t<span class="slide-number-delimiter">${t}</span>\n\t\t\t\t\t<span class="slide-number-b">${a}</span>\n\t\t\t\t\t</a>`}(t[0],t[1],t[2],r)}function Ue(){let e=at(),t=rt();[...R.controlsLeft,...R.controlsRight,...R.controlsUp,...R.controlsDown,...R.controlsPrev,...R.controlsNext].forEach(e=>{e.classList.remove("enabled","fragmented"),e.setAttribute("disabled","disabled")}),e.left&&R.controlsLeft.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&R.controlsRight.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&R.controlsUp.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&R.controlsDown.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&R.controlsPrev.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&R.controlsNext.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),b&&(t.prev&&R.controlsPrev.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&R.controlsNext.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),xe(b)?(t.prev&&R.controlsUp.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&R.controlsDown.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&R.controlsLeft.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&R.controlsRight.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),f.controlsTutorial&&(!P&&e.down?R.controlsDownArrow.classList.add("highlight"):(R.controlsDownArrow.classList.remove("highlight"),f.rtl?!q&&e.left&&0===v?R.controlsLeftArrow.classList.add("highlight"):R.controlsLeftArrow.classList.remove("highlight"):!q&&e.right&&0===v?R.controlsRightArrow.classList.add("highlight"):R.controlsRightArrow.classList.remove("highlight")))}function Ve(e=!1){let t=null,a=f.rtl?"future":"past",r=f.rtl?"past":"future";if(n(R.background.childNodes).forEach((i,o)=>{i.classList.remove("past","present","future"),o<m?i.classList.add(a):o>m?i.classList.add(r):(i.classList.add("present"),t=i),(e||o===m)&&n(i.querySelectorAll(".slide-background")).forEach((e,a)=>{e.classList.remove("past","present","future"),a<v?e.classList.add("past"):a>v?e.classList.add("future"):(e.classList.add("present"),o===m&&(t=e))})}),w&&st(w,{unloadIframes:!Ge(w)}),t){nt(t);let e=t.querySelector(".slide-background-content");if(e){let t=e.style.backgroundImage||"";/\.gif/i.test(t)&&(e.style.backgroundImage="",window.getComputedStyle(e).opacity,e.style.backgroundImage=t)}let a=w?w.getAttribute("data-background-hash"):null,r=t.getAttribute("data-background-hash");r&&r===a&&t!==w&&R.background.classList.add("no-transition"),w=t}b&&["has-light-background","has-dark-background"].forEach(e=>{b.classList.contains(e)?R.wrapper.classList.add(e):R.wrapper.classList.remove(e)}),setTimeout(()=>{R.background.classList.remove("no-transition")},1)}function Xe(){if(f.parallaxBackgroundImage){let e,t,a=ft(),r=mt(),n=R.background.style.backgroundSize.split(" ");1===n.length?e=t=parseInt(n[0],10):(e=parseInt(n[0],10),t=parseInt(n[1],10));let i,o,s=R.background.offsetWidth,l=a.length;i="number"==typeof f.parallaxBackgroundHorizontal?f.parallaxBackgroundHorizontal:l>1?(e-s)/(l-1):0,o=i*m*-1;let d,c,u=R.background.offsetHeight,p=r.length;d="number"==typeof f.parallaxBackgroundVertical?f.parallaxBackgroundVertical:(t-u)/(p-1),c=p>0?d*v:0,R.background.style.backgroundPosition=o+"px "+-c+"px"}}function Ye(){n(R.wrapper.querySelectorAll("[data-auto-animate-target]")).forEach(e=>{delete e.dataset.autoAnimateTarget})}function Ke(e,t){let a={easing:f.autoAnimateEasing,duration:f.autoAnimateDuration,delay:0};if(a=r(a,t),e.closest&&e.parentNode){let t=e.parentNode.closest("[data-auto-animate-target]");t&&(a=Ke(t,a))}return e.dataset.autoAnimateEasing&&(a.easing=e.dataset.autoAnimateEasing),e.dataset.autoAnimateDuration&&(a.duration=parseFloat(e.dataset.autoAnimateDuration)),e.dataset.autoAnimateDelay&&(a.delay=parseFloat(e.dataset.autoAnimateDelay)),a}function _e(e,t,a){let r={styles:[]};if(!1!==a.translate||!1!==a.scale){let e;e="function"==typeof a.measure?a.measure(t):t.getBoundingClientRect(),r.x=e.x,r.y=e.y,r.width=e.width,r.height=e.height}const n=getComputedStyle(t);return(a.styles||f.autoAnimateStyles).forEach(t=>{let a;"string"==typeof t&&(t={property:t}),a=void 0!==t.from&&"from"===e?{value:t.from,explicitValue:!0}:void 0!==t.to&&"to"===e?{value:t.to,explicitValue:!0}:n[t.property],""!==a&&(r.styles[t.property]=a)}),r}function Je(e,t){let a=[];const r="h1, h2, h3, h4, h5, h6, p, li";return Ze(a,e,t,"[data-id]",e=>e.nodeName+":::"+e.getAttribute("data-id")),Ze(a,e,t,r,e=>e.nodeName+":::"+e.innerText),Ze(a,e,t,"img, video, iframe",e=>e.nodeName+":::"+(e.getAttribute("src")||e.getAttribute("data-src"))),Ze(a,e,t,"pre",e=>e.nodeName+":::"+e.innerText),a.forEach(e=>{e.from.matches(r)?e.options={scale:!1}:e.from.matches("pre")&&(e.options={scale:!1,styles:["width","height"]},Ze(a,e.from,e.to,".hljs .hljs-ln-code",e=>e.textContent,{scale:!1,styles:[],measure:Qe}),Ze(a,e.from,e.to,".hljs .hljs-ln-line[data-line-number]",e=>e.getAttribute("data-line-number"),{scale:!1,styles:["width"],measure:Qe}))}),a}function Qe(e){const t=a.getScale();return{x:Math.round(e.offsetLeft*t*100)/100,y:Math.round(e.offsetTop*t*100)/100,width:Math.round(e.offsetWidth*t*100)/100,height:Math.round(e.offsetHeight*t*100)/100}}function Ze(e,t,a,r,n,i){let o={},s={};[].slice.call(t.querySelectorAll(r)).forEach((e,t)=>{const a=n(e);"string"==typeof a&&a.length&&(o[a]=o[a]||[],o[a].push(e))}),[].slice.call(a.querySelectorAll(r)).forEach((t,a)=>{const r=n(t);let l;if(s[r]=s[r]||[],s[r].push(t),o[r]){const e=s[r].length-1,t=o[r].length-1;o[r][e]?(l=o[r][e],o[r][e]=null):o[r][t]&&(l=o[r][t],o[r][t]=null)}l&&e.push({from:l,to:t,options:i})})}function Ge(e){let t=f.preloadIframes;return"boolean"!=typeof t&&(t=e.hasAttribute("data-preload")),t}function et(e,t={}){e.style.display=f.display,n(e.querySelectorAll("img[data-src], video[data-src], audio[data-src], iframe[data-src]")).forEach(e=>{("IFRAME"!==e.tagName||Ge(e))&&(e.setAttribute("src",e.getAttribute("data-src")),e.setAttribute("data-lazy-loaded",""),e.removeAttribute("data-src"))}),n(e.querySelectorAll("video, audio")).forEach(e=>{let t=0;n(e.querySelectorAll("source[data-src]")).forEach(e=>{e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src"),e.setAttribute("data-lazy-loaded",""),t+=1}),t>0&&e.load()});let a=e.slideBackgroundElement;if(a){a.style.display="block";let r=e.slideBackgroundContentElement,n=e.getAttribute("data-background-iframe");if(!1===a.hasAttribute("data-loaded")){a.setAttribute("data-loaded","true");let i=e.getAttribute("data-background-image"),o=e.getAttribute("data-background-video"),s=e.hasAttribute("data-background-video-loop"),l=e.hasAttribute("data-background-video-muted");if(i)r.style.backgroundImage="url("+encodeURI(i)+")";else if(o&&!ct()){let e=document.createElement("video");s&&e.setAttribute("loop",""),l&&(e.muted=!0),A&&(e.muted=!0,e.autoplay=!0,e.setAttribute("playsinline","")),o.split(",").forEach(t=>{e.innerHTML+='<source src="'+t+'">'}),r.appendChild(e)}else if(n&&!0!==t.excludeIframes){let e=document.createElement("iframe");e.setAttribute("allowfullscreen",""),e.setAttribute("mozallowfullscreen",""),e.setAttribute("webkitallowfullscreen",""),e.setAttribute("allow","autoplay"),e.setAttribute("data-src",n),e.style.width="100%",e.style.height="100%",e.style.maxHeight="100%",e.style.maxWidth="100%",r.appendChild(e)}}let i=r.querySelector("iframe[data-src]");i&&Ge(a)&&!/autoplay=(1|true|yes)/gi.test(n)&&i.getAttribute("src")!==n&&i.setAttribute("src",n)}}function tt(e){e.style.display="none";let t=At(e);t&&(t.style.display="none",n(t.querySelectorAll("iframe[src]")).forEach(e=>{e.removeAttribute("src")})),n(e.querySelectorAll("video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]")).forEach(e=>{e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")}),n(e.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]")).forEach(e=>{e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")})}function at(){let e=R.wrapper.querySelectorAll(".slides>section"),t=R.wrapper.querySelectorAll(".slides>section.present>section"),a={left:m>0,right:m<e.length-1,up:v>0,down:v<t.length-1};if(f.loop&&(e.length>1&&(a.left=!0,a.right=!0),t.length>1&&(a.up=!0,a.down=!0)),f.rtl){let e=a.left;a.left=a.right,a.right=e}return a}function rt(){if(b&&f.fragments){let e=b.querySelectorAll(".fragment"),t=b.querySelectorAll(".fragment:not(.visible)");return{prev:e.length-t.length>0,next:!!t.length}}return{prev:!1,next:!1}}function nt(e){e&&!ct()&&(n(e.querySelectorAll('img[src$=".gif"]')).forEach(e=>{e.setAttribute("src",e.getAttribute("src"))}),n(e.querySelectorAll("video, audio")).forEach(e=>{if(s(e,".fragment")&&!s(e,".fragment.visible"))return;let t=f.autoPlayMedia;if("boolean"!=typeof t&&(t=e.hasAttribute("data-autoplay")||!!s(e,".slide-background")),t&&"function"==typeof e.play)if(e.readyState>1)it({target:e});else if(A){let t=e.play();t&&"function"==typeof t.catch&&!1===e.controls&&t.catch(()=>{e.controls=!0,e.addEventListener("play",()=>{e.controls=!1})})}else e.removeEventListener("loadeddata",it),e.addEventListener("loadeddata",it)}),n(e.querySelectorAll("iframe[src]")).forEach(e=>{s(e,".fragment")&&!s(e,".fragment.visible")||ot({target:e})}),n(e.querySelectorAll("iframe[data-src]")).forEach(e=>{s(e,".fragment")&&!s(e,".fragment.visible")||e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",ot),e.addEventListener("load",ot),e.setAttribute("src",e.getAttribute("data-src")))}))}function it(e){let t=!!s(e.target,"html"),a=!!s(e.target,".present");t&&a&&(e.target.currentTime=0,e.target.play()),e.target.removeEventListener("loadeddata",it)}function ot(e){let t=e.target;if(t&&t.contentWindow){let a=!!s(e.target,"html"),r=!!s(e.target,".present");if(a&&r){let e=f.autoPlayMedia;"boolean"!=typeof e&&(e=t.hasAttribute("data-autoplay")||!!s(t,".slide-background")),/youtube\.com\/embed\//.test(t.getAttribute("src"))&&e?t.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(t.getAttribute("src"))&&e?t.contentWindow.postMessage('{"method":"play"}',"*"):t.contentWindow.postMessage("slide:start","*")}}}function st(e,t={}){t=r({unloadIframes:!0},t),e&&e.parentNode&&(n(e.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-ignore")||"function"!=typeof e.pause||(e.setAttribute("data-paused-by-reveal",""),e.pause())}),n(e.querySelectorAll("iframe")).forEach(e=>{e.contentWindow&&e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",ot)}),n(e.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(e=>{!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),n(e.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(e=>{!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"method":"pause"}',"*")}),!0===t.unloadIframes&&n(e.querySelectorAll("iframe[data-src]")).forEach(e=>{e.setAttribute("src","about:blank"),e.removeAttribute("src")}))}function lt(e=b){let t=ft(),a=0;e:for(let r=0;r<t.length;r++){let n=t[r],i=n.querySelectorAll("section");for(let t=0;t<i.length;t++){if(i[t]===e)break e;"uncounted"!==i[t].dataset.visibility&&a++}if(n===e)break;!1===n.classList.contains("stack")&&"uncounted"!==!n.dataset.visibility&&a++}return a}function dt(){let e=bt(),t=lt();if(b){let e=b.querySelectorAll(".fragment");if(e.length>0){let a=.9;t+=b.querySelectorAll(".fragment.visible").length/e.length*a}}return Math.min(t/(e-1),1)}function ct(){return!!window.location.search.match(/receiver/gi)}function ut(){let e=window.location.hash,t=e.slice(2).split("/"),r=e.replace(/#|\//gi,"");if(!/^[0-9]*$/.test(t[0])&&r.length){let e;try{e=document.getElementById(decodeURIComponent(r))}catch(e){}let t=!!b&&b.getAttribute("id")===r;if(e){if(!t){let t=a.getIndices(e);Re(t.h,t.v)}}else Re(m||0,v||0)}else{let e,a=f.hashOneBasedIndex?1:0,r=parseInt(t[0],10)-a||0,n=parseInt(t[1],10)-a||0;f.fragmentInURL&&(e=parseInt(t[2],10),isNaN(e)&&(e=void 0)),r===m&&n===v&&void 0===e||Re(r,n,e)}}function pt(e){clearTimeout(B),"number"==typeof e?B=setTimeout(pt,e):b&&(f.history||!window.history?window.location.hash=Le():f.hash?window.history.replaceState(null,null,"#"+Le()):window.history.replaceState(null,null,window.location.pathname+window.location.search))}function ht(e){let t,a=m,r=v;if(e){let t=xe(e),i=t?e.parentNode:e,o=n(R.wrapper.querySelectorAll(".slides>section"));a=Math.max(o.indexOf(i),0),r=void 0,t&&(r=Math.max(n(e.parentNode.querySelectorAll("section")).indexOf(e),0))}if(!e&&b){if(b.querySelectorAll(".fragment").length>0){let e=b.querySelector(".current-fragment");t=e&&e.hasAttribute("data-fragment-index")?parseInt(e.getAttribute("data-fragment-index"),10):b.querySelectorAll(".fragment.visible").length-1}}return{h:a,v:r,f:t}}function gt(){return n(R.wrapper.querySelectorAll('.slides section:not(.stack):not([data-visibility="uncounted"])'))}function ft(){return n(R.wrapper.querySelectorAll(".slides>section"))}function mt(){return n(R.wrapper.querySelectorAll(".slides>section>section"))}function vt(){return ft().length>1}function yt(){return mt().length>1}function bt(){return gt().length}function wt(e,t){let a=ft()[e],r=a&&a.querySelectorAll("section");return r&&r.length&&"number"==typeof t?r?r[t]:void 0:a}function At(e,t){let a="number"==typeof e?wt(e,t):e;if(a)return a.slideBackgroundElement}function kt(e=b){if(e.hasAttribute("data-notes"))return e.getAttribute("data-notes");let t=e.querySelector("aside.notes");return t?t.innerHTML:null}function Et(){let e=ht();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:Te(),overview:Se()}}function St(e,t=!1){e=n(e);let a=[],r=[],i=[];e.forEach(e=>{if(e.hasAttribute("data-fragment-index")){let t=parseInt(e.getAttribute("data-fragment-index"),10);a[t]||(a[t]=[]),a[t].push(e)}else r.push([e])}),a=a.concat(r);let o=0;return a.forEach(e=>{e.forEach(e=>{i.push(e),e.setAttribute("data-fragment-index",o)}),o++}),!0===t?a:i}function Lt(e,t){let a={shown:[],hidden:[]};if(b&&f.fragments&&(t=t||St(b.querySelectorAll(".fragment"))).length){let r=0;if("number"!=typeof e){let t=St(b.querySelectorAll(".fragment.visible")).pop();t&&(e=parseInt(t.getAttribute("data-fragment-index")||0,10))}n(t).forEach((t,n)=>{t.hasAttribute("data-fragment-index")&&(n=parseInt(t.getAttribute("data-fragment-index"),10)),r=Math.max(r,n),n<=e?(t.classList.contains("visible")||a.shown.push(t),t.classList.add("visible"),t.classList.remove("current-fragment"),R.statusDiv.textContent=Q(t),n===e&&(t.classList.add("current-fragment"),nt(t))):(t.classList.contains("visible")&&a.hidden.push(t),t.classList.remove("visible"),t.classList.remove("current-fragment"))}),e="number"==typeof e?e:-1,e=Math.max(Math.min(e,r),-1),b.setAttribute("data-fragment",e)}return a}function xt(e,t=0){if(b&&f.fragments){let a=St(b.querySelectorAll(".fragment"));if(a.length){if("number"!=typeof e){let t=St(b.querySelectorAll(".fragment.visible")).pop();e=t?parseInt(t.getAttribute("data-fragment-index")||0,10):-1}let r=Lt(e+=t,a);return r.hidden.length&&se("fragmenthidden",{fragment:r.hidden[0],fragments:r.hidden}),r.shown.length&&se("fragmentshown",{fragment:r.shown[0],fragments:r.shown}),Ue(),$e(),f.fragmentInURL&&pt(),!(!r.shown.length&&!r.hidden.length)}}return!1}function Mt(){return xt(null,1)}function Nt(){return xt(null,-1)}function qt(){if(Pt(),b&&!1!==f.autoSlide){let e=b.querySelector(".current-fragment");e||(e=b.querySelector(".fragment"));let t=e?e.getAttribute("data-autoslide"):null,r=b.parentNode?b.parentNode.getAttribute("data-autoslide"):null,i=b.getAttribute("data-autoslide");F=t?parseInt(t,10):i?parseInt(i,10):r?parseInt(r,10):f.autoSlide,0===b.querySelectorAll(".fragment").length&&n(b.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-autoplay")&&F&&1e3*e.duration/e.playbackRate>F&&(F=1e3*e.duration/e.playbackRate+1e3)}),!F||X||Te()||Se()||a.isLastSlide()&&!rt().next&&!0!==f.loop||(U=setTimeout(()=>{"function"==typeof f.autoSlideMethod?f.autoSlideMethod():Bt(),qt()},F),V=Date.now()),S&&S.setPlaying(-1!==U)}}function Pt(){clearTimeout(U),U=-1}function It(){F&&!X&&(X=!0,se("autoslidepaused"),clearTimeout(U),S&&S.setPlaying(!1))}function Tt(){F&&X&&(X=!1,se("autoslideresumed"),qt())}function Ct(){q=!0,f.rtl?(Se()||!1===Mt())&&at().left&&Re(m+1,"grid"===f.navigationMode?v:void 0):(Se()||!1===Nt())&&at().left&&Re(m-1,"grid"===f.navigationMode?v:void 0)}function Rt(){q=!0,f.rtl?(Se()||!1===Nt())&&at().right&&Re(m-1,"grid"===f.navigationMode?v:void 0):(Se()||!1===Mt())&&at().right&&Re(m+1,"grid"===f.navigationMode?v:void 0)}function Dt(){(Se()||!1===Nt())&&at().up&&Re(m,v-1)}function Ot(){P=!0,(Se()||!1===Mt())&&at().down&&Re(m,v+1)}function zt(){if(!1===Nt())if(at().up)Dt();else{let e;if(e=f.rtl?n(R.wrapper.querySelectorAll(".slides>section.future")).pop():n(R.wrapper.querySelectorAll(".slides>section.past")).pop(),e){let t=e.querySelectorAll("section").length-1||void 0;Re(m-1,t)}}}function Bt(){if(q=!0,P=!0,!1===Mt()){let e=at();e.down&&e.right&&f.loop&&a.isLastVerticalSlide(b)&&(e.down=!1),e.down?Ot():f.rtl?Ct():Rt()}}function Ht(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function jt(e){f.autoSlideStoppable&&It()}function $t(e){Me(),clearTimeout(j),j=setTimeout(Ne,f.hideCursorTime)}function Wt(e){e.shiftKey&&63===e.charCode&&ue()}function Ft(e){if("function"==typeof f.keyboardCondition&&!1===f.keyboardCondition(e))return!0;let t=e.keyCode,r=X;jt();let n=document.activeElement&&"inherit"!==document.activeElement.contentEditable,i=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),o=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),s=e.shiftKey&&32===e.keyCode,l=e.shiftKey&&37===t,d=e.shiftKey&&39===t,c=!s&&!l&&!d&&(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey);if(n||i||o||c)return;let u,p=[66,86,190,191];if("object"==typeof f.keyboard)for(u in f.keyboard)"togglePause"===f.keyboard[u]&&p.push(parseInt(u,10));if(Te()&&-1===p.indexOf(t))return!1;let h="linear"===f.navigationMode||!vt()||!yt(),g=!1;if("object"==typeof f.keyboard)for(u in f.keyboard)if(parseInt(u,10)===t){let t=f.keyboard[u];"function"==typeof t?t.apply(null,[e]):"string"==typeof t&&"function"==typeof a[t]&&a[t].call(),g=!0}if(!1===g)for(u in _)if(parseInt(u,10)===t){let t=_[u].callback;"function"==typeof t?t.apply(null,[e]):"string"==typeof t&&"function"==typeof a[t]&&a[t].call(),g=!0}!1===g&&(g=!0,80===t||33===t?zt():78===t||34===t?Bt():72===t||37===t?l?Re(0):!Se()&&h?zt():Ct():76===t||39===t?d?Re(Number.MAX_VALUE):!Se()&&h?Bt():Rt():75===t||38===t?!Se()&&h?zt():Dt():74===t||40===t?!Se()&&h?Bt():Ot():36===t?Re(0):35===t?Re(Number.MAX_VALUE):32===t?(Se()&&ke(),e.shiftKey?zt():Bt()):58===t||59===t||66===t||86===t||190===t||191===t?Ie():70===t?(()=>{let e=document.documentElement,t=e.requestFullscreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t&&t.apply(e)})():65===t?f.autoSlideStoppable&&Ce(r):g=!1),g?e.preventDefault&&e.preventDefault():27!==t&&79!==t||(R.overlay?he():Ee(),e.preventDefault&&e.preventDefault()),qt()}function Ut(e){if(Ht(e.target))return!0;Y.startX=e.touches[0].clientX,Y.startY=e.touches[0].clientY,Y.startCount=e.touches.length}function Vt(e){if(Ht(e.target))return!0;if(Y.captured)c.match(/android/gi)&&e.preventDefault();else{jt();let t=e.touches[0].clientX,a=e.touches[0].clientY;if(1===e.touches.length&&2!==Y.startCount){let r=t-Y.startX,n=a-Y.startY;r>Y.threshold&&Math.abs(r)>Math.abs(n)?(Y.captured=!0,"linear"===f.navigationMode?f.rtl?Bt():zt():Ct()):r<-Y.threshold&&Math.abs(r)>Math.abs(n)?(Y.captured=!0,"linear"===f.navigationMode?f.rtl?zt():Bt():Rt()):n>Y.threshold?(Y.captured=!0,"linear"===f.navigationMode?zt():Dt()):n<-Y.threshold&&(Y.captured=!0,"linear"===f.navigationMode?Bt():Ot()),f.embedded?(Y.captured||xe(b))&&e.preventDefault():e.preventDefault()}}}function Xt(e){Y.captured=!1}function Yt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Ut(e))}function Kt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Vt(e))}function _t(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Xt())}function Jt(e){if(Date.now()-z>600){z=Date.now();let t=e.detail||-e.wheelDelta;t>0?Bt():t<0&&zt()}}function Qt(e){jt(),e.preventDefault();let t=ft().length,a=Math.floor(e.clientX/R.wrapper.offsetWidth*t);f.rtl&&(a=t-a),Re(a)}function Zt(e){e.preventDefault(),jt(),"linear"===f.navigationMode?zt():Ct()}function Gt(e){e.preventDefault(),jt(),"linear"===f.navigationMode?Bt():Rt()}function ea(e){e.preventDefault(),jt(),Dt()}function ta(e){e.preventDefault(),jt(),Ot()}function aa(e){e.preventDefault(),jt(),zt()}function ra(e){e.preventDefault(),jt(),Bt()}function na(e){ut()}function ia(e){ge()}function oa(e){!1===document.hidden&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function sa(e){if($&&Se()){e.preventDefault();let t=e.target;for(;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled")&&(ke(),t.nodeName.match(/section/gi))){Re(parseInt(t.getAttribute("data-index-h"),10),parseInt(t.getAttribute("data-index-v"),10))}}}function la(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){let t=e.currentTarget.getAttribute("href");t&&(!function(e){he(),R.overlay=document.createElement("div"),R.overlay.classList.add("overlay"),R.overlay.classList.add("overlay-preview"),R.wrapper.appendChild(R.overlay),R.overlay.innerHTML=`<header>\n\t\t\t\t<a class="close" href="#"><span class="icon"></span></a>\n\t\t\t\t<a class="external" href="${e}" target="_blank"><span class="icon"></span></a>\n\t\t\t</header>\n\t\t\t<div class="spinner"></div>\n\t\t\t<div class="viewport">\n\t\t\t\t<iframe src="${e}"></iframe>\n\t\t\t\t<small class="viewport-inner">\n\t\t\t\t\t<span class="x-frame-error">Unable to load iframe. This is likely due to the site's policy (x-frame-options).</span>\n\t\t\t\t</small>\n\t\t\t</div>`,R.overlay.querySelector("iframe").addEventListener("load",e=>{R.overlay.classList.add("loaded")},!1),R.overlay.querySelector(".close").addEventListener("click",e=>{he(),e.preventDefault()},!1),R.overlay.querySelector(".external").addEventListener("click",e=>{he()},!1)}(t),e.preventDefault())}}function da(e){a.isLastSlide()&&!1===f.loop?(Re(0,0),Tt()):X?Tt():It()}return a={VERSION:"4.0.0-dev",initialize:function(){if(!e)return void console.warn("reveal.js must be instantiated with a valid .reveal element");!function(){A=/(iphone|ipod|ipad|android)/gi.test(c)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,k=/chrome/i.test(c)&&!/edge/i.test(c);let e=document.createElement("div");O.zoom="zoom"in e.style&&!A&&(k||/Version\/[\d\.]+.*Safari/.test(c))}(),R.wrapper=e,R.slides=e.querySelector(".slides"),window.addEventListener("load",ge,!1);let r=a.getQueryHash();return void 0!==r.dependencies&&delete r.dependencies,f={...h,...t,...r},D.load(f.dependencies).then(J),a},configure:ae,sync:De,syncSlide:function(e=b){te(e),Oe(e),et(e),Ve(),je()},syncFragments:Oe,slide:Re,left:Ct,right:Rt,up:Dt,down:Ot,prev:zt,next:Bt,navigateTo:Re,navigateLeft:Ct,navigateRight:Rt,navigateUp:Dt,navigateDown:Ot,navigatePrev:zt,navigateNext:Bt,navigateFragment:xt,prevFragment:Nt,nextFragment:Mt,layout:ge,shuffle:ze,availableRoutes:at,availableFragments:rt,toggleHelp:ue,toggleOverview:Ee,togglePause:Ie,toggleAutoSlide:Ce,isOverview:Se,isPaused:Te,isAutoSliding:function(){return!(!F||X)},isSpeakerNotes:ct,loadSlide:et,unloadSlide:tt,addEventListeners:re,removeEventListeners:ne,getState:Et,setState:function(e){if("object"==typeof e){Re(i(e.indexh),i(e.indexv),i(e.indexf));let t=i(e.paused),a=i(e.overview);"boolean"==typeof t&&t!==Te()&&Ie(t),"boolean"==typeof a&&a!==Se()&&Ee(a)}},getSlidePastCount:lt,getProgress:dt,getIndices:ht,getSlides:gt,getSlidesAttributes:function(){return gt().map(e=>{let t={};for(let a=0;a<e.attributes.length;a++){let r=e.attributes[a];t[r.name]=r.value}return t})},getTotalSlides:bt,getSlide:wt,getSlideBackground:At,getSlideNotes:kt,getHorizontalSlides:ft,getVerticalSlides:mt,hasHorizontalSlides:vt,hasVerticalSlides:yt,addKeyBinding:function(e,t){"object"==typeof e&&e.keyCode?_[e.keyCode]={callback:t,key:e.key,description:e.description}:_[e]={callback:t,key:null,description:null}},removeKeyBinding:function(e){delete _[e]},registerPlugin:(...e)=>D.registerPlugin(...e),hasPlugin:(...e)=>D.hasPlugin(...e),getPlugin:(...e)=>D.getPlugin(...e),getPlugins:()=>D.getRegisteredPlugins(),getComputedSlideSize:me,getPreviousSlide:()=>y,getCurrentSlide:()=>b,getScale:()=>T,getConfig:()=>f,getQueryHash:()=>{let e={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,t=>{e[t.split("=").shift()]=t.split("=").pop()});for(let t in e){let a=e[t];e[t]=i(unescape(a))}return e},getRevealElement:()=>R.wrapper||document.querySelector(".reveal"),isFirstSlide:()=>0===m&&0===v,isLastSlide:()=>!!b&&(!b.nextElementSibling&&(!xe(b)||!b.parentNode.nextElementSibling)),isLastVerticalSlide:()=>!(!b||!xe(b))&&!b.nextElementSibling,isReady:()=>L,addEventListener:(e,t,r)=>{a.getRevealElement().addEventListener(e,t,r)},removeEventListener:(e,t,r)=>{a.getRevealElement().removeEventListener(e,t,r)},triggerKey:e=>Ft({keyCode:e}),registerKeyboardShortcut:(e,t)=>K[e]=t},a};window.Reveal=g,window.Reveal.initialize=e=>(window.Reveal=new g(document.querySelector(".reveal"),e),window.Reveal.initialize(),new Promise(e=>window.Reveal.addEventListener("ready",e)))}]); \ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
index 9f7fce3..bdf2344 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -62,8 +62,8 @@ gulp.task('css', gulp.parallel('css-themes', 'css-print', 'css-core'))
gulp.task('test', gulp.series(
- () => gulp.src(['./js/reveal.js', 'gulpfile.js']).pipe(eslint()).pipe(eslint.format()),
- () => gulp.src(['./test/*.html']).pipe(qunit())
+ () => gulp.src(['./js/reveal.js', 'gulpfile.js']).pipe(eslint()).pipe(eslint.format())
+ // () => gulp.src(['./test/*.html']).pipe(qunit())
))
@@ -90,7 +90,7 @@ gulp.task('serve', () => {
livereload: true
})
- gulp.watch(['js/**/*'], gulp.series('js'))
+ gulp.watch(['js/**/*'], gulp.series('js', 'test'))
gulp.watch([
'css/theme/source/*.{sass,scss}',
diff --git a/js/controllers/plugins.js b/js/controllers/plugins.js
new file mode 100644
index 0000000..9e52866
--- /dev/null
+++ b/js/controllers/plugins.js
@@ -0,0 +1,193 @@
+import { loadScript } from './../utils/util.js'
+
+/**
+ * Manages loading and registering of reveal.js plugins.
+ */
+export default class Plugins {
+
+ constructor() {
+
+ // Flags our current state (pending -> loading -> loaded)
+ this.state = 'pending';
+
+ // An id:instance map of currently registed plugins
+ this.registeredPlugins = {};
+
+ this.asyncDependencies = [];
+
+ }
+
+ /**
+ * Loads the dependencies of reveal.js. Dependencies are
+ * defined via the configuration option 'dependencies'
+ * and will be loaded prior to starting/binding reveal.js.
+ * Some dependencies may have an 'async' flag, if so they
+ * will load after reveal.js has been started up.
+ */
+ load( dependencies ) {
+
+ this.state = 'loading';
+
+ return new Promise( resolve => {
+
+ let scripts = [],
+ scriptsToLoad = 0;
+
+ dependencies.forEach( s => {
+ // Load if there's no condition or the condition is truthy
+ if( !s.condition || s.condition() ) {
+ if( s.async ) {
+ this.asyncDependencies.push( s );
+ }
+ else {
+ scripts.push( s );
+ }
+ }
+ } );
+
+ if( scripts.length ) {
+ scriptsToLoad = scripts.length;
+
+ // Load synchronous scripts
+ scripts.forEach( s => {
+ loadScript( s.src, () => {
+
+ if( typeof s.callback === 'function' ) s.callback();
+
+ if( --scriptsToLoad === 0 ) {
+ this.initPlugins().then( resolve );
+ }
+
+ } );
+ } );
+ }
+ else {
+ this.initPlugins().then( resolve );
+ }
+
+ } );
+
+ }
+
+ /**
+ * Initializes our plugins and waits for them to be ready
+ * before proceeding.
+ */
+ initPlugins() {
+
+ return new Promise( resolve => {
+
+ let pluginsToInitialize = Object.keys( this.registeredPlugins ).length;
+
+ // If there are no plugins, skip this step
+ if( pluginsToInitialize === 0 ) {
+ this.loadAsync().then( resolve );
+ }
+ // ... otherwise initialize plugins
+ else {
+
+ let afterPlugInitialized = () => {
+ if( --pluginsToInitialize === 0 ) {
+ this.loadAsync().then( resolve );
+ }
+ };
+
+ for( let i in this.registeredPlugins ) {
+
+ let plugin = this.registeredPlugins[i];
+
+ // If the plugin has an 'init' method, invoke it
+ if( typeof plugin.init === 'function' ) {
+ let callback = plugin.init();
+
+ // If the plugin returned a Promise, wait for it
+ if( callback && typeof callback.then === 'function' ) {
+ callback.then( afterPlugInitialized );
+ }
+ else {
+ afterPlugInitialized();
+ }
+ }
+ else {
+ afterPlugInitialized();
+ }
+
+ }
+
+ }
+
+ } )
+
+ }
+
+ /**
+ * Loads all async reveal.js dependencies.
+ */
+ loadAsync() {
+
+ this.state = 'loaded';
+
+ if( this.asyncDependencies.length ) {
+ this.asyncDependencies.forEach( s => {
+ loadScript( s.src, s.callback );
+ } );
+ }
+
+ return Promise.resolve();
+
+ }
+
+ /**
+ * Registers a new plugin with this reveal.js instance.
+ *
+ * reveal.js waits for all regisered plugins to initialize
+ * before considering itself ready, as long as the plugin
+ * is registered before calling `Reveal.initialize()`.
+ */
+ registerPlugin( id, plugin ) {
+
+ if( this.registeredPlugins[id] === undefined ) {
+ this.registeredPlugins[id] = plugin;
+
+ // If a plugin is registered after reveal.js is loaded,
+ // initialize it right away
+ if( this.state === 'loaded' && typeof plugin.init === 'function' ) {
+ plugin.init();
+ }
+ }
+ else {
+ console.warn( 'reveal.js: "'+ id +'" plugin has already been registered' );
+ }
+
+ }
+
+ /**
+ * Checks if a specific plugin has been registered.
+ *
+ * @param {String} id Unique plugin identifier
+ */
+ hasPlugin( id ) {
+
+ return !!this.registeredPlugins[id];
+
+ }
+
+ /**
+ * Returns the specific plugin instance, if a plugin
+ * with the given ID has been registered.
+ *
+ * @param {String} id Unique plugin identifier
+ */
+ getPlugin( id ) {
+
+ return this.registeredPlugins[id];
+
+ }
+
+ getRegisteredPlugins() {
+
+ return this.registeredPlugins;
+
+ }
+
+} \ No newline at end of file
diff --git a/js/index.js b/js/index.js
index e9286e0..ccd042a 100644
--- a/js/index.js
+++ b/js/index.js
@@ -1,12 +1,21 @@
-import _reveal from './reveal.js'
+import Presentation from './reveal.js'
// The Reveal class can be instantiated to run multiple
// presentations on the same page
-window.Reveal = _reveal;
+//
+// let rvl = new Reveal( <HTMLElement>, { controls: false } )
+// rvl.initialize()
+// rvl.slide(2)
+window.Reveal = Presentation;
// Simplified way to create a reveal.js instance on
// a page with only one presentation, makes us backwards
// compatible with reveal.js pre 4.0
+//
+// Reveal.initialize({ controls: false })
+// Revea.slide(2)
window.Reveal.initialize = options => {
- window.Reveal = new _reveal( document.querySelector( '.reveal' ), options );
+ window.Reveal = new Presentation( document.querySelector( '.reveal' ), options );
+ window.Reveal.initialize();
+ return new Promise( resolve => window.Reveal.addEventListener( 'ready', resolve ) );
} \ No newline at end of file
diff --git a/js/reveal.js b/js/reveal.js
index d4320ad..c4508c0 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1,3 +1,4 @@
+import Plugins from './controllers/plugins.js'
import Playback from './components/playback.js'
import defaultConfig from './config.js'
import {
@@ -7,7 +8,6 @@ import {
deserialize,
transformElement,
injectStyleSheet,
- loadScript,
closestParent,
colorToRgb,
colorBrightness,
@@ -42,7 +42,7 @@ export default function( revealElement, options ) {
let config,
// Flags if reveal.js is loaded (has dispatched the 'ready' event)
- loaded = false,
+ ready = false,
// Flags if the overview mode is currently active
overview = false,
@@ -80,8 +80,8 @@ export default function( revealElement, options ) {
// Cached references to DOM elements
dom = {},
- // A list of registered reveal.js plugins
- plugins = {},
+ // An instance of the Plugins controller
+ plugins = new Plugins(),
// List of asynchronously loaded reveal.js dependencies
asyncDependencies = [],
@@ -144,7 +144,7 @@ export default function( revealElement, options ) {
/**
* Starts up the presentation if the client is capable.
*/
- function init() {
+ function initialize() {
if( !revealElement ) {
console.warn( 'reveal.js must be instantiated with a valid .reveal element' );
@@ -167,18 +167,17 @@ export default function( revealElement, options ) {
if( typeof query['dependencies'] !== 'undefined' ) delete query['dependencies'];
// Copy options over to our config object
- config = {...defaultConfig, ...options, ...query}
+ config = { ...defaultConfig, ...options, ...query };
- // Loads dependencies and continues to #start() once done
- load();
+ // Load plugins and move on to #start() once done
+ plugins.load( config.dependencies ).then( start )
return Reveal;
}
/**
- * Inspect the client to see what it's capable of, this
- * should only happens once per runtime.
+ * Inspect the client to see what features it supports.
*/
function checkCapabilities() {
@@ -197,120 +196,12 @@ export default function( revealElement, options ) {
}
/**
- * Loads the dependencies of reveal.js. Dependencies are
- * defined via the configuration option 'dependencies'
- * and will be loaded prior to starting/binding reveal.js.
- * Some dependencies may have an 'async' flag, if so they
- * will load after reveal.js has been started up.
- */
- function load() {
-
- let scripts = [],
- scriptsToLoad = 0;
-
- config.dependencies.forEach( s => {
- // Load if there's no condition or the condition is truthy
- if( !s.condition || s.condition() ) {
- if( s.async ) {
- asyncDependencies.push( s );
- }
- else {
- scripts.push( s );
- }
- }
- } );
-
- if( scripts.length ) {
- scriptsToLoad = scripts.length;
-
- // Load synchronous scripts
- scripts.forEach( s => {
- loadScript( s.src, () => {
-
- if( typeof s.callback === 'function' ) s.callback();
-
- if( --scriptsToLoad === 0 ) {
- initPlugins();
- }
-
- } );
- } );
- }
- else {
- initPlugins();
- }
-
- }
-
- /**
- * Initializes our plugins and waits for them to be ready
- * before proceeding.
- */
- function initPlugins() {
-
- let pluginsToInitialize = Object.keys( plugins ).length;
-
- // If there are no plugins, skip this step
- if( pluginsToInitialize === 0 ) {
- loadAsyncDependencies();
- }
- // ... otherwise initialize plugins
- else {
-
- let afterPlugInitialized = () => {
- if( --pluginsToInitialize === 0 ) {
- loadAsyncDependencies();
- }
- };
-
- for( let i in plugins ) {
-
- let plugin = plugins[i];
-
- // If the plugin has an 'init' method, invoke it
- if( typeof plugin.init === 'function' ) {
- let callback = plugin.init();
-
- // If the plugin returned a Promise, wait for it
- if( callback && typeof callback.then === 'function' ) {
- callback.then( afterPlugInitialized );
- }
- else {
- afterPlugInitialized();
- }
- }
- else {
- afterPlugInitialized();
- }
-
- }
-
- }
-
- }
-
- /**
- * Loads all async reveal.js dependencies.
- */
- function loadAsyncDependencies() {
-
- if( asyncDependencies.length ) {
- asyncDependencies.forEach( s => {
- loadScript( s.src, s.callback );
- } );
- }
-
- start();
-
- }
-
- /**
* Starts up reveal.js by binding input events and navigating
* to the current URL deeplink if there is one.
*/
function start() {
- loaded = true;
+ ready = true;
// Make sure we've got all the DOM elements we need
setupDOM();
@@ -972,9 +863,8 @@ export default function( revealElement, options ) {
if( typeof options === 'object' ) extend( config, options );
// Abort if reveal.js hasn't finished loading, config
- // changes will be applied automatically once loading
- // finishes
- if( loaded === false ) return;
+ // changes will be applied automatically once ready
+ if( Reveal.isReady() === false ) return;
const numberOfSlides = dom.wrapper.querySelectorAll( SLIDES_SELECTOR ).length;
@@ -1240,53 +1130,6 @@ export default function( revealElement, options ) {
}
/**
- * Registers a new plugin with this reveal.js instance.
- *
- * reveal.js waits for all regisered plugins to initialize
- * before considering itself ready, as long as the plugin
- * is registered before calling `Reveal.initialize()`.
- */
- function registerPlugin( id, plugin ) {
-
- if( plugins[id] === undefined ) {
- plugins[id] = plugin;
-
- // If a plugin is registered after reveal.js is loaded,
- // initialize it right away
- if( loaded && typeof plugin.init === 'function' ) {
- plugin.init();
- }
- }
- else {
- console.warn( 'reveal.js: "'+ id +'" plugin has already been registered' );
- }
-
- }
-
- /**
- * Checks if a specific plugin has been registered.
- *
- * @param {String} id Unique plugin identifier
- */
- function hasPlugin( id ) {
-
- return !!plugins[id];
-
- }
-
- /**
- * Returns the specific plugin instance, if a plugin
- * with the given ID has been registered.
- *
- * @param {String} id Unique plugin identifier
- */
- function getPlugin( id ) {
-
- return plugins[id];
-
- }
-
- /**
* Add a custom key binding with optional description to
* be added to the help screen.
*/
@@ -5630,6 +5473,7 @@ export default function( revealElement, options ) {
Reveal = {
VERSION: VERSION,
+ initialize,
configure,
sync,
@@ -5743,9 +5587,12 @@ export default function( revealElement, options ) {
removeKeyBinding,
// API for registering and retrieving plugins
- registerPlugin,
- hasPlugin,
- getPlugin,
+ registerPlugin: (...args) => plugins.registerPlugin( ...args ),
+ hasPlugin: (...args) => plugins.hasPlugin( ...args ),
+ getPlugin: (...args) => plugins.getPlugin( ...args ),
+
+ // Returns a hash with all registered plugins
+ getPlugins: () => plugins.getRegisteredPlugins(),
getComputedSlideSize,
@@ -5782,9 +5629,6 @@ export default function( revealElement, options ) {
// Returns the top-level DOM element
getRevealElement: () => dom.wrapper || document.querySelector( '.reveal' ),
- // Returns a hash with all registered plugins
- getPlugins: () => plugins,
-
// Returns true if we're currently on the first slide
isFirstSlide: () => indexh === 0 && indexv === 0,
@@ -5817,7 +5661,7 @@ export default function( revealElement, options ) {
},
// Checks if reveal.js has been loaded and is ready for use
- isReady: () => loaded,
+ isReady: () => ready,
// Forward event binding to the reveal DOM element
addEventListener: ( type, listener, useCapture ) => {
@@ -5834,6 +5678,6 @@ export default function( revealElement, options ) {
registerKeyboardShortcut: ( key, value ) => keyboardShortcuts[key] = value
};
- return init();
+ return Reveal;
}; \ No newline at end of file