From 3d6212378aeaed4ce2f4ffd070b79cecf221977e Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 10 Mar 2020 20:28:56 +0100 Subject: [PATCH] new keyboard module --- dist/reveal.min.js | 2 +- js/controllers/keyboard.js | 362 +++++++++++++++++++++++++++++++++++++ js/reveal.js | 361 ++++-------------------------------- 3 files changed, 396 insertions(+), 329 deletions(-) create mode 100644 js/controllers/keyboard.js diff --git a/dist/reveal.min.js b/dist/reveal.min.js index 1061ad54..c62e64e6 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(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(i,n,function(t){return e[t]}.bind(null,n));return i},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 i=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/,n=(e,t)=>{for(let a in t)e[a]=t[a];return e},r=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},o=(e,t)=>{e.style.transform=t},l=(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},d=e=>{let t=document.createElement("style");return t.type="text/css",e&&e.length>0&&(t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))),document.head.appendChild(t),t},c=navigator.userAgent,u=document.createElement("div"),h=/(iphone|ipod|ipad|android)/gi.test(c)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,p=/chrome/i.test(c)&&!/edge/i.test(c),g=/android/gi.test(c),f="zoom"in u.style&&!h&&(p||/Version\/[\d\.]+.*Safari/.test(c));class m{constructor(e){this.Reveal=e}shouldPreload(e){let t=this.Reveal.getConfig().preloadIframes;return"boolean"!=typeof t&&(t=e.hasAttribute("data-preload")),t}load(e,t={}){e.style.display=this.Reveal.getConfig().display,r(e.querySelectorAll("img[data-src], video[data-src], audio[data-src], iframe[data-src]")).forEach(e=>{("IFRAME"!==e.tagName||this.shouldPreload(e))&&(e.setAttribute("src",e.getAttribute("data-src")),e.setAttribute("data-lazy-loaded",""),e.removeAttribute("data-src"))}),r(e.querySelectorAll("video, audio")).forEach(e=>{let t=0;r(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 i=e.slideBackgroundContentElement,n=e.getAttribute("data-background-iframe");if(!1===a.hasAttribute("data-loaded")){a.setAttribute("data-loaded","true");let r=e.getAttribute("data-background-image"),s=e.getAttribute("data-background-video"),o=e.hasAttribute("data-background-video-loop"),l=e.hasAttribute("data-background-video-muted");if(r)i.style.backgroundImage="url("+encodeURI(r)+")";else if(s&&!this.Reveal.isSpeakerNotes()){let e=document.createElement("video");o&&e.setAttribute("loop",""),l&&(e.muted=!0),h&&(e.muted=!0,e.autoplay=!0,e.setAttribute("playsinline","")),s.split(",").forEach(t=>{e.innerHTML+=''}),i.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%",i.appendChild(e)}}let r=i.querySelector("iframe[data-src]");r&&this.shouldPreload(a)&&!/autoplay=(1|true|yes)/gi.test(n)&&r.getAttribute("src")!==n&&r.setAttribute("src",n)}}unload(e){e.style.display="none";let t=this.Reveal.getSlideBackground(e);t&&(t.style.display="none",r(t.querySelectorAll("iframe[src]")).forEach(e=>{e.removeAttribute("src")})),r(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")}),r(e.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]")).forEach(e=>{e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")})}formatEmbeddedContent(){let e=(e,t,a)=>{r(this.Reveal.getSlidesElement().querySelectorAll("iframe["+e+'*="'+t+'"]')).forEach(t=>{let i=t.getAttribute(e);i&&-1===i.indexOf(a)&&t.setAttribute(e,i+(/\?/.test(i)?"&":"?")+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")}startEmbeddedContent(e){e&&!this.Reveal.isSpeakerNotes()&&(r(e.querySelectorAll('img[src$=".gif"]')).forEach(e=>{e.setAttribute("src",e.getAttribute("src"))}),r(e.querySelectorAll("video, audio")).forEach(e=>{if(l(e,".fragment")&&!l(e,".fragment.visible"))return;let t=this.Reveal.getConfig().autoPlayMedia;if("boolean"!=typeof t&&(t=e.hasAttribute("data-autoplay")||!!l(e,".slide-background")),t&&"function"==typeof e.play)if(e.readyState>1)this.startEmbeddedMedia({target:e});else if(h){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",this.startEmbeddedMedia),e.addEventListener("loadeddata",this.startEmbeddedMedia)}),r(e.querySelectorAll("iframe[src]")).forEach(e=>{l(e,".fragment")&&!l(e,".fragment.visible")||this.startEmbeddedIframe({target:e})}),r(e.querySelectorAll("iframe[data-src]")).forEach(e=>{l(e,".fragment")&&!l(e,".fragment.visible")||e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",this.startEmbeddedIframe),e.addEventListener("load",this.startEmbeddedIframe),e.setAttribute("src",e.getAttribute("data-src")))}))}startEmbeddedMedia(e){let t=!!l(e.target,"html"),a=!!l(e.target,".present");t&&a&&(e.target.currentTime=0,e.target.play()),e.target.removeEventListener("loadeddata",this.startEmbeddedMedia)}startEmbeddedIframe(e){let t=e.target;if(t&&t.contentWindow){let a=!!l(e.target,"html"),i=!!l(e.target,".present");if(a&&i){let e=this.Reveal.getConfig().autoPlayMedia;"boolean"!=typeof e&&(e=t.hasAttribute("data-autoplay")||!!l(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","*")}}}stopEmbeddedContent(e,t={}){t=n({unloadIframes:!0},t),e&&e.parentNode&&(r(e.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-ignore")||"function"!=typeof e.pause||(e.setAttribute("data-paused-by-reveal",""),e.pause())}),r(e.querySelectorAll("iframe")).forEach(e=>{e.contentWindow&&e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",this.startEmbeddedIframe)}),r(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":""}',"*")}),r(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&&r(e.querySelectorAll("iframe[data-src]")).forEach(e=>{e.setAttribute("src","about:blank"),e.removeAttribute("src")}))}}class v{constructor(e){this.Reveal=e,this.autoAnimateCounter=0}run(e,t){if(this.reset(),e.hasAttribute("data-auto-animate")&&t.hasAttribute("data-auto-animate")){this.autoAnimateStyleSheet=this.autoAnimateStyleSheet||d();let a=this.getAutoAnimateOptions(t);e.dataset.autoAnimate="pending",t.dataset.autoAnimate="pending";let i=this.getAutoAnimatableElements(e,t).map(e=>this.getAutoAnimateCSS(e.from,e.to,e.options||{},a,this.autoAnimateCounter++));"false"!==t.dataset.autoAnimateUnmatched&&!0===this.Reveal.getConfig().autoAnimateUnmatched&&(this.getUnmatchedAutoAnimateElements(t).forEach(e=>{e.dataset.autoAnimateTarget="unmatched"}),i.push(`[data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: opacity ${.8*a.duration}s ease ${.2*a.duration}s; }`)),this.autoAnimateStyleSheet.innerHTML=i.join(""),requestAnimationFrame(()=>{this.autoAnimateStyleSheet&&(getComputedStyle(this.autoAnimateStyleSheet).fontWeight,t.dataset.autoAnimate="running")}),this.Reveal.dispatchEvent("autoanimate",{fromSlide:e,toSlide:t,sheet:this.autoAnimateStyleSheet})}}reset(){r(this.Reveal.getRevealElement().querySelectorAll('[data-auto-animate]:not([data-auto-animate=""])')).forEach(e=>{e.dataset.autoAnimate=""}),r(this.Reveal.getRevealElement().querySelectorAll("[data-auto-animate-target]")).forEach(e=>{delete e.dataset.autoAnimateTarget}),this.autoAnimateStyleSheet&&this.autoAnimateStyleSheet.parentNode&&(this.autoAnimateStyleSheet.parentNode.removeChild(this.autoAnimateStyleSheet),this.autoAnimateStyleSheet=null)}getAutoAnimateCSS(e,t,a,i,n){e.dataset.autoAnimateTarget="",t.dataset.autoAnimateTarget=n;let r=this.getAutoAnimateOptions(t,i);void 0!==a.delay&&(r.delay=a.delay),void 0!==a.duration&&(r.duration=a.duration),void 0!==a.easing&&(r.easing=a.easing);let s=this.getAutoAnimatableProperties("from",e,a),o=this.getAutoAnimatableProperties("to",t,a);if(!1!==a.translate||!1!==a.scale){let e=this.Reveal.getScale(),t={x:(s.x-o.x)/e,y:(s.y-o.y)/e,scaleX:s.width/o.width,scaleY:s.height/o.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 i=!1!==a.translate&&(0!==t.x||0!==t.y),n=!1!==a.scale&&(0!==t.scaleX||0!==t.scaleY);if(i||n){let e=[];i&&e.push(`translate(${t.x}px, ${t.y}px)`),n&&e.push(`scale(${t.scaleX}, ${t.scaleY})`),s.styles.transform=e.join(" "),s.styles["transform-origin"]="top left",o.styles.transform="none"}}for(let e in o.styles){const t=o.styles[e],a=s.styles[e];t===a?delete o.styles[e]:(!0===t.explicitValue&&(o.styles[e]=t.value),!0===a.explicitValue&&(s.styles[e]=a.value))}let l="",d=Object.keys(o.styles);if(d.length>0){s.styles.transition="none",o.styles.transition=`all ${r.duration}s ${r.easing} ${r.delay}s`,o.styles["transition-property"]=d.join(", "),o.styles["will-change"]=d.join(", "),l='[data-auto-animate-target="'+n+'"] {'+Object.keys(s.styles).map(e=>e+": "+s.styles[e]+" !important;").join("")+'}[data-auto-animate="running"] [data-auto-animate-target="'+n+'"] {'+Object.keys(o.styles).map(e=>e+": "+o.styles[e]+" !important;").join("")+"}"}return l}getAutoAnimateOptions(e,t){let a={easing:this.Reveal.getConfig().autoAnimateEasing,duration:this.Reveal.getConfig().autoAnimateDuration,delay:0};if(a=n(a,t),e.closest&&e.parentNode){let t=e.parentNode.closest("[data-auto-animate-target]");t&&(a=this.getAutoAnimateOptions(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}getAutoAnimatableProperties(e,t,a){let i={styles:[]};if(!1!==a.translate||!1!==a.scale){let e;e="function"==typeof a.measure?a.measure(t):t.getBoundingClientRect(),i.x=e.x,i.y=e.y,i.width=e.width,i.height=e.height}const n=getComputedStyle(t);return(a.styles||this.Reveal.getConfig().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&&(i.styles[t.property]=a)}),i}getAutoAnimatableElements(e,t){let a=("function"==typeof this.Reveal.getConfig().autoAnimateMatcher?this.Reveal.getConfig().autoAnimateMatcher:this.getAutoAnimatePairs).call(this,e,t),i=[];return a.filter((e,t)=>{if(-1===i.indexOf(e.to))return i.push(e.to),!0})}getAutoAnimatePairs(e,t){let a=[];const i="h1, h2, h3, h4, h5, h6, p, li";return this.findAutoAnimateMatches(a,e,t,"[data-id]",e=>e.nodeName+":::"+e.getAttribute("data-id")),this.findAutoAnimateMatches(a,e,t,i,e=>e.nodeName+":::"+e.innerText),this.findAutoAnimateMatches(a,e,t,"img, video, iframe",e=>e.nodeName+":::"+(e.getAttribute("src")||e.getAttribute("data-src"))),this.findAutoAnimateMatches(a,e,t,"pre",e=>e.nodeName+":::"+e.innerText),a.forEach(e=>{e.from.matches(i)?e.options={scale:!1}:e.from.matches("pre")&&(e.options={scale:!1,styles:["width","height"]},this.findAutoAnimateMatches(a,e.from,e.to,".hljs .hljs-ln-code",e=>e.textContent,{scale:!1,styles:[],measure:this.getLocalBoundingBox.bind(this)}),this.findAutoAnimateMatches(a,e.from,e.to,".hljs .hljs-ln-line[data-line-number]",e=>e.getAttribute("data-line-number"),{scale:!1,styles:["width"],measure:this.getLocalBoundingBox.bind(this)}))},this),a}getLocalBoundingBox(e){const t=this.Reveal.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}}findAutoAnimateMatches(e,t,a,i,n,r){let s={},o={};[].slice.call(t.querySelectorAll(i)).forEach((e,t)=>{const a=n(e);"string"==typeof a&&a.length&&(s[a]=s[a]||[],s[a].push(e))}),[].slice.call(a.querySelectorAll(i)).forEach((t,a)=>{const i=n(t);let l;if(o[i]=o[i]||[],o[i].push(t),s[i]){const e=o[i].length-1,t=s[i].length-1;s[i][e]?(l=s[i][e],s[i][e]=null):s[i][t]&&(l=s[i][t],s[i][t]=null)}l&&e.push({from:l,to:t,options:r})})}getUnmatchedAutoAnimateElements(e){return[].slice.call(e.children).reduce((e,t)=>{const a=t.querySelector("[data-auto-animate-target]");return t.hasAttribute("data-auto-animate-target")||a||e.push(t),t.querySelector("[data-auto-animate-target]")&&(e=e.concat(this.getUnmatchedAutoAnimateElements(t))),e},[])}}class b{constructor(e){this.Reveal=e}showAll(){r(this.Reveal.getSlidesElement().querySelectorAll(".fragment")).forEach(e=>{e.classList.add("visible"),e.classList.remove("current-fragment")})}availableRoutes(){let e=this.Reveal.getCurrentSlide();if(e&&this.Reveal.getConfig().fragments){let t=e.querySelectorAll(".fragment"),a=e.querySelectorAll(".fragment:not(.visible)");return{prev:t.length-a.length>0,next:!!a.length}}return{prev:!1,next:!1}}sort(e,t=!1){e=r(e);let a=[],i=[],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 i.push([e])}),a=a.concat(i);let s=0;return a.forEach(e=>{e.forEach(e=>{n.push(e),e.setAttribute("data-fragment-index",s)}),s++}),!0===t?a:n}sortAll(){this.Reveal.getHorizontalSlides().forEach(e=>{let t=r(e.querySelectorAll("section"));t.forEach((e,t)=>{this.sort(e.querySelectorAll(".fragment"))},this),0===t.length&&this.sort(e.querySelectorAll(".fragment"))})}update(e,t){let a={shown:[],hidden:[]},i=this.Reveal.getCurrentSlide();if(i&&this.Reveal.getConfig().fragments&&(t=t||this.sort(i.querySelectorAll(".fragment"))).length){let n=0;if("number"!=typeof e){let t=this.sort(i.querySelectorAll(".fragment.visible")).pop();t&&(e=parseInt(t.getAttribute("data-fragment-index")||0,10))}r(t).forEach((t,i)=>{t.hasAttribute("data-fragment-index")&&(i=parseInt(t.getAttribute("data-fragment-index"),10)),n=Math.max(n,i),i<=e?(t.classList.contains("visible")||a.shown.push(t),t.classList.add("visible"),t.classList.remove("current-fragment"),this.Reveal.announceStatus(this.Reveal.getStatusText(t)),i===e&&(t.classList.add("current-fragment"),this.Reveal.slideContent.startEmbeddedContent(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,n),-1),i.setAttribute("data-fragment",e)}return a}goto(e,t=0){let a=this.Reveal.getCurrentSlide();if(a&&this.Reveal.getConfig().fragments){let i=this.sort(a.querySelectorAll(".fragment"));if(i.length){if("number"!=typeof e){let t=this.sort(a.querySelectorAll(".fragment.visible")).pop();e=t?parseInt(t.getAttribute("data-fragment-index")||0,10):-1}e+=t;let n=this.update(e,i);return n.hidden.length&&this.Reveal.dispatchEvent("fragmenthidden",{fragment:n.hidden[0],fragments:n.hidden}),n.shown.length&&this.Reveal.dispatchEvent("fragmentshown",{fragment:n.shown[0],fragments:n.shown}),this.Reveal.updateControls(),this.Reveal.updateProgress(),this.Reveal.getConfig().fragmentInURL&&this.Reveal.writeURL(),!(!n.shown.length&&!n.hidden.length)}}return!1}next(){return this.goto(null,1)}prev(){return this.goto(null,-1)}}class y{constructor(e){this.Reveal=e,this.active=!1,this.onSlideClicked=this.onSlideClicked.bind(this)}activate(){if(this.Reveal.getConfig().overview&&!this.isActive()){this.active=!0,this.Reveal.getRevealElement().classList.add("overview"),this.Reveal.cancelAutoSlide(),this.Reveal.getSlidesElement().appendChild(this.Reveal.getBackgroundsElement()),r(this.Reveal.getRevealElement().querySelectorAll(".slides section")).forEach(e=>{e.classList.contains("stack")||e.addEventListener("click",this.onSlideClicked,!0)});const e=70,t=this.Reveal.getComputedSlideSize();this.overviewSlideWidth=t.width+e,this.overviewSlideHeight=t.height+e,this.Reveal.getConfig().rtl&&(this.overviewSlideWidth=-this.overviewSlideWidth),this.Reveal.updateSlidesVisibility(),this.layout(),this.update(),this.Reveal.layout();const a=this.Reveal.getIndices();this.Reveal.dispatchEvent("overviewshown",{indexh:a.h,indexv:a.v,currentSlide:this.Reveal.getCurrentSlide()})}}layout(){this.Reveal.getHorizontalSlides().forEach((e,t)=>{e.setAttribute("data-index-h",t),o(e,"translate3d("+t*this.overviewSlideWidth+"px, 0, 0)"),e.classList.contains("stack")&&r(e.querySelectorAll("section")).forEach((e,a)=>{e.setAttribute("data-index-h",t),e.setAttribute("data-index-v",a),o(e,"translate3d(0, "+a*this.overviewSlideHeight+"px, 0)")})}),r(this.Reveal.getBackgroundsElement().childNodes).forEach((e,t)=>{o(e,"translate3d("+t*this.overviewSlideWidth+"px, 0, 0)"),r(e.querySelectorAll(".slide-background")).forEach((e,t)=>{o(e,"translate3d(0, "+t*this.overviewSlideHeight+"px, 0)")})})}update(){const e=Math.min(window.innerWidth,window.innerHeight),t=Math.max(e/5,150)/e,a=this.Reveal.getIndices();this.Reveal.transformSlides({overview:["scale("+t+")","translateX("+-a.h*this.overviewSlideWidth+"px)","translateY("+-a.v*this.overviewSlideHeight+"px)"].join(" ")})}deactivate(){if(this.Reveal.getConfig().overview){this.active=!1,this.Reveal.getRevealElement().classList.remove("overview"),this.Reveal.getRevealElement().classList.add("overview-deactivating"),setTimeout(()=>{this.Reveal.getRevealElement().classList.remove("overview-deactivating")},1),this.Reveal.getRevealElement().appendChild(this.Reveal.getBackgroundsElement()),r(this.Reveal.getRevealElement().querySelectorAll(".slides section")).forEach(e=>{o(e,""),e.removeEventListener("click",this.onSlideClicked,!0)}),r(this.Reveal.getBackgroundsElement().querySelectorAll(".slide-background")).forEach(e=>{o(e,"")}),this.Reveal.transformSlides({overview:""});const e=this.Reveal.getIndices();this.Reveal.slide(e.h,e.v),this.Reveal.layout(),this.Reveal.cueAutoSlide(),this.Reveal.dispatchEvent("overviewhidden",{indexh:e.h,indexv:e.v,currentSlide:this.Reveal.getCurrentSlide()})}}toggle(e){"boolean"==typeof e?e?this.activate():this.deactivate():this.isActive()?this.deactivate():this.activate()}isActive(){return this.active}onSlideClicked(e){if(this.isActive()){e.preventDefault();let t=e.target;for(;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled")&&(this.deactivate(),t.nodeName.match(/section/gi))){let e=parseInt(t.getAttribute("data-index-h"),10),a=parseInt(t.getAttribute("data-index-v"),10);this.Reveal.slide(e,a)}}}}const A=(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 i=document.querySelector("head");i.insertBefore(a,i.lastChild)};class w{constructor(){this.state="idle",this.registeredPlugins={},this.asyncDependencies=[]}load(e){return this.state="loading",new Promise(t=>{let a=[],i=0;if(e.forEach(e=>{e.condition&&!e.condition()||(e.async?this.asyncDependencies.push(e):a.push(e))}),a.length){i=a.length;const e=e=>{"function"==typeof e.callback&&e.callback(),0==--i&&this.initPlugins().then(t)};a.forEach(t=>{t.id?(this.registerPlugin(t.id,t.plugin),e(t)):A(t.src,()=>e(t))})}else 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=>{e.id?(this.registerPlugin(e.id,e.plugin),"function"==typeof e.plugin.init&&e.plugin.init(),"function"==typeof e.callback&&e.callback()):A(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 S{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,i=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);const n=-Math.PI/2+e*(2*Math.PI),r=-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,i,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,i,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,i,t,r,n,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(a-14,i-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 E={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 k=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 i=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(i)return{r:parseInt(i[1],10),g:parseInt(i[2],10),b:parseInt(i[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 L=function(e,t){const a={};let l,c,u,p,A,L,x,R=!1,M=!1,C=!1,N=[],P=1,q={layout:"",overview:""},I={},T=new w,B=new m(a),O=new v(a),H=new b(a),D=new y(a),z=0,W=0,j=!1,$=0,U=!1,V=0,F=0,X=-1,Y=!1,K={startX:0,startY:0,startCount:0,captured:!1,threshold:40},_={},J={};function Q(){R=!0,function(){I.slides.classList.add("no-transition"),h?I.wrapper.classList.add("no-hover"):I.wrapper.classList.remove("no-hover");I.background=te(I.wrapper,"div","backgrounds",null),I.progress=te(I.wrapper,"div","progress",""),I.progressbar=I.progress.querySelector("span"),I.controls=te(I.wrapper,"aside","controls",`\n\t\t\t\n\t\t\t\n\t\t\t`),I.slideNumber=te(I.wrapper,"div","slide-number",""),I.speakerNotes=te(I.wrapper,"div","speaker-notes",null),I.speakerNotes.setAttribute("data-prevent-swipe",""),I.speakerNotes.setAttribute("tabindex","0"),I.pauseOverlay=te(I.wrapper,"div","pause-overlay",l.controls?'':null),I.wrapper.setAttribute("role","application"),I.controlsLeft=r(I.wrapper.querySelectorAll(".navigate-left")),I.controlsRight=r(I.wrapper.querySelectorAll(".navigate-right")),I.controlsUp=r(I.wrapper.querySelectorAll(".navigate-up")),I.controlsDown=r(I.wrapper.querySelectorAll(".navigate-down")),I.controlsPrev=r(I.wrapper.querySelectorAll(".navigate-prev")),I.controlsNext=r(I.wrapper.querySelectorAll(".navigate-next")),I.controlsRightArrow=I.controls.querySelector(".navigate-right"),I.controlsLeftArrow=I.controls.querySelector(".navigate-left"),I.controlsDownArrow=I.controls.querySelector(".navigate-down"),I.statusElement=function(){let e=I.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"),I.wrapper.appendChild(e));return e}()}(),l.postMessage&&window.addEventListener("message",e=>{let 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===i.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===I.wrapper.scrollTop&&0===I.wrapper.scrollLeft||(I.wrapper.scrollTop=0,I.wrapper.scrollLeft=0)},1e3),et().forEach(e=>{r(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(),Je(),Ve(!0),setTimeout(()=>{I.slides.classList.remove("no-transition"),I.wrapper.classList.add("ready"),de("ready",{indexh:c,indexv:u,currentSlide:A})},1),le()&&(se(),"complete"===document.readyState?ee():window.addEventListener("load",ee))}function Z(e){I.statusElement.textContent=e}function G(e){let t="";if(3===e.nodeType)t+=e.textContent;else if(1===e.nodeType){let a=e.getAttribute("aria-hidden"),i="none"===window.getComputedStyle(e).display;"true"===a||i||r(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+l.margin)),a=Math.floor(e.height*(1+l.margin)),i=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: "+i+"px; max-height:"+n+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=t+"px",document.body.style.height=a+"px",ve(i,n);let s=l.slideNumber&&/all|print/i.test(l.showSlideNumber);r(I.wrapper.querySelectorAll(".slides section")).forEach((function(e){e.setAttribute("data-slide-number",$e(e))})),r(I.wrapper.querySelectorAll(".slides section")).forEach((function(e){if(!1===e.classList.contains("stack")){let o=(t-i)/2,d=(a-n)/2,c=e.scrollHeight,u=Math.max(Math.ceil(c/a),1);u=Math.min(u,l.pdfMaxPagesPerSlide),(1===u&&l.center||e.classList.contains("center"))&&(d=Math.max((a-c)/2,0));let h=document.createElement("div");if(h.className="pdf-page",h.style.height=(a+l.pdfPageHeightOffset)*u+"px",e.parentNode.insertBefore(h,e),h.appendChild(e),e.style.left=o+"px",e.style.top=d+"px",e.style.width=i+"px",e.slideBackgroundElement&&h.insertBefore(e.slideBackgroundElement,e),l.showNotes){let a=st(e);if(a){let e=8,i="string"==typeof l.showNotes?l.showNotes:"inline",n=document.createElement("div");n.classList.add("speaker-notes"),n.classList.add("speaker-notes-pdf"),n.setAttribute("data-layout",i),n.innerHTML=a,"separate-page"===i?h.parentNode.insertBefore(n,h.nextSibling):(n.style.left=e+"px",n.style.bottom=e+"px",n.style.width=t-2*e+"px",h.appendChild(n))}}if(s){let t=document.createElement("div");t.classList.add("slide-number"),t.classList.add("slide-number-pdf"),t.innerHTML=e.getAttribute("data-slide-number"),h.appendChild(t)}if(l.pdfSeparateFragments){let e,t,a=H.sort(h.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 i=h.cloneNode(!0);h.parentNode.insertBefore(i,(t||h).nextSibling),e=a,t=i})),a.forEach((function(e){e.forEach((function(e){e.classList.remove("visible","current-fragment")}))}))}else r(h.querySelectorAll(".fragment:not(.fade-out)")).forEach((function(e){e.classList.add("visible")}))}})),de("pdf-ready")}function te(e,t,a,i=""){let n=e.querySelectorAll("."+a);for(let t=0;t1&&l.autoSlide&&l.autoSlideStoppable&&(x=new S(I.wrapper,()=>Math.min(Math.max((Date.now()-X)/V,0),1)),x.on("click",jt),Y=!1),!1===l.fragments&&H.showAll();let r="none";l.slideNumber&&!le()&&("all"===l.showSlideNumber||"speaker"===l.showSlideNumber&&_e())&&(r="block"),I.slideNumber.style.display=r,"default"!==l.navigationMode?I.wrapper.setAttribute("data-navigation-mode",l.navigationMode):I.wrapper.removeAttribute("data-navigation-mode"),"linear"===l.navigationMode?(_["→ , ↓ , SPACE , N , L , J"]="Next slide",_["← , ↑ , P , H , K"]="Previous slide"):(_["N , SPACE"]="Next slide",_.P="Previous slide",_["← , H"]="Navigate left",_["→ , L"]="Navigate right",_["↑ , K"]="Navigate up",_["↓ , J"]="Navigate down"),_["Home , Shift ←"]="First slide",_["End , Shift →"]="Last slide",_["B , ."]="Pause",_.F="Fullscreen",_["ESC, O"]="Slide overview",Te()}function re(){U=!0,window.addEventListener("hashchange",Ht,!1),window.addEventListener("resize",Dt,!1),l.touch&&("onpointerdown"in window?(I.wrapper.addEventListener("pointerdown",xt,!1),I.wrapper.addEventListener("pointermove",Rt,!1),I.wrapper.addEventListener("pointerup",Mt,!1)):window.navigator.msPointerEnabled?(I.wrapper.addEventListener("MSPointerDown",xt,!1),I.wrapper.addEventListener("MSPointerMove",Rt,!1),I.wrapper.addEventListener("MSPointerUp",Mt,!1)):(I.wrapper.addEventListener("touchstart",Et,!1),I.wrapper.addEventListener("touchmove",kt,!1),I.wrapper.addEventListener("touchend",Lt,!1))),l.keyboard&&(document.addEventListener("keydown",St,!1),document.addEventListener("keypress",wt,!1)),l.progress&&I.progress&&I.progress.addEventListener("click",Nt,!1),I.pauseOverlay.addEventListener("click",Ce,!1),l.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",zt,!1);let e=["touchstart","click"];g&&(e=["touchstart"]),e.forEach(e=>{I.controlsLeft.forEach(t=>t.addEventListener(e,Pt,!1)),I.controlsRight.forEach(t=>t.addEventListener(e,qt,!1)),I.controlsUp.forEach(t=>t.addEventListener(e,It,!1)),I.controlsDown.forEach(t=>t.addEventListener(e,Tt,!1)),I.controlsPrev.forEach(t=>t.addEventListener(e,Bt,!1)),I.controlsNext.forEach(t=>t.addEventListener(e,Ot,!1))})}function se(){U=!1,document.removeEventListener("keydown",St,!1),document.removeEventListener("keypress",wt,!1),window.removeEventListener("hashchange",Ht,!1),window.removeEventListener("resize",Dt,!1),I.wrapper.removeEventListener("pointerdown",xt,!1),I.wrapper.removeEventListener("pointermove",Rt,!1),I.wrapper.removeEventListener("pointerup",Mt,!1),I.wrapper.removeEventListener("MSPointerDown",xt,!1),I.wrapper.removeEventListener("MSPointerMove",Rt,!1),I.wrapper.removeEventListener("MSPointerUp",Mt,!1),I.wrapper.removeEventListener("touchstart",Et,!1),I.wrapper.removeEventListener("touchmove",kt,!1),I.wrapper.removeEventListener("touchend",Lt,!1),I.pauseOverlay.removeEventListener("click",Ce,!1),l.progress&&I.progress&&I.progress.removeEventListener("click",Nt,!1),["touchstart","click"].forEach(e=>{I.controlsLeft.forEach(t=>t.removeEventListener(e,Pt,!1)),I.controlsRight.forEach(t=>t.removeEventListener(e,qt,!1)),I.controlsUp.forEach(t=>t.removeEventListener(e,It,!1)),I.controlsDown.forEach(t=>t.removeEventListener(e,Tt,!1)),I.controlsPrev.forEach(t=>t.removeEventListener(e,Bt,!1)),I.controlsNext.forEach(t=>t.removeEventListener(e,Ot,!1))})}function oe(e){"string"==typeof e.layout&&(q.layout=e.layout),"string"==typeof e.overview&&(q.overview=e.overview),q.layout?o(I.slides,q.layout+" "+q.overview):o(I.slides,q.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),n(a,t),I.wrapper.dispatchEvent(a),ce(e)}function ce(e,t){if(l.postMessageEvents&&window.parent!==window.self){let a={namespace:"reveal",eventName:e,state:ot()};n(a,t),window.parent.postMessage(JSON.stringify(a),"*")}}function ue(e="a"){r(I.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",Wt,!1)})}function he(e="a"){r(I.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",Wt,!1)})}function pe(e){"boolean"==typeof e?e?ge():fe():I.overlay?fe():ge()}function ge(){if(l.help){fe(),I.overlay=document.createElement("div"),I.overlay.classList.add("overlay"),I.overlay.classList.add("overlay-help"),I.wrapper.appendChild(I.overlay);let e='

Keyboard Shortcuts


';e+="";for(let t in _)e+=``;for(let t in J)J[t].key&&J[t].description&&(e+=``);e+="
KEYACTION
${t}${_[t]}
${J[t].key}${J[t].description}
",I.overlay.innerHTML=`\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
${e}
\n\t\t\t\t
\n\t\t\t`,I.overlay.querySelector(".close").addEventListener("click",e=>{fe(),e.preventDefault()},!1)}}function fe(){I.overlay&&(I.overlay.parentNode.removeChild(I.overlay),I.overlay=null)}function me(){if(I.wrapper&&!le()){if(!l.disableLayout){h&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");const e=be(),t=P;ve(l.width,l.height),I.slides.style.width=e.width+"px",I.slides.style.height=e.height+"px",P=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),P=Math.max(P,l.minScale),P=Math.min(P,l.maxScale),1===P?(I.slides.style.zoom="",I.slides.style.left="",I.slides.style.top="",I.slides.style.bottom="",I.slides.style.right="",oe({layout:""})):P>1&&f&&window.devicePixelRatio<2?(I.slides.style.zoom=P,I.slides.style.left="",I.slides.style.top="",I.slides.style.bottom="",I.slides.style.right="",oe({layout:""})):(I.slides.style.zoom="",I.slides.style.left="50%",I.slides.style.top="50%",I.slides.style.bottom="auto",I.slides.style.right="auto",oe({layout:"translate(-50%, -50%) scale("+P+")"}));const a=r(I.wrapper.querySelectorAll(".slides section"));for(let t=0,i=a.length;t .stretch")).forEach(a=>{let i=function(e,t=0){if(e){let a,i=e.style.height;return e.style.height="0px",e.parentNode.style.height="auto",a=t-e.parentNode.offsetHeight,e.style.height=i+"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,r=Math.min(e/t,i/n);a.style.width=t*r+"px",a.style.height=n*r+"px"}else a.style.width=e+"px",a.style.height=i+"px"})}function be(e,t){const a={width:l.width,height:l.height,presentationWidth:e||I.wrapper.offsetWidth,presentationHeight:t||I.wrapper.offsetHeight};return a.presentationWidth-=a.presentationWidth*l.margin,a.presentationHeight-=a.presentationHeight*l.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 Ae(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 we(e){let t="/",a=e||A,i=a?a.getAttribute("id"):null;i&&(i=encodeURIComponent(i));let n=Ze(e);if(l.fragmentInURL||(n.f=void 0),"string"==typeof i&&i.length&&void 0===n.f)t="/"+i;else{let e=l.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 Se(e=A){return e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function Ee(){return!(!A||!Se(A))&&!A.nextElementSibling}function ke(){return 0===c&&0===u}function Le(){return!!A&&(!A.nextElementSibling&&(!Se(A)||!A.parentNode.nextElementSibling))}function xe(){j&&(j=!1,I.wrapper.style.cursor="")}function Re(){!1===j&&(j=!0,I.wrapper.style.cursor="none")}function Me(){if(l.pause){const e=I.wrapper.classList.contains("paused");dt(),I.wrapper.classList.add("paused"),!1===e&&de("paused")}}function Ce(){const e=I.wrapper.classList.contains("paused");I.wrapper.classList.remove("paused"),lt(),e&&de("resumed")}function Ne(e){"boolean"==typeof e?e?Me():Ce():Pe()?Ce():Me()}function Pe(){return I.wrapper.classList.contains("paused")}function qe(e){"boolean"==typeof e?e?ut():ct():Y?ut():ct()}function Ie(e,t,a,i){p=A;const n=I.wrapper.querySelectorAll(".slides>section");if(0===n.length)return;void 0!==t||D.isActive()||(t=Ae(n[e])),p&&p.parentNode&&p.parentNode.classList.contains("stack")&&ye(p.parentNode,u);const s=N.concat();N.length=0;let o=c||0,d=u||0;c=He(".slides>section",void 0===e?c:e),u=He(".slides>section.present>section",void 0===t?u:t),De(),me(),D.isActive()&&D.update();let h=n[c],g=h.querySelectorAll("section");A=g[u]||h,void 0!==a&&H.goto(a);let f=c!==o||u!==d;f||(p=null),p&&p!==A&&(p.classList.remove("present"),p.setAttribute("aria-hidden","true"),ke()&&setTimeout(()=>{r(I.wrapper.querySelectorAll(".slides>section.stack")).forEach(e=>{ye(e,0)})},0));e:for(let e=0,t=N.length;e{I.slides.classList.remove("disable-slide-transitions")},0),l.autoAnimate&&O.run(p,A))}function Te(){se(),re(),me(),V=l.autoSlide,lt(),le(),I.background.innerHTML="",I.background.classList.add("no-transition"),r(I.wrapper.querySelectorAll(".slides>section")).forEach(e=>{let t=ae(e,I.background);r(e.querySelectorAll("section")).forEach(e=>{ae(e,t),t.classList.add("stack")})}),l.parallaxBackgroundImage?(I.background.style.backgroundImage='url("'+l.parallaxBackgroundImage+'")',I.background.style.backgroundSize=l.parallaxBackgroundSize,I.background.style.backgroundRepeat=l.parallaxBackgroundRepeat,I.background.style.backgroundPosition=l.parallaxBackgroundPosition,setTimeout(()=>{I.wrapper.classList.add("has-parallax-background")},1)):(I.background.style.backgroundImage="",I.wrapper.classList.remove("has-parallax-background")),Qe(),H.sortAll(),Ue(),We(),je(),De(),Ve(!0),l.showNotes&&I.slides.querySelectorAll("[data-notes], aside.notes").length>0?I.wrapper.classList.add("show-notes"):I.wrapper.classList.remove("show-notes"),ze(),B.formatEmbeddedContent(),!1===l.autoPlayMedia?B.stopEmbeddedContent(A,{unloadIframes:!1}):B.startEmbeddedContent(A),D.isActive()&&D.layout()}function Be(e=A){return l.sort(e.querySelectorAll(".fragment"))}function Oe(){et().forEach((e,t,a)=>{I.slides.insertBefore(e,a[Math.floor(Math.random()*a.length)])})}function He(e,t){let a=r(I.wrapper.querySelectorAll(e)),i=a.length,n=le();if(i){l.loop&&(t%=i)<0&&(t=i+t),t=Math.max(Math.min(t,i-1),0);for(let e=0;e{e.classList.add("visible"),e.classList.remove("current-fragment")})):e>t&&(i.classList.add(s?"past":"future"),l.fragments&&r(i.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&&(N=N.concat(e.split(" ")))}else t=0;return t}function De(){let e,t,a=et(),i=a.length;if(i&&void 0!==c){let n=D.isActive()?10:l.viewDistance;h&&(n=D.isActive()?6:l.mobileViewDistance),le()&&(n=Number.MAX_VALUE);for(let s=0;sNo notes on this slide.')}function We(){l.progress&&I.progressbar&&(I.progressbar.style.width=Ke()*I.wrapper.offsetWidth+"px")}function je(){l.slideNumber&&I.slideNumber&&(I.slideNumber.innerHTML=$e())}function $e(e=A){let t,a="h.v";if("function"==typeof l.slideNumber)t=l.slideNumber(e);else switch("string"==typeof l.slideNumber&&(a=l.slideNumber),/c/.test(a)||1!==I.wrapper.querySelectorAll(".slides>section").length||(a="c"),t=[],a){case"c":t.push(Ye(e)+1);break;case"c/t":t.push(Ye(e)+1,"/",nt());break;default:let i=Ze(e);t.push(i.h+1);let n="h/v"===a?"/":".";Se(e)&&t.push(n,i.v+1)}let i="#"+we(e);return function(e,t,a,i="#"+we()){return"number"!=typeof a||isNaN(a)?`\n\t\t\t\t\t${e}\n\t\t\t\t\t`:`\n\t\t\t\t\t${e}\n\t\t\t\t\t${t}\n\t\t\t\t\t${a}\n\t\t\t\t\t`}(t[0],t[1],t[2],i)}function Ue(){let e=Xe(),t=H.availableRoutes();[...I.controlsLeft,...I.controlsRight,...I.controlsUp,...I.controlsDown,...I.controlsPrev,...I.controlsNext].forEach(e=>{e.classList.remove("enabled","fragmented"),e.setAttribute("disabled","disabled")}),e.left&&I.controlsLeft.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&I.controlsRight.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&I.controlsUp.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&I.controlsDown.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&I.controlsPrev.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&I.controlsNext.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),A&&(t.prev&&I.controlsPrev.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&I.controlsNext.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),Se(A)?(t.prev&&I.controlsUp.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&I.controlsDown.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&I.controlsLeft.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&I.controlsRight.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),l.controlsTutorial&&(!C&&e.down?I.controlsDownArrow.classList.add("highlight"):(I.controlsDownArrow.classList.remove("highlight"),l.rtl?!M&&e.left&&0===u?I.controlsLeftArrow.classList.add("highlight"):I.controlsLeftArrow.classList.remove("highlight"):!M&&e.right&&0===u?I.controlsRightArrow.classList.add("highlight"):I.controlsRightArrow.classList.remove("highlight")))}function Ve(e=!1){let t=null,a=l.rtl?"future":"past",i=l.rtl?"past":"future";if(r(I.background.childNodes).forEach((n,s)=>{n.classList.remove("past","present","future"),sc?n.classList.add(i):(n.classList.add("present"),t=n),(e||s===c)&&r(n.querySelectorAll(".slide-background")).forEach((e,a)=>{e.classList.remove("past","present","future"),au?e.classList.add("future"):(e.classList.add("present"),s===c&&(t=e))})}),L&&B.stopEmbeddedContent(L,{unloadIframes:!B.shouldPreload(L)}),t){B.startEmbeddedContent(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=L?L.getAttribute("data-background-hash"):null,i=t.getAttribute("data-background-hash");i&&i===a&&t!==L&&I.background.classList.add("no-transition"),L=t}A&&["has-light-background","has-dark-background"].forEach(e=>{A.classList.contains(e)?I.wrapper.classList.add(e):I.wrapper.classList.remove(e)}),setTimeout(()=>{I.background.classList.remove("no-transition")},1)}function Fe(){if(l.parallaxBackgroundImage){let e,t,a=et(),i=tt(),n=I.background.style.backgroundSize.split(" ");1===n.length?e=t=parseInt(n[0],10):(e=parseInt(n[0],10),t=parseInt(n[1],10));let r,s,o=I.background.offsetWidth,d=a.length;r="number"==typeof l.parallaxBackgroundHorizontal?l.parallaxBackgroundHorizontal:d>1?(e-o)/(d-1):0,s=r*c*-1;let h,p,g=I.background.offsetHeight,f=i.length;h="number"==typeof l.parallaxBackgroundVertical?l.parallaxBackgroundVertical:(t-g)/(f-1),p=f>0?h*u:0,I.background.style.backgroundPosition=s+"px "+-p+"px"}}function Xe(){let e=I.wrapper.querySelectorAll(".slides>section"),t=I.wrapper.querySelectorAll(".slides>section.present>section"),a={left:c>0,right:c0,down:u1&&(a.left=!0,a.right=!0),t.length>1&&(a.up=!0,a.down=!0)),e.length>1&&"linear"===l.navigationMode&&(a.right=a.right||a.down,a.left=a.left||a.up),l.rtl){let e=a.left;a.left=a.right,a.right=e}return a}function Ye(e=A){let t=et(),a=0;e:for(let i=0;i0){let a=.9;t+=A.querySelectorAll(".fragment.visible").length/e.length*a}}return Math.min(t/(e-1),1)}function _e(){return!!window.location.search.match(/receiver/gi)}function Je(){let e=window.location.hash,t=e.slice(2).split("/"),i=e.replace(/#|\//gi,"");if(!/^[0-9]*$/.test(t[0])&&i.length){let e;try{e=document.getElementById(decodeURIComponent(i))}catch(e){}let t=!!A&&A.getAttribute("id")===i;if(e){if(!t){let t=a.getIndices(e);Ie(t.h,t.v)}}else Ie(c||0,u||0)}else{let e,a=l.hashOneBasedIndex?1:0,i=parseInt(t[0],10)-a||0,n=parseInt(t[1],10)-a||0;l.fragmentInURL&&(e=parseInt(t[2],10),isNaN(e)&&(e=void 0)),i===c&&n===u&&void 0===e||Ie(i,n,e)}}function Qe(e){clearTimeout(W),"number"==typeof e?W=setTimeout(Qe,e):A&&(l.history||!window.history?window.location.hash=we():l.hash?window.history.replaceState(null,null,"#"+we()):window.history.replaceState(null,null,window.location.pathname+window.location.search))}function Ze(e){let t,a=c,i=u;if(e){let t=Se(e),n=t?e.parentNode:e,s=r(I.wrapper.querySelectorAll(".slides>section"));a=Math.max(s.indexOf(n),0),i=void 0,t&&(i=Math.max(r(e.parentNode.querySelectorAll("section")).indexOf(e),0))}if(!e&&A){if(A.querySelectorAll(".fragment").length>0){let e=A.querySelector(".current-fragment");t=e&&e.hasAttribute("data-fragment-index")?parseInt(e.getAttribute("data-fragment-index"),10):A.querySelectorAll(".fragment.visible").length-1}}return{h:a,v:i,f:t}}function Ge(){return r(I.wrapper.querySelectorAll('.slides section:not(.stack):not([data-visibility="uncounted"])'))}function et(){return r(I.wrapper.querySelectorAll(".slides>section"))}function tt(){return r(I.wrapper.querySelectorAll(".slides>section>section"))}function at(){return et().length>1}function it(){return tt().length>1}function nt(){return Ge().length}function rt(e,t){let a=et()[e],i=a&&a.querySelectorAll("section");return i&&i.length&&"number"==typeof t?i?i[t]:void 0:a}function st(e=A){if(e.hasAttribute("data-notes"))return e.getAttribute("data-notes");let t=e.querySelector("aside.notes");return t?t.innerHTML:null}function ot(){let e=Ze();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:Pe(),overview:D.isActive()}}function lt(){if(dt(),A&&!1!==l.autoSlide){let e=A.querySelector(".current-fragment");e||(e=A.querySelector(".fragment"));let t=e?e.getAttribute("data-autoslide"):null,a=A.parentNode?A.parentNode.getAttribute("data-autoslide"):null,i=A.getAttribute("data-autoslide");V=t?parseInt(t,10):i?parseInt(i,10):a?parseInt(a,10):l.autoSlide,0===A.querySelectorAll(".fragment").length&&r(A.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-autoplay")&&V&&1e3*e.duration/e.playbackRate>V&&(V=1e3*e.duration/e.playbackRate+1e3)}),!V||Y||Pe()||D.isActive()||Le()&&!H.availableRoutes().next&&!0!==l.loop||(F=setTimeout(()=>{"function"==typeof l.autoSlideMethod?l.autoSlideMethod():vt(),lt()},V),X=Date.now()),x&&x.setPlaying(-1!==F)}}function dt(){clearTimeout(F),F=-1}function ct(){V&&!Y&&(Y=!0,de("autoslidepaused"),clearTimeout(F),x&&x.setPlaying(!1))}function ut(){V&&Y&&(Y=!1,de("autoslideresumed"),lt())}function ht(){M=!0,l.rtl?(D.isActive()||!1===H.next())&&Xe().left&&Ie(c+1,"grid"===l.navigationMode?u:void 0):(D.isActive()||!1===H.prev())&&Xe().left&&Ie(c-1,"grid"===l.navigationMode?u:void 0)}function pt(){M=!0,l.rtl?(D.isActive()||!1===H.prev())&&Xe().right&&Ie(c-1,"grid"===l.navigationMode?u:void 0):(D.isActive()||!1===H.next())&&Xe().right&&Ie(c+1,"grid"===l.navigationMode?u:void 0)}function gt(){(D.isActive()||!1===H.prev())&&Xe().up&&Ie(c,u-1)}function ft(){C=!0,(D.isActive()||!1===H.next())&&Xe().down&&Ie(c,u+1)}function mt(){if(!1===H.prev())if(Xe().up)gt();else{let e;if(e=l.rtl?r(I.wrapper.querySelectorAll(".slides>section.future")).pop():r(I.wrapper.querySelectorAll(".slides>section.past")).pop(),e){let t=e.querySelectorAll("section").length-1||void 0;Ie(c-1,t)}}}function vt(){if(M=!0,C=!0,!1===H.next()){let e=Xe();e.down&&e.right&&l.loop&&Ee()&&(e.down=!1),e.down?ft():l.rtl?ht():pt()}}function bt(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function yt(e){l.autoSlideStoppable&&ct()}function At(e){xe(),clearTimeout($),$=setTimeout(Re,l.hideCursorTime)}function wt(e){e.shiftKey&&63===e.charCode&&pe()}function St(e){if("function"==typeof l.keyboardCondition&&!1===l.keyboardCondition(e))return!0;let t=e.keyCode,i=Y;yt();let n=document.activeElement&&"inherit"!==document.activeElement.contentEditable,r=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),s=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),o=e.shiftKey&&32===e.keyCode,d=e.shiftKey&&37===t,c=e.shiftKey&&39===t,u=!o&&!d&&!c&&(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey);if(n||r||s||u)return;let h,p=[66,86,190,191];if("object"==typeof l.keyboard)for(h in l.keyboard)"togglePause"===l.keyboard[h]&&p.push(parseInt(h,10));if(Pe()&&-1===p.indexOf(t))return!1;let g="linear"===l.navigationMode||!at()||!it(),f=!1;if("object"==typeof l.keyboard)for(h in l.keyboard)if(parseInt(h,10)===t){let t=l.keyboard[h];"function"==typeof t?t.apply(null,[e]):"string"==typeof t&&"function"==typeof a[t]&&a[t].call(),f=!0}if(!1===f)for(h in J)if(parseInt(h,10)===t){let t=J[h].callback;"function"==typeof t?t.apply(null,[e]):"string"==typeof t&&"function"==typeof a[t]&&a[t].call(),f=!0}!1===f&&(f=!0,80===t||33===t?mt():78===t||34===t?vt():72===t||37===t?d?Ie(0):!D.isActive()&&g?mt():ht():76===t||39===t?c?Ie(Number.MAX_VALUE):!D.isActive()&&g?vt():pt():75===t||38===t?!D.isActive()&&g?mt():gt():74===t||40===t?!D.isActive()&&g?vt():ft():36===t?Ie(0):35===t?Ie(Number.MAX_VALUE):32===t?(D.isActive()&&D.deactivate(),e.shiftKey?mt():vt()):58===t||59===t||66===t||86===t||190===t||191===t?Ne():70===t?(()=>{let e=document.documentElement,t=e.requestFullscreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t&&t.apply(e)})():65===t?l.autoSlideStoppable&&qe(i):f=!1),f?e.preventDefault&&e.preventDefault():27!==t&&79!==t||(I.overlay?fe():D.toggle(),e.preventDefault&&e.preventDefault()),lt()}function Et(e){if(bt(e.target))return!0;K.startX=e.touches[0].clientX,K.startY=e.touches[0].clientY,K.startCount=e.touches.length}function kt(e){if(bt(e.target))return!0;if(K.captured)g&&e.preventDefault();else{yt();let t=e.touches[0].clientX,a=e.touches[0].clientY;if(1===e.touches.length&&2!==K.startCount){let i=t-K.startX,n=a-K.startY;i>K.threshold&&Math.abs(i)>Math.abs(n)?(K.captured=!0,"linear"===l.navigationMode?l.rtl?vt():mt():ht()):i<-K.threshold&&Math.abs(i)>Math.abs(n)?(K.captured=!0,"linear"===l.navigationMode?l.rtl?mt():vt():pt()):n>K.threshold?(K.captured=!0,"linear"===l.navigationMode?mt():gt()):n<-K.threshold&&(K.captured=!0,"linear"===l.navigationMode?vt():ft()),l.embedded?(K.captured||Se(A))&&e.preventDefault():e.preventDefault()}}}function Lt(e){K.captured=!1}function xt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Et(e))}function Rt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],kt(e))}function Mt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Lt())}function Ct(e){if(Date.now()-z>600){z=Date.now();let t=e.detail||-e.wheelDelta;t>0?vt():t<0&&mt()}}function Nt(e){yt(),e.preventDefault();let t=et().length,a=Math.floor(e.clientX/I.wrapper.offsetWidth*t);l.rtl&&(a=t-a),Ie(a)}function Pt(e){e.preventDefault(),yt(),"linear"===l.navigationMode?mt():ht()}function qt(e){e.preventDefault(),yt(),"linear"===l.navigationMode?vt():pt()}function It(e){e.preventDefault(),yt(),gt()}function Tt(e){e.preventDefault(),yt(),ft()}function Bt(e){e.preventDefault(),yt(),mt()}function Ot(e){e.preventDefault(),yt(),vt()}function Ht(e){Je()}function Dt(e){me()}function zt(e){!1===document.hidden&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function Wt(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){let t=e.currentTarget.getAttribute("href");t&&(!function(e){fe(),I.overlay=document.createElement("div"),I.overlay.classList.add("overlay"),I.overlay.classList.add("overlay-preview"),I.wrapper.appendChild(I.overlay),I.overlay.innerHTML=`
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tUnable to load iframe. This is likely due to the site's policy (x-frame-options).\n\t\t\t\t\n\t\t\t
`,I.overlay.querySelector("iframe").addEventListener("load",e=>{I.overlay.classList.add("loaded")},!1),I.overlay.querySelector(".close").addEventListener("click",e=>{fe(),e.preventDefault()},!1),I.overlay.querySelector(".external").addEventListener("click",e=>{fe()},!1)}(t),e.preventDefault())}}function jt(e){Le()&&!1===l.loop?(Ie(0,0),ut()):Y?ut():ct()}return n(a,{VERSION:"4.0.0-dev",initialize:function(){if(e)return I.wrapper=e,I.slides=e.querySelector(".slides"),window.addEventListener("load",me,!1),l={...E,...t,...a.getQueryHash()},T.load(l.dependencies).then(Q),new Promise(e=>a.addEventListener("ready",e));console.warn("reveal.js can not initialize without a valid .reveal element.")},configure:ne,sync:Te,syncSlide:function(e=A){ie(e),Be(e),B.load(e),Ve(),ze()},syncFragments:Be,slide:Ie,left:ht,right:pt,up:gt,down:ft,prev:mt,next:vt,navigateTo:Ie,navigateLeft:ht,navigateRight:pt,navigateUp:gt,navigateDown:ft,navigatePrev:mt,navigateNext:vt,navigateFragment:H.goto.bind(H),prevFragment:H.prev.bind(H),nextFragment:H.next.bind(H),layout:me,shuffle:Oe,availableRoutes:Xe,availableFragments:H.availableRoutes.bind(H),toggleHelp:pe,toggleOverview:D.toggle.bind(D),togglePause:Ne,toggleAutoSlide:qe,isFirstSlide:ke,isLastSlide:Le,isLastVerticalSlide:Ee,isOverview:D.isActive.bind(D),isPaused:Pe,isAutoSliding:function(){return!(!V||Y)},isSpeakerNotes:_e,loadSlide:B.load.bind(B),unloadSlide:B.unload.bind(B),addEventListeners:re,removeEventListeners:se,dispatchEvent:de,getState:ot,setState:function(e){if("object"==typeof e){Ie(s(e.indexh),s(e.indexv),s(e.indexf));let t=s(e.paused),a=s(e.overview);"boolean"==typeof t&&t!==Pe()&&Ne(t),"boolean"==typeof a&&a!==D.isActive()&&D.toggle(a)}},getSlidePastCount:Ye,getProgress:Ke,getIndices:Ze,getSlides:Ge,getSlidesAttributes:function(){return Ge().map(e=>{let t={};for(let a=0;aSt({keyCode:e}),registerKeyboardShortcut:(e,t)=>_[e]=t,addEventListener:(e,t,i)=>{a.getRevealElement().addEventListener(e,t,i)},removeEventListener:(e,t,i)=>{a.getRevealElement().removeEventListener(e,t,i)},registerPlugin:T.registerPlugin.bind(T),hasPlugin:T.hasPlugin.bind(T),getPlugin:T.getPlugin.bind(T),getPlugins:T.getRegisteredPlugins.bind(T),getComputedSlideSize:be,getPreviousSlide:()=>p,getCurrentSlide:()=>A,getScale:()=>P,getConfig:()=>l,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 void 0!==e.dependencies&&delete e.dependencies,e},getRevealElement:()=>I.wrapper||document.querySelector(".reveal"),getSlidesElement:()=>I.slides,getBackgroundsElement:()=>I.background,isReady:()=>R,announceStatus:Z,getStatusText:G,slideContent:B,updateControls:Ue,updateProgress:We,updateSlidesVisibility:De,writeURL:Qe,transformSlides:oe,cueAutoSlide:lt,cancelAutoSlide:dt})};window.Reveal={initialize:e=>(window.Reveal=new L(document.querySelector(".reveal"),e),window.Reveal.initialize())}}]); \ No newline at end of file +!function(e){var t={};function a(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(i,n,function(t){return e[t]}.bind(null,n));return i},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 i=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/,n=(e,t)=>{for(let a in t)e[a]=t[a];return e},r=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},o=(e,t)=>{e.style.transform=t},l=(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},d=e=>{let t=document.createElement("style");return t.type="text/css",e&&e.length>0&&(t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))),document.head.appendChild(t),t},c=navigator.userAgent,u=document.createElement("div"),h=/(iphone|ipod|ipad|android)/gi.test(c)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,g=/chrome/i.test(c)&&!/edge/i.test(c),p=/android/gi.test(c),f="zoom"in u.style&&!h&&(g||/Version\/[\d\.]+.*Safari/.test(c));class v{constructor(e){this.Reveal=e}shouldPreload(e){let t=this.Reveal.getConfig().preloadIframes;return"boolean"!=typeof t&&(t=e.hasAttribute("data-preload")),t}load(e,t={}){e.style.display=this.Reveal.getConfig().display,r(e.querySelectorAll("img[data-src], video[data-src], audio[data-src], iframe[data-src]")).forEach(e=>{("IFRAME"!==e.tagName||this.shouldPreload(e))&&(e.setAttribute("src",e.getAttribute("data-src")),e.setAttribute("data-lazy-loaded",""),e.removeAttribute("data-src"))}),r(e.querySelectorAll("video, audio")).forEach(e=>{let t=0;r(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 i=e.slideBackgroundContentElement,n=e.getAttribute("data-background-iframe");if(!1===a.hasAttribute("data-loaded")){a.setAttribute("data-loaded","true");let r=e.getAttribute("data-background-image"),s=e.getAttribute("data-background-video"),o=e.hasAttribute("data-background-video-loop"),l=e.hasAttribute("data-background-video-muted");if(r)i.style.backgroundImage="url("+encodeURI(r)+")";else if(s&&!this.Reveal.isSpeakerNotes()){let e=document.createElement("video");o&&e.setAttribute("loop",""),l&&(e.muted=!0),h&&(e.muted=!0,e.autoplay=!0,e.setAttribute("playsinline","")),s.split(",").forEach(t=>{e.innerHTML+=''}),i.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%",i.appendChild(e)}}let r=i.querySelector("iframe[data-src]");r&&this.shouldPreload(a)&&!/autoplay=(1|true|yes)/gi.test(n)&&r.getAttribute("src")!==n&&r.setAttribute("src",n)}}unload(e){e.style.display="none";let t=this.Reveal.getSlideBackground(e);t&&(t.style.display="none",r(t.querySelectorAll("iframe[src]")).forEach(e=>{e.removeAttribute("src")})),r(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")}),r(e.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]")).forEach(e=>{e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")})}formatEmbeddedContent(){let e=(e,t,a)=>{r(this.Reveal.getSlidesElement().querySelectorAll("iframe["+e+'*="'+t+'"]')).forEach(t=>{let i=t.getAttribute(e);i&&-1===i.indexOf(a)&&t.setAttribute(e,i+(/\?/.test(i)?"&":"?")+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")}startEmbeddedContent(e){e&&!this.Reveal.isSpeakerNotes()&&(r(e.querySelectorAll('img[src$=".gif"]')).forEach(e=>{e.setAttribute("src",e.getAttribute("src"))}),r(e.querySelectorAll("video, audio")).forEach(e=>{if(l(e,".fragment")&&!l(e,".fragment.visible"))return;let t=this.Reveal.getConfig().autoPlayMedia;if("boolean"!=typeof t&&(t=e.hasAttribute("data-autoplay")||!!l(e,".slide-background")),t&&"function"==typeof e.play)if(e.readyState>1)this.startEmbeddedMedia({target:e});else if(h){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",this.startEmbeddedMedia),e.addEventListener("loadeddata",this.startEmbeddedMedia)}),r(e.querySelectorAll("iframe[src]")).forEach(e=>{l(e,".fragment")&&!l(e,".fragment.visible")||this.startEmbeddedIframe({target:e})}),r(e.querySelectorAll("iframe[data-src]")).forEach(e=>{l(e,".fragment")&&!l(e,".fragment.visible")||e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",this.startEmbeddedIframe),e.addEventListener("load",this.startEmbeddedIframe),e.setAttribute("src",e.getAttribute("data-src")))}))}startEmbeddedMedia(e){let t=!!l(e.target,"html"),a=!!l(e.target,".present");t&&a&&(e.target.currentTime=0,e.target.play()),e.target.removeEventListener("loadeddata",this.startEmbeddedMedia)}startEmbeddedIframe(e){let t=e.target;if(t&&t.contentWindow){let a=!!l(e.target,"html"),i=!!l(e.target,".present");if(a&&i){let e=this.Reveal.getConfig().autoPlayMedia;"boolean"!=typeof e&&(e=t.hasAttribute("data-autoplay")||!!l(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","*")}}}stopEmbeddedContent(e,t={}){t=n({unloadIframes:!0},t),e&&e.parentNode&&(r(e.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-ignore")||"function"!=typeof e.pause||(e.setAttribute("data-paused-by-reveal",""),e.pause())}),r(e.querySelectorAll("iframe")).forEach(e=>{e.contentWindow&&e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",this.startEmbeddedIframe)}),r(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":""}',"*")}),r(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&&r(e.querySelectorAll("iframe[data-src]")).forEach(e=>{e.setAttribute("src","about:blank"),e.removeAttribute("src")}))}}class m{constructor(e){this.Reveal=e,this.autoAnimateCounter=0}run(e,t){if(this.reset(),e.hasAttribute("data-auto-animate")&&t.hasAttribute("data-auto-animate")){this.autoAnimateStyleSheet=this.autoAnimateStyleSheet||d();let a=this.getAutoAnimateOptions(t);e.dataset.autoAnimate="pending",t.dataset.autoAnimate="pending";let i=this.getAutoAnimatableElements(e,t).map(e=>this.getAutoAnimateCSS(e.from,e.to,e.options||{},a,this.autoAnimateCounter++));"false"!==t.dataset.autoAnimateUnmatched&&!0===this.Reveal.getConfig().autoAnimateUnmatched&&(this.getUnmatchedAutoAnimateElements(t).forEach(e=>{e.dataset.autoAnimateTarget="unmatched"}),i.push(`[data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: opacity ${.8*a.duration}s ease ${.2*a.duration}s; }`)),this.autoAnimateStyleSheet.innerHTML=i.join(""),requestAnimationFrame(()=>{this.autoAnimateStyleSheet&&(getComputedStyle(this.autoAnimateStyleSheet).fontWeight,t.dataset.autoAnimate="running")}),this.Reveal.dispatchEvent("autoanimate",{fromSlide:e,toSlide:t,sheet:this.autoAnimateStyleSheet})}}reset(){r(this.Reveal.getRevealElement().querySelectorAll('[data-auto-animate]:not([data-auto-animate=""])')).forEach(e=>{e.dataset.autoAnimate=""}),r(this.Reveal.getRevealElement().querySelectorAll("[data-auto-animate-target]")).forEach(e=>{delete e.dataset.autoAnimateTarget}),this.autoAnimateStyleSheet&&this.autoAnimateStyleSheet.parentNode&&(this.autoAnimateStyleSheet.parentNode.removeChild(this.autoAnimateStyleSheet),this.autoAnimateStyleSheet=null)}getAutoAnimateCSS(e,t,a,i,n){e.dataset.autoAnimateTarget="",t.dataset.autoAnimateTarget=n;let r=this.getAutoAnimateOptions(t,i);void 0!==a.delay&&(r.delay=a.delay),void 0!==a.duration&&(r.duration=a.duration),void 0!==a.easing&&(r.easing=a.easing);let s=this.getAutoAnimatableProperties("from",e,a),o=this.getAutoAnimatableProperties("to",t,a);if(!1!==a.translate||!1!==a.scale){let e=this.Reveal.getScale(),t={x:(s.x-o.x)/e,y:(s.y-o.y)/e,scaleX:s.width/o.width,scaleY:s.height/o.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 i=!1!==a.translate&&(0!==t.x||0!==t.y),n=!1!==a.scale&&(0!==t.scaleX||0!==t.scaleY);if(i||n){let e=[];i&&e.push(`translate(${t.x}px, ${t.y}px)`),n&&e.push(`scale(${t.scaleX}, ${t.scaleY})`),s.styles.transform=e.join(" "),s.styles["transform-origin"]="top left",o.styles.transform="none"}}for(let e in o.styles){const t=o.styles[e],a=s.styles[e];t===a?delete o.styles[e]:(!0===t.explicitValue&&(o.styles[e]=t.value),!0===a.explicitValue&&(s.styles[e]=a.value))}let l="",d=Object.keys(o.styles);if(d.length>0){s.styles.transition="none",o.styles.transition=`all ${r.duration}s ${r.easing} ${r.delay}s`,o.styles["transition-property"]=d.join(", "),o.styles["will-change"]=d.join(", "),l='[data-auto-animate-target="'+n+'"] {'+Object.keys(s.styles).map(e=>e+": "+s.styles[e]+" !important;").join("")+'}[data-auto-animate="running"] [data-auto-animate-target="'+n+'"] {'+Object.keys(o.styles).map(e=>e+": "+o.styles[e]+" !important;").join("")+"}"}return l}getAutoAnimateOptions(e,t){let a={easing:this.Reveal.getConfig().autoAnimateEasing,duration:this.Reveal.getConfig().autoAnimateDuration,delay:0};if(a=n(a,t),e.closest&&e.parentNode){let t=e.parentNode.closest("[data-auto-animate-target]");t&&(a=this.getAutoAnimateOptions(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}getAutoAnimatableProperties(e,t,a){let i={styles:[]};if(!1!==a.translate||!1!==a.scale){let e;e="function"==typeof a.measure?a.measure(t):t.getBoundingClientRect(),i.x=e.x,i.y=e.y,i.width=e.width,i.height=e.height}const n=getComputedStyle(t);return(a.styles||this.Reveal.getConfig().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&&(i.styles[t.property]=a)}),i}getAutoAnimatableElements(e,t){let a=("function"==typeof this.Reveal.getConfig().autoAnimateMatcher?this.Reveal.getConfig().autoAnimateMatcher:this.getAutoAnimatePairs).call(this,e,t),i=[];return a.filter((e,t)=>{if(-1===i.indexOf(e.to))return i.push(e.to),!0})}getAutoAnimatePairs(e,t){let a=[];const i="h1, h2, h3, h4, h5, h6, p, li";return this.findAutoAnimateMatches(a,e,t,"[data-id]",e=>e.nodeName+":::"+e.getAttribute("data-id")),this.findAutoAnimateMatches(a,e,t,i,e=>e.nodeName+":::"+e.innerText),this.findAutoAnimateMatches(a,e,t,"img, video, iframe",e=>e.nodeName+":::"+(e.getAttribute("src")||e.getAttribute("data-src"))),this.findAutoAnimateMatches(a,e,t,"pre",e=>e.nodeName+":::"+e.innerText),a.forEach(e=>{e.from.matches(i)?e.options={scale:!1}:e.from.matches("pre")&&(e.options={scale:!1,styles:["width","height"]},this.findAutoAnimateMatches(a,e.from,e.to,".hljs .hljs-ln-code",e=>e.textContent,{scale:!1,styles:[],measure:this.getLocalBoundingBox.bind(this)}),this.findAutoAnimateMatches(a,e.from,e.to,".hljs .hljs-ln-line[data-line-number]",e=>e.getAttribute("data-line-number"),{scale:!1,styles:["width"],measure:this.getLocalBoundingBox.bind(this)}))},this),a}getLocalBoundingBox(e){const t=this.Reveal.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}}findAutoAnimateMatches(e,t,a,i,n,r){let s={},o={};[].slice.call(t.querySelectorAll(i)).forEach((e,t)=>{const a=n(e);"string"==typeof a&&a.length&&(s[a]=s[a]||[],s[a].push(e))}),[].slice.call(a.querySelectorAll(i)).forEach((t,a)=>{const i=n(t);let l;if(o[i]=o[i]||[],o[i].push(t),s[i]){const e=o[i].length-1,t=s[i].length-1;s[i][e]?(l=s[i][e],s[i][e]=null):s[i][t]&&(l=s[i][t],s[i][t]=null)}l&&e.push({from:l,to:t,options:r})})}getUnmatchedAutoAnimateElements(e){return[].slice.call(e.children).reduce((e,t)=>{const a=t.querySelector("[data-auto-animate-target]");return t.hasAttribute("data-auto-animate-target")||a||e.push(t),t.querySelector("[data-auto-animate-target]")&&(e=e.concat(this.getUnmatchedAutoAnimateElements(t))),e},[])}}class b{constructor(e){this.Reveal=e}showAll(){r(this.Reveal.getSlidesElement().querySelectorAll(".fragment")).forEach(e=>{e.classList.add("visible"),e.classList.remove("current-fragment")})}availableRoutes(){let e=this.Reveal.getCurrentSlide();if(e&&this.Reveal.getConfig().fragments){let t=e.querySelectorAll(".fragment"),a=e.querySelectorAll(".fragment:not(.visible)");return{prev:t.length-a.length>0,next:!!a.length}}return{prev:!1,next:!1}}sort(e,t=!1){e=r(e);let a=[],i=[],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 i.push([e])}),a=a.concat(i);let s=0;return a.forEach(e=>{e.forEach(e=>{n.push(e),e.setAttribute("data-fragment-index",s)}),s++}),!0===t?a:n}sortAll(){this.Reveal.getHorizontalSlides().forEach(e=>{let t=r(e.querySelectorAll("section"));t.forEach((e,t)=>{this.sort(e.querySelectorAll(".fragment"))},this),0===t.length&&this.sort(e.querySelectorAll(".fragment"))})}update(e,t){let a={shown:[],hidden:[]},i=this.Reveal.getCurrentSlide();if(i&&this.Reveal.getConfig().fragments&&(t=t||this.sort(i.querySelectorAll(".fragment"))).length){let n=0;if("number"!=typeof e){let t=this.sort(i.querySelectorAll(".fragment.visible")).pop();t&&(e=parseInt(t.getAttribute("data-fragment-index")||0,10))}r(t).forEach((t,i)=>{t.hasAttribute("data-fragment-index")&&(i=parseInt(t.getAttribute("data-fragment-index"),10)),n=Math.max(n,i),i<=e?(t.classList.contains("visible")||a.shown.push(t),t.classList.add("visible"),t.classList.remove("current-fragment"),this.Reveal.announceStatus(this.Reveal.getStatusText(t)),i===e&&(t.classList.add("current-fragment"),this.Reveal.slideContent.startEmbeddedContent(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,n),-1),i.setAttribute("data-fragment",e)}return a}goto(e,t=0){let a=this.Reveal.getCurrentSlide();if(a&&this.Reveal.getConfig().fragments){let i=this.sort(a.querySelectorAll(".fragment"));if(i.length){if("number"!=typeof e){let t=this.sort(a.querySelectorAll(".fragment.visible")).pop();e=t?parseInt(t.getAttribute("data-fragment-index")||0,10):-1}e+=t;let n=this.update(e,i);return n.hidden.length&&this.Reveal.dispatchEvent("fragmenthidden",{fragment:n.hidden[0],fragments:n.hidden}),n.shown.length&&this.Reveal.dispatchEvent("fragmentshown",{fragment:n.shown[0],fragments:n.shown}),this.Reveal.updateControls(),this.Reveal.updateProgress(),this.Reveal.getConfig().fragmentInURL&&this.Reveal.writeURL(),!(!n.shown.length&&!n.hidden.length)}}return!1}next(){return this.goto(null,1)}prev(){return this.goto(null,-1)}}class y{constructor(e){this.Reveal=e,this.active=!1,this.onSlideClicked=this.onSlideClicked.bind(this)}activate(){if(this.Reveal.getConfig().overview&&!this.isActive()){this.active=!0,this.Reveal.getRevealElement().classList.add("overview"),this.Reveal.cancelAutoSlide(),this.Reveal.getSlidesElement().appendChild(this.Reveal.getBackgroundsElement()),r(this.Reveal.getRevealElement().querySelectorAll(".slides section")).forEach(e=>{e.classList.contains("stack")||e.addEventListener("click",this.onSlideClicked,!0)});const e=70,t=this.Reveal.getComputedSlideSize();this.overviewSlideWidth=t.width+e,this.overviewSlideHeight=t.height+e,this.Reveal.getConfig().rtl&&(this.overviewSlideWidth=-this.overviewSlideWidth),this.Reveal.updateSlidesVisibility(),this.layout(),this.update(),this.Reveal.layout();const a=this.Reveal.getIndices();this.Reveal.dispatchEvent("overviewshown",{indexh:a.h,indexv:a.v,currentSlide:this.Reveal.getCurrentSlide()})}}layout(){this.Reveal.getHorizontalSlides().forEach((e,t)=>{e.setAttribute("data-index-h",t),o(e,"translate3d("+t*this.overviewSlideWidth+"px, 0, 0)"),e.classList.contains("stack")&&r(e.querySelectorAll("section")).forEach((e,a)=>{e.setAttribute("data-index-h",t),e.setAttribute("data-index-v",a),o(e,"translate3d(0, "+a*this.overviewSlideHeight+"px, 0)")})}),r(this.Reveal.getBackgroundsElement().childNodes).forEach((e,t)=>{o(e,"translate3d("+t*this.overviewSlideWidth+"px, 0, 0)"),r(e.querySelectorAll(".slide-background")).forEach((e,t)=>{o(e,"translate3d(0, "+t*this.overviewSlideHeight+"px, 0)")})})}update(){const e=Math.min(window.innerWidth,window.innerHeight),t=Math.max(e/5,150)/e,a=this.Reveal.getIndices();this.Reveal.transformSlides({overview:["scale("+t+")","translateX("+-a.h*this.overviewSlideWidth+"px)","translateY("+-a.v*this.overviewSlideHeight+"px)"].join(" ")})}deactivate(){if(this.Reveal.getConfig().overview){this.active=!1,this.Reveal.getRevealElement().classList.remove("overview"),this.Reveal.getRevealElement().classList.add("overview-deactivating"),setTimeout(()=>{this.Reveal.getRevealElement().classList.remove("overview-deactivating")},1),this.Reveal.getRevealElement().appendChild(this.Reveal.getBackgroundsElement()),r(this.Reveal.getRevealElement().querySelectorAll(".slides section")).forEach(e=>{o(e,""),e.removeEventListener("click",this.onSlideClicked,!0)}),r(this.Reveal.getBackgroundsElement().querySelectorAll(".slide-background")).forEach(e=>{o(e,"")}),this.Reveal.transformSlides({overview:""});const e=this.Reveal.getIndices();this.Reveal.slide(e.h,e.v),this.Reveal.layout(),this.Reveal.cueAutoSlide(),this.Reveal.dispatchEvent("overviewhidden",{indexh:e.h,indexv:e.v,currentSlide:this.Reveal.getCurrentSlide()})}}toggle(e){"boolean"==typeof e?e?this.activate():this.deactivate():this.isActive()?this.deactivate():this.activate()}isActive(){return this.active}onSlideClicked(e){if(this.isActive()){e.preventDefault();let t=e.target;for(;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled")&&(this.deactivate(),t.nodeName.match(/section/gi))){let e=parseInt(t.getAttribute("data-index-h"),10),a=parseInt(t.getAttribute("data-index-v"),10);this.Reveal.slide(e,a)}}}}class A{constructor(e){this.Reveal=e,this.shortcuts={},this.bindings={},this.onDocumentKeyDown=this.onDocumentKeyDown.bind(this),this.onDocumentKeyPress=this.onDocumentKeyPress.bind(this)}refreshSortcuts(){"linear"===this.Reveal.getConfig().navigationMode?(this.shortcuts["→ , ↓ , SPACE , N , L , J"]="Next slide",this.shortcuts["← , ↑ , P , H , K"]="Previous slide"):(this.shortcuts["N , SPACE"]="Next slide",this.shortcuts.P="Previous slide",this.shortcuts["← , H"]="Navigate left",this.shortcuts["→ , L"]="Navigate right",this.shortcuts["↑ , K"]="Navigate up",this.shortcuts["↓ , J"]="Navigate down"),this.shortcuts["Home , Shift ←"]="First slide",this.shortcuts["End , Shift →"]="Last slide",this.shortcuts["B , ."]="Pause",this.shortcuts.F="Fullscreen",this.shortcuts["ESC, O"]="Slide overview"}bind(){document.addEventListener("keydown",this.onDocumentKeyDown,!1),document.addEventListener("keypress",this.onDocumentKeyPress,!1)}unbind(){document.removeEventListener("keydown",this.onDocumentKeyDown,!1),document.removeEventListener("keypress",this.onDocumentKeyPress,!1)}addKeyBinding(e,t){"object"==typeof e&&e.keyCode?this.bindings[e.keyCode]={callback:t,key:e.key,description:e.description}:this.bindings[e]={callback:t,key:null,description:null}}removeKeyBinding(e){delete this.bindings[e]}triggerKey(e){this.onDocumentKeyDown({keyCode:e})}registerKeyboardShortcut(e,t){this.shortcuts[e]=t}onDocumentKeyPress(e){e.shiftKey&&63===e.charCode&&this.Reveal.toggleHelp()}onDocumentKeyDown(e){let t=this.Reveal.getConfig();if("function"==typeof t.keyboardCondition&&!1===t.keyboardCondition(e))return!0;let a=e.keyCode,i=!this.Reveal.isAutoSliding();this.Reveal.onUserInput(e);let n=document.activeElement&&"inherit"!==document.activeElement.contentEditable,r=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),s=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),o=e.shiftKey&&32===e.keyCode,l=e.shiftKey&&37===a,d=e.shiftKey&&39===a,c=!o&&!l&&!d&&(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey);if(n||r||s||c)return;let u,h=[66,86,190,191];if("object"==typeof t.keyboard)for(u in t.keyboard)"togglePause"===t.keyboard[u]&&h.push(parseInt(u,10));if(this.Reveal.isPaused()&&-1===h.indexOf(a))return!1;let g="linear"===t.navigationMode||!this.Reveal.hasHorizontalSlides()||!this.Reveal.hasVerticalSlides(),p=!1;if("object"==typeof t.keyboard)for(u in t.keyboard)if(parseInt(u,10)===a){let a=t.keyboard[u];"function"==typeof a?a.apply(null,[e]):"string"==typeof a&&"function"==typeof this.Reveal[a]&&this.Reveal[a].call(),p=!0}if(!1===p)for(u in this.bindings)if(parseInt(u,10)===a){let t=this.bindings[u].callback;"function"==typeof t?t.apply(null,[e]):"string"==typeof t&&"function"==typeof this.Reveal[t]&&this.Reveal[t].call(),p=!0}!1===p&&(p=!0,80===a||33===a?this.Reveal.prev():78===a||34===a?this.Review.next():72===a||37===a?l?this.Reveal.slide(0):!this.Reveal.overview.isActive()&&g?this.Reveal.prev():this.Reveal.left():76===a||39===a?d?this.Reveal.slide(Number.MAX_VALUE):!this.Reveal.overview.isActive()&&g?this.Review.next():this.Reveal.right():75===a||38===a?!this.Reveal.overview.isActive()&&g?this.Reveal.prev():this.Reveal.up():74===a||40===a?!this.Reveal.overview.isActive()&&g?this.Review.next():this.Reveal.down():36===a?this.Reveal.slide(0):35===a?this.Reveal.slide(Number.MAX_VALUE):32===a?(this.Reveal.overview.isActive()&&this.Reveal.overview.deactivate(),e.shiftKey?this.Reveal.prev():this.Review.next()):58===a||59===a||66===a||86===a||190===a||191===a?this.Reveal.togglePause():70===a?(()=>{let e=document.documentElement,t=e.requestFullscreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t&&t.apply(e)})():65===a?t.autoSlideStoppable&&this.Reveal.toggleAutoSlide(i):p=!1),p?e.preventDefault&&e.preventDefault():27!==a&&79!==a||(!1===this.Reveal.closeOverlay()&&this.Reveal.overview.toggle(),e.preventDefault&&e.preventDefault()),this.Reveal.cueAutoSlide()}}const w=(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 i=document.querySelector("head");i.insertBefore(a,i.lastChild)};class S{constructor(){this.state="idle",this.registeredPlugins={},this.asyncDependencies=[]}load(e){return this.state="loading",new Promise(t=>{let a=[],i=0;if(e.forEach(e=>{e.condition&&!e.condition()||(e.async?this.asyncDependencies.push(e):a.push(e))}),a.length){i=a.length;const e=e=>{"function"==typeof e.callback&&e.callback(),0==--i&&this.initPlugins().then(t)};a.forEach(t=>{t.id?(this.registerPlugin(t.id,t.plugin),e(t)):w(t.src,()=>e(t))})}else 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=>{e.id?(this.registerPlugin(e.id,e.plugin),"function"==typeof e.plugin.init&&e.plugin.init(),"function"==typeof e.callback&&e.callback()):w(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 E{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,i=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);const n=-Math.PI/2+e*(2*Math.PI),r=-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,i,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,i,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,i,t,r,n,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(a-14,i-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 k={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 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 i=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(i)return{r:parseInt(i[1],10),g:parseInt(i[2],10),b:parseInt(i[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 x=function(e,t){const a={};let l,c,u,g,w,x,R,M=!1,P=!1,C=!1,N=[],q=1,I={layout:"",overview:""},T={},D=new S,B=new v(a),O=new m(a),H=new b(a),z=new y(a),K=new A(a),W=0,j=0,$=!1,U=0,V=!1,F=0,X=0,Y=-1,_=!1,J={startX:0,startY:0,startCount:0,captured:!1,threshold:40};function Q(){M=!0,function(){T.slides.classList.add("no-transition"),h?T.wrapper.classList.add("no-hover"):T.wrapper.classList.remove("no-hover");T.background=te(T.wrapper,"div","backgrounds",null),T.progress=te(T.wrapper,"div","progress",""),T.progressbar=T.progress.querySelector("span"),T.controls=te(T.wrapper,"aside","controls",`\n\t\t\t\n\t\t\t\n\t\t\t`),T.slideNumber=te(T.wrapper,"div","slide-number",""),T.speakerNotes=te(T.wrapper,"div","speaker-notes",null),T.speakerNotes.setAttribute("data-prevent-swipe",""),T.speakerNotes.setAttribute("tabindex","0"),T.pauseOverlay=te(T.wrapper,"div","pause-overlay",l.controls?'':null),T.wrapper.setAttribute("role","application"),T.controlsLeft=r(T.wrapper.querySelectorAll(".navigate-left")),T.controlsRight=r(T.wrapper.querySelectorAll(".navigate-right")),T.controlsUp=r(T.wrapper.querySelectorAll(".navigate-up")),T.controlsDown=r(T.wrapper.querySelectorAll(".navigate-down")),T.controlsPrev=r(T.wrapper.querySelectorAll(".navigate-prev")),T.controlsNext=r(T.wrapper.querySelectorAll(".navigate-next")),T.controlsRightArrow=T.controls.querySelector(".navigate-right"),T.controlsLeftArrow=T.controls.querySelector(".navigate-left"),T.controlsDownArrow=T.controls.querySelector(".navigate-down"),T.statusElement=function(){let e=T.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"),T.wrapper.appendChild(e));return e}()}(),l.postMessage&&window.addEventListener("message",e=>{let 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===i.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===T.wrapper.scrollTop&&0===T.wrapper.scrollLeft||(T.wrapper.scrollTop=0,T.wrapper.scrollLeft=0)},1e3),Ze().forEach(e=>{r(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(),Ye(),je(!0),setTimeout(()=>{T.slides.classList.remove("no-transition"),T.wrapper.classList.add("ready"),de("ready",{indexh:c,indexv:u,currentSlide:w})},1),le()&&(se(),"complete"===document.readyState?ee():window.addEventListener("load",ee))}function Z(e){T.statusElement.textContent=e}function G(e){let t="";if(3===e.nodeType)t+=e.textContent;else if(1===e.nodeType){let a=e.getAttribute("aria-hidden"),i="none"===window.getComputedStyle(e).display;"true"===a||i||r(e.childNodes).forEach(e=>{t+=G(e)})}return t=t.trim(),""===t?"":t+" "}function ee(){let e=me(window.innerWidth,window.innerHeight),t=Math.floor(e.width*(1+l.margin)),a=Math.floor(e.height*(1+l.margin)),i=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: "+i+"px; max-height:"+n+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=t+"px",document.body.style.height=a+"px",ve(i,n);let s=l.slideNumber&&/all|print/i.test(l.showSlideNumber);r(T.wrapper.querySelectorAll(".slides section")).forEach((function(e){e.setAttribute("data-slide-number",Ke(e))})),r(T.wrapper.querySelectorAll(".slides section")).forEach((function(e){if(!1===e.classList.contains("stack")){let o=(t-i)/2,d=(a-n)/2,c=e.scrollHeight,u=Math.max(Math.ceil(c/a),1);u=Math.min(u,l.pdfMaxPagesPerSlide),(1===u&&l.center||e.classList.contains("center"))&&(d=Math.max((a-c)/2,0));let h=document.createElement("div");if(h.className="pdf-page",h.style.height=(a+l.pdfPageHeightOffset)*u+"px",e.parentNode.insertBefore(h,e),h.appendChild(e),e.style.left=o+"px",e.style.top=d+"px",e.style.width=i+"px",e.slideBackgroundElement&&h.insertBefore(e.slideBackgroundElement,e),l.showNotes){let a=nt(e);if(a){let e=8,i="string"==typeof l.showNotes?l.showNotes:"inline",n=document.createElement("div");n.classList.add("speaker-notes"),n.classList.add("speaker-notes-pdf"),n.setAttribute("data-layout",i),n.innerHTML=a,"separate-page"===i?h.parentNode.insertBefore(n,h.nextSibling):(n.style.left=e+"px",n.style.bottom=e+"px",n.style.width=t-2*e+"px",h.appendChild(n))}}if(s){let t=document.createElement("div");t.classList.add("slide-number"),t.classList.add("slide-number-pdf"),t.innerHTML=e.getAttribute("data-slide-number"),h.appendChild(t)}if(l.pdfSeparateFragments){let e,t,a=H.sort(h.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 i=h.cloneNode(!0);h.parentNode.insertBefore(i,(t||h).nextSibling),e=a,t=i})),a.forEach((function(e){e.forEach((function(e){e.classList.remove("visible","current-fragment")}))}))}else r(h.querySelectorAll(".fragment:not(.fade-out)")).forEach((function(e){e.classList.add("visible")}))}})),de("pdf-ready")}function te(e,t,a,i=""){let n=e.querySelectorAll("."+a);for(let t=0;t1&&l.autoSlide&&l.autoSlideStoppable&&(R=new E(T.wrapper,()=>Math.min(Math.max((Date.now()-Y)/F,0),1)),R.on("click",Ot),_=!1),!1===l.fragments&&H.showAll();let r="none";l.slideNumber&&!le()&&("all"===l.showSlideNumber||"speaker"===l.showSlideNumber&&Xe())&&(r="block"),T.slideNumber.style.display=r,"default"!==l.navigationMode?T.wrapper.setAttribute("data-navigation-mode",l.navigationMode):T.wrapper.removeAttribute("data-navigation-mode"),K.refreshSortcuts(),qe()}function re(){V=!0,window.addEventListener("hashchange",It,!1),window.addEventListener("resize",Tt,!1),l.touch&&("onpointerdown"in window?(T.wrapper.addEventListener("pointerdown",St,!1),T.wrapper.addEventListener("pointermove",Et,!1),T.wrapper.addEventListener("pointerup",kt,!1)):window.navigator.msPointerEnabled?(T.wrapper.addEventListener("MSPointerDown",St,!1),T.wrapper.addEventListener("MSPointerMove",Et,!1),T.wrapper.addEventListener("MSPointerUp",kt,!1)):(T.wrapper.addEventListener("touchstart",yt,!1),T.wrapper.addEventListener("touchmove",At,!1),T.wrapper.addEventListener("touchend",wt,!1))),l.keyboard&&K.bind(),l.progress&&T.progress&&T.progress.addEventListener("click",xt,!1),T.pauseOverlay.addEventListener("click",Me,!1),l.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",Dt,!1);let e=["touchstart","click"];p&&(e=["touchstart"]),e.forEach(e=>{T.controlsLeft.forEach(t=>t.addEventListener(e,Rt,!1)),T.controlsRight.forEach(t=>t.addEventListener(e,Mt,!1)),T.controlsUp.forEach(t=>t.addEventListener(e,Pt,!1)),T.controlsDown.forEach(t=>t.addEventListener(e,Ct,!1)),T.controlsPrev.forEach(t=>t.addEventListener(e,Nt,!1)),T.controlsNext.forEach(t=>t.addEventListener(e,qt,!1))})}function se(){V=!1,K.unbind(),window.removeEventListener("hashchange",It,!1),window.removeEventListener("resize",Tt,!1),T.wrapper.removeEventListener("pointerdown",St,!1),T.wrapper.removeEventListener("pointermove",Et,!1),T.wrapper.removeEventListener("pointerup",kt,!1),T.wrapper.removeEventListener("MSPointerDown",St,!1),T.wrapper.removeEventListener("MSPointerMove",Et,!1),T.wrapper.removeEventListener("MSPointerUp",kt,!1),T.wrapper.removeEventListener("touchstart",yt,!1),T.wrapper.removeEventListener("touchmove",At,!1),T.wrapper.removeEventListener("touchend",wt,!1),T.pauseOverlay.removeEventListener("click",Me,!1),l.progress&&T.progress&&T.progress.removeEventListener("click",xt,!1),["touchstart","click"].forEach(e=>{T.controlsLeft.forEach(t=>t.removeEventListener(e,Rt,!1)),T.controlsRight.forEach(t=>t.removeEventListener(e,Mt,!1)),T.controlsUp.forEach(t=>t.removeEventListener(e,Pt,!1)),T.controlsDown.forEach(t=>t.removeEventListener(e,Ct,!1)),T.controlsPrev.forEach(t=>t.removeEventListener(e,Nt,!1)),T.controlsNext.forEach(t=>t.removeEventListener(e,qt,!1))})}function oe(e){"string"==typeof e.layout&&(I.layout=e.layout),"string"==typeof e.overview&&(I.overview=e.overview),I.layout?o(T.slides,I.layout+" "+I.overview):o(T.slides,I.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),n(a,t),T.wrapper.dispatchEvent(a),ce(e)}function ce(e,t){if(l.postMessageEvents&&window.parent!==window.self){let a={namespace:"reveal",eventName:e,state:rt()};n(a,t),window.parent.postMessage(JSON.stringify(a),"*")}}function ue(e="a"){r(T.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",Bt,!1)})}function he(e="a"){r(T.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",Bt,!1)})}function ge(){if(l.help){pe(),T.overlay=document.createElement("div"),T.overlay.classList.add("overlay"),T.overlay.classList.add("overlay-help"),T.wrapper.appendChild(T.overlay);let e='

Keyboard Shortcuts


';e+="";for(let t in K.shortcuts)e+=``;for(let t in K.registeredKeyBindings)K.registeredKeyBindings[t].key&&K.registeredKeyBindings[t].description&&(e+=``);e+="
KEYACTION
${t}${K.shortcuts[t]}
${K.registeredKeyBindings[t].key}${K.registeredKeyBindings[t].description}
",T.overlay.innerHTML=`\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
${e}
\n\t\t\t\t
\n\t\t\t`,T.overlay.querySelector(".close").addEventListener("click",e=>{pe(),e.preventDefault()},!1)}}function pe(){return!!T.overlay&&(T.overlay.parentNode.removeChild(T.overlay),T.overlay=null,!0)}function fe(){if(T.wrapper&&!le()){if(!l.disableLayout){h&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");const e=me(),t=q;ve(l.width,l.height),T.slides.style.width=e.width+"px",T.slides.style.height=e.height+"px",q=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),q=Math.max(q,l.minScale),q=Math.min(q,l.maxScale),1===q?(T.slides.style.zoom="",T.slides.style.left="",T.slides.style.top="",T.slides.style.bottom="",T.slides.style.right="",oe({layout:""})):q>1&&f&&window.devicePixelRatio<2?(T.slides.style.zoom=q,T.slides.style.left="",T.slides.style.top="",T.slides.style.bottom="",T.slides.style.right="",oe({layout:""})):(T.slides.style.zoom="",T.slides.style.left="50%",T.slides.style.top="50%",T.slides.style.bottom="auto",T.slides.style.right="auto",oe({layout:"translate(-50%, -50%) scale("+q+")"}));const a=r(T.wrapper.querySelectorAll(".slides section"));for(let t=0,i=a.length;t .stretch")).forEach(a=>{let i=function(e,t=0){if(e){let a,i=e.style.height;return e.style.height="0px",e.parentNode.style.height="auto",a=t-e.parentNode.offsetHeight,e.style.height=i+"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,r=Math.min(e/t,i/n);a.style.width=t*r+"px",a.style.height=n*r+"px"}else a.style.width=e+"px",a.style.height=i+"px"})}function me(e,t){const a={width:l.width,height:l.height,presentationWidth:e||T.wrapper.offsetWidth,presentationHeight:t||T.wrapper.offsetHeight};return a.presentationWidth-=a.presentationWidth*l.margin,a.presentationHeight-=a.presentationHeight*l.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 be(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 Ae(e){let t="/",a=e||w,i=a?a.getAttribute("id"):null;i&&(i=encodeURIComponent(i));let n=Je(e);if(l.fragmentInURL||(n.f=void 0),"string"==typeof i&&i.length&&void 0===n.f)t="/"+i;else{let e=l.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 we(e=w){return e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function Se(){return!(!w||!we(w))&&!w.nextElementSibling}function Ee(){return 0===c&&0===u}function ke(){return!!w&&(!w.nextElementSibling&&(!we(w)||!w.parentNode.nextElementSibling))}function Le(){$&&($=!1,T.wrapper.style.cursor="")}function xe(){!1===$&&($=!0,T.wrapper.style.cursor="none")}function Re(){if(l.pause){const e=T.wrapper.classList.contains("paused");ot(),T.wrapper.classList.add("paused"),!1===e&&de("paused")}}function Me(){const e=T.wrapper.classList.contains("paused");T.wrapper.classList.remove("paused"),st(),e&&de("resumed")}function Pe(e){"boolean"==typeof e?e?Re():Me():Ce()?Me():Re()}function Ce(){return T.wrapper.classList.contains("paused")}function Ne(e,t,a,i){g=w;const n=T.wrapper.querySelectorAll(".slides>section");if(0===n.length)return;void 0!==t||z.isActive()||(t=ye(n[e])),g&&g.parentNode&&g.parentNode.classList.contains("stack")&&be(g.parentNode,u);const s=N.concat();N.length=0;let o=c||0,d=u||0;c=De(".slides>section",void 0===e?c:e),u=De(".slides>section.present>section",void 0===t?u:t),Be(),fe(),z.isActive()&&z.update();let h=n[c],p=h.querySelectorAll("section");w=p[u]||h,void 0!==a&&H.goto(a);let f=c!==o||u!==d;f||(g=null),g&&g!==w&&(g.classList.remove("present"),g.setAttribute("aria-hidden","true"),Ee()&&setTimeout(()=>{r(T.wrapper.querySelectorAll(".slides>section.stack")).forEach(e=>{be(e,0)})},0));e:for(let e=0,t=N.length;e{T.slides.classList.remove("disable-slide-transitions")},0),l.autoAnimate&&O.run(g,w))}function qe(){se(),re(),fe(),F=l.autoSlide,st(),le(),T.background.innerHTML="",T.background.classList.add("no-transition"),r(T.wrapper.querySelectorAll(".slides>section")).forEach(e=>{let t=ae(e,T.background);r(e.querySelectorAll("section")).forEach(e=>{ae(e,t),t.classList.add("stack")})}),l.parallaxBackgroundImage?(T.background.style.backgroundImage='url("'+l.parallaxBackgroundImage+'")',T.background.style.backgroundSize=l.parallaxBackgroundSize,T.background.style.backgroundRepeat=l.parallaxBackgroundRepeat,T.background.style.backgroundPosition=l.parallaxBackgroundPosition,setTimeout(()=>{T.wrapper.classList.add("has-parallax-background")},1)):(T.background.style.backgroundImage="",T.wrapper.classList.remove("has-parallax-background")),_e(),H.sortAll(),We(),He(),ze(),Be(),je(!0),l.showNotes&&T.slides.querySelectorAll("[data-notes], aside.notes").length>0?T.wrapper.classList.add("show-notes"):T.wrapper.classList.remove("show-notes"),Oe(),B.formatEmbeddedContent(),!1===l.autoPlayMedia?B.stopEmbeddedContent(w,{unloadIframes:!1}):B.startEmbeddedContent(w),z.isActive()&&z.layout()}function Ie(e=w){return l.sort(e.querySelectorAll(".fragment"))}function Te(){Ze().forEach((e,t,a)=>{T.slides.insertBefore(e,a[Math.floor(Math.random()*a.length)])})}function De(e,t){let a=r(T.wrapper.querySelectorAll(e)),i=a.length,n=le();if(i){l.loop&&(t%=i)<0&&(t=i+t),t=Math.max(Math.min(t,i-1),0);for(let e=0;e{e.classList.add("visible"),e.classList.remove("current-fragment")})):e>t&&(i.classList.add(s?"past":"future"),l.fragments&&r(i.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&&(N=N.concat(e.split(" ")))}else t=0;return t}function Be(){let e,t,a=Ze(),i=a.length;if(i&&void 0!==c){let n=z.isActive()?10:l.viewDistance;h&&(n=z.isActive()?6:l.mobileViewDistance),le()&&(n=Number.MAX_VALUE);for(let s=0;sNo notes on this slide.')}function He(){l.progress&&T.progressbar&&(T.progressbar.style.width=Fe()*T.wrapper.offsetWidth+"px")}function ze(){l.slideNumber&&T.slideNumber&&(T.slideNumber.innerHTML=Ke())}function Ke(e=w){let t,a="h.v";if("function"==typeof l.slideNumber)t=l.slideNumber(e);else switch("string"==typeof l.slideNumber&&(a=l.slideNumber),/c/.test(a)||1!==T.wrapper.querySelectorAll(".slides>section").length||(a="c"),t=[],a){case"c":t.push(Ve(e)+1);break;case"c/t":t.push(Ve(e)+1,"/",at());break;default:let i=Je(e);t.push(i.h+1);let n="h/v"===a?"/":".";we(e)&&t.push(n,i.v+1)}let i="#"+Ae(e);return function(e,t,a,i="#"+Ae()){return"number"!=typeof a||isNaN(a)?`\n\t\t\t\t\t${e}\n\t\t\t\t\t`:`\n\t\t\t\t\t${e}\n\t\t\t\t\t${t}\n\t\t\t\t\t${a}\n\t\t\t\t\t`}(t[0],t[1],t[2],i)}function We(){let e=Ue(),t=H.availableRoutes();[...T.controlsLeft,...T.controlsRight,...T.controlsUp,...T.controlsDown,...T.controlsPrev,...T.controlsNext].forEach(e=>{e.classList.remove("enabled","fragmented"),e.setAttribute("disabled","disabled")}),e.left&&T.controlsLeft.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&T.controlsRight.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&T.controlsUp.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&T.controlsDown.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&T.controlsPrev.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&T.controlsNext.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),w&&(t.prev&&T.controlsPrev.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&T.controlsNext.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),we(w)?(t.prev&&T.controlsUp.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&T.controlsDown.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&T.controlsLeft.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&T.controlsRight.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),l.controlsTutorial&&(!C&&e.down?T.controlsDownArrow.classList.add("highlight"):(T.controlsDownArrow.classList.remove("highlight"),l.rtl?!P&&e.left&&0===u?T.controlsLeftArrow.classList.add("highlight"):T.controlsLeftArrow.classList.remove("highlight"):!P&&e.right&&0===u?T.controlsRightArrow.classList.add("highlight"):T.controlsRightArrow.classList.remove("highlight")))}function je(e=!1){let t=null,a=l.rtl?"future":"past",i=l.rtl?"past":"future";if(r(T.background.childNodes).forEach((n,s)=>{n.classList.remove("past","present","future"),sc?n.classList.add(i):(n.classList.add("present"),t=n),(e||s===c)&&r(n.querySelectorAll(".slide-background")).forEach((e,a)=>{e.classList.remove("past","present","future"),au?e.classList.add("future"):(e.classList.add("present"),s===c&&(t=e))})}),x&&B.stopEmbeddedContent(x,{unloadIframes:!B.shouldPreload(x)}),t){B.startEmbeddedContent(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=x?x.getAttribute("data-background-hash"):null,i=t.getAttribute("data-background-hash");i&&i===a&&t!==x&&T.background.classList.add("no-transition"),x=t}w&&["has-light-background","has-dark-background"].forEach(e=>{w.classList.contains(e)?T.wrapper.classList.add(e):T.wrapper.classList.remove(e)}),setTimeout(()=>{T.background.classList.remove("no-transition")},1)}function $e(){if(l.parallaxBackgroundImage){let e,t,a=Ze(),i=Ge(),n=T.background.style.backgroundSize.split(" ");1===n.length?e=t=parseInt(n[0],10):(e=parseInt(n[0],10),t=parseInt(n[1],10));let r,s,o=T.background.offsetWidth,d=a.length;r="number"==typeof l.parallaxBackgroundHorizontal?l.parallaxBackgroundHorizontal:d>1?(e-o)/(d-1):0,s=r*c*-1;let h,g,p=T.background.offsetHeight,f=i.length;h="number"==typeof l.parallaxBackgroundVertical?l.parallaxBackgroundVertical:(t-p)/(f-1),g=f>0?h*u:0,T.background.style.backgroundPosition=s+"px "+-g+"px"}}function Ue(){let e=T.wrapper.querySelectorAll(".slides>section"),t=T.wrapper.querySelectorAll(".slides>section.present>section"),a={left:c>0,right:c0,down:u1&&(a.left=!0,a.right=!0),t.length>1&&(a.up=!0,a.down=!0)),e.length>1&&"linear"===l.navigationMode&&(a.right=a.right||a.down,a.left=a.left||a.up),l.rtl){let e=a.left;a.left=a.right,a.right=e}return a}function Ve(e=w){let t=Ze(),a=0;e:for(let i=0;i0){let a=.9;t+=w.querySelectorAll(".fragment.visible").length/e.length*a}}return Math.min(t/(e-1),1)}function Xe(){return!!window.location.search.match(/receiver/gi)}function Ye(){let e=window.location.hash,t=e.slice(2).split("/"),i=e.replace(/#|\//gi,"");if(!/^[0-9]*$/.test(t[0])&&i.length){let e;try{e=document.getElementById(decodeURIComponent(i))}catch(e){}let t=!!w&&w.getAttribute("id")===i;if(e){if(!t){let t=a.getIndices(e);Ne(t.h,t.v)}}else Ne(c||0,u||0)}else{let e,a=l.hashOneBasedIndex?1:0,i=parseInt(t[0],10)-a||0,n=parseInt(t[1],10)-a||0;l.fragmentInURL&&(e=parseInt(t[2],10),isNaN(e)&&(e=void 0)),i===c&&n===u&&void 0===e||Ne(i,n,e)}}function _e(e){clearTimeout(j),"number"==typeof e?j=setTimeout(_e,e):w&&(l.history||!window.history?window.location.hash=Ae():l.hash?window.history.replaceState(null,null,"#"+Ae()):window.history.replaceState(null,null,window.location.pathname+window.location.search))}function Je(e){let t,a=c,i=u;if(e){let t=we(e),n=t?e.parentNode:e,s=r(T.wrapper.querySelectorAll(".slides>section"));a=Math.max(s.indexOf(n),0),i=void 0,t&&(i=Math.max(r(e.parentNode.querySelectorAll("section")).indexOf(e),0))}if(!e&&w){if(w.querySelectorAll(".fragment").length>0){let e=w.querySelector(".current-fragment");t=e&&e.hasAttribute("data-fragment-index")?parseInt(e.getAttribute("data-fragment-index"),10):w.querySelectorAll(".fragment.visible").length-1}}return{h:a,v:i,f:t}}function Qe(){return r(T.wrapper.querySelectorAll('.slides section:not(.stack):not([data-visibility="uncounted"])'))}function Ze(){return r(T.wrapper.querySelectorAll(".slides>section"))}function Ge(){return r(T.wrapper.querySelectorAll(".slides>section>section"))}function et(){return Ze().length>1}function tt(){return Ge().length>1}function at(){return Qe().length}function it(e,t){let a=Ze()[e],i=a&&a.querySelectorAll("section");return i&&i.length&&"number"==typeof t?i?i[t]:void 0:a}function nt(e=w){if(e.hasAttribute("data-notes"))return e.getAttribute("data-notes");let t=e.querySelector("aside.notes");return t?t.innerHTML:null}function rt(){let e=Je();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:Ce(),overview:z.isActive()}}function st(){if(ot(),w&&!1!==l.autoSlide){let e=w.querySelector(".current-fragment");e||(e=w.querySelector(".fragment"));let t=e?e.getAttribute("data-autoslide"):null,a=w.parentNode?w.parentNode.getAttribute("data-autoslide"):null,i=w.getAttribute("data-autoslide");F=t?parseInt(t,10):i?parseInt(i,10):a?parseInt(a,10):l.autoSlide,0===w.querySelectorAll(".fragment").length&&r(w.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-autoplay")&&F&&1e3*e.duration/e.playbackRate>F&&(F=1e3*e.duration/e.playbackRate+1e3)}),!F||_||Ce()||z.isActive()||ke()&&!H.availableRoutes().next&&!0!==l.loop||(X=setTimeout(()=>{"function"==typeof l.autoSlideMethod?l.autoSlideMethod():ft(),st()},F),Y=Date.now()),R&&R.setPlaying(-1!==X)}}function ot(){clearTimeout(X),X=-1}function lt(){F&&!_&&(_=!0,de("autoslidepaused"),clearTimeout(X),R&&R.setPlaying(!1))}function dt(){F&&_&&(_=!1,de("autoslideresumed"),st())}function ct(){P=!0,l.rtl?(z.isActive()||!1===H.next())&&Ue().left&&Ne(c+1,"grid"===l.navigationMode?u:void 0):(z.isActive()||!1===H.prev())&&Ue().left&&Ne(c-1,"grid"===l.navigationMode?u:void 0)}function ut(){P=!0,l.rtl?(z.isActive()||!1===H.prev())&&Ue().right&&Ne(c-1,"grid"===l.navigationMode?u:void 0):(z.isActive()||!1===H.next())&&Ue().right&&Ne(c+1,"grid"===l.navigationMode?u:void 0)}function ht(){(z.isActive()||!1===H.prev())&&Ue().up&&Ne(c,u-1)}function gt(){C=!0,(z.isActive()||!1===H.next())&&Ue().down&&Ne(c,u+1)}function pt(){if(!1===H.prev())if(Ue().up)ht();else{let e;if(e=l.rtl?r(T.wrapper.querySelectorAll(".slides>section.future")).pop():r(T.wrapper.querySelectorAll(".slides>section.past")).pop(),e){let t=e.querySelectorAll("section").length-1||void 0;Ne(c-1,t)}}}function ft(){if(P=!0,C=!0,!1===H.next()){let e=Ue();e.down&&e.right&&l.loop&&Se()&&(e.down=!1),e.down?gt():l.rtl?ct():ut()}}function vt(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function mt(e){l.autoSlideStoppable&<()}function bt(e){Le(),clearTimeout(U),U=setTimeout(xe,l.hideCursorTime)}function yt(e){if(vt(e.target))return!0;J.startX=e.touches[0].clientX,J.startY=e.touches[0].clientY,J.startCount=e.touches.length}function At(e){if(vt(e.target))return!0;if(J.captured)p&&e.preventDefault();else{mt();let t=e.touches[0].clientX,a=e.touches[0].clientY;if(1===e.touches.length&&2!==J.startCount){let i=t-J.startX,n=a-J.startY;i>J.threshold&&Math.abs(i)>Math.abs(n)?(J.captured=!0,"linear"===l.navigationMode?l.rtl?ft():pt():ct()):i<-J.threshold&&Math.abs(i)>Math.abs(n)?(J.captured=!0,"linear"===l.navigationMode?l.rtl?pt():ft():ut()):n>J.threshold?(J.captured=!0,"linear"===l.navigationMode?pt():ht()):n<-J.threshold&&(J.captured=!0,"linear"===l.navigationMode?ft():gt()),l.embedded?(J.captured||we(w))&&e.preventDefault():e.preventDefault()}}}function wt(e){J.captured=!1}function St(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],yt(e))}function Et(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],At(e))}function kt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],wt())}function Lt(e){if(Date.now()-W>600){W=Date.now();let t=e.detail||-e.wheelDelta;t>0?ft():t<0&&pt()}}function xt(e){mt(),e.preventDefault();let t=Ze().length,a=Math.floor(e.clientX/T.wrapper.offsetWidth*t);l.rtl&&(a=t-a),Ne(a)}function Rt(e){e.preventDefault(),mt(),"linear"===l.navigationMode?pt():ct()}function Mt(e){e.preventDefault(),mt(),"linear"===l.navigationMode?ft():ut()}function Pt(e){e.preventDefault(),mt(),ht()}function Ct(e){e.preventDefault(),mt(),gt()}function Nt(e){e.preventDefault(),mt(),pt()}function qt(e){e.preventDefault(),mt(),ft()}function It(e){Ye()}function Tt(e){fe()}function Dt(e){!1===document.hidden&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function Bt(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){let t=e.currentTarget.getAttribute("href");t&&(!function(e){pe(),T.overlay=document.createElement("div"),T.overlay.classList.add("overlay"),T.overlay.classList.add("overlay-preview"),T.wrapper.appendChild(T.overlay),T.overlay.innerHTML=`
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tUnable to load iframe. This is likely due to the site's policy (x-frame-options).\n\t\t\t\t\n\t\t\t
`,T.overlay.querySelector("iframe").addEventListener("load",e=>{T.overlay.classList.add("loaded")},!1),T.overlay.querySelector(".close").addEventListener("click",e=>{pe(),e.preventDefault()},!1),T.overlay.querySelector(".external").addEventListener("click",e=>{pe()},!1)}(t),e.preventDefault())}}function Ot(e){ke()&&!1===l.loop?(Ne(0,0),dt()):_?dt():lt()}return n(a,{VERSION:"4.0.0-dev",initialize:function(){if(e)return T.wrapper=e,T.slides=e.querySelector(".slides"),window.addEventListener("load",fe,!1),l={...k,...t,...a.getQueryHash()},D.load(l.dependencies).then(Q),new Promise(e=>a.addEventListener("ready",e));console.warn("reveal.js can not initialize without a valid .reveal element.")},configure:ne,sync:qe,syncSlide:function(e=w){ie(e),Ie(e),B.load(e),je(),Oe()},syncFragments:Ie,slide:Ne,left:ct,right:ut,up:ht,down:gt,prev:pt,next:ft,navigateTo:Ne,navigateLeft:ct,navigateRight:ut,navigateUp:ht,navigateDown:gt,navigatePrev:pt,navigateNext:ft,navigateFragment:H.goto.bind(H),prevFragment:H.prev.bind(H),nextFragment:H.next.bind(H),addEventListener:(e,t,i)=>{a.getRevealElement().addEventListener(e,t,i)},removeEventListener:(e,t,i)=>{a.getRevealElement().removeEventListener(e,t,i)},layout:fe,shuffle:Te,availableRoutes:Ue,availableFragments:H.availableRoutes.bind(H),toggleHelp:function(e){"boolean"==typeof e?e?ge():pe():T.overlay?pe():ge()},toggleOverview:z.toggle.bind(z),togglePause:Pe,toggleAutoSlide:function(e){"boolean"==typeof e?e?dt():lt():_?dt():lt()},isFirstSlide:Ee,isLastSlide:ke,isLastVerticalSlide:Se,isOverview:z.isActive.bind(z),isPaused:Ce,isAutoSliding:function(){return!(!F||_)},isSpeakerNotes:Xe,loadSlide:B.load.bind(B),unloadSlide:B.unload.bind(B),addEventListeners:re,removeEventListeners:se,dispatchEvent:de,getState:rt,setState:function(e){if("object"==typeof e){Ne(s(e.indexh),s(e.indexv),s(e.indexf));let t=s(e.paused),a=s(e.overview);"boolean"==typeof t&&t!==Ce()&&Pe(t),"boolean"==typeof a&&a!==z.isActive()&&z.toggle(a)}},getSlidePastCount:Ve,getProgress:Fe,getIndices:Je,getSlides:Qe,getSlidesAttributes:function(){return Qe().map(e=>{let t={};for(let a=0;ag,getCurrentSlide:()=>w,getScale:()=>q,getConfig:()=>l,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 void 0!==e.dependencies&&delete e.dependencies,e},getRevealElement:()=>T.wrapper||document.querySelector(".reveal"),getSlidesElement:()=>T.slides,getBackgroundsElement:()=>T.background,isReady:()=>M,announceStatus:Z,getStatusText:G,overview:z,slideContent:B,onUserInput:mt,closeOverlay:pe,updateControls:We,updateProgress:He,updateSlidesVisibility:Be,writeURL:_e,transformSlides:oe,cueAutoSlide:st,cancelAutoSlide:ot})};window.Reveal={initialize:e=>(window.Reveal=new x(document.querySelector(".reveal"),e),window.Reveal.initialize())}}]); \ No newline at end of file diff --git a/js/controllers/keyboard.js b/js/controllers/keyboard.js new file mode 100644 index 00000000..6658cf95 --- /dev/null +++ b/js/controllers/keyboard.js @@ -0,0 +1,362 @@ +import { extend, toArray, enterFullscreen } from '../utils/util.js' + +/** + * + */ +export default class Keyboard { + + constructor( Reveal ) { + + this.Reveal = Reveal; + + // A key:value map of keyboard keys and descriptions of + // the actions they trigger + this.shortcuts = {}; + + // Holds custom key code mappings + this.bindings = {}; + + this.onDocumentKeyDown = this.onDocumentKeyDown.bind( this ); + this.onDocumentKeyPress = this.onDocumentKeyPress.bind( this ); + + } + + refreshSortcuts() { + + // Define our contextual list of keyboard shortcuts + if( this.Reveal.getConfig().navigationMode === 'linear' ) { + this.shortcuts['→ , ↓ , SPACE , N , L , J'] = 'Next slide'; + this.shortcuts['← , ↑ , P , H , K'] = 'Previous slide'; + } + else { + this.shortcuts['N , SPACE'] = 'Next slide'; + this.shortcuts['P'] = 'Previous slide'; + this.shortcuts['← , H'] = 'Navigate left'; + this.shortcuts['→ , L'] = 'Navigate right'; + this.shortcuts['↑ , K'] = 'Navigate up'; + this.shortcuts['↓ , J'] = 'Navigate down'; + } + + this.shortcuts['Home , Shift ←'] = 'First slide'; + this.shortcuts['End , Shift →'] = 'Last slide'; + this.shortcuts['B , .'] = 'Pause'; + this.shortcuts['F'] = 'Fullscreen'; + this.shortcuts['ESC, O'] = 'Slide overview'; + + } + + bind() { + + document.addEventListener( 'keydown', this.onDocumentKeyDown, false ); + document.addEventListener( 'keypress', this.onDocumentKeyPress, false ); + + } + + unbind() { + + document.removeEventListener( 'keydown', this.onDocumentKeyDown, false ); + document.removeEventListener( 'keypress', this.onDocumentKeyPress, false ); + + } + + /** + * Add a custom key binding with optional description to + * be added to the help screen. + */ + addKeyBinding( binding, callback ) { + + if( typeof binding === 'object' && binding.keyCode ) { + this.bindings[binding.keyCode] = { + callback: callback, + key: binding.key, + description: binding.description + }; + } + else { + this.bindings[binding] = { + callback: callback, + key: null, + description: null + }; + } + + } + + /** + * Removes the specified custom key binding. + */ + removeKeyBinding( keyCode ) { + + delete this.bindings[keyCode]; + + } + + /** + * Programmatically triggers a keyboard event + * + * @param {int} keyCode + */ + triggerKey( keyCode ) { + + this.onDocumentKeyDown( { keyCode } ); + + } + + /** + * Registers a new shortcut to include in the help overlay + * + * @param {String} key + * @param {String} value + */ + registerKeyboardShortcut( key, value ) { + + this.shortcuts[key] = value; + + } + + /** + * Handler for the document level 'keypress' event. + * + * @param {object} event + */ + onDocumentKeyPress( event ) { + + // Check if the pressed key is question mark + if( event.shiftKey && event.charCode === 63 ) { + this.Reveal.toggleHelp(); + } + + } + + /** + * Handler for the document level 'keydown' event. + * + * @param {object} event + */ + onDocumentKeyDown( event ) { + + let config = this.Reveal.getConfig(); + + // If there's a condition specified and it returns false, + // ignore this event + if( typeof config.keyboardCondition === 'function' && config.keyboardCondition(event) === false ) { + return true; + } + + // Shorthand + let keyCode = event.keyCode; + + // Remember if auto-sliding was paused so we can toggle it + let autoSlideWasPaused = !this.Reveal.isAutoSliding(); + + this.Reveal.onUserInput( event ); + + // Is there a focused element that could be using the keyboard? + let activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit'; + let activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName ); + let activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className); + + // Whitelist specific modified + keycode combinations + let prevSlideShortcut = event.shiftKey && event.keyCode === 32; + let firstSlideShortcut = event.shiftKey && keyCode === 37; + let lastSlideShortcut = event.shiftKey && keyCode === 39; + + // Prevent all other events when a modifier is pressed + let unusedModifier = !prevSlideShortcut && !firstSlideShortcut && !lastSlideShortcut && + ( event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ); + + // Disregard the event if there's a focused element or a + // keyboard modifier key is present + if( activeElementIsCE || activeElementIsInput || activeElementIsNotes || unusedModifier ) return; + + // While paused only allow resume keyboard events; 'b', 'v', '.' + let resumeKeyCodes = [66,86,190,191]; + let key; + + // Custom key bindings for togglePause should be able to resume + if( typeof config.keyboard === 'object' ) { + for( key in config.keyboard ) { + if( config.keyboard[key] === 'togglePause' ) { + resumeKeyCodes.push( parseInt( key, 10 ) ); + } + } + } + + if( this.Reveal.isPaused() && resumeKeyCodes.indexOf( keyCode ) === -1 ) { + return false; + } + + // Use linear navigation if we're configured to OR if + // the presentation is one-dimensional + let useLinearMode = config.navigationMode === 'linear' || !this.Reveal.hasHorizontalSlides() || !this.Reveal.hasVerticalSlides(); + + let triggered = false; + + // 1. User defined key bindings + if( typeof config.keyboard === 'object' ) { + + for( key in config.keyboard ) { + + // Check if this binding matches the pressed key + if( parseInt( key, 10 ) === keyCode ) { + + let value = config.keyboard[ key ]; + + // Callback function + if( typeof value === 'function' ) { + value.apply( null, [ event ] ); + } + // String shortcuts to reveal.js API + else if( typeof value === 'string' && typeof this.Reveal[ value ] === 'function' ) { + this.Reveal[ value ].call(); + } + + triggered = true; + + } + + } + + } + + // 2. Registered custom key bindings + if( triggered === false ) { + + for( key in this.bindings ) { + + // Check if this binding matches the pressed key + if( parseInt( key, 10 ) === keyCode ) { + + let action = this.bindings[ key ].callback; + + // Callback function + if( typeof action === 'function' ) { + action.apply( null, [ event ] ); + } + // String shortcuts to reveal.js API + else if( typeof action === 'string' && typeof this.Reveal[ action ] === 'function' ) { + this.Reveal[ action ].call(); + } + + triggered = true; + } + } + } + + // 3. System defined key bindings + if( triggered === false ) { + + // Assume true and try to prove false + triggered = true; + + // P, PAGE UP + if( keyCode === 80 || keyCode === 33 ) { + this.Reveal.prev(); + } + // N, PAGE DOWN + else if( keyCode === 78 || keyCode === 34 ) { + this.Review.next(); + } + // H, LEFT + else if( keyCode === 72 || keyCode === 37 ) { + if( firstSlideShortcut ) { + this.Reveal.slide( 0 ); + } + else if( !this.Reveal.overview.isActive() && useLinearMode ) { + this.Reveal.prev(); + } + else { + this.Reveal.left(); + } + } + // L, RIGHT + else if( keyCode === 76 || keyCode === 39 ) { + if( lastSlideShortcut ) { + this.Reveal.slide( Number.MAX_VALUE ); + } + else if( !this.Reveal.overview.isActive() && useLinearMode ) { + this.Review.next(); + } + else { + this.Reveal.right(); + } + } + // K, UP + else if( keyCode === 75 || keyCode === 38 ) { + if( !this.Reveal.overview.isActive() && useLinearMode ) { + this.Reveal.prev(); + } + else { + this.Reveal.up(); + } + } + // J, DOWN + else if( keyCode === 74 || keyCode === 40 ) { + if( !this.Reveal.overview.isActive() && useLinearMode ) { + this.Review.next(); + } + else { + this.Reveal.down(); + } + } + // HOME + else if( keyCode === 36 ) { + this.Reveal.slide( 0 ); + } + // END + else if( keyCode === 35 ) { + this.Reveal.slide( Number.MAX_VALUE ); + } + // SPACE + else if( keyCode === 32 ) { + if( this.Reveal.overview.isActive() ) { + this.Reveal.overview.deactivate(); + } + if( event.shiftKey ) { + this.Reveal.prev(); + } + else { + this.Review.next(); + } + } + // TWO-SPOT, SEMICOLON, B, V, PERIOD, LOGITECH PRESENTER TOOLS "BLACK SCREEN" BUTTON + else if( keyCode === 58 || keyCode === 59 || keyCode === 66 || keyCode === 86 || keyCode === 190 || keyCode === 191 ) { + this.Reveal.togglePause(); + } + // F + else if( keyCode === 70 ) { + enterFullscreen(); + } + // A + else if( keyCode === 65 ) { + if ( config.autoSlideStoppable ) { + this.Reveal.toggleAutoSlide( autoSlideWasPaused ); + } + } + else { + triggered = false; + } + + } + + // If the input resulted in a triggered action we should prevent + // the browsers default behavior + if( triggered ) { + event.preventDefault && event.preventDefault(); + } + // ESC or O key + else if( keyCode === 27 || keyCode === 79 ) { + if( this.Reveal.closeOverlay() === false ) { + this.Reveal.overview.toggle(); + } + + event.preventDefault && event.preventDefault(); + } + + // If auto-sliding is enabled we need to cue up + // another timeout + this.Reveal.cueAutoSlide(); + + } + +} \ No newline at end of file diff --git a/js/reveal.js b/js/reveal.js index 10d5f8a0..c9d0fb16 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2,6 +2,7 @@ import SlideContent from './controllers/slidecontent.js' import AutoAnimate from './controllers/autoanimate.js' import Fragments from './controllers/fragments.js' import Overview from './controllers/overview.js' +import Keyboard from './controllers/keyboard.js' import Plugins from './controllers/plugins.js' import Playback from './components/playback.js' import defaultConfig from './config.js' @@ -85,8 +86,12 @@ export default function( revealElement, options ) { // Controls navigation between slide fragments fragments = new Fragments( Reveal ), + // Controls the birds-eye overview of slides overview = new Overview( Reveal ), + // Controls all keyboard interactions + keyboard = new Keyboard( Reveal ), + // List of asynchronously loaded reveal.js dependencies asyncDependencies = [], @@ -121,14 +126,7 @@ export default function( revealElement, options ) { startCount: 0, captured: false, threshold: 40 - }, - - // A key:value map of shortcut keyboard keys and descriptions of - // the actions they trigger, generated in #configure() - keyboardShortcuts = {}, - - // Holds custom key code mappings - registeredKeyBindings = {}; + }; /** * Starts up the presentation if the client is capable. @@ -949,25 +947,7 @@ export default function( revealElement, options ) { dom.wrapper.removeAttribute( 'data-navigation-mode' ); } - // Define our contextual list of keyboard shortcuts - if( config.navigationMode === 'linear' ) { - keyboardShortcuts['→ , ↓ , SPACE , N , L , J'] = 'Next slide'; - keyboardShortcuts['← , ↑ , P , H , K'] = 'Previous slide'; - } - else { - keyboardShortcuts['N , SPACE'] = 'Next slide'; - keyboardShortcuts['P'] = 'Previous slide'; - keyboardShortcuts['← , H'] = 'Navigate left'; - keyboardShortcuts['→ , L'] = 'Navigate right'; - keyboardShortcuts['↑ , K'] = 'Navigate up'; - keyboardShortcuts['↓ , J'] = 'Navigate down'; - } - - keyboardShortcuts['Home , Shift ←'] = 'First slide'; - keyboardShortcuts['End , Shift →'] = 'Last slide'; - keyboardShortcuts['B , .'] = 'Pause'; - keyboardShortcuts['F'] = 'Fullscreen'; - keyboardShortcuts['ESC, O'] = 'Slide overview'; + keyboard.refreshSortcuts(); sync(); @@ -1005,8 +985,7 @@ export default function( revealElement, options ) { } if( config.keyboard ) { - document.addEventListener( 'keydown', onDocumentKeyDown, false ); - document.addEventListener( 'keypress', onDocumentKeyPress, false ); + keyboard.bind(); } if( config.progress && dom.progress ) { @@ -1047,8 +1026,8 @@ export default function( revealElement, options ) { eventsAreBound = false; - document.removeEventListener( 'keydown', onDocumentKeyDown, false ); - document.removeEventListener( 'keypress', onDocumentKeyPress, false ); + keyboard.unbind(); + window.removeEventListener( 'hashchange', onWindowHashChange, false ); window.removeEventListener( 'resize', onWindowResize, false ); @@ -1081,38 +1060,6 @@ export default function( revealElement, options ) { } - /** - * Add a custom key binding with optional description to - * be added to the help screen. - */ - function addKeyBinding( binding, callback ) { - - if( typeof binding === 'object' && binding.keyCode ) { - registeredKeyBindings[binding.keyCode] = { - callback: callback, - key: binding.key, - description: binding.description - }; - } - else { - registeredKeyBindings[binding] = { - callback: callback, - key: null, - description: null - }; - } - - } - - /** - * Removes the specified custom key binding. - */ - function removeKeyBinding( keyCode ) { - - delete registeredKeyBindings[keyCode]; - - } - /** * Applies CSS transforms to the slides container. The container * is transformed from two separate sources: layout and the overview @@ -1327,14 +1274,14 @@ export default function( revealElement, options ) { let html = '

Keyboard Shortcuts


'; html += ''; - for( let key in keyboardShortcuts ) { - html += ``; + for( let key in keyboard.shortcuts ) { + html += ``; } // Add custom key bindings that have associated descriptions - for( let binding in registeredKeyBindings ) { - if( registeredKeyBindings[binding].key && registeredKeyBindings[binding].description ) { - html += ``; + for( let binding in keyboard.registeredKeyBindings ) { + if( keyboard.registeredKeyBindings[binding].key && keyboard.registeredKeyBindings[binding].description ) { + html += ``; } } @@ -1366,8 +1313,11 @@ export default function( revealElement, options ) { if( dom.overlay ) { dom.overlay.parentNode.removeChild( dom.overlay ); dom.overlay = null; + return true; } + return false; + } /** @@ -3482,252 +3432,6 @@ export default function( revealElement, options ) { } - /** - * Handler for the document level 'keypress' event. - * - * @param {object} event - */ - function onDocumentKeyPress( event ) { - - // Check if the pressed key is question mark - if( event.shiftKey && event.charCode === 63 ) { - toggleHelp(); - } - - } - - /** - * Handler for the document level 'keydown' event. - * - * @param {object} event - */ - function onDocumentKeyDown( event ) { - - // If there's a condition specified and it returns false, - // ignore this event - if( typeof config.keyboardCondition === 'function' && config.keyboardCondition(event) === false ) { - return true; - } - - // Shorthand - let keyCode = event.keyCode; - - // Remember if auto-sliding was paused so we can toggle it - let autoSlideWasPaused = autoSlidePaused; - - onUserInput( event ); - - // Is there a focused element that could be using the keyboard? - let activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit'; - let activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName ); - let activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className); - - // Whitelist specific modified + keycode combinations - let prevSlideShortcut = event.shiftKey && event.keyCode === 32; - let firstSlideShortcut = event.shiftKey && keyCode === 37; - let lastSlideShortcut = event.shiftKey && keyCode === 39; - - // Prevent all other events when a modifier is pressed - let unusedModifier = !prevSlideShortcut && !firstSlideShortcut && !lastSlideShortcut && - ( event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ); - - // Disregard the event if there's a focused element or a - // keyboard modifier key is present - if( activeElementIsCE || activeElementIsInput || activeElementIsNotes || unusedModifier ) return; - - // While paused only allow resume keyboard events; 'b', 'v', '.' - let resumeKeyCodes = [66,86,190,191]; - let key; - - // Custom key bindings for togglePause should be able to resume - if( typeof config.keyboard === 'object' ) { - for( key in config.keyboard ) { - if( config.keyboard[key] === 'togglePause' ) { - resumeKeyCodes.push( parseInt( key, 10 ) ); - } - } - } - - if( isPaused() && resumeKeyCodes.indexOf( keyCode ) === -1 ) { - return false; - } - - // Use linear navigation if we're configured to OR if - // the presentation is one-dimensional - let useLinearMode = config.navigationMode === 'linear' || !hasHorizontalSlides() || !hasVerticalSlides(); - - let triggered = false; - - // 1. User defined key bindings - if( typeof config.keyboard === 'object' ) { - - for( key in config.keyboard ) { - - // Check if this binding matches the pressed key - if( parseInt( key, 10 ) === keyCode ) { - - let value = config.keyboard[ key ]; - - // Callback function - if( typeof value === 'function' ) { - value.apply( null, [ event ] ); - } - // String shortcuts to reveal.js API - else if( typeof value === 'string' && typeof Reveal[ value ] === 'function' ) { - Reveal[ value ].call(); - } - - triggered = true; - - } - - } - - } - - // 2. Registered custom key bindings - if( triggered === false ) { - - for( key in registeredKeyBindings ) { - - // Check if this binding matches the pressed key - if( parseInt( key, 10 ) === keyCode ) { - - let action = registeredKeyBindings[ key ].callback; - - // Callback function - if( typeof action === 'function' ) { - action.apply( null, [ event ] ); - } - // String shortcuts to reveal.js API - else if( typeof action === 'string' && typeof Reveal[ action ] === 'function' ) { - Reveal[ action ].call(); - } - - triggered = true; - } - } - } - - // 3. System defined key bindings - if( triggered === false ) { - - // Assume true and try to prove false - triggered = true; - - // P, PAGE UP - if( keyCode === 80 || keyCode === 33 ) { - navigatePrev(); - } - // N, PAGE DOWN - else if( keyCode === 78 || keyCode === 34 ) { - navigateNext(); - } - // H, LEFT - else if( keyCode === 72 || keyCode === 37 ) { - if( firstSlideShortcut ) { - slide( 0 ); - } - else if( !overview.isActive() && useLinearMode ) { - navigatePrev(); - } - else { - navigateLeft(); - } - } - // L, RIGHT - else if( keyCode === 76 || keyCode === 39 ) { - if( lastSlideShortcut ) { - slide( Number.MAX_VALUE ); - } - else if( !overview.isActive() && useLinearMode ) { - navigateNext(); - } - else { - navigateRight(); - } - } - // K, UP - else if( keyCode === 75 || keyCode === 38 ) { - if( !overview.isActive() && useLinearMode ) { - navigatePrev(); - } - else { - navigateUp(); - } - } - // J, DOWN - else if( keyCode === 74 || keyCode === 40 ) { - if( !overview.isActive() && useLinearMode ) { - navigateNext(); - } - else { - navigateDown(); - } - } - // HOME - else if( keyCode === 36 ) { - slide( 0 ); - } - // END - else if( keyCode === 35 ) { - slide( Number.MAX_VALUE ); - } - // SPACE - else if( keyCode === 32 ) { - if( overview.isActive() ) { - overview.deactivate(); - } - if( event.shiftKey ) { - navigatePrev(); - } - else { - navigateNext(); - } - } - // TWO-SPOT, SEMICOLON, B, V, PERIOD, LOGITECH PRESENTER TOOLS "BLACK SCREEN" BUTTON - else if( keyCode === 58 || keyCode === 59 || keyCode === 66 || keyCode === 86 || keyCode === 190 || keyCode === 191 ) { - togglePause(); - } - // F - else if( keyCode === 70 ) { - enterFullscreen(); - } - // A - else if( keyCode === 65 ) { - if ( config.autoSlideStoppable ) { - toggleAutoSlide( autoSlideWasPaused ); - } - } - else { - triggered = false; - } - - } - - // If the input resulted in a triggered action we should prevent - // the browsers default behavior - if( triggered ) { - event.preventDefault && event.preventDefault(); - } - // ESC or O key - else if( keyCode === 27 || keyCode === 79 ) { - if( dom.overlay ) { - closeOverlay(); - } - else { - overview.toggle(); - } - - event.preventDefault && event.preventDefault(); - } - - // If auto-sliding is enabled we need to cue up - // another timeout - cueAutoSlide(); - - } - /** * Handler for the 'touchstart' event, enables support for * swipe and pinch gestures. @@ -4069,6 +3773,14 @@ export default function( revealElement, options ) { prevFragment: fragments.prev.bind( fragments ), nextFragment: fragments.next.bind( fragments ), + // Forward event binding to the reveal DOM element + addEventListener: ( type, listener, useCapture ) => { + Reveal.getRevealElement().addEventListener( type, listener, useCapture ); + }, + removeEventListener: ( type, listener, useCapture ) => { + Reveal.getRevealElement().removeEventListener( type, listener, useCapture ); + }, + // Forces an update in slide layout layout, @@ -4155,29 +3867,19 @@ export default function( revealElement, options ) { hasVerticalSlides, // Adds/removes a custom key binding - addKeyBinding, - removeKeyBinding, + addKeyBinding: keyboard.addKeyBinding.bind( keyboard ), + removeKeyBinding: keyboard.removeKeyBinding.bind( keyboard ), // Programmatically triggers a keyboard event - triggerKey: keyCode => onDocumentKeyDown( { keyCode } ), + triggerKey: keyboard.triggerKey.bind( keyboard ), // Registers a new shortcut to include in the help overlay - registerKeyboardShortcut: ( key, value ) => keyboardShortcuts[key] = value, - - // Forward event binding to the reveal DOM element - addEventListener: ( type, listener, useCapture ) => { - Reveal.getRevealElement().addEventListener( type, listener, useCapture ); - }, - removeEventListener: ( type, listener, useCapture ) => { - Reveal.getRevealElement().removeEventListener( type, listener, useCapture ); - }, + registerKeyboardShortcut: keyboard.registerKeyboardShortcut.bind( keyboard ), // API for registering and retrieving plugins registerPlugin: plugins.registerPlugin.bind( plugins ), hasPlugin: plugins.hasPlugin.bind( plugins ), getPlugin: plugins.getPlugin.bind( plugins ), - - // Returns a hash with all registered plugins getPlugins: plugins.getRegisteredPlugins.bind( plugins ), getComputedSlideSize, @@ -4232,7 +3934,10 @@ export default function( revealElement, options ) { announceStatus, getStatusText, + overview, slideContent, + onUserInput, + closeOverlay, updateControls, updateProgress, updateSlidesVisibility,
KEYACTION
${key}${keyboardShortcuts[ key ]}
${key}${keyboard.shortcuts[ key ]}
${registeredKeyBindings[binding].key}${registeredKeyBindings[binding].description}
${keyboard.registeredKeyBindings[binding].key}${keyboard.registeredKeyBindings[binding].description}