PageSourceSearch

https://hugo-community-docs.github.io/yore/components/photoswipe/p…105c763114666c242b9637df69bc057aa2551a74.js

js hugo-community-docs.github.io collected 2026-10-03 09:18:51 UTC 70,685 bytes, 9 lines download raw bytes

1function b(h,t,i){let e=document.createElement(t);return h&&(e.className=h),i&&i.appendChild(e),e}function M(h,t,i){h.style.width=typeof t=="number"?`${t}px`:t,h.style.height=typeof i=="number"?`${i}px`:i}var At="idle",dt="loading",_="loaded",f="error";function S(h,t,i=document){let e=[];if(h instanceof Element)e=[h];else if(h instanceof NodeList||Array.isArray(h))e=Array.from(h);else{let s=typeof h=="string"?h:t;s&&(e=Array.from(i.querySelectorAll(s)))}return e}function pt(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var Z=class{constructor(t,i){this.type=t,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}},O=class{constructor(t,i){if(this.element=b("pswp__img pswp__img--placeholder",t?"img":"div",i),t){let e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&(this.element.tagName==="IMG"?(M(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=(function(e,s,n){let o=`translate3d(${e}px,${s||0}px,0)`;return n!==void 0&&(o+=` scale3d(${n},${n},1)`),o})(0,0,t/250)):M(this.element,t,i))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},F=class{constructor(t,i,e){this.instance=i,this.data=t,this.index=e,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=At,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(t,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){let e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{let e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new O(e,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=b("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=b("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var i,e;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;let s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=(i=this.data.src)!==null&&i!==void 0?i:"",s.alt=(e=this.data.alt)!==null&&e!==void 0?e:"",this.state=dt,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=_,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==_&&this.state!==f||this.removePlaceholder())}onError(){this.state=f,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===dt,this)}isError(){return this.state===f}isImageContent(){return this.type==="image"}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(M(this.element,t,i),this.isImageContent()&&!this.isError()))){let e=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,e?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==f,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let t=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||i>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=i+"px",t.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,i;let e=b("pswp__error-msg","div");e.innerText=(t=(i=this.instance.options)===null||i===void 0?void 0:i.errorMsg)!==null&&t!==void 0?t:"",e=this.instance.applyFilters("contentErrorElement",e,this),this.element=b("pswp__content pswp__error-msg-container","div"),this.element.appendChild(e),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===f)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||pt())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!pt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==_&&this.state!==f||this.removePlaceholder()))}};function D(h,t,i,e,s){let n=0;if(t.paddingFn)n=t.paddingFn(i,e,s)[h];else if(t.padding)n=t.padding[h];else{let o="padding"+h[0].toUpperCase()+h.slice(1);t[o]&&(n=t[o])}return Number(n)||0}var N=class{constructor(t,i,e,s){this.pswp=s,this.options=t,this.itemData=i,this.index=e,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,e){let s={x:t,y:i};this.elementSize=s,this.panAreaSize=e;let n=e.x/s.x,o=e.y/s.y;this.fit=Math.min(1,n<o?n:o),this.fill=Math.min(1,n>o?n:o),this.vFill=Math.min(1,o),this.initial=this.t(),this.secondary=this.i(),this.max=Math.max(this.initial,this.secondary,this.o()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}l(t){let i=t+"ZoomLevel",e=this.options[i];if(e)return typeof e=="function"?e(this):e==="fill"?this.fill:e==="fit"?this.fit:Number(e)}i(){let t=this.l("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}t(){return this.l("initial")||this.fit}o(){return this.l("max")||Math.max(1,4*this.fit)}};function ct(h,t,i){let e=t.createContentFromData(h,i),s,{options:n}=t;if(n){let o;s=new N(n,h,-1),o=t.pswp?t.pswp.viewportSize:(function(r,l){if(r.getViewportSizeFn){let d=r.getViewportSizeFn(r,l);if(d)return d}return{x:document.documentElement.clientWidth,y:window.innerHeight}})(n,t);let a=(function(r,l,d,p){return{x:l.x-D("left",r,l,d,p)-D("right",r,l,d,p),y:l.y-D("top",r,l,d,p)-D("bottom",r,l,d,p)}})(n,o,h,i);s.update(e.width,e.height,a)}return e.lazyLoad(),s&&e.setDisplayedSize(Math.ceil(e.width*s.initial),Math.ceil(e.height*s.initial)),e}var z=class extends class extends class{constructor(){this.u={},this.p={},this.pswp=void 0,this.options=void 0}
1addFilter(t,i,e=100){var s,n,o;this.p[t]||(this.p[t]=[]),(s=this.p[t])===null||s===void 0||s.push({fn:i,priority:e}),(n=this.p[t])===null||n===void 0||n.sort(((a,r)=>a.priority-r.priority)),(o=this.pswp)===null||o===void 0||o.addFilter(t,i,e)}removeFilter(t,i){this.p[t]&&(this.p[t]=this.p[t].filter((e=>e.fn!==i))),this.pswp&&this.pswp.removeFilter(t,i)}applyFilters(t,...i){var e;return(e=this.p[t])===null||e===void 0||e.forEach((s=>{i[0]=s.fn.apply(this,i)})),i[0]}on(t,i){var e,s;this.u[t]||(this.u[t]=[]),(e=this.u[t])===null||e===void 0||e.push(i),(s=this.pswp)===null||s===void 0||s.on(t,i)}off(t,i){var e;this.u[t]&&(this.u[t]=this.u[t].filter((s=>i!==s))),(e=this.pswp)===null||e===void 0||e.off(t,i)}dispatch(t,i){var e;if(this.pswp)return this.pswp.dispatch(t,i);let s=new Z(t,i);return(e=this.u[t])===null||e===void 0||e.forEach((n=>{n.call(this,s)})),s}}{getNumItems(){var t;let i=0,e=(t=this.options)===null||t===void 0?void 0:t.dataSource;e&&"length"in e?i=e.length:e&&"gallery"in e&&(e.items||(e.items=this.v(e.gallery)),e.items&&(i=e.items.length));let s=this.dispatch("numItems",{dataSource:e,numItems:i});return this.applyFilters("numItems",s.numItems,e)}createContentFromData(t,i){return new F(t,this,i)}getItemData(t){var i;let e=(i=this.options)===null||i===void 0?void 0:i.dataSource,s={};Array.isArray(e)?s=e[t]:e&&"gallery"in e&&(e.items||(e.items=this.v(e.gallery)),s=e.items[t]);let n=s;n instanceof Element&&(n=this.m(n));let o=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",o.itemData,t)}v(t){var i,e;return(i=this.options)!==null&&i!==void 0&&i.children||(e=this.options)!==null&&e!==void 0&&e.childSelector?S(this.options.children,this.options.childSelector,t)||[]:[t]}m(t){let i={element:t},e=t.tagName==="A"?t:t.querySelector("a");if(e){i.src=e.dataset.pswpSrc||e.href,e.dataset.pswpSrcset&&(i.srcset=e.dataset.pswpSrcset),i.width=e.dataset.pswpWidth?parseInt(e.dataset.pswpWidth,10):0,i.height=e.dataset.pswpHeight?parseInt(e.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,e.dataset.pswpType&&(i.type=e.dataset.pswpType);let n=t.querySelector("img");var s;n&&(i.msrc=n.currentSrc||n.src,i.alt=(s=n.getAttribute("alt"))!==null&&s!==void 0?s:""),(e.dataset.pswpCropped||e.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,t,e)}lazyLoadData(t,i){return ct(t,this,i)}}{constructor(t){super(),this.options=t||{},this.g=0,this.shouldOpen=!1,this._=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){S(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(t){if((function(n){return"button"in n&&n.button===1||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey})(t)||window.pswp)return;let i={x:t.clientX,y:t.clientY};i.x||i.y||(i=null);let e=this.getClickedIndex(t);e=this.applyFilters("clickedIndex",e,t,this);let s={gallery:t.currentTarget};e>=0&&(t.preventDefault(),this.loadAndOpen(e,s,i))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);let i=t.target,e=S(this.options.children,this.options.childSelector,t.currentTarget).findIndex((s=>s===i||s.contains(i)));return e!==-1?e:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,i,e){if(window.pswp||!this.options)return!1;if(!i&&this.options.gallery&&this.options.children){let s=S(this.options.gallery);s[0]&&(i={gallery:s[0]})}return this.options.index=t,this.options.initialPointerPos=e,this.shouldOpen=!0,this.preload(t,i),!0}preload(t,i){let{options:e}=this;i&&(e.dataSource=i);let s=[],n=typeof e.pswpModule;if(typeof(o=e.pswpModule)=="function"&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(e.pswpModule));else{if(n==="string")throw new Error("pswpModule as string is no longer supported");if(n!=="function")throw new Error("pswpModule is not valid");s.push(e.pswpModule())}var o;typeof e.openPromise=="function"&&s.push(e.openPromise()),e.preloadFirstSlide!==!1&&t>=0&&(this._=(function(r,l){let d=l.getItemData(r);if(!l.dispatch("lazyLoadSlide",{index:r,itemData:d}).defaultPrevented)return ct(d,l,r)})(t,this));let a=++this.g;Promise.all(s).then((r=>{if(this.shouldOpen){let l=r[0];this.I(l,a)}}))}I(t,i){if(i!==this.g&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;let e=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=e,window.pswp=e,Object.keys(this.u).forEach((s=>{var n;
1(n=this.u[s])===null||n===void 0||n.forEach((o=>{e.on(s,o)}))})),Object.keys(this.p).forEach((s=>{var n;(n=this.p[s])===null||n===void 0||n.forEach((o=>{e.addFilter(s,o.fn,o.priority)}))})),this._&&(e.contentLoader.addToCache(this._),this._=void 0),e.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),e.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this.u={},S(this.options.gallery,this.options.gallerySelector).forEach((i=>{i.removeEventListener("click",this.onThumbnailsClick,!1)}))}};function v(h,t,i){let e=document.createElement(t);return h&&(e.className=h),i&&i.appendChild(e),e}function m(h,t){return h.x=t.x,h.y=t.y,t.id!==void 0&&(h.id=t.id),h}function ft(h){h.x=Math.round(h.x),h.y=Math.round(h.y)}function H(h,t){let i=Math.abs(h.x-t.x),e=Math.abs(h.y-t.y);return Math.sqrt(i*i+e*e)}function C(h,t){return h.x===t.x&&h.y===t.y}function P(h,t,i){return Math.min(Math.max(h,t),i)}function L(h,t,i){let e=`translate3d(${h}px,${t||0}px,0)`;return i!==void 0&&(e+=` scale3d(${i},${i},1)`),e}function w(h,t,i,e){h.style.transform=L(t,i,e)}function ut(h,t,i,e){h.style.transition=t?`${t} ${i}ms ${e||"cubic-bezier(.4,0,.22,1)"}`:"none"}function B(h,t,i){h.style.width=typeof t=="number"?`${t}px`:t,h.style.height=typeof i=="number"?`${i}px`:i}var Dt="idle",mt="loading",k="loaded",x="error";function gt(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var xt=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{xt=!0}}))}catch{}var W=class{constructor(){this.t=[]}add(t,i,e,s){this.i(t,i,e,s)}remove(t,i,e,s){this.i(t,i,e,s,!0)}removeAll(){this.t.forEach((t=>{this.i(t.target,t.type,t.listener,t.passive,!0,!0)})),this.t=[]}i(t,i,e,s,n,o){if(!t)return;let a=n?"removeEventListener":"addEventListener";i.split(" ").forEach((r=>{if(r){o||(n?this.t=this.t.filter((d=>d.type!==r||d.listener!==e||d.target!==t)):this.t.push({target:t,type:r,listener:e,passive:s}));let l=!!xt&&{passive:s||!1};t[a](r,e,l)}}))}};function St(h,t){if(h.getViewportSizeFn){let i=h.getViewportSizeFn(h,t);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function I(h,t,i,e,s){let n=0;if(t.paddingFn)n=t.paddingFn(i,e,s)[h];else if(t.padding)n=t.padding[h];else{let o="padding"+h[0].toUpperCase()+h.slice(1);t[o]&&(n=t[o])}return Number(n)||0}function bt(h,t,i,e){return{x:t.x-I("left",h,t,i,e)-I("right",h,t,i,e),y:t.y-I("top",h,t,i,e)-I("bottom",h,t,i,e)}}var R=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this.o("x"),this.o("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}o(t){let{pswp:i}=this.slide,e=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,s=I(t==="x"?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-e)/2)+s,this.max[t]=e>n?Math.round(n-e)+s:this.center[t],this.min[t]=e>n?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return P(i,this.max[t],this.min[t])}},T=class{constructor(t,i,e,s){this.pswp=s,this.options=t,this.itemData=i,this.index=e,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,e){let s={x:t,y:i};this.elementSize=s,this.panAreaSize=e;let n=e.x/s.x,o=e.y/s.y;this.fit=Math.min(1,n<o?n:o),this.fill=Math.min(1,n>o?n:o),this.vFill=Math.min(1,o),this.initial=this.l(),this.secondary=this.u(),this.max=Math.max(this.initial,this.secondary,this.p()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}m(t){let i=t+"ZoomLevel",e=this.options[i];if(e)return typeof e=="function"?e(this):e==="fill"?this.fill:e==="fit"?this.fit:Number(e)}u(){let t=this.m("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}l(){return this.m("initial")||this.fit}p(){return this.m("max")||Math.max(1,4*this.fit)}},U=class{constructor(t,i,e){this.data=t,this.index=i,this.pswp=e,this.isActive=i===e.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!e.opener.isOpen,this.zoomLevels=new T(e.options,t,i,e),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=v("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new R(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){let{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){let i=this.currentResolution||this.zoomLevels.initial;if(!i)return;let e=Math.round(this.width*i)||this.pswp.viewportSize.x,s=Math.round(this.height*i)||this.pswp.viewportSize.y;(this.sizeChanged(e,s)||t)&&this.content.setDisplayedSize(e,s)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,i,e,s){let{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:i,transitionDuration:e}),n.animations.stopAllPan();let o=this.currZoomLevel;
vendor: 5,138 bytes, line 1
1s||(t=P(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",i,o),this.pan.y=this.calculateZoomToPanOffset("y",i,o),ft(this.pan);let a=()=>{this.v(t),this.applyCurrentZoomPan()};e?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:e,easing:n.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,e){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),e||(e=this.zoomLevels.initial);let s=this.currZoomLevel/e;return this.bounds.correctPan(t,(this.pan[t]-i[t])*s+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this.g(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),m(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}g(t,i,e){e/=this.currentResolution||this.zoomLevels.initial,w(this.container,t,i,e)}calculateSize(){let{pswp:t}=this;m(this.panAreaSize,bt(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){let t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return L(this.pan.x,this.pan.y,t)}v(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}},V=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&m(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){let{p1:t,prevP1:i,dragAxis:e}=this.gestures,{currSlide:s}=this.pswp;if(e==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){let n=s.pan.y+(t.y-i.y);if(!this.pswp.dispatch("verticalDrag",{panY:n}).defaultPrevented){this._("y",n,.6);let o=1-Math.abs(this.S(s.pan.y));this.pswp.applyBgOpacity(o),s.applyCurrentZoomPan()}}else this.M("x")||(this.M("y"),s&&(ft(s.pan),s.applyCurrentZoomPan()))}end(){let{velocity:t}=this.gestures,{mainScroll:i,currSlide:e}=this.pswp,s=0;if(this.pswp.animations.stopAll(),i.isShifted()){let n=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&n<0||t.x<.1&&n<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&n>0||t.x>-.1&&n>.5)&&(s=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(s,!0,t.x)}e&&e.currZoomLevel>e.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this.P("x"),this.P("y"))}P(t){let{velocity:i}=this.gestures,{currSlide:e}=this.pswp;if(!e)return;let{pan:s,bounds:n}=e,o=s[t],a=this.pswp.bgOpacity<1&&t==="y",r=o+(function(c,g){return c*g/(1-g)})(i[t],.995);if(a){let c=this.S(o),g=this.S(r);if(c<0&&g<-.4||c>0&&g>.4)return void this.pswp.close()}let l=n.correctPan(t,r);if(o===l)return;let d=l===r?1:.82,p=this.pswp.bgOpacity,u=l-o;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:o,end:l,velocity:i[t],dampingRatio:d,onUpdate:c=>{if(a&&this.pswp.bgOpacity<1){let g=1-(l-c)/u;this.pswp.applyBgOpacity(P(p+(1-p)*g,0,1))}s[t]=Math.floor(c),e.applyCurrentZoomPan()}})}M(t){let{p1:i,dragAxis:e,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,r=i[t]-s[t],l=a.x+r;if(!r||!o)return!1;if(t==="x"&&!o.isPannable()&&!n)return a.moveTo(l,!0),!0;let{bounds:d}=o,p=o.pan[t]+r;if(this.pswp.options.allowPanToNext&&e==="x"&&t==="x"&&!n){let u=a.getCurrSlideX(),c=a.x-u,g=r>0,A=!g;if(p>d.min[t]&&g){if(d.min[t]<=this.startPan[t])return a.moveTo(l,!0),!0;this._(t,p)}else if(p<d.max[t]&&A){if(this.startPan[t]<=d.max[t])return a.moveTo(l,!0),!0;this._(t,p)}else if(c!==0){if(c>0)return a.moveTo(Math.max(l,u),!0),!0;if(c<0)return a.moveTo(Math.min(l,u),!0),!0}else this._(t,p)}else t==="y"&&(a.isShifted()||d.min.y===d.max.y)||this._(t,p);return!1}S(t){var i,e;return(t-((i=(e=this.pswp.currSlide)===null||e===void 0?void 0:e.bounds.center.y)!==null&&i!==void 0?i:0))/(this.pswp.viewportSize.y/3)}_(t,i,e){let{currSlide:s}=this.pswp;if(!s)return;let{pan:n,bounds:o}=s;if(o.correctPan(t,i)!==i||e){let a=Math.round(i-n[t]);n[t]+=a*(e||.35)}else n[t]=i}};function vt(h,t,i){return h.x=(t.x+i.x)/2,h.y=(t.y+i.y)/2,h}var $=class{constructor(t){this.gestures=t,this.C={x:0,y:0},this.T={x:0,y:0},this.A={x:0,y:0},this.D=!1,this.I=1}start(){let{currSlide:t}=this.gestures.pswp;t&&(this.I=t.currZoomLevel,m(this.C,t.pan)),this.gestures.pswp.animations.stopAllPan(),this.D=!1}change(){let{p1:t,startP1:i,p2:e,startP2:s,pswp:n}=this.gestures,{currSlide:o}=n;
1if(!o)return;let a=o.zoomLevels.min,r=o.zoomLevels.max;if(!o.isZoomable()||n.mainScroll.isShifted())return;vt(this.T,i,s),vt(this.A,t,e);let l=1/H(i,s)*H(t,e)*this.I;if(l>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this.D=!0),l<a)if(n.options.pinchToClose&&!this.D&&this.I<=o.zoomLevels.initial){let d=1-(a-l)/(a/1.2);n.dispatch("pinchClose",{bgOpacity:d}).defaultPrevented||n.applyBgOpacity(d)}else l=a-.15*(a-l);else l>r&&(l=r+.05*(l-r));o.pan.x=this.L("x",l),o.pan.y=this.L("y",l),o.setZoomLevel(l),o.applyCurrentZoomPan()}end(){let{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this.D&&t.options.pinchToClose?t.close():this.correctZoomPan()}L(t,i){let e=i/this.I;return this.A[t]-(this.T[t]-this.C[t])*e}correctZoomPan(t){let{pswp:i}=this.gestures,{currSlide:e}=i;if(e==null||!e.isZoomable())return;this.A.x===0&&(t=!0);let s=e.currZoomLevel,n,o=!0;s<e.zoomLevels.initial?n=e.zoomLevels.initial:s>e.zoomLevels.max?n=e.zoomLevels.max:(o=!1,n=s);let a=i.bgOpacity,r=i.bgOpacity<1,l=m({x:0,y:0},e.pan),d=m({x:0,y:0},l);t&&(this.A.x=0,this.A.y=0,this.T.x=0,this.T.y=0,this.I=s,m(this.C,l)),o&&(d={x:this.L("x",n),y:this.L("y",n)}),e.setZoomLevel(n),d={x:e.bounds.correctPan("x",d.x),y:e.bounds.correctPan("y",d.y)},e.setZoomLevel(s);let p=!C(d,l);if(!p&&!o&&!r)return e.v(n),void e.applyCurrentZoomPan();i.animations.stopAllPan(),i.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:u=>{if(u/=1e3,p||o){if(p&&(e.pan.x=l.x+(d.x-l.x)*u,e.pan.y=l.y+(d.y-l.y)*u),o){let c=s+(n-s)*u;e.setZoomLevel(c)}e.applyCurrentZoomPan()}r&&i.bgOpacity<1&&i.applyBgOpacity(P(a+(1-a)*u,0,1))},onComplete:()=>{e.v(n),e.applyCurrentZoomPan()}})}};function yt(h){return!!h.target.closest(".pswp__container")}var q=class{constructor(t){this.gestures=t}click(t,i){let e=i.target.classList,s=e.contains("pswp__img"),n=e.contains("pswp__item")||e.contains("pswp__zoom-wrap");s?this.k("imageClick",t,i):n&&this.k("bgClick",t,i)}tap(t,i){yt(i)&&this.k("tap",t,i)}doubleTap(t,i){yt(i)&&this.k("doubleTap",t,i)}k(t,i,e){var s;let{pswp:n}=this.gestures,{currSlide:o}=n,a=t+"Action",r=n.options[a];if(!n.dispatch(a,{point:i,originalEvent:e}).defaultPrevented)if(typeof r!="function")switch(r){case"close":case"next":n[r]();break;case"zoom":o?.toggleZoom(i);break;case"zoom-or-close":o!=null&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(i):n.options.clickToCloseNonZoomable&&n.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible")}else r.call(n,i,e)}},G=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this.Z={x:0,y:0},this.B={x:0,y:0},this.F=0,this.O=[],this.R="ontouchstart"in window,this.N=!!window.PointerEvent,this.supportsTouch=this.R||this.N&&navigator.maxTouchPoints>1,this.F=0,this.U=0,this.V=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this.G=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new V(this),this.zoomLevels=new $(this),this.tapHandler=new q(this),t.on("bindEvents",(()=>{t.events.add(t.scrollWrap,"click",this.$.bind(this)),this.N?this.q("pointer","down","up","cancel"):this.R?(this.q("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this.q("mouse","down","up")}))}q(t,i,e,s){let{pswp:n}=this,{events:o}=n,a=s?t+s:"";o.add(n.scrollWrap,t+i,this.onPointerDown.bind(this)),o.add(window,t+"move",this.onPointerMove.bind(this)),o.add(window,t+e,this.onPointerUp.bind(this)),a&&o.add(n.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){let i=t.type==="mousedown"||t.pointerType==="mouse";if(i&&t.button>0)return;let{pswp:e}=this;e.opener.isOpen?e.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(e.mouseDetected(),this.H(t,"down")),e.animations.stopAll(),this.K(t,"down"),this.F===1&&(this.dragAxis=null,m(this.startP1,this.p1)),this.F>1?(this.W(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this.H(t,"move"),this.F&&(this.K(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(this.F!==1||this.isDragging?this.F>1&&!this.isZooming&&(this.j(),this.isZooming=!0,this.X(),this.zoomLevels.start(),this.Y(),this.J()):(this.dragAxis||this.tt(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this.W(),this.X(),this.U=Date.now(),this.V=!1,m(this.B,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this.Y(),this.J()))))}j(){this.isDragging&&(this.isDragging=!1,this.V||this.it(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this.F&&(this.K(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(this.F===0&&(this.Y(),this.isDragging?this.j():this.isZooming||this.isMultitouch||this.st(t)),this.F<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this.F===1&&(this.dragAxis=null,this.X()))))}J(){(this.isDragging||this.isZooming)&&(this.it(),this.isDragging?C(this.p1,this.prevP1)||this.drag.change():C(this.p1,this.prevP1)&&C(this.p2,this.prevP2)||this.zoomLevels.change(),this.ht(),this.raf=requestAnimationFrame(this.J.bind(this)))}it(t){let i=Date.now(),e=i-this.U;e<50&&!t||(this.velocity.x=this.et("x",e),this.velocity.y=this.et("y",e),this.U=i,m(this.B,this.p1),this.V=!0)}st(t){let{mainScroll:i}=this.pswp;if(i.isShifted())return void i.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse")return void this.tapHandler.click(this.startP1,t);let e=this.pswp.options.doubleTapAction?300:0;this.G?(this.W(),H(this.Z,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(m(this.Z,this.startP1),this.G=setTimeout((()=>{this.tapHandler.tap(this.startP1,t),this.W()}),e))}W(){this.G&&(clearTimeout(this.G),this.G=null)}et(t,i){let e=this.p1[t]-this.B[t];return Math.abs(e)>1&&i>5?e/i:0}Y(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}H(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}K(t,i){if(this.N){let e=t,s=this.O.findIndex((n=>n.id===e.pointerId));i==="up"&&s>-1?this.O.splice(s,1):i==="down"&&s===-1?this.O.push(this.nt(e,{x:0,y:0})):s>-1&&this.nt(e,this.O[s]),this.F=this.O.length,this.F>0&&m(this.p1,this.O[0]),this.F>1&&m(this.p2,this.O[1])}else{let e=t;this.F=0,e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(this.nt(e.touches[0],this.p1),this.F++,e.touches.length>1&&(this.nt(e.touches[1],this.p2),this.F++)):(this.nt(t,this.p1),i==="up"?this.F=0:this.F++)}}ht(){m(this.prevP1,this.p1),m(this.prevP2,this.p2)}X(){m(this.startP1,this.p1),m(this.startP2,this.p2),this.ht()}
1tt(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{let t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){let i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}nt(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:t.identifier!==void 0&&(i.id=t.identifier),i}$(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},X=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this.ot=0,this.rt=0,this.lt=-1,this.itemHolders=[]}resize(t){let{pswp:i}=this,e=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),s=e!==this.slideWidth;s&&(this.slideWidth=e,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach(((n,o)=>{s&&w(n.el,(o+this.lt)*this.slideWidth),t&&n.slide&&n.slide.resize()}))}resetPosition(){this.ot=0,this.rt=0,this.slideWidth=0,this.lt=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){let i=v("pswp__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=t===1?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,e){let{pswp:s}=this,n=s.potentialIndex+t,o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);let r=(t+o)%o;t=r<=o/2?r:r-o}else n<0?n=0:n>=o&&(n=o-1),t=n-s.potentialIndex;s.potentialIndex=n,this.ot-=t,s.animations.stopMainScroll();let a=this.getCurrSlideX();if(i){s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:e||0,naturalFrequency:30,dampingRatio:1,onUpdate:l=>{this.moveTo(l)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let r=s.potentialIndex-s.currIndex;if(s.canLoop()){let l=(r+o)%o;r=l<=o/2?l:l-o}Math.abs(r)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return!!t}getCurrSlideX(){return this.slideWidth*this.ot}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;let{pswp:i}=this,e=this.rt-this.ot;if(!e)return;this.rt=this.ot,i.currIndex=i.potentialIndex;let s,n=Math.abs(e);n>=3&&(this.lt+=e+(e>0?-3:3),n=3,this.itemHolders.forEach((o=>{var a;(a=o.slide)===null||a===void 0||a.destroy(),o.slide=void 0})));for(let o=0;o<n;o++)e>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this.lt++,w(s.el,(this.lt+2)*this.slideWidth),i.setContent(s,i.currIndex-n+o+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this.lt--,w(s.el,this.lt*this.slideWidth),i.setContent(s,i.currIndex+n-o-2)));Math.abs(this.lt)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),i.animations.stopAllPan(),this.itemHolders.forEach(((o,a)=>{o.slide&&o.slide.setIsActive(a===1)})),i.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,i.contentLoader.updateLazy(e),i.currSlide&&i.currSlide.applyCurrentZoomPan(),i.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let e=(this.slideWidth*this.ot-t)/this.slideWidth;e+=this.pswp.currIndex;let s=Math.round(t-this.x);(e<0&&s>0||e>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+.35*s)}this.x=t,this.pswp.container&&w(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:i!=null&&i})}},Tt={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},y=(h,t)=>t?h:Tt[h],K=class{constructor(t){this.pswp=t,this.ct=!1,t.on("bindEvents",(()=>{t.options.trapFocus&&(t.options.initialPointerPos||this.dt(),t.events.add(document,"focusin",this.ut.bind(this))),t.events.add(document,"keydown",this.vt.bind(this))}));let i=document.activeElement;t.on("destroy",(()=>{t.options.returnFocus&&i&&this.ct&&i.focus()}))}dt(){!this.ct&&this.pswp.element&&(this.pswp.element.focus(),this.ct=!0)}vt(t){let{pswp:i}=this;if(i.dispatch("keydown",{originalEvent:t}).defaultPrevented||(function(a){return"button"in a&&a.button===1||a.ctrlKey||a.metaKey||a.altKey||a.shiftKey})(t))return;let e,s,n=!1,o="key"in t;switch(o?t.key:t.keyCode){case y("Escape",o):i.options.escKey&&(e="close");break;case y("z",o):e="toggleZoom";break;case y("ArrowLeft",o):s="x";break;case y("ArrowUp",o):s="y";break;case y("ArrowRight",o):s="x",n=!0;break;case y("ArrowDown",o):n=!0,s="y";break;case y("Tab",o):this.dt()}if(s){t.preventDefault();let{currSlide:a}=i;i.options.arrowKeys&&s==="x"&&i.getNumItems()>1?e=n?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[s]+=n?-80:80,a.panTo(a.pan.x,a.pan.y))}e&&(t.preventDefault(),i[e]())}ut(t){let{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}},Et="cubic-bezier(.4,0,.22,1)",Y=class{constructor(t){var i;this.props=t;let{target:e,onComplete:s,transform:n,onFinish:o=(()=>{}),duration:a=333,easing:r=Et}=t;this.onFinish=o;let l=n?"transform":"opacity",d=(i=t[l])!==null&&i!==void 0?i:"";this.ft=e,this.wt=s,this.gt=!1,this.yt=this.yt.bind(this),this._t=setTimeout((()=>{ut(e,l,a,r),this._t=setTimeout((()=>{e.addEventListener("transitionend",this.yt,!1),e.addEventListener("transitioncancel",this.yt,!1),this._t=setTimeout((()=>{this.xt()}),a+500),e.style[l]=d}
1),30)}),0)}yt(t){t.target===this.ft&&this.xt()}xt(){this.gt||(this.gt=!0,this.onFinish(),this.wt&&this.wt())}destroy(){this._t&&clearTimeout(this._t),ut(this.ft),this.ft.removeEventListener("transitionend",this.yt,!1),this.ft.removeEventListener("transitioncancel",this.yt,!1),this.gt||this.xt()}},J=class{constructor(t,i,e){this.velocity=1e3*t,this.bt=i||.75,this.St=e||12,this.zt=this.St,this.bt<1&&(this.zt*=Math.sqrt(1-this.bt*this.bt))}easeFrame(t,i){let e,s=0;i/=1e3;let n=Math.E**(-this.bt*this.St*i);if(this.bt===1)e=this.velocity+this.St*t,s=(t+e*i)*n,this.velocity=s*-this.St+e*n;else if(this.bt<1){e=1/this.zt*(this.bt*this.St*t+this.velocity);let o=Math.cos(this.zt*i),a=Math.sin(this.zt*i);s=n*(t*o+e*a),this.velocity=s*-this.St*this.bt+n*(-this.zt*t*a+this.zt*e*o)}return s}},j=class{constructor(t){this.props=t,this.Mt=0;let{start:i,end:e,velocity:s,onUpdate:n,onComplete:o,onFinish:a=(()=>{}),dampingRatio:r,naturalFrequency:l}=t;this.onFinish=a;let d=new J(s,r,l),p=Date.now(),u=i-e,c=()=>{this.Mt&&(u=d.easeFrame(u,Date.now()-p),Math.abs(u)<1&&Math.abs(d.velocity)<50?(n(e),o&&o(),this.onFinish()):(p=Date.now(),n(u+e),this.Mt=requestAnimationFrame(c)))};this.Mt=requestAnimationFrame(c)}destroy(){this.Mt>=0&&cancelAnimationFrame(this.Mt),this.Mt=0}},Q=class{constructor(){this.activeAnimations=[]}startSpring(t){this.Pt(t,!0)}startTransition(t){this.Pt(t)}Pt(t,i){let e=i?new j(t):new Y(t);return this.activeAnimations.push(e),e.onFinish=()=>this.stop(e),e}stop(t){t.destroy();let i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach((t=>{t.destroy()})),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isPan||(t.destroy(),!1)))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter((t=>
1!t.props.isMainScroll||(t.destroy(),!1)))}isPanRunning(){return this.activeAnimations.some((t=>t.props.isPan))}},tt=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this.Ct.bind(this))}Ct(t){t.preventDefault();let{currSlide:i}=this.pswp,{deltaX:e,deltaY:s}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let n=-s;t.deltaMode===1?n*=.05:n*=t.deltaMode?1:.002,n=2**n;let o=i.currZoomLevel*n;i.zoomTo(o,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(t.deltaMode===1&&(e*=18,s*=18),i.panTo(i.pan.x-e,i.pan.y-s))}},it=class{constructor(t,i){var e;let s=i.name||i.className,n=i.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(n=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:i});let o="";i.isButton?(o+="pswp__button ",o+=i.className||`pswp__button--${i.name}`):o+=i.className||`pswp__${i.name}`;let a=i.isButton?i.tagName||"button":i.tagName||"div";a=a.toLowerCase();let r=v(o,a);if(i.isButton){a==="button"&&(r.type="button");let{title:p}=i,{ariaLabel:u}=i;typeof t.options[s+"Title"]=="string"&&(p=t.options[s+"Title"]),p&&(r.title=p);let c=u||p;c&&r.setAttribute("aria-label",c)}r.innerHTML=(function(p){if(typeof p=="string")return p;if(!p||!p.isCustomSVG)return"";
1let u=p,c='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return c=c.split("%d").join(u.size||32),u.outlineID&&(c+='<use class="pswp__icn-shadow" xlink:href="#'+u.outlineID+'"/>'),c+=u.inner,c+="</svg>",c})(n),i.onInit&&i.onInit(r,t),i.onClick&&(r.onclick=p=>{typeof i.onClick=="string"?t[i.onClick]():typeof i.onClick=="function"&&i.onClick(p,r,t)});let l=i.appendTo||"bar",d=t.element;l==="bar"?(t.topBar||(t.topBar=v("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),d=t.topBar):(r.classList.add("pswp__hide-on-close"),l==="wrapper"&&(d=t.scrollWrap)),(e=d)===null||e===void 0||e.appendChild(t.applyFilters("uiElement",r,i))}};function zt(h,t,i){h.classList.add("pswp__button--arrow"),h.setAttribute("aria-controls","pswp__items"),t.on("change",(()=>{t.options.loop||(h.disabled=i?!(t.currIndex<t.getNumItems()-1):!(t.currIndex>0))}))}var _t={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:zt},Mt={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(h,t)=>{zt(h,t,!0)}},Zt={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},Ot={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},Ft={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(h,t)=>{let i,e=null,s=o=>{var a,r;i!==o&&(i=o,a="active",r=o,h.classList.toggle("pswp__preloader--"+a,r))},n=()=>{var o;if((o=t.currSlide)===null||o===void 0||!o.content.isLoading())return s(!1),void(e&&(clearTimeout(e),e=null));e||(e=setTimeout((()=>{var a;s(!!(!((a=t.currSlide)===null||a===void 0)&&a.content.isLoading())),e=null}),t.options.preloaderDelay))};t.on("change",n),t.on("loadComplete",(o=>{t.currSlide===o.slide&&n()})),t.ui&&(t.ui.updatePreloaderVisibility=n)}},Nt={name:"counter",order:5,onInit:(h,t)=>{t.on("change",(()=>{h.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()}))}};function wt(h,t){h.classList.toggle("pswp--zoomed-in",t)}var et=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this.Tt=void 0}init(){let{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[Zt,_t,Mt,Ot,Ft,Nt],t.dispatch("uiRegister"),this.uiElementsData.sort(((i,e)=>(i.order||0)-(e.order||0))),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach((i=>{this.registerElement(i)})),t.on("change",(()=>{var i;(i=t.element)===null||i===void 0||i.classList.toggle("pswp--one-slide",t.getNumItems()===1)})),t.on("zoomPanUpdate",(()=>this.At()))}registerElement(t){this.isRegistered?this.items.push(new it(this.pswp,t)):this.uiElementsData.push(t)}At(){let{template:t,currSlide:i,options:e}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:s}=i;if(this.pswp.opener.isOpen||(s=i.zoomLevels.initial),s===this.Tt)return;this.Tt=s;let n=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(n)<.01||!i.isZoomable())return wt(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),wt(t,(s===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=s),e.imageClickAction!=="zoom"&&e.imageClickAction!=="zoom-or-close"||t.classList.add("pswp--cl
1ick-to-zoom")}},st=class{constructor(t,i){this.type=t,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}},nt=class{constructor(t,i){if(this.element=v("pswp__img pswp__img--placeholder",t?"img":"div",i),t){let e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&(this.element.tagName==="IMG"?(B(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=L(0,0,t/250)):B(this.element,t,i))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},ot=class{constructor(t,i,e){this.instance=i,this.data=t,this.index=e,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Dt,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(t,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){let e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{let e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new nt(e,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=v("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=v("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var i,e;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;let s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=(i=this.data.src)!==null&&i!==void 0?i:"",s.alt=(e=this.data.alt)!==null&&e!==void 0?e:"",this.state=mt,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=k,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==k&&this.state!==x||this.removePlaceholder())}onError(){this.state=x,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===mt,this)}isError(){return this.state===x}isImageContent(){return this.type==="image"}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(B(this.element,t,i),this.isImageContent()&&!this.isError()))){let e=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,e?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==x,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let t=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||i>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=i+"px",t.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,i;let e=v("pswp__error-msg","div");e.innerText=(t=(i=this.instance.options)===null||i===void 0?void 0:i.errorMsg)!==null&&t!==void 0?t:"",e=this.instance.applyFilters("contentErrorElement",e,this),this.element=v("pswp__content pswp__error-msg-container","div"),this.element.appendChild(e),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===x)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||gt())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!gt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==k&&this.state!==x||this.removePlaceholder()))}};function It(h,t,i){let e=t.createContentFromData(h,i),s,{options:n}=t;if(n){let o;s=new T(n,h,-1),o=t.pswp?t.pswp.viewportSize:St(n,t);let a=bt(n,o,h,i);s.update(e.width,e.height,a)}return e.lazyLoad(),s&&e.setDisplayedSize(Math.ceil(e.width*s.initial),Math.ceil(e.height*s.initial)),e}var ht=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this.Dt=[]}updateLazy(t){let{pswp:i}=this;if(i.dispatch("lazyLoad").defaultPrevented)return;let{preload:e}=i.options,s=t===void 0||t>=0,n;for(n=0;n<=e[1];
1n++)this.loadSlideByIndex(i.currIndex+(s?n:-n));for(n=1;n<=e[0];n++)this.loadSlideByIndex(i.currIndex+(s?-n:n))}loadSlideByIndex(t){let i=this.pswp.getLoopedIndex(t),e=this.getContentByIndex(i);e||(e=(function(s,n){let o=n.getItemData(s);if(!n.dispatch("lazyLoadSlide",{index:s,itemData:o}).defaultPrevented)return It(o,n,s)})(i,this.pswp),e&&this.addToCache(e))}getContentBySlide(t){let i=this.getContentByIndex(t.index);return i||(i=this.pswp.createContentFromData(t.data,t.index),this.addToCache(i)),i.setSlide(t),i}addToCache(t){if(this.removeByIndex(t.index),this.Dt.push(t),this.Dt.length>this.limit){let i=this.Dt.findIndex((e=>!e.isAttached&&!e.hasSlide));i!==-1&&this.Dt.splice(i,1)[0].destroy()}}removeByIndex(t){let i=this.Dt.findIndex((e=>e.index===t));i!==-1&&this.Dt.splice(i,1)}getContentByIndex(t){return this.Dt.find((i=>i.index===t))}destroy(){this.Dt.forEach((t=>t.destroy())),this.Dt=[]}},at=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this.It=void 0,this.Et=!1,this.Lt=!1,this.kt=!1,this.Zt=!1,this.Bt=void 0,this.Ft=void 0,this.Ot=void 0,this.Rt=void 0,this.Nt=void 0,this.Ut=this.Ut.bind(this),t.on("firstZoomPan",this.Ut)}open(){this.Ut(),this.Pt()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;let t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this.It=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt(),setTimeout((()=>{this.Pt()}),this.Lt?30:0)}Ut(){if(this.pswp.off("firstZoomPan",this.Ut),!this.isOpening){let t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this.It=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt()}}Vt(){let{pswp:t}=this,i=this.pswp.currSlide,{options:e}=t;var s,n;if(e.showHideAnimationType==="fade"?(e.showHideOpacity=!0,this.Nt=void 0):e.showHideAnimationType==="none"?(e.showHideOpacity=!1,this.It=0,this.Nt=void 0):this.isOpening&&t.Gt?this.Nt=t.Gt:this.Nt=this.pswp.getThumbBounds(),this.Bt=i?.getPlaceholderElement(),t.animations.stopAll(),this.Et=!!(this.It&&this.It>50),this.$t=!!this.Nt&&i?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this.$t?this.kt=(s=e.showHideOpacity)!==null&&s!==void 0&&s:(this.kt=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this.Zt=!this.kt&&this.pswp.options.bgOpacity>.003,this.Ft=this.kt?t.element:t.bg,!this.Et)return this.It=0,this.$t=!1,this.Zt=!1,this.kt=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(.003)),t.applyBgOpacity(1)));this.$t&&this.Nt&&this.Nt.innerRect?(this.Lt=!0,this.Ot=this.pswp.container,this.Rt=(n=this.pswp.currSlide)===null||n===void 0?void 0:n.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this.Lt=!1,this.isOpening?(this.kt?(t.element&&(t.element.style.opacity=String(.003)),t.applyBgOpacity(1)):(this.Zt&&t.bg&&(t.bg.style.opacity=String(.003)),t.element&&(t.element.style.opacity="1")),this.$t&&(this.qt(),this.Bt&&(this.Bt.style.willChange="transform",this.Bt.style.opacity=String(.003)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this.Lt&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}Pt(){this.isOpening&&this.Et&&this.Bt&&this.Bt.tagName==="IMG"?new Promise((t=>{let i=!1,e=!0;var s;(s=this.Bt,"decode"in s?s.decode().catch((()=>{})):s.complete?Promise.resolve(s):new Promise(((n,o)=>{s.onload=()=>n(s),s.onerror=o}))).finally((()=>{i=!0,e||t(!0)})),setTimeout((()=>{e=!1,i&&t(!0)}),50),setTimeout(t,250)})).finally((()=>this.Ht())):this.Ht()}Ht(){var t,i;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this.It+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(i=this.pswp.element)===null||i===void 0||i.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this.Bt&&(this.Bt.style.opacity="1"),this.Kt()):this.isClosing&&this.Wt(),this.Et||this.jt()}jt(){let{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var i;this.$t&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(i=t.currSlide)===null||i===void 0||i.applyCurrentZoomPan()}}Kt(){let{pswp:t}=this;this.$t&&(this.Lt&&this.Ot&&this.Rt&&(this.Xt(this.Ot,"transform","translate3d(0,
10,0)"),this.Xt(this.Rt,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this.Xt(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this.Zt&&t.bg&&this.Xt(t.bg,"opacity",String(t.options.bgOpacity)),this.kt&&t.element&&this.Xt(t.element,"opacity","1")}Wt(){let{pswp:t}=this;this.$t&&this.qt(!0),this.Zt&&t.bgOpacity>.01&&t.bg&&this.Xt(t.bg,"opacity","0"),this.kt&&t.element&&this.Xt(t.element,"opacity","0")}qt(t){if(!this.Nt)return;let{pswp:i}=this,{innerRect:e}=this.Nt,{currSlide:s,viewportSize:n}=i;if(this.Lt&&e&&this.Ot&&this.Rt){let o=-n.x+(this.Nt.x-e.x)+e.w,a=-n.y+(this.Nt.y-e.y)+e.h,r=n.x-e.w,l=n.y-e.h;t?(this.Xt(this.Ot,"transform",L(o,a)),this.Xt(this.Rt,"transform",L(r,l))):(w(this.Ot,o,a),w(this.Rt,r,l))}s&&(m(s.pan,e||this.Nt),s.currZoomLevel=this.Nt.w/s.width,t?this.Xt(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}Xt(t,i,e){if(!this.It)return void(t.style[i]=e);let{animations:s}=this.pswp,n={duration:this.It,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this.jt()},target:t};n[i]=e,s.startTransition(n)}},kt={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},E=class extends class extends class{constructor(){this.Yt={},this.Jt={},this.pswp=void 0,this.options=void 0}addFilter(t,i,e=100){var s,n,o;this.Jt[t]||(this.Jt[t]=[]),(s=this.Jt[t])===null||s===void 0||s.push({fn:i,priority:e}),(n=this.Jt[t])===null||n===void 0||n.sort(((a,r)=>a.priority-r.priority)),(o=this.pswp)===null||o===void 0||o.addFilter(t,i,e)}removeFilter(t,i){this.Jt[t]&&(this.Jt[t]=this.Jt[t].filter((e=>e.fn!==i))),this.pswp&&this.pswp.removeFilter(t,i)}applyFilters(t,...i){var e;return(e=this.Jt[t])===null||e===void 0||e.forEach((s=>{i[0]=s.fn.apply(this,i)})),i[0]}on(t,i){var e,s;this.Yt[t]||(this.Yt[t]=[]),(e=this.Yt[t])===null||e===void 0||e.push(i),(s=this.pswp)===null||s===void 0||s.on(t,i)}off(t,i){var e;this.Yt[t]&&(this.Yt[t]=this.Yt[t].filter((s=>i!==s))),(e=this.pswp)===null||e===void 0||e.off(t,i)}dispatch(t,i){var e;if(this.pswp)return this.pswp.dispatch(t,i);let s=new st(t,i);return(e=this.Yt[t])===null||e===void 0||e.forEach((n=>{n.call(this,s)})),s}}{getNumItems(){var t;let i=0,e=(t=this.options)===null||t===void 0?void 0:t.dataSource;e&&"length"in e?i=e.length:e&&"gallery"in e&&(e.items||(e.items=this.Qt(e.gallery)),e.items&&(i=e.items.length));let s=this.dispatch("numItems",{dataSource:e,numItems:i});return this.applyFilters("numItems",s.numItems,e)}createContentFromData(t,i){return new ot(t,this,i)}getItemData(t){var i;let e=(i=this.options)===null||i===void 0?void 0:i.dataSource,s={};Array.isArray(e)?s=e[t]:e&&"gallery"in e&&(e.items||(e.items=this.Qt(e.gallery)),s=e.items[t]);let n=s;n instanceof Element&&(n=this.ti(n));let o=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",o.itemData,t)}Qt(t){var i,e;return(i=this.options)!==null&&i!==void 0&&i.children||(e=this.options)!==null&&e!==void 0&&e.childSelector?(function(s,n,o=document){let a=[];if(s instanceof Element)a=[s];else if(s instanceof NodeList||Array.isArray(s))a=Array.from(s);else{let r=typeof s=="string"?s:n;r&&(a=Array.from(o.querySelectorAll(r)))}return a})(this.options.children,this.options.childSelector,t)||[]:[t]}ti(t){let i={element:t},e=t.tagName==="A"?t:t.querySelector("a");if(e){i.src=e.dataset.pswpSrc||e.href,e.dataset.pswpSrcset&&(i.srcset=e.dataset.pswpSrcset),i.width=e.dataset.pswpWidth?parseInt(e.dataset.pswpWidth,10):0,i.height=e.dataset.pswpHeight?parseInt(e.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,e.dataset.pswpType&&(i.type=e.dataset.pswpType);let n=t.querySelector("img");var s;n&&(i.msrc=n.currentSrc||n.src,i.alt=(s=n.getAttribute("alt"))!==null&&s!==void 0?s:""),(e.dataset.pswpCropped||e.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,t,e)}lazyLoadData(t,i){return It(t,this,i)}}{constructor(t){super(),this.options=this.ii(t||{}),this.offset={x:0,y:0},this.si={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this.hi={},this.Gt=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new W,this.animations=new Q,this.mainScroll=ne
1w X(this),this.gestures=new G(this),this.opener=new at(this),this.keyboard=new K(this),this.contentLoader=new ht(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this.ei();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new tt(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this.hi=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this.hi,slide:void 0}),this.Gt=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",(()=>{let{itemHolders:i}=this.mainScroll;i[0]&&(i[0].el.style.display="block",this.setContent(i[0],this.currIndex-1)),i[2]&&(i[2].el.style.display="block",this.setContent(i[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this.ni.bind(this)),this.events.add(window,"scroll",this.oi.bind(this)),this.dispatch("bindEvents")})),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){let i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),P(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach((t=>{var i;(i=t.slide)===null||i===void 0||i.appendHeavy()}))}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var i;(i=this.currSlide)===null||i===void 0||i.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this.Yt={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach((i=>{var e;(e=i.slide)===null||e===void 0||e.destroy()})),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach(((i,e)=>{var s,n;let o=((s=(n=this.currSlide)===null||n===void 0?void 0:n.index)!==null&&s!==void 0?s:0)-1+e;var a;this.canLoop()&&(o=this.getLoopedIndex(o)),o===t&&(this.setContent(i,t,!0),e===1&&(this.currSlide=i.slide,(a=i.slide)===null||a===void 0||a.setIsActive(!0)))})),this.dispatch("change")}setContent(t,i,e){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!e)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(i<0||i>=this.getNumItems()))return;let s=this.getItemData(i);t.slide=new U(s,i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;let i=St(this.options,this);!t&&C(i,this.si)||(m(this.si,i),this.dispatch("beforeResize"),m(this.viewportSize,this.si),this.oi(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var t;this.hasMouse||(this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse"))}ni(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout((()=>{this.updateSize()}),500)}oi(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}ei(){this.element=v("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=v("pswp__bg","div",this.element),this.scrollWrap=v("pswp__scroll-wrap","section",this.element),this.container=v("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new et(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return(function(t,i,e){let s=e.dispatch("thumbBounds",{index:t,itemData:i,instance:e});if(s.thumbBounds)return s.thumbBounds;let{element:n}=i,o,a;if(n&&e.options.thumbSelector!==!1){let r=e.options.thumbSelector||"img";a=n.matches(r)?n:n.querySelector(r)}return a=e.applyFilters("thumbEl",a,i,t),a&&(o=i.thumbCropped?(function(r,l,d){let p=r.getBoundingClientRect(),u=p.width/l,c=p.height/d,g=u>
1c?u:c,A=(p.width-l*g)/2,rt=(p.height-d*g)/2,lt={x:p.left+A,y:p.top+rt,w:l*g};return lt.innerRect={w:p.width,h:p.height,x:A,y:rt},lt})(a,i.width||i.w||0,i.height||i.h||0):(function(r){let l=r.getBoundingClientRect();return{x:l.left,y:l.top,w:l.width}})(a)),e.applyFilters("thumbBounds",o,i,t)})(this.currIndex,this.currSlide?this.currSlide.data:this.hi,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}ii(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...kt,...t}}};var Ct={pswpModule:E,bgOpacity:.97,showHideAnimationType:"zoom",showAnimationDuration:200,hideAnimationDuration:200,zoomAnimationDuration:200,paddingFn:(h,t)=>({top:10,bottom:t.element.dataset.captionHtml?50:30,left:10,right:10})};function Ht(){document.querySelectorAll(".prose img:not(a img):not(.carousel-slide img):not(.carousel-thumb img)").forEach(s=>{let n=Lt(s);n.classList.add("pswp-link");let o=s.closest("figure"),a=o?o.querySelector("figcaption"):null;a&&(n.dataset.captionHtml=a.innerHTML)});let t=new z({...Ct,gallery:".prose",children:"a.pswp-link"});Pt(t),t.init(),document.querySelectorAll(".carousel-slide img:not(a img)").forEach(s=>{let n=Lt(s);n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.width="100%",n.style.height="100%";let o=s.closest(".carousel-slide");o&&o.dataset.caption&&(n.dataset.captionHtml=o.dataset.caption)});let e=new z({...Ct,gallery:"[data-pswp-carousel]",children:"a[data-pswp-width]"});Pt(e),e.init()}function Lt(h){let t=document.createElement("a");t.href=h.src,t.target="_blank",t.style.gridRowEnd=h.style.gridRowEnd;let i=h.getAttribute("alt");t.setAttribute("aria-label",i?`Open image in lightbox: ${i}`:"Open image in lightbox");let e=h.getAttribute("width")||h.naturalWidth,s=h.getAttribute("height")||h.naturalHeight;return t.dataset.pswpWidth=e||1600,t.dataset.pswpHeight=s||900,(!e||!s)&&h.addEventListener("load",()=>{t.dataset.pswpWidth=h.naturalWidth||1600,t.dataset.pswpHeight=h.naturalHeight||900},{once:!0}),h.parentNode.insertBefore(t,h),t.appendChild(h),t}function Pt(h){h.on("openingAnimationEnd",()=>{let t=()=>{h.pswp?.close(),window.removeEventListener("wheel",t)};window.addEventListener("wheel",t,{once:!0})}),h.on("uiRegister",function(){h.pswp.ui.registerElement({name:"download-button",order:8,isButton:!0,tagName:"a",html:{isCustomSVG:!0,inner:'<path d="M20.5 14.3 17.1 18V10h-2.2v7.9l-3.4-3.6L10 16l6 6.1 6-6.1ZM23 23H9v2h14Z" id="pswp__icn-download"/>',outlineID:"pswp__icn-download"},onInit:(t,i)=>{t.setAttribute("download",""),t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"),t.setAttribute("aria-label","Download image"),i.on("change",()=>{t.href=i.currSlide.data.src})}}),h.pswp.ui.registerElement({name:"custom-caption",order:9,isButton:!1,appendTo:"root",onInit:(t,i)=>{t.setAttribute("aria-live","polite"),i.on("change",()=>{let e=i.currSlide.data.element;e&&e.dataset.captionHtml?(t.style.display="block",t.innerHTML=e.dataset.captionHtml):t.style.display="none"})}})})}Ht();
2/*!
3  * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
4  * (c) 2024 Dmytro Semenov
5  */
6/*!
7  * PhotoSwipe 5.4.4 - https://photoswipe.com
8  * (c) 2024 Dmytro Semenov
9  */

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.