{"version":3,"sources":["webpack:////opt/app/ariake-tubc/shared/node_modules/photoswipe/dist/photoswipe-lightbox.esm.js"],"names":["_typeof","obj","Symbol","iterator","constructor","prototype","_inherits","subClass","superClass","TypeError","Object","create","value","writable","configurable","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","call","e","_isNativeReflectConstruct","result","Super","_getPrototypeOf","NewTarget","this","arguments","apply","_possibleConstructorReturn","self","ReferenceError","_assertThisInitialized","getPrototypeOf","_classCallCheck","instance","Constructor","_defineProperties","target","props","i","length","descriptor","enumerable","defineProperty","key","_createClass","protoProps","staticProps","createElement","className","tagName","appendToEl","el","document","appendChild","setWidthHeight","w","h","style","width","height","LOAD_STATE","getElementsFromOption","option","legacySelector","parent","undefined","elements","Element","NodeList","Array","isArray","from","selector","querySelectorAll","isSafari","navigator","vendor","match","PhotoSwipeEvent","type","details","assign","defaultPrevented","Eventable","_listeners","_filters","pswp","options","name","fn","priority","push","sort","f1","f2","addFilter","filter","removeFilter","_this","_len","args","_key","forEach","on","listener","off","_this2","dispatch","event","Placeholder","imageSrc","container","element","decoding","alt","src","setAttribute","scale","propValue","transformOrigin","transform","parentNode","remove","Content","itemData","index","data","displayedImageWidth","displayedImageHeight","Number","isAttached","hasSlide","state","content","_this3","placeholder","keepPlaceholder","setTimeout","destroy","isLazy","reload","slide","usePlaceholder","placeholderEl","parentElement","prepend","placeholderSrc","applyFilters","msrc","isFirstSlide","isImageContent","loadImage","innerHTML","html","updateContentSize","_this4","imageElement","updateSrcsetSizes","srcset","complete","onLoaded","onload","onerror","onError","isActive","heavyAppended","append","removePlaceholder","displayError","isError","setDisplayedSize","isInitialSizeUpdate","image","sizesWidth","dataset","largestUsedSize","parseInt","sizes","String","load","isLoading","errorMsgEl","innerText","errorMsg","_this5","supportsDecode","isDecoding","decode","finally","appendImage","parsePaddingOption","prop","viewportSize","paddingValue","paddingFn","padding","legacyPropName","toUpperCase","slice","ZoomLevel","maxWidth","maxHeight","panAreaSize","elementSize","x","y","hRatio","vRatio","fit","Math","min","fill","vFill","initial","_getInitial","secondary","_getSecondary","max","_getMax","zoomLevels","slideData","optionPrefix","optionName","optionValue","currZoomLevel","_parseZoomLevelOption","_lazyLoadData","createContentFromData","lazyLoad","getViewportSizeFn","newViewportSize","documentElement","clientWidth","window","innerHeight","getViewportSize","getPanAreaSize","zoomLevel","update","ceil","PhotoSwipeLightbox","_PhotoSwipeBase","_super2","_this6","_uid","_this7","onThumbnailsClick","bind","gallery","gallerySelector","galleryElement","addEventListener","which","ctrlKey","metaKey","altKey","shiftKey","specialKeyUsed","onLine","initialPoint","clientX","clientY","clickedIndex","getClickedIndex","dataSource","currentTarget","preventDefault","loadAndOpen","getClickedIndexFn","clickedTarget","clickedChildIndex","children","childSelector","findIndex","child","contains","initialPointerPos","shouldOpen","preload","_this8","promiseArray","pswpModuleType","pswpModule","goTo","Promise","resolve","Error","openPromise","preloadFirstSlide","_preloadedContent","getItemData","lazyLoadSlide","uid","all","then","iterableModules","mainModule","_openPhotoswipe","module","_this9","default","keys","contentLoader","addToCache","init","_this10","removeEventListener","_Eventable","PhotoSwipeBase","_super","numItems","items","_getGalleryDOMElements","dataSourceItem","_domElementToItemData","linkEl","querySelector","pswpSrc","href","pswpSrcset","pswpWidth","pswpHeight","pswpType","thumbnailEl","currentSrc","getAttribute","pswpCropped","cropped","thumbCropped"],"mappings":";0FAAA,SAASA,EAAQC,GAAmV,OAAtOD,EAArD,oBAAXE,QAAoD,kBAApBA,OAAOC,SAAmC,SAAiBF,GAAO,cAAcA,GAA2B,SAAiBA,GAAO,OAAOA,GAAyB,oBAAXC,QAAyBD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,IAAyBA,GAEnX,SAASK,EAAUC,EAAUC,GAAc,GAA0B,oBAAfA,GAA4C,OAAfA,EAAuB,MAAM,IAAIC,UAAU,sDAAyDF,EAASF,UAAYK,OAA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,SAAsB4H,EAAUC,GACrC,OAAOqG,EAActG,EAAUpG,KAAMqG,OAIlCuL,EA3LyB,CA4LhCjO","file":"js/1-dfa5749d25ce35dcbf61.chunk.js","sourcesContent":["function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*!\n * PhotoSwipe Lightbox 5.3.2 - https://photoswipe.com\n * (c) 2022 Dmytro Semenov\n */\n\n/** @typedef {import('../photoswipe.js').Point} Point */\n\n/** @typedef {undefined | null | false | '' | 0} Falsy */\n\n/** @typedef {keyof HTMLElementTagNameMap} HTMLElementTagName */\n\n/**\r\n * @template {HTMLElementTagName | Falsy} [T=\"div\"]\r\n * @template {Node | undefined} [NodeToAppendElementTo=undefined]\r\n * @param {string=} className\r\n * @param {T=} [tagName]\r\n * @param {NodeToAppendElementTo=} appendToEl\r\n * @returns {T extends HTMLElementTagName ? HTMLElementTagNameMap[T] : HTMLElementTagNameMap['div']}\r\n */\nfunction createElement(className, tagName, appendToEl) {\n var el = document.createElement(tagName || 'div');\n\n if (className) {\n el.className = className;\n }\n\n if (appendToEl) {\n appendToEl.appendChild(el);\n } // @ts-expect-error\n\n\n return el;\n}\n/**\r\n * Get transform string\r\n *\r\n * @param {number} x\r\n * @param {number=} y\r\n * @param {number=} scale\r\n */\n\n\nfunction toTransformString(x, y, scale) {\n var propValue = 'translate3d(' + x + 'px,' + (y || 0) + 'px' + ',0)';\n\n if (scale !== undefined) {\n propValue += ' scale3d(' + scale + ',' + scale + ',1)';\n }\n\n return propValue;\n}\n/**\r\n * Apply width and height CSS properties to element\r\n *\r\n * @param {HTMLElement} el\r\n * @param {string | number} w\r\n * @param {string | number} h\r\n */\n\n\nfunction setWidthHeight(el, w, h) {\n el.style.width = typeof w === 'number' ? w + 'px' : w;\n el.style.height = typeof h === 'number' ? h + 'px' : h;\n}\n/** @typedef {LOAD_STATE[keyof LOAD_STATE]} LoadState */\n\n/** @type {{ IDLE: 'idle'; LOADING: 'loading'; LOADED: 'loaded'; ERROR: 'error' }} */\n\n\nvar LOAD_STATE = {\n IDLE: 'idle',\n LOADING: 'loading',\n LOADED: 'loaded',\n ERROR: 'error'\n};\n/**\r\n * Check if click or keydown event was dispatched\r\n * with a special key or via mouse wheel.\r\n *\r\n * @param {MouseEvent | KeyboardEvent} e\r\n */\n\nfunction specialKeyUsed(e) {\n if (e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey) {\n return true;\n }\n}\n/**\r\n * Parse `gallery` or `children` options.\r\n *\r\n * @param {HTMLElement | NodeListOf | string} option\r\n * @param {string=} legacySelector\r\n * @param {HTMLElement | Document} [parent]\r\n * @returns HTMLElement[]\r\n */\n\n\nfunction getElementsFromOption(option, legacySelector) {\n var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;\n\n /** @type {HTMLElement[]} */\n var elements = [];\n\n if (option instanceof Element) {\n elements = [option];\n } else if (option instanceof NodeList || Array.isArray(option)) {\n elements = Array.from(option);\n } else {\n var selector = typeof option === 'string' ? option : legacySelector;\n\n if (selector) {\n elements = Array.from(parent.querySelectorAll(selector));\n }\n }\n\n return elements;\n}\n/**\r\n * Check if variable is PhotoSwipe class\r\n *\r\n * @param {any} fn\r\n */\n\n\nfunction isPswpClass(fn) {\n return typeof fn === 'function' && fn.prototype && fn.prototype.goTo;\n}\n/**\r\n * Check if browser is Safari\r\n *\r\n * @returns {boolean}\r\n */\n\n\nfunction isSafari() {\n return !!(navigator.vendor && navigator.vendor.match(/apple/i));\n}\n/** @typedef {import('../lightbox/lightbox.js').default} PhotoSwipeLightbox */\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n\n/** @typedef {import('../photoswipe.js').DataSource} DataSource */\n\n/** @typedef {import('../ui/ui-element.js').UIElementData} UIElementData */\n\n/** @typedef {import('../slide/content.js').default} ContentDefault */\n\n/** @typedef {import('../slide/slide.js').default} Slide */\n\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n\n/** @typedef {import('../slide/zoom-level.js').default} ZoomLevel */\n\n/** @typedef {import('../slide/get-thumb-bounds.js').Bounds} Bounds */\n\n/**\r\n * Allow adding an arbitrary props to the Content\r\n * https://photoswipe.com/custom-content/#using-webp-image-format\r\n * @typedef {ContentDefault & Record} Content\r\n */\n\n/** @typedef {{ x?: number; y?: number }} Point */\n\n/**\r\n * @typedef {Object} PhotoSwipeEventsMap https://photoswipe.com/events/\r\n *\r\n *\r\n * https://photoswipe.com/adding-ui-elements/\r\n *\r\n * @prop {undefined} uiRegister\r\n * @prop {{ data: UIElementData }} uiElementCreate\r\n *\r\n *\r\n * https://photoswipe.com/events/#initialization-events\r\n *\r\n * @prop {undefined} beforeOpen\r\n * @prop {undefined} firstUpdate\r\n * @prop {undefined} initialLayout\r\n * @prop {undefined} change\r\n * @prop {undefined} afterInit\r\n * @prop {undefined} bindEvents\r\n *\r\n *\r\n * https://photoswipe.com/events/#opening-or-closing-transition-events\r\n *\r\n * @prop {undefined} openingAnimationStart\r\n * @prop {undefined} openingAnimationEnd\r\n * @prop {undefined} closingAnimationStart\r\n * @prop {undefined} closingAnimationEnd\r\n *\r\n *\r\n * https://photoswipe.com/events/#closing-events\r\n *\r\n * @prop {undefined} close\r\n * @prop {undefined} destroy\r\n *\r\n *\r\n * https://photoswipe.com/events/#pointer-and-gesture-events\r\n *\r\n * @prop {{ originalEvent: PointerEvent }} pointerDown\r\n * @prop {{ originalEvent: PointerEvent }} pointerMove\r\n * @prop {{ originalEvent: PointerEvent }} pointerUp\r\n * @prop {{ bgOpacity: number }} pinchClose can be default prevented\r\n * @prop {{ panY: number }} verticalDrag can be default prevented\r\n *\r\n *\r\n * https://photoswipe.com/events/#slide-content-events\r\n *\r\n * @prop {{ content: Content }} contentInit\r\n * @prop {{ content: Content; isLazy: boolean }} contentLoad can be default prevented\r\n * @prop {{ content: Content; isLazy: boolean }} contentLoadImage can be default prevented\r\n * @prop {{ content: Content; slide: Slide; isError?: boolean }} loadComplete\r\n * @prop {{ content: Content; slide: Slide }} loadError\r\n * @prop {{ content: Content; width: number; height: number }} contentResize can be default prevented\r\n * @prop {{ content: Content; width: number; height: number; slide: Slide }} imageSizeChange\r\n * @prop {{ content: Content }} contentLazyLoad can be default prevented\r\n * @prop {{ content: Content }} contentAppend can be default prevented\r\n * @prop {{ content: Content }} contentActivate can be default prevented\r\n * @prop {{ content: Content }} contentDeactivate can be default prevented\r\n * @prop {{ content: Content }} contentRemove can be default prevented\r\n * @prop {{ content: Content }} contentDestroy can be default prevented\r\n *\r\n *\r\n * undocumented\r\n *\r\n * @prop {{ point: Point; originalEvent: PointerEvent }} imageClickAction can be default prevented\r\n * @prop {{ point: Point; originalEvent: PointerEvent }} bgClickAction can be default prevented\r\n * @prop {{ point: Point; originalEvent: PointerEvent }} tapAction can be default prevented\r\n * @prop {{ point: Point; originalEvent: PointerEvent }} doubleTapAction can be default prevented\r\n *\r\n * @prop {{ originalEvent: KeyboardEvent }} keydown can be default prevented\r\n * @prop {{ x: number; dragging: boolean }} moveMainScroll\r\n * @prop {{ slide: Slide }} firstZoomPan\r\n * @prop {{ slide: Slide, data: SlideData, index: number }} gettingData\r\n * @prop {undefined} beforeResize\r\n * @prop {undefined} resize\r\n * @prop {undefined} viewportSize\r\n * @prop {undefined} updateScrollOffset\r\n * @prop {{ slide: Slide }} slideInit\r\n * @prop {{ slide: Slide }} afterSetContent\r\n * @prop {{ slide: Slide }} slideLoad\r\n * @prop {{ slide: Slide }} appendHeavy can be default prevented\r\n * @prop {{ slide: Slide }} appendHeavyContent\r\n * @prop {{ slide: Slide }} slideActivate\r\n * @prop {{ slide: Slide }} slideDeactivate\r\n * @prop {{ slide: Slide }} slideDestroy\r\n * @prop {{ destZoomLevel: number, centerPoint: Point, transitionDuration: number | false }} beforeZoomTo\r\n * @prop {{ slide: Slide }} zoomPanUpdate\r\n * @prop {{ slide: Slide }} initialZoomPan\r\n * @prop {{ slide: Slide }} calcSlideSize\r\n * @prop {undefined} resolutionChanged\r\n * @prop {{ originalEvent: WheelEvent }} wheel can be default prevented\r\n * @prop {{ content: Content }} contentAppendImage can be default prevented\r\n * @prop {{ index: number; itemData: SlideData }} lazyLoadSlide can be default prevented\r\n * @prop {undefined} lazyLoad\r\n * @prop {{ slide: Slide }} calcBounds\r\n * @prop {{ zoomLevels: ZoomLevel, slideData: SlideData }} zoomLevelsUpdate\r\n *\r\n *\r\n * legacy\r\n *\r\n * @prop {undefined} init\r\n * @prop {undefined} initialZoomIn\r\n * @prop {undefined} initialZoomOut\r\n * @prop {undefined} initialZoomInEnd\r\n * @prop {undefined} initialZoomOutEnd\r\n * @prop {{ dataSource: DataSource, numItems: number }} numItems\r\n * @prop {{ itemData: SlideData; index: number }} itemData\r\n * @prop {{ index: number, itemData: SlideData, instance: PhotoSwipe }} thumbBounds\r\n */\n\n/**\r\n * @typedef {Object} PhotoSwipeFiltersMap https://photoswipe.com/filters/\r\n *\r\n * @prop {(numItems: number, dataSource: DataSource) => number} numItems\r\n * Modify the total amount of slides. Example on Data sources page.\r\n * https://photoswipe.com/filters/#numitems\r\n *\r\n * @prop {(itemData: SlideData, index: number) => SlideData} itemData\r\n * Modify slide item data. Example on Data sources page.\r\n * https://photoswipe.com/filters/#itemdata\r\n *\r\n * @prop {(itemData: SlideData, element: HTMLElement, linkEl: HTMLAnchorElement) => SlideData} domItemData\r\n * Modify item data when it's parsed from DOM element. Example on Data sources page.\r\n * https://photoswipe.com/filters/#domitemdata\r\n *\r\n * @prop {(clickedIndex: number, e: MouseEvent, instance: PhotoSwipeLightbox) => number} clickedIndex\r\n * Modify clicked gallery item index.\r\n * https://photoswipe.com/filters/#clickedindex\r\n *\r\n * @prop {(placeholderSrc: string | false, content: Content) => string | false} placeholderSrc\r\n * Modify placeholder image source.\r\n * https://photoswipe.com/filters/#placeholdersrc\r\n *\r\n * @prop {(isContentLoading: boolean, content: Content) => boolean} isContentLoading\r\n * Modify if the content is currently loading.\r\n * https://photoswipe.com/filters/#iscontentloading\r\n *\r\n * @prop {(isContentZoomable: boolean, content: Content) => boolean} isContentZoomable\r\n * Modify if the content can be zoomed.\r\n * https://photoswipe.com/filters/#iscontentzoomable\r\n *\r\n * @prop {(useContentPlaceholder: boolean, content: Content) => boolean} useContentPlaceholder\r\n * Modify if the placeholder should be used for the content.\r\n * https://photoswipe.com/filters/#usecontentplaceholder\r\n *\r\n * @prop {(isKeepingPlaceholder: boolean, content: Content) => boolean} isKeepingPlaceholder\r\n * Modify if the placeholder should be kept after the content is loaded.\r\n * https://photoswipe.com/filters/#iskeepingplaceholder\r\n *\r\n *\r\n * @prop {(contentErrorElement: HTMLElement, content: Content) => HTMLElement} contentErrorElement\r\n * Modify an element when the content has error state (for example, if image cannot be loaded).\r\n * https://photoswipe.com/filters/#contenterrorelement\r\n *\r\n * @prop {(element: HTMLElement, data: UIElementData) => HTMLElement} uiElement\r\n * Modify a UI element that's being created.\r\n * https://photoswipe.com/filters/#uielement\r\n *\r\n * @prop {(thumbnail: HTMLElement, itemData: SlideData, index: number) => HTMLElement} thumbEl\r\n * Modify the thubmnail element from which opening zoom animation starts or ends.\r\n * https://photoswipe.com/filters/#thumbel\r\n *\r\n * @prop {(thumbBounds: Bounds, itemData: SlideData, index: number) => Bounds} thumbBounds\r\n * Modify the thubmnail bounds from which opening zoom animation starts or ends.\r\n * https://photoswipe.com/filters/#thumbbounds\r\n *\r\n * @prop {(srcsetSizesWidth: number, content: Content) => number} srcsetSizesWidth\r\n *\r\n */\n\n/**\r\n * @template {keyof PhotoSwipeFiltersMap} T\r\n * @typedef {{ fn: PhotoSwipeFiltersMap[T], priority: number }} Filter\r\n */\n\n/**\r\n * @template {keyof PhotoSwipeEventsMap} T\r\n * @typedef {PhotoSwipeEventsMap[T] extends undefined ? PhotoSwipeEvent : PhotoSwipeEvent & PhotoSwipeEventsMap[T]} AugmentedEvent\r\n */\n\n/**\r\n * @template {keyof PhotoSwipeEventsMap} T\r\n * @typedef {(event: AugmentedEvent) => void} EventCallback\r\n */\n\n/**\r\n * Base PhotoSwipe event object\r\n *\r\n * @template {keyof PhotoSwipeEventsMap} T\r\n */\n\n\nvar PhotoSwipeEvent = /*#__PURE__*/function () {\n /**\r\n * @param {T} type\r\n * @param {PhotoSwipeEventsMap[T]} [details]\r\n */\n function PhotoSwipeEvent(type, details) {\n _classCallCheck(this, PhotoSwipeEvent);\n\n this.type = type;\n\n if (details) {\n Object.assign(this, details);\n }\n }\n\n _createClass(PhotoSwipeEvent, [{\n key: \"preventDefault\",\n value: function preventDefault() {\n this.defaultPrevented = true;\n }\n }]);\n\n return PhotoSwipeEvent;\n}();\n/**\r\n * PhotoSwipe base class that can listen and dispatch for events.\r\n * Shared by PhotoSwipe Core and PhotoSwipe Lightbox, extended by base.js\r\n */\n\n\nvar Eventable = /*#__PURE__*/function () {\n function Eventable() {\n _classCallCheck(this, Eventable);\n\n /**\r\n * @type {{ [T in keyof PhotoSwipeEventsMap]?: ((event: AugmentedEvent) => void)[] }}\r\n */\n this._listeners = {};\n /**\r\n * @type {{ [T in keyof PhotoSwipeFiltersMap]?: Filter[] }}\r\n */\n\n this._filters = {};\n /** @type {PhotoSwipe=} */\n\n this.pswp = undefined;\n /** @type {PhotoSwipeOptions} */\n\n this.options = undefined;\n }\n /**\r\n * @template {keyof PhotoSwipeFiltersMap} T\r\n * @param {T} name\r\n * @param {PhotoSwipeFiltersMap[T]} fn\r\n * @param {number} priority\r\n */\n\n\n _createClass(Eventable, [{\n key: \"addFilter\",\n value: function addFilter(name, fn) {\n var priority = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n\n if (!this._filters[name]) {\n this._filters[name] = [];\n }\n\n this._filters[name].push({\n fn: fn,\n priority: priority\n });\n\n this._filters[name].sort(function (f1, f2) {\n return f1.priority - f2.priority;\n });\n\n if (this.pswp) {\n this.pswp.addFilter(name, fn, priority);\n }\n }\n /**\r\n * @template {keyof PhotoSwipeFiltersMap} T\r\n * @param {T} name\r\n * @param {PhotoSwipeFiltersMap[T]} fn\r\n */\n\n }, {\n key: \"removeFilter\",\n value: function removeFilter(name, fn) {\n if (this._filters[name]) {\n // @ts-expect-error\n this._filters[name] = this._filters[name].filter(function (filter) {\n return filter.fn !== fn;\n });\n }\n\n if (this.pswp) {\n this.pswp.removeFilter(name, fn);\n }\n }\n /**\r\n * @template {keyof PhotoSwipeFiltersMap} T\r\n * @param {T} name\r\n * @param {Parameters} args\r\n * @returns {Parameters[0]}\r\n */\n\n }, {\n key: \"applyFilters\",\n value: function applyFilters(name) {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (this._filters[name]) {\n this._filters[name].forEach(function (filter) {\n // @ts-expect-error\n args[0] = filter.fn.apply(_this, args);\n });\n }\n\n return args[0];\n }\n /**\r\n * @template {keyof PhotoSwipeEventsMap} T\r\n * @param {T} name\r\n * @param {EventCallback} fn\r\n */\n\n }, {\n key: \"on\",\n value: function on(name, fn) {\n if (!this._listeners[name]) {\n this._listeners[name] = [];\n }\n\n this._listeners[name].push(fn); // When binding events to lightbox,\n // also bind events to PhotoSwipe Core,\n // if it's open.\n\n\n if (this.pswp) {\n this.pswp.on(name, fn);\n }\n }\n /**\r\n * @template {keyof PhotoSwipeEventsMap} T\r\n * @param {T} name\r\n * @param {EventCallback} fn\r\n */\n\n }, {\n key: \"off\",\n value: function off(name, fn) {\n if (this._listeners[name]) {\n // @ts-expect-error\n this._listeners[name] = this._listeners[name].filter(function (listener) {\n return fn !== listener;\n });\n }\n\n if (this.pswp) {\n this.pswp.off(name, fn);\n }\n }\n /**\r\n * @template {keyof PhotoSwipeEventsMap} T\r\n * @param {T} name\r\n * @param {PhotoSwipeEventsMap[T]} [details]\r\n * @returns {AugmentedEvent}\r\n */\n\n }, {\n key: \"dispatch\",\n value: function dispatch(name, details) {\n var _this2 = this;\n\n if (this.pswp) {\n return this.pswp.dispatch(name, details);\n }\n\n var event =\n /** @type {AugmentedEvent} */\n new PhotoSwipeEvent(name, details);\n\n if (!this._listeners) {\n return event;\n }\n\n if (this._listeners[name]) {\n this._listeners[name].forEach(function (listener) {\n listener.call(_this2, event);\n });\n }\n\n return event;\n }\n }]);\n\n return Eventable;\n}();\n\nvar Placeholder = /*#__PURE__*/function () {\n /**\r\n * @param {string | false} imageSrc\r\n * @param {HTMLElement} container\r\n */\n function Placeholder(imageSrc, container) {\n _classCallCheck(this, Placeholder);\n\n // Create placeholder\n // (stretched thumbnail or simple div behind the main image)\n this.element = createElement('pswp__img pswp__img--placeholder', imageSrc ? 'img' : '', container);\n\n if (imageSrc) {\n /** @type {HTMLImageElement} */\n this.element.decoding = 'async';\n /** @type {HTMLImageElement} */\n\n this.element.alt = '';\n /** @type {HTMLImageElement} */\n\n this.element.src = imageSrc;\n this.element.setAttribute('role', 'presentation');\n }\n\n this.element.setAttribute('aria-hiden', 'true');\n }\n /**\r\n * @param {number} width\r\n * @param {number} height\r\n */\n\n\n _createClass(Placeholder, [{\n key: \"setDisplayedSize\",\n value: function setDisplayedSize(width, height) {\n if (!this.element) {\n return;\n }\n\n if (this.element.tagName === 'IMG') {\n // Use transform scale() to modify img placeholder size\n // (instead of changing width/height directly).\n // This helps with performance, specifically in iOS15 Safari.\n setWidthHeight(this.element, 250, 'auto');\n this.element.style.transformOrigin = '0 0';\n this.element.style.transform = toTransformString(0, 0, width / 250);\n } else {\n setWidthHeight(this.element, width, height);\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.element.parentNode) {\n this.element.remove();\n }\n\n this.element = null;\n }\n }]);\n\n return Placeholder;\n}();\n/** @typedef {import('./slide.js').default} Slide */\n\n/** @typedef {import('./slide.js').SlideData} SlideData */\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/** @typedef {import('../util/util.js').LoadState} LoadState */\n\n\nvar Content = /*#__PURE__*/function () {\n /**\r\n * @param {SlideData} itemData Slide data\r\n * @param {PhotoSwipe} instance PhotoSwipe or PhotoSwipeLightbox instance\r\n * @param {number} index\r\n */\n function Content(itemData, instance, index) {\n _classCallCheck(this, Content);\n\n this.instance = instance;\n this.data = itemData;\n this.index = index;\n /** @type {HTMLImageElement | HTMLDivElement} */\n\n this.element = undefined;\n this.displayedImageWidth = 0;\n this.displayedImageHeight = 0;\n this.width = Number(this.data.w) || Number(this.data.width) || 0;\n this.height = Number(this.data.h) || Number(this.data.height) || 0;\n this.isAttached = false;\n this.hasSlide = false;\n /** @type {LoadState} */\n\n this.state = LOAD_STATE.IDLE;\n\n if (this.data.type) {\n this.type = this.data.type;\n } else if (this.data.src) {\n this.type = 'image';\n } else {\n this.type = 'html';\n }\n\n this.instance.dispatch('contentInit', {\n content: this\n });\n }\n\n _createClass(Content, [{\n key: \"removePlaceholder\",\n value: function removePlaceholder() {\n var _this3 = this;\n\n if (this.placeholder && !this.keepPlaceholder()) {\n // With delay, as image might be loaded, but not rendered\n setTimeout(function () {\n if (_this3.placeholder) {\n _this3.placeholder.destroy();\n\n _this3.placeholder = null;\n }\n }, 1000);\n }\n }\n /**\r\n * Preload content\r\n *\r\n * @param {boolean=} isLazy\r\n * @param {boolean=} reload\r\n */\n\n }, {\n key: \"load\",\n value: function load(isLazy, reload) {\n if (this.slide && this.usePlaceholder()) {\n if (!this.placeholder) {\n var placeholderSrc = this.instance.applyFilters('placeholderSrc', // use image-based placeholder only for the first slide,\n // as rendering (even small stretched thumbnail) is an expensive operation\n this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : false, this);\n this.placeholder = new Placeholder(placeholderSrc, this.slide.container);\n } else {\n var placeholderEl = this.placeholder.element; // Add placeholder to DOM if it was already created\n\n if (placeholderEl && !placeholderEl.parentElement) {\n this.slide.container.prepend(placeholderEl);\n }\n }\n }\n\n if (this.element && !reload) {\n return;\n }\n\n if (this.instance.dispatch('contentLoad', {\n content: this,\n isLazy: isLazy\n }).defaultPrevented) {\n return;\n }\n\n if (this.isImageContent()) {\n this.element = createElement('pswp__img', 'img'); // Start loading only after width is defined, as sizes might depend on it.\n // Due to Safari feature, we must define sizes before srcset.\n\n if (this.displayedImageWidth) {\n this.loadImage(isLazy);\n }\n } else {\n this.element = createElement('pswp__content');\n this.element.innerHTML = this.data.html || '';\n }\n\n if (reload && this.slide) {\n this.slide.updateContentSize(true);\n }\n }\n /**\r\n * Preload image\r\n *\r\n * @param {boolean} isLazy\r\n */\n\n }, {\n key: \"loadImage\",\n value: function loadImage(isLazy) {\n var _this4 = this;\n\n var imageElement =\n /** @type HTMLImageElement */\n this.element;\n\n if (this.instance.dispatch('contentLoadImage', {\n content: this,\n isLazy: isLazy\n }).defaultPrevented) {\n return;\n }\n\n this.updateSrcsetSizes();\n\n if (this.data.srcset) {\n imageElement.srcset = this.data.srcset;\n }\n\n imageElement.src = this.data.src;\n imageElement.alt = this.data.alt || '';\n this.state = LOAD_STATE.LOADING;\n\n if (imageElement.complete) {\n this.onLoaded();\n } else {\n imageElement.onload = function () {\n _this4.onLoaded();\n };\n\n imageElement.onerror = function () {\n _this4.onError();\n };\n }\n }\n /**\r\n * Assign slide to content\r\n *\r\n * @param {Slide} slide\r\n */\n\n }, {\n key: \"setSlide\",\n value: function setSlide(slide) {\n this.slide = slide;\n this.hasSlide = true;\n this.instance = slide.pswp; // todo: do we need to unset slide?\n }\n /**\r\n * Content load success handler\r\n */\n\n }, {\n key: \"onLoaded\",\n value: function onLoaded() {\n this.state = LOAD_STATE.LOADED;\n\n if (this.slide) {\n this.instance.dispatch('loadComplete', {\n slide: this.slide,\n content: this\n }); // if content is reloaded\n\n if (this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode) {\n this.append();\n this.slide.updateContentSize(true);\n }\n\n if (this.state === LOAD_STATE.LOADED || this.state === LOAD_STATE.ERROR) {\n this.removePlaceholder();\n }\n }\n }\n /**\r\n * Content load error handler\r\n */\n\n }, {\n key: \"onError\",\n value: function onError() {\n this.state = LOAD_STATE.ERROR;\n\n if (this.slide) {\n this.displayError();\n this.instance.dispatch('loadComplete', {\n slide: this.slide,\n isError: true,\n content: this\n });\n this.instance.dispatch('loadError', {\n slide: this.slide,\n content: this\n });\n }\n }\n /**\r\n * @returns {Boolean} If the content is currently loading\r\n */\n\n }, {\n key: \"isLoading\",\n value: function isLoading() {\n return this.instance.applyFilters('isContentLoading', this.state === LOAD_STATE.LOADING, this);\n }\n }, {\n key: \"isError\",\n value: function isError() {\n return this.state === LOAD_STATE.ERROR;\n }\n /**\r\n * @returns {boolean} If the content is image\r\n */\n\n }, {\n key: \"isImageContent\",\n value: function isImageContent() {\n return this.type === 'image';\n }\n /**\r\n * Update content size\r\n *\r\n * @param {Number} width\r\n * @param {Number} height\r\n */\n\n }, {\n key: \"setDisplayedSize\",\n value: function setDisplayedSize(width, height) {\n if (!this.element) {\n return;\n }\n\n if (this.placeholder) {\n this.placeholder.setDisplayedSize(width, height);\n } // eslint-disable-next-line max-len\n\n\n if (this.instance.dispatch('contentResize', {\n content: this,\n width: width,\n height: height\n }).defaultPrevented) {\n return;\n }\n\n setWidthHeight(this.element, width, height);\n\n if (this.isImageContent() && !this.isError()) {\n var isInitialSizeUpdate = !this.displayedImageWidth && width;\n this.displayedImageWidth = width;\n this.displayedImageHeight = height;\n\n if (isInitialSizeUpdate) {\n this.loadImage(false);\n } else {\n this.updateSrcsetSizes();\n }\n\n if (this.slide) {\n // eslint-disable-next-line max-len\n this.instance.dispatch('imageSizeChange', {\n slide: this.slide,\n width: width,\n height: height,\n content: this\n });\n }\n }\n }\n /**\r\n * @returns {boolean} If the content can be zoomed\r\n */\n\n }, {\n key: \"isZoomable\",\n value: function isZoomable() {\n return this.instance.applyFilters('isContentZoomable', this.isImageContent() && this.state !== LOAD_STATE.ERROR, this);\n }\n /**\r\n * Update image srcset sizes attribute based on width and height\r\n */\n\n }, {\n key: \"updateSrcsetSizes\",\n value: function updateSrcsetSizes() {\n // Handle srcset sizes attribute.\n //\n // Never lower quality, if it was increased previously.\n // Chrome does this automatically, Firefox and Safari do not,\n // so we store largest used size in dataset.\n // Handle srcset sizes attribute.\n //\n // Never lower quality, if it was increased previously.\n // Chrome does this automatically, Firefox and Safari do not,\n // so we store largest used size in dataset.\n if (this.data.srcset) {\n var image =\n /** @type HTMLImageElement */\n this.element;\n var sizesWidth = this.instance.applyFilters('srcsetSizesWidth', this.displayedImageWidth, this);\n\n if (!image.dataset.largestUsedSize || sizesWidth > parseInt(image.dataset.largestUsedSize, 10)) {\n image.sizes = sizesWidth + 'px';\n image.dataset.largestUsedSize = String(sizesWidth);\n }\n }\n }\n /**\r\n * @returns {boolean} If content should use a placeholder (from msrc by default)\r\n */\n\n }, {\n key: \"usePlaceholder\",\n value: function usePlaceholder() {\n return this.instance.applyFilters('useContentPlaceholder', this.isImageContent(), this);\n }\n /**\r\n * Preload content with lazy-loading param\r\n */\n\n }, {\n key: \"lazyLoad\",\n value: function lazyLoad() {\n if (this.instance.dispatch('contentLazyLoad', {\n content: this\n }).defaultPrevented) {\n return;\n }\n\n this.load(true);\n }\n /**\r\n * @returns {boolean} If placeholder should be kept after content is loaded\r\n */\n\n }, {\n key: \"keepPlaceholder\",\n value: function keepPlaceholder() {\n return this.instance.applyFilters('isKeepingPlaceholder', this.isLoading(), this);\n }\n /**\r\n * Destroy the content\r\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hasSlide = false;\n this.slide = null;\n\n if (this.instance.dispatch('contentDestroy', {\n content: this\n }).defaultPrevented) {\n return;\n }\n\n this.remove();\n\n if (this.placeholder) {\n this.placeholder.destroy();\n this.placeholder = null;\n }\n\n if (this.isImageContent() && this.element) {\n this.element.onload = null;\n this.element.onerror = null;\n this.element = null;\n }\n }\n /**\r\n * Display error message\r\n */\n\n }, {\n key: \"displayError\",\n value: function displayError() {\n if (this.slide) {\n /** @type {HTMLElement} */\n var errorMsgEl = createElement('pswp__error-msg');\n errorMsgEl.innerText = this.instance.options.errorMsg;\n errorMsgEl = this.instance.applyFilters('contentErrorElement', errorMsgEl, this);\n this.element = createElement('pswp__content pswp__error-msg-container');\n this.element.appendChild(errorMsgEl);\n this.slide.container.innerText = '';\n this.slide.container.appendChild(this.element);\n this.slide.updateContentSize(true);\n this.removePlaceholder();\n }\n }\n /**\r\n * Append the content\r\n */\n\n }, {\n key: \"append\",\n value: function append() {\n var _this5 = this;\n\n if (this.isAttached) {\n return;\n }\n\n this.isAttached = true;\n\n if (this.state === LOAD_STATE.ERROR) {\n this.displayError();\n return;\n }\n\n if (this.instance.dispatch('contentAppend', {\n content: this\n }).defaultPrevented) {\n return;\n }\n\n var supportsDecode = ('decode' in this.element);\n\n if (this.isImageContent()) {\n // Use decode() on nearby slides\n //\n // Nearby slide images are in DOM and not hidden via display:none.\n // However, they are placed offscreen (to the left and right side).\n //\n // Some browsers do not composite the image until it's actually visible,\n // using decode() helps.\n //\n // You might ask \"why dont you just decode() and then append all images\",\n // that's because I want to show image before it's fully loaded,\n // as browser can render parts of image while it is loading.\n // We do not do this in Safari due to partial loading bug.\n if (supportsDecode && this.slide && (!this.slide.isActive || isSafari())) {\n this.isDecoding = true; // purposefully using finally instead of then,\n // as if srcset sizes changes dynamically - it may cause decode error\n\n /** @type {HTMLImageElement} */\n\n this.element.decode().finally(function () {\n _this5.isDecoding = false;\n\n _this5.appendImage();\n });\n } else {\n this.appendImage();\n }\n } else if (this.element && !this.element.parentNode) {\n this.slide.container.appendChild(this.element);\n }\n }\n /**\r\n * Activate the slide,\r\n * active slide is generally the current one,\r\n * meaning the user can see it.\r\n */\n\n }, {\n key: \"activate\",\n value: function activate() {\n if (this.instance.dispatch('contentActivate', {\n content: this\n }).defaultPrevented) {\n return;\n }\n\n if (this.slide) {\n if (this.isImageContent() && this.isDecoding && !isSafari()) {\n // add image to slide when it becomes active,\n // even if it's not finished decoding\n this.appendImage();\n } else if (this.isError()) {\n this.load(false, true); // try to reload\n }\n }\n }\n /**\r\n * Deactivate the content\r\n */\n\n }, {\n key: \"deactivate\",\n value: function deactivate() {\n this.instance.dispatch('contentDeactivate', {\n content: this\n });\n }\n /**\r\n * Remove the content from DOM\r\n */\n\n }, {\n key: \"remove\",\n value: function remove() {\n this.isAttached = false;\n\n if (this.instance.dispatch('contentRemove', {\n content: this\n }).defaultPrevented) {\n return;\n }\n\n if (this.element && this.element.parentNode) {\n this.element.remove();\n }\n\n if (this.placeholder && this.placeholder.element) {\n this.placeholder.element.remove();\n }\n }\n /**\r\n * Append the image content to slide container\r\n */\n\n }, {\n key: \"appendImage\",\n value: function appendImage() {\n if (!this.isAttached) {\n return;\n }\n\n if (this.instance.dispatch('contentAppendImage', {\n content: this\n }).defaultPrevented) {\n return;\n } // ensure that element exists and is not already appended\n\n\n if (this.slide && this.element && !this.element.parentNode) {\n this.slide.container.appendChild(this.element);\n }\n\n if (this.state === LOAD_STATE.LOADED || this.state === LOAD_STATE.ERROR) {\n this.removePlaceholder();\n }\n }\n }]);\n\n return Content;\n}();\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n\n/**\r\n * @param {PhotoSwipeOptions} options\r\n * @param {PhotoSwipe} pswp\r\n */\n\n\nfunction getViewportSize(options, pswp) {\n if (options.getViewportSizeFn) {\n var newViewportSize = options.getViewportSizeFn(options, pswp);\n\n if (newViewportSize) {\n return newViewportSize;\n }\n }\n\n return {\n x: document.documentElement.clientWidth,\n // TODO: height on mobile is very incosistent due to toolbar\n // find a way to improve this\n //\n // document.documentElement.clientHeight - doesn't seem to work well\n y: window.innerHeight\n };\n}\n/**\r\n * Parses padding option.\r\n * Supported formats:\r\n *\r\n * // Object\r\n * padding: {\r\n * top: 0,\r\n * bottom: 0,\r\n * left: 0,\r\n * right: 0\r\n * }\r\n *\r\n * // A function that returns the object\r\n * paddingFn: (viewportSize, itemData, index) => {\r\n * return {\r\n * top: 0,\r\n * bottom: 0,\r\n * left: 0,\r\n * right: 0\r\n * };\r\n * }\r\n *\r\n * // Legacy variant\r\n * paddingLeft: 0,\r\n * paddingRight: 0,\r\n * paddingTop: 0,\r\n * paddingBottom: 0,\r\n *\r\n * @param {'left' | 'top' | 'bottom' | 'right'} prop\r\n * @param {PhotoSwipeOptions} options PhotoSwipe options\r\n * @param {{ x?: number; y?: number }} viewportSize PhotoSwipe viewport size, for example: { x:800, y:600 }\r\n * @param {SlideData} itemData Data about the slide\r\n * @param {number} index Slide index\r\n * @returns {number}\r\n */\n\n\nfunction parsePaddingOption(prop, options, viewportSize, itemData, index) {\n /** @type {number} */\n var paddingValue;\n\n if (options.paddingFn) {\n paddingValue = options.paddingFn(viewportSize, itemData, index)[prop];\n } else if (options.padding) {\n paddingValue = options.padding[prop];\n } else {\n var legacyPropName = 'padding' + prop[0].toUpperCase() + prop.slice(1); // @ts-expect-error\n\n if (options[legacyPropName]) {\n // @ts-expect-error\n paddingValue = options[legacyPropName];\n }\n }\n\n return paddingValue || 0;\n}\n/**\r\n * @param {PhotoSwipeOptions} options\r\n * @param {{ x?: number; y?: number }} viewportSize\r\n * @param {SlideData} itemData\r\n * @param {number} index\r\n */\n\n\nfunction getPanAreaSize(options, viewportSize, itemData, index) {\n return {\n x: viewportSize.x - parsePaddingOption('left', options, viewportSize, itemData, index) - parsePaddingOption('right', options, viewportSize, itemData, index),\n y: viewportSize.y - parsePaddingOption('top', options, viewportSize, itemData, index) - parsePaddingOption('bottom', options, viewportSize, itemData, index)\n };\n}\n\nvar MAX_IMAGE_WIDTH = 4000;\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n\n/** @typedef {'fit' | 'fill' | number | ((zoomLevelObject: ZoomLevel) => number)} ZoomLevelOption */\n\n/**\r\n * Calculates zoom levels for specific slide.\r\n * Depends on viewport size and image size.\r\n */\n\nvar ZoomLevel = /*#__PURE__*/function () {\n /**\r\n * @param {PhotoSwipeOptions} options PhotoSwipe options\r\n * @param {SlideData} itemData Slide data\r\n * @param {number} index Slide index\r\n * @param {PhotoSwipe=} pswp PhotoSwipe instance, can be undefined if not initialized yet\r\n */\n function ZoomLevel(options, itemData, index, pswp) {\n _classCallCheck(this, ZoomLevel);\n\n this.pswp = pswp;\n this.options = options;\n this.itemData = itemData;\n this.index = index;\n }\n /**\r\n * Calculate initial, secondary and maximum zoom level for the specified slide.\r\n *\r\n * It should be called when either image or viewport size changes.\r\n *\r\n * @param {number} maxWidth\r\n * @param {number} maxHeight\r\n * @param {{ x?: number; y?: number }} panAreaSize\r\n */\n\n\n _createClass(ZoomLevel, [{\n key: \"update\",\n value: function update(maxWidth, maxHeight, panAreaSize) {\n this.elementSize = {\n x: maxWidth,\n y: maxHeight\n };\n this.panAreaSize = panAreaSize;\n var hRatio = this.panAreaSize.x / this.elementSize.x;\n var vRatio = this.panAreaSize.y / this.elementSize.y;\n this.fit = Math.min(1, hRatio < vRatio ? hRatio : vRatio);\n this.fill = Math.min(1, hRatio > vRatio ? hRatio : vRatio); // zoom.vFill defines zoom level of the image\n // when it has 100% of viewport vertical space (height)\n\n this.vFill = Math.min(1, vRatio);\n this.initial = this._getInitial();\n this.secondary = this._getSecondary();\n this.max = Math.max(this.initial, this.secondary, this._getMax());\n this.min = Math.min(this.fit, this.initial, this.secondary);\n\n if (this.pswp) {\n this.pswp.dispatch('zoomLevelsUpdate', {\n zoomLevels: this,\n slideData: this.itemData\n });\n }\n }\n /**\r\n * Parses user-defined zoom option.\r\n *\r\n * @private\r\n * @param {'initial' | 'secondary' | 'max'} optionPrefix Zoom level option prefix (initial, secondary, max)\r\n */\n\n }, {\n key: \"_parseZoomLevelOption\",\n value: function _parseZoomLevelOption(optionPrefix) {\n // eslint-disable-next-line max-len\n var optionName =\n /** @type {'initialZoomLevel' | 'secondaryZoomLevel' | 'maxZoomLevel'} */\n optionPrefix + 'ZoomLevel';\n var optionValue = this.options[optionName];\n\n if (!optionValue) {\n return;\n }\n\n if (typeof optionValue === 'function') {\n return optionValue(this);\n }\n\n if (optionValue === 'fill') {\n return this.fill;\n }\n\n if (optionValue === 'fit') {\n return this.fit;\n }\n\n return Number(optionValue);\n }\n /**\r\n * Get zoom level to which image will be zoomed after double-tap gesture,\r\n * or when user clicks on zoom icon,\r\n * or mouse-click on image itself.\r\n * If you return 1 image will be zoomed to its original size.\r\n *\r\n * @private\r\n * @return {number}\r\n */\n\n }, {\n key: \"_getSecondary\",\n value: function _getSecondary() {\n var currZoomLevel = this._parseZoomLevelOption('secondary');\n\n if (currZoomLevel) {\n return currZoomLevel;\n } // 3x of \"fit\" state, but not larger than original\n\n\n currZoomLevel = Math.min(1, this.fit * 3);\n\n if (currZoomLevel * this.elementSize.x > MAX_IMAGE_WIDTH) {\n currZoomLevel = MAX_IMAGE_WIDTH / this.elementSize.x;\n }\n\n return currZoomLevel;\n }\n /**\r\n * Get initial image zoom level.\r\n *\r\n * @private\r\n * @return {number}\r\n */\n\n }, {\n key: \"_getInitial\",\n value: function _getInitial() {\n return this._parseZoomLevelOption('initial') || this.fit;\n }\n /**\r\n * Maximum zoom level when user zooms\r\n * via zoom/pinch gesture,\r\n * via cmd/ctrl-wheel or via trackpad.\r\n *\r\n * @private\r\n * @return {number}\r\n */\n\n }, {\n key: \"_getMax\",\n value: function _getMax() {\n var currZoomLevel = this._parseZoomLevelOption('max');\n\n if (currZoomLevel) {\n return currZoomLevel;\n } // max zoom level is x4 from \"fit state\",\n // used for zoom gesture and ctrl/trackpad zoom\n\n\n return Math.max(1, this.fit * 4);\n }\n }]);\n\n return ZoomLevel;\n}();\n/**\r\n * Lazy-load an image\r\n * This function is used both by Lightbox and PhotoSwipe core,\r\n * thus it can be called before dialog is opened.\r\n *\r\n * @param {SlideData} itemData Data about the slide\r\n * @param {PhotoSwipe | PhotoSwipeLightbox | PhotoSwipeBase} instance PhotoSwipe instance\r\n * @param {number} index\r\n * @returns Image that is being decoded or false.\r\n */\n\n\nfunction _lazyLoadData(itemData, instance, index) {\n // src/slide/content/content.js\n var content = instance.createContentFromData(itemData, index);\n\n if (!content || !content.lazyLoad) {\n return;\n }\n\n var options = instance.options; // We need to know dimensions of the image to preload it,\n // as it might use srcset and we need to define sizes\n // @ts-expect-error should provide pswp instance?\n\n var viewportSize = instance.viewportSize || getViewportSize(options, instance);\n var panAreaSize = getPanAreaSize(options, viewportSize, itemData, index);\n var zoomLevel = new ZoomLevel(options, itemData, -1);\n zoomLevel.update(content.width, content.height, panAreaSize);\n content.lazyLoad();\n content.setDisplayedSize(Math.ceil(content.width * zoomLevel.initial), Math.ceil(content.height * zoomLevel.initial));\n return content;\n}\n/**\r\n * Lazy-loads specific slide.\r\n * This function is used both by Lightbox and PhotoSwipe core,\r\n * thus it can be called before dialog is opened.\r\n *\r\n * By default it loads image based on viewport size and initial zoom level.\r\n *\r\n * @param {number} index Slide index\r\n * @param {PhotoSwipe | PhotoSwipeLightbox} instance PhotoSwipe or PhotoSwipeLightbox eventable instance\r\n */\n\n\nfunction lazyLoadSlide(index, instance) {\n var itemData = instance.getItemData(index);\n\n if (instance.dispatch('lazyLoadSlide', {\n index: index,\n itemData: itemData\n }).defaultPrevented) {\n return;\n }\n\n return _lazyLoadData(itemData, instance, index);\n}\n/** @typedef {import(\"../photoswipe.js\").default} PhotoSwipe */\n\n/** @typedef {import(\"../photoswipe.js\").PhotoSwipeOptions} PhotoSwipeOptions */\n\n/** @typedef {import(\"../slide/slide.js\").SlideData} SlideData */\n\n/**\r\n * PhotoSwipe base class that can retrieve data about every slide.\r\n * Shared by PhotoSwipe Core and PhotoSwipe Lightbox\r\n */\n\n\nvar PhotoSwipeBase = /*#__PURE__*/function (_Eventable) {\n _inherits(PhotoSwipeBase, _Eventable);\n\n var _super = _createSuper(PhotoSwipeBase);\n\n function PhotoSwipeBase() {\n _classCallCheck(this, PhotoSwipeBase);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PhotoSwipeBase, [{\n key: \"getNumItems\",\n value:\n /**\r\n * Get total number of slides\r\n *\r\n * @returns {number}\r\n */\n function getNumItems() {\n var numItems;\n var dataSource = this.options.dataSource;\n\n if (!dataSource) {\n numItems = 0;\n } else if ('length' in dataSource) {\n // may be an array or just object with length property\n numItems = dataSource.length;\n } else if ('gallery' in dataSource) {\n // query DOM elements\n if (!dataSource.items) {\n dataSource.items = this._getGalleryDOMElements(dataSource.gallery);\n }\n\n if (dataSource.items) {\n numItems = dataSource.items.length;\n }\n } // legacy event, before filters were introduced\n\n\n var event = this.dispatch('numItems', {\n dataSource: dataSource,\n numItems: numItems\n });\n return this.applyFilters('numItems', event.numItems, dataSource);\n }\n /**\r\n * @param {SlideData} slideData\r\n * @param {number} index\r\n */\n\n }, {\n key: \"createContentFromData\",\n value: function createContentFromData(slideData, index) {\n // @ts-expect-error\n return new Content(slideData, this, index);\n }\n /**\r\n * Get item data by index.\r\n *\r\n * \"item data\" should contain normalized information that PhotoSwipe needs to generate a slide.\r\n * For example, it may contain properties like\r\n * `src`, `srcset`, `w`, `h`, which will be used to generate a slide with image.\r\n *\r\n * @param {number} index\r\n */\n\n }, {\n key: \"getItemData\",\n value: function getItemData(index) {\n var dataSource = this.options.dataSource;\n var dataSourceItem;\n\n if (Array.isArray(dataSource)) {\n // Datasource is an array of elements\n dataSourceItem = dataSource[index];\n } else if (dataSource && dataSource.gallery) {\n // dataSource has gallery property,\n // thus it was created by Lightbox, based on\n // gallery and children options\n // query DOM elements\n if (!dataSource.items) {\n dataSource.items = this._getGalleryDOMElements(dataSource.gallery);\n }\n\n dataSourceItem = dataSource.items[index];\n }\n\n var itemData = dataSourceItem;\n\n if (itemData instanceof Element) {\n itemData = this._domElementToItemData(itemData);\n } // Dispatching the itemData event,\n // it's a legacy verion before filters were introduced\n\n\n var event = this.dispatch('itemData', {\n itemData: itemData || {},\n index: index\n });\n return this.applyFilters('itemData', event.itemData, index);\n }\n /**\r\n * Get array of gallery DOM elements,\r\n * based on childSelector and gallery element.\r\n *\r\n * @param {HTMLElement} galleryElement\r\n */\n\n }, {\n key: \"_getGalleryDOMElements\",\n value: function _getGalleryDOMElements(galleryElement) {\n if (this.options.children || this.options.childSelector) {\n return getElementsFromOption(this.options.children, this.options.childSelector, galleryElement) || [];\n }\n\n return [galleryElement];\n }\n /**\r\n * Converts DOM element to item data object.\r\n *\r\n * @param {HTMLElement} element DOM element\r\n */\n // eslint-disable-next-line class-methods-use-this\n\n }, {\n key: \"_domElementToItemData\",\n value: function _domElementToItemData(element) {\n /** @type {SlideData} */\n var itemData = {\n element: element\n }; // eslint-disable-next-line max-len\n\n var linkEl =\n /** @type {HTMLAnchorElement} */\n element.tagName === 'A' ? element : element.querySelector('a');\n\n if (linkEl) {\n // src comes from data-pswp-src attribute,\n // if it's empty link href is used\n itemData.src = linkEl.dataset.pswpSrc || linkEl.href;\n\n if (linkEl.dataset.pswpSrcset) {\n itemData.srcset = linkEl.dataset.pswpSrcset;\n }\n\n itemData.width = parseInt(linkEl.dataset.pswpWidth, 10);\n itemData.height = parseInt(linkEl.dataset.pswpHeight, 10); // support legacy w & h properties\n\n itemData.w = itemData.width;\n itemData.h = itemData.height;\n\n if (linkEl.dataset.pswpType) {\n itemData.type = linkEl.dataset.pswpType;\n }\n\n var thumbnailEl = element.querySelector('img');\n\n if (thumbnailEl) {\n // msrc is URL to placeholder image that's displayed before large image is loaded\n // by default it's displayed only for the first slide\n itemData.msrc = thumbnailEl.currentSrc || thumbnailEl.src;\n itemData.alt = thumbnailEl.getAttribute('alt');\n }\n\n if (linkEl.dataset.pswpCropped || linkEl.dataset.cropped) {\n itemData.thumbCropped = true;\n }\n }\n\n return this.applyFilters('domItemData', itemData, element, linkEl);\n }\n /**\r\n * Lazy-load by slide data\r\n *\r\n * @param {SlideData} itemData Data about the slide\r\n * @param {number} index\r\n * @returns Image that is being decoded or false.\r\n */\n\n }, {\n key: \"lazyLoadData\",\n value: function lazyLoadData(itemData, index) {\n return _lazyLoadData(itemData, this, index);\n }\n }]);\n\n return PhotoSwipeBase;\n}(Eventable);\n/**\r\n * @template T\r\n * @typedef {import('../types.js').Type} Type\r\n */\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n\n/** @typedef {import('../photoswipe.js').DataSource} DataSource */\n\n/** @typedef {import('../slide/content.js').default} Content */\n\n/** @typedef {import('../core/eventable.js').PhotoSwipeEventsMap} PhotoSwipeEventsMap */\n\n/** @typedef {import('../core/eventable.js').PhotoSwipeFiltersMap} PhotoSwipeFiltersMap */\n\n/**\r\n * @template T\r\n * @typedef {import('../core/eventable.js').EventCallback} EventCallback\r\n */\n\n/**\r\n * PhotoSwipe Lightbox\r\n *\r\n * - If user has unsupported browser it falls back to default browser action (just opens URL)\r\n * - Binds click event to links that should open PhotoSwipe\r\n * - parses DOM strcture for PhotoSwipe (retrieves large image URLs and sizes)\r\n * - Initializes PhotoSwipe\r\n *\r\n *\r\n * Loader options use the same object as PhotoSwipe, and supports such options:\r\n *\r\n * gallery - Element | Element[] | NodeList | string selector for the gallery element\r\n * children - Element | Element[] | NodeList | string selector for the gallery children\r\n *\r\n */\n\n\nvar PhotoSwipeLightbox = /*#__PURE__*/function (_PhotoSwipeBase) {\n _inherits(PhotoSwipeLightbox, _PhotoSwipeBase);\n\n var _super2 = _createSuper(PhotoSwipeLightbox);\n\n /**\r\n * @param {PhotoSwipeOptions} options\r\n */\n function PhotoSwipeLightbox(options) {\n var _this6;\n\n _classCallCheck(this, PhotoSwipeLightbox);\n\n _this6 = _super2.call(this);\n /** @type {PhotoSwipeOptions} */\n\n _this6.options = options || {};\n _this6._uid = 0;\n return _this6;\n }\n /**\r\n * Initialize lightbox, should be called only once.\r\n * It's not included in the main constructor, so you may bind events before it.\r\n */\n\n\n _createClass(PhotoSwipeLightbox, [{\n key: \"init\",\n value: function init() {\n var _this7 = this;\n\n this.onThumbnailsClick = this.onThumbnailsClick.bind(this); // Bind click events to each gallery\n\n getElementsFromOption(this.options.gallery, this.options.gallerySelector).forEach(function (galleryElement) {\n galleryElement.addEventListener('click', _this7.onThumbnailsClick, false);\n });\n }\n /**\r\n * @param {MouseEvent} e\r\n */\n\n }, {\n key: \"onThumbnailsClick\",\n value: function onThumbnailsClick(e) {\n // Exit and allow default browser action if:\n if (specialKeyUsed(e) // ... if clicked with a special key (ctrl/cmd...)\n || window.pswp // ... if PhotoSwipe is already open\n || window.navigator.onLine === false) {\n // ... if offline\n return;\n } // If both clientX and clientY are 0 or not defined,\n // the event is likely triggered by keyboard,\n // so we do not pass the initialPoint\n //\n // Note that some screen readers emulate the mouse position,\n // so it's not ideal way to detect them.\n //\n\n\n var initialPoint = {\n x: e.clientX,\n y: e.clientY\n };\n\n if (!initialPoint.x && !initialPoint.y) {\n initialPoint = null;\n }\n\n var clickedIndex = this.getClickedIndex(e);\n clickedIndex = this.applyFilters('clickedIndex', clickedIndex, e, this);\n var dataSource = {\n gallery:\n /** @type {HTMLElement} */\n e.currentTarget\n };\n\n if (clickedIndex >= 0) {\n e.preventDefault();\n this.loadAndOpen(clickedIndex, dataSource, initialPoint);\n }\n }\n /**\r\n * Get index of gallery item that was clicked.\r\n *\r\n * @param {MouseEvent} e click event\r\n */\n\n }, {\n key: \"getClickedIndex\",\n value: function getClickedIndex(e) {\n // legacy option\n if (this.options.getClickedIndexFn) {\n return this.options.getClickedIndexFn.call(this, e);\n }\n\n var clickedTarget =\n /** @type {HTMLElement} */\n e.target;\n var childElements = getElementsFromOption(this.options.children, this.options.childSelector,\n /** @type {HTMLElement} */\n e.currentTarget);\n var clickedChildIndex = childElements.findIndex(function (child) {\n return child === clickedTarget || child.contains(clickedTarget);\n });\n\n if (clickedChildIndex !== -1) {\n return clickedChildIndex;\n } else if (this.options.children || this.options.childSelector) {\n // click wasn't on a child element\n return -1;\n } // There is only one item (which is the gallery)\n\n\n return 0;\n }\n /**\r\n * Load and open PhotoSwipe\r\n *\r\n * @param {number} index\r\n * @param {DataSource=} dataSource\r\n * @param {{ x?: number; y?: number }} [initialPoint]\r\n */\n\n }, {\n key: \"loadAndOpen\",\n value: function loadAndOpen(index, dataSource, initialPoint) {\n // Check if the gallery is already open\n if (window.pswp) {\n return false;\n } // set initial index\n\n\n this.options.index = index; // define options for PhotoSwipe constructor\n\n this.options.initialPointerPos = initialPoint;\n this.shouldOpen = true;\n this.preload(index, dataSource);\n return true;\n }\n /**\r\n * Load the main module and the slide content by index\r\n *\r\n * @param {number} index\r\n * @param {DataSource=} dataSource\r\n */\n\n }, {\n key: \"preload\",\n value: function preload(index, dataSource) {\n var _this8 = this;\n\n var options = this.options;\n\n if (dataSource) {\n options.dataSource = dataSource;\n } // Add the main module\n\n /** @type {Promise>[]} */\n\n\n var promiseArray = [];\n\n var pswpModuleType = _typeof(options.pswpModule);\n\n if (isPswpClass(options.pswpModule)) {\n promiseArray.push(Promise.resolve(\n /** @type {Type} */\n options.pswpModule));\n } else if (pswpModuleType === 'string') {\n throw new Error('pswpModule as string is no longer supported');\n } else if (pswpModuleType === 'function') {\n promiseArray.push(\n /** @type {() => Promise>} */\n options.pswpModule());\n } else {\n throw new Error('pswpModule is not valid');\n } // Add custom-defined promise, if any\n\n\n if (typeof options.openPromise === 'function') {\n // allow developers to perform some task before opening\n promiseArray.push(options.openPromise());\n }\n\n if (options.preloadFirstSlide !== false && index >= 0) {\n this._preloadedContent = lazyLoadSlide(index, this);\n } // Wait till all promises resolve and open PhotoSwipe\n\n\n var uid = ++this._uid;\n Promise.all(promiseArray).then(function (iterableModules) {\n if (_this8.shouldOpen) {\n var mainModule = iterableModules[0];\n\n _this8._openPhotoswipe(mainModule, uid);\n }\n });\n }\n /**\r\n * @private\r\n * @param {Type | { default: Type }} module\r\n * @param {number} uid\r\n */\n\n }, {\n key: \"_openPhotoswipe\",\n value: function _openPhotoswipe(module, uid) {\n var _this9 = this;\n\n // Cancel opening if UID doesn't match the current one\n // (if user clicked on another gallery item before current was loaded).\n //\n // Or if shouldOpen flag is set to false\n // (developer may modify it via public API)\n if (uid !== this._uid && this.shouldOpen) {\n return;\n }\n\n this.shouldOpen = false; // PhotoSwipe is already open\n\n if (window.pswp) {\n return;\n }\n /**\r\n * Pass data to PhotoSwipe and open init\r\n *\r\n * @type {PhotoSwipe}\r\n */\n\n\n var pswp = _typeof(module) === 'object' ? new module.default(this.options) // eslint-disable-line\n : new module(this.options); // eslint-disable-line\n\n this.pswp = pswp;\n window.pswp = pswp; // map listeners from Lightbox to PhotoSwipe Core\n\n /** @type {(keyof PhotoSwipeEventsMap)[]} */\n\n Object.keys(this._listeners).forEach(function (name) {\n _this9._listeners[name].forEach(function (fn) {\n pswp.on(name,\n /** @type {EventCallback} */\n fn);\n });\n }); // same with filters\n\n /** @type {(keyof PhotoSwipeFiltersMap)[]} */\n\n Object.keys(this._filters).forEach(function (name) {\n _this9._filters[name].forEach(function (filter) {\n pswp.addFilter(name, filter.fn, filter.priority);\n });\n });\n\n if (this._preloadedContent) {\n pswp.contentLoader.addToCache(this._preloadedContent);\n this._preloadedContent = null;\n }\n\n pswp.on('destroy', function () {\n // clean up public variables\n _this9.pswp = null;\n window.pswp = null;\n });\n pswp.init();\n }\n /**\r\n * Unbinds all events, closes PhotoSwipe if it's open.\r\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this10 = this;\n\n if (this.pswp) {\n this.pswp.destroy();\n }\n\n this.shouldOpen = false;\n this._listeners = null;\n getElementsFromOption(this.options.gallery, this.options.gallerySelector).forEach(function (galleryElement) {\n galleryElement.removeEventListener('click', _this10.onThumbnailsClick, false);\n });\n }\n }]);\n\n return PhotoSwipeLightbox;\n}(PhotoSwipeBase);\n\nexport { PhotoSwipeLightbox as default };"],"sourceRoot":""}