"use strict";function_classCallCheck(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}function_defineProperties(t,e){for(vari=0;i<e.length;i++){varn=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function_createClass(t,e,i){returne&&_defineProperties(t.prototype,e),i&&_defineProperties(t,i),t}function_defineProperty(t,e,i){returneint?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}varSimpleLightbox=function(){functionn(t,e){vari=this;_classCallCheck(this,n),_defineProperty(this,"a",{sourceAttr:"href",overlay:!0,spinner:!0,nav:!0,navText:["‹","›"],captions:!0,captionDelay:0,captionSelector:"img",captionType:"attr",captionsData:"title",captionPosition:"bottom",captionClass:"",close:!0,closeText:"×",swipeClose:!0,showCounter:!0,fileExt:"png|jpg|jpeg|gif|webp",animationSlide:!0,animationSpeed:250,preloading:!0,enableKeyboard:!0,loop:!0,rel:!1,docClose:!0,swipeTolerance:50,className:"simple-lightbox",widthRatio:.8,heightRatio:.9,scaleImageToRatio:!1,disableRightClick:!1,disableScroll:!0,alertError:!0,alertErrorMessage:"Image not found, next image will be loaded",additionalHtml:!1,history:!0,throttleInterval:0,doubleTapZoom:2,maxZoom:10,htmlClass:"has-lightbox",rtl:!1}),_defineProperty(this,"b",void0),_defineProperty(this,"c",!1),_defineProperty(this,"d","ontouchstart"inwindow),_defineProperty(this,"e",void0),_defineProperty(this,"f","pushState"inhistory),_defineProperty(this,"g",!1),_defineProperty(this,"h",!1),_defineProperty(this,"i",!1),_defineProperty(this,"j",!1),_defineProperty(this,"k",!1),_defineProperty(this,"l",!1),_defineProperty(this,"m",null),_defineProperty(this,"n",void0),_defineProperty(this,"o","simplelightbox"),_defineProperty(this,"p",{}),_defineProperty(this,"q",[]),_defineProperty(this,"r",0),_defineProperty(this,"s",0),_defineProperty(this,"t",null),_defineProperty(this,"u",0),_defineProperty(this,"v",{a:0,b:0,c:0,d:0,e:0,f:0,g:!1,h:0,i:!1,j:0,k:0,l:0,m:0,n:0,o:0,p:!1,q:0,r:0,s:0,t:0,u:0,v:0,w:1,x:0,y:0,z:0,A:0,B:0,C:0,D:0,E:0,F:0,G:0,H:0,I:0,J:0,K:0,L:0,M:!1,N:0}),this.options=Object.assign(this.a,e),"string"==typeoft?(this.t=t,this.elements=Array.from(document.querySelectorAll(t))):this.elements=void0!==t.length&&0<t.length?Array.from(t):[t],this.relatedElements=[],this.b=this.calculateTransitionPrefix(),this.c=!1!==this.b,this.e=this.hash,this.options.rel&&(this.elements=this.getRelated(this.options.rel)),this.createDomNodes(),this.options.close&&this.p.a.appendChild(this.p.b),this.options.nav&&this.p.a.appendChild(this.p.d),this.options.spinner&&this.p.a.appendChild(this.p.e),this.addEventListener(this.elements,"click."+this.o,function(t){if(i.isValidLink(t.currentTarget)){if(t.preventDefault(),i.h)return!1;i.r=i.elements.indexOf(t.currentTarget),i.openImage(t.currentTarget)}}),this.options.docClose&&this.addEventListener(this.p.f,["click."+this.o,"touchstart."+this.o],function(t){i.g&&i.close()}),this.options.disableRightClick&&this.addEventListener(document.body,"contextmenu."+this.o,function(t){t.target.classList.contains("sl-overlay")&&t.preventDefault()}),this.options.enableKeyboard&&this.addEventListener(document.body,"keyup."+this.o,this.throttle(function(t){if(i.v.a=0,i.h&&"Escape"===t.key)returni.n.setAttribute("src",""),i.h=!1,i.close();i.g&&(t.preventDefault(),"Escape"===t.key&&i.close(),!i.h&&-1<["ArrowLeft","ArrowRight"].indexOf(t.key)&&i.loadImage("ArrowRight"===t.key?1:-1))},this.options.throttleInterval)),this.addEvents()}return_createClass(n,[{key:"createDomNodes",value:function(){this.p.f=document.createElement("div"),this.p.f.classList.add("sl-overlay"),this.p.f.dataset.opacityTarget=".7",this.p.b=document.createElement("button"),this.p.b.classList.add("sl-close"),this.p.b.innerHTML=this.options.closeText,this.p.e=document.createElement("div"),this.p.e.classList.add("sl-spinner"),this.p.e.innerHTML="<div></div>",this.p.d=document.createElement("div"),this.p.d.classList.add("sl-navigation"),this.p.d.