forked from L3viathan/pyconde18-talk-codegolfing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
impress.js
141 lines (120 loc) · 42.8 KB
/
impress.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
(function(n,o){"use strict";var l,d=function(){var z=n.createElement("dummy").style,B="Webkit Moz O ms Khtml".split(" "),P={};return function(H){if("undefined"==typeof P[H]){var M=H.charAt(0).toUpperCase()+H.substr(1),q=(H+" "+B.join(M+" ")+M).split(" ");for(var O in P[H]=null,q)if(void 0!==z[q[O]]){P[H]=q[O];break}}return P[H]}}(),p=function(z,B){var P="xyz",H="";if("string"==typeof z)for(var M in z.split(""))0<=P.indexOf(z[M])&&(H+=z[M],P=P.split(z[M]).join(""));return H?H:void 0===B?"xyz":B},u=function(z,B){var P,H;for(P in B)B.hasOwnProperty(P)&&(H=d(P),null!==H&&(z.style[H]=B[P]));return z},c=function(z){return" translate3d("+z.x+"px,"+z.y+"px,"+z.z+"px) "},g=function(z,B){var P=z.order?z.order:"xyz",H="",M=P.split("");B&&(M=M.reverse());for(var q=0;q<M.length;q++)H+=" rotate"+M[q].toUpperCase()+"("+z[M[q]]+"deg)";return H},v=function(z){return" scale("+z+") "},y=function(z){var B=o.innerHeight/z.height,P=o.innerWidth/z.width,H=B>P?P:B;return z.maxScale&&H>z.maxScale&&(H=z.maxScale),z.minScale&&H<z.minScale&&(H=z.minScale),H},h=n.body,f=null!==d("perspective")&&h.classList&&h.dataset;f||(h.className+=" impress-not-supported ");var E={},L=[],w=[],C={width:1024,height:768,maxScale:1,minScale:0,perspective:1e3,transitionDuration:1e3},S=function(){return!1},I=o.impress=function(z){if(!f)return{init:S,goto:S,prev:S,next:S,swipe:S,tear:S,lib:{}};if(z=z||"impress",E["impress-root-"+z])return E["impress-root-"+z];l=D(z),h.classList.remove("impress-not-supported"),h.classList.add("impress-supported");var B={},P=null,H=null,M=null,q=null,O=null,K=l.util.byId(z),V=n.createElement("div"),W=!1,R=null,U=function(ne){R!==ne&&(l.util.triggerEvent(ne,"impress:stepenter"),R=ne),l.util.triggerEvent(ne,"impress:steprefresh")},F=function(ne,re){R===ne&&(l.util.triggerEvent(ne,"impress:stepleave",{next:re}),R=null)},X=function(ne,re){var ae=ne.dataset,oe={translate:{x:l.util.toNumber(ae.x),y:l.util.toNumber(ae.y),z:l.util.toNumber(ae.z)},rotate:{x:l.util.toNumber(ae.rotateX),y:l.util.toNumber(ae.rotateY),z:l.util.toNumber(ae.rotateZ||ae.rotate),order:p(ae.rotateOrder)},scale:l.util.toNumber(ae.scale,1),transitionDuration:l.util.toNumber(ae.transitionDuration,q.transitionDuration),el:ne};ne.id||(ne.id="step-"+(re+1)),B["impress-"+ne.id]=oe,u(ne,{position:"absolute",transform:"translate(-50%,-50%)"+c(oe.translate)+g(oe.rotate)+v(oe.scale),transformStyle:"preserve-3d"})},_=function(){M=l.util.$$(".step",K),M.forEach(X)},G=function(ne){return"number"==typeof ne?ne=0>ne?M[M.length+ne]:M[ne]:"string"==typeof ne&&(ne=l.util.byId(ne)),ne&&ne.id&&B["impress-"+ne.id]?ne:null},Z=null,J=function(ne,re,ae,oe){if(ae=ae||"goto",oe=oe||null,!W)return!1;if(_(),!(ne=G(ne)))return!1;o.scrollTo(0,0);var le=B["impress-"+ne.id];if(re=void 0===re?le.transitionDuration:re,P&&P!==ne){var de={target:P,detail:{}};if(de.detail.next=ne,de.detail.transitionDuration=re,de.detail.reason=ae,oe&&(de.origEvent=oe),!1===T(de))return!1;ne=de.detail.next,le=B["impress-"+ne.id],re=de.detail.transitionDuration}P&&(P.classList.remove("active"),h.classList.remove("impress-on-"+P.id)),ne.classList.add("active"),h.classList.add("impress-on-"+ne.id);var pe={rotate:{x:-le.rotate.x,y:-le.rotate.y,z:-le.rotate.z,order:le.rotate.order},translate:{x:-le.translate.x,y:-le.translate.y,z:-le.translate.z},scale:1/le.scale},me=pe.scale>=H.scale;re=l.util.toNumber(re,q.transitionDuration);var ue=re/2;ne===P&&(O=y(q));var ce=pe.scale*O;return P&&P!==ne&&F(P,ne),u(K,{perspective:q.perspective/ce+"px",transform:v(ce),transitionDuration:re+"ms",transitionDelay:(me?ue:0)+"ms"}),u(V,{transform:g(pe.rotate,!0)+c(pe.translate),transitionDuration:re+"ms",transitionDelay:(me?0:ue)+"ms"}),(H.scale===pe.scale||H.rotate.x===pe.rotate.x&&H.rotate.y===pe.rotate.y&&H.rotate.z===pe.rotate.z&&H.translate.x===pe.translate.x&&H.translate.y===pe.translate.y&&H.translate.z===pe.translate.z)&&(ue=0),H=pe,P=ne,o.clearTimeout(Z),Z=o.setTimeout(function(){U(P)},re+ue),ne},te=function(ne,re,ae){return ne+(re-ne)*ae};return l.gc.addEventListener(K,"impress:init",function(){M.forEach(function(ne){ne.classList.add("future")}),l.gc.addEventListener(K,"impress:stepenter",function(ne){ne.target.classList.remove("past"),ne.target.classList.remove("future"),ne.target.classList.add("present")},!1),l.gc.addEventListener(K,"impress:stepleave",function(ne){ne.target.classList.remove("present"),ne.target.classList.add("past")},!1)},!1),l.gc.addEventListener(K,"impress:init",function(){var ne="";l.gc.addEventListener(K,"impress:stepenter",function(re){o.location.hash=ne="#/"+re.target.id},!1),l.gc.addEventListener(o,"hashchange",function(){o.location.hash!==ne&&J(l.util.getElementFromHash())},!1),J(l.util.getElementFromHash()||M[0],0)},!1),h.classList.add("impress-disabled"),E["impress-root-"+z]={init:function(){if(!W){A(K);var ne=l.util.$("meta[name='viewport']")||n.createElement("meta");ne.content="width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no",ne.parentNode!==n.head&&(ne.name="viewport",n.head.appendChild(ne));var re=K.dataset;q={width:l.util.toNumber(re.width,C.width),height:l.util.toNumber(re.height,C.height),maxScale:l.util.toNumber(re.maxScale,C.maxScale),minScale:l.util.toNumber(re.minScale,C.minScale),perspective:l.util.toNumber(re.perspective,C.perspective),transitionDuration:l.util.toNumber(re.transitionDuration,C.transitionDuration)},O=y(q),l.util.arrayify(K.childNodes).forEach(function(oe){V.appendChild(oe)}),K.appendChild(V),n.documentElement.style.height="100%",u(h,{height:"100%",overflow:"hidden"});var ae={position:"absolute",transformOrigin:"top left",transition:"all 0s ease-in-out",transformStyle:"preserve-3d"};u(K,ae),u(K,{top:"50%",left:"50%",perspective:q.perspective/O+"px",transform:v(O)}),u(V,ae),h.classList.remove("impress-disabled"),h.classList.add("impress-enabled"),_(),H={translate:{x:0,y:0,z:0},rotate:{x:0,y:0,z:0,order:"xyz"},scale:1},W=!0,l.util.triggerEvent(K,"impress:init",{api:E["impress-root-"+z]})}},goto:J,next:function(ne){var re=M.indexOf(P)+1;return re=re<M.length?M[re]:M[0],J(re,void 0,"next",ne)},prev:function(ne){var re=M.indexOf(P)-1;return re=0<=re?M[re]:M[M.length-1],J(re,void 0,"prev",ne)},swipe:function(ne){if(!(1<Math.abs(ne))){var re={target:P,detail:{}};re.detail.swipe=ne,re.detail.transitionDuration=q.transitionDuration;var ae;if(0>ne)ae=M.indexOf(P)+1,re.detail.next=ae<M.length?M[ae]:M[0],re.detail.reason="next";else if(0<ne)ae=M.indexOf(P)-1,re.detail.next=0<=ae?M[ae]:M[M.length-1],re.detail.reason="prev";else return;if(!1===T(re))return!1;var oe=re.detail.next,le=B["impress-"+oe.id],de=le.scale*O,pe=Math.abs(ne),me={translate:{x:te(H.translate.x,-le.translate.x,pe),y:te(H.translate.y,-le.translate.y,pe),z:te(H.translate.z,-le.translate.z,pe)},rotate:{x:te(H.rotate.x,-le.rotate.x,pe),y:te(H.rotate.y,-le.rotate.y,pe),z:te(H.rotate.z,-le.rotate.z,pe),order:0.7>pe?H.rotate.order:le.rotate.order},scale:te(H.scale,de,pe)};u(K,{perspective:q.perspective/me.scale+"px",transform:v(me.scale),transitionDuration:"0ms",transitionDelay:"0ms"}),u(V,{transform:g(me.rotate,!0)+c(me.translate),transitionDuration:"0ms",transitionDelay:"0ms"})}},tear:function(){l.gc.teardown(),delete E["impress-root-"+z]},lib:l}};I.supported=f;var N={};I.addLibraryFactory=function(z){for(var B in z)z.hasOwnProperty(B)&&(N[B]=z[B])};var D=function(z){var B={};for(var P in N)if(N.hasOwnProperty(P)){if(B[P]!==void 0)throw"impress.js ERROR: Two libraries both tried to use libname: "+P;B[P]=N[P](z)}return B};I.addPreInitPlugin=function(z,B){if(B=parseInt(B)||10,0>=B)throw"addPreInitPlugin: weight must be a positive integer";void 0===L[B]&&(L[B]=[]),L[B].push(z)};var A=function(z){for(var P,B=0;B<L.length;B++)if(P=L[B],void 0!==P)for(var H=0;H<P.length;H++)P[H](z)};I.addPreStepLeavePlugin=function(z,B){if(B=parseInt(B)||10,0>=B)throw"addPreStepLeavePlugin: weight must be a positive integer";void 0===w[B]&&(w[B]=[]),w[B].push(z)};var T=function(z){for(var P,B=0;B<w.length;B++)if(P=w[B],void 0!==P)for(var H=0;H<P.length;H++)if(!1===P[H](z))return!1}})(document,window),function(n,o){"use strict";var l=[],d=0,p={roots:[]};o.impress.addLibraryFactory({gc:function(v){if(l[v])return l[v];var y=[],h=[],f=[];c(v);var E=function(D){y.push(D)},w=function(D,A,T){h.push({target:D,type:A,listener:T})},S=function(D){f.push(D)};S(function(D){g(D)});var N={pushElement:E,appendChild:function(D,A){D.appendChild(A),E(A)},pushEventListener:w,addEventListener:function(D,A,T){D.addEventListener(A,T),w(D,A,T)},pushCallback:S,teardown:function(){var D;for(D=f.length-1;0<=D;D--)f[D](v);for(f=[],D=0;D<y.length;D++)y[D].parentElement.removeChild(y[D]);for(y=[],D=0;D<h.length;D++){var A=h[D].target,T=h[D].type,z=h[D].listener;A.removeEventListener(T,z)}}};return l[v]=N,d++,N}});var c=function(v){p.roots[v]={},p.roots[v].steps=[];for(var f,y=n.getElementById(v).querySelectorAll(".step"),h=0;h<y.length;h++)f=y[h],p.roots[v].steps.push({el:f,id:f.getAttribute("id")});if(0===d){p.body={},p.body.impressNotSupported=!!n.body.classList.contains("impress-not-supported");var E=n.head.querySelectorAll("meta");for(h=0;h<E.length;h++){var L=E[h];"viewport"===L.name&&(p.meta=L.content)}}},g=function(v){n.body.classList.remove("impress-enabled"),n.body.classList.remove("impress-disabled");var y=n.getElementById(v),h=y.querySelector(".active").id;n.body.classList.remove("impress-on-"+h),n.documentElement.style.height="",n.body.style.height="",n.body.style.overflow="";for(var f=y.querySelectorAll(".step"),E=0;E<f.length;E++)f[E].classList.remove("future"),f[E].classList.remove("past"),f[E].classList.remove("present"),f[E].classList.remove("active"),f[E].style.position="",f[E].style.transform="",f[E].style["transform-style"]="";y.style.position="",y.style["transform-origin"]="",y.style.transition="",y.style["transform-style"]="",y.style.top="",y.style.left="",y.style.transform="",f=p.roots[v].steps;for(var L;L=f.pop();)null===L.id?L.el.removeAttribute("id"):L.el.setAttribute("id",L.id);delete p.roots[v];var w=y.firstChild,C=w.innerHTML;if(y.innerHTML=C,void 0!==l[v]&&(delete l[v],d--),0===d){n.body.classList.remove("impress-supported"),p.body.impressNotSupported&&n.body.classList.add("impress-not-supported");var S=n.head.querySelectorAll("meta");for(E=0;E<S.length;E++){var I=S[E];"viewport"===I.name&&(void 0===p.meta?I.parentElement.removeChild(I):I.content=p.meta)}}}}(document,window),function(n,o){"use strict";var l=[];o.impress.addLibraryFactory({util:function(p){if(l[p])return l[p];var g=function(w){return[].slice.call(w)},v=function(w){return n.getElementById(w)},L={$:function(w,C){return C=C||n,C.querySelector(w)},$$:function(w,C){return C=C||n,g(C.querySelectorAll(w))},arrayify:g,byId:v,getElementFromHash:function(){return v(o.location.hash.replace(/^#\/?/,""))},throttle:function(w,C){var S=null;return function(){var I=this,N=arguments;o.clearTimeout(S),S=o.setTimeout(function(){w.apply(I,N)},C)}},toNumber:function(w,C){return isNaN(w)?C||0:+w},triggerEvent:function(w,C,S){var I=n.createEvent("CustomEvent");I.initCustomEvent(C,!0,!0,S),w.dispatchEvent(I)}};return l[p]=L,L}})}(document,window),function(n){"use strict";var o=0,l=0,d=null,p=null,u=null,c;n.addEventListener("impress:init",function(I){c=I.detail.api.lib.util,d=I.detail.api,u=I.target;var N=u.dataset;N.autoplay&&(o=c.toNumber(N.autoplay,0));var D=n.querySelector("#impress-toolbar");D&&S(D),d.lib.gc.pushCallback(function(){clearTimeout(p)})},!1);var g=function(I){var N=I.target;l=c.toNumber(N.dataset.autoplay,o),"paused"===y?v(0):v(l)};n.addEventListener("impress:stepenter",function(I){g(I)},!1),n.addEventListener("impress:substep:stepleaveaborted",function(I){g(I)},!1);var v=function(I){p&&clearTimeout(p),0<I&&(p=setTimeout(function(){d.next()},1e3*I)),C()},y="not clicked",h=null,f=function(I,N,D){var A=n.createEvent("CustomEvent");A.initCustomEvent(N,!0,!0,D),I.dispatchEvent(A)},E=function(I){var N=n.createElement("div");return N.innerHTML=I,N.firstChild},L=function(){y=0<l&&"paused"!==y?"paused":"playing"},w=function(){return 0<l&&"paused"!=y?"||":"▶"},C=function(){if(h){var I=h.offsetWidth,N=h.offsetHeight;h.innerHTML=w(),h.style.width||(h.style.width=I+"px"),h.style.height||(h.style.height=N+"px")}},S=function(I){var N="<button id=\"impress-autoplay-playpause\" title=\"Autoplay\" class=\"impress-autoplay\">"+w()+"</button>";h=E(N),h.addEventListener("click",function(){L(),"playing"==y?(0===o&&(o=7),0===l&&(l=o),v(l)):"paused"==y&&v(0)}),f(I,"impress:toolbar:appendChild",{group:10,element:h})}}(document),function(n){"use strict";var o=null,l=!1,d=function(g,v){var y,h;for(y in v)v.hasOwnProperty(y)&&(h=p(y),null!==h&&(g.style[h]=v[y]));return g},p=function(){var g=n.createElement("dummy").style,v="Webkit Moz O ms Khtml".split(" "),y={};return function(h){if("undefined"==typeof y[h]){var f=h.charAt(0).toUpperCase()+h.substr(1),E=(h+" "+v.join(f+" ")+f).split(" ");for(var L in y[h]=null,E)if(void 0!==g[E[L]]){y[h]=E[L];break}}return y[h]}}(),u=function(){l&&(d(o,{display:"block"}),l=!1)},c=function(){l?u():(d(o,{display:(l=!l)?"none":"block"}),l=!0)};n.addEventListener("impress:init",function(g){var v=g.detail.api,y=g.target;o=y.firstElementChild;var h=v.lib.gc;h.addEventListener(n,"keydown",function(f){66===f.keyCode&&(f.preventDefault(),l?u():c())},!1),h.addEventListener(n,"keyup",function(f){66===f.keyCode&&f.preventDefault()},!1)},!1),n.addEventListener("impress:stepleave",function(){u()},!1)}(document),function(n,o){"use strict";impress.addPreInitPlugin(function(){if(o.markdown)for(var d=n.querySelectorAll(".markdown"),p=0;p<d.length;p++){var u=d[p],c=u.textContent.split(/^-----$/m),g=c.length-1;u.innerHTML=markdown.toHTML(c[g]);var v=null;for(u.id&&(v=u.id,u.id=""),g--;0<=g;){var y=u.cloneNode(!1);y.innerHTML=markdown.toHTML(c[g]),u.parentNode.insertBefore(y,u),u=y,g--}null!=v&&(u.id=v)}o.hljs&&hljs.initHighlightingOnLoad(),o.mermaid&&mermaid.initialize({startOnLoad:!0})},1)}(document,window),function(n){"use strict";var o,l;n.addEventListener("impress:init",function(d){o=d.target,l=d.detail.api;var p=l.lib.gc,u=["input[type=text]","textarea","select","[contenteditable=true]"];for(var c of u){var g=n.querySelectorAll(c);if(g)for(var y,v=0;v<g.length;v++)y=g[v],p.addEventListener(y,"keydown",function(h){h.stopPropagation()}),p.addEventListener(y,"keyup",function(h){h.stopPropagation()})}},!1),n.addEventListener("impress:stepleave",function(){n.activeElement.blur()},!1)}(document),function(n,o){"use strict";var l;n.addEventListener("impress:init",function(u){l=u.detail.api.lib},!1);var d=function(u){return!isNaN(u)};impress.addPreStepLeavePlugin(function(u){if(u&&u.target){var c=u.target.dataset,g=n.querySelectorAll(".step");if(void 0!==c.gotoKeyList&&void 0!==c.gotoNextList&&void 0!==u.origEvent&&void 0!==u.origEvent.key){var v=c.gotoKeyList.split(" "),y=c.gotoNextList.split(" ");if(v.length!==y.length)o.console.log("impress goto plugin: data-goto-key-list and data-goto-next-list don't match:"),o.console.log(v),o.console.log(y);else{var h=v.indexOf(u.origEvent.key);if(0<=h){var f=y[h];if(d(f))return u.detail.next=g[f],void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));var E=n.getElementById(f);if(E&&E.classList.contains("step"))return u.detail.next=E,void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));o.console.log("impress goto plugin: "+f+" is not a step in this impress presentation.")}}}if(d(c.gotoNext)&&"next"===u.detail.reason)return u.detail.next=g[c.gotoNext],void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));if(c.gotoNext&&"next"===u.detail.reason){var E=n.getElementById(c.gotoNext);if(E&&E.classList.contains("step"))return u.detail.next=E,void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));o.console.log("impress goto plugin: "+c.gotoNext+" is not a step in this impress presentation.")}if(d(c.gotoPrev)&&"prev"===u.detail.reason)return u.detail.next=g[c.gotoPrev],void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));if(c.gotoPrev&&"prev"===u.detail.reason){var E=n.getElementById(c.gotoPrev);if(E&&E.classList.contains("step"))return u.detail.next=E,void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));o.console.log("impress goto plugin: "+c.gotoPrev+" is not a step in this impress presentation.")}if(d(c.goto))return u.detail.next=g[c.goto],void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));if(c.goto){var E=n.getElementById(c.goto);if(E&&E.classList.contains("step"))return u.detail.next=E,void(u.detail.transitionDuration=l.util.toNumber(u.detail.next.dataset.transitionDuration,u.detail.transitionDuration));o.console.log("impress goto plugin: "+c.goto+" is not a step in this impress presentation.")}}})}(document,window),function(n,o){"use strict";var l=[],d,p=function(g,v,y){var h=n.createEvent("CustomEvent");h.initCustomEvent(v,!0,!0,y),g.dispatchEvent(h)},u=function(){var g=n.getElementById("impress-help");if(g){var v=[];for(var y in l)for(var h in y)v.push(l[y][h]);g.innerHTML="<table>\n"+v.join("\n")+"</table>\n"}},c=function(){var g=n.getElementById("impress-help");g&&("block"===g.style.display?g.style.display="none":(g.style.display="block",o.clearTimeout(d)))};n.addEventListener("keyup",function(g){72===g.keyCode&&(g.preventDefault(),c())},!1),n.addEventListener("impress:help:add",function(g){var v=g.detail.row;"object"==typeof l[v]&&l[v].isArray||(l[v]=[]),l[g.detail.row].push("<tr><td><strong>"+g.detail.command+"</strong></td><td>"+g.detail.text+"</td></tr>"),u()}),n.addEventListener("impress:init",function(g){u();var v=n.getElementById("impress-help");if(v){v.style.display="block",d=o.setTimeout(function(){var h=n.getElementById("impress-help");h.style.display="none"},7e3);var y=g.detail.api;y.lib.gc.pushCallback(function(){o.clearTimeout(d),v.style.display="",v.innerHTML="",l=[]})}p(n,"impress:help:add",{command:"H",text:"Show this help",row:0})})}(document,window),function(n,o){"use strict";var l=function(S,I,N){var D=n.createEvent("CustomEvent");D.initCustomEvent(I,!0,!0,N),S.dispatchEvent(D)},d;switch(navigator.language){case"de":d={noNotes:"<div class=\"noNotes\">Keine Notizen hierzu</div>",restart:"Neustart",clickToOpen:"Klicken um Sprecherkonsole zu \xF6ffnen",prev:"zur\xFCck",next:"weiter",loading:"initalisiere",ready:"Bereit",moving:"in Bewegung",useAMPM:!1};break;case"en":default:d={noNotes:"<div class=\"noNotes\">No notes for this step</div>",restart:"Restart",clickToOpen:"Click to open speaker console",prev:"Prev",next:"Next",loading:"Loading",ready:"Ready",moving:"Moving",useAMPM:!1};}const p=0.7,u=0.5,c=4;var y,f,E={},L=function(S){return(10>S?"0":"")+S},w=o.impressConsole=function(S){if(S=S||"impress",E[S])return E[S];var I=n.getElementById(S),N=null,D=function(){for(var X="",_=n.querySelector(".active");!_.nextElementSibling&&_.parentNode;)_=_.parentNode;for(_=_.nextElementSibling;_;){if(X=_.attributes["class"],X&&-1!==X.value.indexOf("step"))return N.document.getElementById("blocker").innerHTML=d.next,_;if(_.firstElementChild)_=_.firstElementChild;else{for(;!_.nextElementSibling&&_.parentNode;)_=_.parentNode;_=_.nextElementSibling}}return N.document.getElementById("blocker").innerHTML=d.restart,n.querySelector(".step")},A=function(){if(N){var X=n.querySelector(".active").querySelector(".notes");X=X?X.innerHTML:d.noNotes,N.document.getElementById("notes").innerHTML=X;var _=n.URL.substring(0,n.URL.search("#/")),Y=_+"#"+n.querySelector(".active").id,G=_+"#"+D().id,Z=N.document.getElementById("slideView");Z.src!==Y&&(Z.src=Y);var J=N.document.getElementById("preView");J.src!==G&&(J.src=G),N.document.getElementById("status").innerHTML="<span class=\"moving\">"+d.moving+"</span>"}},T=function(){if(N){var X=n.querySelector(".active").querySelector(".notes");X=X?X.innerHTML:d.noNotes;var _=N.document.getElementById("notes");_.innerHTML=X,_.scrollTop=0;var Y=n.URL.substring(0,n.URL.search("#/")),G=Y+"#"+n.querySelector(".active").id,Z=Y+"#"+D().id,J=N.document.getElementById("slideView");J.src!==G&&(J.src=G);var Q=N.document.getElementById("preView");Q.src!==Z&&(Q.src=Z),N.document.getElementById("status").innerHTML="<span class=\"ready\">"+d.ready+"</span>"}},z=function(X){N&&("next"===X.detail.reason&&B(),"prev"===X.detail.reason&&P())},B=function(){var X=N.document.getElementById("slideView");H(X,"impress:substep:show")},P=function(){var X=N.document.getElementById("slideView");H(X,"impress:substep:hide")},H=function(X,_,Y){var G=X.contentDocument.createEvent("CustomEvent");G.initCustomEvent(_,!0,!0,Y),X.contentDocument.dispatchEvent(G)},M=function(){var X=N.document.getElementById("notes");20<X.scrollTopMax-X.scrollTop?X.scrollTop+=0.8*X.clientHeight:o.impress().next()},q=function(){N.timerStart=new Date},K=function(X,_,Y){void 0===Y&&(Y=N),Y.document.addEventListener("keydown",function(G){G.ctrlKey||G.altKey||G.shiftKey||G.metaKey||-1===X.indexOf(G.keyCode)||G.preventDefault()},!1),Y.document.addEventListener("keyup",function(G){G.ctrlKey||G.altKey||G.shiftKey||G.metaKey||-1===X.indexOf(G.keyCode)||(_(),G.preventDefault())},!1)},V=function(){var X=N.document.getElementById("slideView"),_=N.document.getElementById("preView");X.contentDocument.body.classList.add("impress-console"),_.contentDocument.body.classList.add("impress-console"),void 0!==f&&(X.contentDocument.head.insertAdjacentHTML("beforeend","<link rel=\"stylesheet\" type=\"text/css\" href=\""+f+"\">"),_.contentDocument.head.insertAdjacentHTML("beforeend","<link rel=\"stylesheet\" type=\"text/css\" href=\""+f+"\">")),X.addEventListener("load",function(){X.contentDocument.body.classList.add("impress-console"),void 0!==f&&X.contentDocument.head.insertAdjacentHTML("beforeend","<link rel=\"stylesheet\" type=\"text/css\" href=\""+f+"\">")}),_.addEventListener("load",function(){_.contentDocument.body.classList.add("impress-console"),void 0!==f&&_.contentDocument.head.insertAdjacentHTML("beforeend","<link rel=\"stylesheet\" type=\"text/css\" href=\""+f+"\">")})},W=function(){if(!top.isconsoleWindow)if(N&&!N.closed)N.focus();else{if(N=o.open("","impressConsole"),null==N){var X=n.createElement("div");X.id="impress-console-button",X.style.position="fixed",X.style.left=0,X.style.top=0,X.style.right=0,X.style.bottom=0,X.style.backgroundColor="rgba(255, 255, 255, 0.9)";var _="var x = document.getElementById('impress-console-button');x.parentNode.removeChild(x);var r = document.getElementById('"+S+"');impress('"+S+"').lib.util.triggerEvent(r, 'impress:console:open', {})";return X.innerHTML="<button style=\""+"margin: 25vh 25vw;width:50vw;height:50vh;"+"\" onclick=\""+_+"\">"+d.clickToOpen+"</button>",void n.body.appendChild(X)}var G="";return void 0!==y&&(G="<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\""+y+"\">"),N.document.open(),N.document.write("<!DOCTYPE html><html id=\"impressconsole\"><head>{{cssStyle}}{{cssLink}}</head><body><div id=\"console\"><div id=\"views\"><iframe id=\"slideView\" scrolling=\"no\"></iframe><iframe id=\"preView\" scrolling=\"no\"></iframe><div id=\"blocker\"></div></div><div id=\"notes\"></div></div><div id=\"controls\"> <div id=\"prev\"><a href=\"#\" onclick=\"impress().prev(); return false;\" />{{prev}}</a></div><div id=\"next\"><a href=\"#\" onclick=\"impress().next(); return false;\" />{{next}}</a></div><div id=\"clock\">--:--</div><div id=\"timer\" onclick=\"timerReset()\">00m 00s</div><div id=\"status\">{{loading}}</div></div></body></html>".replace("{{cssStyle}}",C()).replace("{{cssLink}}",G).replace(/{{.*?}}/gi,function(Z){return d[Z.substring(2,Z.length-2)]})),N.document.title="Speaker Console ("+n.title+")",N.impress=o.impress,N.isconsoleWindow=!0,N.onload=V,N.timerStart=new Date,N.timerReset=q,N.clockInterval=setInterval(E[S].clockTick,1e3),K([33,37,38],o.impress().prev),K([34,39,40],o.impress().next),K([32],M),K([82],q),N.onbeforeunload=function(){clearInterval(N.clockInterval)},T(),N.initialized=!1,N.document.close(),o.onresize=R,N.onresize=R,N}},R=function(){var X=N.document.getElementById("slideView"),_=N.document.getElementById("preView"),Y=o.innerHeight/o.innerWidth,G=N.document.getElementById("views"),Z=X.offsetWidth-X.clientWidth,J=G.clientWidth-Z,Q=Math.floor(J*Y),ee=Q+c,te=Math.floor(J*p),ie=Math.floor(Q*p);G.clientHeight-Z<ee+ie&&(ie=G.clientHeight-Z-ee,te=Math.floor(ie/Y)),te<=Math.floor(J*u)&&(J=G.clientWidth-Z,Q=Math.floor((G.clientHeight-Z-c)/(1+u)),ee=Q+c,te=Math.floor(J*u),ie=G.clientHeight-Z-ee),X.style.width=J+"px",X.style.height=Q+"px",_.style.top=ee+"px",_.style.width=te+"px",_.style.height=ie+"px"},U=function(X,_){void 0===X?void 0!==I.dataset.consoleCss&&(y=I.dataset.consoleCss):y=X,void 0===_?void 0!==I.dataset.consoleCssIframe&&(f=I.dataset.consoleCssIframe):f=_,I.addEventListener("impress:stepleave",A),I.addEventListener("impress:stepenter",T),I.addEventListener("impress:substep:stepleaveaborted",z),I.addEventListener("impress:substep:show",B),I.addEventListener("impress:substep:hide",P),o.onunload=function(){N&&!N.closed&&N.close()},K([80],W,o),"true"===I.dataset.consoleAutolaunch&&W()};return I.addEventListener("impress:console:open",function(){W()}),I.addEventListener("impress:console:registerKeyEvent",function(X){K(X.detail.keyCodes,X.detail.handler,X.detail.window)}),E[S]={init:function(X,_){(void 0===X||X==="css/impressConsole.css")&&(void 0===_||_==="css/iframe.css")&&o.console.log("impressConsole().init() is deprecated. impressConsole is now initialized automatically when you call impress().init()."),U(X,_)},open:W,clockTick:function(){var X=new Date,_=X.getHours(),Y=X.getMinutes(),G=X.getSeconds(),Z="";d.useAMPM&&(Z=12>_?"AM":"PM",_=12<_?_-12:_,_=0===_?12:_);var J=L(_)+":"+L(Y)+":"+L(G)+" "+Z;N.document.getElementById("clock").firstChild.nodeValue=J,G=Math.floor((X-N.timerStart)/1e3),Y=Math.floor(G/60),G=Math.floor(G%60),N.document.getElementById("timer").firstChild.nodeValue=L(Y)+"m "+L(G)+"s",N.initialized||(N.document.getElementById("slideView").contentWindow.scrollTo(0,0),N.document.getElementById("preView").contentWindow.scrollTo(0,0),N.initialized=!0)},registerKeyEvent:K,_init:U},E[S]};n.addEventListener("impress:init",function(S){w(S.target.id)._init(),l(n,"impress:help:add",{command:"P",text:"Presenter console",row:10})});var C=function(){return`<style>
#impressconsole body {
background-color: rgb(255, 255, 255);
padding: 0;
margin: 0;
font-family: verdana, arial, sans-serif;
font-size: 2vw;
}
#impressconsole div#console {
position: absolute;
top: 0.5vw;
left: 0.5vw;
right: 0.5vw;
bottom: 3vw;
margin: 0;
}
#impressconsole div#views, #impressconsole div#notes {
position: absolute;
top: 0;
bottom: 0;
}
#impressconsole div#views {
left: 0;
right: 50vw;
overflow: hidden;
}
#impressconsole div#blocker {
position: absolute;
right: 0;
bottom: 0;
}
#impressconsole div#notes {
left: 50vw;
right: 0;
overflow-x: hidden;
overflow-y: auto;
padding: 0.3ex;
background-color: rgb(255, 255, 255);
border: solid 1px rgb(120, 120, 120);
}
#impressconsole div#notes .noNotes {
color: rgb(200, 200, 200);
}
#impressconsole div#notes p {
margin-top: 0;
}
#impressconsole iframe {
position: absolute;
margin: 0;
padding: 0;
left: 0;
border: solid 1px rgb(120, 120, 120);
}
#impressconsole iframe#slideView {
top: 0;
width: 49vw;
height: 49vh;
}
#impressconsole iframe#preView {
opacity: 0.7;
top: 50vh;
width: 30vw;
height: 30vh;
}
#impressconsole div#controls {
margin: 0;
position: absolute;
bottom: 0.25vw;
left: 0.5vw;
right: 0.5vw;
height: 2.5vw;
background-color: rgb(255, 255, 255);
background-color: rgba(255, 255, 255, 0.6);
}
#impressconsole div#prev, div#next {
}
#impressconsole div#prev a, #impressconsole div#next a {
display: block;
border: solid 1px rgb(70, 70, 70);
border-radius: 0.5vw;
font-size: 1.5vw;
padding: 0.25vw;
text-decoration: none;
background-color: rgb(220, 220, 220);
color: rgb(0, 0, 0);
}
#impressconsole div#prev a:hover, #impressconsole div#next a:hover {
background-color: rgb(245, 245, 245);
}
#impressconsole div#prev {
float: left;
}
#impressconsole div#next {
float: right;
}
#impressconsole div#status {
margin-left: 2em;
margin-right: 2em;
text-align: center;
float: right;
}
#impressconsole div#clock {
margin-left: 2em;
margin-right: 2em;
text-align: center;
float: left;
}
#impressconsole div#timer {
margin-left: 2em;
margin-right: 2em;
text-align: center;
float: left;
}
#impressconsole span.moving {
color: rgb(255, 0, 0);
}
#impressconsole span.ready {
color: rgb(0, 128, 0);
}
</style>`}}(document,window),function(n,o){"use strict";var l,d,p,u;u=[];var c,g,v,y,h,f,E,L,w,C,S;n.addEventListener("impress:init",function(I){l=I.target,d=I.detail.api,p=d.lib.gc,g(),p.pushCallback(S)},!1),S=function(){var I,N;for(v(),N=0;N<u.length;N+=1)I=u[N],I.node.removeAttribute(I.attr);u=[]},C=function(I,N){var D,A,T,z;for(D="data-media-"+I,T=0;T<N.length;T+=1)if(z=N[T],z.hasAttribute(D))return A=z.getAttribute(D),""===A||"true"===A},E=function(I){var N=I.target.nodeName.toLowerCase();n.body.classList.add("impress-media-"+N+"-playing"),n.body.classList.remove("impress-media-"+N+"-paused")},L=function(I){var N=I.target.nodeName.toLowerCase();n.body.classList.add("impress-media-"+N+"-paused"),n.body.classList.remove("impress-media-"+N+"-playing")},w=function(I){var N=I.target.nodeName.toLowerCase();n.body.classList.remove("impress-media-"+N+"-playing"),n.body.classList.remove("impress-media-"+N+"-paused")},v=function(){var I,N;for(I in N=["video","audio"],N)n.body.classList.remove("impress-media-"+N[I]+"-playing"),n.body.classList.remove("impress-media-"+N[I]+"-paused")},c=function(){var I,N,D,A,T;for(D=l.querySelectorAll("audio, video"),I=0;I<D.length;I+=1)T=D[I].nodeName.toLowerCase(),A=D[I],N=A.getAttribute("id"),(void 0==N||null===N)&&(A.setAttribute("id","media-"+T+"-"+I),u.push({node:A,attr:"id"})),p.addEventListener(A,"play",E),p.addEventListener(A,"playing",E),p.addEventListener(A,"pause",L),p.addEventListener(A,"ended",w)},g=function(){var I,N,D;for(c(),I=n.getElementsByClassName("step"),D=0;D<I.length;D+=1)N=I[D],p.addEventListener(N,"impress:stepenter",h),p.addEventListener(N,"impress:stepleave",f)},y=function(){return{preview:null!==o.frameElement&&"preView"===o.frameElement.id,slideView:null!==o.frameElement&&"slideView"===o.frameElement.id}},h=function(I){var N,D,A,T,z,B;if(I&&I.target)for(N=I.target,v(),D=N.querySelectorAll("audio, video"),T=0;T<D.length;T+=1)A=D[T],z=y(),B=C("autoplay",[A,N,l]),B&&!z.preview&&(z.slideView&&(A.muted=!0),A.play())},f=function(I){var N,D,A,T,z,B,P;if(I&&I.target){for(N=I.target,D=I.target.querySelectorAll("audio, video"),A=0;A<D.length;A+=1)T=D[A],z=C("autoplay",[T,N,l]),B=C("autopause",[T,N,l]),P=C("autostop",[T,N,l]),void 0==P&&void 0==B&&(P=z),(B||P)&&(T.pause(),P&&(T.currentTime=0));v()}}}(document,window),function(n){"use strict";var o=function(d){for(var p=n.querySelectorAll(".step"),u=0;u<p.length;u++)if(p[u]===d)return u+1<p.length?p[u+1]:p[0]},l=function(d){for(var p=n.querySelectorAll(".step"),u=p.length-1;0<=u;u--)if(p[u]===d)return 0<=u-1?p[u-1]:p[p.length-1]};n.addEventListener("impress:init",function(d){var p=n.body;/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&p.classList.add("impress-mobile");var u=d.detail.api;u.lib.gc.pushCallback(function(){n.body.classList.remove("impress-mobile");var c=n.getElementsByClassName("prev")[0],g=n.getElementsByClassName("next")[0];"undefined"!=typeof c&&c.classList.remove("prev"),"undefined"!=typeof g&&g.classList.remove("next")})}),n.addEventListener("impress:stepenter",function(d){var p=n.getElementsByClassName("prev")[0],u=n.getElementsByClassName("next")[0],c=l(d.target);c.classList.add("prev");var g=o(d.target);g.classList.add("next"),"undefined"!=typeof p&&p.classList.remove("prev"),"undefined"!=typeof u&&u.classList.remove("next")})}(document),function(n,o){"use strict";var d,p=function(){n.body.classList.add("impress-mouse-timeout")},u=function(){d&&o.clearTimeout(d),n.body.classList.remove("impress-mouse-timeout"),d=o.setTimeout(p,1e3*3)};n.addEventListener("impress:init",function(c){var g=c.detail.api,v=g.lib.gc;v.addEventListener(n,"mousemove",u),v.addEventListener(n,"click",u),v.addEventListener(n,"touch",u),u(),v.pushCallback(function(){o.clearTimeout(d),n.body.classList.remove("impress-mouse-timeout")})},!1)}(document,window),function(n){"use strict";n.addEventListener("impress:init",function(o){var l=o.detail.api,d=l.lib.gc,p=l.lib.util,u=function(c){return c.altKey||c.ctrlKey||c.metaKey?!1:!(9!==c.keyCode)||!c.shiftKey&&(32<=c.keyCode&&34>=c.keyCode||37<=c.keyCode&&40>=c.keyCode||void 0)};d.addEventListener(n,"keydown",function(c){u(c)&&c.preventDefault()},!1),d.addEventListener(n,"keyup",function(c){if(u(c)){if(c.shiftKey)switch(c.keyCode){case 9:l.prev();}else switch(c.keyCode){case 33:case 37:case 38:l.prev(c);break;case 9:case 32:case 34:case 39:case 40:l.next(c);}c.preventDefault()}},!1),d.addEventListener(n,"click",function(c){var g=c.target;try{for(;"A"!==g.tagName&&g!==n.documentElement;)g=g.parentNode;if("A"===g.tagName){var v=g.getAttribute("href");v&&"#"===v[0]&&(g=n.getElementById(v.slice(1)))}l.goto(g)&&(c.stopImmediatePropagation(),c.preventDefault())}catch(y){if(y instanceof TypeError&&"target is null"===y.message)return;throw y}},!1),d.addEventListener(n,"click",function(c){var g=c.target;try{for(;(!g.classList.contains("step")||g.classList.contains("active"))&&g!==n.documentElement;)g=g.parentNode;l.goto(g)&&c.preventDefault()}catch(v){if(v instanceof TypeError&&"target is null"===v.message)return;throw v}},!1),p.triggerEvent(n,"impress:help:add",{command:"Left & Right",text:"Previous & Next step",row:1})},!1)}(document),function(n){"use strict";var o,l,d,p,u=[],c,g,v,y=function(L,w,C){var S=n.createEvent("CustomEvent");S.initCustomEvent(w,!0,!0,C),L.dispatchEvent(S)},h=function(L){var w=n.createElement("div");return w.innerHTML=L,w.firstChild},f=function(){for(var L="",w=0;w<p.length;w++)0>u.indexOf(p[w])&&(L=L+"<option value=\""+p[w].id+"\">"+p[w].id+"</option>\n");return L},E=function(L){l=L.detail.api;var w=l.lib.gc;d=L.target,p=d.querySelectorAll(".step");var S="<select id=\"impress-navigation-ui-select\" title=\"Go to\" class=\"impress-navigation-ui\">\n"+f()+"</select>";c=h("<button id=\"impress-navigation-ui-prev\" title=\"Previous\" class=\"impress-navigation-ui\"><</button>"),c.addEventListener("click",function(){l.prev()}),g=h(S),g.addEventListener("change",function(N){l.goto(N.target.value)}),w.addEventListener(d,"impress:steprefresh",function(N){p=d.querySelectorAll(".step"),g.innerHTML="\n"+f(),g.value=N.target.id}),v=h("<button id=\"impress-navigation-ui-next\" title=\"Next\" class=\"impress-navigation-ui\">></button>"),v.addEventListener("click",function(){l.next()}),y(o,"impress:toolbar:appendChild",{group:0,element:c}),y(o,"impress:toolbar:appendChild",{group:0,element:g}),y(o,"impress:toolbar:appendChild",{group:0,element:v})};n.addEventListener("impress:navigation-ui:hideStep",function(L){u.push(L.target),g&&(g.innerHTML=f())},!1),n.addEventListener("impress:init",function(L){o=n.querySelector("#impress-toolbar"),o&&E(L)},!1)}(document),function(n){"use strict";function o(g){var v=d.indexOf(g);if(null!==u){var y=100/(d.length-1)*v;u.style.width=y.toFixed(2)+"%"}null!==c&&(c.innerHTML=v+"/"+(d.length-1))}var l,d=[],p=function(){d=[];for(var g=l.querySelectorAll(".step"),v=0;v<g.length;v++)d[v+1]=g[v].id};n.addEventListener("impress:init",function(g){l=g.target,p();var v=g.detail.api.lib.gc;v.pushCallback(function(){d=[],u&&(u.style.width=""),c&&(c.innerHTML="")})});var u=n.querySelector("div.impress-progressbar div"),c=n.querySelector("div.impress-progress");(null!==u||null!==c)&&(n.addEventListener("impress:stepleave",function(g){o(g.detail.next.id)}),n.addEventListener("impress:steprefresh",function(g){p(),o(g.target.id)}))}(document),function(n,o){"use strict";var l={},d=function(g,v){return isNaN(g)?v||0:+g},p=function(g,v){if("string"!=typeof g)return d(g,v);var y=g.match(/^([+-]*[\d\.]+)([wh])$/);if(null==y)return d(g,v);var h=parseFloat(y[1]),f="w"===y[2]?o.innerWidth:o.innerHeight;return h*f},u=function(g,v){var y=g.dataset;if(v||(v={x:0,y:0,z:0,relative:{x:0,y:0,z:0}}),y.relTo){var h=n.getElementById(y.relTo);h?g.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_PRECEDING?(v.x=d(h.getAttribute("data-x")),v.y=d(h.getAttribute("data-y")),v.z=d(h.getAttribute("data-z")),v.relative={}):o.console.error("impress.js rel plugin: Step \""+y.relTo+"\" is not defined *before* the current step. Referencing is limited to previously defined steps. Please check your markup. Ignoring data-rel-to attribute of this step. Have a look at the documentation for how to create relative positioning to later shown steps with the help of the goto plugin."):o.console.warn("impress.js rel plugin: \""+y.relTo+"\" is not a valid step in this impress.js presentation. Please check your markup. Ignoring data-rel-to attribute of this step.")}var f={x:d(y.x,v.x),y:d(y.y,v.y),z:d(y.z,v.z),relative:{x:p(y.relX,v.relative.x),y:p(y.relY,v.relative.y),z:p(y.relZ,v.relative.z)}};return void 0!==y.x&&(f.relative.x=0),void 0!==y.y&&(f.relative.y=0),void 0!==y.z&&(f.relative.z=0),f.x+=f.relative.x,f.y+=f.relative.y,f.z+=f.relative.z,f};o.impress.addPreInitPlugin(function(g){var v=g.querySelectorAll(".step"),y;l[g.id]=[];for(var f,h=0;h<v.length;h++){f=v[h],l[g.id].push({el:f,x:f.getAttribute("data-x"),y:f.getAttribute("data-y"),z:f.getAttribute("data-z")});var E=u(f,y);f.setAttribute("data-x",E.x),f.setAttribute("data-y",E.y),f.setAttribute("data-z",E.z),y=E}}),n.addEventListener("impress:init",function(g){var v=g.target;g.detail.api.lib.gc.pushCallback(function(){for(var h,y=l[v.id];h=y.pop();)null===h.x?h.el.removeAttribute("data-x"):h.el.setAttribute("data-x",h.x),null===h.y?h.el.removeAttribute("data-y"):h.el.setAttribute("data-y",h.y),null===h.z?h.el.removeAttribute("data-z"):h.el.setAttribute("data-z",h.z);delete l[v.id]})},!1)}(document,window),function(n,o){"use strict";n.addEventListener("impress:init",function(l){var d=l.detail.api;d.lib.gc.addEventListener(o,"resize",d.lib.util.throttle(function(){d.goto(n.querySelector(".step.active"),500)},250),!1)},!1)}(document,window),function(n,o){"use strict";var l;n.addEventListener("impress:init",function(c){l=c.detail.api.lib.util},!1);var d=function(c){for(var g=n.querySelectorAll(".step"),v=0;v<g.length;v++)if(g[v]===c)return v+1<g.length?g[v+1]:g[0]},p=function(c){for(var g=n.querySelectorAll(".step"),v=g.length-1;0<=v;v--)if(g[v]===c)return 0<=v-1?g[v-1]:g[g.length-1]},u=function(c){c&&c.target&&(!c.detail.next.classList.contains("skip")||("next"===c.detail.reason?(c.detail.next=d(c.detail.next),u(c)):"prev"===c.detail.reason&&(c.detail.next=p(c.detail.next),u(c)),c.detail.transitionDuration=l.toNumber(c.detail.next.dataset.transitionDuration,c.detail.transitionDuration)))};o.impress.addPreStepLeavePlugin(u,1)}(document,window),function(n,o){"use strict";o.impress.addPreStepLeavePlugin(function(d){return d&&d.target?d.target.classList.contains("stop")&&"next"===d.detail.reason?!1:void 0:void 0},2)}(document,window),function(n,o){"use strict";var l=function(y,h,f){var E=n.createEvent("CustomEvent");E.initCustomEvent(h,!0,!0,f),y.dispatchEvent(E)},d=null;n.addEventListener("impress:stepenter",function(y){d=y.target},!1);var u=function(y){var h=y.querySelectorAll(".substep"),f=y.querySelectorAll(".substep-visible");if(0<h.length)return c(h,f)},c=function(y,h){if(h.length<y.length){var f=y[h.length];return f.classList.add("substep-visible"),f}},g=function(y){var h=y.querySelectorAll(".substep"),f=y.querySelectorAll(".substep-visible");if(0<h.length)return v(f)},v=function(y){if(0<y.length){var h=y[y.length-1];return h.classList.remove("substep-visible"),h}};o.impress.addPreStepLeavePlugin(function(y){if(y&&y.target){var f,h=y.target;return"next"===y.detail.reason&&(f=u(h),f)?(l(h,"impress:substep:stepleaveaborted",{reason:"next",substep:f}),!1):"prev"===y.detail.reason&&(f=g(h),f)?(l(h,"impress:substep:stepleaveaborted",{reason:"prev",substep:f}),!1):void 0}},1),n.addEventListener("impress:stepenter",function(y){for(var h=y.target,f=h.querySelectorAll(".substep-visible"),E=0;E<f.length;E++)f[E].classList.remove("substep-visible")},!1),n.addEventListener("impress:substep:show",function(){u(d)},!1),n.addEventListener("impress:substep:hide",function(){g(d)},!1)}(document,window),function(n,o){"use strict";var l=0,d=0,p=0,u=o.innerWidth/20;n.addEventListener("touchstart",function(c){d=l=c.touches[0].clientX}),n.addEventListener("touchmove",function(c){var g=c.touches[0].clientX,v=g-l;p=d-g,d=g,o.impress().swipe(v/o.innerWidth)}),n.addEventListener("touchend",function(){var c=d-l;Math.abs(c)>o.innerWidth/5&&0>=c*p?c>o.innerWidth/5&&0>=p?o.impress().prev():c<-o.innerWidth/5&&0<=p&&o.impress().next():Math.abs(p)>u?p<-u?o.impress().prev():p>u&&o.impress().next():o.impress().goto(n.querySelector("#impress .step.active"))}),n.addEventListener("touchcancel",function(){o.impress().goto(n.querySelector("#impress .step.active"))})}(document,window),function(n){"use strict";var o=n.getElementById("impress-toolbar"),l=[],d=function(u){if(!l[u]){l[u]=n.createElement("span"),l[u].id="impress-toolbar-group-"+u;var g=p(u);g===void 0?o.appendChild(l[u]):o.insertBefore(l[u],l[g])}return l[u]},p=function(u){for(var c=u+1;!l[c]&&c<l.length;)c++;if(c<l.length)return c};o&&(o.addEventListener("impress:toolbar:appendChild",function(u){var c=d(u.detail.group);c.appendChild(u.detail.element)}),o.addEventListener("impress:toolbar:insertBefore",function(u){o.insertBefore(u.detail.element,u.detail.before)}),o.addEventListener("impress:toolbar:removeWidget",function(u){o.removeChild(u.detail.remove)}),n.addEventListener("impress:init",function(u){var c=u.detail.api;c.lib.gc.pushCallback(function(){o.innerHTML="",l=[]})}))}(document);