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.4.4/node_modules/change-case/dist/index.js","webpack://sakurairo-scripts/./src/page/lightGallery/util.ts","webpack://sakurairo-scripts/./src/page/lightGallery/import.ts","webpack://sakurairo-scripts/./node_modules/.pnpm/lightgallery@2.7.2/node_modules/lightgallery/lib/index.js","webpack://sakurairo-scripts/./node_modules/.pnpm/lightgallery@2.7.2/node_modules/lightgallery/lib/lg-events.js","webpack://sakurairo-scripts/./node_modules/.pnpm/lightgallery@2.7.2/node_modules/lightgallery/lib/lg-settings.js","webpack://sakurairo-scripts/./node_modules/.pnpm/lightgallery@2.7.2/node_modules/lightgallery/lib/lg-utils.js","webpack://sakurairo-scripts/./node_modules/.pnpm/lightgallery@2.7.2/node_modules/lightgallery/lib/lgQuery.js","webpack://sakurairo-scripts/./node_modules/.pnpm/lightgallery@2.7.2/node_modules/lightgallery/lib/lightgallery.js","webpack://sakurairo-scripts/./node_modules/lightgallery/plugins/ lazy ^\\.\\/.*\\.min\\.js$ chunkName: lg- namespace object"],"sourcesContent":["// Regexps involved with splitting words in various case formats.\nconst SPLIT_LOWER_UPPER_RE = /([\\p{Ll}\\d])(\\p{Lu})/gu;\nconst SPLIT_UPPER_UPPER_RE = /(\\p{Lu})([\\p{Lu}][\\p{Ll}])/gu;\n// Used to iterate over the initial split result and separate numbers.\nconst SPLIT_SEPARATE_NUMBER_RE = /(\\d)\\p{Ll}|(\\p{L})\\d/u;\n// Regexp involved with stripping non-word characters from the result.\nconst DEFAULT_STRIP_REGEXP = /[^\\p{L}\\d]+/giu;\n// The replacement value for splits.\nconst SPLIT_REPLACE_VALUE = \"$1\\0$2\";\n// The default characters to keep after transforming case.\nconst DEFAULT_PREFIX_SUFFIX_CHARACTERS = \"\";\n/**\n * Split any cased input strings into an array of words.\n */\nexport function split(value) {\n let result = value.trim();\n result = result\n .replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE)\n .replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);\n result = result.replace(DEFAULT_STRIP_REGEXP, \"\\0\");\n let start = 0;\n let end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n if (start === end)\n return [];\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n return result.slice(start, end).split(/\\0/g);\n}\n/**\n * Split the input string into an array of words, separating numbers.\n */\nexport function splitSeparateNumbers(value) {\n const words = split(value);\n for (let i = 0; i < words.length; i++) {\n const word = words[i];\n const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);\n if (match) {\n const offset = match.index + (match[1] ?? match[2]).length;\n words.splice(i, 1, word.slice(0, offset), word.slice(offset));\n }\n }\n return words;\n}\n/**\n * Convert a string to space separated lower case (`foo bar`).\n */\nexport function noCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to camel case (`fooBar`).\n */\nexport function camelCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return lower(word);\n return transform(word, index);\n })\n .join(options?.delimiter ?? \"\") +\n suffix);\n}\n/**\n * Convert a string to pascal case (`FooBar`).\n */\nexport function pascalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return prefix + words.map(transform).join(options?.delimiter ?? \"\") + suffix;\n}\n/**\n * Convert a string to pascal snake case (`Foo_Bar`).\n */\nexport function pascalSnakeCase(input, options) {\n return capitalCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to capital case (`Foo Bar`).\n */\nexport function capitalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n return (prefix +\n words\n .map(capitalCaseTransformFactory(lower, upper))\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to constant case (`FOO_BAR`).\n */\nexport function constantCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(upperFactory(options?.locale)).join(options?.delimiter ?? \"_\") +\n suffix);\n}\n/**\n * Convert a string to dot case (`foo.bar`).\n */\nexport function dotCase(input, options) {\n return noCase(input, { delimiter: \".\", ...options });\n}\n/**\n * Convert a string to kebab case (`foo-bar`).\n */\nexport function kebabCase(input, options) {\n return noCase(input, { delimiter: \"-\", ...options });\n}\n/**\n * Convert a string to path case (`foo/bar`).\n */\nexport function pathCase(input, options) {\n return noCase(input, { delimiter: \"/\", ...options });\n}\n/**\n * Convert a string to path case (`Foo bar`).\n */\nexport function sentenceCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = capitalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return transform(word);\n return lower(word);\n })\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to snake case (`foo_bar`).\n */\nexport function snakeCase(input, options) {\n return noCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to header case (`Foo-Bar`).\n */\nexport function trainCase(input, options) {\n return capitalCase(input, { delimiter: \"-\", ...options });\n}\nfunction lowerFactory(locale) {\n return locale === false\n ? (input) => input.toLowerCase()\n : (input) => input.toLocaleLowerCase(locale);\n}\nfunction upperFactory(locale) {\n return locale === false\n ? (input) => input.toUpperCase()\n : (input) => input.toLocaleUpperCase(locale);\n}\nfunction capitalCaseTransformFactory(lower, upper) {\n return (word) => `${upper(word[0])}${lower(word.slice(1))}`;\n}\nfunction pascalCaseTransformFactory(lower, upper) {\n return (word, index) => {\n const char0 = word[0];\n const initial = index > 0 && char0 >= \"0\" && char0 <= \"9\" ? \"_\" + char0 : upper(char0);\n return initial + lower(word.slice(1));\n };\n}\nfunction splitPrefixSuffix(input, options = {}) {\n const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);\n const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n let prefixIndex = 0;\n let suffixIndex = input.length;\n while (prefixIndex < input.length) {\n const char = input.charAt(prefixIndex);\n if (!prefixCharacters.includes(char))\n break;\n prefixIndex++;\n }\n while (suffixIndex > prefixIndex) {\n const index = suffixIndex - 1;\n const char = input.charAt(index);\n if (!suffixCharacters.includes(char))\n break;\n suffixIndex = index;\n }\n return [\n input.slice(0, prefixIndex),\n splitFn(input.slice(prefixIndex, suffixIndex)),\n input.slice(suffixIndex),\n ];\n}\n//# sourceMappingURL=index.js.map","import { kebabCase } from 'change-case';\nexport function solvePluginName(pluginName) {\n const fileName = kebabCase(pluginName);\n const folderName = pluginName[2].toLowerCase() + pluginName.replace(/^lg\\w/, '');\n return `${folderName}/${fileName}`;\n}\nexport const handleResult = (result) => result.status == 'fulfilled' ? result.value.default : console.error('加载lightGallery的插件时出错啦!', result.reason);\n","//@ts-ignore\nimport lightGallery from 'lightgallery/lib/index.js';\nimport 'lightgallery/css/lightgallery-bundle.min.css';\nimport { handleResult, solvePluginName } from './util';\nexport default async function initLightGallery() {\n const { plugins, ...opts } = _iro.lightGallery;\n lightGallery(document.querySelector('.entry-content'), {\n plugins: plugins && (await Promise.allSettled(plugins.map(\n //moduleNameFormat: lgHash->lg-hash\n name => import(\n /* webpackChunkName: \"lg-\" */\n 'lightgallery/plugins/' + solvePluginName(name) + '.min.js'))))\n .map(handleResult),\n ...opts\n });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lightgallery_1 = require(\"./lightgallery\");\nfunction lightGallery(el, options) {\n return new lightgallery_1.LightGallery(el, options);\n}\nexports.default = lightGallery;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lGEvents = void 0;\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexports.lGEvents = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n//# sourceMappingURL=lg-events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lightGalleryCoreSettings = void 0;\nexports.lightGalleryCoreSettings = {\n mode: 'lg-slide',\n easing: 'ease',\n speed: 400,\n licenseKey: '0000-0000-000-0000',\n height: '100%',\n width: '100%',\n addClass: '',\n startClass: 'lg-start-zoom',\n backdropDuration: 300,\n container: '',\n startAnimationDuration: 400,\n zoomFromOrigin: true,\n hideBarsDelay: 0,\n showBarsAfter: 10000,\n slideDelay: 0,\n supportLegacyBrowser: true,\n allowMediaOverlap: false,\n videoMaxSize: '1280-720',\n loadYouTubePoster: true,\n defaultCaptionHeight: 0,\n ariaLabelledby: '',\n ariaDescribedby: '',\n resetScrollPosition: true,\n hideScrollbar: false,\n closable: true,\n swipeToClose: true,\n closeOnTap: true,\n showCloseIcon: true,\n showMaximizeIcon: false,\n loop: true,\n escKey: true,\n keyPress: true,\n trapFocus: true,\n controls: true,\n slideEndAnimation: true,\n hideControlOnEnd: false,\n mousewheel: false,\n getCaptionFromTitleOrAlt: true,\n appendSubHtmlTo: '.lg-sub-html',\n subHtmlSelectorRelative: false,\n preload: 2,\n numberOfSlideItemsInDom: 10,\n selector: '',\n selectWithin: '',\n nextHtml: '',\n prevHtml: '',\n index: 0,\n iframeWidth: '100%',\n iframeHeight: '100%',\n iframeMaxWidth: '100%',\n iframeMaxHeight: '100%',\n download: true,\n counter: true,\n appendCounterTo: '.lg-toolbar',\n swipeThreshold: 50,\n enableSwipe: true,\n enableDrag: true,\n dynamic: false,\n dynamicEl: [],\n extraProps: [],\n exThumbImage: '',\n isMobile: undefined,\n mobileSettings: {\n controls: false,\n showCloseIcon: false,\n download: false,\n },\n plugins: [],\n strings: {\n closeGallery: 'Close gallery',\n toggleMaximize: 'Toggle maximize',\n previousSlide: 'Previous slide',\n nextSlide: 'Next slide',\n download: 'Download',\n playVideo: 'Play video',\n mediaLoadingFailed: 'Oops... Failed to load content...',\n },\n};\n//# sourceMappingURL=lg-settings.js.map","\"use strict\";\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToData = void 0;\nvar lgQuery_1 = require(\"./lgQuery\");\nvar defaultDynamicOptions = [\n 'src',\n 'sources',\n 'subHtml',\n 'subHtmlUrl',\n 'html',\n 'video',\n 'poster',\n 'slideName',\n 'responsive',\n 'srcset',\n 'sizes',\n 'iframe',\n 'downloadUrl',\n 'download',\n 'width',\n 'facebookShareUrl',\n 'tweetText',\n 'iframeTitle',\n 'twitterShareUrl',\n 'pinterestShareUrl',\n 'pinterestText',\n 'fbHtml',\n 'disqusIdentifier',\n 'disqusUrl',\n];\n// Convert html data-attribute to camalcase\nfunction convertToData(attr) {\n // FInd a way for lgsize\n if (attr === 'href') {\n return 'src';\n }\n attr = attr.replace('data-', '');\n attr = attr.charAt(0).toLowerCase() + attr.slice(1);\n attr = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\n return attr;\n}\nexports.convertToData = convertToData;\nvar utils = {\n /**\n * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option\n */\n getSize: function (el, container, spacing, defaultLgSize) {\n if (spacing === void 0) { spacing = 0; }\n var LGel = lgQuery_1.$LG(el);\n var lgSize = LGel.attr('data-lg-size') || defaultLgSize;\n if (!lgSize) {\n return;\n }\n var isResponsiveSizes = lgSize.split(',');\n // if at-least two viewport sizes are available\n if (isResponsiveSizes[1]) {\n var wWidth = window.innerWidth;\n for (var i = 0; i < isResponsiveSizes.length; i++) {\n var size_1 = isResponsiveSizes[i];\n var responsiveWidth = parseInt(size_1.split('-')[2], 10);\n if (responsiveWidth > wWidth) {\n lgSize = size_1;\n break;\n }\n // take last item as last option\n if (i === isResponsiveSizes.length - 1) {\n lgSize = size_1;\n }\n }\n }\n var size = lgSize.split('-');\n var width = parseInt(size[0], 10);\n var height = parseInt(size[1], 10);\n var cWidth = container.width();\n var cHeight = container.height() - spacing;\n var maxWidth = Math.min(cWidth, width);\n var maxHeight = Math.min(cHeight, height);\n var ratio = Math.min(maxWidth / width, maxHeight / height);\n return { width: width * ratio, height: height * ratio };\n },\n /**\n * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option\n * @param {jQuery Element}\n * @returns {String} Transform CSS string\n */\n getTransform: function (el, container, top, bottom, imageSize) {\n if (!imageSize) {\n return;\n }\n var LGel = lgQuery_1.$LG(el).find('img').first();\n if (!LGel.get()) {\n return;\n }\n var containerRect = container.get().getBoundingClientRect();\n var wWidth = containerRect.width;\n // using innerWidth to include mobile safari bottom bar\n var wHeight = container.height() - (top + bottom);\n var elWidth = LGel.width();\n var elHeight = LGel.height();\n var elStyle = LGel.style();\n var x = (wWidth - elWidth) / 2 -\n LGel.offset().left +\n (parseFloat(elStyle.paddingLeft) || 0) +\n (parseFloat(elStyle.borderLeft) || 0) +\n lgQuery_1.$LG(window).scrollLeft() +\n containerRect.left;\n var y = (wHeight - elHeight) / 2 -\n LGel.offset().top +\n (parseFloat(elStyle.paddingTop) || 0) +\n (parseFloat(elStyle.borderTop) || 0) +\n lgQuery_1.$LG(window).scrollTop() +\n top;\n var scX = elWidth / imageSize.width;\n var scY = elHeight / imageSize.height;\n var transform = 'translate3d(' +\n (x *= -1) +\n 'px, ' +\n (y *= -1) +\n 'px, 0) scale3d(' +\n scX +\n ', ' +\n scY +\n ', 1)';\n return transform;\n },\n getIframeMarkup: function (iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) {\n var title = iframeTitle ? 'title=\"' + iframeTitle + '\"' : '';\n return \"<div class=\\\"lg-video-cont lg-has-iframe\\\" style=\\\"width:\" + iframeWidth + \"; max-width:\" + iframeMaxWidth + \"; height: \" + iframeHeight + \"; max-height:\" + iframeMaxHeight + \"\\\">\\n <iframe class=\\\"lg-object\\\" frameborder=\\\"0\\\" \" + title + \" src=\\\"\" + src + \"\\\" allowfullscreen=\\\"true\\\"></iframe>\\n </div>\";\n },\n getImgMarkup: function (index, src, altAttr, srcset, sizes, sources) {\n var srcsetAttr = srcset ? \"srcset=\\\"\" + srcset + \"\\\"\" : '';\n var sizesAttr = sizes ? \"sizes=\\\"\" + sizes + \"\\\"\" : '';\n var imgMarkup = \"<img \" + altAttr + \" \" + srcsetAttr + \" \" + sizesAttr + \" class=\\\"lg-object lg-image\\\" data-index=\\\"\" + index + \"\\\" src=\\\"\" + src + \"\\\" />\";\n var sourceTag = '';\n if (sources) {\n var sourceObj = typeof sources === 'string' ? JSON.parse(sources) : sources;\n sourceTag = sourceObj.map(function (source) {\n var attrs = '';\n Object.keys(source).forEach(function (key) {\n // Do not remove the first space as it is required to separate the attributes\n attrs += \" \" + key + \"=\\\"\" + source[key] + \"\\\"\";\n });\n return \"<source \" + attrs + \"></source>\";\n });\n }\n return \"\" + sourceTag + imgMarkup;\n },\n // Get src from responsive src\n getResponsiveSrc: function (srcItms) {\n var rsWidth = [];\n var rsSrc = [];\n var src = '';\n for (var i = 0; i < srcItms.length; i++) {\n var _src = srcItms[i].split(' ');\n // Manage empty space\n if (_src[0] === '') {\n _src.splice(0, 1);\n }\n rsSrc.push(_src[0]);\n rsWidth.push(_src[1]);\n }\n var wWidth = window.innerWidth;\n for (var j = 0; j < rsWidth.length; j++) {\n if (parseInt(rsWidth[j], 10) > wWidth) {\n src = rsSrc[j];\n break;\n }\n }\n return src;\n },\n isImageLoaded: function (img) {\n if (!img)\n return false;\n // During the onload event, IE correctly identifies any images that\n // weren’t downloaded as not complete. Others should too. Gecko-based\n // browsers act like NS4 in that they report this incorrectly.\n if (!img.complete) {\n return false;\n }\n // However, they do have two very useful properties: naturalWidth and\n // naturalHeight. These give the true size of the image. If it failed\n // to load, either of these should be zero.\n if (img.naturalWidth === 0) {\n return false;\n }\n // No other way of checking: assume it’s ok.\n return true;\n },\n getVideoPosterMarkup: function (_poster, dummyImg, videoContStyle, playVideoString, _isVideo) {\n var videoClass = '';\n if (_isVideo && _isVideo.youtube) {\n videoClass = 'lg-has-youtube';\n }\n else if (_isVideo && _isVideo.vimeo) {\n videoClass = 'lg-has-vimeo';\n }\n else {\n videoClass = 'lg-has-html5';\n }\n return \"<div class=\\\"lg-video-cont \" + videoClass + \"\\\" style=\\\"\" + videoContStyle + \"\\\">\\n <div class=\\\"lg-video-play-button\\\">\\n <svg\\n viewBox=\\\"0 0 20 20\\\"\\n preserveAspectRatio=\\\"xMidYMid\\\"\\n focusable=\\\"false\\\"\\n aria-labelledby=\\\"\" + playVideoString + \"\\\"\\n role=\\\"img\\\"\\n class=\\\"lg-video-play-icon\\\"\\n >\\n <title>\" + playVideoString + \"</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 \" + (dummyImg || '') + \"\\n <img class=\\\"lg-object lg-video-poster\\\" src=\\\"\" + _poster + \"\\\" />\\n </div>\";\n },\n getFocusableElements: function (container) {\n var elements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type=\"text\"]:not([disabled]), input[type=\"radio\"]:not([disabled]), input[type=\"checkbox\"]:not([disabled]), select:not([disabled])');\n var visibleElements = [].filter.call(elements, function (element) {\n var style = window.getComputedStyle(element);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n return visibleElements;\n },\n /**\n * @desc Create dynamic elements array from gallery items when dynamic option is false\n * It helps to avoid frequent DOM interaction\n * and avoid multiple checks for dynamic elments\n *\n * @returns {Array} dynamicEl\n */\n getDynamicOptions: function (items, extraProps, getCaptionFromTitleOrAlt, exThumbImage) {\n var dynamicElements = [];\n var availableDynamicOptions = __spreadArrays(defaultDynamicOptions, extraProps);\n [].forEach.call(items, function (item) {\n var dynamicEl = {};\n for (var i = 0; i < item.attributes.length; i++) {\n var attr = item.attributes[i];\n if (attr.specified) {\n var dynamicAttr = convertToData(attr.name);\n var label = '';\n if (availableDynamicOptions.indexOf(dynamicAttr) > -1) {\n label = dynamicAttr;\n }\n if (label) {\n dynamicEl[label] = attr.value;\n }\n }\n }\n var currentItem = lgQuery_1.$LG(item);\n var alt = currentItem.find('img').first().attr('alt');\n var title = currentItem.attr('title');\n var thumb = exThumbImage\n ? currentItem.attr(exThumbImage)\n : currentItem.find('img').first().attr('src');\n dynamicEl.thumb = thumb;\n if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) {\n dynamicEl.subHtml = title || alt || '';\n }\n dynamicEl.alt = alt || title || '';\n dynamicElements.push(dynamicEl);\n });\n return dynamicElements;\n },\n isMobile: function () {\n return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\n },\n /**\n * @desc Check the given src is video\n * @param {String} src\n * @return {Object} video type\n * Ex:{ youtube : [\"//www.youtube.com/watch?v=c0asJgSyxcY\", \"c0asJgSyxcY\"] }\n *\n * @todo - this information can be moved to dynamicEl to avoid frequent calls\n */\n isVideo: function (src, isHTML5VIdeo, index) {\n if (!src) {\n if (isHTML5VIdeo) {\n return {\n html5: true,\n };\n }\n else {\n console.error('lightGallery :- data-src is not provided on slide item ' +\n (index + 1) +\n '. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/');\n return;\n }\n }\n var youtube = src.match(/\\/\\/(?:www\\.)?youtu(?:\\.be|be\\.com|be-nocookie\\.com)\\/(?:watch\\?v=|embed\\/)?([a-z0-9\\-\\_\\%]+)([\\&|?][\\S]*)*/i);\n var vimeo = src.match(/\\/\\/(?:www\\.)?(?:player\\.)?vimeo.com\\/(?:video\\/)?([0-9a-z\\-_]+)(.*)?/i);\n var wistia = src.match(/https?:\\/\\/(.+)?(wistia\\.com|wi\\.st)\\/(medias|embed)\\/([0-9a-z\\-_]+)(.*)/);\n if (youtube) {\n return {\n youtube: youtube,\n };\n }\n else if (vimeo) {\n return {\n vimeo: vimeo,\n };\n }\n else if (wistia) {\n return {\n wistia: wistia,\n };\n }\n },\n};\nexports.default = utils;\n//# sourceMappingURL=lg-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$LG = exports.lgQuery = void 0;\nfunction initLgPolyfills() {\n (function () {\n if (typeof window.CustomEvent === 'function')\n return false;\n function CustomEvent(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: null,\n };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n window.CustomEvent = CustomEvent;\n })();\n (function () {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n Element.prototype.msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\n }\n })();\n}\nvar lgQuery = /** @class */ (function () {\n function lgQuery(selector) {\n this.cssVenderPrefixes = [\n 'TransitionDuration',\n 'TransitionTimingFunction',\n 'Transform',\n 'Transition',\n ];\n this.selector = this._getSelector(selector);\n this.firstElement = this._getFirstEl();\n return this;\n }\n lgQuery.generateUUID = function () {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n };\n lgQuery.prototype._getSelector = function (selector, context) {\n if (context === void 0) { context = document; }\n if (typeof selector !== 'string') {\n return selector;\n }\n context = context || document;\n var fl = selector.substring(0, 1);\n if (fl === '#') {\n return context.querySelector(selector);\n }\n else {\n return context.querySelectorAll(selector);\n }\n };\n lgQuery.prototype._each = function (func) {\n if (!this.selector) {\n return this;\n }\n if (this.selector.length !== undefined) {\n [].forEach.call(this.selector, func);\n }\n else {\n func(this.selector, 0);\n }\n return this;\n };\n lgQuery.prototype._setCssVendorPrefix = function (el, cssProperty, value) {\n // prettier-ignore\n var property = cssProperty.replace(/-([a-z])/gi, function (s, group1) {\n return group1.toUpperCase();\n });\n if (this.cssVenderPrefixes.indexOf(property) !== -1) {\n el.style[property.charAt(0).toLowerCase() + property.slice(1)] = value;\n el.style['webkit' + property] = value;\n el.style['moz' + property] = value;\n el.style['ms' + property] = value;\n el.style['o' + property] = value;\n }\n else {\n el.style[property] = value;\n }\n };\n lgQuery.prototype._getFirstEl = function () {\n if (this.selector && this.selector.length !== undefined) {\n return this.selector[0];\n }\n else {\n return this.selector;\n }\n };\n lgQuery.prototype.isEventMatched = function (event, eventName) {\n var eventNamespace = eventName.split('.');\n return event\n .split('.')\n .filter(function (e) { return e; })\n .every(function (e) {\n return eventNamespace.indexOf(e) !== -1;\n });\n };\n lgQuery.prototype.attr = function (attr, value) {\n if (value === undefined) {\n if (!this.firstElement) {\n return '';\n }\n return this.firstElement.getAttribute(attr);\n }\n this._each(function (el) {\n el.setAttribute(attr, value);\n });\n return this;\n };\n lgQuery.prototype.find = function (selector) {\n return $LG(this._getSelector(selector, this.selector));\n };\n lgQuery.prototype.first = function () {\n if (this.selector && this.selector.length !== undefined) {\n return $LG(this.selector[0]);\n }\n else {\n return $LG(this.selector);\n }\n };\n lgQuery.prototype.eq = function (index) {\n return $LG(this.selector[index]);\n };\n lgQuery.prototype.parent = function () {\n return $LG(this.selector.parentElement);\n };\n lgQuery.prototype.get = function () {\n return this._getFirstEl();\n };\n lgQuery.prototype.removeAttr = function (attributes) {\n var attrs = attributes.split(' ');\n this._each(function (el) {\n attrs.forEach(function (attr) { return el.removeAttribute(attr); });\n });\n return this;\n };\n lgQuery.prototype.wrap = function (className) {\n if (!this.firstElement) {\n return this;\n }\n var wrapper = document.createElement('div');\n wrapper.className = className;\n this.firstElement.parentNode.insertBefore(wrapper, this.firstElement);\n this.firstElement.parentNode.removeChild(this.firstElement);\n wrapper.appendChild(this.firstElement);\n return this;\n };\n lgQuery.prototype.addClass = function (classNames) {\n if (classNames === void 0) { classNames = ''; }\n this._each(function (el) {\n // IE doesn't support multiple arguments\n classNames.split(' ').forEach(function (className) {\n if (className) {\n el.classList.add(className);\n }\n });\n });\n return this;\n };\n lgQuery.prototype.removeClass = function (classNames) {\n this._each(function (el) {\n // IE doesn't support multiple arguments\n classNames.split(' ').forEach(function (className) {\n if (className) {\n el.classList.remove(className);\n }\n });\n });\n return this;\n };\n lgQuery.prototype.hasClass = function (className) {\n if (!this.firstElement) {\n return false;\n }\n return this.firstElement.classList.contains(className);\n };\n lgQuery.prototype.hasAttribute = function (attribute) {\n if (!this.firstElement) {\n return false;\n }\n return this.firstElement.hasAttribute(attribute);\n };\n lgQuery.prototype.toggleClass = function (className) {\n if (!this.firstElement) {\n return this;\n }\n if (this.hasClass(className)) {\n this.removeClass(className);\n }\n else {\n this.addClass(className);\n }\n return this;\n };\n lgQuery.prototype.css = function (property, value) {\n var _this = this;\n this._each(function (el) {\n _this._setCssVendorPrefix(el, property, value);\n });\n return this;\n };\n // Need to pass separate namespaces for separate elements\n lgQuery.prototype.on = function (events, listener) {\n var _this = this;\n if (!this.selector) {\n return this;\n }\n events.split(' ').forEach(function (event) {\n if (!Array.isArray(lgQuery.eventListeners[event])) {\n lgQuery.eventListeners[event] = [];\n }\n lgQuery.eventListeners[event].push(listener);\n _this.selector.addEventListener(event.split('.')[0], listener);\n });\n return this;\n };\n // @todo - test this\n lgQuery.prototype.once = function (event, listener) {\n var _this = this;\n this.on(event, function () {\n _this.off(event);\n listener(event);\n });\n return this;\n };\n lgQuery.prototype.off = function (event) {\n var _this = this;\n if (!this.selector) {\n return this;\n }\n Object.keys(lgQuery.eventListeners).forEach(function (eventName) {\n if (_this.isEventMatched(event, eventName)) {\n lgQuery.eventListeners[eventName].forEach(function (listener) {\n _this.selector.removeEventListener(eventName.split('.')[0], listener);\n });\n lgQuery.eventListeners[eventName] = [];\n }\n });\n return this;\n };\n lgQuery.prototype.trigger = function (event, detail) {\n if (!this.firstElement) {\n return this;\n }\n var customEvent = new CustomEvent(event.split('.')[0], {\n detail: detail || null,\n });\n this.firstElement.dispatchEvent(customEvent);\n return this;\n };\n // Does not support IE\n lgQuery.prototype.load = function (url) {\n var _this = this;\n fetch(url)\n .then(function (res) { return res.text(); })\n .then(function (html) {\n _this.selector.innerHTML = html;\n });\n return this;\n };\n lgQuery.prototype.html = function (html) {\n if (html === undefined) {\n if (!this.firstElement) {\n return '';\n }\n return this.firstElement.innerHTML;\n }\n this._each(function (el) {\n el.innerHTML = html;\n });\n return this;\n };\n lgQuery.prototype.append = function (html) {\n this._each(function (el) {\n if (typeof html === 'string') {\n el.insertAdjacentHTML('beforeend', html);\n }\n else {\n el.appendChild(html);\n }\n });\n return this;\n };\n lgQuery.prototype.prepend = function (html) {\n this._each(function (el) {\n el.insertAdjacentHTML('afterbegin', html);\n });\n return this;\n };\n lgQuery.prototype.remove = function () {\n this._each(function (el) {\n el.parentNode.removeChild(el);\n });\n return this;\n };\n lgQuery.prototype.empty = function () {\n this._each(function (el) {\n el.innerHTML = '';\n });\n return this;\n };\n lgQuery.prototype.scrollTop = function (scrollTop) {\n if (scrollTop !== undefined) {\n document.body.scrollTop = scrollTop;\n document.documentElement.scrollTop = scrollTop;\n return this;\n }\n else {\n return (window.pageYOffset ||\n document.documentElement.scrollTop ||\n document.body.scrollTop ||\n 0);\n }\n };\n lgQuery.prototype.scrollLeft = function (scrollLeft) {\n if (scrollLeft !== undefined) {\n document.body.scrollLeft = scrollLeft;\n document.documentElement.scrollLeft = scrollLeft;\n return this;\n }\n else {\n return (window.pageXOffset ||\n document.documentElement.scrollLeft ||\n document.body.scrollLeft ||\n 0);\n }\n };\n lgQuery.prototype.offset = function () {\n if (!this.firstElement) {\n return {\n left: 0,\n top: 0,\n };\n }\n var rect = this.firstElement.getBoundingClientRect();\n var bodyMarginLeft = $LG('body').style().marginLeft;\n // Minus body margin - https://stackoverflow.com/questions/30711548/is-getboundingclientrect-left-returning-a-wrong-value\n return {\n left: rect.left - parseFloat(bodyMarginLeft) + this.scrollLeft(),\n top: rect.top + this.scrollTop(),\n };\n };\n lgQuery.prototype.style = function () {\n if (!this.firstElement) {\n return {};\n }\n return (this.firstElement.currentStyle ||\n window.getComputedStyle(this.firstElement));\n };\n // Width without padding and border even if box-sizing is used.\n lgQuery.prototype.width = function () {\n var style = this.style();\n return (this.firstElement.clientWidth -\n parseFloat(style.paddingLeft) -\n parseFloat(style.paddingRight));\n };\n // Height without padding and border even if box-sizing is used.\n lgQuery.prototype.height = function () {\n var style = this.style();\n return (this.firstElement.clientHeight -\n parseFloat(style.paddingTop) -\n parseFloat(style.paddingBottom));\n };\n lgQuery.eventListeners = {};\n return lgQuery;\n}());\nexports.lgQuery = lgQuery;\nfunction $LG(selector) {\n initLgPolyfills();\n return new lgQuery(selector);\n}\nexports.$LG = $LG;\n//# sourceMappingURL=lgQuery.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LightGallery = void 0;\nvar lg_events_1 = require(\"./lg-events\");\nvar lg_settings_1 = require(\"./lg-settings\");\nvar lg_utils_1 = require(\"./lg-utils\");\nvar lgQuery_1 = require(\"./lgQuery\");\n// @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio\n// @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html\n// Unique id for each gallery\nvar lgId = 0;\nvar LightGallery = /** @class */ (function () {\n function LightGallery(element, options) {\n this.lgOpened = false;\n this.index = 0;\n // lightGallery modules\n this.plugins = [];\n // false when lightGallery load first slide content;\n this.lGalleryOn = false;\n // True when a slide animation is in progress\n this.lgBusy = false;\n this.currentItemsInDom = [];\n // Scroll top value before lightGallery is opened\n this.prevScrollTop = 0;\n this.bodyPaddingRight = 0;\n this.isDummyImageRemoved = false;\n this.dragOrSwipeEnabled = false;\n this.mediaContainerPosition = {\n top: 0,\n bottom: 0,\n };\n if (!element) {\n return this;\n }\n lgId++;\n this.lgId = lgId;\n this.el = element;\n this.LGel = lgQuery_1.$LG(element);\n this.generateSettings(options);\n this.buildModules();\n // When using dynamic mode, ensure dynamicEl is an array\n if (this.settings.dynamic &&\n this.settings.dynamicEl !== undefined &&\n !Array.isArray(this.settings.dynamicEl)) {\n throw 'When using dynamic mode, you must also define dynamicEl as an Array.';\n }\n this.galleryItems = this.getItems();\n this.normalizeSettings();\n // Gallery items\n this.init();\n this.validateLicense();\n return this;\n }\n LightGallery.prototype.generateSettings = function (options) {\n // lightGallery settings\n this.settings = __assign(__assign({}, lg_settings_1.lightGalleryCoreSettings), options);\n if (this.settings.isMobile &&\n typeof this.settings.isMobile === 'function'\n ? this.settings.isMobile()\n : lg_utils_1.default.isMobile()) {\n var mobileSettings = __assign(__assign({}, this.settings.mobileSettings), this.settings.mobileSettings);\n this.settings = __assign(__assign({}, this.settings), mobileSettings);\n }\n };\n LightGallery.prototype.normalizeSettings = function () {\n if (this.settings.slideEndAnimation) {\n this.settings.hideControlOnEnd = false;\n }\n if (!this.settings.closable) {\n this.settings.swipeToClose = false;\n }\n // And reset it on close to get the correct value next time\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\n // At the moment, Zoom from image doesn't support dynamic options\n // @todo add zoomFromOrigin support for dynamic images\n if (this.settings.dynamic) {\n this.zoomFromOrigin = false;\n }\n if (!this.settings.container) {\n this.settings.container = document.body;\n }\n // settings.preload should not be grater than $item.length\n this.settings.preload = Math.min(this.settings.preload, this.galleryItems.length);\n };\n LightGallery.prototype.init = function () {\n var _this = this;\n this.addSlideVideoInfo(this.galleryItems);\n this.buildStructure();\n this.LGel.trigger(lg_events_1.lGEvents.init, {\n instance: this,\n });\n if (this.settings.keyPress) {\n this.keyPress();\n }\n setTimeout(function () {\n _this.enableDrag();\n _this.enableSwipe();\n _this.triggerPosterClick();\n }, 50);\n this.arrow();\n if (this.settings.mousewheel) {\n this.mousewheel();\n }\n if (!this.settings.dynamic) {\n this.openGalleryOnItemClick();\n }\n };\n LightGallery.prototype.openGalleryOnItemClick = function () {\n var _this = this;\n var _loop_1 = function (index) {\n var element = this_1.items[index];\n var $element = lgQuery_1.$LG(element);\n // Using different namespace for click because click event should not unbind if selector is same object('this')\n // @todo manage all event listners - should have namespace that represent element\n var uuid = lgQuery_1.lgQuery.generateUUID();\n $element\n .attr('data-lg-id', uuid)\n .on(\"click.lgcustom-item-\" + uuid, function (e) {\n e.preventDefault();\n var currentItemIndex = _this.settings.index || index;\n _this.openGallery(currentItemIndex, element);\n });\n };\n var this_1 = this;\n // Using for loop instead of using bubbling as the items can be any html element.\n for (var index = 0; index < this.items.length; index++) {\n _loop_1(index);\n }\n };\n /**\n * Module constructor\n * Modules are build incrementally.\n * Gallery should be opened only once all the modules are initialized.\n * use moduleBuildTimeout to make sure this\n */\n LightGallery.prototype.buildModules = function () {\n var _this = this;\n this.settings.plugins.forEach(function (plugin) {\n _this.plugins.push(new plugin(_this, lgQuery_1.$LG));\n });\n };\n LightGallery.prototype.validateLicense = function () {\n if (!this.settings.licenseKey) {\n console.error('Please provide a valid license key');\n }\n else if (this.settings.licenseKey === '0000-0000-000-0000') {\n console.warn(\"lightGallery: \" + this.settings.licenseKey + \" license key is not valid for production use\");\n }\n };\n LightGallery.prototype.getSlideItem = function (index) {\n return lgQuery_1.$LG(this.getSlideItemId(index));\n };\n LightGallery.prototype.getSlideItemId = function (index) {\n return \"#lg-item-\" + this.lgId + \"-\" + index;\n };\n LightGallery.prototype.getIdName = function (id) {\n return id + \"-\" + this.lgId;\n };\n LightGallery.prototype.getElementById = function (id) {\n return lgQuery_1.$LG(\"#\" + this.getIdName(id));\n };\n LightGallery.prototype.manageSingleSlideClassName = function () {\n if (this.galleryItems.length < 2) {\n this.outer.addClass('lg-single-item');\n }\n else {\n this.outer.removeClass('lg-single-item');\n }\n };\n LightGallery.prototype.buildStructure = function () {\n var _this = this;\n var container = this.$container && this.$container.get();\n if (container) {\n return;\n }\n var controls = '';\n var subHtmlCont = '';\n // Create controls\n if (this.settings.controls) {\n controls = \"<button type=\\\"button\\\" id=\\\"\" + this.getIdName('lg-prev') + \"\\\" aria-label=\\\"\" + this.settings.strings['previousSlide'] + \"\\\" class=\\\"lg-prev lg-icon\\\"> \" + this.settings.prevHtml + \" </button>\\n <button type=\\\"button\\\" id=\\\"\" + this.getIdName('lg-next') + \"\\\" aria-label=\\\"\" + this.settings.strings['nextSlide'] + \"\\\" class=\\\"lg-next lg-icon\\\"> \" + this.settings.nextHtml + \" </button>\";\n }\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n subHtmlCont =\n '<div class=\"lg-sub-html\" role=\"status\" aria-live=\"polite\"></div>';\n }\n var addClasses = '';\n if (this.settings.allowMediaOverlap) {\n // Do not remove space before last single quote\n addClasses += 'lg-media-overlap ';\n }\n var ariaLabelledby = this.settings.ariaLabelledby\n ? 'aria-labelledby=\"' + this.settings.ariaLabelledby + '\"'\n : '';\n var ariaDescribedby = this.settings.ariaDescribedby\n ? 'aria-describedby=\"' + this.settings.ariaDescribedby + '\"'\n : '';\n var containerClassName = \"lg-container \" + this.settings.addClass + \" \" + (document.body !== this.settings.container ? 'lg-inline' : '');\n var closeIcon = this.settings.closable && this.settings.showCloseIcon\n ? \"<button type=\\\"button\\\" aria-label=\\\"\" + this.settings.strings['closeGallery'] + \"\\\" id=\\\"\" + this.getIdName('lg-close') + \"\\\" class=\\\"lg-close lg-icon\\\"></button>\"\n : '';\n var maximizeIcon = this.settings.showMaximizeIcon\n ? \"<button type=\\\"button\\\" aria-label=\\\"\" + this.settings.strings['toggleMaximize'] + \"\\\" id=\\\"\" + this.getIdName('lg-maximize') + \"\\\" class=\\\"lg-maximize lg-icon\\\"></button>\"\n : '';\n var template = \"\\n <div class=\\\"\" + containerClassName + \"\\\" id=\\\"\" + this.getIdName('lg-container') + \"\\\" tabindex=\\\"-1\\\" aria-modal=\\\"true\\\" \" + ariaLabelledby + \" \" + ariaDescribedby + \" 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 \" + addClasses + \" \\\">\\n\\n <div id=\\\"\" + this.getIdName('lg-content') + \"\\\" class=\\\"lg-content\\\">\\n <div id=\\\"\" + this.getIdName('lg-inner') + \"\\\" class=\\\"lg-inner\\\">\\n </div>\\n \" + controls + \"\\n </div>\\n <div id=\\\"\" + this.getIdName('lg-toolbar') + \"\\\" class=\\\"lg-toolbar lg-group\\\">\\n \" + maximizeIcon + \"\\n \" + closeIcon + \"\\n </div>\\n \" + (this.settings.appendSubHtmlTo === '.lg-outer'\n ? subHtmlCont\n : '') + \"\\n <div id=\\\"\" + this.getIdName('lg-components') + \"\\\" class=\\\"lg-components\\\">\\n \" + (this.settings.appendSubHtmlTo === '.lg-sub-html'\n ? subHtmlCont\n : '') + \"\\n </div>\\n </div>\\n </div>\\n \";\n lgQuery_1.$LG(this.settings.container).append(template);\n if (document.body !== this.settings.container) {\n lgQuery_1.$LG(this.settings.container).css('position', 'relative');\n }\n this.outer = this.getElementById('lg-outer');\n this.$lgComponents = this.getElementById('lg-components');\n this.$backdrop = this.getElementById('lg-backdrop');\n this.$container = this.getElementById('lg-container');\n this.$inner = this.getElementById('lg-inner');\n this.$content = this.getElementById('lg-content');\n this.$toolbar = this.getElementById('lg-toolbar');\n this.$backdrop.css('transition-duration', this.settings.backdropDuration + 'ms');\n var outerClassNames = this.settings.mode + \" \";\n this.manageSingleSlideClassName();\n if (this.settings.enableDrag) {\n outerClassNames += 'lg-grab ';\n }\n this.outer.addClass(outerClassNames);\n this.$inner.css('transition-timing-function', this.settings.easing);\n this.$inner.css('transition-duration', this.settings.speed + 'ms');\n if (this.settings.download) {\n this.$toolbar.append(\"<a id=\\\"\" + this.getIdName('lg-download') + \"\\\" target=\\\"_blank\\\" rel=\\\"noopener\\\" aria-label=\\\"\" + this.settings.strings['download'] + \"\\\" download class=\\\"lg-download lg-icon\\\"></a>\");\n }\n this.counter();\n lgQuery_1.$LG(window).on(\"resize.lg.global\" + this.lgId + \" orientationchange.lg.global\" + this.lgId, function () {\n _this.refreshOnResize();\n });\n this.hideBars();\n this.manageCloseGallery();\n this.toggleMaximize();\n this.initModules();\n };\n LightGallery.prototype.refreshOnResize = function () {\n if (this.lgOpened) {\n var currentGalleryItem = this.galleryItems[this.index];\n var __slideVideoInfo = currentGalleryItem.__slideVideoInfo;\n this.mediaContainerPosition = this.getMediaContainerPosition();\n var _a = this.mediaContainerPosition, top_1 = _a.top, bottom = _a.bottom;\n this.currentImageSize = lg_utils_1.default.getSize(this.items[this.index], this.outer, top_1 + bottom, __slideVideoInfo && this.settings.videoMaxSize);\n if (__slideVideoInfo) {\n this.resizeVideoSlide(this.index, this.currentImageSize);\n }\n if (this.zoomFromOrigin && !this.isDummyImageRemoved) {\n var imgStyle = this.getDummyImgStyles(this.currentImageSize);\n this.outer\n .find('.lg-current .lg-dummy-img')\n .first()\n .attr('style', imgStyle);\n }\n this.LGel.trigger(lg_events_1.lGEvents.containerResize);\n }\n };\n LightGallery.prototype.resizeVideoSlide = function (index, imageSize) {\n var lgVideoStyle = this.getVideoContStyle(imageSize);\n var currentSlide = this.getSlideItem(index);\n currentSlide.find('.lg-video-cont').attr('style', lgVideoStyle);\n };\n /**\n * Update slides dynamically.\n * Add, edit or delete slides dynamically when lightGallery is opened.\n * Modify the current gallery items and pass it via updateSlides method\n * @note\n * - Do not mutate existing lightGallery items directly.\n * - Always pass new list of gallery items\n * - You need to take care of thumbnails outside the gallery if any\n * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method.\n * @param items Gallery items\n * @param index After the update operation, which slide gallery should navigate to\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n *\n * // Adding slides dynamically\n * let galleryItems = [\n * // Access existing lightGallery items\n * // galleryItems are automatically generated internally from the gallery HTML markup\n * // or directly from galleryItems when dynamic gallery is used\n * ...plugin.galleryItems,\n * ...[\n * {\n * src: 'img/img-1.png',\n * thumb: 'img/thumb1.png',\n * },\n * ],\n * ];\n * plugin.updateSlides(\n * galleryItems,\n * plugin.index,\n * );\n *\n *\n * // Remove slides dynamically\n * galleryItems = JSON.parse(\n * JSON.stringify(updateSlideInstance.galleryItems),\n * );\n * galleryItems.shift();\n * updateSlideInstance.updateSlides(galleryItems, 1);\n * @see <a href=\"/demos/update-slides/\">Demo</a>\n */\n LightGallery.prototype.updateSlides = function (items, index) {\n if (this.index > items.length - 1) {\n this.index = items.length - 1;\n }\n if (items.length === 1) {\n this.index = 0;\n }\n if (!items.length) {\n this.closeGallery();\n return;\n }\n var currentSrc = this.galleryItems[index].src;\n this.galleryItems = items;\n this.updateControls();\n this.$inner.empty();\n this.currentItemsInDom = [];\n var _index = 0;\n // Find the current index based on source value of the slide\n this.galleryItems.some(function (galleryItem, itemIndex) {\n if (galleryItem.src === currentSrc) {\n _index = itemIndex;\n return true;\n }\n return false;\n });\n this.currentItemsInDom = this.organizeSlideItems(_index, -1);\n this.loadContent(_index, true);\n this.getSlideItem(_index).addClass('lg-current');\n this.index = _index;\n this.updateCurrentCounter(_index);\n this.LGel.trigger(lg_events_1.lGEvents.updateSlides);\n };\n // Get gallery items based on multiple conditions\n LightGallery.prototype.getItems = function () {\n // Gallery items\n this.items = [];\n if (!this.settings.dynamic) {\n if (this.settings.selector === 'this') {\n this.items.push(this.el);\n }\n else if (this.settings.selector) {\n if (typeof this.settings.selector === 'string') {\n if (this.settings.selectWithin) {\n var selectWithin = lgQuery_1.$LG(this.settings.selectWithin);\n this.items = selectWithin\n .find(this.settings.selector)\n .get();\n }\n else {\n this.items = this.el.querySelectorAll(this.settings.selector);\n }\n }\n else {\n this.items = this.settings.selector;\n }\n }\n else {\n this.items = this.el.children;\n }\n return lg_utils_1.default.getDynamicOptions(this.items, this.settings.extraProps, this.settings.getCaptionFromTitleOrAlt, this.settings.exThumbImage);\n }\n else {\n return this.settings.dynamicEl || [];\n }\n };\n LightGallery.prototype.shouldHideScrollbar = function () {\n return (this.settings.hideScrollbar &&\n document.body === this.settings.container);\n };\n LightGallery.prototype.hideScrollbar = function () {\n if (!this.shouldHideScrollbar()) {\n return;\n }\n this.bodyPaddingRight = parseFloat(lgQuery_1.$LG('body').style().paddingRight);\n var bodyRect = document.documentElement.getBoundingClientRect();\n var scrollbarWidth = window.innerWidth - bodyRect.width;\n lgQuery_1.$LG(document.body).css('padding-right', scrollbarWidth + this.bodyPaddingRight + 'px');\n lgQuery_1.$LG(document.body).addClass('lg-overlay-open');\n };\n LightGallery.prototype.resetScrollBar = function () {\n if (!this.shouldHideScrollbar()) {\n return;\n }\n lgQuery_1.$LG(document.body).css('padding-right', this.bodyPaddingRight + 'px');\n lgQuery_1.$LG(document.body).removeClass('lg-overlay-open');\n };\n /**\n * Open lightGallery.\n * Open gallery with specific slide by passing index of the slide as parameter.\n * @category lGPublicMethods\n * @param {Number} index - index of the slide\n * @param {HTMLElement} element - Which image lightGallery should zoom from\n *\n * @example\n * const $dynamicGallery = document.getElementById('dynamic-gallery-demo');\n * const dynamicGallery = lightGallery($dynamicGallery, {\n * dynamic: true,\n * dynamicEl: [\n * {\n * src: 'img/1.jpg',\n * thumb: 'img/thumb-1.jpg',\n * subHtml: '<h4>Image 1 title</h4><p>Image 1 descriptions.</p>',\n * },\n * ...\n * ],\n * });\n * $dynamicGallery.addEventListener('click', function () {\n * // Starts with third item.(Optional).\n * // This is useful if you want use dynamic mode with\n * // custom thumbnails (thumbnails outside gallery),\n * dynamicGallery.openGallery(2);\n * });\n *\n */\n LightGallery.prototype.openGallery = function (index, element) {\n var _this = this;\n if (index === void 0) { index = this.settings.index; }\n // prevent accidental double execution\n if (this.lgOpened)\n return;\n this.lgOpened = true;\n this.outer.removeClass('lg-hide-items');\n this.hideScrollbar();\n // Add display block, but still has opacity 0\n this.$container.addClass('lg-show');\n var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, index);\n this.currentItemsInDom = itemsToBeInsertedToDom;\n var items = '';\n itemsToBeInsertedToDom.forEach(function (item) {\n items = items + (\"<div id=\\\"\" + item + \"\\\" class=\\\"lg-item\\\"></div>\");\n });\n this.$inner.append(items);\n this.addHtml(index);\n var transform = '';\n this.mediaContainerPosition = this.getMediaContainerPosition();\n var _a = this.mediaContainerPosition, top = _a.top, bottom = _a.bottom;\n if (!this.settings.allowMediaOverlap) {\n this.setMediaContainerPosition(top, bottom);\n }\n var __slideVideoInfo = this.galleryItems[index].__slideVideoInfo;\n if (this.zoomFromOrigin && element) {\n this.currentImageSize = lg_utils_1.default.getSize(element, this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize);\n transform = lg_utils_1.default.getTransform(element, this.outer, top, bottom, this.currentImageSize);\n }\n if (!this.zoomFromOrigin || !transform) {\n this.outer.addClass(this.settings.startClass);\n this.getSlideItem(index).removeClass('lg-complete');\n }\n var timeout = this.settings.zoomFromOrigin\n ? 100\n : this.settings.backdropDuration;\n setTimeout(function () {\n _this.outer.addClass('lg-components-open');\n }, timeout);\n this.index = index;\n this.LGel.trigger(lg_events_1.lGEvents.beforeOpen);\n // add class lg-current to remove initial transition\n this.getSlideItem(index).addClass('lg-current');\n this.lGalleryOn = false;\n // Store the current scroll top value to scroll back after closing the gallery..\n this.prevScrollTop = lgQuery_1.$LG(window).scrollTop();\n setTimeout(function () {\n // Need to check both zoomFromOrigin and transform values as we need to set set the\n // default opening animation if user missed to add the lg-size attribute\n if (_this.zoomFromOrigin && transform) {\n var currentSlide_1 = _this.getSlideItem(index);\n currentSlide_1.css('transform', transform);\n setTimeout(function () {\n currentSlide_1\n .addClass('lg-start-progress lg-start-end-progress')\n .css('transition-duration', _this.settings.startAnimationDuration + 'ms');\n _this.outer.addClass('lg-zoom-from-image');\n });\n setTimeout(function () {\n currentSlide_1.css('transform', 'translate3d(0, 0, 0)');\n }, 100);\n }\n setTimeout(function () {\n _this.$backdrop.addClass('in');\n _this.$container.addClass('lg-show-in');\n }, 10);\n setTimeout(function () {\n if (_this.settings.trapFocus &&\n document.body === _this.settings.container) {\n _this.trapFocus();\n }\n }, _this.settings.backdropDuration + 50);\n // lg-visible class resets gallery opacity to 1\n if (!_this.zoomFromOrigin || !transform) {\n setTimeout(function () {\n _this.outer.addClass('lg-visible');\n }, _this.settings.backdropDuration);\n }\n // initiate slide function\n _this.slide(index, false, false, false);\n _this.LGel.trigger(lg_events_1.lGEvents.afterOpen);\n });\n if (document.body === this.settings.container) {\n lgQuery_1.$LG('html').addClass('lg-on');\n }\n };\n /**\n * Note - Changing the position of the media on every slide transition creates a flickering effect.\n * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption.\n * if you have dynamic captions for each media,\n * you can provide an appropriate height for the captions via allowMediaOverlap option\n */\n LightGallery.prototype.getMediaContainerPosition = function () {\n if (this.settings.allowMediaOverlap) {\n return {\n top: 0,\n bottom: 0,\n };\n }\n var top = this.$toolbar.get().clientHeight || 0;\n var subHtml = this.outer.find('.lg-components .lg-sub-html').get();\n var captionHeight = this.settings.defaultCaptionHeight ||\n (subHtml && subHtml.clientHeight) ||\n 0;\n var thumbContainer = this.outer.find('.lg-thumb-outer').get();\n var thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0;\n var bottom = thumbHeight + captionHeight;\n return {\n top: top,\n bottom: bottom,\n };\n };\n LightGallery.prototype.setMediaContainerPosition = function (top, bottom) {\n if (top === void 0) { top = 0; }\n if (bottom === void 0) { bottom = 0; }\n this.$content.css('top', top + 'px').css('bottom', bottom + 'px');\n };\n LightGallery.prototype.hideBars = function () {\n var _this = this;\n // Hide controllers if mouse doesn't move for some period\n setTimeout(function () {\n _this.outer.removeClass('lg-hide-items');\n if (_this.settings.hideBarsDelay > 0) {\n _this.outer.on('mousemove.lg click.lg touchstart.lg', function () {\n _this.outer.removeClass('lg-hide-items');\n clearTimeout(_this.hideBarTimeout);\n // Timeout will be cleared on each slide movement also\n _this.hideBarTimeout = setTimeout(function () {\n _this.outer.addClass('lg-hide-items');\n }, _this.settings.hideBarsDelay);\n });\n _this.outer.trigger('mousemove.lg');\n }\n }, this.settings.showBarsAfter);\n };\n LightGallery.prototype.initPictureFill = function ($img) {\n if (this.settings.supportLegacyBrowser) {\n try {\n picturefill({\n elements: [$img.get()],\n });\n }\n catch (e) {\n console.warn('lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.');\n }\n }\n };\n /**\n * @desc Create image counter\n * Ex: 1/10\n */\n LightGallery.prototype.counter = function () {\n if (this.settings.counter) {\n var counterHtml = \"<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>\";\n this.outer.find(this.settings.appendCounterTo).append(counterHtml);\n }\n };\n /**\n * @desc add sub-html into the slide\n * @param {Number} index - index of the slide\n */\n LightGallery.prototype.addHtml = function (index) {\n var subHtml;\n var subHtmlUrl;\n if (this.galleryItems[index].subHtmlUrl) {\n subHtmlUrl = this.galleryItems[index].subHtmlUrl;\n }\n else {\n subHtml = this.galleryItems[index].subHtml;\n }\n if (!subHtmlUrl) {\n if (subHtml) {\n // get first letter of sub-html\n // if first letter starts with . or # get the html form the jQuery object\n var fL = subHtml.substring(0, 1);\n if (fL === '.' || fL === '#') {\n if (this.settings.subHtmlSelectorRelative &&\n !this.settings.dynamic) {\n subHtml = lgQuery_1.$LG(this.items)\n .eq(index)\n .find(subHtml)\n .first()\n .html();\n }\n else {\n subHtml = lgQuery_1.$LG(subHtml).first().html();\n }\n }\n }\n else {\n subHtml = '';\n }\n }\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n if (subHtmlUrl) {\n this.outer.find('.lg-sub-html').load(subHtmlUrl);\n }\n else {\n this.outer.find('.lg-sub-html').html(subHtml);\n }\n }\n else {\n var currentSlide = lgQuery_1.$LG(this.getSlideItemId(index));\n if (subHtmlUrl) {\n currentSlide.load(subHtmlUrl);\n }\n else {\n currentSlide.append(\"<div class=\\\"lg-sub-html\\\">\" + subHtml + \"</div>\");\n }\n }\n // Add lg-empty-html class if title doesn't exist\n if (typeof subHtml !== 'undefined' && subHtml !== null) {\n if (subHtml === '') {\n this.outer\n .find(this.settings.appendSubHtmlTo)\n .addClass('lg-empty-html');\n }\n else {\n this.outer\n .find(this.settings.appendSubHtmlTo)\n .removeClass('lg-empty-html');\n }\n }\n this.LGel.trigger(lg_events_1.lGEvents.afterAppendSubHtml, {\n index: index,\n });\n };\n /**\n * @desc Preload slides\n * @param {Number} index - index of the slide\n * @todo preload not working for the first slide, Also, should work for the first and last slide as well\n */\n LightGallery.prototype.preload = function (index) {\n for (var i = 1; i <= this.settings.preload; i++) {\n if (i >= this.galleryItems.length - index) {\n break;\n }\n this.loadContent(index + i, false);\n }\n for (var j = 1; j <= this.settings.preload; j++) {\n if (index - j < 0) {\n break;\n }\n this.loadContent(index - j, false);\n }\n };\n LightGallery.prototype.getDummyImgStyles = function (imageSize) {\n if (!imageSize)\n return '';\n return \"width:\" + imageSize.width + \"px;\\n margin-left: -\" + imageSize.width / 2 + \"px;\\n margin-top: -\" + imageSize.height / 2 + \"px;\\n height:\" + imageSize.height + \"px\";\n };\n LightGallery.prototype.getVideoContStyle = function (imageSize) {\n if (!imageSize)\n return '';\n return \"width:\" + imageSize.width + \"px;\\n height:\" + imageSize.height + \"px\";\n };\n LightGallery.prototype.getDummyImageContent = function ($currentSlide, index, alt) {\n var $currentItem;\n if (!this.settings.dynamic) {\n $currentItem = lgQuery_1.$LG(this.items).eq(index);\n }\n if ($currentItem) {\n var _dummyImgSrc = void 0;\n if (!this.settings.exThumbImage) {\n _dummyImgSrc = $currentItem.find('img').first().attr('src');\n }\n else {\n _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage);\n }\n if (!_dummyImgSrc)\n return '';\n var imgStyle = this.getDummyImgStyles(this.currentImageSize);\n var dummyImgContent = \"<img \" + alt + \" style=\\\"\" + imgStyle + \"\\\" class=\\\"lg-dummy-img\\\" src=\\\"\" + _dummyImgSrc + \"\\\" />\";\n $currentSlide.addClass('lg-first-slide');\n this.outer.addClass('lg-first-slide-loading');\n return dummyImgContent;\n }\n return '';\n };\n LightGallery.prototype.setImgMarkup = function (src, $currentSlide, index) {\n var currentGalleryItem = this.galleryItems[index];\n var alt = currentGalleryItem.alt, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources;\n // Use the thumbnail as dummy image which will be resized to actual image size and\n // displayed on top of actual image\n var imgContent = '';\n var altAttr = alt ? 'alt=\"' + alt + '\"' : '';\n if (this.isFirstSlideWithZoomAnimation()) {\n imgContent = this.getDummyImageContent($currentSlide, index, altAttr);\n }\n else {\n imgContent = lg_utils_1.default.getImgMarkup(index, src, altAttr, srcset, sizes, sources);\n }\n var imgMarkup = \"<picture class=\\\"lg-img-wrap\\\"> \" + imgContent + \"</picture>\";\n $currentSlide.prepend(imgMarkup);\n };\n LightGallery.prototype.onSlideObjectLoad = function ($slide, isHTML5VideoWithoutPoster, onLoad, onError) {\n var mediaObject = $slide.find('.lg-object').first();\n if (lg_utils_1.default.isImageLoaded(mediaObject.get()) ||\n isHTML5VideoWithoutPoster) {\n onLoad();\n }\n else {\n mediaObject.on('load.lg error.lg', function () {\n onLoad && onLoad();\n });\n mediaObject.on('error.lg', function () {\n onError && onError();\n });\n }\n };\n /**\n *\n * @param $el Current slide item\n * @param index\n * @param delay Delay is 0 except first time\n * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin\n * @param isFirstSlide\n */\n LightGallery.prototype.onLgObjectLoad = function (currentSlide, index, delay, speed, isFirstSlide, isHTML5VideoWithoutPoster) {\n var _this = this;\n this.onSlideObjectLoad(currentSlide, isHTML5VideoWithoutPoster, function () {\n _this.triggerSlideItemLoad(currentSlide, index, delay, speed, isFirstSlide);\n }, function () {\n currentSlide.addClass('lg-complete lg-complete_');\n currentSlide.html('<span class=\"lg-error-msg\">' +\n _this.settings.strings['mediaLoadingFailed'] +\n '</span>');\n });\n };\n LightGallery.prototype.triggerSlideItemLoad = function ($currentSlide, index, delay, speed, isFirstSlide) {\n var _this = this;\n var currentGalleryItem = this.galleryItems[index];\n // Adding delay for video slides without poster for better performance and user experience\n // Videos should start playing once once the gallery is completely loaded\n var _speed = isFirstSlide &&\n this.getSlideType(currentGalleryItem) === 'video' &&\n !currentGalleryItem.poster\n ? speed\n : 0;\n setTimeout(function () {\n $currentSlide.addClass('lg-complete lg-complete_');\n _this.LGel.trigger(lg_events_1.lGEvents.slideItemLoad, {\n index: index,\n delay: delay || 0,\n isFirstSlide: isFirstSlide,\n });\n }, _speed);\n };\n LightGallery.prototype.isFirstSlideWithZoomAnimation = function () {\n return !!(!this.lGalleryOn &&\n this.zoomFromOrigin &&\n this.currentImageSize);\n };\n // Add video slideInfo\n LightGallery.prototype.addSlideVideoInfo = function (items) {\n var _this = this;\n items.forEach(function (element, index) {\n element.__slideVideoInfo = lg_utils_1.default.isVideo(element.src, !!element.video, index);\n if (element.__slideVideoInfo &&\n _this.settings.loadYouTubePoster &&\n !element.poster &&\n element.__slideVideoInfo.youtube) {\n element.poster = \"//img.youtube.com/vi/\" + element.__slideVideoInfo.youtube[1] + \"/maxresdefault.jpg\";\n }\n });\n };\n /**\n * Load slide content into slide.\n * This is used to load content into slides that is not visible too\n * @param {Number} index - index of the slide.\n * @param {Boolean} rec - if true call loadcontent() function again.\n */\n LightGallery.prototype.loadContent = function (index, rec) {\n var _this = this;\n var currentGalleryItem = this.galleryItems[index];\n var $currentSlide = lgQuery_1.$LG(this.getSlideItemId(index));\n var poster = currentGalleryItem.poster, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources;\n var src = currentGalleryItem.src;\n var video = currentGalleryItem.video;\n var _html5Video = video && typeof video === 'string' ? JSON.parse(video) : video;\n if (currentGalleryItem.responsive) {\n var srcDyItms = currentGalleryItem.responsive.split(',');\n src = lg_utils_1.default.getResponsiveSrc(srcDyItms) || src;\n }\n var videoInfo = currentGalleryItem.__slideVideoInfo;\n var lgVideoStyle = '';\n var iframe = !!currentGalleryItem.iframe;\n var isFirstSlide = !this.lGalleryOn;\n // delay for adding complete class. it is 0 except first time.\n var delay = 0;\n if (isFirstSlide) {\n if (this.zoomFromOrigin && this.currentImageSize) {\n delay = this.settings.startAnimationDuration + 10;\n }\n else {\n delay = this.settings.backdropDuration + 10;\n }\n }\n if (!$currentSlide.hasClass('lg-loaded')) {\n if (videoInfo) {\n var _a = this.mediaContainerPosition, top_2 = _a.top, bottom = _a.bottom;\n var videoSize = lg_utils_1.default.getSize(this.items[index], this.outer, top_2 + bottom, videoInfo && this.settings.videoMaxSize);\n lgVideoStyle = this.getVideoContStyle(videoSize);\n }\n if (iframe) {\n var markup = lg_utils_1.default.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle);\n $currentSlide.prepend(markup);\n }\n else if (poster) {\n var dummyImg = '';\n var hasStartAnimation = isFirstSlide &&\n this.zoomFromOrigin &&\n this.currentImageSize;\n if (hasStartAnimation) {\n dummyImg = this.getDummyImageContent($currentSlide, index, '');\n }\n var markup = lg_utils_1.default.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo);\n $currentSlide.prepend(markup);\n }\n else if (videoInfo) {\n var markup = \"<div class=\\\"lg-video-cont \\\" style=\\\"\" + lgVideoStyle + \"\\\"></div>\";\n $currentSlide.prepend(markup);\n }\n else {\n this.setImgMarkup(src, $currentSlide, index);\n if (srcset || sources) {\n var $img = $currentSlide.find('.lg-object');\n this.initPictureFill($img);\n }\n }\n if (poster || videoInfo) {\n this.LGel.trigger(lg_events_1.lGEvents.hasVideo, {\n index: index,\n src: src,\n html5Video: _html5Video,\n hasPoster: !!poster,\n });\n }\n this.LGel.trigger(lg_events_1.lGEvents.afterAppendSlide, { index: index });\n if (this.lGalleryOn &&\n this.settings.appendSubHtmlTo === '.lg-item') {\n this.addHtml(index);\n }\n }\n // For first time add some delay for displaying the start animation.\n var _speed = 0;\n // Do not change the delay value because it is required for zoom plugin.\n // If gallery opened from direct url (hash) speed value should be 0\n if (delay && !lgQuery_1.$LG(document.body).hasClass('lg-from-hash')) {\n _speed = delay;\n }\n // Only for first slide and zoomFromOrigin is enabled\n if (this.isFirstSlideWithZoomAnimation()) {\n setTimeout(function () {\n $currentSlide\n .removeClass('lg-start-end-progress lg-start-progress')\n .removeAttr('style');\n }, this.settings.startAnimationDuration + 100);\n if (!$currentSlide.hasClass('lg-loaded')) {\n setTimeout(function () {\n if (_this.getSlideType(currentGalleryItem) === 'image') {\n var alt = currentGalleryItem.alt;\n var altAttr = alt ? 'alt=\"' + alt + '\"' : '';\n $currentSlide\n .find('.lg-img-wrap')\n .append(lg_utils_1.default.getImgMarkup(index, src, altAttr, srcset, sizes, currentGalleryItem.sources));\n if (srcset || sources) {\n var $img = $currentSlide.find('.lg-object');\n _this.initPictureFill($img);\n }\n }\n if (_this.getSlideType(currentGalleryItem) === 'image' ||\n (_this.getSlideType(currentGalleryItem) === 'video' &&\n poster)) {\n _this.onLgObjectLoad($currentSlide, index, delay, _speed, true, false);\n // load remaining slides once the slide is completely loaded\n _this.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () {\n _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);\n }, function () {\n _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);\n });\n }\n }, this.settings.startAnimationDuration + 100);\n }\n }\n // SLide content has been added to dom\n $currentSlide.addClass('lg-loaded');\n if (!this.isFirstSlideWithZoomAnimation() ||\n (this.getSlideType(currentGalleryItem) === 'video' && !poster)) {\n this.onLgObjectLoad($currentSlide, index, delay, _speed, isFirstSlide, !!(videoInfo && videoInfo.html5 && !poster));\n }\n // When gallery is opened once content is loaded (second time) need to add lg-complete class for css styling\n if ((!this.zoomFromOrigin || !this.currentImageSize) &&\n $currentSlide.hasClass('lg-complete_') &&\n !this.lGalleryOn) {\n setTimeout(function () {\n $currentSlide.addClass('lg-complete');\n }, this.settings.backdropDuration);\n }\n // Content loaded\n // Need to set lGalleryOn before calling preload function\n this.lGalleryOn = true;\n if (rec === true) {\n if (!$currentSlide.hasClass('lg-complete_')) {\n $currentSlide\n .find('.lg-object')\n .first()\n .on('load.lg error.lg', function () {\n _this.preload(index);\n });\n }\n else {\n this.preload(index);\n }\n }\n };\n /**\n * @desc Remove dummy image content and load next slides\n * Called only for the first time if zoomFromOrigin animation is enabled\n * @param index\n * @param $currentSlide\n * @param speed\n */\n LightGallery.prototype.loadContentOnFirstSlideLoad = function (index, $currentSlide, speed) {\n var _this = this;\n setTimeout(function () {\n $currentSlide.find('.lg-dummy-img').remove();\n $currentSlide.removeClass('lg-first-slide');\n _this.outer.removeClass('lg-first-slide-loading');\n _this.isDummyImageRemoved = true;\n _this.preload(index);\n }, speed + 300);\n };\n LightGallery.prototype.getItemsToBeInsertedToDom = function (index, prevIndex, numberOfItems) {\n var _this = this;\n if (numberOfItems === void 0) { numberOfItems = 0; }\n var itemsToBeInsertedToDom = [];\n // Minimum 2 items should be there\n var possibleNumberOfItems = Math.max(numberOfItems, 3);\n possibleNumberOfItems = Math.min(possibleNumberOfItems, this.galleryItems.length);\n var prevIndexItem = \"lg-item-\" + this.lgId + \"-\" + prevIndex;\n if (this.galleryItems.length <= 3) {\n this.galleryItems.forEach(function (_element, index) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + _this.lgId + \"-\" + index);\n });\n return itemsToBeInsertedToDom;\n }\n if (index < (this.galleryItems.length - 1) / 2) {\n for (var idx = index; idx > index - possibleNumberOfItems / 2 && idx >= 0; idx--) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + idx);\n }\n var numberOfExistingItems = itemsToBeInsertedToDom.length;\n for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + (index + idx + 1));\n }\n }\n else {\n for (var idx = index; idx <= this.galleryItems.length - 1 &&\n idx < index + possibleNumberOfItems / 2; idx++) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + idx);\n }\n var numberOfExistingItems = itemsToBeInsertedToDom.length;\n for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + (index - idx - 1));\n }\n }\n if (this.settings.loop) {\n if (index === this.galleryItems.length - 1) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + 0);\n }\n else if (index === 0) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + (this.galleryItems.length - 1));\n }\n }\n if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) {\n itemsToBeInsertedToDom.push(\"lg-item-\" + this.lgId + \"-\" + prevIndex);\n }\n return itemsToBeInsertedToDom;\n };\n LightGallery.prototype.organizeSlideItems = function (index, prevIndex) {\n var _this = this;\n var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom);\n itemsToBeInsertedToDom.forEach(function (item) {\n if (_this.currentItemsInDom.indexOf(item) === -1) {\n _this.$inner.append(\"<div id=\\\"\" + item + \"\\\" class=\\\"lg-item\\\"></div>\");\n }\n });\n this.currentItemsInDom.forEach(function (item) {\n if (itemsToBeInsertedToDom.indexOf(item) === -1) {\n lgQuery_1.$LG(\"#\" + item).remove();\n }\n });\n return itemsToBeInsertedToDom;\n };\n /**\n * Get previous index of the slide\n */\n LightGallery.prototype.getPreviousSlideIndex = function () {\n var prevIndex = 0;\n try {\n var currentItemId = this.outer\n .find('.lg-current')\n .first()\n .attr('id');\n prevIndex = parseInt(currentItemId.split('-')[3]) || 0;\n }\n catch (error) {\n prevIndex = 0;\n }\n return prevIndex;\n };\n LightGallery.prototype.setDownloadValue = function (index) {\n if (this.settings.download) {\n var currentGalleryItem = this.galleryItems[index];\n var hideDownloadBtn = currentGalleryItem.downloadUrl === false ||\n currentGalleryItem.downloadUrl === 'false';\n if (hideDownloadBtn) {\n this.outer.addClass('lg-hide-download');\n }\n else {\n var $download = this.getElementById('lg-download');\n this.outer.removeClass('lg-hide-download');\n $download.attr('href', currentGalleryItem.downloadUrl ||\n currentGalleryItem.src);\n if (currentGalleryItem.download) {\n $download.attr('download', currentGalleryItem.download);\n }\n }\n }\n };\n LightGallery.prototype.makeSlideAnimation = function (direction, currentSlideItem, previousSlideItem) {\n var _this = this;\n if (this.lGalleryOn) {\n previousSlideItem.addClass('lg-slide-progress');\n }\n setTimeout(function () {\n // remove all transitions\n _this.outer.addClass('lg-no-trans');\n _this.outer\n .find('.lg-item')\n .removeClass('lg-prev-slide lg-next-slide');\n if (direction === 'prev') {\n //prevslide\n currentSlideItem.addClass('lg-prev-slide');\n previousSlideItem.addClass('lg-next-slide');\n }\n else {\n // next slide\n currentSlideItem.addClass('lg-next-slide');\n previousSlideItem.addClass('lg-prev-slide');\n }\n // give 50 ms for browser to add/remove class\n setTimeout(function () {\n _this.outer.find('.lg-item').removeClass('lg-current');\n currentSlideItem.addClass('lg-current');\n // reset all transitions\n _this.outer.removeClass('lg-no-trans');\n }, 50);\n }, this.lGalleryOn ? this.settings.slideDelay : 0);\n };\n /**\n * Goto a specific slide.\n * @param {Number} index - index of the slide\n * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag\n * @param {Boolean} fromThumb - true if slide function called via thumbnail click\n * @param {String} direction - Direction of the slide(next/prev)\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * // to go to 3rd slide\n * plugin.slide(2);\n *\n */\n LightGallery.prototype.slide = function (index, fromTouch, fromThumb, direction) {\n var _this = this;\n var prevIndex = this.getPreviousSlideIndex();\n this.currentItemsInDom = this.organizeSlideItems(index, prevIndex);\n // Prevent multiple call, Required for hsh plugin\n if (this.lGalleryOn && prevIndex === index) {\n return;\n }\n var numberOfGalleryItems = this.galleryItems.length;\n if (!this.lgBusy) {\n if (this.settings.counter) {\n this.updateCurrentCounter(index);\n }\n var currentSlideItem = this.getSlideItem(index);\n var previousSlideItem_1 = this.getSlideItem(prevIndex);\n var currentGalleryItem = this.galleryItems[index];\n var videoInfo = currentGalleryItem.__slideVideoInfo;\n this.outer.attr('data-lg-slide-type', this.getSlideType(currentGalleryItem));\n this.setDownloadValue(index);\n if (videoInfo) {\n var _a = this.mediaContainerPosition, top_3 = _a.top, bottom = _a.bottom;\n var videoSize = lg_utils_1.default.getSize(this.items[index], this.outer, top_3 + bottom, videoInfo && this.settings.videoMaxSize);\n this.resizeVideoSlide(index, videoSize);\n }\n this.LGel.trigger(lg_events_1.lGEvents.beforeSlide, {\n prevIndex: prevIndex,\n index: index,\n fromTouch: !!fromTouch,\n fromThumb: !!fromThumb,\n });\n this.lgBusy = true;\n clearTimeout(this.hideBarTimeout);\n this.arrowDisable(index);\n if (!direction) {\n if (index < prevIndex) {\n direction = 'prev';\n }\n else if (index > prevIndex) {\n direction = 'next';\n }\n }\n if (!fromTouch) {\n this.makeSlideAnimation(direction, currentSlideItem, previousSlideItem_1);\n }\n else {\n this.outer\n .find('.lg-item')\n .removeClass('lg-prev-slide lg-current lg-next-slide');\n var touchPrev = void 0;\n var touchNext = void 0;\n if (numberOfGalleryItems > 2) {\n touchPrev = index - 1;\n touchNext = index + 1;\n if (index === 0 && prevIndex === numberOfGalleryItems - 1) {\n // next slide\n touchNext = 0;\n touchPrev = numberOfGalleryItems - 1;\n }\n else if (index === numberOfGalleryItems - 1 &&\n prevIndex === 0) {\n // prev slide\n touchNext = 0;\n touchPrev = numberOfGalleryItems - 1;\n }\n }\n else {\n touchPrev = 0;\n touchNext = 1;\n }\n if (direction === 'prev') {\n this.getSlideItem(touchNext).addClass('lg-next-slide');\n }\n else {\n this.getSlideItem(touchPrev).addClass('lg-prev-slide');\n }\n currentSlideItem.addClass('lg-current');\n }\n // Do not put load content in set timeout as it needs to load immediately when the gallery is opened\n if (!this.lGalleryOn) {\n this.loadContent(index, true);\n }\n else {\n setTimeout(function () {\n _this.loadContent(index, true);\n // Add title if this.settings.appendSubHtmlTo === lg-sub-html\n if (_this.settings.appendSubHtmlTo !== '.lg-item') {\n _this.addHtml(index);\n }\n }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay));\n }\n setTimeout(function () {\n _this.lgBusy = false;\n previousSlideItem_1.removeClass('lg-slide-progress');\n _this.LGel.trigger(lg_events_1.lGEvents.afterSlide, {\n prevIndex: prevIndex,\n index: index,\n fromTouch: fromTouch,\n fromThumb: fromThumb,\n });\n }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay));\n }\n this.index = index;\n };\n LightGallery.prototype.updateCurrentCounter = function (index) {\n this.getElementById('lg-counter-current').html(index + 1 + '');\n };\n LightGallery.prototype.updateCounterTotal = function () {\n this.getElementById('lg-counter-all').html(this.galleryItems.length + '');\n };\n LightGallery.prototype.getSlideType = function (item) {\n if (item.__slideVideoInfo) {\n return 'video';\n }\n else if (item.iframe) {\n return 'iframe';\n }\n else {\n return 'image';\n }\n };\n LightGallery.prototype.touchMove = function (startCoords, endCoords, e) {\n var distanceX = endCoords.pageX - startCoords.pageX;\n var distanceY = endCoords.pageY - startCoords.pageY;\n var allowSwipe = false;\n if (this.swipeDirection) {\n allowSwipe = true;\n }\n else {\n if (Math.abs(distanceX) > 15) {\n this.swipeDirection = 'horizontal';\n allowSwipe = true;\n }\n else if (Math.abs(distanceY) > 15) {\n this.swipeDirection = 'vertical';\n allowSwipe = true;\n }\n }\n if (!allowSwipe) {\n return;\n }\n var $currentSlide = this.getSlideItem(this.index);\n if (this.swipeDirection === 'horizontal') {\n e === null || e === void 0 ? void 0 : e.preventDefault();\n // reset opacity and transition duration\n this.outer.addClass('lg-dragging');\n // move current slide\n this.setTranslate($currentSlide, distanceX, 0);\n // move next and prev slide with current slide\n var width = $currentSlide.get().offsetWidth;\n var slideWidthAmount = (width * 15) / 100;\n var gutter = slideWidthAmount - Math.abs((distanceX * 10) / 100);\n this.setTranslate(this.outer.find('.lg-prev-slide').first(), -width + distanceX - gutter, 0);\n this.setTranslate(this.outer.find('.lg-next-slide').first(), width + distanceX + gutter, 0);\n }\n else if (this.swipeDirection === 'vertical') {\n if (this.settings.swipeToClose) {\n e === null || e === void 0 ? void 0 : e.preventDefault();\n this.$container.addClass('lg-dragging-vertical');\n var opacity = 1 - Math.abs(distanceY) / window.innerHeight;\n this.$backdrop.css('opacity', opacity);\n var scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2);\n this.setTranslate($currentSlide, 0, distanceY, scale, scale);\n if (Math.abs(distanceY) > 100) {\n this.outer\n .addClass('lg-hide-items')\n .removeClass('lg-components-open');\n }\n }\n }\n };\n LightGallery.prototype.touchEnd = function (endCoords, startCoords, event) {\n var _this = this;\n var distance;\n // keep slide animation for any mode while dragg/swipe\n if (this.settings.mode !== 'lg-slide') {\n this.outer.addClass('lg-slide');\n }\n // set transition duration\n setTimeout(function () {\n _this.$container.removeClass('lg-dragging-vertical');\n _this.outer\n .removeClass('lg-dragging lg-hide-items')\n .addClass('lg-components-open');\n var triggerClick = true;\n if (_this.swipeDirection === 'horizontal') {\n distance = endCoords.pageX - startCoords.pageX;\n var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX);\n if (distance < 0 &&\n distanceAbs > _this.settings.swipeThreshold) {\n _this.goToNextSlide(true);\n triggerClick = false;\n }\n else if (distance > 0 &&\n distanceAbs > _this.settings.swipeThreshold) {\n _this.goToPrevSlide(true);\n triggerClick = false;\n }\n }\n else if (_this.swipeDirection === 'vertical') {\n distance = Math.abs(endCoords.pageY - startCoords.pageY);\n if (_this.settings.closable &&\n _this.settings.swipeToClose &&\n distance > 100) {\n _this.closeGallery();\n return;\n }\n else {\n _this.$backdrop.css('opacity', 1);\n }\n }\n _this.outer.find('.lg-item').removeAttr('style');\n if (triggerClick &&\n Math.abs(endCoords.pageX - startCoords.pageX) < 5) {\n // Trigger click if distance is less than 5 pix\n var target = lgQuery_1.$LG(event.target);\n if (_this.isPosterElement(target)) {\n _this.LGel.trigger(lg_events_1.lGEvents.posterClick);\n }\n }\n _this.swipeDirection = undefined;\n });\n // remove slide class once drag/swipe is completed if mode is not slide\n setTimeout(function () {\n if (!_this.outer.hasClass('lg-dragging') &&\n _this.settings.mode !== 'lg-slide') {\n _this.outer.removeClass('lg-slide');\n }\n }, this.settings.speed + 100);\n };\n LightGallery.prototype.enableSwipe = function () {\n var _this = this;\n var startCoords = {};\n var endCoords = {};\n var isMoved = false;\n var isSwiping = false;\n if (this.settings.enableSwipe) {\n this.$inner.on('touchstart.lg', function (e) {\n _this.dragOrSwipeEnabled = true;\n var $item = _this.getSlideItem(_this.index);\n if ((lgQuery_1.$LG(e.target).hasClass('lg-item') ||\n $item.get().contains(e.target)) &&\n !_this.outer.hasClass('lg-zoomed') &&\n !_this.lgBusy &&\n e.touches.length === 1) {\n isSwiping = true;\n _this.touchAction = 'swipe';\n _this.manageSwipeClass();\n startCoords = {\n pageX: e.touches[0].pageX,\n pageY: e.touches[0].pageY,\n };\n }\n });\n this.$inner.on('touchmove.lg', function (e) {\n if (isSwiping &&\n _this.touchAction === 'swipe' &&\n e.touches.length === 1) {\n endCoords = {\n pageX: e.touches[0].pageX,\n pageY: e.touches[0].pageY,\n };\n _this.touchMove(startCoords, endCoords, e);\n isMoved = true;\n }\n });\n this.$inner.on('touchend.lg', function (event) {\n if (_this.touchAction === 'swipe') {\n if (isMoved) {\n isMoved = false;\n _this.touchEnd(endCoords, startCoords, event);\n }\n else if (isSwiping) {\n var target = lgQuery_1.$LG(event.target);\n if (_this.isPosterElement(target)) {\n _this.LGel.trigger(lg_events_1.lGEvents.posterClick);\n }\n }\n _this.touchAction = undefined;\n isSwiping = false;\n }\n });\n }\n };\n LightGallery.prototype.enableDrag = function () {\n var _this = this;\n var startCoords = {};\n var endCoords = {};\n var isDraging = false;\n var isMoved = false;\n if (this.settings.enableDrag) {\n this.outer.on('mousedown.lg', function (e) {\n _this.dragOrSwipeEnabled = true;\n var $item = _this.getSlideItem(_this.index);\n if (lgQuery_1.$LG(e.target).hasClass('lg-item') ||\n $item.get().contains(e.target)) {\n if (!_this.outer.hasClass('lg-zoomed') && !_this.lgBusy) {\n e.preventDefault();\n if (!_this.lgBusy) {\n _this.manageSwipeClass();\n startCoords = {\n pageX: e.pageX,\n pageY: e.pageY,\n };\n isDraging = true;\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\n _this.outer.get().scrollLeft += 1;\n _this.outer.get().scrollLeft -= 1;\n // *\n _this.outer\n .removeClass('lg-grab')\n .addClass('lg-grabbing');\n _this.LGel.trigger(lg_events_1.lGEvents.dragStart);\n }\n }\n }\n });\n lgQuery_1.$LG(window).on(\"mousemove.lg.global\" + this.lgId, function (e) {\n if (isDraging && _this.lgOpened) {\n isMoved = true;\n endCoords = {\n pageX: e.pageX,\n pageY: e.pageY,\n };\n _this.touchMove(startCoords, endCoords);\n _this.LGel.trigger(lg_events_1.lGEvents.dragMove);\n }\n });\n lgQuery_1.$LG(window).on(\"mouseup.lg.global\" + this.lgId, function (event) {\n if (!_this.lgOpened) {\n return;\n }\n var target = lgQuery_1.$LG(event.target);\n if (isMoved) {\n isMoved = false;\n _this.touchEnd(endCoords, startCoords, event);\n _this.LGel.trigger(lg_events_1.lGEvents.dragEnd);\n }\n else if (_this.isPosterElement(target)) {\n _this.LGel.trigger(lg_events_1.lGEvents.posterClick);\n }\n // Prevent execution on click\n if (isDraging) {\n isDraging = false;\n _this.outer.removeClass('lg-grabbing').addClass('lg-grab');\n }\n });\n }\n };\n LightGallery.prototype.triggerPosterClick = function () {\n var _this = this;\n this.$inner.on('click.lg', function (event) {\n if (!_this.dragOrSwipeEnabled &&\n _this.isPosterElement(lgQuery_1.$LG(event.target))) {\n _this.LGel.trigger(lg_events_1.lGEvents.posterClick);\n }\n });\n };\n LightGallery.prototype.manageSwipeClass = function () {\n var _touchNext = this.index + 1;\n var _touchPrev = this.index - 1;\n if (this.settings.loop && this.galleryItems.length > 2) {\n if (this.index === 0) {\n _touchPrev = this.galleryItems.length - 1;\n }\n else if (this.index === this.galleryItems.length - 1) {\n _touchNext = 0;\n }\n }\n this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide');\n if (_touchPrev > -1) {\n this.getSlideItem(_touchPrev).addClass('lg-prev-slide');\n }\n this.getSlideItem(_touchNext).addClass('lg-next-slide');\n };\n /**\n * Go to next slide\n * @param {Boolean} fromTouch - true if slide function called via touch event\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.goToNextSlide();\n * @see <a href=\"/demos/methods/\">Demo</a>\n */\n LightGallery.prototype.goToNextSlide = function (fromTouch) {\n var _this = this;\n var _loop = this.settings.loop;\n if (fromTouch && this.galleryItems.length < 3) {\n _loop = false;\n }\n if (!this.lgBusy) {\n if (this.index + 1 < this.galleryItems.length) {\n this.index++;\n this.LGel.trigger(lg_events_1.lGEvents.beforeNextSlide, {\n index: this.index,\n });\n this.slide(this.index, !!fromTouch, false, 'next');\n }\n else {\n if (_loop) {\n this.index = 0;\n this.LGel.trigger(lg_events_1.lGEvents.beforeNextSlide, {\n index: this.index,\n });\n this.slide(this.index, !!fromTouch, false, 'next');\n }\n else if (this.settings.slideEndAnimation && !fromTouch) {\n this.outer.addClass('lg-right-end');\n setTimeout(function () {\n _this.outer.removeClass('lg-right-end');\n }, 400);\n }\n }\n }\n };\n /**\n * Go to previous slides\n * @param {Boolean} fromTouch - true if slide function called via touch event\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery({});\n * plugin.goToPrevSlide();\n * @see <a href=\"/demos/methods/\">Demo</a>\n *\n */\n LightGallery.prototype.goToPrevSlide = function (fromTouch) {\n var _this = this;\n var _loop = this.settings.loop;\n if (fromTouch && this.galleryItems.length < 3) {\n _loop = false;\n }\n if (!this.lgBusy) {\n if (this.index > 0) {\n this.index--;\n this.LGel.trigger(lg_events_1.lGEvents.beforePrevSlide, {\n index: this.index,\n fromTouch: fromTouch,\n });\n this.slide(this.index, !!fromTouch, false, 'prev');\n }\n else {\n if (_loop) {\n this.index = this.galleryItems.length - 1;\n this.LGel.trigger(lg_events_1.lGEvents.beforePrevSlide, {\n index: this.index,\n fromTouch: fromTouch,\n });\n this.slide(this.index, !!fromTouch, false, 'prev');\n }\n else if (this.settings.slideEndAnimation && !fromTouch) {\n this.outer.addClass('lg-left-end');\n setTimeout(function () {\n _this.outer.removeClass('lg-left-end');\n }, 400);\n }\n }\n }\n };\n LightGallery.prototype.keyPress = function () {\n var _this = this;\n lgQuery_1.$LG(window).on(\"keydown.lg.global\" + this.lgId, function (e) {\n if (_this.lgOpened &&\n _this.settings.escKey === true &&\n e.keyCode === 27) {\n e.preventDefault();\n if (_this.settings.allowMediaOverlap &&\n _this.outer.hasClass('lg-can-toggle') &&\n _this.outer.hasClass('lg-components-open')) {\n _this.outer.removeClass('lg-components-open');\n }\n else {\n _this.closeGallery();\n }\n }\n if (_this.lgOpened && _this.galleryItems.length > 1) {\n if (e.keyCode === 37) {\n e.preventDefault();\n _this.goToPrevSlide();\n }\n if (e.keyCode === 39) {\n e.preventDefault();\n _this.goToNextSlide();\n }\n }\n });\n };\n LightGallery.prototype.arrow = function () {\n var _this = this;\n this.getElementById('lg-prev').on('click.lg', function () {\n _this.goToPrevSlide();\n });\n this.getElementById('lg-next').on('click.lg', function () {\n _this.goToNextSlide();\n });\n };\n LightGallery.prototype.arrowDisable = function (index) {\n // Disable arrows if settings.hideControlOnEnd is true\n if (!this.settings.loop && this.settings.hideControlOnEnd) {\n var $prev = this.getElementById('lg-prev');\n var $next = this.getElementById('lg-next');\n if (index + 1 === this.galleryItems.length) {\n $next.attr('disabled', 'disabled').addClass('disabled');\n }\n else {\n $next.removeAttr('disabled').removeClass('disabled');\n }\n if (index === 0) {\n $prev.attr('disabled', 'disabled').addClass('disabled');\n }\n else {\n $prev.removeAttr('disabled').removeClass('disabled');\n }\n }\n };\n LightGallery.prototype.setTranslate = function ($el, xValue, yValue, scaleX, scaleY) {\n if (scaleX === void 0) { scaleX = 1; }\n if (scaleY === void 0) { scaleY = 1; }\n $el.css('transform', 'translate3d(' +\n xValue +\n 'px, ' +\n yValue +\n 'px, 0px) scale3d(' +\n scaleX +\n ', ' +\n scaleY +\n ', 1)');\n };\n LightGallery.prototype.mousewheel = function () {\n var _this = this;\n var lastCall = 0;\n this.outer.on('wheel.lg', function (e) {\n if (!e.deltaY || _this.galleryItems.length < 2) {\n return;\n }\n e.preventDefault();\n var now = new Date().getTime();\n if (now - lastCall < 1000) {\n return;\n }\n lastCall = now;\n if (e.deltaY > 0) {\n _this.goToNextSlide();\n }\n else if (e.deltaY < 0) {\n _this.goToPrevSlide();\n }\n });\n };\n LightGallery.prototype.isSlideElement = function (target) {\n return (target.hasClass('lg-outer') ||\n target.hasClass('lg-item') ||\n target.hasClass('lg-img-wrap'));\n };\n LightGallery.prototype.isPosterElement = function (target) {\n var playButton = this.getSlideItem(this.index)\n .find('.lg-video-play-button')\n .get();\n return (target.hasClass('lg-video-poster') ||\n target.hasClass('lg-video-play-button') ||\n (playButton && playButton.contains(target.get())));\n };\n /**\n * Maximize minimize inline gallery.\n * @category lGPublicMethods\n */\n LightGallery.prototype.toggleMaximize = function () {\n var _this = this;\n this.getElementById('lg-maximize').on('click.lg', function () {\n _this.$container.toggleClass('lg-inline');\n _this.refreshOnResize();\n });\n };\n LightGallery.prototype.invalidateItems = function () {\n for (var index = 0; index < this.items.length; index++) {\n var element = this.items[index];\n var $element = lgQuery_1.$LG(element);\n $element.off(\"click.lgcustom-item-\" + $element.attr('data-lg-id'));\n }\n };\n LightGallery.prototype.trapFocus = function () {\n var _this = this;\n this.$container.get().focus({\n preventScroll: true,\n });\n lgQuery_1.$LG(window).on(\"keydown.lg.global\" + this.lgId, function (e) {\n if (!_this.lgOpened) {\n return;\n }\n var isTabPressed = e.key === 'Tab' || e.keyCode === 9;\n if (!isTabPressed) {\n return;\n }\n var focusableEls = lg_utils_1.default.getFocusableElements(_this.$container.get());\n var firstFocusableEl = focusableEls[0];\n var lastFocusableEl = focusableEls[focusableEls.length - 1];\n if (e.shiftKey) {\n if (document.activeElement === firstFocusableEl) {\n lastFocusableEl.focus();\n e.preventDefault();\n }\n }\n else {\n if (document.activeElement === lastFocusableEl) {\n firstFocusableEl.focus();\n e.preventDefault();\n }\n }\n });\n };\n LightGallery.prototype.manageCloseGallery = function () {\n var _this = this;\n if (!this.settings.closable)\n return;\n var mousedown = false;\n this.getElementById('lg-close').on('click.lg', function () {\n _this.closeGallery();\n });\n if (this.settings.closeOnTap) {\n // If you drag the slide and release outside gallery gets close on chrome\n // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer\n this.outer.on('mousedown.lg', function (e) {\n var target = lgQuery_1.$LG(e.target);\n if (_this.isSlideElement(target)) {\n mousedown = true;\n }\n else {\n mousedown = false;\n }\n });\n this.outer.on('mousemove.lg', function () {\n mousedown = false;\n });\n this.outer.on('mouseup.lg', function (e) {\n var target = lgQuery_1.$LG(e.target);\n if (_this.isSlideElement(target) && mousedown) {\n if (!_this.outer.hasClass('lg-dragging')) {\n _this.closeGallery();\n }\n }\n });\n }\n };\n /**\n * Close lightGallery if it is opened.\n *\n * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery\n * @return returns the estimated time to close gallery completely including the close animation duration\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.closeGallery();\n *\n */\n LightGallery.prototype.closeGallery = function (force) {\n var _this = this;\n if (!this.lgOpened || (!this.settings.closable && !force)) {\n return 0;\n }\n this.LGel.trigger(lg_events_1.lGEvents.beforeClose);\n if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) {\n lgQuery_1.$LG(window).scrollTop(this.prevScrollTop);\n }\n var currentItem = this.items[this.index];\n var transform;\n if (this.zoomFromOrigin && currentItem) {\n var _a = this.mediaContainerPosition, top_4 = _a.top, bottom = _a.bottom;\n var _b = this.galleryItems[this.index], __slideVideoInfo = _b.__slideVideoInfo, poster = _b.poster;\n var imageSize = lg_utils_1.default.getSize(currentItem, this.outer, top_4 + bottom, __slideVideoInfo && poster && this.settings.videoMaxSize);\n transform = lg_utils_1.default.getTransform(currentItem, this.outer, top_4, bottom, imageSize);\n }\n if (this.zoomFromOrigin && transform) {\n this.outer.addClass('lg-closing lg-zoom-from-image');\n this.getSlideItem(this.index)\n .addClass('lg-start-end-progress')\n .css('transition-duration', this.settings.startAnimationDuration + 'ms')\n .css('transform', transform);\n }\n else {\n this.outer.addClass('lg-hide-items');\n // lg-zoom-from-image is used for setting the opacity to 1 if zoomFromOrigin is true\n // If the closing item doesn't have the lg-size attribute, remove this class to avoid the closing css conflicts\n this.outer.removeClass('lg-zoom-from-image');\n }\n // Unbind all events added by lightGallery\n // @todo\n //this.$el.off('.lg.tm');\n this.destroyModules();\n this.lGalleryOn = false;\n this.isDummyImageRemoved = false;\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\n clearTimeout(this.hideBarTimeout);\n this.hideBarTimeout = false;\n lgQuery_1.$LG('html').removeClass('lg-on');\n this.outer.removeClass('lg-visible lg-components-open');\n // Resetting opacity to 0 isd required as vertical swipe to close function adds inline opacity.\n this.$backdrop.removeClass('in').css('opacity', 0);\n var removeTimeout = this.zoomFromOrigin && transform\n ? Math.max(this.settings.startAnimationDuration, this.settings.backdropDuration)\n : this.settings.backdropDuration;\n this.$container.removeClass('lg-show-in');\n // Once the closign animation is completed and gallery is invisible\n setTimeout(function () {\n if (_this.zoomFromOrigin && transform) {\n _this.outer.removeClass('lg-zoom-from-image');\n }\n _this.$container.removeClass('lg-show');\n // Reset scrollbar\n _this.resetScrollBar();\n // Need to remove inline opacity as it is used in the stylesheet as well\n _this.$backdrop\n .removeAttr('style')\n .css('transition-duration', _this.settings.backdropDuration + 'ms');\n _this.outer.removeClass(\"lg-closing \" + _this.settings.startClass);\n _this.getSlideItem(_this.index).removeClass('lg-start-end-progress');\n _this.$inner.empty();\n if (_this.lgOpened) {\n _this.LGel.trigger(lg_events_1.lGEvents.afterClose, {\n instance: _this,\n });\n }\n if (_this.$container.get()) {\n _this.$container.get().blur();\n }\n _this.lgOpened = false;\n }, removeTimeout + 100);\n return removeTimeout + 100;\n };\n LightGallery.prototype.initModules = function () {\n this.plugins.forEach(function (module) {\n try {\n module.init();\n }\n catch (err) {\n console.warn(\"lightGallery:- make sure lightGallery module is properly initiated\");\n }\n });\n };\n LightGallery.prototype.destroyModules = function (destroy) {\n this.plugins.forEach(function (module) {\n try {\n if (destroy) {\n module.destroy();\n }\n else {\n module.closeGallery && module.closeGallery();\n }\n }\n catch (err) {\n console.warn(\"lightGallery:- make sure lightGallery module is properly destroyed\");\n }\n });\n };\n /**\n * Refresh lightGallery with new set of children.\n *\n * @description This is useful to update the gallery when the child elements are changed without calling destroy method.\n *\n * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery\n * @see <a href=\"/demos/dynamic-mode/\">Demo</a>\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * // Delete or add children, then call\n * plugin.refresh();\n *\n */\n LightGallery.prototype.refresh = function (galleryItems) {\n if (!this.settings.dynamic) {\n this.invalidateItems();\n }\n if (galleryItems) {\n this.galleryItems = galleryItems;\n }\n else {\n this.galleryItems = this.getItems();\n }\n this.updateControls();\n this.openGalleryOnItemClick();\n this.LGel.trigger(lg_events_1.lGEvents.updateSlides);\n };\n LightGallery.prototype.updateControls = function () {\n this.addSlideVideoInfo(this.galleryItems);\n this.updateCounterTotal();\n this.manageSingleSlideClassName();\n };\n LightGallery.prototype.destroyGallery = function () {\n this.destroyModules(true);\n if (!this.settings.dynamic) {\n this.invalidateItems();\n }\n lgQuery_1.$LG(window).off(\".lg.global\" + this.lgId);\n this.LGel.off('.lg');\n this.$container.remove();\n };\n /**\n * Destroy lightGallery.\n * Destroy lightGallery and its plugin instances completely\n *\n * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance.\n * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed.\n * You can use refresh method most of the times.\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.destroy();\n *\n */\n LightGallery.prototype.destroy = function () {\n var closeTimeout = this.closeGallery(true);\n if (closeTimeout) {\n setTimeout(this.destroyGallery.bind(this), closeTimeout);\n }\n else {\n this.destroyGallery();\n }\n return closeTimeout;\n };\n return LightGallery;\n}());\nexports.LightGallery = LightGallery;\n//# sourceMappingURL=lightgallery.js.map","var map = {\n\t\"./autoplay/lg-autoplay.min.js\": [\n\t\t842,\n\t\t5459\n\t],\n\t\"./comment/lg-comment.min.js\": [\n\t\t8478,\n\t\t6458\n\t],\n\t\"./fullscreen/lg-fullscreen.min.js\": [\n\t\t6621,\n\t\t2065\n\t],\n\t\"./hash/lg-hash.min.js\": [\n\t\t2154,\n\t\t9256\n\t],\n\t\"./mediumZoom/lg-medium-zoom.min.js\": [\n\t\t4725,\n\t\t8279\n\t],\n\t\"./pager/lg-pager.min.js\": [\n\t\t8490,\n\t\t5470\n\t],\n\t\"./relativeCaption/lg-relative-caption.min.js\": [\n\t\t1092,\n\t\t2661\n\t],\n\t\"./rotate/lg-rotate.min.js\": [\n\t\t7506,\n\t\t8268\n\t],\n\t\"./share/lg-share.min.js\": [\n\t\t9082,\n\t\t7435\n\t],\n\t\"./thumbnail/lg-thumbnail.min.js\": [\n\t\t2896,\n\t\t3042\n\t],\n\t\"./video/lg-video.min.js\": [\n\t\t8906,\n\t\t9438\n\t],\n\t\"./vimeoThumbnail/lg-vimeo-thumbnail.min.js\": [\n\t\t6861,\n\t\t8599\n\t],\n\t\"./zoom/lg-zoom.min.js\": [\n\t\t7002,\n\t\t2236\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(() => {\n\t\treturn __webpack_require__.t(id, 7 | 16);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 4141;\nmodule.exports = webpackAsyncContext;"],"names":["SPLIT_LOWER_UPPER_RE","SPLIT_UPPER_UPPER_RE","SPLIT_SEPARATE_NUMBER_RE","DEFAULT_STRIP_REGEXP","SPLIT_REPLACE_VALUE","DEFAULT_PREFIX_SUFFIX_CHARACTERS","split","value","result","trim","replace","start","end","length","charAt","slice","splitSeparateNumbers","words","i","word","match","exec","offset","index","splice","noCase","input","options","prefix","suffix","splitPrefixSuffix","map","lowerFactory","locale","join","delimiter","toLowerCase","toLocaleLowerCase","splitFn","separateNumbers","prefixCharacters","suffixCharacters","prefixIndex","suffixIndex","char","includes","solvePluginName","pluginName","fileName","handleResult","status","default","console","error","reason","async","initLightGallery","plugins","opts","_iro","lightGallery","document","querySelector","Promise","allSettled","name","lightgallery_1","exports","el","LightGallery","Object","defineProperty","lGEvents","afterAppendSlide","init","hasVideo","containerResize","updateSlides","afterAppendSubHtml","beforeOpen","afterOpen","slideItemLoad","beforeSlide","afterSlide","posterClick","dragStart","dragMove","dragEnd","beforeNextSlide","beforePrevSlide","beforeClose","afterClose","rotateLeft","rotateRight","flipHorizontal","flipVertical","autoplay","autoplayStart","autoplayStop","lightGalleryCoreSettings","mode","easing","speed","licenseKey","height","width","addClass","startClass","backdropDuration","container","startAnimationDuration","zoomFromOrigin","hideBarsDelay","showBarsAfter","slideDelay","supportLegacyBrowser","allowMediaOverlap","videoMaxSize","loadYouTubePoster","defaultCaptionHeight","ariaLabelledby","ariaDescribedby","resetScrollPosition","hideScrollbar","closable","swipeToClose","closeOnTap","showCloseIcon","showMaximizeIcon","loop","escKey","keyPress","trapFocus","controls","slideEndAnimation","hideControlOnEnd","mousewheel","getCaptionFromTitleOrAlt","appendSubHtmlTo","subHtmlSelectorRelative","preload","numberOfSlideItemsInDom","selector","selectWithin","nextHtml","prevHtml","iframeWidth","iframeHeight","iframeMaxWidth","iframeMaxHeight","download","counter","appendCounterTo","swipeThreshold","enableSwipe","enableDrag","dynamic","dynamicEl","extraProps","exThumbImage","isMobile","undefined","mobileSettings","strings","closeGallery","toggleMaximize","previousSlide","nextSlide","playVideo","mediaLoadingFailed","__spreadArrays","this","s","il","arguments","r","Array","k","a","j","jl","convertToData","lgQuery_1","defaultDynamicOptions","attr","g","toUpperCase","utils","getSize","spacing","defaultLgSize","lgSize","$LG","isResponsiveSizes","wWidth","window","innerWidth","size_1","parseInt","size","cWidth","cHeight","maxWidth","Math","min","maxHeight","ratio","getTransform","top","bottom","imageSize","LGel","find","first","get","containerRect","getBoundingClientRect","wHeight","elWidth","elHeight","elStyle","style","x","left","parseFloat","paddingLeft","borderLeft","scrollLeft","y","paddingTop","borderTop","scrollTop","getIframeMarkup","src","iframeTitle","getImgMarkup","altAttr","srcset","sizes","sources","imgMarkup","sourceTag","JSON","parse","source","attrs","keys","forEach","key","getResponsiveSrc","srcItms","rsWidth","rsSrc","_src","push","isImageLoaded","img","complete","naturalWidth","getVideoPosterMarkup","_poster","dummyImg","videoContStyle","playVideoString","_isVideo","youtube","vimeo","getFocusableElements","elements","querySelectorAll","filter","call","element","getComputedStyle","display","visibility","getDynamicOptions","items","dynamicElements","availableDynamicOptions","item","attributes","specified","dynamicAttr","label","indexOf","currentItem","alt","title","thumb","subHtml","test","navigator","userAgent","isVideo","isHTML5VIdeo","html5","wistia","lgQuery","cssVenderPrefixes","_getSelector","firstElement","_getFirstEl","generateUUID","c","random","toString","prototype","context","substring","_each","func","_setCssVendorPrefix","cssProperty","property","group1","isEventMatched","event","eventName","eventNamespace","e","every","getAttribute","setAttribute","eq","parent","parentElement","removeAttr","removeAttribute","wrap","className","wrapper","createElement","parentNode","insertBefore","removeChild","appendChild","classNames","classList","add","removeClass","remove","hasClass","contains","hasAttribute","attribute","toggleClass","css","_this","on","events","listener","isArray","eventListeners","addEventListener","once","off","removeEventListener","trigger","detail","customEvent","CustomEvent","dispatchEvent","load","url","fetch","then","res","text","html","innerHTML","append","insertAdjacentHTML","prepend","empty","body","documentElement","pageYOffset","pageXOffset","rect","bodyMarginLeft","marginLeft","currentStyle","clientWidth","paddingRight","clientHeight","paddingBottom","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Element","matches","msMatchesSelector","webkitMatchesSelector","__assign","assign","t","n","p","hasOwnProperty","apply","lg_events_1","lg_settings_1","lg_utils_1","lgId","lgOpened","lGalleryOn","lgBusy","currentItemsInDom","prevScrollTop","bodyPaddingRight","isDummyImageRemoved","dragOrSwipeEnabled","mediaContainerPosition","generateSettings","buildModules","settings","galleryItems","getItems","normalizeSettings","validateLicense","addSlideVideoInfo","buildStructure","instance","setTimeout","triggerPosterClick","arrow","openGalleryOnItemClick","_loop_1","this_1","$element","uuid","preventDefault","currentItemIndex","openGallery","plugin","warn","getSlideItem","getSlideItemId","getIdName","id","getElementById","manageSingleSlideClassName","outer","$container","subHtmlCont","addClasses","containerClassName","closeIcon","maximizeIcon","template","$lgComponents","$backdrop","$inner","$content","$toolbar","outerClassNames","refreshOnResize","hideBars","manageCloseGallery","initModules","__slideVideoInfo","getMediaContainerPosition","_a","top_1","currentImageSize","resizeVideoSlide","imgStyle","getDummyImgStyles","lgVideoStyle","getVideoContStyle","currentSrc","updateControls","_index","some","galleryItem","itemIndex","organizeSlideItems","loadContent","updateCurrentCounter","children","shouldHideScrollbar","bodyRect","scrollbarWidth","resetScrollBar","itemsToBeInsertedToDom","getItemsToBeInsertedToDom","addHtml","transform","setMediaContainerPosition","timeout","currentSlide_1","slide","captionHeight","thumbContainer","clearTimeout","hideBarTimeout","initPictureFill","$img","picturefill","counterHtml","subHtmlUrl","fL","currentSlide","getDummyImageContent","$currentSlide","$currentItem","_dummyImgSrc","dummyImgContent","setImgMarkup","currentGalleryItem","isFirstSlideWithZoomAnimation","onSlideObjectLoad","$slide","isHTML5VideoWithoutPoster","onLoad","onError","mediaObject","onLgObjectLoad","delay","isFirstSlide","triggerSlideItemLoad","_speed","getSlideType","poster","video","rec","_html5Video","responsive","srcDyItms","videoInfo","iframe","top_2","videoSize","markup","html5Video","hasPoster","loadContentOnFirstSlideLoad","prevIndex","numberOfItems","possibleNumberOfItems","max","prevIndexItem","_element","idx","numberOfExistingItems","getPreviousSlideIndex","currentItemId","setDownloadValue","downloadUrl","$download","makeSlideAnimation","direction","currentSlideItem","previousSlideItem","fromTouch","fromThumb","numberOfGalleryItems","previousSlideItem_1","top_3","arrowDisable","touchPrev","touchNext","updateCounterTotal","touchMove","startCoords","endCoords","distanceX","pageX","distanceY","pageY","allowSwipe","swipeDirection","abs","setTranslate","offsetWidth","gutter","opacity","innerHeight","scale","touchEnd","distance","triggerClick","distanceAbs","goToNextSlide","goToPrevSlide","target","isPosterElement","isMoved","isSwiping","$item","touches","touchAction","manageSwipeClass","isDraging","_touchNext","_touchPrev","_loop","keyCode","$prev","$next","$el","xValue","yValue","scaleX","scaleY","lastCall","deltaY","now","Date","getTime","isSlideElement","playButton","invalidateItems","focus","preventScroll","focusableEls","firstFocusableEl","lastFocusableEl","shiftKey","activeElement","mousedown","force","top_4","_b","destroyModules","removeTimeout","blur","module","err","destroy","refresh","destroyGallery","closeTimeout","bind","webpackAsyncContext","req","__webpack_require__","o","resolve","Error","code","ids"],"sourceRoot":""}
|