diff --git a/dist/reveal.min.js b/dist/reveal.min.js index 9751da2..fe72d29 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=()=>{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},u=navigator.userAgent,h=document.createElement("div"),p=/(iphone|ipod|ipad|android)/gi.test(u)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,g=/chrome/i.test(u)&&!/edge/i.test(u),f=/android/gi.test(u),v="zoom"in h.style&&!p&&(g||/Version\/[\d\.]+.*Safari/.test(u));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),p&&(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(p){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 b{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 y{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 A{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 w{constructor(e){this.Reveal=e,this.shortcuts={},this.bindings={},this.onDocumentKeyDown=this.onDocumentKeyDown.bind(this),this.onDocumentKeyPress=this.onDocumentKeyPress.bind(this)}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]}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"}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 p="linear"===t.navigationMode||!this.Reveal.hasHorizontalSlides()||!this.Reveal.hasVerticalSlides(),g=!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(),g=!0}if(!1===g)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(),g=!0}!1===g&&(g=!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()&&p?this.Reveal.prev():this.Reveal.left():76===a||39===a?d?this.Reveal.slide(Number.MAX_VALUE):!this.Reveal.overview.isActive()&&p?this.Review.next():this.Reveal.right():75===a||38===a?!this.Reveal.overview.isActive()&&p?this.Reveal.prev():this.Reveal.up():74===a||40===a?!this.Reveal.overview.isActive()&&p?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):g=!1),g?e.preventDefault&&e.preventDefault():27!==a&&79!==a||(!1===this.Reveal.closeOverlay()&&this.Reveal.overview.toggle(),e.preventDefault&&e.preventDefault()),this.Reveal.cueAutoSlide()}}const S=(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 E{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)):S(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()):S(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 k{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 L={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 x=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 R=function(e,t){const a={};let l,u,h,g,S,R,M,P=!1,C=!1,N=!1,q=[],I=1,T={layout:"",overview:""},D={},B=new E,O=new m(a),H=new b(a),z=new y(a),K=new A(a),W=new w(a),j=0,$=0,U=!1,V=0,F=!1,X=0,Y=0,_=-1,J=!1,Q={startX:0,startY:0,startCount:0,captured:!1,threshold:40};function Z(){P=!0,function(){D.slides.classList.add("no-transition"),p?D.wrapper.classList.add("no-hover"):D.wrapper.classList.remove("no-hover");D.background=ae(D.wrapper,"div","backgrounds",null),D.progress=ae(D.wrapper,"div","progress",""),D.progressbar=D.progress.querySelector("span"),D.controls=ae(D.wrapper,"aside","controls",`\n\t\t\t\n\t\t\t\n\t\t\t`),D.slideNumber=ae(D.wrapper,"div","slide-number",""),D.speakerNotes=ae(D.wrapper,"div","speaker-notes",null),D.speakerNotes.setAttribute("data-prevent-swipe",""),D.speakerNotes.setAttribute("tabindex","0"),D.pauseOverlay=ae(D.wrapper,"div","pause-overlay",l.controls?'':null),D.wrapper.setAttribute("role","application"),D.controlsLeft=r(D.wrapper.querySelectorAll(".navigate-left")),D.controlsRight=r(D.wrapper.querySelectorAll(".navigate-right")),D.controlsUp=r(D.wrapper.querySelectorAll(".navigate-up")),D.controlsDown=r(D.wrapper.querySelectorAll(".navigate-down")),D.controlsPrev=r(D.wrapper.querySelectorAll(".navigate-prev")),D.controlsNext=r(D.wrapper.querySelectorAll(".navigate-next")),D.controlsRightArrow=D.controls.querySelector(".navigate-right"),D.controlsLeftArrow=D.controls.querySelector(".navigate-left"),D.controlsDownArrow=D.controls.querySelector(".navigate-down"),D.statusElement=function(){let e=D.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"),D.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);ue("callback",{method:t.method,result:e})}else console.warn('reveal.js: "'+t.method+'" is is blacklisted from the postMessage API')},!1),setInterval(()=>{0===D.wrapper.scrollTop&&0===D.wrapper.scrollLeft||(D.wrapper.scrollTop=0,D.wrapper.scrollLeft=0)},1e3),Ge().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"))})}),re(),_e(),$e(!0),setTimeout(()=>{D.slides.classList.remove("no-transition"),D.wrapper.classList.add("ready"),ce("ready",{indexh:u,indexv:h,currentSlide:S})},1),de()&&(oe(),"complete"===document.readyState?te():window.addEventListener("load",te))}function G(e){D.statusElement.textContent=e}function ee(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+=ee(e)})}return t=t.trim(),""===t?"":t+" "}function te(){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",me(i,n);let s=l.slideNumber&&/all|print/i.test(l.showSlideNumber);r(D.wrapper.querySelectorAll(".slides section")).forEach((function(e){e.setAttribute("data-slide-number",We(e))})),r(D.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=rt(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=z.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")}))}})),ce("pdf-ready")}function ae(e,t,a,i=""){let n=e.querySelectorAll("."+a);for(let t=0;t1&&l.autoSlide&&l.autoSlideStoppable&&(M=new k(D.wrapper,()=>Math.min(Math.max((Date.now()-_)/X,0),1)),M.on("click",Ht),J=!1),!1===l.fragments&&z.showAll();let r="none";l.slideNumber&&!de()&&("all"===l.showSlideNumber||"speaker"===l.showSlideNumber&&Ye())&&(r="block"),D.slideNumber.style.display=r,"default"!==l.navigationMode?D.wrapper.setAttribute("data-navigation-mode",l.navigationMode):D.wrapper.removeAttribute("data-navigation-mode"),W.refreshSortcuts(),Ie()}function se(){F=!0,window.addEventListener("hashchange",Tt,!1),window.addEventListener("resize",Dt,!1),l.touch&&("onpointerdown"in window?(D.wrapper.addEventListener("pointerdown",Et,!1),D.wrapper.addEventListener("pointermove",kt,!1),D.wrapper.addEventListener("pointerup",Lt,!1)):window.navigator.msPointerEnabled?(D.wrapper.addEventListener("MSPointerDown",Et,!1),D.wrapper.addEventListener("MSPointerMove",kt,!1),D.wrapper.addEventListener("MSPointerUp",Lt,!1)):(D.wrapper.addEventListener("touchstart",At,!1),D.wrapper.addEventListener("touchmove",wt,!1),D.wrapper.addEventListener("touchend",St,!1))),l.keyboard&&W.bind(),l.progress&&D.progress&&D.progress.addEventListener("click",Rt,!1),D.pauseOverlay.addEventListener("click",Pe,!1),l.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",Bt,!1);let e=["touchstart","click"];f&&(e=["touchstart"]),e.forEach(e=>{D.controlsLeft.forEach(t=>t.addEventListener(e,Mt,!1)),D.controlsRight.forEach(t=>t.addEventListener(e,Pt,!1)),D.controlsUp.forEach(t=>t.addEventListener(e,Ct,!1)),D.controlsDown.forEach(t=>t.addEventListener(e,Nt,!1)),D.controlsPrev.forEach(t=>t.addEventListener(e,qt,!1)),D.controlsNext.forEach(t=>t.addEventListener(e,It,!1))})}function oe(){F=!1,W.unbind(),window.removeEventListener("hashchange",Tt,!1),window.removeEventListener("resize",Dt,!1),D.wrapper.removeEventListener("pointerdown",Et,!1),D.wrapper.removeEventListener("pointermove",kt,!1),D.wrapper.removeEventListener("pointerup",Lt,!1),D.wrapper.removeEventListener("MSPointerDown",Et,!1),D.wrapper.removeEventListener("MSPointerMove",kt,!1),D.wrapper.removeEventListener("MSPointerUp",Lt,!1),D.wrapper.removeEventListener("touchstart",At,!1),D.wrapper.removeEventListener("touchmove",wt,!1),D.wrapper.removeEventListener("touchend",St,!1),D.pauseOverlay.removeEventListener("click",Pe,!1),l.progress&&D.progress&&D.progress.removeEventListener("click",Rt,!1),["touchstart","click"].forEach(e=>{D.controlsLeft.forEach(t=>t.removeEventListener(e,Mt,!1)),D.controlsRight.forEach(t=>t.removeEventListener(e,Pt,!1)),D.controlsUp.forEach(t=>t.removeEventListener(e,Ct,!1)),D.controlsDown.forEach(t=>t.removeEventListener(e,Nt,!1)),D.controlsPrev.forEach(t=>t.removeEventListener(e,qt,!1)),D.controlsNext.forEach(t=>t.removeEventListener(e,It,!1))})}function le(e){"string"==typeof e.layout&&(T.layout=e.layout),"string"==typeof e.overview&&(T.overview=e.overview),T.layout?o(D.slides,T.layout+" "+T.overview):o(D.slides,T.overview)}function de(){return/print-pdf/gi.test(window.location.search)}function ce(e,t){let a=document.createEvent("HTMLEvents",1,2);a.initEvent(e,!0,!0),n(a,t),D.wrapper.dispatchEvent(a),ue(e)}function ue(e,t){if(l.postMessageEvents&&window.parent!==window.self){let a={namespace:"reveal",eventName:e,state:st()};n(a,t),window.parent.postMessage(JSON.stringify(a),"*")}}function he(e="a"){r(D.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",Ot,!1)})}function pe(e="a"){r(D.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",Ot,!1)})}function ge(){if(l.help){fe(),D.overlay=document.createElement("div"),D.overlay.classList.add("overlay"),D.overlay.classList.add("overlay-help"),D.wrapper.appendChild(D.overlay);let e='

Keyboard Shortcuts


';e+="";for(let t in W.shortcuts)e+=``;for(let t in W.registeredKeyBindings)W.registeredKeyBindings[t].key&&W.registeredKeyBindings[t].description&&(e+=``);e+="
KEYACTION
${t}${W.shortcuts[t]}
${W.registeredKeyBindings[t].key}${W.registeredKeyBindings[t].description}
",D.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`,D.overlay.querySelector(".close").addEventListener("click",e=>{fe(),e.preventDefault()},!1)}}function fe(){return!!D.overlay&&(D.overlay.parentNode.removeChild(D.overlay),D.overlay=null,!0)}function ve(){if(D.wrapper&&!de()){if(!l.disableLayout){p&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");const e=be(),t=I;me(l.width,l.height),D.slides.style.width=e.width+"px",D.slides.style.height=e.height+"px",I=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),I=Math.max(I,l.minScale),I=Math.min(I,l.maxScale),1===I?(D.slides.style.zoom="",D.slides.style.left="",D.slides.style.top="",D.slides.style.bottom="",D.slides.style.right="",le({layout:""})):I>1&&v&&window.devicePixelRatio<2?(D.slides.style.zoom=I,D.slides.style.left="",D.slides.style.top="",D.slides.style.bottom="",D.slides.style.right="",le({layout:""})):(D.slides.style.zoom="",D.slides.style.left="50%",D.slides.style.top="50%",D.slides.style.bottom="auto",D.slides.style.right="auto",le({layout:"translate(-50%, -50%) scale("+I+")"}));const a=r(D.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||D.wrapper.offsetWidth,presentationHeight:t||D.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||S,i=a?a.getAttribute("id"):null;i&&(i=encodeURIComponent(i));let n=Qe(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=S){return e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function Ee(){return!(!S||!Se(S))&&!S.nextElementSibling}function ke(){return 0===u&&0===h}function Le(){return!!S&&(!S.nextElementSibling&&(!Se(S)||!S.parentNode.nextElementSibling))}function xe(){U&&(U=!1,D.wrapper.style.cursor="")}function Re(){!1===U&&(U=!0,D.wrapper.style.cursor="none")}function Me(){if(l.pause){const e=D.wrapper.classList.contains("paused");lt(),D.wrapper.classList.add("paused"),!1===e&&ce("paused")}}function Pe(){const e=D.wrapper.classList.contains("paused");D.wrapper.classList.remove("paused"),ot(),e&&ce("resumed")}function Ce(e){"boolean"==typeof e?e?Me():Pe():Ne()?Pe():Me()}function Ne(){return D.wrapper.classList.contains("paused")}function qe(e,t,a,i){g=S;const n=D.wrapper.querySelectorAll(".slides>section");if(0===n.length)return;void 0!==t||K.isActive()||(t=Ae(n[e])),g&&g.parentNode&&g.parentNode.classList.contains("stack")&&ye(g.parentNode,h);const s=q.concat();q.length=0;let o=u||0,d=h||0;u=Be(".slides>section",void 0===e?u:e),h=Be(".slides>section.present>section",void 0===t?h:t),Oe(),ve(),K.isActive()&&K.update();let c=n[u],p=c.querySelectorAll("section");S=p[h]||c,void 0!==a&&z.goto(a);let f=u!==o||h!==d;f||(g=null),g&&g!==S&&(g.classList.remove("present"),g.setAttribute("aria-hidden","true"),ke()&&setTimeout(()=>{r(D.wrapper.querySelectorAll(".slides>section.stack")).forEach(e=>{ye(e,0)})},0));e:for(let e=0,t=q.length;e{D.slides.classList.remove("disable-slide-transitions")},0),l.autoAnimate&&H.run(g,S))}function Ie(){oe(),se(),ve(),X=l.autoSlide,ot(),de(),D.background.innerHTML="",D.background.classList.add("no-transition"),r(D.wrapper.querySelectorAll(".slides>section")).forEach(e=>{let t=ie(e,D.background);r(e.querySelectorAll("section")).forEach(e=>{ie(e,t),t.classList.add("stack")})}),l.parallaxBackgroundImage?(D.background.style.backgroundImage='url("'+l.parallaxBackgroundImage+'")',D.background.style.backgroundSize=l.parallaxBackgroundSize,D.background.style.backgroundRepeat=l.parallaxBackgroundRepeat,D.background.style.backgroundPosition=l.parallaxBackgroundPosition,setTimeout(()=>{D.wrapper.classList.add("has-parallax-background")},1)):(D.background.style.backgroundImage="",D.wrapper.classList.remove("has-parallax-background")),Je(),z.sortAll(),je(),ze(),Ke(),Oe(),$e(!0),l.showNotes&&D.slides.querySelectorAll("[data-notes], aside.notes").length>0?D.wrapper.classList.add("show-notes"):D.wrapper.classList.remove("show-notes"),He(),O.formatEmbeddedContent(),!1===l.autoPlayMedia?O.stopEmbeddedContent(S,{unloadIframes:!1}):O.startEmbeddedContent(S),K.isActive()&&K.layout()}function Te(e=S){return l.sort(e.querySelectorAll(".fragment"))}function De(){Ge().forEach((e,t,a)=>{D.slides.insertBefore(e,a[Math.floor(Math.random()*a.length)])})}function Be(e,t){let a=r(D.wrapper.querySelectorAll(e)),i=a.length,n=de();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&&(q=q.concat(e.split(" ")))}else t=0;return t}function Oe(){let e,t,a=Ge(),i=a.length;if(i&&void 0!==u){let n=K.isActive()?10:l.viewDistance;p&&(n=K.isActive()?6:l.mobileViewDistance),de()&&(n=Number.MAX_VALUE);for(let s=0;sNo notes on this slide.')}function ze(){l.progress&&D.progressbar&&(D.progressbar.style.width=Xe()*D.wrapper.offsetWidth+"px")}function Ke(){l.slideNumber&&D.slideNumber&&(D.slideNumber.innerHTML=We())}function We(e=S){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!==D.wrapper.querySelectorAll(".slides>section").length||(a="c"),t=[],a){case"c":t.push(Fe(e)+1);break;case"c/t":t.push(Fe(e)+1,"/",it());break;default:let i=Qe(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 je(){let e=Ve(),t=z.availableRoutes();[...D.controlsLeft,...D.controlsRight,...D.controlsUp,...D.controlsDown,...D.controlsPrev,...D.controlsNext].forEach(e=>{e.classList.remove("enabled","fragmented"),e.setAttribute("disabled","disabled")}),e.left&&D.controlsLeft.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&D.controlsRight.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&D.controlsUp.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&D.controlsDown.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&D.controlsPrev.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&D.controlsNext.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),S&&(t.prev&&D.controlsPrev.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&D.controlsNext.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),Se(S)?(t.prev&&D.controlsUp.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&D.controlsDown.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&D.controlsLeft.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&D.controlsRight.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),l.controlsTutorial&&(!N&&e.down?D.controlsDownArrow.classList.add("highlight"):(D.controlsDownArrow.classList.remove("highlight"),l.rtl?!C&&e.left&&0===h?D.controlsLeftArrow.classList.add("highlight"):D.controlsLeftArrow.classList.remove("highlight"):!C&&e.right&&0===h?D.controlsRightArrow.classList.add("highlight"):D.controlsRightArrow.classList.remove("highlight")))}function $e(e=!1){let t=null,a=l.rtl?"future":"past",i=l.rtl?"past":"future";if(r(D.background.childNodes).forEach((n,s)=>{n.classList.remove("past","present","future"),su?n.classList.add(i):(n.classList.add("present"),t=n),(e||s===u)&&r(n.querySelectorAll(".slide-background")).forEach((e,a)=>{e.classList.remove("past","present","future"),ah?e.classList.add("future"):(e.classList.add("present"),s===u&&(t=e))})}),R&&O.stopEmbeddedContent(R,{unloadIframes:!O.shouldPreload(R)}),t){O.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=R?R.getAttribute("data-background-hash"):null,i=t.getAttribute("data-background-hash");i&&i===a&&t!==R&&D.background.classList.add("no-transition"),R=t}S&&["has-light-background","has-dark-background"].forEach(e=>{S.classList.contains(e)?D.wrapper.classList.add(e):D.wrapper.classList.remove(e)}),setTimeout(()=>{D.background.classList.remove("no-transition")},1)}function Ue(){if(l.parallaxBackgroundImage){let e,t,a=Ge(),i=et(),n=D.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=D.background.offsetWidth,d=a.length;r="number"==typeof l.parallaxBackgroundHorizontal?l.parallaxBackgroundHorizontal:d>1?(e-o)/(d-1):0,s=r*u*-1;let c,p,g=D.background.offsetHeight,f=i.length;c="number"==typeof l.parallaxBackgroundVertical?l.parallaxBackgroundVertical:(t-g)/(f-1),p=f>0?c*h:0,D.background.style.backgroundPosition=s+"px "+-p+"px"}}function Ve(){let e=D.wrapper.querySelectorAll(".slides>section"),t=D.wrapper.querySelectorAll(".slides>section.present>section"),a={left:u>0,right:u0,down:h1&&(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 Fe(e=S){let t=Ge(),a=0;e:for(let i=0;i0){let a=.9;t+=S.querySelectorAll(".fragment.visible").length/e.length*a}}return Math.min(t/(e-1),1)}function Ye(){return!!window.location.search.match(/receiver/gi)}function _e(){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=!!S&&S.getAttribute("id")===i;if(e){if(!t){let t=a.getIndices(e);qe(t.h,t.v)}}else qe(u||0,h||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===u&&n===h&&void 0===e||qe(i,n,e)}}function Je(e){clearTimeout($),"number"==typeof e?$=setTimeout(Je,e):S&&(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 Qe(e){let t,a=u,i=h;if(e){let t=Se(e),n=t?e.parentNode:e,s=r(D.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&&S){if(S.querySelectorAll(".fragment").length>0){let e=S.querySelector(".current-fragment");t=e&&e.hasAttribute("data-fragment-index")?parseInt(e.getAttribute("data-fragment-index"),10):S.querySelectorAll(".fragment.visible").length-1}}return{h:a,v:i,f:t}}function Ze(){return r(D.wrapper.querySelectorAll('.slides section:not(.stack):not([data-visibility="uncounted"])'))}function Ge(){return r(D.wrapper.querySelectorAll(".slides>section"))}function et(){return r(D.wrapper.querySelectorAll(".slides>section>section"))}function tt(){return Ge().length>1}function at(){return et().length>1}function it(){return Ze().length}function nt(e,t){let a=Ge()[e],i=a&&a.querySelectorAll("section");return i&&i.length&&"number"==typeof t?i?i[t]:void 0:a}function rt(e=S){if(e.hasAttribute("data-notes"))return e.getAttribute("data-notes");let t=e.querySelector("aside.notes");return t?t.innerHTML:null}function st(){let e=Qe();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:Ne(),overview:K.isActive()}}function ot(){if(lt(),S&&!1!==l.autoSlide){let e=S.querySelector(".current-fragment");e||(e=S.querySelector(".fragment"));let t=e?e.getAttribute("data-autoslide"):null,a=S.parentNode?S.parentNode.getAttribute("data-autoslide"):null,i=S.getAttribute("data-autoslide");X=t?parseInt(t,10):i?parseInt(i,10):a?parseInt(a,10):l.autoSlide,0===S.querySelectorAll(".fragment").length&&r(S.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-autoplay")&&X&&1e3*e.duration/e.playbackRate>X&&(X=1e3*e.duration/e.playbackRate+1e3)}),!X||J||Ne()||K.isActive()||Le()&&!z.availableRoutes().next&&!0!==l.loop||(Y=setTimeout(()=>{"function"==typeof l.autoSlideMethod?l.autoSlideMethod():vt(),ot()},X),_=Date.now()),M&&M.setPlaying(-1!==Y)}}function lt(){clearTimeout(Y),Y=-1}function dt(){X&&!J&&(J=!0,ce("autoslidepaused"),clearTimeout(Y),M&&M.setPlaying(!1))}function ct(){X&&J&&(J=!1,ce("autoslideresumed"),ot())}function ut(){C=!0,l.rtl?(K.isActive()||!1===z.next())&&Ve().left&&qe(u+1,"grid"===l.navigationMode?h:void 0):(K.isActive()||!1===z.prev())&&Ve().left&&qe(u-1,"grid"===l.navigationMode?h:void 0)}function ht(){C=!0,l.rtl?(K.isActive()||!1===z.prev())&&Ve().right&&qe(u-1,"grid"===l.navigationMode?h:void 0):(K.isActive()||!1===z.next())&&Ve().right&&qe(u+1,"grid"===l.navigationMode?h:void 0)}function pt(){(K.isActive()||!1===z.prev())&&Ve().up&&qe(u,h-1)}function gt(){N=!0,(K.isActive()||!1===z.next())&&Ve().down&&qe(u,h+1)}function ft(){if(!1===z.prev())if(Ve().up)pt();else{let e;if(e=l.rtl?r(D.wrapper.querySelectorAll(".slides>section.future")).pop():r(D.wrapper.querySelectorAll(".slides>section.past")).pop(),e){let t=e.querySelectorAll("section").length-1||void 0;qe(u-1,t)}}}function vt(){if(C=!0,N=!0,!1===z.next()){let e=Ve();e.down&&e.right&&l.loop&&Ee()&&(e.down=!1),e.down?gt():l.rtl?ut():ht()}}function mt(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function bt(e){l.autoSlideStoppable&&dt()}function yt(e){xe(),clearTimeout(V),V=setTimeout(Re,l.hideCursorTime)}function At(e){if(mt(e.target))return!0;Q.startX=e.touches[0].clientX,Q.startY=e.touches[0].clientY,Q.startCount=e.touches.length}function wt(e){if(mt(e.target))return!0;if(Q.captured)f&&e.preventDefault();else{bt();let t=e.touches[0].clientX,a=e.touches[0].clientY;if(1===e.touches.length&&2!==Q.startCount){let i=t-Q.startX,n=a-Q.startY;i>Q.threshold&&Math.abs(i)>Math.abs(n)?(Q.captured=!0,"linear"===l.navigationMode?l.rtl?vt():ft():ut()):i<-Q.threshold&&Math.abs(i)>Math.abs(n)?(Q.captured=!0,"linear"===l.navigationMode?l.rtl?ft():vt():ht()):n>Q.threshold?(Q.captured=!0,"linear"===l.navigationMode?ft():pt()):n<-Q.threshold&&(Q.captured=!0,"linear"===l.navigationMode?vt():gt()),l.embedded?(Q.captured||Se(S))&&e.preventDefault():e.preventDefault()}}}function St(e){Q.captured=!1}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(e))}function Lt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],St())}function xt(e){if(Date.now()-j>600){j=Date.now();let t=e.detail||-e.wheelDelta;t>0?vt():t<0&&ft()}}function Rt(e){bt(),e.preventDefault();let t=Ge().length,a=Math.floor(e.clientX/D.wrapper.offsetWidth*t);l.rtl&&(a=t-a),qe(a)}function Mt(e){e.preventDefault(),bt(),"linear"===l.navigationMode?ft():ut()}function Pt(e){e.preventDefault(),bt(),"linear"===l.navigationMode?vt():ht()}function Ct(e){e.preventDefault(),bt(),pt()}function Nt(e){e.preventDefault(),bt(),gt()}function qt(e){e.preventDefault(),bt(),ft()}function It(e){e.preventDefault(),bt(),vt()}function Tt(e){_e()}function Dt(e){ve()}function Bt(e){!1===document.hidden&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function Ot(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){let t=e.currentTarget.getAttribute("href");t&&(!function(e){fe(),D.overlay=document.createElement("div"),D.overlay.classList.add("overlay"),D.overlay.classList.add("overlay-preview"),D.wrapper.appendChild(D.overlay),D.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
`,D.overlay.querySelector("iframe").addEventListener("load",e=>{D.overlay.classList.add("loaded")},!1),D.overlay.querySelector(".close").addEventListener("click",e=>{fe(),e.preventDefault()},!1),D.overlay.querySelector(".external").addEventListener("click",e=>{fe()},!1)}(t),e.preventDefault())}}function Ht(e){Le()&&!1===l.loop?(qe(0,0),ct()):J?ct():dt()}return n(a,{VERSION:"4.0.0-dev",initialize:function(){if(e)return D.wrapper=e,D.slides=e.querySelector(".slides"),window.addEventListener("load",ve,!1),l={...L,...t,...c()},B.load(l.dependencies).then(Z),new Promise(e=>a.addEventListener("ready",e));console.warn("reveal.js can not initialize without a valid .reveal element.")},configure:re,sync:Ie,syncSlide:function(e=S){ne(e),Te(e),O.load(e),$e(),He()},syncFragments:Te,slide:qe,left:ut,right:ht,up:pt,down:gt,prev:ft,next:vt,navigateTo:qe,navigateLeft:ut,navigateRight:ht,navigateUp:pt,navigateDown:gt,navigatePrev:ft,navigateNext:vt,navigateFragment:z.goto.bind(z),prevFragment:z.prev.bind(z),nextFragment:z.next.bind(z),addEventListener:(e,t,i)=>{a.getRevealElement().addEventListener(e,t,i)},removeEventListener:(e,t,i)=>{a.getRevealElement().removeEventListener(e,t,i)},layout:ve,shuffle:De,availableRoutes:Ve,availableFragments:z.availableRoutes.bind(z),toggleHelp:function(e){"boolean"==typeof e?e?ge():fe():D.overlay?fe():ge()},toggleOverview:K.toggle.bind(K),togglePause:Ce,toggleAutoSlide:function(e){"boolean"==typeof e?e?ct():dt():J?ct():dt()},isFirstSlide:ke,isLastSlide:Le,isLastVerticalSlide:Ee,isOverview:K.isActive.bind(K),isPaused:Ne,isAutoSliding:function(){return!(!X||J)},isSpeakerNotes:Ye,loadSlide:O.load.bind(O),unloadSlide:O.unload.bind(O),addEventListeners:se,removeEventListeners:oe,dispatchEvent:ce,getState:st,setState:function(e){if("object"==typeof e){qe(s(e.indexh),s(e.indexv),s(e.indexf));let t=s(e.paused),a=s(e.overview);"boolean"==typeof t&&t!==Ne()&&Ce(t),"boolean"==typeof a&&a!==K.isActive()&&K.toggle(a)}},getSlidePastCount:Fe,getProgress:Xe,getIndices:Qe,getSlides:Ze,getSlidesAttributes:function(){return Ze().map(e=>{let t={};for(let a=0;ag,getCurrentSlide:()=>S,getScale:()=>I,getConfig:()=>l,getQueryHash:c,getRevealElement:()=>D.wrapper||document.querySelector(".reveal"),getSlidesElement:()=>D.slides,getBackgroundsElement:()=>D.background,isReady:()=>P,announceStatus:G,getStatusText:ee,overview:K,slideContent:O,onUserInput:bt,closeOverlay:fe,updateControls:je,updateProgress:ze,updateSlidesVisibility:Oe,writeURL:Je,transformSlides:le,cueAutoSlide:ot,cancelAutoSlide:lt})};window.Reveal={initialize:e=>(window.Reveal=new R(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,t,a,i="")=>{let n=e.querySelectorAll("."+a);for(let t=0;t{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},u=()=>{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},h=navigator.userAgent,g=document.createElement("div"),p=/(iphone|ipod|ipad|android)/gi.test(h)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,f=/chrome/i.test(h)&&!/edge/i.test(h),v=/android/gi.test(h),m="zoom"in g.style&&!p&&(f||/Version\/[\d\.]+.*Safari/.test(h));class b{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),p&&(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(p){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 y{constructor(e){this.Reveal=e}createElement(){this.element=document.createElement("div"),this.element.className="slide-number",this.Reveal.getRevealElement().appendChild(this.element)}refreshVisibility(){let e=this.Reveal.getConfig(),t="none";e.slideNumber&&!this.Reveal.isPrintingPDF()&&("all"===e.showSlideNumber||"speaker"===e.showSlideNumber&&this.Reveal.isSpeakerNotes())&&(t="block"),this.element.style.display=t}update(){this.Reveal.getConfig().slideNumber&&this.element&&(this.element.innerHTML=this.getSlideNumber())}getSlideNumber(e=this.Reveal.getCurrentSlide()){let t,a=this.Reveal.getConfig(),i="h.v";if("function"==typeof a.slideNumber)t=a.slideNumber(e);else switch("string"==typeof a.slideNumber&&(i=a.slideNumber),/c/.test(i)||1!==this.Reveal.getHorizontalSlides().length||(i="c"),t=[],i){case"c":t.push(this.Reveal.getSlidePastCount(e)+1);break;case"c/t":t.push(this.Reveal.getSlidePastCount(e)+1,"/",this.Reveal.getTotalSlides());break;default:let a=this.Reveal.getIndices(e);t.push(a.h+1);let n="h/v"===i?"/":".";this.Reveal.isVerticalSlide(e)&&t.push(n,a.v+1)}let n="#"+this.Reveal.location.getHash(e);return this.formatNumber(t[0],t[1],t[2],n)}formatNumber(e,t,a,i="#"+this.Reveal.location.getHash()){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`}}class A{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||c();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 w{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 S{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 E{constructor(e){this.Reveal=e,this.shortcuts={},this.bindings={},this.onDocumentKeyDown=this.onDocumentKeyDown.bind(this),this.onDocumentKeyPress=this.onDocumentKeyPress.bind(this)}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]}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"}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.Reveal.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.Reveal.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.Reveal.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.Reveal.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()}}class k{constructor(e){this.Reveal=e}getHash(e=this.Reveal.getCurrentSlide()){let t="/",a=e?e.getAttribute("id"):null;a&&(a=encodeURIComponent(a));let i=this.Reveal.getIndices(e);if(this.Reveal.getConfig().fragmentInURL||(i.f=void 0),"string"==typeof a&&a.length&&void 0===i.f)t="/"+a;else{let e=this.Reveal.getConfig().hashOneBasedIndex?1:0;(i.h>0||i.v>0||void 0!==i.f)&&(t+=i.h+e),(i.v>0||void 0!==i.f)&&(t+="/"+(i.v+e)),void 0!==i.f&&(t+="/"+i.f)}return t}}const L=(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 x{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)):L(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()):L(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 R{constructor(e,t){this.diameter=100,this.diameter2=this.diameter/2,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=e,this.progressCheck=t,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}setPlaying(e){const t=this.playing;this.playing=e,!t&&this.playing?this.animate():this.render()}animate(){const e=this.progress;this.progress=this.progressCheck(),e>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&requestAnimationFrame(this.animate.bind(this))}render(){let e=this.playing?this.progress:0,t=this.diameter2-this.thickness,a=this.diameter2,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 M={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 C=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 P=function(e,t){const a={};let l,h,g,f,L,P,N,q=!1,I=!1,T=!1,D=[],B=1,H={layout:"",overview:""},O={},z=new x,K=new b(a),W=new y(a),j=new A(a),$=new w(a),U=new S(a),V=new E(a),F=new k(a),X=0,Y=0,_=!1,J=0,Q=!1,Z=0,G=0,ee=-1,te=!1,ae={startX:0,startY:0,startCount:0,captured:!1,threshold:40};function ie(){q=!0,function(){O.slides.classList.add("no-transition"),p?O.wrapper.classList.add("no-hover"):O.wrapper.classList.remove("no-hover");O.background=d(O.wrapper,"div","backgrounds",null),O.progress=d(O.wrapper,"div","progress",""),O.progressbar=O.progress.querySelector("span"),O.controls=d(O.wrapper,"aside","controls",`\n\t\t\t\n\t\t\t\n\t\t\t`),W.createElement(),O.speakerNotes=d(O.wrapper,"div","speaker-notes",null),O.speakerNotes.setAttribute("data-prevent-swipe",""),O.speakerNotes.setAttribute("tabindex","0"),O.pauseOverlay=d(O.wrapper,"div","pause-overlay",l.controls?'':null),O.wrapper.setAttribute("role","application"),O.controlsLeft=r(O.wrapper.querySelectorAll(".navigate-left")),O.controlsRight=r(O.wrapper.querySelectorAll(".navigate-right")),O.controlsUp=r(O.wrapper.querySelectorAll(".navigate-up")),O.controlsDown=r(O.wrapper.querySelectorAll(".navigate-down")),O.controlsPrev=r(O.wrapper.querySelectorAll(".navigate-prev")),O.controlsNext=r(O.wrapper.querySelectorAll(".navigate-next")),O.controlsRightArrow=O.controls.querySelector(".navigate-right"),O.controlsLeftArrow=O.controls.querySelector(".navigate-left"),O.controlsDownArrow=O.controls.querySelector(".navigate-down"),O.statusElement=function(){let e=O.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"),O.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);fe("callback",{method:t.method,result:e})}else console.warn('reveal.js: "'+t.method+'" is is blacklisted from the postMessage API')},!1),setInterval(()=>{0===O.wrapper.scrollTop&&0===O.wrapper.scrollLeft||(O.wrapper.scrollTop=0,O.wrapper.scrollLeft=0)},1e3),Ge().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"))})}),de(),_e(),Ue(!0),setTimeout(()=>{O.slides.classList.remove("no-transition"),O.wrapper.classList.add("ready"),pe("ready",{indexh:h,indexv:g,currentSlide:L})},1),ge()&&(ue(),"complete"===document.readyState?se():window.addEventListener("load",se))}function ne(e){O.statusElement.textContent=e}function re(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+=re(e)})}return t=t.trim(),""===t?"":t+" "}function se(){let e=Se(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;c("@page{size:"+t+"px "+a+"px; margin: 0px;}"),c(".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",we(i,n);let s=l.slideNumber&&/all|print/i.test(l.showSlideNumber);r(O.wrapper.querySelectorAll(".slides section")).forEach((function(e){e.setAttribute("data-slide-number",W.getSlideNumber(e))})),r(O.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=rt(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=$.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")}))}})),pe("pdf-ready")}function oe(e,t){let a=document.createElement("div");a.className="slide-background "+e.className.replace(/present|past|future/,"");let i=document.createElement("div");return i.className="slide-background-content",a.appendChild(i),t.appendChild(a),e.slideBackgroundElement=a,e.slideBackgroundContentElement=i,le(e),a}function le(e){let t=e.slideBackgroundElement,a=e.slideBackgroundContentElement;e.classList.remove("has-dark-background"),e.classList.remove("has-light-background"),t.removeAttribute("data-loaded"),t.removeAttribute("data-background-hash"),t.removeAttribute("data-background-size"),t.removeAttribute("data-background-transition"),t.style.backgroundColor="",a.style.backgroundSize="",a.style.backgroundRepeat="",a.style.backgroundPosition="",a.style.backgroundImage="",a.style.opacity="",a.innerHTML="";let i={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundVideo:e.getAttribute("data-background-video"),backgroundIframe:e.getAttribute("data-background-iframe"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition"),backgroundOpacity:e.getAttribute("data-background-opacity")};i.background&&(/^(http|file|\/\/)/gi.test(i.background)||/\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test(i.background)?e.setAttribute("data-background-image",i.background):t.style.background=i.background),(i.background||i.backgroundColor||i.backgroundImage||i.backgroundVideo||i.backgroundIframe)&&t.setAttribute("data-background-hash",i.background+i.backgroundSize+i.backgroundImage+i.backgroundVideo+i.backgroundIframe+i.backgroundColor+i.backgroundRepeat+i.backgroundPosition+i.backgroundTransition+i.backgroundOpacity),i.backgroundSize&&t.setAttribute("data-background-size",i.backgroundSize),i.backgroundColor&&(t.style.backgroundColor=i.backgroundColor),i.backgroundTransition&&t.setAttribute("data-background-transition",i.backgroundTransition),e.hasAttribute("data-preload")&&t.setAttribute("data-preload",""),i.backgroundSize&&(a.style.backgroundSize=i.backgroundSize),i.backgroundRepeat&&(a.style.backgroundRepeat=i.backgroundRepeat),i.backgroundPosition&&(a.style.backgroundPosition=i.backgroundPosition),i.backgroundOpacity&&(a.style.opacity=i.backgroundOpacity);let n=i.backgroundColor;if(!n){let e=window.getComputedStyle(t);e&&e.backgroundColor&&(n=e.backgroundColor)}if(n){let t=C(n);t&&0!==t.a&&("string"==typeof(r=n)&&(r=C(r)),(r?(299*r.r+587*r.g+114*r.b)/1e3:null)<128?e.classList.add("has-dark-background"):e.classList.add("has-light-background"))}var r}function de(e){const t=l.transition;if("object"==typeof e&&n(l,e),!1===a.isReady())return;const i=O.wrapper.querySelectorAll(".slides section").length;O.wrapper.classList.remove(t),O.wrapper.classList.add(l.transition),O.wrapper.setAttribute("data-transition-speed",l.transitionSpeed),O.wrapper.setAttribute("data-background-transition",l.backgroundTransition),O.controls.style.display=l.controls?"block":"none",O.progress.style.display=l.progress?"block":"none",O.controls.setAttribute("data-controls-layout",l.controlsLayout),O.controls.setAttribute("data-controls-back-arrows",l.controlsBackArrows),l.shuffle&&Oe(),l.rtl?O.wrapper.classList.add("rtl"):O.wrapper.classList.remove("rtl"),l.center?O.wrapper.classList.add("center"):O.wrapper.classList.remove("center"),!1===l.pause&&qe(),l.showNotes&&O.speakerNotes.setAttribute("data-layout","string"==typeof l.showNotes?l.showNotes:"inline"),l.mouseWheel?(document.addEventListener("DOMMouseScroll",xt,!1),document.addEventListener("mousewheel",xt,!1)):(document.removeEventListener("DOMMouseScroll",xt,!1),document.removeEventListener("mousewheel",xt,!1)),l.hideInactiveCursor?(document.addEventListener("mousemove",yt,!1),document.addEventListener("mousedown",yt,!1)):(Ce(),document.removeEventListener("mousemove",yt,!1),document.removeEventListener("mousedown",yt,!1)),l.previewLinks?(ve(),me("[data-preview-link=false]")):(me(),ve("[data-preview-link]:not([data-preview-link=false])")),j.reset(),N&&(N.destroy(),N=null),i>1&&l.autoSlide&&l.autoSlideStoppable&&(N=new R(O.wrapper,()=>Math.min(Math.max((Date.now()-ee)/Z,0),1)),N.on("click",Ot),te=!1),!1===l.fragments&&$.showAll(),"default"!==l.navigationMode?O.wrapper.setAttribute("data-navigation-mode",l.navigationMode):O.wrapper.removeAttribute("data-navigation-mode"),W.refreshVisibility(),V.refreshSortcuts(),Be()}function ce(){Q=!0,window.addEventListener("hashchange",Tt,!1),window.addEventListener("resize",Dt,!1),l.touch&&("onpointerdown"in window?(O.wrapper.addEventListener("pointerdown",Et,!1),O.wrapper.addEventListener("pointermove",kt,!1),O.wrapper.addEventListener("pointerup",Lt,!1)):window.navigator.msPointerEnabled?(O.wrapper.addEventListener("MSPointerDown",Et,!1),O.wrapper.addEventListener("MSPointerMove",kt,!1),O.wrapper.addEventListener("MSPointerUp",Lt,!1)):(O.wrapper.addEventListener("touchstart",At,!1),O.wrapper.addEventListener("touchmove",wt,!1),O.wrapper.addEventListener("touchend",St,!1))),l.keyboard&&V.bind(),l.progress&&O.progress&&O.progress.addEventListener("click",Rt,!1),O.pauseOverlay.addEventListener("click",qe,!1),l.focusBodyOnPageVisibilityChange&&document.addEventListener("visibilitychange",Bt,!1);let e=["touchstart","click"];v&&(e=["touchstart"]),e.forEach(e=>{O.controlsLeft.forEach(t=>t.addEventListener(e,Mt,!1)),O.controlsRight.forEach(t=>t.addEventListener(e,Ct,!1)),O.controlsUp.forEach(t=>t.addEventListener(e,Pt,!1)),O.controlsDown.forEach(t=>t.addEventListener(e,Nt,!1)),O.controlsPrev.forEach(t=>t.addEventListener(e,qt,!1)),O.controlsNext.forEach(t=>t.addEventListener(e,It,!1))})}function ue(){Q=!1,V.unbind(),window.removeEventListener("hashchange",Tt,!1),window.removeEventListener("resize",Dt,!1),O.wrapper.removeEventListener("pointerdown",Et,!1),O.wrapper.removeEventListener("pointermove",kt,!1),O.wrapper.removeEventListener("pointerup",Lt,!1),O.wrapper.removeEventListener("MSPointerDown",Et,!1),O.wrapper.removeEventListener("MSPointerMove",kt,!1),O.wrapper.removeEventListener("MSPointerUp",Lt,!1),O.wrapper.removeEventListener("touchstart",At,!1),O.wrapper.removeEventListener("touchmove",wt,!1),O.wrapper.removeEventListener("touchend",St,!1),O.pauseOverlay.removeEventListener("click",qe,!1),l.progress&&O.progress&&O.progress.removeEventListener("click",Rt,!1),["touchstart","click"].forEach(e=>{O.controlsLeft.forEach(t=>t.removeEventListener(e,Mt,!1)),O.controlsRight.forEach(t=>t.removeEventListener(e,Ct,!1)),O.controlsUp.forEach(t=>t.removeEventListener(e,Pt,!1)),O.controlsDown.forEach(t=>t.removeEventListener(e,Nt,!1)),O.controlsPrev.forEach(t=>t.removeEventListener(e,qt,!1)),O.controlsNext.forEach(t=>t.removeEventListener(e,It,!1))})}function he(e){"string"==typeof e.layout&&(H.layout=e.layout),"string"==typeof e.overview&&(H.overview=e.overview),H.layout?o(O.slides,H.layout+" "+H.overview):o(O.slides,H.overview)}function ge(){return/print-pdf/gi.test(window.location.search)}function pe(e,t){let a=document.createEvent("HTMLEvents",1,2);a.initEvent(e,!0,!0),n(a,t),O.wrapper.dispatchEvent(a),fe(e)}function fe(e,t){if(l.postMessageEvents&&window.parent!==window.self){let a={namespace:"reveal",eventName:e,state:st()};n(a,t),window.parent.postMessage(JSON.stringify(a),"*")}}function ve(e="a"){r(O.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",Ht,!1)})}function me(e="a"){r(O.wrapper.querySelectorAll(e)).forEach(e=>{/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",Ht,!1)})}function be(){if(l.help){ye(),O.overlay=document.createElement("div"),O.overlay.classList.add("overlay"),O.overlay.classList.add("overlay-help"),O.wrapper.appendChild(O.overlay);let e='

Keyboard Shortcuts


';e+="";for(let t in V.shortcuts)e+=``;for(let t in V.registeredKeyBindings)V.registeredKeyBindings[t].key&&V.registeredKeyBindings[t].description&&(e+=``);e+="
KEYACTION
${t}${V.shortcuts[t]}
${V.registeredKeyBindings[t].key}${V.registeredKeyBindings[t].description}
",O.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`,O.overlay.querySelector(".close").addEventListener("click",e=>{ye(),e.preventDefault()},!1)}}function ye(){return!!O.overlay&&(O.overlay.parentNode.removeChild(O.overlay),O.overlay=null,!0)}function Ae(){if(O.wrapper&&!ge()){if(!l.disableLayout){p&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");const e=Se(),t=B;we(l.width,l.height),O.slides.style.width=e.width+"px",O.slides.style.height=e.height+"px",B=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),B=Math.max(B,l.minScale),B=Math.min(B,l.maxScale),1===B?(O.slides.style.zoom="",O.slides.style.left="",O.slides.style.top="",O.slides.style.bottom="",O.slides.style.right="",he({layout:""})):B>1&&m&&window.devicePixelRatio<2?(O.slides.style.zoom=B,O.slides.style.left="",O.slides.style.top="",O.slides.style.bottom="",O.slides.style.right="",he({layout:""})):(O.slides.style.zoom="",O.slides.style.left="50%",O.slides.style.top="50%",O.slides.style.bottom="auto",O.slides.style.right="auto",he({layout:"translate(-50%, -50%) scale("+B+")"}));const a=r(O.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 Se(e,t){const a={width:l.width,height:l.height,presentationWidth:e||O.wrapper.offsetWidth,presentationHeight:t||O.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 Ee(e,t){"object"==typeof e&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",t||0)}function ke(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 Le(e=L){return e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function xe(){return!(!L||!Le(L))&&!L.nextElementSibling}function Re(){return 0===h&&0===g}function Me(){return!!L&&(!L.nextElementSibling&&(!Le(L)||!L.parentNode.nextElementSibling))}function Ce(){_&&(_=!1,O.wrapper.style.cursor="")}function Pe(){!1===_&&(_=!0,O.wrapper.style.cursor="none")}function Ne(){if(l.pause){const e=O.wrapper.classList.contains("paused");lt(),O.wrapper.classList.add("paused"),!1===e&&pe("paused")}}function qe(){const e=O.wrapper.classList.contains("paused");O.wrapper.classList.remove("paused"),ot(),e&&pe("resumed")}function Ie(e){"boolean"==typeof e?e?Ne():qe():Te()?qe():Ne()}function Te(){return O.wrapper.classList.contains("paused")}function De(e,t,a,i){f=L;const n=O.wrapper.querySelectorAll(".slides>section");if(0===n.length)return;void 0!==t||U.isActive()||(t=ke(n[e])),f&&f.parentNode&&f.parentNode.classList.contains("stack")&&Ee(f.parentNode,g);const s=D.concat();D.length=0;let o=h||0,d=g||0;h=ze(".slides>section",void 0===e?h:e),g=ze(".slides>section.present>section",void 0===t?g:t),Ke(),Ae(),U.isActive()&&U.update();let c=n[h],u=c.querySelectorAll("section");L=u[g]||c,void 0!==a&&$.goto(a);let p=h!==o||g!==d;p||(f=null),f&&f!==L&&(f.classList.remove("present"),f.setAttribute("aria-hidden","true"),Re()&&setTimeout(()=>{r(O.wrapper.querySelectorAll(".slides>section.stack")).forEach(e=>{Ee(e,0)})},0));e:for(let e=0,t=D.length;e{O.slides.classList.remove("disable-slide-transitions")},0),l.autoAnimate&&j.run(f,L))}function Be(){ue(),ce(),Ae(),Z=l.autoSlide,ot(),ge(),O.background.innerHTML="",O.background.classList.add("no-transition"),r(O.wrapper.querySelectorAll(".slides>section")).forEach(e=>{let t=oe(e,O.background);r(e.querySelectorAll("section")).forEach(e=>{oe(e,t),t.classList.add("stack")})}),l.parallaxBackgroundImage?(O.background.style.backgroundImage='url("'+l.parallaxBackgroundImage+'")',O.background.style.backgroundSize=l.parallaxBackgroundSize,O.background.style.backgroundRepeat=l.parallaxBackgroundRepeat,O.background.style.backgroundPosition=l.parallaxBackgroundPosition,setTimeout(()=>{O.wrapper.classList.add("has-parallax-background")},1)):(O.background.style.backgroundImage="",O.wrapper.classList.remove("has-parallax-background")),Je(),$.sortAll(),$e(),je(),Ke(),Ue(!0),l.showNotes&&O.slides.querySelectorAll("[data-notes], aside.notes").length>0?O.wrapper.classList.add("show-notes"):O.wrapper.classList.remove("show-notes"),We(),W.update(),K.formatEmbeddedContent(),!1===l.autoPlayMedia?K.stopEmbeddedContent(L,{unloadIframes:!1}):K.startEmbeddedContent(L),U.isActive()&&U.layout()}function He(e=L){return l.sort(e.querySelectorAll(".fragment"))}function Oe(){Ge().forEach((e,t,a)=>{O.slides.insertBefore(e,a[Math.floor(Math.random()*a.length)])})}function ze(e,t){let a=r(O.wrapper.querySelectorAll(e)),i=a.length,n=ge();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&&(D=D.concat(e.split(" ")))}else t=0;return t}function Ke(){let e,t,a=Ge(),i=a.length;if(i&&void 0!==h){let n=U.isActive()?10:l.viewDistance;p&&(n=U.isActive()?6:l.mobileViewDistance),ge()&&(n=Number.MAX_VALUE);for(let s=0;sNo notes on this slide.')}function je(){l.progress&&O.progressbar&&(O.progressbar.style.width=Ye()*O.wrapper.offsetWidth+"px")}function $e(){let e=Fe(),t=$.availableRoutes();[...O.controlsLeft,...O.controlsRight,...O.controlsUp,...O.controlsDown,...O.controlsPrev,...O.controlsNext].forEach(e=>{e.classList.remove("enabled","fragmented"),e.setAttribute("disabled","disabled")}),e.left&&O.controlsLeft.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&O.controlsRight.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&O.controlsUp.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&O.controlsDown.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&O.controlsPrev.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&O.controlsNext.forEach(e=>{e.classList.add("enabled"),e.removeAttribute("disabled")}),L&&(t.prev&&O.controlsPrev.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&O.controlsNext.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),Le(L)?(t.prev&&O.controlsUp.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&O.controlsDown.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&O.controlsLeft.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&O.controlsRight.forEach(e=>{e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),l.controlsTutorial&&(!T&&e.down?O.controlsDownArrow.classList.add("highlight"):(O.controlsDownArrow.classList.remove("highlight"),l.rtl?!I&&e.left&&0===g?O.controlsLeftArrow.classList.add("highlight"):O.controlsLeftArrow.classList.remove("highlight"):!I&&e.right&&0===g?O.controlsRightArrow.classList.add("highlight"):O.controlsRightArrow.classList.remove("highlight")))}function Ue(e=!1){let t=null,a=l.rtl?"future":"past",i=l.rtl?"past":"future";if(r(O.background.childNodes).forEach((n,s)=>{n.classList.remove("past","present","future"),sh?n.classList.add(i):(n.classList.add("present"),t=n),(e||s===h)&&r(n.querySelectorAll(".slide-background")).forEach((e,a)=>{e.classList.remove("past","present","future"),ag?e.classList.add("future"):(e.classList.add("present"),s===h&&(t=e))})}),P&&K.stopEmbeddedContent(P,{unloadIframes:!K.shouldPreload(P)}),t){K.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=P?P.getAttribute("data-background-hash"):null,i=t.getAttribute("data-background-hash");i&&i===a&&t!==P&&O.background.classList.add("no-transition"),P=t}L&&["has-light-background","has-dark-background"].forEach(e=>{L.classList.contains(e)?O.wrapper.classList.add(e):O.wrapper.classList.remove(e)}),setTimeout(()=>{O.background.classList.remove("no-transition")},1)}function Ve(){if(l.parallaxBackgroundImage){let e,t,a=Ge(),i=et(),n=O.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=O.background.offsetWidth,d=a.length;r="number"==typeof l.parallaxBackgroundHorizontal?l.parallaxBackgroundHorizontal:d>1?(e-o)/(d-1):0,s=r*h*-1;let c,u,p=O.background.offsetHeight,f=i.length;c="number"==typeof l.parallaxBackgroundVertical?l.parallaxBackgroundVertical:(t-p)/(f-1),u=f>0?c*g:0,O.background.style.backgroundPosition=s+"px "+-u+"px"}}function Fe(){let e=O.wrapper.querySelectorAll(".slides>section"),t=O.wrapper.querySelectorAll(".slides>section.present>section"),a={left:h>0,right:h0,down:g1&&(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 Xe(e=L){let t=Ge(),a=0;e:for(let i=0;i0){let a=.9;t+=L.querySelectorAll(".fragment.visible").length/e.length*a}}return Math.min(t/(e-1),1)}function _e(){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=!!L&&L.getAttribute("id")===i;if(e){if(!t){let t=a.getIndices(e);De(t.h,t.v)}}else De(h||0,g||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===h&&n===g&&void 0===e||De(i,n,e)}}function Je(e){clearTimeout(Y),"number"==typeof e?Y=setTimeout(Je,e):L&&(l.history||!window.history?window.location.hash=F.getHash():l.hash?window.history.replaceState(null,null,"#"+F.getHash()):window.history.replaceState(null,null,window.location.pathname+window.location.search))}function Qe(e){let t,a=h,i=g;if(e){let t=Le(e),n=t?e.parentNode:e,s=r(O.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&&L){if(L.querySelectorAll(".fragment").length>0){let e=L.querySelector(".current-fragment");t=e&&e.hasAttribute("data-fragment-index")?parseInt(e.getAttribute("data-fragment-index"),10):L.querySelectorAll(".fragment.visible").length-1}}return{h:a,v:i,f:t}}function Ze(){return r(O.wrapper.querySelectorAll('.slides section:not(.stack):not([data-visibility="uncounted"])'))}function Ge(){return r(O.wrapper.querySelectorAll(".slides>section"))}function et(){return r(O.wrapper.querySelectorAll(".slides>section>section"))}function tt(){return Ge().length>1}function at(){return et().length>1}function it(){return Ze().length}function nt(e,t){let a=Ge()[e],i=a&&a.querySelectorAll("section");return i&&i.length&&"number"==typeof t?i?i[t]:void 0:a}function rt(e=L){if(e.hasAttribute("data-notes"))return e.getAttribute("data-notes");let t=e.querySelector("aside.notes");return t?t.innerHTML:null}function st(){let e=Qe();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:Te(),overview:U.isActive()}}function ot(){if(lt(),L&&!1!==l.autoSlide){let e=L.querySelector(".current-fragment");e||(e=L.querySelector(".fragment"));let t=e?e.getAttribute("data-autoslide"):null,a=L.parentNode?L.parentNode.getAttribute("data-autoslide"):null,i=L.getAttribute("data-autoslide");Z=t?parseInt(t,10):i?parseInt(i,10):a?parseInt(a,10):l.autoSlide,0===L.querySelectorAll(".fragment").length&&r(L.querySelectorAll("video, audio")).forEach(e=>{e.hasAttribute("data-autoplay")&&Z&&1e3*e.duration/e.playbackRate>Z&&(Z=1e3*e.duration/e.playbackRate+1e3)}),!Z||te||Te()||U.isActive()||Me()&&!$.availableRoutes().next&&!0!==l.loop||(G=setTimeout(()=>{"function"==typeof l.autoSlideMethod?l.autoSlideMethod():vt(),ot()},Z),ee=Date.now()),N&&N.setPlaying(-1!==G)}}function lt(){clearTimeout(G),G=-1}function dt(){Z&&!te&&(te=!0,pe("autoslidepaused"),clearTimeout(G),N&&N.setPlaying(!1))}function ct(){Z&&te&&(te=!1,pe("autoslideresumed"),ot())}function ut(){I=!0,l.rtl?(U.isActive()||!1===$.next())&&Fe().left&&De(h+1,"grid"===l.navigationMode?g:void 0):(U.isActive()||!1===$.prev())&&Fe().left&&De(h-1,"grid"===l.navigationMode?g:void 0)}function ht(){I=!0,l.rtl?(U.isActive()||!1===$.prev())&&Fe().right&&De(h-1,"grid"===l.navigationMode?g:void 0):(U.isActive()||!1===$.next())&&Fe().right&&De(h+1,"grid"===l.navigationMode?g:void 0)}function gt(){(U.isActive()||!1===$.prev())&&Fe().up&&De(h,g-1)}function pt(){T=!0,(U.isActive()||!1===$.next())&&Fe().down&&De(h,g+1)}function ft(){if(!1===$.prev())if(Fe().up)gt();else{let e;if(e=l.rtl?r(O.wrapper.querySelectorAll(".slides>section.future")).pop():r(O.wrapper.querySelectorAll(".slides>section.past")).pop(),e){let t=e.querySelectorAll("section").length-1||void 0;De(h-1,t)}}}function vt(){if(I=!0,T=!0,!1===$.next()){let e=Fe();e.down&&e.right&&l.loop&&xe()&&(e.down=!1),e.down?pt():l.rtl?ut():ht()}}function mt(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function bt(e){l.autoSlideStoppable&&dt()}function yt(e){Ce(),clearTimeout(J),J=setTimeout(Pe,l.hideCursorTime)}function At(e){if(mt(e.target))return!0;ae.startX=e.touches[0].clientX,ae.startY=e.touches[0].clientY,ae.startCount=e.touches.length}function wt(e){if(mt(e.target))return!0;if(ae.captured)v&&e.preventDefault();else{bt();let t=e.touches[0].clientX,a=e.touches[0].clientY;if(1===e.touches.length&&2!==ae.startCount){let i=t-ae.startX,n=a-ae.startY;i>ae.threshold&&Math.abs(i)>Math.abs(n)?(ae.captured=!0,"linear"===l.navigationMode?l.rtl?vt():ft():ut()):i<-ae.threshold&&Math.abs(i)>Math.abs(n)?(ae.captured=!0,"linear"===l.navigationMode?l.rtl?ft():vt():ht()):n>ae.threshold?(ae.captured=!0,"linear"===l.navigationMode?ft():gt()):n<-ae.threshold&&(ae.captured=!0,"linear"===l.navigationMode?vt():pt()),l.embedded?(ae.captured||Le(L))&&e.preventDefault():e.preventDefault()}}}function St(e){ae.captured=!1}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(e))}function Lt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],St())}function xt(e){if(Date.now()-X>600){X=Date.now();let t=e.detail||-e.wheelDelta;t>0?vt():t<0&&ft()}}function Rt(e){bt(),e.preventDefault();let t=Ge().length,a=Math.floor(e.clientX/O.wrapper.offsetWidth*t);l.rtl&&(a=t-a),De(a)}function Mt(e){e.preventDefault(),bt(),"linear"===l.navigationMode?ft():ut()}function Ct(e){e.preventDefault(),bt(),"linear"===l.navigationMode?vt():ht()}function Pt(e){e.preventDefault(),bt(),gt()}function Nt(e){e.preventDefault(),bt(),pt()}function qt(e){e.preventDefault(),bt(),ft()}function It(e){e.preventDefault(),bt(),vt()}function Tt(e){_e()}function Dt(e){Ae()}function Bt(e){!1===document.hidden&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function Ht(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){let t=e.currentTarget.getAttribute("href");t&&(!function(e){ye(),O.overlay=document.createElement("div"),O.overlay.classList.add("overlay"),O.overlay.classList.add("overlay-preview"),O.wrapper.appendChild(O.overlay),O.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
`,O.overlay.querySelector("iframe").addEventListener("load",e=>{O.overlay.classList.add("loaded")},!1),O.overlay.querySelector(".close").addEventListener("click",e=>{ye(),e.preventDefault()},!1),O.overlay.querySelector(".external").addEventListener("click",e=>{ye()},!1)}(t),e.preventDefault())}}function Ot(e){Me()&&!1===l.loop?(De(0,0),ct()):te?ct():dt()}return n(a,{VERSION:"4.0.0-dev",initialize:function(){if(e)return O.wrapper=e,O.slides=e.querySelector(".slides"),window.addEventListener("load",Ae,!1),l={...M,...t,...u()},z.load(l.dependencies).then(ie),new Promise(e=>a.addEventListener("ready",e));console.warn("reveal.js can not initialize without a valid .reveal element.")},configure:de,sync:Be,syncSlide:function(e=L){le(e),He(e),K.load(e),Ue(),We()},syncFragments:He,slide:De,left:ut,right:ht,up:gt,down:pt,prev:ft,next:vt,navigateTo:De,navigateLeft:ut,navigateRight:ht,navigateUp:gt,navigateDown:pt,navigatePrev:ft,navigateNext:vt,navigateFragment:$.goto.bind($),prevFragment:$.prev.bind($),nextFragment:$.next.bind($),addEventListener:(e,t,i)=>{a.getRevealElement().addEventListener(e,t,i)},removeEventListener:(e,t,i)=>{a.getRevealElement().removeEventListener(e,t,i)},layout:Ae,shuffle:Oe,availableRoutes:Fe,availableFragments:$.availableRoutes.bind($),toggleHelp:function(e){"boolean"==typeof e?e?be():ye():O.overlay?ye():be()},toggleOverview:U.toggle.bind(U),togglePause:Ie,toggleAutoSlide:function(e){"boolean"==typeof e?e?ct():dt():te?ct():dt()},isFirstSlide:Re,isLastSlide:Me,isLastVerticalSlide:xe,isVerticalSlide:Le,isOverview:U.isActive.bind(U),isPaused:Te,isAutoSliding:function(){return!(!Z||te)},isSpeakerNotes:function(){return!!window.location.search.match(/receiver/gi)},isPrintingPDF:ge,loadSlide:K.load.bind(K),unloadSlide:K.unload.bind(K),addEventListeners:ce,removeEventListeners:ue,dispatchEvent:pe,getState:st,setState:function(e){if("object"==typeof e){De(s(e.indexh),s(e.indexv),s(e.indexf));let t=s(e.paused),a=s(e.overview);"boolean"==typeof t&&t!==Te()&&Ie(t),"boolean"==typeof a&&a!==U.isActive()&&U.toggle(a)}},getSlidePastCount:Xe,getProgress:Ye,getIndices:Qe,getSlides:Ze,getSlidesAttributes:function(){return Ze().map(e=>{let t={};for(let a=0;af,getCurrentSlide:()=>L,getScale:()=>B,getConfig:()=>l,getQueryHash:u,getRevealElement:()=>O.wrapper||document.querySelector(".reveal"),getSlidesElement:()=>O.slides,getBackgroundsElement:()=>O.background,isReady:()=>q,announceStatus:ne,getStatusText:re,location:F,overview:U,slideContent:K,onUserInput:bt,closeOverlay:ye,updateControls:$e,updateProgress:je,updateSlidesVisibility:Ke,writeURL:Je,transformSlides:he,cueAutoSlide:ot,cancelAutoSlide:lt})};window.Reveal={initialize:e=>(window.Reveal=new P(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 index 7fad615..2fa2703 100644 --- a/js/controllers/keyboard.js +++ b/js/controllers/keyboard.js @@ -263,7 +263,7 @@ export default class Keyboard { } // N, PAGE DOWN else if( keyCode === 78 || keyCode === 34 ) { - this.Review.next(); + this.Reveal.next(); } // H, LEFT else if( keyCode === 72 || keyCode === 37 ) { @@ -283,7 +283,7 @@ export default class Keyboard { this.Reveal.slide( Number.MAX_VALUE ); } else if( !this.Reveal.overview.isActive() && useLinearMode ) { - this.Review.next(); + this.Reveal.next(); } else { this.Reveal.right(); @@ -301,7 +301,7 @@ export default class Keyboard { // J, DOWN else if( keyCode === 74 || keyCode === 40 ) { if( !this.Reveal.overview.isActive() && useLinearMode ) { - this.Review.next(); + this.Reveal.next(); } else { this.Reveal.down(); @@ -324,7 +324,7 @@ export default class Keyboard { this.Reveal.prev(); } else { - this.Review.next(); + this.Reveal.next(); } } // TWO-SPOT, SEMICOLON, B, V, PERIOD, LOGITECH PRESENTER TOOLS "BLACK SCREEN" BUTTON diff --git a/js/controllers/location.js b/js/controllers/location.js new file mode 100644 index 0000000..29a6d5f --- /dev/null +++ b/js/controllers/location.js @@ -0,0 +1,51 @@ +import { enterFullscreen } from '../utils/util.js' + +/** + * Handles all reveal.js keyboard interactions. + */ +export default class Location { + + constructor( Reveal ) { + + this.Reveal = Reveal; + + } + + /** + * Return a hash URL that will resolve to the given slide location. + * + * @param {HTMLElement} [slide=currentSlide] The slide to link to + */ + getHash( slide = this.Reveal.getCurrentSlide() ) { + + let url = '/'; + + // Attempt to create a named link based on the slide's ID + let id = slide ? slide.getAttribute( 'id' ) : null; + if( id ) { + id = encodeURIComponent( id ); + } + + let index = this.Reveal.getIndices( slide ); + if( !this.Reveal.getConfig().fragmentInURL ) { + index.f = undefined; + } + + // If the current slide has an ID, use that as a named link, + // but we don't support named links with a fragment index + if( typeof id === 'string' && id.length && index.f === undefined ) { + url = '/' + id; + } + // Otherwise use the /h/v index + else { + let hashIndexBase = this.Reveal.getConfig().hashOneBasedIndex ? 1 : 0; + if( index.h > 0 || index.v > 0 || index.f !== undefined ) url += index.h + hashIndexBase; + if( index.v > 0 || index.f !== undefined ) url += '/' + (index.v + hashIndexBase ); + if( index.f !== undefined ) url += '/' + index.f; + } + + return url; + + } + +} \ No newline at end of file diff --git a/js/controllers/slidenumber.js b/js/controllers/slidenumber.js new file mode 100644 index 0000000..a2beeef --- /dev/null +++ b/js/controllers/slidenumber.js @@ -0,0 +1,128 @@ +import { enterFullscreen } from '../utils/util.js' + +/** + * Handles all reveal.js keyboard interactions. + */ +export default class SlideNumber { + + constructor( Reveal ) { + + this.Reveal = Reveal; + + } + + createElement() { + + this.element = document.createElement( 'div' ); + this.element.className = 'slide-number'; + this.Reveal.getRevealElement().appendChild( this.element ); + + } + + /** + * Shows or hides the slide number depending on the + * current config and state. + */ + refreshVisibility() { + + let config = this.Reveal.getConfig(); + + let slideNumberDisplay = 'none'; + if( config.slideNumber && !this.Reveal.isPrintingPDF() ) { + if( config.showSlideNumber === 'all' ) { + slideNumberDisplay = 'block'; + } + else if( config.showSlideNumber === 'speaker' && this.Reveal.isSpeakerNotes() ) { + slideNumberDisplay = 'block'; + } + } + + this.element.style.display = slideNumberDisplay; + + } + + /** + * Updates the slide number to match the current slide. + */ + update() { + + // Update slide number if enabled + if( this.Reveal.getConfig().slideNumber && this.element ) { + this.element.innerHTML = this.getSlideNumber(); + } + + } + + /** + * Returns the HTML string corresponding to the current slide + * number, including formatting. + */ + getSlideNumber( slide = this.Reveal.getCurrentSlide() ) { + + let config = this.Reveal.getConfig(); + let value; + let format = 'h.v'; + + if ( typeof config.slideNumber === 'function' ) { + value = config.slideNumber( slide ); + } else { + // Check if a custom number format is available + if( typeof config.slideNumber === 'string' ) { + format = config.slideNumber; + } + + // If there are ONLY vertical slides in this deck, always use + // a flattened slide number + if( !/c/.test( format ) && this.Reveal.getHorizontalSlides().length === 1 ) { + format = 'c'; + } + + value = []; + switch( format ) { + case 'c': + value.push( this.Reveal.getSlidePastCount( slide ) + 1 ); + break; + case 'c/t': + value.push( this.Reveal.getSlidePastCount( slide ) + 1, '/', this.Reveal.getTotalSlides() ); + break; + default: + let indices = this.Reveal.getIndices( slide ); + value.push( indices.h + 1 ); + let sep = format === 'h/v' ? '/' : '.'; + if( this.Reveal.isVerticalSlide( slide ) ) value.push( sep, indices.v + 1 ); + } + } + + let url = '#' + this.Reveal.location.getHash( slide ); + return this.formatNumber( value[0], value[1], value[2], url ); + + } + + /** + * Applies HTML formatting to a slide number before it's + * written to the DOM. + * + * @param {number} a Current slide + * @param {string} delimiter Character to separate slide numbers + * @param {(number|*)} b Total slides + * @param {HTMLElement} [url='#'+locationHash()] The url to link to + * @return {string} HTML string fragment + */ + formatNumber( a, delimiter, b, url = '#' + this.Reveal.location.getHash() ) { + + if( typeof b === 'number' && !isNaN( b ) ) { + return ` + ${a} + ${delimiter} + ${b} + `; + } + else { + return ` + ${a} + `; + } + + } + +} \ No newline at end of file diff --git a/js/reveal.js b/js/reveal.js index e09f9c7..d5b7968 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,8 +1,10 @@ import SlideContent from './controllers/slidecontent.js' +import SlideNumber from './controllers/slidenumber.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 Location from './controllers/location.js' import Plugins from './controllers/plugins.js' import Playback from './components/playback.js' import defaultConfig from './config.js' @@ -18,6 +20,7 @@ import { distanceBetween, deserialize, transformElement, + createSingletonNode, createStyleSheet, closestParent, enterFullscreen, @@ -81,6 +84,9 @@ export default function( revealElement, options ) { // Controls loading and playback of slide content slideContent = new SlideContent( Reveal ), + // Controls the optional slide number display + slideNumber = new SlideNumber( Reveal ), + // Controls auto-animations between slides autoAnimate = new AutoAnimate( Reveal ), @@ -93,6 +99,9 @@ export default function( revealElement, options ) { // Controls all keyboard interactions keyboard = new Keyboard( Reveal ), + // Controls the current location/URL + location = new Location( Reveal ), + // List of asynchronously loaded reveal.js dependencies asyncDependencies = [], @@ -248,7 +257,7 @@ export default function( revealElement, options ) { ` ); // Slide number - dom.slideNumber = createSingletonNode( dom.wrapper, 'div', 'slide-number', '' ); + slideNumber.createElement(); // Element containing notes that are visible to the audience dom.speakerNotes = createSingletonNode( dom.wrapper, 'div', 'speaker-notes', null ); @@ -377,7 +386,7 @@ export default function( revealElement, options ) { // Compute slide numbers now, before we start duplicating slides let doingSlideNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber ); toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { - slide.setAttribute( 'data-slide-number', getSlideNumber( slide ) ); + slide.setAttribute( 'data-slide-number', slideNumber.getSlideNumber( slide ) ); } ); // Slide and slide background layout @@ -534,42 +543,6 @@ export default function( revealElement, options ) { } - /** - * Creates an HTML element and returns a reference to it. - * If the element already exists the existing instance will - * be returned. - * - * @param {HTMLElement} container - * @param {string} tagname - * @param {string} classname - * @param {string} innerHTML - * - * @return {HTMLElement} - */ - function createSingletonNode( container, tagname, classname, innerHTML='' ) { - - // Find all nodes matching the description - let nodes = container.querySelectorAll( '.' + classname ); - - // Check all matches to find one which is a direct child of - // the specified container - for( let i = 0; i < nodes.length; i++ ) { - let testNode = nodes[i]; - if( testNode.parentNode === container ) { - return testNode; - } - } - - // If no node was found, create it now - let node = document.createElement( tagname ); - node.className = classname; - node.innerHTML = innerHTML; - container.appendChild( node ); - - return node; - - } - /** * Creates the slide background elements and appends them * to the background container. One element is created per @@ -831,9 +804,8 @@ export default function( revealElement, options ) { const numberOfSlides = dom.wrapper.querySelectorAll( SLIDES_SELECTOR ).length; - // Remove the previously configured transition class + // The transition is added as a class on the .reveal element dom.wrapper.classList.remove( oldTransition ); - dom.wrapper.classList.add( config.transition ); dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed ); @@ -927,19 +899,6 @@ export default function( revealElement, options ) { fragments.showAll(); } - // Slide numbers - let slideNumberDisplay = 'none'; - if( config.slideNumber && !isPrintingPDF() ) { - if( config.showSlideNumber === 'all' ) { - slideNumberDisplay = 'block'; - } - else if( config.showSlideNumber === 'speaker' && isSpeakerNotes() ) { - slideNumberDisplay = 'block'; - } - } - - dom.slideNumber.style.display = slideNumberDisplay; - // Add the navigation mode to the DOM so we can adjust styling if( config.navigationMode !== 'default' ) { dom.wrapper.setAttribute( 'data-navigation-mode', config.navigationMode ); @@ -948,6 +907,7 @@ export default function( revealElement, options ) { dom.wrapper.removeAttribute( 'data-navigation-mode' ); } + slideNumber.refreshVisibility(); keyboard.refreshSortcuts(); sync(); @@ -1551,44 +1511,6 @@ export default function( revealElement, options ) { } - /** - * Return a hash URL that will resolve to the given slide location. - * - * @param {HTMLElement} [slide=currentSlide] The slide to link to - */ - function locationHash( slide ) { - - let url = '/'; - - // Attempt to create a named link based on the slide's ID - let s = slide || currentSlide; - let id = s ? s.getAttribute( 'id' ) : null; - if( id ) { - id = encodeURIComponent( id ); - } - - let index = getIndices( slide ); - if( !config.fragmentInURL ) { - index.f = undefined; - } - - // If the current slide has an ID, use that as a named link, - // but we don't support named links with a fragment index - if( typeof id === 'string' && id.length && index.f === undefined ) { - url = '/' + id; - } - // Otherwise use the /h/v index - else { - let hashIndexBase = config.hashOneBasedIndex ? 1 : 0; - if( index.h > 0 || index.v > 0 || index.f !== undefined ) url += index.h + hashIndexBase; - if( index.v > 0 || index.f !== undefined ) url += '/' + (index.v + hashIndexBase ); - if( index.f !== undefined ) url += '/' + index.f; - } - - return url; - - } - /** * Checks if the current or specified slide is vertical * (nested within another slide). @@ -1908,9 +1830,9 @@ export default function( revealElement, options ) { updateProgress(); updateBackground(); updateParallax(); - updateSlideNumber(); updateNotes(); + slideNumber.update(); fragments.update(); // Update the URL hash @@ -1970,12 +1892,12 @@ export default function( revealElement, options ) { updateControls(); updateProgress(); - updateSlideNumber(); updateSlidesVisibility(); updateBackground( true ); updateNotesVisibility(); updateNotes(); + slideNumber.update(); slideContent.formatEmbeddedContent(); // Start or stop embedded content depending on global config @@ -2322,90 +2244,6 @@ export default function( revealElement, options ) { } - - /** - * Updates the slide number to match the current slide. - */ - function updateSlideNumber() { - - // Update slide number if enabled - if( config.slideNumber && dom.slideNumber ) { - dom.slideNumber.innerHTML = getSlideNumber(); - } - - } - - /** - * Returns the HTML string corresponding to the current slide number, - * including formatting. - */ - function getSlideNumber( slide = currentSlide ) { - - let value; - let format = 'h.v'; - - if ( typeof config.slideNumber === 'function' ) { - value = config.slideNumber( slide ); - } else { - // Check if a custom number format is available - if( typeof config.slideNumber === 'string' ) { - format = config.slideNumber; - } - - // If there are ONLY vertical slides in this deck, always use - // a flattened slide number - if( !/c/.test( format ) && dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length === 1 ) { - format = 'c'; - } - - value = []; - switch( format ) { - case 'c': - value.push( getSlidePastCount( slide ) + 1 ); - break; - case 'c/t': - value.push( getSlidePastCount( slide ) + 1, '/', getTotalSlides() ); - break; - default: - let indices = getIndices( slide ); - value.push( indices.h + 1 ); - let sep = format === 'h/v' ? '/' : '.'; - if( isVerticalSlide( slide ) ) value.push( sep, indices.v + 1 ); - } - } - - let url = '#' + locationHash( slide ); - return formatSlideNumber( value[0], value[1], value[2], url ); - - } - - /** - * Applies HTML formatting to a slide number before it's - * written to the DOM. - * - * @param {number} a Current slide - * @param {string} delimiter Character to separate slide numbers - * @param {(number|*)} b Total slides - * @param {HTMLElement} [url='#'+locationHash()] The url to link to - * @return {string} HTML string fragment - */ - function formatSlideNumber( a, delimiter, b, url = '#' + locationHash() ) { - - if( typeof b === 'number' && !isNaN( b ) ) { - return ` - ${a} - ${delimiter} - ${b} - `; - } - else { - return ` - ${a} - `; - } - - } - /** * Updates the state of all control/navigation arrows. */ @@ -2881,12 +2719,12 @@ export default function( revealElement, options ) { // If we're configured to push to history OR the history // API is not avaialble. if( config.history || !window.history ) { - window.location.hash = locationHash(); + window.location.hash = location.getHash(); } // If we're configured to reflect the current slide in the // URL without pushing to history. else if( config.hash ) { - window.history.replaceState( null, null, '#' + locationHash() ); + window.history.replaceState( null, null, '#' + location.getHash() ); } // If history and hash are both disabled, a hash may still // be added to the URL by clicking on a href with a hash @@ -3810,12 +3648,14 @@ export default function( revealElement, options ) { isFirstSlide, isLastSlide, isLastVerticalSlide, + isVerticalSlide, // State checks isOverview: overview.isActive.bind( overview ), isPaused, isAutoSliding, isSpeakerNotes, + isPrintingPDF, // Slide preloading loadSlide: slideContent.load.bind( slideContent ), @@ -3916,6 +3756,7 @@ export default function( revealElement, options ) { announceStatus, getStatusText, + location, overview, slideContent, onUserInput, diff --git a/js/utils/util.js b/js/utils/util.js index b96578f..e2118e2 100644 --- a/js/utils/util.js +++ b/js/utils/util.js @@ -135,6 +135,42 @@ export const enterFullscreen = () => { } +/** + * Creates an HTML element and returns a reference to it. + * If the element already exists the existing instance will + * be returned. + * + * @param {HTMLElement} container + * @param {string} tagname + * @param {string} classname + * @param {string} innerHTML + * + * @return {HTMLElement} + */ +export const createSingletonNode = ( container, tagname, classname, innerHTML='' ) => { + + // Find all nodes matching the description + let nodes = container.querySelectorAll( '.' + classname ); + + // Check all matches to find one which is a direct child of + // the specified container + for( let i = 0; i < nodes.length; i++ ) { + let testNode = nodes[i]; + if( testNode.parentNode === container ) { + return testNode; + } + } + + // If no node was found, create it now + let node = document.createElement( tagname ); + node.className = classname; + node.innerHTML = innerHTML; + container.appendChild( node ); + + return node; + +} + /** * Injects the given CSS styles into the DOM. *