/** * Spotlight.js v0.5.9 (Bundle) * Copyright 2019 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 * https://github.com/nextapps-de/spotlight */ (function(){'use strict';var aa={};function ba(a){for(var b=a.classList,c={},d=0;d=c){var w=O[0].cloneNode(!1);k(w,"left",100*p+"%");O[0].parentNode.appendChild(w)}w=void 0;W[p]=new Fa(v&&(v.href||v.src)||u.src||u.href,v&&v.title||u.title||(w=(u||document).getElementsByTagName("img")).length&&w[0].alt||d||"",v&&v.description||u.description||f||"")}I=b||1;l(M,"transform","translateX(-"+100*(I-1)+"%)");Ha()}} function Ia(a,b,c,d){if(d||a[c])K[c]=b&&b[c]||d} function Ja(a,b){K={};b&&Ka(b);Ka(a);Ia(a,b,"description");Ia(a,b,"title");Ia(a,b,"prefetch",!0);Ia(a,b,"preloader",!0);L=K.infinite;L="undefined"!==typeof L&&"false"!==L;sa="false"!==K.progress;ta=1*K.player||7E3;if((a=K.zoom)||""===a)K["zoom-in"]=K["zoom-out"]=a,delete K.zoom;if((a=K.control)||""===a){a="string"===typeof a?a.split(","):a;for(b=0;b
'; k(Q,"transition","none");document.body.appendChild(Q);M=m("scene",Q)[0];ua=m("footer",Q)[0];va=m("title",ua)[0];wa=m("description",ua)[0];xa=m("arrow-left",Q)[0];ya=m("arrow-right",Q)[0];R=m("fullscreen",Q)[0];za=m("page",Q)[0];Aa=m("player",Q)[0];Ba=m("progress",Q)[0];Ca=m("preloader",Q)[0];V=document.documentElement||document.body;document.cancelFullScreen||(document.cancelFullScreen=document.exitFullscreen||document.webkitCancelFullScreen||document.webkitExitFullscreen||document.mozCancelFullScreen|| function(){});V.requestFullScreen||(V.requestFullScreen=V.webkitRequestFullScreen||V.msRequestFullScreen||V.mozRequestFullScreen||k(R,"display","none")||function(){});var a=m("drag",Q)[0];Ea=[[window,"keydown",Oa],[window,"wheel",Pa],[window,"hashchange",Qa],[window,"resize",Ra],[a,"mousedown",Sa],[a,"mouseleave",Ta],[a,"mouseup",Ta],[a,"mousemove",Ua],[a,"touchstart",Sa,{passive:!1}],[a,"touchcancel",Ta],[a,"touchend",Ta],[a,"touchmove",Ua,{passive:!0}],[R,"",Va],[xa,"",Wa],[ya,"",X],[Aa,"",Xa], [m("autofit",Q)[0],"",Ya],[m("zoom-in",Q)[0],"",Za],[m("zoom-out",Q)[0],"",$a],[m("close",Q)[0],"",ab],[m("theme",Q)[0],"",La]]},{once:!0});function Ra(){x=Q.clientWidth;y=Q.clientHeight;P&&(z=P.width,A=P.height,bb())}function bb(){k(P,"transform","translate(-50%, -50%) scale("+B+")")}function cb(a){for(var b=0;b.5*(0>a?1:a?-1:0)?$a():Za())} function Qa(){N&&"#spotlight"===location.hash&&ab(!0)}function Xa(a){("boolean"===typeof a?a:!S)?S||(S=setInterval(X,ta),e(Aa,"on"),sa&&fb()):S&&(S=clearInterval(S),h(Aa,"on"),sa&&l(Ba,"transform",""));return S}function Y(){T?clearTimeout(T):e(Q,"menu");var a=K.autohide;T="false"!==a?setTimeout(function(){h(Q,"menu");T=null},1*a||3E3):1}function gb(a){"boolean"===typeof a&&(T=a?T:0);T?(T=clearTimeout(T),h(Q,"menu")):Y();return n(a)} function Sa(a){C=!0;D=!1;var b=hb(a);E=z*B<=x;pa=b.x;qa=b.y;return n(a,!0)}function Ta(a){if(C&&!D)return C=!1,gb(a);E&&D&&(l(M,"transform","translateX("+-(100*(I-1)-r/x*100)+"%)"),r<-(y/10)&&X()||r>y/10&&Wa()||k(M,"transform","translateX(-"+100*(I-1)+"%)"),r=0,E=!1,k(N,"transform",""));C=!1;return n(a)} function Ua(a){if(C){Da||(Da=requestAnimationFrame(ib));var b=hb(a),c=(z*B-x)/2;D=!0;r-=pa-(pa=b.x);E?F=!0:r>c?r=c:0y&&(c=(A*B-y)/2,t-=qa-(qa=b.y),t>c?t=c:0=b&&jb(B=b);a||Y()}function jb(a){B=a||1;bb()}function $a(a){var b=.65*B;1<=b&&(jb(B=b),t=r=0,F=!0,ib());a||Y()} function eb(){location.hash="spotlight";location.hash="show";k(Q,"transition","");e(V,"hide-scrollbars");e(Q,"show");cb(!0);Ra();Y()}function ab(a){cb(!1);history.go(!0===a?-1:-2);h(V,"hide-scrollbars");h(Q,"show");S&&Xa(!1);P.parentNode.removeChild(P);N=P=W=null}function Wa(){if(1I;I=a;Ha(b);return!0}} function fb(){l(Ba,{transitionDuration:"",transform:""});k(Ba,{transitionDuration:ta+"ms",transform:"translateX(0)"})}function La(a){"boolean"===typeof a?H=a:(H=!H,Y());H?e(Q,ra):h(Q,ra)} function Ha(a){t=r=0;B=1;var b=K.animation,c=!0,d=!0,f=!0;if(b||""===b){c=d=f=!1;b="string"===typeof b?b.split(","):b;for(var p=0;p