1(function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof module&&module.exports?module.exports=e():t.Tobi=e()})(this,function(){"use strict";var t=function(t){var e={},n=window,i=null,o=[],a=0,r=0,d=null,l=null,s=[],u=null,c=null,p=null,b=null,f=0,m={},h=!1,g=!1,v=!1,y=null,A=null,_=null,w=null,E=null,L=!1,C=!1,S=[],x=[],T=0,k=0,q=function(t){var e={selector:".lightbox",captions:!0,captionsSelector:"img",captionAttribute:"alt",nav:"auto",navText:['<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24"><polyline points="14 18 8 12 14 6 14 6"></polyline></svg>','<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24"><polyline points="10 6 16 12 10 18 10 18"></polyline></svg>'],navLabel:["Previous","Next"],close:!0,closeText:'<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24"><path d="M6.34314575 6.34314575L17.6568542 17.6568542M6.34314575 17.6568542L17.6568542 6.34314575"></path></svg>',closeLabel:"Close",loadingIndicatorLabel:"Image loading",counter:!0,download:!1,downloadText:"",downloadLabel:"Download",keyboard:!0,zoom:!0,zoomText:'<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><polyline points="21 16 21 21 16 21"/><polyline points="8 21 3 21 3 16"/><polyline points="16 3 21 3 21 8"/><polyline points="3 8 3 3 8 3"/></svg>',docClose:!0,swipeClose:!0,hideScrollbar:!0,draggable:!0,threshold:100,rtl:!1,loop:!1,autoplayVideo:!1,theme:"dark"};return t&&Object.keys(t).forEach(function(n){e[n]=t[n]}),e},P=function(){return"string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform"},N={image:{checkSupport:function(t){return!t.hasAttribute("data-type")&&t.href.match(/\.(png|jpe?g|tiff|tif|gif|bmp|webp|svg|ico)$/)},init:function(t,n){var i=document.createElement("figure"),o=document.createElement("figcaption"),r=document.createElement("img"),d=t.querySelector("img"),l=document.createElement("div");r.style.opacity="0",d&&(r.alt=d.alt||""),r.setAttribute("src",""),r.setAttribute("data-src",t.href),i.appendChild(r),e.captions&&(o.style.opacity="0","self"===e.captionsSelector&&t.getAttribute(e.captionAttribute)?o.textContent=t.getAttribute(e.captionAttribute):"img"===e.captionsSelector&&d&&d.getAttribute(e.captionAttribute)&&(o.textContent=d.getAttribute(e.captionAttribute)),o.textContent&&(o.id="tobi-figcaption-"+a,i.appendChild(o),r.setAttribute("aria-labelledby",o.id),++a)),n.appendChild(i),l.className="tobi-loader",l.setAttribute("role","progressbar"),l.setAttribute("aria-label",e.loadingIndicatorLabel),n.appendChild(l),n.setAttribute("data-type","image")},onPreload:function(t){N.image.onLoad(t)},onLoad:function(t){var e=t.querySelector("img");if(e.hasAttribute("data-src")){var n=t.querySelector("figcaption"),i=t.querySelector(".tobi-loader");e.onload=function(){t.removeChild(i),e.style.opacity="1",n&&(n.style.opacity="1")},e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src")}},onLeave:function(t){},onCleanup:function(t){}},html:{checkSupport:function(t){return lt(t,"html")},init:function(t,e){var n=t.hasAttribute("href")?t.getAttribute("href"):t.getAttribute("data-target"),i=document.querySelector(n);if(!i)throw new Error("Ups, I can't find the target "+n+".");e.appendChild(i),e.setAttribute("data-type","html")},onPreload:function(t){},onLoad:function(t){var n=t.querySelector("video");n&&(n.hasAttribute("data-time")&&n.readyState>0&&(n.currentTime=n.getAttribute("data-time")),e.autoplayVideo&&n.play())},onLeave:function(t){var e=t.querySelector("video");e&&(e.paused||e.pause(),e.readyState>0&&e.setAttribute("data-time",e.currentTime))},onCleanup:function(t){var e=t.querySelector("video");if(e&&e.readyState>0&&e.readyState<3&&e.duration!==e.currentTime){var n=e.cloneNode(!0);st(e),e.load(),e.parentNode.removeChild(e),t.appendChild(n)}}},iframe:{checkSupport:function(t){return lt(t,"iframe")},init:function(t,e){var n=document.createElement("iframe"),i=t.hasAttribute("href")?t.getAttribute("href"):t.getAttribute("data-target");n.setAttribute("frameborder","0"),n.setAttribute("src",""),n.setAttribute("data-src",
1i),e.appendChild(n),e.setAttribute("data-type","iframe")},onPreload:function(t){},onLoad:function(t){var e=t.querySelector("iframe");e.setAttribute("src",e.getAttribute("data-src"))},onLeave:function(t){},onCleanup:function(t){}},youtube:{checkSupport:function(t){return lt(t,"youtube")},init:function(t,e){var n=document.createElement("div");e.appendChild(n),x[T]=new window.YT.Player(n,{host:"https://www.youtube-nocookie.com",height:t.getAttribute("data-height")||"360",width:t.getAttribute("data-width")||"640",videoId:t.getAttribute("data-id"),playerVars:{controls:t.getAttribute("data-controls")||1,rel:0,playsinline:1}}),e.setAttribute("data-player",T),e.setAttribute("data-type","youtube"),T++},onPreload:function(t){},onLoad:function(t){e.autoplayVideo&&x[t.getAttribute("data-player")].playVideo()},onLeave:function(t){1===x[t.getAttribute("data-player")].getPlayerState()&&x[t.getAttribute("data-player")].pauseVideo()},onCleanup:function(t){1===x[t.getAttribute("data-player")].getPlayerState()&&x[t.getAttribute("data-player")].pauseVideo()}}},X=function(t){e=q(t),i=P(),d||I();var n=document.querySelectorAll(e.selector);if(!n)throw new Error("Ups, I can't find the selector "+e.selector+".");Array.prototype.forEach.call(n,function(t){Y(t)})},Y=function(t){if(null===document.querySelector('[data-type="youtube"]')||C)M(t);else{if(null===document.getElementById("iframe_api")){var e=document.createElement("script"),n=document.getElementsByTagName("script")[0];e.id="iframe_api",e.src="https://www.youtube.com/iframe_api",n.parentNode.insertBefore(e,n)}S.indexOf(t)===-1&&S.push(t),window.onYouTubePlayerAPIReady=function(){Array.prototype.forEach.call(S,function(t){M(t)}),C=!0}}},M=function(t,n){if(o.indexOf(t)!==-1)throw new Error("Ups, element already added to the lightbox.");if(o.push(t),r++,e.zoom&&t.querySelector("img")){var i=document.createElement("div");i.className="tobi-zoom__icon",i.innerHTML=e.zoomText,t.classList.add("tobi-zoom"),t.appendChild(i)}t.addEventListener("click",function(t){t.preventDefault(),O(o.indexOf(this))}),D(t),bt()&&(ut(),ct()),n&&n.call(this)},I=function(){d=document.createElement("div"),d.setAttribute("role","dialog"),d.setAttribute("aria-hidden","true"),d.className="tobi tobi--theme-"+e.theme,l=document.createElement("div"),l.className="tobi__slider",d.appendChild(l),u=document.createElement("button"),u.className="tobi__prev",u.setAttribute("type","button"),u.setAttribute("aria-label",e.navLabel[0]),u.innerHTML=e.navText[0],d.appendChild(u),c=document.createElement("button"),c.className="tobi__next",c.setAttribute("type","button"),c.setAttribute("aria-label",e.navLabel[1]),c.innerHTML=e.navText[1],d.appendChild(c),p=document.createElement("button"),p.className="tobi__close",p.setAttribute("type","button"),p.setAttribute("aria-label",e.closeLabel),p.innerHTML=e.closeText,d.appendChild(p),b=document.createElement("div"),b.className="tobi__counter",d.appendChild(b),n.addEventListener("resize",function(){L||(L=!0,n.requestAnimationFrame(function(){W(),L=!1}))}),document.body.appendChild(d)},D=function(t){for(var e in N)if(N.hasOwnProperty(e)&&N[e].checkSupport(t)){var n=document.createElement("div"),i=document.createElement("div");n.className="tobi__slider__slide",n.style.position="absolute",n.style.left=100*k+"%",i.className="tobi__slider__slide__content",N[e].init(t,i),n.appendChild(i),l.appendChild(n),s.push(n),++k;break}},O=function(t,n){if(bt()||t||(t=0),bt()){if(!t)throw new Error("Ups, Tobi is aleady open.");if(t===f)throw new Error("Ups, slide "+t+" is already selected.")}if(t===-1||t>=r)throw new Error("Ups, I can't find slide "+t+".");e.hideScrollbar&&(document.documentElement.classList.add("tobi-is-open"),document.body.classList.add("tobi-is-open")),ut(),e.close||(p.disabled=!1,p.setAttribute("aria-hidden","true")),y=document.activeElement,f=t,$(),rt(),V(f),d.setAttribute("aria-hidden","false"),ct(),U(f+1),U(f-1),n&&n.call(this)},z=function(t){if(!bt())throw new Error("Tobi is already closed.");e.hideScrollbar&&(document.documentElement.classList.remove("tobi-is-open"),document.body.classList.remove("tobi-is-open")),dt(),y.focus();var n=s[f].querySelector(".tobi__slider__slide__content"),i=n.getAttribute("data-type");N[i].onLeave(n),N[i].onCleanup(n),d.setAttribute("aria-hidden","true"),f=0,t&&t.call(this)},U=function(t){if(void 0!==s[t]){var e=s[t].querySelector(".tobi__slider__slide__content"),n=e.getAttribute("data-type");N[n].onPreload(e)}},V=function(t){if(void 0!==s[t]){var e=s[t].querySelector(".tobi__slider__slide__content"),n=e.getAttribute("data-type");N[n].onLoad(e)}},B=function(t){f>0&&(j(f),V(--f),ct("left"),R(f+1),U(f-1),t&&t.call(this))},H=function(t){f<r-1&&(j(f),V(++f),ct("right"),R(f-1),U(f+1),t&&t.call(this))},j=function(t){if(void 0!==s[t]){var e=s[t].querySelector(".tobi__slider__slide__content"),n=e.getAttribute("data-type");N[n].onLeave(e)}},R=function(t){if(void 0!==s[t]){var e=s[t].querySelector(".tobi__slider__slide__content"),n=e.getAttribute("data-type");N[n].onCleanup(e)}},W=function(){w=-f*window.innerWidth,l.style[i]="translate3d("+w+"px, 0, 0)",E=w},F=function(){b.textContent=f+1+"/"+r},K=function(t){var n=null;e.nav?(u.disabled=!1,c.disabled=!1,1===r?(u.disabled=!0,c.disabled=!0,e.close&&p.focus()):0===f?u.disabled=!0:f===r-1&&(c.disabled=!0),t||c.disabled?t||!c.disabled||u.disabled?c.disabled||"right"!==t?c.disabled&&"right"===t&&!u.disabled?u.focus():u.disabled||"left"!==t?u.disabled&&"left"===t&&!c.disabled&&c.focus():u.focus():c.focus():u.focus():c.focus()):e.close&&p.focus(),n=d.querySelectorAll("button:not(:disabled)"),A=n[0],_=1===n.length?n[0]:n[n.length-1]},$=function(){m={startX:0,endX:0,startY:0,endY:0}},G=function(){var t=m.endX-m.startX,n=m.endY-m.startY,i=Math.abs(t),o=Math.abs(n);t>0&&i>e.threshold&&f>0?B():t<0&&i>e.threshold&&f!==r-1?H():n<0&&o>e.threshold&&e.swipeClose?z():W()},J=function(t){t.target===u?B():t.target===c?H():(t.target===p||"tobi__slider__slide"===t.target.className&&e.docClose)&&z(),t.stopPropagation()},Q=function(t){9===t.keyCode?t.shiftKey?document.activeElement===A&&(_.focus(),t.preventDefault()):document.activeElement===_&&(A.focu
1s(),t.preventDefault()):27===t.keyCode?(t.preventDefault(),z()):37===t.keyCode?(t.preventDefault(),B()):39===t.keyCode&&(t.preventDefault(),H())},Z=function(t){mt(t.target)||(t.stopPropagation(),v=!0,m.startX=t.touches[0].pageX,m.startY=t.touches[0].pageY,l.classList.add("tobi__slider--is-dragging"))},tt=function(t){t.stopPropagation(),v&&(t.preventDefault(),m.endX=t.touches[0].pageX,m.endY=t.touches[0].pageY,at())},et=function(t){t.stopPropagation(),v=!1,l.classList.remove("tobi__slider--is-dragging"),m.endX&&(h=!1,g=!1,G()),$()},nt=function(t){mt(t.target)||(t.preventDefault(),t.stopPropagation(),v=!0,m.startX=t.pageX,m.startY=t.pageY,l.classList.add("tobi__slider--is-dragging"))},it=function(t){t.preventDefault(),v&&(m.endX=t.pageX,m.endY=t.pageY,at())},ot=function(t){t.stopPropagation(),v=!1,l.classList.remove("tobi__slider--is-dragging"),m.endX&&(h=!1,g=!1,G()),$()},at=function(){Math.abs(m.startX-m.endX)>0&&!g&&e.swipeClose?(l.style[i]="translate3d("+(E-Math.round(m.startX-m.endX))+"px, 0, 0)",h=!0,g=!1):Math.abs(m.startY-m.endY)>0&&!h&&(l.style[i]="translate3d("+(E+"px, -"+Math.round(m.startY-m.endY))+"px, 0)",h=!1,g=!0)},rt=function(){e.keyboard&&document.addEventListener("keydown",Q),d.addEventListener("click",J),e.draggable&&(ft()&&(d.addEventListener("touchstart",Z),d.addEventListener("touchmove",tt),d.addEventListener("touchend",et)),d.addEventListener("mousedown",nt),d.addEventListener("mouseup",ot),d.addEventListener("mousemove",it))},dt=function(){e.keyboard&&document.removeEventListener("keydown",Q),d.removeEventListener("click",J),e.draggable&&(ft()&&(d.removeEventListener("touchstart",Z),d.removeEventListener("touchmove",tt),d.removeEventListener("touchend",et)),d.removeEventListener("mousedown",nt),d.removeEventListener("mouseup",ot),d.removeEventListener("mousemove",it))},lt=function(t,e){return t.getAttribute("data-type")===e},st=function(t){var e=t.querySelectorAll("src");e&&Array.prototype.forEach.call(e,function(t){t.setAttribute("src","")})},ut=function(){e.draggable&&r>1&&!l.classList.contains("tobi__slider--is-draggable")&&l.classList.add("tobi__slider--is-draggable"),!e.nav||1===r||"auto"===e.nav&&ft()?(u.setAttribute("aria-hidden","true"),c.setAttribute("aria-hidden","true")):(u.setAttribute("aria-hidden","false"),c.setAttribute("aria-hidden","false")),e.counter&&1!==r?b.setAttribute("aria-hidden","false"):b.setAttribute("aria-hidden","true")},ct=function(t){W(),F(),K(t)},pt=function(t){if(l)for(;l.firstChild;)l.removeChild(l.firstChild);o.length=s.length=r=a=k=0,t&&t.call(this)},bt=function(){return"false"===d.getAttribute("aria-hidden")},ft=function(){return"ontouchstart"in window},mt=function(t){return["TEXTAREA","OPTION","INPUT","SELECT"].indexOf(t.nodeName)!==-1||t===u||t===c||t===p||1===r},ht=function(){return f};return X(t),{open:O,prev:B,next:H,close:z,add:Y,reset:pt,isOpen:bt,currentSlide:ht}};return t});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.