Socket
Socket
Sign inDemoInstall

lightgallery

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightgallery - npm Package Compare versions

Comparing version 2.1.7 to 2.1.8

4

lightgallery.min.js
/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lightGallery=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r=(s.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},s.prototype._getSelector=function(t,e){return void 0===e&&(e=document),"string"!=typeof t?t:(e=e||document,"#"===t.substring(0,1)?e.querySelector(t):e.querySelectorAll(t))},s.prototype._each=function(t){return this.selector&&(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0)),this},s.prototype._setCssVendorPrefix=function(t,e,i){e=e.replace(/-([a-z])/gi,function(t,e){return e.toUpperCase()});-1!==this.cssVenderPrefixes.indexOf(e)?(t.style[e.charAt(0).toLowerCase()+e.slice(1)]=i,t.style["webkit"+e]=i,t.style["moz"+e]=i,t.style["ms"+e]=i,t.style["o"+e]=i):t.style[e]=i},s.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},s.prototype.isEventMatched=function(t,e){var i=e.split(".");return t.split(".").filter(function(t){return t}).every(function(t){return-1!==i.indexOf(t)})},s.prototype.attr=function(e,i){return void 0===i?this.firstElement?this.firstElement.getAttribute(e):"":(this._each(function(t){t.setAttribute(e,i)}),this)},s.prototype.find=function(t){return C(this._getSelector(t,this.selector))},s.prototype.first=function(){return this.selector&&void 0!==this.selector.length?C(this.selector[0]):C(this.selector)},s.prototype.eq=function(t){return C(this.selector[t])},s.prototype.parent=function(){return C(this.selector.parentElement)},s.prototype.get=function(){return this._getFirstEl()},s.prototype.removeAttr=function(t){var i=t.split(" ");return this._each(function(e){i.forEach(function(t){return e.removeAttribute(t)})}),this},s.prototype.wrap=function(t){if(!this.firstElement)return this;var e=document.createElement("div");return e.className=t,this.firstElement.parentNode.insertBefore(e,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),e.appendChild(this.firstElement),this},s.prototype.addClass=function(t){return void 0===t&&(t=""),this._each(function(e){t.split(" ").forEach(function(t){e.classList.add(t)})}),this},s.prototype.removeClass=function(t){return this._each(function(e){t.split(" ").forEach(function(t){e.classList.remove(t)})}),this},s.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},s.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},s.prototype.toggleClass=function(t){return this.firstElement&&(this.hasClass(t)?this.removeClass(t):this.addClass(t)),this},s.prototype.css=function(e,i){var s=this;return this._each(function(t){s._setCssVendorPrefix(t,e,i)}),this},s.prototype.on=function(t,e){var i=this;return this.selector&&t.split(" ").forEach(function(t){Array.isArray(s.eventListeners[t])||(s.eventListeners[t]=[]),s.eventListeners[t].push(e),i.selector.addEventListener(t.split(".")[0],e)}),this},s.prototype.once=function(t,e){var i=this;return this.on(t,function(){i.off(t),e(t)}),this},s.prototype.off=function(t){var i=this;return this.selector&&Object.keys(s.eventListeners).forEach(function(e){i.isEventMatched(t,e)&&(s.eventListeners[e].forEach(function(t){i.selector.removeEventListener(e.split(".")[0],t)}),s.eventListeners[e]=[])}),this},s.prototype.trigger=function(t,e){if(!this.firstElement)return this;e=new CustomEvent(t.split(".")[0],{detail:e||null});return this.firstElement.dispatchEvent(e),this},s.prototype.load=function(t){var e=this;return fetch(t).then(function(t){e.selector.innerHTML=t}),this},s.prototype.html=function(e){return void 0===e?this.firstElement?this.firstElement.innerHTML:"":(this._each(function(t){t.innerHTML=e}),this)},s.prototype.append=function(e){return this._each(function(t){"string"==typeof e?t.insertAdjacentHTML("beforeend",e):t.appendChild(e)}),this},s.prototype.prepend=function(e){return this._each(function(t){t.insertAdjacentHTML("afterbegin",e)}),this},s.prototype.remove=function(){return this._each(function(t){t.parentNode.removeChild(t)}),this},s.prototype.empty=function(){return this._each(function(t){t.innerHTML=""}),this},s.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},s.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},s.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),e=C("body").style().marginLeft;return{left:t.left-parseFloat(e)+this.scrollLeft(),top:t.top+this.scrollTop()}},s.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},s.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},s.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},s.eventListeners={},s);function s(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}function C(t){return new r(t)}var i=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];var I=function(t,e,i,s){void 0===i&&(i=0);var n=C(t).attr("data-lg-size")||s;if(n){var o=n.split(",");if(o[1])for(var r=window.innerWidth,l=0;l<o.length;l++){var a=o[l];if(r<parseInt(a.split("-")[2],10)){n=a;break}l===o.length-1&&(n=a)}var g=n.split("-"),t=parseInt(g[0],10),s=parseInt(g[1],10),g=e.width(),i=e.height()-i,g=Math.min(g,t),i=Math.min(i,s),i=Math.min(g/t,i/s);return{width:t*i,height:s*i}}},l=function(t,e,i,s,n){if(n){var o=C(t).find("img").first();if(o.get()){var r=e.get().getBoundingClientRect(),l=r.width,a=e.height()-(i+s),t=o.width(),e=o.height(),s=o.style(),r=(l-t)/2-o.offset().left+(parseFloat(s.paddingLeft)||0)+(parseFloat(s.borderLeft)||0)+C(window).scrollLeft()+r.left,i=(a-e)/2-o.offset().top+(parseFloat(s.paddingTop)||0)+(parseFloat(s.borderTop)||0)+C(window).scrollTop()+i;return"translate3d("+(r*=-1)+"px, "+(i*=-1)+"px, 0) scale3d("+t/n.width+", "+e/n.height+", 1)"}}},x=function(t,e,i,s){return'<div class="lg-video-cont lg-has-iframe" style="width:'+e+"; height: "+i+'">\n <iframe class="lg-object" frameborder="0" '+(s?'title="'+s+'"':"")+' src="'+t+'" allowfullscreen="true"></iframe>\n </div>'},w=function(t,e,i,s,n,o){t="<img "+i+" "+(s?'srcset="'+s+'"':"")+" "+(n?'sizes="'+n+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+e+'" />',e="";return o&&(e=("string"==typeof o?JSON.parse(o):o).map(function(e){var i="";return Object.keys(e).forEach(function(t){i+=" "+t+'="'+e[t]+'"'}),"<source "+i+"></source>"})),e+t},S=function(t){for(var e=[],i=[],s="",n=0;n<t.length;n++){var o=t[n].split(" ");""===o[0]&&o.splice(0,1),i.push(o[0]),e.push(o[1])}for(var r=window.innerWidth,l=0;l<e.length;l++)if(parseInt(e[l],10)>r){s=i[l];break}return s},T=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},E=function(t,e,i,s){return'<div class="lg-video-cont '+(s&&s.youtube?"lg-has-youtube":s&&s.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+i+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(e||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},n=function(t,e,g,h){var d=[],c=function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;for(var s=Array(t),n=0,e=0;e<i;e++)for(var o=arguments[e],r=0,l=o.length;r<l;r++,n++)s[n]=o[r];return s}(i,e);return[].forEach.call(t,function(t){for(var e={},i=0;i<t.attributes.length;i++){var s,n,o=t.attributes[i];o.specified&&(s="href"===(n=o.name)?"src":n=(n=(n=n.replace("data-","")).charAt(0).toLowerCase()+n.slice(1)).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()}),n="",-1<c.indexOf(s)&&(n=s),n&&(e[n]=o.value))}var r=C(t),l=r.find("img").first().attr("alt"),a=r.attr("title"),r=h?r.attr(h):r.find("img").first().attr("src");e.thumb=r,g&&!e.subHtml&&(e.subHtml=a||l||""),e.alt=l||a||"",d.push(e)}),d},o=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},a={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},O="lgAfterAppendSlide",g="lgInit",L="lgHasVideo",h="lgContainerResize",d="lgUpdateSlides",c="lgAfterAppendSubHtml",u="lgBeforeOpen",m="lgAfterOpen",p="lgSlideItemLoad",f="lgBeforeSlide",y="lgAfterSlide",v="lgPosterClick",b="lgDragStart",D="lgDragMove",z="lgDragEnd",G="lgBeforeNextSlide",M="lgBeforePrevSlide",k="lgBeforeClose",A="lgAfterClose",B=0,P=(t.prototype.generateSettings=function(t){this.settings=e(e({},a),t),(this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():o())&&(t=e(e({},this.settings.mobileSettings),this.settings.mobileSettings),this.settings=e(e({},this.settings),t))},t.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(g,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout(function(){t.enableDrag(),t.enableSwipe()},50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var n=this,o=this,t=0;t<this.items.length;t++)!function(e){var i=o.items[e],t=C(i),s=r.generateUUID();t.attr("data-lg-id",s).on("click.lgcustom-item-"+s,function(t){t.preventDefault();t=n.settings.index||e;n.openGallery(t,i)})}(t)},t.prototype.buildModules=function(){var e=this;this.settings.plugins.forEach(function(t){e.plugins.push(new t(e,C))})},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return C(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return C("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t,e,i,s,n,o,r,l,a=this;this.$container&&this.$container.get()||(l=t="",this.settings.controls&&(t='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-sub-html"===this.settings.appendSubHtmlTo&&(l='<div class="lg-sub-html" role="status" aria-live="polite"></div>'),e="",this.settings.allowMediaOverlap&&(e+="lg-media-overlap "),i=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",s=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",n="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),o=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",r=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",l='\n <div class="'+n+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+i+" "+s+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+e+' ">\n <div id="'+this.getIdName("lg-content")+'" class="lg" style="width: '+this.settings.width+"; height:"+this.settings.height+'">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner"></div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+r+"\n "+o+"\n </div>\n "+t+'\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+l+"\n </div>\n </div> \n </div>\n </div>\n ",C(this.settings.container).css("position","relative").append(l),this.outer=this.getElementById("lg-outer"),this.$lgContent=this.getElementById("lg-content"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms"),l=this.settings.mode+" ",this.manageSingleSlideClassName(),this.settings.enableDrag&&(l+="lg-grab "),this.settings.showAfterLoad&&(l+="lg-show-after-load"),this.outer.addClass(l),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),C(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){a.refreshOnResize()}),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules())},t.prototype.refreshOnResize=function(){var t,e,i;this.lgOpened&&(i=this.galleryItems[this.index].__slideVideoInfo,t=(e=this.getMediaContainerPosition()).top,e=e.bottom,this.currentImageSize=I(this.items[this.index],this.$lgContent,t+e,i&&this.settings.videoMaxSize),i&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved&&(i=this.getDummyImgStyles(this.currentImageSize),this.outer.find(".lg-current .lg-dummy-img").first().attr("style",i)),this.LGel.trigger(h))},t.prototype.resizeVideoSlide=function(t,e){e=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",e)},t.prototype.updateSlides=function(t,e){var i,s;this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length?(i=this.galleryItems[e].src,this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[],s=0,this.galleryItems.some(function(t,e){return t.src===i&&(s=e,!0)}),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(d)):this.closeGallery()},t.prototype.getItems=function(){return this.items=[],this.settings.dynamic?this.settings.dynamicEl||[]:("this"===this.settings.selector?this.items.push(this.el):this.settings.selector?"string"==typeof this.settings.selector?this.settings.selectWithin?(t=C(this.settings.selectWithin),this.items=t.find(this.settings.selector).get()):this.items=this.el.querySelectorAll(this.settings.selector):this.items=this.settings.selector:this.items=this.el.children,n(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage));var t},t.prototype.openGallery=function(e,t){var i,s,n,o,r=this;void 0===e&&(e=this.settings.index),this.lgOpened||(this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show"),n=this.getItemsToBeInsertedToDom(e,e),this.currentItemsInDom=n,i="",n.forEach(function(t){i=i+'<div id="'+t+'" class="lg-item"></div>'}),this.$inner.append(i),this.addHtml(e),s="",this.mediaContainerPosition=this.getMediaContainerPosition(),n=(o=this.mediaContainerPosition).top,o=o.bottom,this.settings.allowMediaOverlap||this.setMediaContainerPosition(n,o),this.zoomFromOrigin&&t&&(this.currentImageSize=I(t,this.$lgContent,n+o,this.galleryItems[e].__slideVideoInfo&&this.settings.videoMaxSize),s=l(t,this.$lgContent,n,o,this.currentImageSize)),this.zoomFromOrigin&&s||(this.outer.addClass(this.settings.startClass),this.getSlideItem(e).removeClass("lg-complete")),o=this.settings.zoomFromOrigin?100:this.settings.backdropDuration,setTimeout(function(){r.outer.addClass("lg-components-open")},o),this.index=e,this.LGel.trigger(u),this.getSlideItem(e).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=C(window).scrollTop(),setTimeout(function(){var t;r.zoomFromOrigin&&s&&((t=r.getSlideItem(e)).css("transform",s),setTimeout(function(){t.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",r.settings.startAnimationDuration+"ms"),r.outer.addClass("lg-zoom-from-image")}),setTimeout(function(){t.css("transform","translate3d(0, 0, 0)")},100)),setTimeout(function(){r.$backdrop.addClass("in"),r.$container.addClass("lg-show-in")},10),r.zoomFromOrigin&&s||setTimeout(function(){r.outer.addClass("lg-visible")},r.settings.backdropDuration),r.slide(e,!1,!1,!1),r.LGel.trigger(m)}),document.body===this.settings.container&&C("html").addClass("lg-on"))},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.settings.defaultCaptionHeight||this.outer.find(".lg-sub-html").get().clientHeight,i=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(i?i.clientHeight:0)+e}},t.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$inner.css("top",t+"px").css("bottom",e+"px")},t.prototype.hideBars=function(){var t=this;setTimeout(function(){t.outer.removeClass("lg-hide-items"),0<t.settings.hideBarsDelay&&(t.outer.on("mousemove.lg click.lg touchstart.lg",function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout(function(){t.outer.addClass("lg-hide-items")},t.settings.hideBarsDelay)}),t.outer.trigger("mousemove.lg"))},this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){var t;this.settings.counter&&(t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> / \n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>",this.outer.find(this.settings.appendCounterTo).append(t))},t.prototype.addHtml=function(t){var e,i,s;this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,i||(e?"."!==(s=e.substring(0,1))&&"#"!==s||(e=(this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?C(this.items).eq(t).find(e):C(e)).first().html()):e=""),".lg-sub-html"===this.settings.appendSubHtmlTo?i?this.outer.find(".lg-sub-html").load(i):this.outer.find(".lg-sub-html").html(e):(s=C(this.getSlideItemId(t)),i?s.load(i):s.append('<div class="lg-sub-html">'+e+"</div>")),null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(c,{index:t})},t.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px; \n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px; \n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px; \n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,e,i){var s;if(this.settings.dynamic||(s=C(this.items).eq(e)),s){e=void 0;if(!(e=this.settings.exThumbImage?s.attr(this.settings.exThumbImage):s.find("img").first().attr("src")))return"";e="<img "+i+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+e+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),e}return""},t.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,s=s.sources,n=n?'alt="'+n+'"':"",s='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(e,i,n):w(i,t,n,o,r,s))+"</picture>";e.prepend(s)},t.prototype.onLgObjectLoad=function(t,e,i,s,n){var o=this;n&&this.LGel.trigger(p,{index:e,delay:i||0}),t.find(".lg-object").first().on("load.lg",function(){o.handleLgObjectLoad(t,e,i,s,n)}),setTimeout(function(){t.find(".lg-object").first().on("error.lg",function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')})},s)},t.prototype.handleLgObjectLoad=function(t,e,i,s,n){var o=this;setTimeout(function(){t.addClass("lg-complete lg-complete_"),n||o.LGel.trigger(p,{index:e,delay:i||0})},s)},t.prototype.isVideo=function(t,e){if(!t)return this.galleryItems[e].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(e+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var i=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),e=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),t=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return i?{youtube:i}:e?{vimeo:e}:t?{wistia:t}:void 0},t.prototype.addSlideVideoInfo=function(t){var i=this;t.forEach(function(t,e){t.__slideVideoInfo=i.isVideo(t.src,e)})},t.prototype.loadContent=function(e,t){var i=this,s=this.galleryItems[e],n=C(this.getSlideItemId(e)),o=s.poster,r=s.srcset,l=s.sizes,a=s.sources,g=s.src,h=s.video,d=h&&"string"==typeof h?JSON.parse(h):h;s.responsive&&(c=s.responsive.split(","),g=S(c)||g);var c,u,m,p,f=s.__slideVideoInfo,y="",h=!!s.iframe;n.hasClass("lg-loaded")||(f&&(c=(u=this.mediaContainerPosition).top,u=u.bottom,u=I(this.items[e],this.$lgContent,c+u,f&&this.settings.videoMaxSize),y=this.getVideoContStyle(u)),h?(p=x(g,this.settings.iframeWidth,this.settings.iframeHeight,s.iframeTitle),n.prepend(p)):o?(u="",m=!this.lGalleryOn,(h=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize)&&(u=this.getDummyImageContent(n,e,"")),p=E(o,u||"",y,f),n.prepend(p),h=(h?this.settings.startAnimationDuration:this.settings.backdropDuration)+100,setTimeout(function(){i.LGel.trigger(L,{index:e,src:g,html5Video:d,hasPoster:!0,isFirstSlide:m})},h)):f?(p='<div class="lg-video-cont " style="'+y+'"></div>',n.prepend(p),this.LGel.trigger(L,{index:e,src:g,html5Video:d,hasPoster:!1})):(this.setImgMarkup(g,n,e),(r||a)&&(p=n.find(".lg-object"),this.initPictureFill(p))),this.LGel.trigger(O,{index:e}),this.lGalleryOn&&".lg-sub-html"!==this.settings.appendSubHtmlTo&&this.addHtml(e));var v=0,b=0;this.lGalleryOn||(b=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),b&&!C(document.body).hasClass("lg-from-hash")&&(v=b),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout(function(){n.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),n.hasClass("lg-loaded")||setTimeout(function(){n.find(".lg-img-wrap").append(w(e,g,"",r,l,s.sources)),(r||a)&&(t=n.find(".lg-object"),i.initPictureFill(t)),i.onLgObjectLoad(n,e,b,v,!0);var t=n.find(".lg-object").first();T(t.get())?i.loadContentOnLoad(e,n,v):t.on("load.lg error.lg",function(){i.loadContentOnLoad(e,n,v)})},this.settings.startAnimationDuration+100)),n.addClass("lg-loaded"),this.onLgObjectLoad(n,e,b,v,!1),f&&f.html5&&!o&&n.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!n.hasClass("lg-complete_")||this.lGalleryOn||setTimeout(function(){n.addClass("lg-complete")},this.settings.backdropDuration),(this.lGalleryOn=!0)===t&&(n.hasClass("lg-complete_")?this.preload(e):n.find(".lg-object").first().on("load.lg error.lg",function(){i.preload(e)}))},t.prototype.loadContentOnLoad=function(t,e,i){var s=this;setTimeout(function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)},i+300)},t.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3),o=Math.min(o,this.galleryItems.length),i="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(t,e){n.push("lg-item-"+s.lgId+"-"+e)}),n;if(t<(this.galleryItems.length-1)/2){for(var r=t;t-o/2<r&&0<=r;r--)n.push("lg-item-"+this.lgId+"-"+r);for(var l=n.length,r=0;r<o-l;r++)n.push("lg-item-"+this.lgId+"-"+(t+r+1))}else{for(r=t;r<=this.galleryItems.length-1&&r<t+o/2;r++)n.push("lg-item-"+this.lgId+"-"+r);for(l=n.length,r=0;r<o-l;r++)n.push("lg-item-"+this.lgId+"-"+(t-r-1))}return this.settings.loop&&(t===this.galleryItems.length-1?n.push("lg-item-"+this.lgId+"-0"):0===t&&n.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===n.indexOf(i)&&n.push("lg-item-"+this.lgId+"-"+e),n},t.prototype.organizeSlideItems=function(t,e){var i=this,s=this.getItemsToBeInsertedToDom(t,e,this.settings.numberOfSlideItemsInDom);return s.forEach(function(t){-1===i.currentItemsInDom.indexOf(t)&&i.$inner.append('<div id="'+t+'" class="lg-item"></div>')}),this.currentItemsInDom.forEach(function(t){-1===s.indexOf(t)&&C("#"+t).remove()}),s},t.prototype.getPreviousSlideIndex=function(){var e=0;try{var t=this.outer.find(".lg-current").first().attr("id"),e=parseInt(t.split("-")[3])||0}catch(t){e=0}return e},t.prototype.setDownloadValue=function(t){var e;!this.settings.download||(t=!1!==(e=this.galleryItems[t]).downloadUrl&&(e.downloadUrl||e.src))&&!e.iframe&&this.getElementById("lg-download").attr("href",t)},t.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout(function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout(function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,e,i,s){var n,o,r,l,a,g,h=this,d=this.getPreviousSlideIndex();this.currentItemsInDom=this.organizeSlideItems(t,d),this.lGalleryOn&&d===t||(n=this.galleryItems.length,this.lgBusy||(this.settings.counter&&this.updateCurrentCounter(t),o=this.getSlideItem(t),r=this.getSlideItem(d),a=(l=this.galleryItems[t]).__slideVideoInfo,this.outer.attr("data-lg-slide-type",this.getSlideType(l)),this.setDownloadValue(t),a&&(l=(g=this.mediaContainerPosition).top,g=g.bottom,g=I(this.items[t],this.$lgContent,l+g,a&&this.settings.videoMaxSize),this.resizeVideoSlide(t,g)),this.LGel.trigger(f,{prevIndex:d,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(t<d?s="prev":d<t&&(s="next")),e?(this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide"),g=a=void 0,2<n?(a=t-1,g=t+1,(0===t&&d===n-1||t===n-1&&0===d)&&(g=0,a=n-1)):(a=0,g=1),"prev"===s?this.getSlideItem(g).addClass("lg-next-slide"):this.getSlideItem(a).addClass("lg-prev-slide"),o.addClass("lg-current")):this.makeSlideAnimation(s,o,r),this.lGalleryOn||this.loadContent(t,!0),setTimeout(function(){h.lGalleryOn&&h.loadContent(t,!0),".lg-sub-html"===h.settings.appendSubHtmlTo&&h.addHtml(t)},(this.lGalleryOn?this.settings.speed+50:50)+(e?0:this.settings.slideDelay)),setTimeout(function(){h.lgBusy=!1,r.removeClass("lg-slide-progress"),h.LGel.trigger(y,{prevIndex:d,index:t,fromTouch:e,fromThumb:i})},(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))),this.index=t)},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,e){var i,s=e.pageX-t.pageX,n=e.pageY-t.pageY,e=!1;this.swipeDirection?e=!0:15<Math.abs(s)?(this.swipeDirection="horizontal",e=!0):15<Math.abs(n)&&(this.swipeDirection="vertical",e=!0),e&&(t=this.getSlideItem(this.index),"horizontal"===this.swipeDirection?(this.outer.addClass("lg-dragging"),this.setTranslate(t,s,0),i=15*(e=t.get().offsetWidth)/100-Math.abs(10*s/100),this.setTranslate(this.outer.find(".lg-prev-slide").first(),s-e-i,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),e+s+i,0)):"vertical"===this.swipeDirection&&this.settings.swipeToClose&&(this.$container.addClass("lg-dragging-vertical"),i=1-Math.abs(n)/window.innerHeight,this.$backdrop.css("opacity",i),i=1-Math.abs(n)/(2*window.innerWidth),this.setTranslate(t,0,n,i,i),100<Math.abs(n)&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")))},t.prototype.touchEnd=function(i,s,n){var o,r=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout(function(){r.$container.removeClass("lg-dragging-vertical"),r.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var t=!0;if("horizontal"===r.swipeDirection){o=i.pageX-s.pageX;var e=Math.abs(i.pageX-s.pageX);o<0&&e>r.settings.swipeThreshold?(r.goToNextSlide(!0),t=!1):0<o&&e>r.settings.swipeThreshold&&(r.goToPrevSlide(!0),t=!1)}else if("vertical"===r.swipeDirection){if(o=Math.abs(i.pageY-s.pageY),r.settings.closable&&r.settings.swipeToClose&&100<o)return void r.closeGallery();r.$backdrop.css("opacity",1)}r.outer.find(".lg-item").removeAttr("style"),t&&Math.abs(i.pageX-s.pageX)<5&&(t=C(n.target),r.isPosterElement(t)&&r.LGel.trigger(v)),r.swipeDirection=void 0}),setTimeout(function(){r.outer.hasClass("lg-dragging")||"lg-slide"===r.settings.mode||r.outer.removeClass("lg-slide")},this.settings.speed+100)},t.prototype.enableSwipe=function(){var i=this,s={},e={},n=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(t){t.preventDefault();var e=i.getSlideItem(i.index);!C(t.target).hasClass("lg-item")&&!e.get().contains(t.target)||i.outer.hasClass("lg-zoomed")||i.lgBusy||1!==t.targetTouches.length||(o=!0,i.touchAction="swipe",i.manageSwipeClass(),s={pageX:t.targetTouches[0].pageX,pageY:t.targetTouches[0].pageY})}),this.$inner.on("touchmove.lg",function(t){t.preventDefault(),o&&"swipe"===i.touchAction&&1===t.targetTouches.length&&(e={pageX:t.targetTouches[0].pageX,pageY:t.targetTouches[0].pageY},i.touchMove(s,e),n=!0)}),this.$inner.on("touchend.lg",function(t){"swipe"===i.touchAction&&(n?(n=!1,i.touchEnd(e,s,t)):o&&(t=C(t.target),i.isPosterElement(t)&&i.LGel.trigger(v)),i.touchAction=void 0,o=!1)}))},t.prototype.enableDrag=function(){var i=this,s={},n={},o=!1,r=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(t){var e=i.getSlideItem(i.index);(C(t.target).hasClass("lg-item")||e.get().contains(t.target))&&(i.outer.hasClass("lg-zoomed")||i.lgBusy||(t.preventDefault(),i.lgBusy||(i.manageSwipeClass(),s={pageX:t.pageX,pageY:t.pageY},o=!0,i.outer.get().scrollLeft+=1,--i.outer.get().scrollLeft,i.outer.removeClass("lg-grab").addClass("lg-grabbing"),i.LGel.trigger(b))))}),C(window).on("mousemove.lg.global"+this.lgId,function(t){o&&i.lgOpened&&(r=!0,n={pageX:t.pageX,pageY:t.pageY},i.touchMove(s,n),i.LGel.trigger(D))}),C(window).on("mouseup.lg.global"+this.lgId,function(t){var e;i.lgOpened&&(e=C(t.target),r?(r=!1,i.touchEnd(n,s,t),i.LGel.trigger(z)):i.isPosterElement(e)&&i.LGel.trigger(v),o&&(o=!1,i.outer.removeClass("lg-grabbing").addClass("lg-grab")))}))},t.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&2<this.galleryItems.length&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),-1<e&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(G,{index:this.index}),this.slide(this.index,!!t,!1,"next")):i?(this.index=0,this.LGel.trigger(G,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout(function(){e.outer.removeClass("lg-right-end")},400)))},t.prototype.goToPrevSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(0<this.index?(this.index--,this.LGel.trigger(M,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(M,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout(function(){e.outer.removeClass("lg-left-end")},400)))},t.prototype.keyPress=function(){var e=this;C(window).on("keydown.lg.global"+this.lgId,function(t){e.lgOpened&&!0===e.settings.escKey&&27===t.keyCode&&(t.preventDefault(),e.settings.allowMediaOverlap&&e.outer.hasClass("lg-can-toggle")&&e.outer.hasClass("lg-components-open")?e.outer.removeClass("lg-components-open"):e.closeGallery()),e.lgOpened&&1<e.galleryItems.length&&(37===t.keyCode&&(t.preventDefault(),e.goToPrevSlide()),39===t.keyCode&&(t.preventDefault(),e.goToNextSlide()))})},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",function(){t.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){t.goToNextSlide()})},t.prototype.arrowDisable=function(t){var e,i;!this.settings.loop&&this.settings.hideControlOnEnd&&(e=this.getElementById("lg-prev"),i=this.getElementById("lg-next"),t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled"))},t.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},t.prototype.mousewheel=function(){var e=this;this.outer.on("mousewheel.lg",function(t){!t.deltaY||e.galleryItems.length<2||(0<t.deltaY?e.goToPrevSlide():e.goToNextSlide(),t.preventDefault())})},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},t.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()})},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var e=C(this.items[t]);e.off("click.lgcustom-item-"+e.attr("data-lg-id"))}},t.prototype.manageCloseGallery=function(){var e,i=this;this.settings.closable&&(e=!1,this.getElementById("lg-close").on("click.lg",function(){i.closeGallery()}),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",function(t){t=C(t.target);e=!!i.isSlideElement(t)}),this.outer.on("mousemove.lg",function(){e=!1}),this.outer.on("mouseup.lg",function(t){t=C(t.target);i.isSlideElement(t)&&e&&(i.outer.hasClass("lg-dragging")||i.closeGallery())})))},t.prototype.closeGallery=function(t){var e=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(k),C(window).scrollTop(this.prevScrollTop);var i,s,n=this.items[this.index];this.zoomFromOrigin&&n&&(i=(o=this.mediaContainerPosition).top,t=o.bottom,o=I(n,this.$lgContent,i+t,this.galleryItems[this.index].__slideVideoInfo&&this.settings.videoMaxSize),s=l(n,this.$lgContent,i,t,o)),this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,C("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var o=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout(function(){e.zoomFromOrigin&&s&&e.outer.removeClass("lg-zoom-from-image"),e.$container.removeClass("lg-show"),e.$backdrop.removeAttr("style").css("transition-duration",e.settings.backdropDuration+"ms"),e.outer.removeClass("lg-closing "+e.settings.startClass),e.getSlideItem(e.index).removeClass("lg-start-end-progress"),e.$inner.empty(),e.lgOpened&&e.LGel.trigger(A,{instance:e}),e.outer.get()&&e.outer.get().blur(),e.lgOpened=!1},o+100),o+100},t.prototype.initModules=function(){this.plugins.forEach(function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}})},t.prototype.destroyModules=function(e){this.plugins.forEach(function(t){try{e?t.destroy():t.closeGallery&&t.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}})},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(d)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroy=function(){var t=this,e=this.closeGallery(!0);setTimeout(function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),C(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()},e)},t);function t(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(B++,this.lgId=B,this.el=t,this.LGel=C(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return function(t,e){return new P(t,e)}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lightGallery=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r=(s.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},s.prototype._getSelector=function(t,e){return void 0===e&&(e=document),"string"!=typeof t?t:(e=e||document,"#"===t.substring(0,1)?e.querySelector(t):e.querySelectorAll(t))},s.prototype._each=function(t){return this.selector&&(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0)),this},s.prototype._setCssVendorPrefix=function(t,e,i){e=e.replace(/-([a-z])/gi,function(t,e){return e.toUpperCase()});-1!==this.cssVenderPrefixes.indexOf(e)?(t.style[e.charAt(0).toLowerCase()+e.slice(1)]=i,t.style["webkit"+e]=i,t.style["moz"+e]=i,t.style["ms"+e]=i,t.style["o"+e]=i):t.style[e]=i},s.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},s.prototype.isEventMatched=function(t,e){var i=e.split(".");return t.split(".").filter(function(t){return t}).every(function(t){return-1!==i.indexOf(t)})},s.prototype.attr=function(e,i){return void 0===i?this.firstElement?this.firstElement.getAttribute(e):"":(this._each(function(t){t.setAttribute(e,i)}),this)},s.prototype.find=function(t){return C(this._getSelector(t,this.selector))},s.prototype.first=function(){return this.selector&&void 0!==this.selector.length?C(this.selector[0]):C(this.selector)},s.prototype.eq=function(t){return C(this.selector[t])},s.prototype.parent=function(){return C(this.selector.parentElement)},s.prototype.get=function(){return this._getFirstEl()},s.prototype.removeAttr=function(t){var i=t.split(" ");return this._each(function(e){i.forEach(function(t){return e.removeAttribute(t)})}),this},s.prototype.wrap=function(t){if(!this.firstElement)return this;var e=document.createElement("div");return e.className=t,this.firstElement.parentNode.insertBefore(e,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),e.appendChild(this.firstElement),this},s.prototype.addClass=function(t){return void 0===t&&(t=""),this._each(function(e){t.split(" ").forEach(function(t){e.classList.add(t)})}),this},s.prototype.removeClass=function(t){return this._each(function(e){t.split(" ").forEach(function(t){e.classList.remove(t)})}),this},s.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},s.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},s.prototype.toggleClass=function(t){return this.firstElement&&(this.hasClass(t)?this.removeClass(t):this.addClass(t)),this},s.prototype.css=function(e,i){var s=this;return this._each(function(t){s._setCssVendorPrefix(t,e,i)}),this},s.prototype.on=function(t,e){var i=this;return this.selector&&t.split(" ").forEach(function(t){Array.isArray(s.eventListeners[t])||(s.eventListeners[t]=[]),s.eventListeners[t].push(e),i.selector.addEventListener(t.split(".")[0],e)}),this},s.prototype.once=function(t,e){var i=this;return this.on(t,function(){i.off(t),e(t)}),this},s.prototype.off=function(t){var i=this;return this.selector&&Object.keys(s.eventListeners).forEach(function(e){i.isEventMatched(t,e)&&(s.eventListeners[e].forEach(function(t){i.selector.removeEventListener(e.split(".")[0],t)}),s.eventListeners[e]=[])}),this},s.prototype.trigger=function(t,e){if(!this.firstElement)return this;e=new CustomEvent(t.split(".")[0],{detail:e||null});return this.firstElement.dispatchEvent(e),this},s.prototype.load=function(t){var e=this;return fetch(t).then(function(t){e.selector.innerHTML=t}),this},s.prototype.html=function(e){return void 0===e?this.firstElement?this.firstElement.innerHTML:"":(this._each(function(t){t.innerHTML=e}),this)},s.prototype.append=function(e){return this._each(function(t){"string"==typeof e?t.insertAdjacentHTML("beforeend",e):t.appendChild(e)}),this},s.prototype.prepend=function(e){return this._each(function(t){t.insertAdjacentHTML("afterbegin",e)}),this},s.prototype.remove=function(){return this._each(function(t){t.parentNode.removeChild(t)}),this},s.prototype.empty=function(){return this._each(function(t){t.innerHTML=""}),this},s.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},s.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},s.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),e=C("body").style().marginLeft;return{left:t.left-parseFloat(e)+this.scrollLeft(),top:t.top+this.scrollTop()}},s.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},s.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},s.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},s.eventListeners={},s);function s(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}function C(t){return new r(t)}var i=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];var I=function(t,e,i,s){void 0===i&&(i=0);var n=C(t).attr("data-lg-size")||s;if(n){var o=n.split(",");if(o[1])for(var r=window.innerWidth,l=0;l<o.length;l++){var a=o[l];if(r<parseInt(a.split("-")[2],10)){n=a;break}l===o.length-1&&(n=a)}var g=n.split("-"),t=parseInt(g[0],10),s=parseInt(g[1],10),g=e.width(),i=e.height()-i,g=Math.min(g,t),i=Math.min(i,s),i=Math.min(g/t,i/s);return{width:t*i,height:s*i}}},l=function(t,e,i,s,n){if(n){var o=C(t).find("img").first();if(o.get()){var r=e.get().getBoundingClientRect(),l=r.width,a=e.height()-(i+s),t=o.width(),e=o.height(),s=o.style(),r=(l-t)/2-o.offset().left+(parseFloat(s.paddingLeft)||0)+(parseFloat(s.borderLeft)||0)+C(window).scrollLeft()+r.left,i=(a-e)/2-o.offset().top+(parseFloat(s.paddingTop)||0)+(parseFloat(s.borderTop)||0)+C(window).scrollTop()+i;return"translate3d("+(r*=-1)+"px, "+(i*=-1)+"px, 0) scale3d("+t/n.width+", "+e/n.height+", 1)"}}},x=function(t,e,i,s){return'<div class="lg-video-cont lg-has-iframe" style="width:'+e+"; height: "+i+'">\n <iframe class="lg-object" frameborder="0" '+(s?'title="'+s+'"':"")+' src="'+t+'" allowfullscreen="true"></iframe>\n </div>'},w=function(t,e,i,s,n,o){t="<img "+i+" "+(s?'srcset="'+s+'"':"")+" "+(n?'sizes="'+n+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+e+'" />',e="";return o&&(e=("string"==typeof o?JSON.parse(o):o).map(function(e){var i="";return Object.keys(e).forEach(function(t){i+=" "+t+'="'+e[t]+'"'}),"<source "+i+"></source>"})),e+t},S=function(t){for(var e=[],i=[],s="",n=0;n<t.length;n++){var o=t[n].split(" ");""===o[0]&&o.splice(0,1),i.push(o[0]),e.push(o[1])}for(var r=window.innerWidth,l=0;l<e.length;l++)if(parseInt(e[l],10)>r){s=i[l];break}return s},T=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},E=function(t,e,i,s){return'<div class="lg-video-cont '+(s&&s.youtube?"lg-has-youtube":s&&s.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+i+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(e||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},n=function(t,e,g,h){var d=[],c=function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;for(var s=Array(t),n=0,e=0;e<i;e++)for(var o=arguments[e],r=0,l=o.length;r<l;r++,n++)s[n]=o[r];return s}(i,e);return[].forEach.call(t,function(t){for(var e={},i=0;i<t.attributes.length;i++){var s,n,o=t.attributes[i];o.specified&&(s="href"===(n=o.name)?"src":n=(n=(n=n.replace("data-","")).charAt(0).toLowerCase()+n.slice(1)).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()}),n="",-1<c.indexOf(s)&&(n=s),n&&(e[n]=o.value))}var r=C(t),l=r.find("img").first().attr("alt"),a=r.attr("title"),r=h?r.attr(h):r.find("img").first().attr("src");e.thumb=r,g&&!e.subHtml&&(e.subHtml=a||l||""),e.alt=l||a||"",d.push(e)}),d},o=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},a={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},O="lgAfterAppendSlide",g="lgInit",L="lgHasVideo",h="lgContainerResize",d="lgUpdateSlides",c="lgAfterAppendSubHtml",u="lgBeforeOpen",m="lgAfterOpen",p="lgSlideItemLoad",f="lgBeforeSlide",y="lgAfterSlide",v="lgPosterClick",b="lgDragStart",D="lgDragMove",z="lgDragEnd",G="lgBeforeNextSlide",M="lgBeforePrevSlide",k="lgBeforeClose",A="lgAfterClose",B=0,P=(t.prototype.generateSettings=function(t){this.settings=e(e({},a),t),(this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():o())&&(t=e(e({},this.settings.mobileSettings),this.settings.mobileSettings),this.settings=e(e({},this.settings),t))},t.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(g,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout(function(){t.enableDrag(),t.enableSwipe()},50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var n=this,o=this,t=0;t<this.items.length;t++)!function(e){var i=o.items[e],t=C(i),s=r.generateUUID();t.attr("data-lg-id",s).on("click.lgcustom-item-"+s,function(t){t.preventDefault();t=n.settings.index||e;n.openGallery(t,i)})}(t)},t.prototype.buildModules=function(){var e=this;this.settings.plugins.forEach(function(t){e.plugins.push(new t(e,C))})},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return C(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return C("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t,e,i,s,n,o,r,l,a=this;this.$container&&this.$container.get()||(l=t="",this.settings.controls&&(t='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-sub-html"===this.settings.appendSubHtmlTo&&(l='<div class="lg-sub-html" role="status" aria-live="polite"></div>'),e="",this.settings.allowMediaOverlap&&(e+="lg-media-overlap "),i=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",s=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",n="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),o=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",r=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",l='\n <div class="'+n+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+i+" "+s+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+e+' ">\n <div id="'+this.getIdName("lg-content")+'" class="lg" style="width: '+this.settings.width+"; height:"+this.settings.height+'">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner"></div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+r+"\n "+o+"\n </div>\n "+t+'\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+l+"\n </div>\n </div> \n </div>\n </div>\n ",C(this.settings.container).css("position","relative").append(l),this.outer=this.getElementById("lg-outer"),this.$lgContent=this.getElementById("lg-content"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms"),l=this.settings.mode+" ",this.manageSingleSlideClassName(),this.settings.enableDrag&&(l+="lg-grab "),this.settings.showAfterLoad&&(l+="lg-show-after-load"),this.outer.addClass(l),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),C(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){a.refreshOnResize()}),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules())},t.prototype.refreshOnResize=function(){var t,e,i;this.lgOpened&&(i=this.galleryItems[this.index].__slideVideoInfo,t=(e=this.getMediaContainerPosition()).top,e=e.bottom,this.currentImageSize=I(this.items[this.index],this.$lgContent,t+e,i&&this.settings.videoMaxSize),i&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved&&(i=this.getDummyImgStyles(this.currentImageSize),this.outer.find(".lg-current .lg-dummy-img").first().attr("style",i)),this.LGel.trigger(h))},t.prototype.resizeVideoSlide=function(t,e){e=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",e)},t.prototype.updateSlides=function(t,e){var i,s;this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length?(i=this.galleryItems[e].src,this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[],s=0,this.galleryItems.some(function(t,e){return t.src===i&&(s=e,!0)}),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(d)):this.closeGallery()},t.prototype.getItems=function(){return this.items=[],this.settings.dynamic?this.settings.dynamicEl||[]:("this"===this.settings.selector?this.items.push(this.el):this.settings.selector?"string"==typeof this.settings.selector?this.settings.selectWithin?(t=C(this.settings.selectWithin),this.items=t.find(this.settings.selector).get()):this.items=this.el.querySelectorAll(this.settings.selector):this.items=this.settings.selector:this.items=this.el.children,n(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage));var t},t.prototype.openGallery=function(e,t){var i,s,n,o,r=this;void 0===e&&(e=this.settings.index),this.lgOpened||(this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show"),n=this.getItemsToBeInsertedToDom(e,e),this.currentItemsInDom=n,i="",n.forEach(function(t){i=i+'<div id="'+t+'" class="lg-item"></div>'}),this.$inner.append(i),this.addHtml(e),s="",this.mediaContainerPosition=this.getMediaContainerPosition(),n=(o=this.mediaContainerPosition).top,o=o.bottom,this.settings.allowMediaOverlap||this.setMediaContainerPosition(n,o),this.zoomFromOrigin&&t&&(this.currentImageSize=I(t,this.$lgContent,n+o,this.galleryItems[e].__slideVideoInfo&&this.settings.videoMaxSize),s=l(t,this.$lgContent,n,o,this.currentImageSize)),this.zoomFromOrigin&&s||(this.outer.addClass(this.settings.startClass),this.getSlideItem(e).removeClass("lg-complete")),o=this.settings.zoomFromOrigin?100:this.settings.backdropDuration,setTimeout(function(){r.outer.addClass("lg-components-open")},o),this.index=e,this.LGel.trigger(u),this.getSlideItem(e).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=C(window).scrollTop(),setTimeout(function(){var t;r.zoomFromOrigin&&s&&((t=r.getSlideItem(e)).css("transform",s),setTimeout(function(){t.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",r.settings.startAnimationDuration+"ms"),r.outer.addClass("lg-zoom-from-image")}),setTimeout(function(){t.css("transform","translate3d(0, 0, 0)")},100)),setTimeout(function(){r.$backdrop.addClass("in"),r.$container.addClass("lg-show-in")},10),r.zoomFromOrigin&&s||setTimeout(function(){r.outer.addClass("lg-visible")},r.settings.backdropDuration),r.slide(e,!1,!1,!1),r.LGel.trigger(m)}),document.body===this.settings.container&&C("html").addClass("lg-on"))},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.settings.defaultCaptionHeight||this.outer.find(".lg-sub-html").get().clientHeight,i=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(i?i.clientHeight:0)+e}},t.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$inner.css("top",t+"px").css("bottom",e+"px")},t.prototype.hideBars=function(){var t=this;setTimeout(function(){t.outer.removeClass("lg-hide-items"),0<t.settings.hideBarsDelay&&(t.outer.on("mousemove.lg click.lg touchstart.lg",function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout(function(){t.outer.addClass("lg-hide-items")},t.settings.hideBarsDelay)}),t.outer.trigger("mousemove.lg"))},this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){var t;this.settings.counter&&(t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> / \n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>",this.outer.find(this.settings.appendCounterTo).append(t))},t.prototype.addHtml=function(t){var e,i,s;this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,i||(e?"."!==(s=e.substring(0,1))&&"#"!==s||(e=(this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?C(this.items).eq(t).find(e):C(e)).first().html()):e=""),".lg-sub-html"===this.settings.appendSubHtmlTo?i?this.outer.find(".lg-sub-html").load(i):this.outer.find(".lg-sub-html").html(e):(s=C(this.getSlideItemId(t)),i?s.load(i):s.append('<div class="lg-sub-html">'+e+"</div>")),null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(c,{index:t})},t.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px; \n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px; \n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px; \n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,e,i){var s;if(this.settings.dynamic||(s=C(this.items).eq(e)),s){e=void 0;if(!(e=this.settings.exThumbImage?s.attr(this.settings.exThumbImage):s.find("img").first().attr("src")))return"";e="<img "+i+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+e+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),e}return""},t.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,s=s.sources,n=n?'alt="'+n+'"':"",s='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(e,i,n):w(i,t,n,o,r,s))+"</picture>";e.prepend(s)},t.prototype.onLgObjectLoad=function(t,e,i,s,n){var o=this;n&&this.LGel.trigger(p,{index:e,delay:i||0}),t.find(".lg-object").first().on("load.lg",function(){o.handleLgObjectLoad(t,e,i,s,n)}),setTimeout(function(){t.find(".lg-object").first().on("error.lg",function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')})},s)},t.prototype.handleLgObjectLoad=function(t,e,i,s,n){var o=this;setTimeout(function(){t.addClass("lg-complete lg-complete_"),n||o.LGel.trigger(p,{index:e,delay:i||0})},s)},t.prototype.isVideo=function(t,e){if(!t)return this.galleryItems[e].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(e+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var i=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),e=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),t=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return i?{youtube:i}:e?{vimeo:e}:t?{wistia:t}:void 0},t.prototype.addSlideVideoInfo=function(t){var i=this;t.forEach(function(t,e){t.__slideVideoInfo=i.isVideo(t.src,e)})},t.prototype.loadContent=function(e,t){var i=this,s=this.galleryItems[e],n=C(this.getSlideItemId(e)),o=s.poster,r=s.srcset,l=s.sizes,a=s.sources,g=s.src,h=s.video,d=h&&"string"==typeof h?JSON.parse(h):h;s.responsive&&(c=s.responsive.split(","),g=S(c)||g);var c,u,m,p,f=s.__slideVideoInfo,y="",h=!!s.iframe;n.hasClass("lg-loaded")||(f&&(c=(u=this.mediaContainerPosition).top,u=u.bottom,u=I(this.items[e],this.$lgContent,c+u,f&&this.settings.videoMaxSize),y=this.getVideoContStyle(u)),h?(p=x(g,this.settings.iframeWidth,this.settings.iframeHeight,s.iframeTitle),n.prepend(p)):o?(u="",m=!this.lGalleryOn,(h=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize)&&(u=this.getDummyImageContent(n,e,"")),p=E(o,u||"",y,f),n.prepend(p),h=(h?this.settings.startAnimationDuration:this.settings.backdropDuration)+100,setTimeout(function(){i.LGel.trigger(L,{index:e,src:g,html5Video:d,hasPoster:!0,isFirstSlide:m})},h)):f?(p='<div class="lg-video-cont " style="'+y+'"></div>',n.prepend(p),this.LGel.trigger(L,{index:e,src:g,html5Video:d,hasPoster:!1})):(this.setImgMarkup(g,n,e),(r||a)&&(p=n.find(".lg-object"),this.initPictureFill(p))),this.LGel.trigger(O,{index:e}),this.lGalleryOn&&".lg-sub-html"!==this.settings.appendSubHtmlTo&&this.addHtml(e));var v=0,b=0;this.lGalleryOn||(b=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),b&&!C(document.body).hasClass("lg-from-hash")&&(v=b),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout(function(){n.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),n.hasClass("lg-loaded")||setTimeout(function(){n.find(".lg-img-wrap").append(w(e,g,"",r,l,s.sources)),(r||a)&&(t=n.find(".lg-object"),i.initPictureFill(t)),i.onLgObjectLoad(n,e,b,v,!0);var t=n.find(".lg-object").first();T(t.get())?i.loadContentOnLoad(e,n,v):t.on("load.lg error.lg",function(){i.loadContentOnLoad(e,n,v)})},this.settings.startAnimationDuration+100)),n.addClass("lg-loaded"),this.onLgObjectLoad(n,e,b,v,!1),f&&f.html5&&!o&&n.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!n.hasClass("lg-complete_")||this.lGalleryOn||setTimeout(function(){n.addClass("lg-complete")},this.settings.backdropDuration),(this.lGalleryOn=!0)===t&&(n.hasClass("lg-complete_")?this.preload(e):n.find(".lg-object").first().on("load.lg error.lg",function(){i.preload(e)}))},t.prototype.loadContentOnLoad=function(t,e,i){var s=this;setTimeout(function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)},i+300)},t.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3),o=Math.min(o,this.galleryItems.length),i="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(t,e){n.push("lg-item-"+s.lgId+"-"+e)}),n;if(t<(this.galleryItems.length-1)/2){for(var r=t;t-o/2<r&&0<=r;r--)n.push("lg-item-"+this.lgId+"-"+r);for(var l=n.length,r=0;r<o-l;r++)n.push("lg-item-"+this.lgId+"-"+(t+r+1))}else{for(r=t;r<=this.galleryItems.length-1&&r<t+o/2;r++)n.push("lg-item-"+this.lgId+"-"+r);for(l=n.length,r=0;r<o-l;r++)n.push("lg-item-"+this.lgId+"-"+(t-r-1))}return this.settings.loop&&(t===this.galleryItems.length-1?n.push("lg-item-"+this.lgId+"-0"):0===t&&n.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===n.indexOf(i)&&n.push("lg-item-"+this.lgId+"-"+e),n},t.prototype.organizeSlideItems=function(t,e){var i=this,s=this.getItemsToBeInsertedToDom(t,e,this.settings.numberOfSlideItemsInDom);return s.forEach(function(t){-1===i.currentItemsInDom.indexOf(t)&&i.$inner.append('<div id="'+t+'" class="lg-item"></div>')}),this.currentItemsInDom.forEach(function(t){-1===s.indexOf(t)&&C("#"+t).remove()}),s},t.prototype.getPreviousSlideIndex=function(){var e=0;try{var t=this.outer.find(".lg-current").first().attr("id"),e=parseInt(t.split("-")[3])||0}catch(t){e=0}return e},t.prototype.setDownloadValue=function(t){var e;!this.settings.download||(t=!1!==(e=this.galleryItems[t]).downloadUrl&&(e.downloadUrl||e.src))&&!e.iframe&&this.getElementById("lg-download").attr("href",t)},t.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout(function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout(function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,e,i,s){var n,o,r,l,a,g,h=this,d=this.getPreviousSlideIndex();this.currentItemsInDom=this.organizeSlideItems(t,d),this.lGalleryOn&&d===t||(n=this.galleryItems.length,this.lgBusy||(this.settings.counter&&this.updateCurrentCounter(t),o=this.getSlideItem(t),r=this.getSlideItem(d),a=(l=this.galleryItems[t]).__slideVideoInfo,this.outer.attr("data-lg-slide-type",this.getSlideType(l)),this.setDownloadValue(t),a&&(l=(g=this.mediaContainerPosition).top,g=g.bottom,g=I(this.items[t],this.$lgContent,l+g,a&&this.settings.videoMaxSize),this.resizeVideoSlide(t,g)),this.LGel.trigger(f,{prevIndex:d,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(t<d?s="prev":d<t&&(s="next")),e?(this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide"),g=a=void 0,2<n?(a=t-1,g=t+1,(0===t&&d===n-1||t===n-1&&0===d)&&(g=0,a=n-1)):(a=0,g=1),"prev"===s?this.getSlideItem(g).addClass("lg-next-slide"):this.getSlideItem(a).addClass("lg-prev-slide"),o.addClass("lg-current")):this.makeSlideAnimation(s,o,r),this.lGalleryOn||this.loadContent(t,!0),setTimeout(function(){h.lGalleryOn&&h.loadContent(t,!0),".lg-sub-html"===h.settings.appendSubHtmlTo&&h.addHtml(t)},(this.lGalleryOn?this.settings.speed+50:50)+(e?0:this.settings.slideDelay)),setTimeout(function(){h.lgBusy=!1,r.removeClass("lg-slide-progress"),h.LGel.trigger(y,{prevIndex:d,index:t,fromTouch:e,fromThumb:i})},(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))),this.index=t)},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,e){var i,s=e.pageX-t.pageX,n=e.pageY-t.pageY,e=!1;this.swipeDirection?e=!0:15<Math.abs(s)?(this.swipeDirection="horizontal",e=!0):15<Math.abs(n)&&(this.swipeDirection="vertical",e=!0),e&&(t=this.getSlideItem(this.index),"horizontal"===this.swipeDirection?(this.outer.addClass("lg-dragging"),this.setTranslate(t,s,0),i=15*(e=t.get().offsetWidth)/100-Math.abs(10*s/100),this.setTranslate(this.outer.find(".lg-prev-slide").first(),s-e-i,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),e+s+i,0)):"vertical"===this.swipeDirection&&this.settings.swipeToClose&&(this.$container.addClass("lg-dragging-vertical"),i=1-Math.abs(n)/window.innerHeight,this.$backdrop.css("opacity",i),i=1-Math.abs(n)/(2*window.innerWidth),this.setTranslate(t,0,n,i,i),100<Math.abs(n)&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")))},t.prototype.touchEnd=function(i,s,n){var o,r=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout(function(){r.$container.removeClass("lg-dragging-vertical"),r.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var t=!0;if("horizontal"===r.swipeDirection){o=i.pageX-s.pageX;var e=Math.abs(i.pageX-s.pageX);o<0&&e>r.settings.swipeThreshold?(r.goToNextSlide(!0),t=!1):0<o&&e>r.settings.swipeThreshold&&(r.goToPrevSlide(!0),t=!1)}else if("vertical"===r.swipeDirection){if(o=Math.abs(i.pageY-s.pageY),r.settings.closable&&r.settings.swipeToClose&&100<o)return void r.closeGallery();r.$backdrop.css("opacity",1)}r.outer.find(".lg-item").removeAttr("style"),t&&Math.abs(i.pageX-s.pageX)<5&&(t=C(n.target),r.isPosterElement(t)&&r.LGel.trigger(v)),r.swipeDirection=void 0}),setTimeout(function(){r.outer.hasClass("lg-dragging")||"lg-slide"===r.settings.mode||r.outer.removeClass("lg-slide")},this.settings.speed+100)},t.prototype.enableSwipe=function(){var i=this,s={},e={},n=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(t){t.preventDefault();var e=i.getSlideItem(i.index);!C(t.target).hasClass("lg-item")&&!e.get().contains(t.target)||i.outer.hasClass("lg-zoomed")||i.lgBusy||1!==t.targetTouches.length||(o=!0,i.touchAction="swipe",i.manageSwipeClass(),s={pageX:t.targetTouches[0].pageX,pageY:t.targetTouches[0].pageY})}),this.$inner.on("touchmove.lg",function(t){t.preventDefault(),o&&"swipe"===i.touchAction&&1===t.targetTouches.length&&(e={pageX:t.targetTouches[0].pageX,pageY:t.targetTouches[0].pageY},i.touchMove(s,e),n=!0)}),this.$inner.on("touchend.lg",function(t){"swipe"===i.touchAction&&(n?(n=!1,i.touchEnd(e,s,t)):o&&(t=C(t.target),i.isPosterElement(t)&&i.LGel.trigger(v)),i.touchAction=void 0,o=!1)}))},t.prototype.enableDrag=function(){var i=this,s={},n={},o=!1,r=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(t){var e=i.getSlideItem(i.index);(C(t.target).hasClass("lg-item")||e.get().contains(t.target))&&(i.outer.hasClass("lg-zoomed")||i.lgBusy||(t.preventDefault(),i.lgBusy||(i.manageSwipeClass(),s={pageX:t.pageX,pageY:t.pageY},o=!0,i.outer.get().scrollLeft+=1,--i.outer.get().scrollLeft,i.outer.removeClass("lg-grab").addClass("lg-grabbing"),i.LGel.trigger(b))))}),C(window).on("mousemove.lg.global"+this.lgId,function(t){o&&i.lgOpened&&(r=!0,n={pageX:t.pageX,pageY:t.pageY},i.touchMove(s,n),i.LGel.trigger(D))}),C(window).on("mouseup.lg.global"+this.lgId,function(t){var e;i.lgOpened&&(e=C(t.target),r?(r=!1,i.touchEnd(n,s,t),i.LGel.trigger(z)):i.isPosterElement(e)&&i.LGel.trigger(v),o&&(o=!1,i.outer.removeClass("lg-grabbing").addClass("lg-grab")))}))},t.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&2<this.galleryItems.length&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),-1<e&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(G,{index:this.index}),this.slide(this.index,!!t,!1,"next")):i?(this.index=0,this.LGel.trigger(G,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout(function(){e.outer.removeClass("lg-right-end")},400)))},t.prototype.goToPrevSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(0<this.index?(this.index--,this.LGel.trigger(M,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(M,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout(function(){e.outer.removeClass("lg-left-end")},400)))},t.prototype.keyPress=function(){var e=this;C(window).on("keydown.lg.global"+this.lgId,function(t){e.lgOpened&&!0===e.settings.escKey&&27===t.keyCode&&(t.preventDefault(),e.settings.allowMediaOverlap&&e.outer.hasClass("lg-can-toggle")&&e.outer.hasClass("lg-components-open")?e.outer.removeClass("lg-components-open"):e.closeGallery()),e.lgOpened&&1<e.galleryItems.length&&(37===t.keyCode&&(t.preventDefault(),e.goToPrevSlide()),39===t.keyCode&&(t.preventDefault(),e.goToNextSlide()))})},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",function(){t.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){t.goToNextSlide()})},t.prototype.arrowDisable=function(t){var e,i;!this.settings.loop&&this.settings.hideControlOnEnd&&(e=this.getElementById("lg-prev"),i=this.getElementById("lg-next"),t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled"))},t.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},t.prototype.mousewheel=function(){var e=this;this.outer.on("mousewheel.lg",function(t){!t.deltaY||e.galleryItems.length<2||(0<t.deltaY?e.goToPrevSlide():e.goToNextSlide(),t.preventDefault())})},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},t.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()})},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var e=C(this.items[t]);e.off("click.lgcustom-item-"+e.attr("data-lg-id"))}},t.prototype.manageCloseGallery=function(){var e,i=this;this.settings.closable&&(e=!1,this.getElementById("lg-close").on("click.lg",function(){i.closeGallery()}),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",function(t){t=C(t.target);e=!!i.isSlideElement(t)}),this.outer.on("mousemove.lg",function(){e=!1}),this.outer.on("mouseup.lg",function(t){t=C(t.target);i.isSlideElement(t)&&e&&(i.outer.hasClass("lg-dragging")||i.closeGallery())})))},t.prototype.closeGallery=function(t){var e=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(k),C(window).scrollTop(this.prevScrollTop);var i,s,n=this.items[this.index];this.zoomFromOrigin&&n&&(i=(o=this.mediaContainerPosition).top,t=o.bottom,o=I(n,this.$lgContent,i+t,this.galleryItems[this.index].__slideVideoInfo&&this.settings.videoMaxSize),s=l(n,this.$lgContent,i,t,o)),this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,C("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var o=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout(function(){e.zoomFromOrigin&&s&&e.outer.removeClass("lg-zoom-from-image"),e.$container.removeClass("lg-show"),e.$backdrop.removeAttr("style").css("transition-duration",e.settings.backdropDuration+"ms"),e.outer.removeClass("lg-closing "+e.settings.startClass),e.getSlideItem(e.index).removeClass("lg-start-end-progress"),e.$inner.empty(),e.lgOpened&&e.LGel.trigger(A,{instance:e}),e.outer.get()&&e.outer.get().blur(),e.lgOpened=!1},o+100),o+100},t.prototype.initModules=function(){this.plugins.forEach(function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}})},t.prototype.destroyModules=function(e){this.plugins.forEach(function(t){try{e?t.destroy():t.closeGallery&&t.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}})},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(d)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroy=function(){var t=this,e=this.closeGallery(!0);setTimeout(function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),C(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()},e)},t);function t(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(B++,this.lgId=B,this.el=t,this.LGel=C(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return function(t,e){return new P(t,e)}});

@@ -36,3 +36,3 @@ /**

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -39,0 +39,0 @@ * Copyright (c) 2020 Sachin Neravath;

@@ -14,3 +14,3 @@ var t,i;t=this,i=function(t,i){

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -17,0 +17,0 @@ * Copyright (c) 2020 Sachin Neravath;

{
"name": "lightgallery",
"version": "2.1.7",
"version": "2.1.8",
"description": "lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile",

@@ -5,0 +5,0 @@ "keywords": [

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgAutoplay=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,o=1,s=arguments.length;o<s;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},o="lgSlideItemLoad",s="lgBeforeSlide",r="lgAfterSlide",i="lgDragStart",a="lgDragEnd",n={autoplay:!0,slideShowAutoplay:!1,slideShowInterval:5e3,progressBar:!0,forceSlideShowAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"};function t(t){return this.core=t,this.settings=e(e({},n),this.core.settings),this}return t.prototype.init=function(){var t=this;this.settings.autoplay&&(this.interval=!1,this.fromAuto=!0,this.pausedOnTouchDrag=!1,this.pausedOnSlideChange=!1,this.settings.autoplayControls&&this.controls(),this.settings.progressBar&&this.core.$lgContent.append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),this.settings.slideShowAutoplay&&this.core.LGel.once(o+".autoplay",function(){t.startAuto()}),this.core.LGel.on(i+".autoplay touchstart.lg.autoplay",function(){t.interval&&(t.cancelAuto(),t.pausedOnTouchDrag=!0)}),this.core.LGel.on(a+".autoplay touchend.lg.autoplay",function(){!t.interval&&t.pausedOnTouchDrag&&(t.startAuto(),t.pausedOnTouchDrag=!1)}),this.core.LGel.on(s+".autoplay",function(){t.showProgressBar(),!t.fromAuto&&t.interval?(t.cancelAuto(),t.pausedOnSlideChange=!0):t.pausedOnSlideChange=!1,t.fromAuto=!1}),this.core.LGel.on(r+".autoplay",function(){t.pausedOnSlideChange&&!t.interval&&t.settings.forceSlideShowAutoplay&&(t.startAuto(),t.pausedOnSlideChange=!1)}),this.showProgressBar())},t.prototype.showProgressBar=function(){var t,e,o=this;this.settings.progressBar&&this.fromAuto&&(t=this.core.outer.find(".lg-progress-bar"),e=this.core.outer.find(".lg-progress"),this.interval&&(e.removeAttr("style"),t.removeClass("lg-start"),setTimeout(function(){e.css("transition","width "+(o.core.settings.speed+o.settings.slideShowInterval)+"ms ease 0s"),t.addClass("lg-start")},20)))},t.prototype.controls=function(){var t=this;this.core.outer.find(this.settings.appendAutoplayControlsTo).append('<button aria-label="Toggle autoplay" type="button" class="lg-autoplay-button lg-icon"></button>'),this.core.outer.find(".lg-autoplay-button").first().on("click.lg.autoplay",function(){t.core.outer.hasClass("lg-show-autoplay")?t.cancelAuto():t.interval||t.startAuto()})},t.prototype.startAuto=function(){var t=this;this.core.outer.find(".lg-progress").css("transition","width "+(this.core.settings.speed+this.settings.slideShowInterval)+"ms ease 0s"),this.core.outer.addClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").addClass("lg-start"),this.interval=setInterval(function(){t.core.index+1<t.core.galleryItems.length?t.core.index++:t.core.index=0,t.fromAuto=!0,t.core.slide(t.core.index,!1,!1,"next")},this.core.settings.speed+this.settings.slideShowInterval)},t.prototype.cancelAuto=function(){this.interval&&(this.core.outer.find(".lg-progress").removeAttr("style"),this.core.outer.removeClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").removeClass("lg-start")),clearInterval(this.interval),this.interval=!1},t.prototype.closeGallery=function(){this.cancelAuto()},t.prototype.destroy=function(){this.settings.autoplay&&this.core.outer.find(".lg-progress-bar").remove(),this.core.LGel.off(".lg.autoplay"),this.core.LGel.off(".autoplay")},t});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgAutoplay=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,o=1,s=arguments.length;o<s;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},o="lgSlideItemLoad",s="lgBeforeSlide",r="lgAfterSlide",a="lgDragStart",i="lgDragEnd",n={autoplay:!0,slideShowAutoplay:!1,slideShowInterval:5e3,progressBar:!0,forceSlideShowAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"};function t(t){return this.core=t,this.settings=e(e({},n),this.core.settings),this}return t.prototype.init=function(){var t=this;this.settings.autoplay&&(this.interval=!1,this.fromAuto=!0,this.pausedOnTouchDrag=!1,this.pausedOnSlideChange=!1,this.settings.autoplayControls&&this.controls(),this.settings.progressBar&&this.core.$lgContent.append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),this.settings.slideShowAutoplay&&this.core.LGel.once(o+".autoplay",function(){t.startAuto()}),this.core.LGel.on(a+".autoplay touchstart.lg.autoplay",function(){t.interval&&(t.cancelAuto(),t.pausedOnTouchDrag=!0)}),this.core.LGel.on(i+".autoplay touchend.lg.autoplay",function(){!t.interval&&t.pausedOnTouchDrag&&(t.startAuto(),t.pausedOnTouchDrag=!1)}),this.core.LGel.on(s+".autoplay",function(){t.showProgressBar(),!t.fromAuto&&t.interval?(t.cancelAuto(),t.pausedOnSlideChange=!0):t.pausedOnSlideChange=!1,t.fromAuto=!1}),this.core.LGel.on(r+".autoplay",function(){t.pausedOnSlideChange&&!t.interval&&t.settings.forceSlideShowAutoplay&&(t.startAuto(),t.pausedOnSlideChange=!1)}),this.showProgressBar())},t.prototype.showProgressBar=function(){var t,e,o=this;this.settings.progressBar&&this.fromAuto&&(t=this.core.outer.find(".lg-progress-bar"),e=this.core.outer.find(".lg-progress"),this.interval&&(e.removeAttr("style"),t.removeClass("lg-start"),setTimeout(function(){e.css("transition","width "+(o.core.settings.speed+o.settings.slideShowInterval)+"ms ease 0s"),t.addClass("lg-start")},20)))},t.prototype.controls=function(){var t=this;this.core.outer.find(this.settings.appendAutoplayControlsTo).append('<button aria-label="Toggle autoplay" type="button" class="lg-autoplay-button lg-icon"></button>'),this.core.outer.find(".lg-autoplay-button").first().on("click.lg.autoplay",function(){t.core.outer.hasClass("lg-show-autoplay")?t.cancelAuto():t.interval||t.startAuto()})},t.prototype.startAuto=function(){var t=this;this.core.outer.find(".lg-progress").css("transition","width "+(this.core.settings.speed+this.settings.slideShowInterval)+"ms ease 0s"),this.core.outer.addClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").addClass("lg-start"),this.interval=setInterval(function(){t.core.index+1<t.core.galleryItems.length?t.core.index++:t.core.index=0,t.fromAuto=!0,t.core.slide(t.core.index,!1,!1,"next")},this.core.settings.speed+this.settings.slideShowInterval)},t.prototype.cancelAuto=function(){this.interval&&(this.core.outer.find(".lg-progress").removeAttr("style"),this.core.outer.removeClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").removeClass("lg-start")),clearInterval(this.interval),this.interval=!1},t.prototype.closeGallery=function(){this.cancelAuto()},t.prototype.destroy=function(){this.settings.autoplay&&this.core.outer.find(".lg-progress-bar").remove(),this.core.LGel.off(".lg.autoplay"),this.core.LGel.off(".autoplay")},t});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgAutoplay = factory());
(global.lgAutoplay = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgComment=e()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i="lgBeforeSlide",s="lgAfterSlide",n={commentBox:!1,fbComments:!1,disqusComments:!1,disqusConfig:{title:void 0,language:"en"},commentsMarkup:'<div id="lg-comment-box" class="lg-comment-box lg-fb-comment-box"><div class="lg-comment-header"><h3 class="lg-comment-title">Leave a comment.</h3><span class="lg-comment-close lg-icon"></span></div><div class="lg-comment-body"></div></div>'};function t(t,e){return this.core=t,this.$LG=e,this.settings=o(o({},n),this.core.settings),this}return t.prototype.init=function(){this.settings.commentBox&&(this.setMarkup(),this.toggleCommentBox(),this.settings.fbComments?this.addFbComments():this.settings.disqusComments&&this.addDisqusComments())},t.prototype.setMarkup=function(){this.core.$lgContent.append(this.settings.commentsMarkup+'<div class="lg-comment-overlay"></div>');this.core.$toolbar.append('<button type="button" aria-label="Toggle comments" class="lg-comment-toggle lg-icon"></button>')},t.prototype.toggleCommentBox=function(){var t=this;this.core.outer.find(".lg-comment-toggle").first().on("click.lg.comment",function(){t.core.outer.toggleClass("lg-comment-active")}),this.core.outer.find(".lg-comment-overlay").first().on("click.lg.comment",function(){t.core.outer.removeClass("lg-comment-active")}),this.core.outer.find(".lg-comment-close").first().on("click.lg.comment",function(){t.core.outer.removeClass("lg-comment-active")})},t.prototype.addFbComments=function(){var e=this,o=this;this.core.LGel.on(i+".comment",function(t){t=e.core.galleryItems[t.detail.index].fbHtml;e.core.outer.find(".lg-comment-body").html(t)}),this.core.LGel.on(s+".comment",function(){try{FB.XFBML.parse()}catch(t){o.$LG(window).on("fbAsyncInit",function(){FB.XFBML.parse()})}})},t.prototype.addDisqusComments=function(){var n=this,t=this.$LG("#disqus_thread");t.remove(),this.core.outer.find(".lg-comment-body").append('<div id="disqus_thread"></div>'),this.core.LGel.on(i+".comment",function(){t.html("")}),this.core.LGel.on(s+".comment",function(t){var e=t.detail.index,o=n;setTimeout(function(){try{DISQUS.reset({reload:!0,config:function(){this.page.identifier=o.core.galleryItems[e].disqusIdentifier,this.page.url=o.core.galleryItems[e].disqusURL,this.page.title=o.settings.disqusConfig.title,this.language=o.settings.disqusConfig.language}})}catch(t){console.error("Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/")}},o.core.lGalleryOn?0:1e3)})},t.prototype.destroy=function(){this.core.LGel.off(".lg.comment"),this.core.LGel.off(".comment")},t});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgComment=e()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i="lgBeforeSlide",s="lgAfterSlide",n={commentBox:!1,fbComments:!1,disqusComments:!1,disqusConfig:{title:void 0,language:"en"},commentsMarkup:'<div id="lg-comment-box" class="lg-comment-box lg-fb-comment-box"><div class="lg-comment-header"><h3 class="lg-comment-title">Leave a comment.</h3><span class="lg-comment-close lg-icon"></span></div><div class="lg-comment-body"></div></div>'};function t(t,e){return this.core=t,this.$LG=e,this.settings=o(o({},n),this.core.settings),this}return t.prototype.init=function(){this.settings.commentBox&&(this.setMarkup(),this.toggleCommentBox(),this.settings.fbComments?this.addFbComments():this.settings.disqusComments&&this.addDisqusComments())},t.prototype.setMarkup=function(){this.core.$lgContent.append(this.settings.commentsMarkup+'<div class="lg-comment-overlay"></div>');this.core.$toolbar.append('<button type="button" aria-label="Toggle comments" class="lg-comment-toggle lg-icon"></button>')},t.prototype.toggleCommentBox=function(){var t=this;this.core.outer.find(".lg-comment-toggle").first().on("click.lg.comment",function(){t.core.outer.toggleClass("lg-comment-active")}),this.core.outer.find(".lg-comment-overlay").first().on("click.lg.comment",function(){t.core.outer.removeClass("lg-comment-active")}),this.core.outer.find(".lg-comment-close").first().on("click.lg.comment",function(){t.core.outer.removeClass("lg-comment-active")})},t.prototype.addFbComments=function(){var e=this,o=this;this.core.LGel.on(i+".comment",function(t){t=e.core.galleryItems[t.detail.index].fbHtml;e.core.outer.find(".lg-comment-body").html(t)}),this.core.LGel.on(s+".comment",function(){try{FB.XFBML.parse()}catch(t){o.$LG(window).on("fbAsyncInit",function(){FB.XFBML.parse()})}})},t.prototype.addDisqusComments=function(){var n=this,t=this.$LG("#disqus_thread");t.remove(),this.core.outer.find(".lg-comment-body").append('<div id="disqus_thread"></div>'),this.core.LGel.on(i+".comment",function(){t.html("")}),this.core.LGel.on(s+".comment",function(t){var e=t.detail.index,o=n;setTimeout(function(){try{DISQUS.reset({reload:!0,config:function(){this.page.identifier=o.core.galleryItems[e].disqusIdentifier,this.page.url=o.core.galleryItems[e].disqusURL,this.page.title=o.settings.disqusConfig.title,this.language=o.settings.disqusConfig.language}})}catch(t){console.error("Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/")}},o.core.lGalleryOn?0:1e3)})},t.prototype.destroy=function(){this.core.LGel.off(".lg.comment"),this.core.LGel.off(".comment")},t});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgComment = factory());
(global.lgComment = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l():"function"==typeof define&&define.amd?define(l):(e="undefined"!=typeof globalThis?globalThis:e||self).lgFullscreen=l()}(this,function(){"use strict";var n=function(){return(n=Object.assign||function(e){for(var l,n=1,t=arguments.length;n<t;n++)for(var c in l=arguments[n])Object.prototype.hasOwnProperty.call(l,c)&&(e[c]=l[c]);return e}).apply(this,arguments)},t={fullScreen:!0};function e(e,l){return this.core=e,this.$LG=l,this.settings=n(n({},t),this.core.settings),this}return e.prototype.init=function(){this.settings.fullScreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&(this.core.$toolbar.append('<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>'),this.fullScreen())},e.prototype.isFullScreen=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},e.prototype.requestFullscreen=function(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},e.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},e.prototype.fullScreen=function(){var e=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId,function(){e.core.lgOpened&&e.core.outer.toggleClass("lg-fullscreen-on")}),this.core.outer.find(".lg-fullscreen").first().on("click.lg",function(){e.isFullScreen()?e.exitFullscreen():e.requestFullscreen()})},e.prototype.closeGallery=function(){this.isFullScreen()&&this.exitFullscreen()},e.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId)},e});
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l():"function"==typeof define&&define.amd?define(l):e.lgFullscreen=l()}(this,function(){"use strict";var n=function(){return(n=Object.assign||function(e){for(var l,n=1,t=arguments.length;n<t;n++)for(var c in l=arguments[n])Object.prototype.hasOwnProperty.call(l,c)&&(e[c]=l[c]);return e}).apply(this,arguments)},t={fullScreen:!0};function e(e,l){return this.core=e,this.$LG=l,this.settings=n(n({},t),this.core.settings),this}return e.prototype.init=function(){this.settings.fullScreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&(this.core.$toolbar.append('<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>'),this.fullScreen())},e.prototype.isFullScreen=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},e.prototype.requestFullscreen=function(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},e.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},e.prototype.fullScreen=function(){var e=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId,function(){e.core.lgOpened&&e.core.outer.toggleClass("lg-fullscreen-on")}),this.core.outer.find(".lg-fullscreen").first().on("click.lg",function(){e.isFullScreen()?e.exitFullscreen():e.requestFullscreen()})},e.prototype.closeGallery=function(){this.isFullScreen()&&this.exitFullscreen()},e.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId)},e});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgFullscreen = factory());
(global.lgFullscreen = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgHash=e()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var s in e=arguments[o])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},e="lgAfterSlide",i="lgAfterClose",s={hash:!0,galleryId:"1",customSlideName:!1};function t(t,e){return this.core=t,this.$LG=e,this.settings=o(o({},s),this.core.settings),this}return t.prototype.init=function(){var t=this;this.settings.hash&&(this.oldHash=window.location.hash,setTimeout(function(){t.buildFromHash()},100),this.core.LGel.on(e+".hash",this.onAfterSlide.bind(this)),this.core.LGel.on(i+".hash",this.onCloseAfter.bind(this)),this.$LG(window).on("hashchange.lg.hash.global"+this.core.lgId,this.onHashchange.bind(this)))},t.prototype.onAfterSlide=function(t){var e=this.core.galleryItems[t.detail.index].slideName,e=this.settings.customSlideName&&e||t.detail.index;history.replaceState?history.replaceState(null,"",window.location.pathname+window.location.search+"#lg="+this.settings.galleryId+"&slide="+e):window.location.hash="lg="+this.settings.galleryId+"&slide="+e},t.prototype.getIndexFromUrl=function(t){void 0===t&&(t=window.location.hash);var e=t.split("&slide=")[1],o=0;if(this.settings.customSlideName)for(var i=0;i<this.core.galleryItems.length;i++){if(this.core.galleryItems[i].slideName===e){o=i;break}}else o=parseInt(e,10);return isNaN(o)?0:o},t.prototype.buildFromHash=function(){var t=window.location.hash;if(0<t.indexOf("lg="+this.settings.galleryId)){this.$LG(document.body).addClass("lg-from-hash");t=this.getIndexFromUrl(t);return this.core.openGallery(t),!0}},t.prototype.onCloseAfter=function(){this.oldHash&&this.oldHash.indexOf("lg="+this.settings.galleryId)<0?history.replaceState?history.replaceState(null,"",this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash=""},t.prototype.onHashchange=function(){var t,e;this.core.lgOpened&&(t=window.location.hash,e=this.getIndexFromUrl(t),-1<t.indexOf("lg="+this.settings.galleryId)?this.core.slide(e,!1,!1):this.core.lGalleryOn&&this.core.closeGallery())},t.prototype.closeGallery=function(){this.settings.hash&&this.$LG(document.body).removeClass("lg-from-hash")},t.prototype.destroy=function(){this.core.LGel.off(".lg.hash"),this.core.LGel.off(".hash"),this.$LG(window).off("hashchange.lg.hash.global"+this.core.lgId)},t});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgHash=e()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var s in e=arguments[o])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},e="lgAfterSlide",i="lgAfterClose",s={hash:!0,galleryId:"1",customSlideName:!1};function t(t,e){return this.core=t,this.$LG=e,this.settings=o(o({},s),this.core.settings),this}return t.prototype.init=function(){var t=this;this.settings.hash&&(this.oldHash=window.location.hash,setTimeout(function(){t.buildFromHash()},100),this.core.LGel.on(e+".hash",this.onAfterSlide.bind(this)),this.core.LGel.on(i+".hash",this.onCloseAfter.bind(this)),this.$LG(window).on("hashchange.lg.hash.global"+this.core.lgId,this.onHashchange.bind(this)))},t.prototype.onAfterSlide=function(t){var e=this.core.galleryItems[t.detail.index].slideName,e=this.settings.customSlideName&&e||t.detail.index;history.replaceState?history.replaceState(null,"",window.location.pathname+window.location.search+"#lg="+this.settings.galleryId+"&slide="+e):window.location.hash="lg="+this.settings.galleryId+"&slide="+e},t.prototype.getIndexFromUrl=function(t){void 0===t&&(t=window.location.hash);var e=t.split("&slide=")[1],o=0;if(this.settings.customSlideName)for(var i=0;i<this.core.galleryItems.length;i++){if(this.core.galleryItems[i].slideName===e){o=i;break}}else o=parseInt(e,10);return isNaN(o)?0:o},t.prototype.buildFromHash=function(){var t=window.location.hash;if(0<t.indexOf("lg="+this.settings.galleryId)){this.$LG(document.body).addClass("lg-from-hash");t=this.getIndexFromUrl(t);return this.core.openGallery(t),!0}},t.prototype.onCloseAfter=function(){this.oldHash&&this.oldHash.indexOf("lg="+this.settings.galleryId)<0?history.replaceState?history.replaceState(null,"",this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash=""},t.prototype.onHashchange=function(){var t,e;this.core.lgOpened&&(t=window.location.hash,e=this.getIndexFromUrl(t),-1<t.indexOf("lg="+this.settings.galleryId)?this.core.slide(e,!1,!1):this.core.lGalleryOn&&this.core.closeGallery())},t.prototype.closeGallery=function(){this.settings.hash&&this.$LG(document.body).removeClass("lg-from-hash")},t.prototype.destroy=function(){this.core.LGel.off(".lg.hash"),this.core.LGel.off(".hash"),this.$LG(window).off("hashchange.lg.hash.global"+this.core.lgId)},t});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgHash = factory());
(global.lgHash = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(o="undefined"!=typeof globalThis?globalThis:o||self).lgMediumZoom=t()}(this,function(){"use strict";var s=function(){return(s=Object.assign||function(o){for(var t,e=1,s=arguments.length;e<s;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=t[i]);return o}).apply(this,arguments)},t="lgBeforeOpen",i={margin:40,mediumZoom:!0,backgroundColor:"#000"};function o(o,t){var e=this;this.core=o,this.$LG=t;t={controls:!(this.core.getMediaContainerPosition=function(){return{top:e.settings.margin,bottom:e.settings.margin}}),download:!1,counter:!1,showCloseIcon:!1,extraProps:["lgBackgroundColor"],closeOnTap:!1,enableSwipe:!1,enableDrag:!1,swipeToClose:!1,addClass:this.core.settings.addClass+" lg-medium-zoom"};return this.core.settings=s(s({},this.core.settings),t),this.settings=s(s(s({},i),this.core.settings),t),this}return o.prototype.toggleItemClass=function(){for(var o=0;o<this.core.items.length;o++){this.$LG(this.core.items[o]).toggleClass("lg-medium-zoom-item")}},o.prototype.init=function(){var o=this;this.settings.mediumZoom&&(this.core.LGel.on(t+".medium",function(){o.core.$backdrop.css("background-color",o.core.galleryItems[o.core.index].lgBackgroundColor||o.settings.backgroundColor)}),this.toggleItemClass(),this.core.outer.on("click.lg.medium",function(){o.core.closeGallery()}))},o.prototype.destroy=function(){this.toggleItemClass()},o});
!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):o.lgMediumZoom=t()}(this,function(){"use strict";var s=function(){return(s=Object.assign||function(o){for(var t,e=1,s=arguments.length;e<s;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=t[i]);return o}).apply(this,arguments)},t="lgBeforeOpen",i={margin:40,mediumZoom:!0,backgroundColor:"#000"};function o(o,t){var e=this;this.core=o,this.$LG=t;t={controls:!(this.core.getMediaContainerPosition=function(){return{top:e.settings.margin,bottom:e.settings.margin}}),download:!1,counter:!1,showCloseIcon:!1,extraProps:["lgBackgroundColor"],closeOnTap:!1,enableSwipe:!1,enableDrag:!1,swipeToClose:!1,addClass:this.core.settings.addClass+" lg-medium-zoom"};return this.core.settings=s(s({},this.core.settings),t),this.settings=s(s(s({},i),this.core.settings),t),this}return o.prototype.toggleItemClass=function(){for(var o=0;o<this.core.items.length;o++){this.$LG(this.core.items[o]).toggleClass("lg-medium-zoom-item")}},o.prototype.init=function(){var o=this;this.settings.mediumZoom&&(this.core.LGel.on(t+".medium",function(){o.core.$backdrop.css("background-color",o.core.galleryItems[o.core.index].lgBackgroundColor||o.settings.backgroundColor)}),this.toggleItemClass(),this.core.outer.on("click.lg.medium",function(){o.core.closeGallery()}))},o.prototype.destroy=function(){this.toggleItemClass()},o});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgMediumZoom = factory());
(global.lgMediumZoom = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).lgPager=t()}(this,function(){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o="lgUpdateSlides",i="lgBeforeSlide",n={pager:!0};function e(e,t){return this.core=e,this.$LG=t,this.settings=r(r({},n),this.core.settings),this}return e.prototype.getPagerHtml=function(e){for(var t="",r=0;r<e.length;r++)t+='<span data-lg-item-id="'+r+'" class="lg-pager-cont"> \n <span data-lg-item-id="'+r+'" class="lg-pager"></span>\n <div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e[r].thumb+'" /></div>\n </span>';return t},e.prototype.init=function(){var e,t,r=this;this.settings.pager&&(this.core.$lgComponents.prepend('<div class="lg-pager-outer"></div>'),(t=this.core.outer.find(".lg-pager-outer")).html(this.getPagerHtml(this.core.galleryItems)),t.first().on("click.lg touchend.lg",function(e){e=r.$LG(e.target);e.hasAttribute("data-lg-item-id")&&(e=parseInt(e.attr("data-lg-item-id")),r.core.slide(e,!1,!0,!1))}),t.first().on("mouseover.lg",function(){clearTimeout(e),t.addClass("lg-pager-hover")}),t.first().on("mouseout.lg",function(){e=setTimeout(function(){t.removeClass("lg-pager-hover")})}),this.core.LGel.on(i+".pager",function(e){e=e.detail.index;r.manageActiveClass.call(r,e)}),this.core.LGel.on(o+".pager",function(){t.empty(),t.html(r.getPagerHtml(r.core.galleryItems)),r.manageActiveClass(r.core.index)}))},e.prototype.manageActiveClass=function(e){var t=this.core.outer.find(".lg-pager-cont");t.removeClass("lg-pager-active"),t.eq(e).addClass("lg-pager-active")},e.prototype.destroy=function(){this.core.outer.find(".lg-pager-outer").remove(),this.core.LGel.off(".lg.pager"),this.core.LGel.off(".pager")},e});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.lgPager=t()}(this,function(){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o="lgUpdateSlides",i="lgBeforeSlide",n={pager:!0};function e(e,t){return this.core=e,this.$LG=t,this.settings=r(r({},n),this.core.settings),this}return e.prototype.getPagerHtml=function(e){for(var t="",r=0;r<e.length;r++)t+='<span data-lg-item-id="'+r+'" class="lg-pager-cont"> \n <span data-lg-item-id="'+r+'" class="lg-pager"></span>\n <div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e[r].thumb+'" /></div>\n </span>';return t},e.prototype.init=function(){var e,t,r=this;this.settings.pager&&(this.core.$lgComponents.prepend('<div class="lg-pager-outer"></div>'),(t=this.core.outer.find(".lg-pager-outer")).html(this.getPagerHtml(this.core.galleryItems)),t.first().on("click.lg touchend.lg",function(e){e=r.$LG(e.target);e.hasAttribute("data-lg-item-id")&&(e=parseInt(e.attr("data-lg-item-id")),r.core.slide(e,!1,!0,!1))}),t.first().on("mouseover.lg",function(){clearTimeout(e),t.addClass("lg-pager-hover")}),t.first().on("mouseout.lg",function(){e=setTimeout(function(){t.removeClass("lg-pager-hover")})}),this.core.LGel.on(i+".pager",function(e){e=e.detail.index;r.manageActiveClass.call(r,e)}),this.core.LGel.on(o+".pager",function(){t.empty(),t.html(r.getPagerHtml(r.core.galleryItems)),r.manageActiveClass(r.core.index)}))},e.prototype.manageActiveClass=function(e){var t=this.core.outer.find(".lg-pager-cont");t.removeClass("lg-pager-active"),t.eq(e).addClass("lg-pager-active")},e.prototype.destroy=function(){this.core.outer.find(".lg-pager-outer").remove(),this.core.LGel.off(".lg.pager"),this.core.LGel.off(".pager")},e});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgPager = factory());
(global.lgPager = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgRelativeCaption=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},t="lgSlideItemLoad",o="lgBeforeSlide",n="lgAfterSlide",i={relativeCaption:!1};function s(t){this.core=t;t={addClass:this.core.settings.addClass+" lg-relative-caption"};return this.core.settings=e(e({},this.core.settings),t),this.settings=e(e(e({},i),this.core.settings),t),this}return s.prototype.init=function(){var i=this;this.settings.relativeCaption&&(this.core.LGel.on(t+".caption",function(t){var t=t.detail,e=t.index,t=t.delay;setTimeout(function(){i.setRelativeCaption(e)},t)}),this.core.LGel.on(n+".caption",function(t){var e=t.detail.index;setTimeout(function(){i.core.getSlideItem(e).hasClass("lg-complete")&&i.setRelativeCaption(e)})}),this.core.LGel.on(o+".caption",function(t){var e=t.detail.index;setTimeout(function(){i.core.getSlideItem(e).removeClass("lg-show-caption")})}))},s.prototype.setCaptionStyle=function(t,e){var i=this.core.getSlideItem(t).find(".lg-relative-caption-item"),o=this.core.getSlideItem(t).find(".lg-sub-html"),t=i.get().getBoundingClientRect(),i=e.bottom;e.height+t.height>=e.bottom&&(i-=t.height),o.css("width",e.width+"px").css("left",e.left+"px").css("top",i+"px")},s.prototype.setRelativeCaption=function(t){var e,i=this.core.getSlideItem(t);i.hasClass("lg-current")&&(e=this.core.getSlideItem(t).find(".lg-object").get().getBoundingClientRect(),this.setCaptionStyle(t,e),i.addClass("lg-show-caption"))},s.prototype.destroy=function(){this.core.LGel.off(".caption")},s});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgRelativeCaption=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},t="lgSlideItemLoad",o="lgBeforeSlide",n="lgAfterSlide",i={relativeCaption:!1};function s(t){this.core=t;t={addClass:this.core.settings.addClass+" lg-relative-caption"};return this.core.settings=e(e({},this.core.settings),t),this.settings=e(e(e({},i),this.core.settings),t),this}return s.prototype.init=function(){var i=this;this.settings.relativeCaption&&(this.core.LGel.on(t+".caption",function(t){var t=t.detail,e=t.index,t=t.delay;setTimeout(function(){i.setRelativeCaption(e)},t)}),this.core.LGel.on(n+".caption",function(t){var e=t.detail.index;setTimeout(function(){i.core.getSlideItem(e).hasClass("lg-complete")&&i.setRelativeCaption(e)})}),this.core.LGel.on(o+".caption",function(t){var e=t.detail.index;setTimeout(function(){i.core.getSlideItem(e).removeClass("lg-show-caption")})}))},s.prototype.setCaptionStyle=function(t,e){var i=this.core.getSlideItem(t).find(".lg-relative-caption-item"),o=this.core.getSlideItem(t).find(".lg-sub-html"),t=i.get().getBoundingClientRect(),i=e.bottom;e.height+t.height>=e.bottom&&(i-=t.height),o.css("width",e.width+"px").css("left",e.left+"px").css("top",i+"px")},s.prototype.setRelativeCaption=function(t){var e,i=this.core.getSlideItem(t);i.hasClass("lg-current")&&(e=this.core.getSlideItem(t).find(".lg-object").get().getBoundingClientRect(),this.setCaptionStyle(t,e),i.addClass("lg-show-caption"))},s.prototype.destroy=function(){this.core.LGel.off(".caption")},s});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgRelativeCaption = factory());
(global.lgRelativeCaption = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgRotate=e()}(this,function(){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},t="lgAfterAppendSlide",o="lgBeforeSlide",r={rotate:!0,rotateLeft:!0,rotateRight:!0,flipHorizontal:!0,flipVertical:!0};function e(t,e){return this.core=t,this.$LG=e,this.settings=i(i({},r),this.core.settings),this}return e.prototype.buildTemplates=function(){var t="";this.settings.flipVertical&&(t+='<button type="button" id="lg-flip-ver" aria-label="flip vertical" class="lg-flip-ver lg-icon"></button>'),this.settings.flipHorizontal&&(t+='<button type="button" id="lg-flip-hor" aria-label="Flip horizontal" class="lg-flip-hor lg-icon"></button>'),this.settings.rotateLeft&&(t+='<button type="button" id="lg-rotate-left" aria-label="Rotate left" class="lg-rotate-left lg-icon"></button>'),this.settings.rotateRight&&(t+='<button type="button" id="lg-rotate-right" aria-label="Rotate right" class="lg-rotate-right lg-icon"></button>'),this.core.$toolbar.append(t)},e.prototype.init=function(){var e=this;this.settings.rotate&&(this.buildTemplates(),this.rotateValuesList={},this.core.LGel.on(t+".rotate",function(t){t=t.detail.index;e.core.getSlideItem(t).find(".lg-img-wrap").first().wrap("lg-img-rotate")}),this.core.outer.find("#lg-rotate-left").first().on("click.lg",this.rotateLeft.bind(this)),this.core.outer.find("#lg-rotate-right").first().on("click.lg",this.rotateRight.bind(this)),this.core.outer.find("#lg-flip-hor").first().on("click.lg",this.flipHorizontal.bind(this)),this.core.outer.find("#lg-flip-ver").first().on("click.lg",this.flipVertical.bind(this)),this.core.LGel.on(o+".rotate",function(t){e.rotateValuesList[t.detail.index]||(e.rotateValuesList[t.detail.index]={rotate:0,flipHorizontal:1,flipVertical:1})}))},e.prototype.applyStyles=function(){this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().css("transform","rotate("+this.rotateValuesList[this.core.index].rotate+"deg) scale3d("+this.rotateValuesList[this.core.index].flipHorizontal+", "+this.rotateValuesList[this.core.index].flipVertical+", 1)")},e.prototype.rotateLeft=function(){this.rotateValuesList[this.core.index].rotate-=90,this.applyStyles()},e.prototype.rotateRight=function(){this.rotateValuesList[this.core.index].rotate+=90,this.applyStyles()},e.prototype.getCurrentRotation=function(t){if(!t)return 0;t=this.$LG(t).style(),t=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform")||"none";if("none"!==t){t=t.split("(")[1].split(")")[0].split(",");if(t){t=Math.round(Math.atan2(t[1],t[0])*(180/Math.PI));return t<0?t+360:t}}return 0},e.prototype.flipHorizontal=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),t=this.getCurrentRotation(t),t=90!==t&&270!==t?"flipHorizontal":"flipVertical";this.rotateValuesList[this.core.index][t]*=-1,this.applyStyles()},e.prototype.flipVertical=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),t=this.getCurrentRotation(t),t=90!==t&&270!==t?"flipVertical":"flipHorizontal";this.rotateValuesList[this.core.index][t]*=-1,this.applyStyles()},e.prototype.isImageOrientationChanged=function(){var t=this.rotateValuesList[this.core.index],e=Math.abs(t.rotate)%360!=0,i=t.flipHorizontal<0,t=t.flipVertical<0;return e||i||t},e.prototype.closeGallery=function(){this.isImageOrientationChanged()&&this.core.getSlideItem(this.core.index).css("opacity",0),this.rotateValuesList={}},e.prototype.destroy=function(){this.core.LGel.off(".lg.rotate"),this.core.LGel.off(".rotate")},e});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgRotate=e()}(this,function(){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},t="lgAfterAppendSlide",o="lgBeforeSlide",r={rotate:!0,rotateLeft:!0,rotateRight:!0,flipHorizontal:!0,flipVertical:!0};function e(t,e){return this.core=t,this.$LG=e,this.settings=i(i({},r),this.core.settings),this}return e.prototype.buildTemplates=function(){var t="";this.settings.flipVertical&&(t+='<button type="button" id="lg-flip-ver" aria-label="flip vertical" class="lg-flip-ver lg-icon"></button>'),this.settings.flipHorizontal&&(t+='<button type="button" id="lg-flip-hor" aria-label="Flip horizontal" class="lg-flip-hor lg-icon"></button>'),this.settings.rotateLeft&&(t+='<button type="button" id="lg-rotate-left" aria-label="Rotate left" class="lg-rotate-left lg-icon"></button>'),this.settings.rotateRight&&(t+='<button type="button" id="lg-rotate-right" aria-label="Rotate right" class="lg-rotate-right lg-icon"></button>'),this.core.$toolbar.append(t)},e.prototype.init=function(){var e=this;this.settings.rotate&&(this.buildTemplates(),this.rotateValuesList={},this.core.LGel.on(t+".rotate",function(t){t=t.detail.index;e.core.getSlideItem(t).find(".lg-img-wrap").first().wrap("lg-img-rotate")}),this.core.outer.find("#lg-rotate-left").first().on("click.lg",this.rotateLeft.bind(this)),this.core.outer.find("#lg-rotate-right").first().on("click.lg",this.rotateRight.bind(this)),this.core.outer.find("#lg-flip-hor").first().on("click.lg",this.flipHorizontal.bind(this)),this.core.outer.find("#lg-flip-ver").first().on("click.lg",this.flipVertical.bind(this)),this.core.LGel.on(o+".rotate",function(t){e.rotateValuesList[t.detail.index]||(e.rotateValuesList[t.detail.index]={rotate:0,flipHorizontal:1,flipVertical:1})}))},e.prototype.applyStyles=function(){this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().css("transform","rotate("+this.rotateValuesList[this.core.index].rotate+"deg) scale3d("+this.rotateValuesList[this.core.index].flipHorizontal+", "+this.rotateValuesList[this.core.index].flipVertical+", 1)")},e.prototype.rotateLeft=function(){this.rotateValuesList[this.core.index].rotate-=90,this.applyStyles()},e.prototype.rotateRight=function(){this.rotateValuesList[this.core.index].rotate+=90,this.applyStyles()},e.prototype.getCurrentRotation=function(t){if(!t)return 0;t=this.$LG(t).style(),t=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform")||"none";if("none"!==t){t=t.split("(")[1].split(")")[0].split(",");if(t){t=Math.round(Math.atan2(t[1],t[0])*(180/Math.PI));return t<0?t+360:t}}return 0},e.prototype.flipHorizontal=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),t=this.getCurrentRotation(t),t=90!==t&&270!==t?"flipHorizontal":"flipVertical";this.rotateValuesList[this.core.index][t]*=-1,this.applyStyles()},e.prototype.flipVertical=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),t=this.getCurrentRotation(t),t=90!==t&&270!==t?"flipVertical":"flipHorizontal";this.rotateValuesList[this.core.index][t]*=-1,this.applyStyles()},e.prototype.isImageOrientationChanged=function(){var t=this.rotateValuesList[this.core.index],e=Math.abs(t.rotate)%360!=0,i=t.flipHorizontal<0,t=t.flipVertical<0;return e||i||t},e.prototype.closeGallery=function(){this.isImageOrientationChanged()&&this.core.getSlideItem(this.core.index).css("opacity",0),this.rotateValuesList={}},e.prototype.destroy=function(){this.core.LGel.off(".lg.rotate"),this.core.LGel.off(".rotate")},e});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgRotate = factory());
(global.lgRotate = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgShare=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function t(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var o=Array(t),n=0,e=0;e<r;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,n++)o[n]=i[s];return o}var r={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",pinterest:!0,pinterestDropdownText:"Pinterest",additionalShareOptions:[]};function o(t){return"//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(t.facebookShareUrl||window.location.href)}function n(t){var e=encodeURIComponent(t.twitterShareUrl||window.location.href);return"//twitter.com/intent/tweet?text="+t.tweetText+"&url="+e}function i(t){var e=t.pinterestText,r=encodeURIComponent(t.src);return"http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(t.pinterestShareUrl||window.location.href)+"&media="+r+"&description="+e}var s="lgAfterSlide";function a(t){return this.shareOptions=[],this.core=t,this.settings=e(e({},r),this.core.settings),this}return a.prototype.init=function(){this.settings.share&&(this.shareOptions=t(this.getDefaultShareOptions(),this.settings.additionalShareOptions),this.setLgShareMarkup(),this.core.outer.find(".lg-share .lg-dropdown").append(this.getShareListHtml()),this.core.LGel.on(s+".share",this.onAfterSlide.bind(this)))},a.prototype.getShareListHtml=function(){var e="";return this.shareOptions.forEach(function(t){e+=t.dropdownHTML}),e},a.prototype.setLgShareMarkup=function(){var t=this;this.core.$toolbar.append('<button type="button" aria-label="Share" aria-haspopup="true" aria-expanded="false" class="lg-share lg-icon">\n <ul class="lg-dropdown" style="position: absolute;"></ul></button>'),this.core.$lgContent.append('<div class="lg-dropdown-overlay"></div>'),this.core.outer.find(".lg-share").first().on("click.lg",function(){t.core.outer.toggleClass("lg-dropdown-active"),t.core.outer.hasClass("lg-dropdown-active")?t.core.outer.attr("aria-expanded",!0):t.core.outer.attr("aria-expanded",!1)}),this.core.outer.find(".lg-dropdown-overlay").first().on("click.lg",function(){t.core.outer.removeClass("lg-dropdown-active"),t.core.outer.attr("aria-expanded",!1)})},a.prototype.onAfterSlide=function(t){var r=this,t=t.detail.index,o=this.core.galleryItems[t];setTimeout(function(){r.shareOptions.forEach(function(t){var e=t.selector;r.core.outer.find(e).attr("href",t.generateLink(o))})},100)},a.prototype.getShareListItemHTML=function(t,e){return'<li><a class="lg-share-'+t+'" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+e+"</span></a></li>"},a.prototype.getDefaultShareOptions=function(){return t(this.settings.facebook?[{type:"facebook",generateLink:o,dropdownHTML:this.getShareListItemHTML("facebook",this.settings.facebookDropdownText),selector:".lg-share-facebook"}]:[],this.settings.twitter?[{type:"twitter",generateLink:n,dropdownHTML:this.getShareListItemHTML("twitter",this.settings.twitterDropdownText),selector:".lg-share-twitter"}]:[],this.settings.pinterest?[{type:"pinterest",generateLink:i,dropdownHTML:this.getShareListItemHTML("pinterest",this.settings.pinterestDropdownText),selector:".lg-share-pinterest"}]:[])},a.prototype.destroy=function(){this.core.outer.find(".lg-dropdown-overlay").remove(),this.core.outer.find(".lg-share").remove(),this.core.LGel.off(".lg.share"),this.core.LGel.off(".share")},a});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgShare=e()}(this,function(){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function t(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var o=Array(t),n=0,e=0;e<r;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,n++)o[n]=i[s];return o}var r={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",pinterest:!0,pinterestDropdownText:"Pinterest",additionalShareOptions:[]};function o(t){return"//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(t.facebookShareUrl||window.location.href)}function n(t){var e=encodeURIComponent(t.twitterShareUrl||window.location.href);return"//twitter.com/intent/tweet?text="+t.tweetText+"&url="+e}function i(t){var e=t.pinterestText,r=encodeURIComponent(t.src);return"http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(t.pinterestShareUrl||window.location.href)+"&media="+r+"&description="+e}var s="lgAfterSlide";function a(t){return this.shareOptions=[],this.core=t,this.settings=e(e({},r),this.core.settings),this}return a.prototype.init=function(){this.settings.share&&(this.shareOptions=t(this.getDefaultShareOptions(),this.settings.additionalShareOptions),this.setLgShareMarkup(),this.core.outer.find(".lg-share .lg-dropdown").append(this.getShareListHtml()),this.core.LGel.on(s+".share",this.onAfterSlide.bind(this)))},a.prototype.getShareListHtml=function(){var e="";return this.shareOptions.forEach(function(t){e+=t.dropdownHTML}),e},a.prototype.setLgShareMarkup=function(){var t=this;this.core.$toolbar.append('<button type="button" aria-label="Share" aria-haspopup="true" aria-expanded="false" class="lg-share lg-icon">\n <ul class="lg-dropdown" style="position: absolute;"></ul></button>'),this.core.$lgContent.append('<div class="lg-dropdown-overlay"></div>'),this.core.outer.find(".lg-share").first().on("click.lg",function(){t.core.outer.toggleClass("lg-dropdown-active"),t.core.outer.hasClass("lg-dropdown-active")?t.core.outer.attr("aria-expanded",!0):t.core.outer.attr("aria-expanded",!1)}),this.core.outer.find(".lg-dropdown-overlay").first().on("click.lg",function(){t.core.outer.removeClass("lg-dropdown-active"),t.core.outer.attr("aria-expanded",!1)})},a.prototype.onAfterSlide=function(t){var r=this,t=t.detail.index,o=this.core.galleryItems[t];setTimeout(function(){r.shareOptions.forEach(function(t){var e=t.selector;r.core.outer.find(e).attr("href",t.generateLink(o))})},100)},a.prototype.getShareListItemHTML=function(t,e){return'<li><a class="lg-share-'+t+'" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+e+"</span></a></li>"},a.prototype.getDefaultShareOptions=function(){return t(this.settings.facebook?[{type:"facebook",generateLink:o,dropdownHTML:this.getShareListItemHTML("facebook",this.settings.facebookDropdownText),selector:".lg-share-facebook"}]:[],this.settings.twitter?[{type:"twitter",generateLink:n,dropdownHTML:this.getShareListItemHTML("twitter",this.settings.twitterDropdownText),selector:".lg-share-twitter"}]:[],this.settings.pinterest?[{type:"pinterest",generateLink:i,dropdownHTML:this.getShareListItemHTML("pinterest",this.settings.pinterestDropdownText),selector:".lg-share-pinterest"}]:[])},a.prototype.destroy=function(){this.core.outer.find(".lg-dropdown-overlay").remove(),this.core.outer.find(".lg-share").remove(),this.core.LGel.off(".lg.share"),this.core.LGel.off(".share")},a});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgShare = factory());
(global.lgShare = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgThumbnail=e()}(this,function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var h in e=arguments[i])Object.prototype.hasOwnProperty.call(e,h)&&(t[h]=e[h]);return t}).apply(this,arguments)},e={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",alignThumbnails:"middle",thumbWidth:100,thumbHeight:"80px",thumbMargin:5,appendThumbnailsTo:".lg-components",toggleThumb:!1,enableThumbDrag:!0,enableThumbSwipe:!0,thumbnailSwipeThreshold:10,loadYouTubeThumbnail:!0,youTubeThumbSize:1},s="lgContainerResize",h="lgUpdateSlides",n="lgBeforeOpen",o="lgBeforeSlide";function i(t,e){return this.thumbOuterWidth=0,this.thumbTotalWidth=0,this.translateX=0,this.thumbClickable=!1,this.core=t,this.$LG=e,this}return i.prototype.init=function(){this.settings=t(t({},e),this.core.settings),this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.galleryItems.length*(this.settings.thumbWidth+this.settings.thumbMargin),this.translateX=0,this.setAnimateThumbStyles(),this.core.settings.allowMediaOverlap||(this.settings.toggleThumb=!1),this.settings.thumbnail&&(this.build(),this.settings.animateThumb?(this.settings.enableThumbDrag&&this.enableThumbDrag(),this.settings.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggleThumbBar(),this.thumbKeyPress())},i.prototype.build=function(){var i=this;this.setThumbMarkup(),this.manageActiveClassOnSlideChange(),this.$lgThumb.first().on("click.lg touchend.lg",function(t){var e=i.$LG(t.target);e.hasAttribute("data-lg-item-id")&&setTimeout(function(){var t;i.thumbClickable&&!i.core.lgBusy&&(t=parseInt(e.attr("data-lg-item-id")),i.core.slide(t,!1,!0,!1))},50)}),this.core.LGel.on(o+".thumb",function(t){t=t.detail.index;i.animateThumb(t)}),this.core.LGel.on(n+".thumb",function(){i.thumbOuterWidth=i.core.outer.get().offsetWidth}),this.core.LGel.on(h+".thumb",function(){i.rebuildThumbnails()}),this.core.LGel.on(s+".thumb",function(){i.core.lgOpened&&setTimeout(function(){i.thumbOuterWidth=i.core.outer.get().offsetWidth,i.animateThumb(i.core.index),i.thumbOuterWidth=i.core.outer.get().offsetWidth},50)})},i.prototype.setThumbMarkup=function(){var t="lg-thumb-outer ";this.settings.alignThumbnails&&(t+="lg-thumb-align-"+this.settings.alignThumbnails);t='<div class="'+t+'">\n <div class="lg-thumb lg-group">\n </div>\n </div>';this.core.outer.addClass("lg-has-thumb"),(".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents:this.core.outer).append(t),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},i.prototype.enableThumbDrag=function(){var e=this,i={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},s=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(t){e.thumbTotalWidth>e.thumbOuterWidth&&(t.preventDefault(),i.cords.startX=t.pageX,i.startTime=new Date,e.thumbClickable=!1,s=!0,e.core.outer.get().scrollLeft+=1,--e.core.outer.get().scrollLeft,e.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(t){e.core.lgOpened&&s&&(i.cords.endX=t.pageX,i=e.onThumbTouchMove(i))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){e.core.lgOpened&&(i.isMoved?i=e.onThumbTouchEnd(i):e.thumbClickable=!0,s&&(s=!1,e.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))})},i.prototype.enableThumbSwipe=function(){var e=this,i={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(t){e.thumbTotalWidth>e.thumbOuterWidth&&(t.preventDefault(),i.cords.startX=t.targetTouches[0].pageX,e.thumbClickable=!1,i.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(t){e.thumbTotalWidth>e.thumbOuterWidth&&(t.preventDefault(),i.cords.endX=t.targetTouches[0].pageX,i=e.onThumbTouchMove(i))}),this.$lgThumb.on("touchend.lg",function(){i.isMoved?i=e.onThumbTouchEnd(i):e.thumbClickable=!0})},i.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)},50),setTimeout(function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},i.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},i.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},i.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},i.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},i.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,e=Math.abs(i)/e;return.15<e&&t.endTime.valueOf()-t.touchMoveTime<30?(2<(e+=1)&&(e+=1),e+=e*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(e-1,2)+"settings"),i*=e,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)<this.settings.thumbnailSwipeThreshold&&(this.thumbClickable=!0),t},i.prototype.getThumbHtml=function(t,e){var i=this.core.galleryItems[e].__slideVideoInfo||{},t=i.youtube&&this.settings.loadYouTubeThumbnail?"//img.youtube.com/vi/"+i.youtube[1]+"/"+this.settings.youTubeThumbSize+".jpg":t;return'<div data-lg-item-id="'+e+'" class="lg-thumb-item '+(e===this.core.index?" active":"")+'" \n style="width:'+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+";\n margin-right: "+this.settings.thumbMargin+'px;">\n <img data-lg-item-id="'+e+'" src="'+t+'" />\n </div>'},i.prototype.getThumbItemHtml=function(t){for(var e="",i=0;i<t.length;i++)e+=this.getThumbHtml(t[i].thumb,i);return e},i.prototype.setThumbItemHtml=function(t){t=this.getThumbItemHtml(t);this.$lgThumb.html(t)},i.prototype.setAnimateThumbStyles=function(){this.settings.animateThumb&&this.core.outer.addClass("lg-animate-thumb")},i.prototype.manageActiveClassOnSlideChange=function(){var i=this;this.core.LGel.on(o+".thumb",function(t){var e=i.core.outer.find(".lg-thumb-item"),t=t.detail.index;e.removeClass("active"),e.eq(t).addClass("active")})},i.prototype.toggleThumbBar=function(){var t=this;this.settings.toggleThumb&&(this.core.outer.addClass("lg-can-toggle"),this.core.$toolbar.append('<button type="button" aria-label="Toggle thumbnails" class="lg-toggle-thumb lg-icon"></button>'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){t.core.outer.toggleClass("lg-components-open")}))},i.prototype.thumbKeyPress=function(){var e=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(t){e.core.lgOpened&&e.settings.toggleThumb&&(38===t.keyCode?(t.preventDefault(),e.core.outer.addClass("lg-components-open")):40===t.keyCode&&(t.preventDefault(),e.core.outer.removeClass("lg-components-open")))})},i.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},i});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgThumbnail=e()}(this,function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var h in e=arguments[i])Object.prototype.hasOwnProperty.call(e,h)&&(t[h]=e[h]);return t}).apply(this,arguments)},e={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",alignThumbnails:"middle",thumbWidth:100,thumbHeight:"80px",thumbMargin:5,appendThumbnailsTo:".lg-components",toggleThumb:!1,enableThumbDrag:!0,enableThumbSwipe:!0,thumbnailSwipeThreshold:10,loadYouTubeThumbnail:!0,youTubeThumbSize:1},s="lgContainerResize",h="lgUpdateSlides",n="lgBeforeOpen",o="lgBeforeSlide";function i(t,e){return this.thumbOuterWidth=0,this.thumbTotalWidth=0,this.translateX=0,this.thumbClickable=!1,this.core=t,this.$LG=e,this}return i.prototype.init=function(){this.settings=t(t({},e),this.core.settings),this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.galleryItems.length*(this.settings.thumbWidth+this.settings.thumbMargin),this.translateX=0,this.setAnimateThumbStyles(),this.core.settings.allowMediaOverlap||(this.settings.toggleThumb=!1),this.settings.thumbnail&&(this.build(),this.settings.animateThumb?(this.settings.enableThumbDrag&&this.enableThumbDrag(),this.settings.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggleThumbBar(),this.thumbKeyPress())},i.prototype.build=function(){var i=this;this.setThumbMarkup(),this.manageActiveClassOnSlideChange(),this.$lgThumb.first().on("click.lg touchend.lg",function(t){var e=i.$LG(t.target);e.hasAttribute("data-lg-item-id")&&setTimeout(function(){var t;i.thumbClickable&&!i.core.lgBusy&&(t=parseInt(e.attr("data-lg-item-id")),i.core.slide(t,!1,!0,!1))},50)}),this.core.LGel.on(o+".thumb",function(t){t=t.detail.index;i.animateThumb(t)}),this.core.LGel.on(n+".thumb",function(){i.thumbOuterWidth=i.core.outer.get().offsetWidth}),this.core.LGel.on(h+".thumb",function(){i.rebuildThumbnails()}),this.core.LGel.on(s+".thumb",function(){i.core.lgOpened&&setTimeout(function(){i.thumbOuterWidth=i.core.outer.get().offsetWidth,i.animateThumb(i.core.index),i.thumbOuterWidth=i.core.outer.get().offsetWidth},50)})},i.prototype.setThumbMarkup=function(){var t="lg-thumb-outer ";this.settings.alignThumbnails&&(t+="lg-thumb-align-"+this.settings.alignThumbnails);t='<div class="'+t+'">\n <div class="lg-thumb lg-group">\n </div>\n </div>';this.core.outer.addClass("lg-has-thumb"),(".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents:this.core.outer).append(t),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},i.prototype.enableThumbDrag=function(){var e=this,i={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},s=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(t){e.thumbTotalWidth>e.thumbOuterWidth&&(t.preventDefault(),i.cords.startX=t.pageX,i.startTime=new Date,e.thumbClickable=!1,s=!0,e.core.outer.get().scrollLeft+=1,--e.core.outer.get().scrollLeft,e.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(t){e.core.lgOpened&&s&&(i.cords.endX=t.pageX,i=e.onThumbTouchMove(i))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){e.core.lgOpened&&(i.isMoved?i=e.onThumbTouchEnd(i):e.thumbClickable=!0,s&&(s=!1,e.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))})},i.prototype.enableThumbSwipe=function(){var e=this,i={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(t){e.thumbTotalWidth>e.thumbOuterWidth&&(t.preventDefault(),i.cords.startX=t.targetTouches[0].pageX,e.thumbClickable=!1,i.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(t){e.thumbTotalWidth>e.thumbOuterWidth&&(t.preventDefault(),i.cords.endX=t.targetTouches[0].pageX,i=e.onThumbTouchMove(i))}),this.$lgThumb.on("touchend.lg",function(){i.isMoved?i=e.onThumbTouchEnd(i):e.thumbClickable=!0})},i.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)},50),setTimeout(function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},i.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},i.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},i.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},i.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},i.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,e=Math.abs(i)/e;return.15<e&&t.endTime.valueOf()-t.touchMoveTime<30?(2<(e+=1)&&(e+=1),e+=e*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(e-1,2)+"settings"),i*=e,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)<this.settings.thumbnailSwipeThreshold&&(this.thumbClickable=!0),t},i.prototype.getThumbHtml=function(t,e){var i=this.core.galleryItems[e].__slideVideoInfo||{},t=i.youtube&&this.settings.loadYouTubeThumbnail?"//img.youtube.com/vi/"+i.youtube[1]+"/"+this.settings.youTubeThumbSize+".jpg":t;return'<div data-lg-item-id="'+e+'" class="lg-thumb-item '+(e===this.core.index?" active":"")+'" \n style="width:'+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+";\n margin-right: "+this.settings.thumbMargin+'px;">\n <img data-lg-item-id="'+e+'" src="'+t+'" />\n </div>'},i.prototype.getThumbItemHtml=function(t){for(var e="",i=0;i<t.length;i++)e+=this.getThumbHtml(t[i].thumb,i);return e},i.prototype.setThumbItemHtml=function(t){t=this.getThumbItemHtml(t);this.$lgThumb.html(t)},i.prototype.setAnimateThumbStyles=function(){this.settings.animateThumb&&this.core.outer.addClass("lg-animate-thumb")},i.prototype.manageActiveClassOnSlideChange=function(){var i=this;this.core.LGel.on(o+".thumb",function(t){var e=i.core.outer.find(".lg-thumb-item"),t=t.detail.index;e.removeClass("active"),e.eq(t).addClass("active")})},i.prototype.toggleThumbBar=function(){var t=this;this.settings.toggleThumb&&(this.core.outer.addClass("lg-can-toggle"),this.core.$toolbar.append('<button type="button" aria-label="Toggle thumbnails" class="lg-toggle-thumb lg-icon"></button>'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){t.core.outer.toggleClass("lg-components-open")}))},i.prototype.thumbKeyPress=function(){var e=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(t){e.core.lgOpened&&e.settings.toggleThumb&&(38===t.keyCode?(t.preventDefault(),e.core.outer.addClass("lg-components-open")):40===t.keyCode&&(t.preventDefault(),e.core.outer.removeClass("lg-components-open")))})},i.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},i});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgThumbnail = factory());
(global.lgThumbnail = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).lgVideo=o()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(e){for(var o,i=1,t=arguments.length;i<t;i++)for(var s in o=arguments[i])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e}).apply(this,arguments)},i={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsOptions:{}},e="lgHasVideo",t="lgBeforeSlide",s="lgAfterSlide",l="lgPosterClick";function g(o){return Object.keys(o).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(o[e])}).join("&")}function n(e){return this.core=e,this.settings=o(o({},i),this.core.settings),this}return n.prototype.init=function(){var o=this;this.core.LGel.on(e+".video",this.onHasVideo.bind(this)),this.core.settings.enableSwipe||this.core.settings.enableDrag?this.core.LGel.on(l+".video",function(){var e=o.core.getSlideItem(o.core.index);o.loadVideoOnPosterClick(e)}):this.core.outer.find(".lg-item").first().on("click.lg",function(){var e=o.core.getSlideItem(o.core.index);o.loadVideoOnPosterClick(e)}),this.core.LGel.on(t+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(s+".video",this.onAfterSlide.bind(this))},n.prototype.onHasVideo=function(e){var o=e.detail,i=o.index,t=o.src,s=o.html5Video,e=o.hasPoster,o=o.isFirstSlide;e||(this.appendVideos(this.core.getSlideItem(i),{src:t,addClass:"lg-object",index:i,html5Video:s}),this.gotoNextSlideOnVideoEnd(t,i)),this.settings.autoplayFirstVideo&&o&&(e?(e=this.core.getSlideItem(i),this.loadVideoOnPosterClick(e)):this.playVideo(i))},n.prototype.onBeforeSlide=function(e){var o=e.detail,e=o.prevIndex,o=o.index;this.pauseVideo(e);o=this.core.galleryItems[o].__slideVideoInfo||{};(o.youtube||o.vimeo||o.wistia)&&this.core.outer.addClass("lg-hide-download")},n.prototype.onAfterSlide=function(e){var o=this,i=e.detail.index;this.settings.autoplayVideoOnSlide&&this.core.lGalleryOn&&setTimeout(function(){var e=o.core.getSlideItem(i);e.hasClass("lg-video-loaded")?o.playVideo(i):o.loadVideoOnPosterClick(e)},100)},n.prototype.playVideo=function(e){this.controlVideo(e,"play")},n.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},n.prototype.getVideoHtml=function(e,o,i,t){var s="",l=this.core.galleryItems[i].__slideVideoInfo||{},n=this.core.galleryItems[i],r=(r=n.title||n.alt)?'title="'+r+'"':"",n='allowtransparency="true" \n frameborder="0" \n scrolling="no" \n allowfullscreen \n mozallowfullscreen \n webkitallowfullscreen \n oallowfullscreen \n msallowfullscreen';if(l.youtube)var d="lg-youtube"+i,a="?wmode=opaque&autoplay=0&enablejsapi=1"+(this.settings.youTubePlayerParams?"&"+g(this.settings.youTubePlayerParams):""),s='<iframe allow="autoplay" id='+d+' class="lg-video-object lg-youtube '+o+'" '+r+' src="//www.youtube.com/embed/'+(l.youtube[1]+a)+'" '+n+"></iframe>";else if(l.vimeo){d="lg-vimeo"+i,a=g(this.settings.vimeoPlayerParams);s='<iframe allow="autoplay" id='+d+' class="lg-video-object lg-vimeo '+o+'" '+r+' src="//player.vimeo.com/video/'+(l.vimeo[1]+a)+'" '+n+"></iframe>"}else if(l.wistia){i="lg-wistia"+i,a=g(this.settings.wistiaPlayerParams);s='<iframe allow="autoplay" id="'+i+'" src="//fast.wistia.net/embed/iframe/'+(l.wistia[4]+a)+'" '+r+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+n+"></iframe>"}else if(l.html5){for(var c="",u=0;u<t.source.length;u++)c+='<source src="'+t.source[u].src+'" type="'+t.source[u].type+'">';var f="",h=t.attributes||{};Object.keys(h||{}).forEach(function(e){f+=e+'="'+h[e]+'" '}),s='<video class="lg-video-object lg-html5 '+(this.settings.videojs?"video-js":"")+'" '+f+">\n "+c+"\n Your browser does not support HTML5 video.\n </video>"}return s},n.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(this.settings.videojs&&null!==(i=this.core.galleryItems[o.index].__slideVideoInfo)&&void 0!==i&&i.html5)try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.error("lightGallery:- Make sure you have included videojs")}},n.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),o=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(o.html5)t.on("ended",function(){i.core.goToNextSlide()});else if(o.vimeo)try{new Vimeo.Player(t.get()).on("ended",function(){i.core.goToNextSlide()})}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(o.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",function(){i.core.goToNextSlide()})}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},n.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),e=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(e.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(e.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(e.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included videojs")}else i.get()[o]();else if(e.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},n.prototype.loadVideoOnPosterClick=function(e){var o,i,t,s,l=this;e.hasClass("lg-video-loaded")||(e.hasClass("lg-has-video")?this.playVideo(this.core.index):(e.addClass("lg-has-video"),o=void 0,s=this.core.galleryItems[this.core.index].src,(i=this.core.galleryItems[this.core.index].video)&&(o="string"==typeof i?JSON.parse(i):i),t=this.appendVideos(e,{src:s,addClass:"",index:this.core.index,html5Video:o}),this.gotoNextSlideOnVideoEnd(s,this.core.index),s=e.find(".lg-object").first().get(),e.find(".lg-video-cont").first().append(s),e.addClass("lg-video-loading"),t&&t.ready(function(){t.on("loadedmetadata",function(){l.onVideoLoadAfterPosterClick(e,l.core.index)})}),e.find(".lg-video-object").first().on("load.lg error.lg loadeddata.lg",function(){setTimeout(function(){l.onVideoLoadAfterPosterClick(e,l.core.index)},50)})))},n.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},n.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},n});
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):e.lgVideo=o()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(e){for(var o,i=1,t=arguments.length;i<t;i++)for(var s in o=arguments[i])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e}).apply(this,arguments)},i={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsOptions:{}},e="lgHasVideo",t="lgBeforeSlide",s="lgAfterSlide",l="lgPosterClick";function g(o){return Object.keys(o).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(o[e])}).join("&")}function n(e){return this.core=e,this.settings=o(o({},i),this.core.settings),this}return n.prototype.init=function(){var o=this;this.core.LGel.on(e+".video",this.onHasVideo.bind(this)),this.core.settings.enableSwipe||this.core.settings.enableDrag?this.core.LGel.on(l+".video",function(){var e=o.core.getSlideItem(o.core.index);o.loadVideoOnPosterClick(e)}):this.core.outer.find(".lg-item").first().on("click.lg",function(){var e=o.core.getSlideItem(o.core.index);o.loadVideoOnPosterClick(e)}),this.core.LGel.on(t+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(s+".video",this.onAfterSlide.bind(this))},n.prototype.onHasVideo=function(e){var o=e.detail,i=o.index,t=o.src,s=o.html5Video,e=o.hasPoster,o=o.isFirstSlide;e||(this.appendVideos(this.core.getSlideItem(i),{src:t,addClass:"lg-object",index:i,html5Video:s}),this.gotoNextSlideOnVideoEnd(t,i)),this.settings.autoplayFirstVideo&&o&&(e?(e=this.core.getSlideItem(i),this.loadVideoOnPosterClick(e)):this.playVideo(i))},n.prototype.onBeforeSlide=function(e){var o=e.detail,e=o.prevIndex,o=o.index;this.pauseVideo(e);o=this.core.galleryItems[o].__slideVideoInfo||{};(o.youtube||o.vimeo||o.wistia)&&this.core.outer.addClass("lg-hide-download")},n.prototype.onAfterSlide=function(e){var o=this,i=e.detail.index;this.settings.autoplayVideoOnSlide&&this.core.lGalleryOn&&setTimeout(function(){var e=o.core.getSlideItem(i);e.hasClass("lg-video-loaded")?o.playVideo(i):o.loadVideoOnPosterClick(e)},100)},n.prototype.playVideo=function(e){this.controlVideo(e,"play")},n.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},n.prototype.getVideoHtml=function(e,o,i,t){var s="",l=this.core.galleryItems[i].__slideVideoInfo||{},n=this.core.galleryItems[i],r=(r=n.title||n.alt)?'title="'+r+'"':"",n='allowtransparency="true" \n frameborder="0" \n scrolling="no" \n allowfullscreen \n mozallowfullscreen \n webkitallowfullscreen \n oallowfullscreen \n msallowfullscreen';if(l.youtube)var d="lg-youtube"+i,a="?wmode=opaque&autoplay=0&enablejsapi=1"+(this.settings.youTubePlayerParams?"&"+g(this.settings.youTubePlayerParams):""),s='<iframe allow="autoplay" id='+d+' class="lg-video-object lg-youtube '+o+'" '+r+' src="//www.youtube.com/embed/'+(l.youtube[1]+a)+'" '+n+"></iframe>";else if(l.vimeo){d="lg-vimeo"+i,a=g(this.settings.vimeoPlayerParams);s='<iframe allow="autoplay" id='+d+' class="lg-video-object lg-vimeo '+o+'" '+r+' src="//player.vimeo.com/video/'+(l.vimeo[1]+a)+'" '+n+"></iframe>"}else if(l.wistia){i="lg-wistia"+i,a=g(this.settings.wistiaPlayerParams);s='<iframe allow="autoplay" id="'+i+'" src="//fast.wistia.net/embed/iframe/'+(l.wistia[4]+a)+'" '+r+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+n+"></iframe>"}else if(l.html5){for(var c="",u=0;u<t.source.length;u++)c+='<source src="'+t.source[u].src+'" type="'+t.source[u].type+'">';var f="",h=t.attributes||{};Object.keys(h||{}).forEach(function(e){f+=e+'="'+h[e]+'" '}),s='<video class="lg-video-object lg-html5 '+(this.settings.videojs?"video-js":"")+'" '+f+">\n "+c+"\n Your browser does not support HTML5 video.\n </video>"}return s},n.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(this.settings.videojs&&null!==(i=this.core.galleryItems[o.index].__slideVideoInfo)&&void 0!==i&&i.html5)try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.error("lightGallery:- Make sure you have included videojs")}},n.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),o=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(o.html5)t.on("ended",function(){i.core.goToNextSlide()});else if(o.vimeo)try{new Vimeo.Player(t.get()).on("ended",function(){i.core.goToNextSlide()})}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(o.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",function(){i.core.goToNextSlide()})}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},n.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),e=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(e.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(e.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(e.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included videojs")}else i.get()[o]();else if(e.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},n.prototype.loadVideoOnPosterClick=function(e){var o,i,t,s,l=this;e.hasClass("lg-video-loaded")||(e.hasClass("lg-has-video")?this.playVideo(this.core.index):(e.addClass("lg-has-video"),o=void 0,s=this.core.galleryItems[this.core.index].src,(i=this.core.galleryItems[this.core.index].video)&&(o="string"==typeof i?JSON.parse(i):i),t=this.appendVideos(e,{src:s,addClass:"",index:this.core.index,html5Video:o}),this.gotoNextSlideOnVideoEnd(s,this.core.index),s=e.find(".lg-object").first().get(),e.find(".lg-video-cont").first().append(s),e.addClass("lg-video-loading"),t&&t.ready(function(){t.on("loadedmetadata",function(){l.onVideoLoadAfterPosterClick(e,l.core.index)})}),e.find(".lg-video-object").first().on("load.lg error.lg loadeddata.lg",function(){setTimeout(function(){l.onVideoLoadAfterPosterClick(e,l.core.index)},50)})))},n.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},n.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},n});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgVideo = factory());
(global.lgVideo = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgZoom=e()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,o=1,a=arguments.length;o<a;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a={scale:1,zoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300},t="lgContainerResize",e="lgBeforeOpen",i="lgSlideItemLoad",s="lgAfterSlide";function r(t,e){return this.core=t,this.$LG=e,this.settings=o(o({},a),this.core.settings),this}return r.prototype.buildTemplates=function(){var t=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="Zoom in" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="Zoom out" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(t+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="View actual size" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},r.prototype.enableZoom=function(t){var e=this,o=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.core.getSlideItem(t.detail.index).addClass("lg-zoomable")},o+30)},r.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(i+".zoom",this.enableZoom.bind(this))},r.prototype.getModifier=function(t,e,o){var a=t;t=Math.abs(t);var i=this.getCurrentTransform(o);if(!i)return 1;var s,o=1;return"X"===e?(s=Math.sign(parseFloat(i[0])),0===t||180===t?o=1:90===t&&(o=-90===a&&1===s||90===a&&-1===s?-1:1),o*=s):(s=Math.sign(parseFloat(i[3])),0===t||180===t?o=1:90===t&&(t=parseFloat(i[1]),i=parseFloat(i[2]),o=Math.sign(t*i*a*s)),o*=s),o},r.prototype.getImageSize=function(t,e,o){return 90===e&&(o="x"===o?"y":"x"),t[{y:"offsetHeight",x:"offsetWidth"}[o]]},r.prototype.getDragCords=function(t,e){return 90===e?{x:t.pageY,y:t.pageX}:{x:t.pageX,y:t.pageY}},r.prototype.getSwipeCords=function(t,e){var o=t.targetTouches[0].pageX,t=t.targetTouches[0].pageY;return 90===e?{x:t,y:o}:{x:o,y:t}},r.prototype.getDragAllowedAxises=function(t,e){var o=this.core.$lgContent.get(),a=parseFloat(t.attr("data-scale"))||1,i=t.get(),t=this.getImageSize(i,e,"y")*a>o.clientHeight,o=this.getImageSize(i,e,"x")*a>o.clientWidth;return 90===e?{allowX:t,allowY:o}:{allowX:o,allowY:t}},r.prototype.getCurrentTransform=function(t){if(t){t=window.getComputedStyle(t,null),t=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform")||"none";return"none"!==t?t.split("(")[1].split(")")[0].split(","):void 0}},r.prototype.getCurrentRotation=function(t){if(!t)return 0;t=this.getCurrentTransform(t);return t?Math.round(Math.atan2(parseFloat(t[1]),parseFloat(t[0]))*(180/Math.PI)):0},r.prototype.zoomImage=function(t){var e,o,a=this.core.getSlideItem(this.core.index).find(".lg-image").first(),i=a.get();i&&(o=((e=this.core.outer.get().getBoundingClientRect()).width-i.offsetWidth)/2+e.left,i=(e.height-i.offsetHeight)/2+this.$LG(window).scrollTop()+e.top,1===t&&(this.positionChanged=!1),this.positionChanged&&(e=parseFloat(a.parent().attr("data-x"))/(parseFloat(a.attr("data-scale"))-1),a=parseFloat(a.parent().attr("data-y"))/(parseFloat(a.attr("data-scale"))-1),this.pageX=e+o,this.pageY=a+i,this.positionChanged=!1),o=(t-1)*(this.pageX-o),i=(t-1)*(this.pageY-i),this.setZoomStyles({x:o,y:i,scale:t}))},r.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first(),a=e.parent();e.attr("data-scale",t.scale+"").css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),o.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");o="translate3d(-"+t.x+"px, -"+t.y+"px, 0)";a.css("transform",o),a.attr("data-x",t.x).attr("data-y",t.y)},r.prototype.setActualSize=function(t,e){var o,a=this;this.core.galleryItems[this.core.index].src&&!this.core.outer.hasClass("lg-first-slide-loading")&&(o=this.getCurrentImageActualSizeScale(),this.core.outer.hasClass("lg-zoomed")?this.scale=1:this.scale=this.getScale(o),this.setPageCords(e),this.beginZoom(this.scale),this.zoomImage(this.scale),setTimeout(function(){a.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},10))},r.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),t=this.core.galleryItems[t].width;return t?parseFloat(t):e.get().naturalWidth},r.prototype.getActualSizeScale=function(t,e){e=e<t?t/e||2:1;return e},r.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,e=this.getNaturalWidth(this.core.index)||t;return this.getActualSizeScale(e,t)},r.prototype.getPageCords=function(t){var e={};return t?(e.x=t.pageX||t.targetTouches[0].pageX,e.y=t.pageY||t.targetTouches[0].pageY):(t=this.core.outer.get().getBoundingClientRect(),e.x=t.width/2+t.left,e.y=t.height/2+this.$LG(window).scrollTop()+t.top),e},r.prototype.setPageCords=function(t){t=this.getPageCords(t);this.pageX=t.x,this.pageY=t.y},r.prototype.beginZoom=function(t){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),1<t?(this.core.outer.addClass("lg-zoomed"),this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)):this.resetZoom(),1<t},r.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:e<t&&(t=e),t},r.prototype.init=function(){var o,a=this;this.settings.zoom&&(this.buildTemplates(),this.enableZoomOnSlideItemLoad(),o=null,this.core.outer.on("dblclick.lg",function(t){a.$LG(t.target).hasClass("lg-image")&&a.setActualSize(a.core.index,t)}),this.core.outer.on("touchstart.lg",function(t){var e=a.$LG(t.target);1===t.targetTouches.length&&e.hasClass("lg-image")&&(o?(clearTimeout(o),o=null,a.setActualSize(a.core.index,t)):o=setTimeout(function(){o=null},300),t.preventDefault())}),this.core.LGel.on(t+".zoom",function(){a.core.lgOpened&&(a.setPageCords(),a.zoomImage(a.scale))}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){a.core.outer.find(".lg-current .lg-image").get()&&(a.scale-=a.settings.scale,a.scale=a.getScale(a.scale),a.beginZoom(a.scale),a.zoomImage(a.scale))}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){a.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){a.setActualSize(a.core.index)}),this.core.LGel.on(e+".zoom",function(){a.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(s+".zoom",function(t){t=t.detail.prevIndex;a.scale=1,a.positionChanged=!1,a.resetZoom(t)}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.pageX=this.core.outer.width()/2,this.pageY=this.core.outer.height()/2+this.$LG(window).scrollTop(),this.scale=1)},r.prototype.zoomIn=function(t){this.core.galleryItems[this.core.index].src&&(t?this.scale=t:this.scale+=this.settings.scale,this.scale=this.getScale(this.scale),this.beginZoom(this.scale),this.zoomImage(this.scale))},r.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),t=this.core.getSlideItem(void 0!==t?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),t.find(".lg-img-wrap").first().removeAttr("style data-x data-y"),t.find(".lg-image").first().removeAttr("style data-scale"),this.setPageCords()},r.prototype.getTouchDistance=function(t){return Math.sqrt((t.targetTouches[0].pageX-t.targetTouches[1].pageX)*(t.targetTouches[0].pageX-t.targetTouches[1].pageX)+(t.targetTouches[0].pageY-t.targetTouches[1].pageY)*(t.targetTouches[0].pageY-t.targetTouches[1].pageY))},r.prototype.pinchZoom=function(){var e=this,o=0,a=!1,i=1,s=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(t){s=e.core.getSlideItem(e.core.index),t.preventDefault(),2===t.targetTouches.length&&(e.$LG(t.target).hasClass("lg-item")||s.get().contains(t.target))&&(i=e.scale||1,e.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e.core.touchAction="pinch",o=e.getTouchDistance(t))}),this.core.$inner.on("touchmove.lg",function(t){t.preventDefault(),2===t.targetTouches.length&&"pinch"===e.core.touchAction&&(e.$LG(t.target).hasClass("lg-item")||s.get().contains(t.target))&&(t=e.getTouchDistance(t),t=o-t,!a&&5<Math.abs(t)&&(a=!0),a&&(e.scale=Math.max(1,i+.008*-t),e.zoomImage(e.scale)))}),this.core.$inner.on("touchend.lg",function(t){"pinch"===e.core.touchAction&&(e.$LG(t.target).hasClass("lg-item")||s.get().contains(t.target))&&(a=!1,o=0,e.scale<=1?e.resetZoom():(e.scale=e.getScale(e.scale),e.zoomImage(e.scale),e.core.outer.addClass("lg-zoomed")),e.core.touchAction=void 0)})},r.prototype.touchendZoom=function(t,e,o,a,i,s){var r=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),n=e.x-t.x,l=e.y-t.y,g=Math.abs(n)/i+1,c=Math.abs(l)/i+1;2<g&&(g+=1),2<c&&(c+=1),n*=g,l*=c;e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),t=this.core.getSlideItem(this.core.index).find(".lg-object").first(),i=parseFloat(e.attr("data-x"))||0,g=parseFloat(e.attr("data-y"))||0,c={};c.x=-Math.abs(i)+n*this.getModifier(s,"X",r),c.y=-Math.abs(g)+l*this.getModifier(s,"Y",r);s=this.getPossibleSwipeDragCords(t,s);(15<Math.abs(n)||15<Math.abs(l))&&(a&&(c.y<=-s.maxY?c.y=-s.maxY:c.y>=-s.minY&&(c.y=-s.minY)),o&&(c.x<=-s.maxX?c.x=-s.maxX:c.x>=-s.minX&&(c.x=-s.minX)),a?e.attr("data-y",Math.abs(c.y)):(a=parseFloat(e.attr("data-y"))||0,c.y=-Math.abs(a)),o?e.attr("data-x",Math.abs(c.x)):(o=parseFloat(e.attr("data-x"))||0,c.x=-Math.abs(o)),this.setZoomSwipeStyles(e,c),this.positionChanged=!0)},r.prototype.getZoomSwipeCords=function(t,e,o,a,i,s,r,n,l){var g,c,h={};return a?(h.y=-Math.abs(s)+(e.y-t.y)*this.getModifier(n,"Y",l),h.y<=-i.maxY?(g=-i.maxY-h.y,h.y=-i.maxY-g/6):h.y>=-i.minY&&(g=h.y- -i.minY,h.y=-i.minY+g/6)):h.y=-Math.abs(s),o?(h.x=-Math.abs(r)+(e.x-t.x)*this.getModifier(n,"X",l),h.x<=-i.maxX?(c=-i.maxX-h.x,h.x=-i.maxX-c/6):h.x>=-i.minX&&(c=h.x- -i.minX,h.x=-i.minX+c/6)):h.x=-Math.abs(r),h},r.prototype.getPossibleSwipeDragCords=function(t,e){var o=this.core.$lgContent,a=o.height(),i=o.width(),s=this.getImageSize(t.get(),e,"y"),r=this.getImageSize(t.get(),e,"x"),o=parseFloat(t.attr("data-scale"))||1,t=Math.abs(o),o=(a-s)/2,s=Math.abs(s*t-a+o),a=(i-r)/2,i=Math.abs(r*t-i+a);return 90===e?{minY:a,maxY:i,minX:o,maxX:s}:{minY:o,maxY:s,minX:a,maxX:i}},r.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},r.prototype.zoomSwipe=function(){var a,i,s=this,r={},e={},o=!1,n=!1,l=!1,g=new Date,c=(new Date,0),h=0,m=null,u=0,d=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(t){var e,o;t.preventDefault(),s.core.galleryItems[s.core.index].src&&(d=s.core.getSlideItem(s.core.index),(s.$LG(t.target).hasClass("lg-item")||d.get().contains(t.target))&&1===t.targetTouches.length&&s.core.outer.hasClass("lg-zoomed")&&(g=new Date,s.core.touchAction="zoomSwipe",e=s.core.getSlideItem(s.core.index).find(".lg-object").first(),i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first(),m=s.core.getSlideItem(s.core.index).find(".lg-img-rotate").first().get(),u=s.getCurrentRotation(m),o=s.getDragAllowedAxises(e,Math.abs(u)),l=o.allowY,((n=o.allowX)||l)&&(r=s.getSwipeCords(t,Math.abs(u))),h=parseFloat(i.attr("data-y")),c=parseFloat(i.attr("data-x")),a=s.getPossibleSwipeDragCords(e,u),s.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")))}),this.core.$inner.on("touchmove.lg",function(t){t.preventDefault(),1===t.targetTouches.length&&"zoomSwipe"===s.core.touchAction&&(s.$LG(t.target).hasClass("lg-item")||d.get().contains(t.target))&&(s.core.touchAction="zoomSwipe",e=s.getSwipeCords(t,Math.abs(u)),t=s.getZoomSwipeCords(r,e,n,l,a,h,c,u,m),(15<Math.abs(e.x-r.x)||15<Math.abs(e.y-r.y))&&(o=!0,s.setZoomSwipeStyles(i,t)))}),this.core.$inner.on("touchend.lg",function(t){"zoomSwipe"===s.core.touchAction&&(s.$LG(t.target).hasClass("lg-item")||d.get().contains(t.target))&&(s.core.touchAction=void 0,s.core.outer.removeClass("lg-zoom-dragging"),o&&(o=!1,t=(new Date).valueOf()-g.valueOf(),s.touchendZoom(r,e,n,l,t,u)))})},r.prototype.zoomDrag=function(){var a,e,i,s,r,n,l=this,g={},o={},c=!1,h=!1,m=null,u=0,d=!1,p=!1;this.core.outer.on("mousedown.lg.zoom",function(t){var e,o;l.core.galleryItems[l.core.index].src&&(o=l.core.getSlideItem(l.core.index),(l.$LG(t.target).hasClass("lg-item")||o.get().contains(t.target))&&(a=new Date,e=l.core.getSlideItem(l.core.index).find(".lg-object").first(),n=l.core.getSlideItem(l.core.index).find(".lg-img-wrap").first(),m=l.core.getSlideItem(l.core.index).find(".lg-img-rotate").get(),u=l.getCurrentRotation(m),o=l.getDragAllowedAxises(e,Math.abs(u)),p=o.allowY,d=o.allowX,l.core.outer.hasClass("lg-zoomed")&&l.$LG(t.target).hasClass("lg-object")&&(d||p)&&(t.preventDefault(),g=l.getDragCords(t,Math.abs(u)),i=l.getPossibleSwipeDragCords(e,u),c=!0,s=parseFloat(n.attr("data-y")),r=parseFloat(n.attr("data-x")),l.core.outer.get().scrollLeft+=1,--l.core.outer.get().scrollLeft,l.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))))}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(t){c&&(h=!0,o=l.getDragCords(t,Math.abs(u)),t=l.getZoomSwipeCords(g,o,d,p,i,s,r,u,m),l.setZoomSwipeStyles(n,t))}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(t){c&&(e=new Date,c=!1,l.core.outer.removeClass("lg-zoom-dragging"),!h||g.x===o.x&&g.y===o.y||(o=l.getDragCords(t,Math.abs(u)),t=e.valueOf()-a.valueOf(),l.touchendZoom(g,o,d,p,t,u)),h=!1),l.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},r.prototype.closeGallery=function(){this.resetZoom()},r.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},r});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lgZoom=e()}(this,function(){"use strict";var o=function(){return(o=Object.assign||function(t){for(var e,o=1,a=arguments.length;o<a;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a={scale:1,zoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300},t="lgContainerResize",e="lgBeforeOpen",i="lgSlideItemLoad",s="lgAfterSlide";function r(t,e){return this.core=t,this.$LG=e,this.settings=o(o({},a),this.core.settings),this}return r.prototype.buildTemplates=function(){var t=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="Zoom in" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="Zoom out" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(t+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="View actual size" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},r.prototype.enableZoom=function(t){var e=this,o=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.core.getSlideItem(t.detail.index).addClass("lg-zoomable")},o+30)},r.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(i+".zoom",this.enableZoom.bind(this))},r.prototype.getModifier=function(t,e,o){var a=t;t=Math.abs(t);var i=this.getCurrentTransform(o);if(!i)return 1;var s,o=1;return"X"===e?(s=Math.sign(parseFloat(i[0])),0===t||180===t?o=1:90===t&&(o=-90===a&&1===s||90===a&&-1===s?-1:1),o*=s):(s=Math.sign(parseFloat(i[3])),0===t||180===t?o=1:90===t&&(t=parseFloat(i[1]),i=parseFloat(i[2]),o=Math.sign(t*i*a*s)),o*=s),o},r.prototype.getImageSize=function(t,e,o){return 90===e&&(o="x"===o?"y":"x"),t[{y:"offsetHeight",x:"offsetWidth"}[o]]},r.prototype.getDragCords=function(t,e){return 90===e?{x:t.pageY,y:t.pageX}:{x:t.pageX,y:t.pageY}},r.prototype.getSwipeCords=function(t,e){var o=t.targetTouches[0].pageX,t=t.targetTouches[0].pageY;return 90===e?{x:t,y:o}:{x:o,y:t}},r.prototype.getDragAllowedAxises=function(t,e){var o=this.core.$lgContent.get(),a=parseFloat(t.attr("data-scale"))||1,i=t.get(),t=this.getImageSize(i,e,"y")*a>o.clientHeight,o=this.getImageSize(i,e,"x")*a>o.clientWidth;return 90===e?{allowX:t,allowY:o}:{allowX:o,allowY:t}},r.prototype.getCurrentTransform=function(t){if(t){t=window.getComputedStyle(t,null),t=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform")||"none";return"none"!==t?t.split("(")[1].split(")")[0].split(","):void 0}},r.prototype.getCurrentRotation=function(t){if(!t)return 0;t=this.getCurrentTransform(t);return t?Math.round(Math.atan2(parseFloat(t[1]),parseFloat(t[0]))*(180/Math.PI)):0},r.prototype.zoomImage=function(t){var e,o,a=this.core.getSlideItem(this.core.index).find(".lg-image").first(),i=a.get();i&&(o=((e=this.core.outer.get().getBoundingClientRect()).width-i.offsetWidth)/2+e.left,i=(e.height-i.offsetHeight)/2+this.$LG(window).scrollTop()+e.top,1===t&&(this.positionChanged=!1),this.positionChanged&&(e=parseFloat(a.parent().attr("data-x"))/(parseFloat(a.attr("data-scale"))-1),a=parseFloat(a.parent().attr("data-y"))/(parseFloat(a.attr("data-scale"))-1),this.pageX=e+o,this.pageY=a+i,this.positionChanged=!1),o=(t-1)*(this.pageX-o),i=(t-1)*(this.pageY-i),this.setZoomStyles({x:o,y:i,scale:t}))},r.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first(),a=e.parent();e.attr("data-scale",t.scale+"").css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),o.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");o="translate3d(-"+t.x+"px, -"+t.y+"px, 0)";a.css("transform",o),a.attr("data-x",t.x).attr("data-y",t.y)},r.prototype.setActualSize=function(t,e){var o,a=this;this.core.galleryItems[this.core.index].src&&!this.core.outer.hasClass("lg-first-slide-loading")&&(o=this.getCurrentImageActualSizeScale(),this.core.outer.hasClass("lg-zoomed")?this.scale=1:this.scale=this.getScale(o),this.setPageCords(e),this.beginZoom(this.scale),this.zoomImage(this.scale),setTimeout(function(){a.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},10))},r.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),t=this.core.galleryItems[t].width;return t?parseFloat(t):e.get().naturalWidth},r.prototype.getActualSizeScale=function(t,e){e=e<t?t/e||2:1;return e},r.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,e=this.getNaturalWidth(this.core.index)||t;return this.getActualSizeScale(e,t)},r.prototype.getPageCords=function(t){var e={};return t?(e.x=t.pageX||t.targetTouches[0].pageX,e.y=t.pageY||t.targetTouches[0].pageY):(t=this.core.outer.get().getBoundingClientRect(),e.x=t.width/2+t.left,e.y=t.height/2+this.$LG(window).scrollTop()+t.top),e},r.prototype.setPageCords=function(t){t=this.getPageCords(t);this.pageX=t.x,this.pageY=t.y},r.prototype.beginZoom=function(t){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),1<t?(this.core.outer.addClass("lg-zoomed"),this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)):this.resetZoom(),1<t},r.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:e<t&&(t=e),t},r.prototype.init=function(){var o,a=this;this.settings.zoom&&(this.buildTemplates(),this.enableZoomOnSlideItemLoad(),o=null,this.core.outer.on("dblclick.lg",function(t){a.$LG(t.target).hasClass("lg-image")&&a.setActualSize(a.core.index,t)}),this.core.outer.on("touchstart.lg",function(t){var e=a.$LG(t.target);1===t.targetTouches.length&&e.hasClass("lg-image")&&(o?(clearTimeout(o),o=null,a.setActualSize(a.core.index,t)):o=setTimeout(function(){o=null},300),t.preventDefault())}),this.core.LGel.on(t+".zoom",function(){a.core.lgOpened&&(a.setPageCords(),a.zoomImage(a.scale))}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){a.core.outer.find(".lg-current .lg-image").get()&&(a.scale-=a.settings.scale,a.scale=a.getScale(a.scale),a.beginZoom(a.scale),a.zoomImage(a.scale))}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){a.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){a.setActualSize(a.core.index)}),this.core.LGel.on(e+".zoom",function(){a.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(s+".zoom",function(t){t=t.detail.prevIndex;a.scale=1,a.positionChanged=!1,a.resetZoom(t)}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.pageX=this.core.outer.width()/2,this.pageY=this.core.outer.height()/2+this.$LG(window).scrollTop(),this.scale=1)},r.prototype.zoomIn=function(t){this.core.galleryItems[this.core.index].src&&(t?this.scale=t:this.scale+=this.settings.scale,this.scale=this.getScale(this.scale),this.beginZoom(this.scale),this.zoomImage(this.scale))},r.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),t=this.core.getSlideItem(void 0!==t?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),t.find(".lg-img-wrap").first().removeAttr("style data-x data-y"),t.find(".lg-image").first().removeAttr("style data-scale"),this.setPageCords()},r.prototype.getTouchDistance=function(t){return Math.sqrt((t.targetTouches[0].pageX-t.targetTouches[1].pageX)*(t.targetTouches[0].pageX-t.targetTouches[1].pageX)+(t.targetTouches[0].pageY-t.targetTouches[1].pageY)*(t.targetTouches[0].pageY-t.targetTouches[1].pageY))},r.prototype.pinchZoom=function(){var e=this,o=0,a=!1,i=1,s=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(t){s=e.core.getSlideItem(e.core.index),t.preventDefault(),2===t.targetTouches.length&&(e.$LG(t.target).hasClass("lg-item")||s.get().contains(t.target))&&(i=e.scale||1,e.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),e.core.touchAction="pinch",o=e.getTouchDistance(t))}),this.core.$inner.on("touchmove.lg",function(t){t.preventDefault(),2===t.targetTouches.length&&"pinch"===e.core.touchAction&&(e.$LG(t.target).hasClass("lg-item")||s.get().contains(t.target))&&(t=e.getTouchDistance(t),t=o-t,!a&&5<Math.abs(t)&&(a=!0),a&&(e.scale=Math.max(1,i+.008*-t),e.zoomImage(e.scale)))}),this.core.$inner.on("touchend.lg",function(t){"pinch"===e.core.touchAction&&(e.$LG(t.target).hasClass("lg-item")||s.get().contains(t.target))&&(a=!1,o=0,e.scale<=1?e.resetZoom():(e.scale=e.getScale(e.scale),e.zoomImage(e.scale),e.core.outer.addClass("lg-zoomed")),e.core.touchAction=void 0)})},r.prototype.touchendZoom=function(t,e,o,a,i,s){var r=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),n=e.x-t.x,l=e.y-t.y,g=Math.abs(n)/i+1,c=Math.abs(l)/i+1;2<g&&(g+=1),2<c&&(c+=1),n*=g,l*=c;e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),t=this.core.getSlideItem(this.core.index).find(".lg-object").first(),i=parseFloat(e.attr("data-x"))||0,g=parseFloat(e.attr("data-y"))||0,c={};c.x=-Math.abs(i)+n*this.getModifier(s,"X",r),c.y=-Math.abs(g)+l*this.getModifier(s,"Y",r);s=this.getPossibleSwipeDragCords(t,s);(15<Math.abs(n)||15<Math.abs(l))&&(a&&(c.y<=-s.maxY?c.y=-s.maxY:c.y>=-s.minY&&(c.y=-s.minY)),o&&(c.x<=-s.maxX?c.x=-s.maxX:c.x>=-s.minX&&(c.x=-s.minX)),a?e.attr("data-y",Math.abs(c.y)):(a=parseFloat(e.attr("data-y"))||0,c.y=-Math.abs(a)),o?e.attr("data-x",Math.abs(c.x)):(o=parseFloat(e.attr("data-x"))||0,c.x=-Math.abs(o)),this.setZoomSwipeStyles(e,c),this.positionChanged=!0)},r.prototype.getZoomSwipeCords=function(t,e,o,a,i,s,r,n,l){var g,c,h={};return a?(h.y=-Math.abs(s)+(e.y-t.y)*this.getModifier(n,"Y",l),h.y<=-i.maxY?(g=-i.maxY-h.y,h.y=-i.maxY-g/6):h.y>=-i.minY&&(g=h.y- -i.minY,h.y=-i.minY+g/6)):h.y=-Math.abs(s),o?(h.x=-Math.abs(r)+(e.x-t.x)*this.getModifier(n,"X",l),h.x<=-i.maxX?(c=-i.maxX-h.x,h.x=-i.maxX-c/6):h.x>=-i.minX&&(c=h.x- -i.minX,h.x=-i.minX+c/6)):h.x=-Math.abs(r),h},r.prototype.getPossibleSwipeDragCords=function(t,e){var o=this.core.$lgContent,a=o.height(),i=o.width(),s=this.getImageSize(t.get(),e,"y"),r=this.getImageSize(t.get(),e,"x"),o=parseFloat(t.attr("data-scale"))||1,t=Math.abs(o),o=(a-s)/2,s=Math.abs(s*t-a+o),a=(i-r)/2,i=Math.abs(r*t-i+a);return 90===e?{minY:a,maxY:i,minX:o,maxX:s}:{minY:o,maxY:s,minX:a,maxX:i}},r.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},r.prototype.zoomSwipe=function(){var a,i,s=this,r={},e={},o=!1,n=!1,l=!1,g=new Date,c=(new Date,0),h=0,m=null,u=0,d=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(t){var e,o;t.preventDefault(),s.core.galleryItems[s.core.index].src&&(d=s.core.getSlideItem(s.core.index),(s.$LG(t.target).hasClass("lg-item")||d.get().contains(t.target))&&1===t.targetTouches.length&&s.core.outer.hasClass("lg-zoomed")&&(g=new Date,s.core.touchAction="zoomSwipe",e=s.core.getSlideItem(s.core.index).find(".lg-object").first(),i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first(),m=s.core.getSlideItem(s.core.index).find(".lg-img-rotate").first().get(),u=s.getCurrentRotation(m),o=s.getDragAllowedAxises(e,Math.abs(u)),l=o.allowY,((n=o.allowX)||l)&&(r=s.getSwipeCords(t,Math.abs(u))),h=parseFloat(i.attr("data-y")),c=parseFloat(i.attr("data-x")),a=s.getPossibleSwipeDragCords(e,u),s.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")))}),this.core.$inner.on("touchmove.lg",function(t){t.preventDefault(),1===t.targetTouches.length&&"zoomSwipe"===s.core.touchAction&&(s.$LG(t.target).hasClass("lg-item")||d.get().contains(t.target))&&(s.core.touchAction="zoomSwipe",e=s.getSwipeCords(t,Math.abs(u)),t=s.getZoomSwipeCords(r,e,n,l,a,h,c,u,m),(15<Math.abs(e.x-r.x)||15<Math.abs(e.y-r.y))&&(o=!0,s.setZoomSwipeStyles(i,t)))}),this.core.$inner.on("touchend.lg",function(t){"zoomSwipe"===s.core.touchAction&&(s.$LG(t.target).hasClass("lg-item")||d.get().contains(t.target))&&(s.core.touchAction=void 0,s.core.outer.removeClass("lg-zoom-dragging"),o&&(o=!1,t=(new Date).valueOf()-g.valueOf(),s.touchendZoom(r,e,n,l,t,u)))})},r.prototype.zoomDrag=function(){var a,e,i,s,r,n,l=this,g={},o={},c=!1,h=!1,m=null,u=0,d=!1,p=!1;this.core.outer.on("mousedown.lg.zoom",function(t){var e,o;l.core.galleryItems[l.core.index].src&&(o=l.core.getSlideItem(l.core.index),(l.$LG(t.target).hasClass("lg-item")||o.get().contains(t.target))&&(a=new Date,e=l.core.getSlideItem(l.core.index).find(".lg-object").first(),n=l.core.getSlideItem(l.core.index).find(".lg-img-wrap").first(),m=l.core.getSlideItem(l.core.index).find(".lg-img-rotate").get(),u=l.getCurrentRotation(m),o=l.getDragAllowedAxises(e,Math.abs(u)),p=o.allowY,d=o.allowX,l.core.outer.hasClass("lg-zoomed")&&l.$LG(t.target).hasClass("lg-object")&&(d||p)&&(t.preventDefault(),g=l.getDragCords(t,Math.abs(u)),i=l.getPossibleSwipeDragCords(e,u),c=!0,s=parseFloat(n.attr("data-y")),r=parseFloat(n.attr("data-x")),l.core.outer.get().scrollLeft+=1,--l.core.outer.get().scrollLeft,l.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))))}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(t){c&&(h=!0,o=l.getDragCords(t,Math.abs(u)),t=l.getZoomSwipeCords(g,o,d,p,i,s,r,u,m),l.setZoomSwipeStyles(n,t))}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(t){c&&(e=new Date,c=!1,l.core.outer.removeClass("lg-zoom-dragging"),!h||g.x===o.x&&g.y===o.y||(o=l.getDragCords(t,Math.abs(u)),t=e.valueOf()-a.valueOf(),l.touchendZoom(g,o,d,p,t,u)),h=!1),l.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},r.prototype.closeGallery=function(){this.resetZoom()},r.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},r});
/*!
* lightgallery | 2.1.7 | July 1st 2021
* lightgallery | 2.1.8 | July 7th 2021
* http://www.lightgalleryjs.com/

@@ -11,3 +11,3 @@ * Copyright (c) 2020 Sachin Neravath;

typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgZoom = factory());
(global.lgZoom = factory());
}(this, (function () { 'use strict';

@@ -14,0 +14,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc