/* # ----------------------------------------------------------------------------- # ~/assets/themes/j1/modules/lightGallery/js/plugins/lg-pager.min.js # Provides lightGallery JS code for the plugin lgPager # # Product/Info: # https://jekyll.one # # Copyright (C) 2023 Sachin Neravath # Copyright (C) 2023 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # lightGallery is licensed under the GPLv3 license # See: https://github.com/sachinchoolur/lightGallery/blob/master/LICENSE # ----------------------------------------------------------------------------- */ /** * lightgallery | 2.7.2 | September 20th 2023 * http://www.lightgalleryjs.com/ * Copyright (c) 2020 Sachin Neravath; * @license GPLv3 */ !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 e=function(){return(e=Object.assign||function(e){for(var t,r=1,o=arguments.length;r \n \n
\n ';return t},i.prototype.init=function(){var e=this;if(this.settings.pager){var o;this.core.$lgComponents.prepend('
');var i=this.core.outer.find(".lg-pager-outer");i.html(this.getPagerHtml(this.core.galleryItems)),i.first().on("click.lg touchend.lg",(function(t){var r=e.$LG(t.target);if(r.hasAttribute("data-lg-item-id")){var o=parseInt(r.attr("data-lg-item-id"));e.core.slide(o,!1,!0,!1)}})),i.first().on("mouseover.lg",(function(){clearTimeout(o),i.addClass("lg-pager-hover")})),i.first().on("mouseout.lg",(function(){o=setTimeout((function(){i.removeClass("lg-pager-hover")}))})),this.core.LGel.on(r+".pager",(function(t){var r=t.detail.index;e.manageActiveClass.call(e,r)})),this.core.LGel.on(t+".pager",(function(){i.empty(),i.html(e.getPagerHtml(e.core.galleryItems)),e.manageActiveClass(e.core.index)}))}},i.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")},i.prototype.destroy=function(){this.core.outer.find(".lg-pager-outer").remove(),this.core.LGel.off(".lg.pager"),this.core.LGel.off(".pager")},i}()}));