HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: /home/salamatk/takarzan.ir/wp-content/themes/xts-luman/js/photoswipe-bundle.min.js
((e,t)=>{"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()})(this,function(){return function(p,P,t,z){function e(){return{x:0,y:0}}function N(e,t){g.extend(x,t.publicMethods),Ye.push(e)}function U(e){var t=A();return t-1<e?e-t:e<0?t+e:e}function a(e,t){return Ve[e]||(Ve[e]=[]),Ve[e].push(t)}function K(e,t,n,o){o===x.currItem.initialZoomLevel?n[e]=x.currItem.initialPosition[e]:(n[e]=Qe(e,o),n[e]>t.min[e]?n[e]=t.min[e]:n[e]<t.max[e]&&(n[e]=t.max[e]))}function H(e){var t="";y.escKey&&27===e.keyCode?t="close":y.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),!t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,x[t]())}function W(e){e&&(_e||Se||h||Te)&&(e.preventDefault(),e.stopPropagation())}function B(){x.setScrollOffset(0,g.getScrollY())}function Y(e){var t;"mousedown"===e.type&&0<e.button||(Qt?e.preventDefault():Ee&&"mousedown"===e.type||(Ot(e,!0)&&e.preventDefault(),I("pointerDown"),pe&&((t=g.arraySearch(ht,e.pointerId,"id"))<0&&(t=ht.length),ht[t]={x:e.pageX,y:e.pageY,id:e.pointerId}),e=(t=Nt(e)).length,u=null,ut(),s&&1!==e||(s=Re=!0,g.bind(window,Q,x),Ie=Pe=Le=Te=Fe=_e=De=Se=!1,Ae=null,I("firstTouchStart",t),S(Ke,w),Ue.x=Ue.y=0,S(O,t[0]),S(ft,O),gt.x=b.x*He,xt=[{x:O.x,y:O.y}],be=ve=T(),ot(f,!0),Dt(),St()),!c&&1<e&&!h&&!Fe&&(te=f,c=De=!(Se=!1),Ue.y=Ue.x=0,S(Ke,w),S(M,t[0]),S(mt,t[1]),At(M,mt,It),Ct.x=Math.abs(It.x)-w.x,Ct.y=Math.abs(It.y)-w.y,Oe=Et(M,mt))))}function G(e){var t;e.preventDefault(),pe&&-1<(t=g.arraySearch(ht,e.pointerId,"id"))&&((t=ht[t]).x=e.pageX,t.y=e.pageY),s&&(t=Nt(e),Ae||_e||c?u=t:k.x!==b.x*He?Ae="h":(e=Math.abs(t[0].x-O.x)-Math.abs(t[0].y-O.y),Math.abs(e)>=pt&&(Ae=0<e?"h":"v",u=t)))}function q(e){if(l.isOldAndroid){if(Ee&&"mouseup"===e.type)return;-1<e.type.indexOf("touch")&&(clearTimeout(Ee),Ee=setTimeout(function(){Ee=0},600))}I("pointerUp"),Ot(e,!1)&&e.preventDefault(),pe&&-1<(a=g.arraySearch(ht,e.pointerId,"id"))&&(t=ht.splice(a,1)[0],!navigator.pointerEnabled&&(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type)||(t.type=e.pointerType||"mouse"));var t,n=(a=Nt(e)).length;if(2===(n="mouseup"===e.type?0:n))return!(u=null);1===n&&S(ft,a[0]),0!==n||Ae||h||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),I("touchRelease",e,t));var o,i,a=-1;if(0===n&&(s=!1,g.unbind(window,Q,x),Dt(),c?a=0:-1!==bt&&(a=T()-bt)),bt=1===n?T():-1,e=-1!==a&&a<150?"zoom":"swipe",c&&n<2&&(c=!1,1===n&&(e="zoomPointerUp"),I("zoomGestureEnded")),u=null,_e||Se||h||Te)if(ut(),(Ce=Ce||Ht()).calculateSwipeSpeed("x"),Te)Lt()<y.verticalDragRange?x.close():(o=w.y,i=Ze,ct("verticalDrag",0,1,300,g.easing.cubic.out,function(e){w.y=(x.currItem.initialPosition.y-o)*e+o,E((1-i)*e+i),D()}),I("onVerticalDrag",1));else{if((Fe||h)&&0===n){if(Bt(e,Ce))return;e="zoomPointerUp"}h||("swipe"!==e?Gt():!Fe&&f>x.currItem.fitRatio&&Wt(Ce))}}var V,X,j,m,$,J,Q,ee,o,f,te,ne,oe,ie,ae,r,re,le,se,ue,ce,de,pe,i,me,fe,he,ge,xe,ye,l,we,ve,be,Ce,Ie,Te,Ee,s,De,Se,_e,Me,Fe,u,c,Oe,d,ke,h,Ae,Re,Le,Ze,Pe,ze,g={features:null,bind:function(e,t,n,o){var i=(o?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a<t.length;a++)t[a]&&e[i](t[a],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){t=document.createElement(t||"div");return e&&(t.className=e),t},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){g.bind(e,t,n,!0)},removeClass:function(e,t){t=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(t," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){g.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(g.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var o=e.length;o--;)if(e[o][n]===t)return o;return-1},extend:function(e,t,n){for(var o in t)!t.hasOwnProperty(o)||n&&e.hasOwnProperty(o)||(e[o]=t[o])},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(g.features)return g.features;for(var e,t,n,o,i,a=g.createEl().style,r="",l={},s=(l.oldIE=document.all&&!document.addEventListener,l.touch="ontouchstart"in window,window.requestAnimationFrame&&(l.raf=window.requestAnimationFrame,l.caf=window.cancelAnimationFrame),l.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,l.pointerEvent||(e=navigator.userAgent,/iP(hone|od)/.test(navigator.platform)&&(t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/))&&0<t.length&&1<=(t=parseInt(t[1],10))&&t<8&&(l.isOldIOSPhone=!0),t=(t=e.match(/Android\s([0-9\.]*)/))?t[1]:0,1<=(t=parseFloat(t))&&(t<4.4&&(l.isOldAndroid=!0),l.androidVersion=t),l.isMobileOpera=/opera mini|opera mobi/i.test(e)),["transform","perspective","animationName"]),u=["","webkit","Moz","ms","O"],c=0;c<4;c++){for(var r=u[c],d=0;d<3;d++)n=s[d],o=r+(r?n.charAt(0).toUpperCase()+n.slice(1):n),!l[n]&&o in a&&(l[n]=o);r&&!l.raf&&(r=r.toLowerCase(),l.raf=window[r+"RequestAnimationFrame"],l.raf)&&(l.caf=window[r+"CancelAnimationFrame"]||window[r+"CancelRequestAnimationFrame"])}return l.raf||(i=0,l.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-i)),o=window.setTimeout(function(){e(t+n)},n);return i=t+n,o},l.caf=function(e){clearTimeout(e)}),l.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,g.features=l}},x=(g.detectFeatures(),g.features.oldIE&&(g.bind=function(e,t,n,o){t=t.split(" ");for(var i,a=(o?"detach":"attach")+"Event",r=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(i=t[l])if("object"==typeof n&&n.handleEvent){if(o){if(!n["oldIE"+i])return!1}else n["oldIE"+i]=r;e[a]("on"+i,n["oldIE"+i])}else e[a]("on"+i,n)}),this),Ne=25,y={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"},Ue=(g.extend(y,z),e()),Ke=e(),w=e(),v={},He=0,We={},b=e(),C=0,Be=!0,Ye=[],Ge={},qe=!1,Ve={},I=function(e){var t=Ve[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;o<t.length;o++)t[o].apply(x,n)}},T=function(){return(new Date).getTime()},E=function(e){Ze=e,x.bg.style.opacity=e*y.bgOpacity},Xe=function(e,t,n,o,i){(!qe||i&&i!==x.currItem)&&(o/=(i||x.currItem).fitRatio),e[de]=ne+t+"px, "+n+"px"+oe+" scale("+o+")"},D=function(e){ke&&(e&&(f>x.currItem.fitRatio?qe||(un(x.currItem,!1,!0),qe=!0):qe&&(un(x.currItem),qe=!1)),Xe(ke,w.x,w.y,f))},je=function(e){e.container&&Xe(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},$e=function(e,t){t[de]=ne+e+"px, 0px"+oe},Je=function(e,t){var n;!y.loop&&t&&(t=m+(b.x*He-e)/b.x,n=Math.round(e-k.x),t<0&&0<n||t>=A()-1&&n<0)&&(e=k.x+n*y.mainScrollEndFriction),k.x=e,$e(e,$)},Qe=function(e,t){var n=Ct[e]-We[e];return Ke[e]+Ue[e]+n-t/te*n},S=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},et=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},tt=null,nt=function(){tt&&(g.unbind(document,"mousemove",nt),g.addClass(p,"pswp--has_mouse"),y.mouseUsed=!0,I("mouseUsed")),tt=setTimeout(function(){tt=null},100)},ot=function(e,t){e=ln(x.currItem,v,e);return t&&(d=e),e},it=function(e){return(e=e||x.currItem).initialZoomLevel},at=function(e){return 0<(e=e||x.currItem).w?y.maxSpreadZoom:1},_={},rt=0,lt=function(e){_[e]&&(_[e].raf&&fe(_[e].raf),rt--,delete _[e])},st=function(e){_[e]&&lt(e),_[e]||(rt++,_[e]={})},ut=function(){for(var e in _)_.hasOwnProperty(e)&&lt(e)},ct=function(e,t,n,o,i,a,r){function l(){_[e]&&(s=T()-u,o<=s?(lt(e),a(n),r&&r()):(a((n-t)*i(s/o)+t),_[e].raf=me(l)))}var s,u=T();st(e);l()},z={shout:I,listen:a,viewportSize:v,options:y,isMainScrollAnimating:function(){return h},getZoomLevel:function(){return f},getCurrentIndex:function(){return m},isDragging:function(){return s},isZooming:function(){return c},setScrollOffset:function(e,t){We.x=e,ye=We.y=t,I("updateScrollOffset",We)},applyZoomPan:function(e,t,n,o){w.x=t,w.y=n,f=e,D(o)},init:function(){if(!V&&!X){x.framework=g,x.template=p,x.bg=g.getChildByClass(p,"pswp__bg"),he=p.className,V=!0,l=g.detectFeatures(),me=l.raf,fe=l.caf,de=l.transform,xe=l.oldIE,x.scrollWrap=g.getChildByClass(p,"pswp__scroll-wrap"),x.container=g.getChildByClass(x.scrollWrap,"pswp__container"),$=x.container.style,x.itemHolders=r=[{el:x.container.children[0],wrap:0,index:-1},{el:x.container.children[1],wrap:0,index:-1},{el:x.container.children[2],wrap:0,index:-1}],r[0].el.style.display=r[2].el.style.display="none",de?(t=l.perspective&&!i,ne="translate"+(t?"3d(":"("),oe=l.perspective?", 0px)":")"):(de="left",g.addClass(p,"pswp--ie"),$e=function(e,t){t.left=e+"px"},je=function(e){var t=1<e.fitRatio?1:e.fitRatio,n=e.container.style,o=t*e.h;n.width=t*e.w+"px",n.height=o+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},D=function(){var e,t,n,o;ke&&(e=ke,o=(n=1<(t=x.currItem).fitRatio?1:t.fitRatio)*t.h,e.width=n*t.w+"px",e.height=o+"px",e.left=w.x+"px",e.top=w.y+"px")}),o={resize:x.updateSize,orientationchange:function(){clearTimeout(we),we=setTimeout(function(){v.x!==x.scrollWrap.clientWidth&&x.updateSize()},500)},scroll:B,keydown:H,click:W};var e,t=l.isOldIOSPhone||l.isOldAndroid||l.isMobileOpera;for(l.animationName&&l.transform&&!t||(y.showAnimationDuration=y.hideAnimationDuration=0),e=0;e<Ye.length;e++)x["init"+Ye[e]]();P&&(x.ui=new P(x,g)).init(),I("firstUpdate"),m=m||y.index||0,(isNaN(m)||m<0||m>=A())&&(m=0),x.currItem=en(m),(l.isOldIOSPhone||l.isOldAndroid)&&(Be=!1),p.setAttribute("aria-hidden","false"),y.modal&&(Be?p.style.position="fixed":(p.style.position="absolute",p.style.top=g.getScrollY()+"px")),void 0===ye&&(I("initialLayout"),ye=ge=g.getScrollY());var n="pswp--open ";for(y.mainClass&&(n+=y.mainClass+" "),y.showHideOpacity&&(n+="pswp--animate_opacity "),n=(n=(n+=i?"pswp--touch":"pswp--notouch")+(l.animationName?" pswp--css_animation":""))+(l.svg?" pswp--svg":""),g.addClass(p,n),x.updateSize(),J=-1,C=null,e=0;e<3;e++)$e((e+J)*b.x,r[e].el.style);xe||g.bind(x.scrollWrap,ee,x),a("initialZoomInEnd",function(){x.setContent(r[0],m-1),x.setContent(r[2],m+1),r[0].el.style.display=r[2].el.style.display="block",y.focus&&p.focus(),g.bind(document,"keydown",x),l.transform&&g.bind(x.scrollWrap,"click",x),y.mouseUsed||g.bind(document,"mousemove",nt),g.bind(window,"resize scroll orientationchange",x),I("bindEvents")}),x.setContent(r[1],m),x.updateCurrItem(),I("afterInit"),Be||(ie=setInterval(function(){rt||s||c||f!==x.currItem.initialZoomLevel||x.updateSize()},1e3)),g.addClass(p,"pswp--visible")}},close:function(){V&&(X=!(V=!1),I("close"),g.unbind(window,"resize scroll orientationchange",x),g.unbind(window,"scroll",o.scroll),g.unbind(document,"keydown",x),g.unbind(document,"mousemove",nt),l.transform&&g.unbind(x.scrollWrap,"click",x),s&&g.unbind(window,Q,x),clearTimeout(we),I("unbindEvents"),tn(x.currItem,null,!0,x.destroy))},destroy:function(){I("destroy"),jt&&clearTimeout(jt),p.setAttribute("aria-hidden","true"),p.className=he,ie&&clearInterval(ie),g.unbind(x.scrollWrap,ee,x),g.unbind(window,"scroll",x),Dt(),ut(),Ve=null},panTo:function(e,t,n){n||(e>d.min.x?e=d.min.x:e<d.max.x&&(e=d.max.x),t>d.min.y?t=d.min.y:t<d.max.y&&(t=d.max.y)),w.x=e,w.y=t,D()},handleEvent:function(e){e=e||window.event,o[e.type]&&o[e.type](e)},goTo:function(e){var t=(e=U(e))-m;C=t,m=e,x.currItem=en(m),He-=t,Je(b.x*He),ut(),h=!1,x.updateCurrItem()},next:function(){x.goTo(m+1)},prev:function(){x.goTo(m-1)},updateCurrZoomItem:function(e){var t;e&&I("beforeChange",0),ke=r[1].el.children.length&&(t=r[1].el.children[0],g.hasClass(t,"pswp__zoom-wrap"))?t.style:null,d=x.currItem.bounds,te=f=x.currItem.initialZoomLevel,w.x=d.center.x,w.y=d.center.y,e&&I("afterChange")},invalidateCurrItems:function(){ae=!0;for(var e=0;e<3;e++)r[e].item&&(r[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==C){var t,n=Math.abs(C);if(!(e&&n<2)){x.currItem=en(m),qe=!1,I("beforeChange",C),3<=n&&(J+=C+(0<C?-3:3),n=3);for(var o=0;o<n;o++)0<C?(t=r.shift(),r[2]=t,$e((++J+2)*b.x,t.el.style),x.setContent(t,m-n+o+1+1)):(t=r.pop(),r.unshift(t),$e(--J*b.x,t.el.style),x.setContent(t,m+n-o-1-1));ke&&1===Math.abs(C)&&(e=en(re)).initialZoomLevel!==f&&(ln(e,v),un(e),je(e)),C=0,x.updateCurrZoomItem(),re=m,I("afterChange")}}},updateSize:function(e){if(!Be&&y.modal){var t=g.getScrollY();if(ye!==t&&(p.style.top=t+"px",ye=t),!e&&Ge.x===window.innerWidth&&Ge.y===window.innerHeight)return;Ge.x=window.innerWidth,Ge.y=window.innerHeight,p.style.height=Ge.y+"px"}if(v.x=x.scrollWrap.clientWidth,v.y=x.scrollWrap.clientHeight,B(),b.x=v.x+Math.round(v.x*y.spacing),b.y=v.y,Je(b.x*He),I("beforeResize"),void 0!==J){for(var n,o,i,a=0;a<3;a++)n=r[a],$e((a+J)*b.x,n.el.style),i=m+a-1,y.loop&&2<A()&&(i=U(i)),(o=en(i))&&(ae||o.needsUpdate||!o.bounds)?(x.cleanSlide(o),x.setContent(n,i),1===a&&(x.currItem=o,x.updateCurrZoomItem(!0)),o.needsUpdate=!1):-1===n.index&&0<=i&&x.setContent(n,i),o&&o.container&&(ln(o,v),un(o),je(o));ae=!1}te=f=x.currItem.initialZoomLevel,(d=x.currItem.bounds)&&(w.x=d.center.x,w.y=d.center.y,D(!0)),I("resize")},zoomTo:function(t,e,n,o,i){e&&(te=f,Ct.x=Math.abs(e.x)-w.x,Ct.y=Math.abs(e.y)-w.y,S(Ke,w));function a(e){1===e?(f=t,w.x=r.x,w.y=r.y):(f=(t-l)*e+l,w.x=(r.x-s.x)*e+s.x,w.y=(r.y-s.y)*e+s.y),i&&i(e),D(1===e)}var e=ot(t,!1),r={},l=(K("x",e,r,t),K("y",e,r,t),f),s={x:w.x,y:w.y};et(r);n?ct("customZoomTo",0,1,n,o||g.easing.sine.inOut,a):a(1)}},dt=30,pt=10,M={},mt={},F={},O={},ft={},ht=[],gt={},xt=[],yt={},wt=0,vt=e(),bt=0,k=e(),Ct=e(),It=e(),Tt=function(e,t){return e.x===t.x&&e.y===t.y},Et=function(e,t){return yt.x=Math.abs(e.x-t.x),yt.y=Math.abs(e.y-t.y),Math.sqrt(yt.x*yt.x+yt.y*yt.y)},Dt=function(){Me&&(fe(Me),Me=null)},St=function(){s&&(Me=me(St),Kt())},_t=function(){return!("fit"===y.scaleMode&&f===x.currItem.initialZoomLevel)},Mt=function(e,t){return!(!e||e===document||e.getAttribute("class")&&-1<e.getAttribute("class").indexOf("pswp__scroll-wrap"))&&(t(e)?e:Mt(e.parentNode,t))},Ft={},Ot=function(e,t){return Ft.prevent=!Mt(e.target,y.isClickableElement),I("preventDragEvent",e,t,Ft),Ft.prevent},kt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},At=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Rt=function(e,t,n){var o;50<e-be&&((o=2<xt.length?xt.shift():{}).x=t,o.y=n,xt.push(o),be=e)},Lt=function(){var e=w.y-x.currItem.initialPosition.y;return 1-Math.abs(e/(v.y/2))},Zt={},Pt={},zt=[],Nt=function(e){for(;0<zt.length;)zt.pop();return pe?(ze=0,ht.forEach(function(e){0===ze?zt[0]=e:1===ze&&(zt[1]=e),ze++})):-1<e.type.indexOf("touch")?e.touches&&0<e.touches.length&&(zt[0]=kt(e.touches[0],Zt),1<e.touches.length)&&(zt[1]=kt(e.touches[1],Pt)):(Zt.x=e.pageX,Zt.y=e.pageY,Zt.id="",zt[0]=Zt),zt},Ut=function(e,t){var n,o,i,a=w[e]+t[e],r=0<t[e],l=k.x+t.x,s=k.x-gt.x,u=a>d.min[e]||a<d.max[e]?y.panEndFriction:1,a=w[e]+t[e]*u;if((y.allowPanToNext||f===x.currItem.initialZoomLevel)&&(ke?"h"!==Ae||"x"!==e||Se||(r?(a>d.min[e]&&(u=y.panEndFriction,d.min[e],n=d.min[e]-Ke[e]),(n<=0||s<0)&&1<A()?(i=l,s<0&&l>gt.x&&(i=gt.x)):d.min.x!==d.max.x&&(o=a)):(a<d.max[e]&&(u=y.panEndFriction,d.max[e],n=Ke[e]-d.max[e]),(n<=0||0<s)&&1<A()?(i=l,0<s&&l<gt.x&&(i=gt.x)):d.min.x!==d.max.x&&(o=a))):i=l,"x"===e))return void 0!==i&&(Je(i,!0),Fe=i!==gt.x),d.min.x!==d.max.x&&(void 0!==o?w.x=o:Fe||(w.x+=t.x*u)),void 0!==i;h||Fe||f>x.currItem.fitRatio&&(w[e]+=t[e]*u)},Kt=function(){if(u){var e,t,n,o,i,a=u.length;if(0!==a)if(S(M,u[0]),F.x=M.x-O.x,F.y=M.y-O.y,c&&1<a)O.x=M.x,O.y=M.y,!F.x&&!F.y&&Tt(u[1],mt)||(S(mt,u[1]),Se||(Se=!0,I("zoomGestureStarted")),a=Et(M,mt),(e=Yt(a))>x.currItem.initialZoomLevel+x.currItem.initialZoomLevel/15&&(Pe=!0),t=1,n=it(),o=at(),e<n?y.pinchToClose&&!Pe&&te<=x.currItem.initialZoomLevel?(E(i=1-(n-e)/(n/1.2)),I("onPinchClose",i),Le=!0):e=n-(t=1<(t=(n-e)/n)?1:t)*(n/3):o<e&&(e=o+(t=1<(t=(e-o)/(6*n))?1:t)*n),t<0&&(t=0),At(M,mt,vt),Ue.x+=vt.x-It.x,Ue.y+=vt.y-It.y,S(It,vt),w.x=Qe("x",e),w.y=Qe("y",e),Ie=f<e,f=e,D());else if(Ae&&(Re&&(Re=!1,Math.abs(F.x)>=pt&&(F.x-=u[0].x-ft.x),Math.abs(F.y)>=pt)&&(F.y-=u[0].y-ft.y),O.x=M.x,O.y=M.y,0!==F.x||0!==F.y)){if("v"===Ae&&y.closeOnVerticalDrag)if(!_t())return Ue.y+=F.y,w.y+=F.y,i=Lt(),Te=!0,I("onVerticalDrag",i),E(i),void D();Rt(T(),M.x,M.y),_e=!0,d=x.currItem.bounds,Ut("x",F)||(Ut("y",F),et(w),D())}}},Ht=function(){var t,n,o={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=(1<xt.length?(t=T()-be+50,xt[xt.length-2]):(t=T()-ve,ft))[e],o.lastFlickOffset[e]=O[e]-n,o.lastFlickDist[e]=Math.abs(o.lastFlickOffset[e]),20<o.lastFlickDist[e]?o.lastFlickSpeed[e]=o.lastFlickOffset[e]/t:o.lastFlickSpeed[e]=0,Math.abs(o.lastFlickSpeed[e])<.1&&(o.lastFlickSpeed[e]=0),o.slowDownRatio[e]=.95,o.slowDownRatioReverse[e]=1-o.slowDownRatio[e],o.speedDecelerationRatio[e]=1},calculateOverBoundsAnimOffset:function(t,e){o.backAnimStarted[t]||(w[t]>d.min[t]?o.backAnimDestination[t]=d.min[t]:w[t]<d.max[t]&&(o.backAnimDestination[t]=d.max[t]),void 0!==o.backAnimDestination[t]&&(o.slowDownRatio[t]=.7,o.slowDownRatioReverse[t]=1-o.slowDownRatio[t],o.speedDecelerationRatioAbs[t]<.05)&&(o.lastFlickSpeed[t]=0,o.backAnimStarted[t]=!0,ct("bounceZoomPan"+t,w[t],o.backAnimDestination[t],e||300,g.easing.sine.out,function(e){w[t]=e,D()})))},calculateAnimOffset:function(e){o.backAnimStarted[e]||(o.speedDecelerationRatio[e]=o.speedDecelerationRatio[e]*(o.slowDownRatio[e]+o.slowDownRatioReverse[e]-o.slowDownRatioReverse[e]*o.timeDiff/10),o.speedDecelerationRatioAbs[e]=Math.abs(o.lastFlickSpeed[e]*o.speedDecelerationRatio[e]),o.distanceOffset[e]=o.lastFlickSpeed[e]*o.speedDecelerationRatio[e]*o.timeDiff,w[e]+=o.distanceOffset[e])},panAnimLoop:function(){_.zoomPan&&(_.zoomPan.raf=me(o.panAnimLoop),o.now=T(),o.timeDiff=o.now-o.lastNow,o.lastNow=o.now,o.calculateAnimOffset("x"),o.calculateAnimOffset("y"),D(),o.calculateOverBoundsAnimOffset("x"),o.calculateOverBoundsAnimOffset("y"),o.speedDecelerationRatioAbs.x<.05)&&o.speedDecelerationRatioAbs.y<.05&&(w.x=Math.round(w.x),w.y=Math.round(w.y),D(),lt("zoomPan"))}};return o},Wt=function(e){if(e.calculateSwipeSpeed("y"),d=x.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05)return e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0;st("zoomPan"),e.lastNow=T(),e.panAnimLoop()},Bt=function(e,t){h||(wt=m),"swipe"===e&&(e=O.x-ft.x,a=t.lastFlickDist.x<10,dt<e&&(a||20<t.lastFlickOffset.x)?o=-1:e<-dt&&(a||t.lastFlickOffset.x<-20)&&(o=1)),o&&((m+=o)<0?(m=y.loop?A()-1:0,i=!0):m>=A()&&(m=y.loop?0:A()-1,i=!0),i&&!y.loop||(C+=o,He-=o,n=!0));var n,o,i,e=b.x*He,a=Math.abs(e-k.x),r=n||e>k.x==0<t.lastFlickSpeed.x?(r=0<Math.abs(t.lastFlickSpeed.x)?a/Math.abs(t.lastFlickSpeed.x):333,r=Math.min(r,400),Math.max(r,250)):333;return wt===m&&(n=!1),h=!0,I("mainScrollAnimStart"),ct("mainScroll",k.x,e,r,g.easing.cubic.out,Je,function(){ut(),h=!1,wt=-1,!n&&wt===m||x.updateCurrItem(),I("mainScrollAnimComplete")}),n&&x.updateCurrItem(!0),n},Yt=function(e){return 1/Oe*e*te},Gt=function(){var e,t=f,n=it(),o=at(),i=(f<n?t=n:o<f&&(t=o),Ze);return Le&&!Ie&&!Pe&&f<n?x.close():(Le&&(e=function(e){E((1-i)*e+i)}),x.zoomTo(t,0,200,g.easing.cubic.out,e)),!0};N("Gestures",{publicMethods:{initGestures:function(){function e(e,t,n,o,i){le=e+t,se=e+n,ue=e+o,ce=i?e+i:""}(pe=l.pointerEvent)&&l.touch&&(l.touch=!1),pe?navigator.pointerEnabled?e("pointer","down","move","up","cancel"):e("MSPointer","Down","Move","Up","Cancel"):l.touch?(e("touch","start","move","end","cancel"),i=!0):e("mouse","down","move","up"),Q=se+" "+ue+" "+ce,ee=le,pe&&!i&&(i=1<navigator.maxTouchPoints||1<navigator.msMaxTouchPoints),x.likelyTouchDevice=i,o[le]=Y,o[se]=G,o[ue]=q,ce&&(o[ce]=o[ue]),l.touch&&(ee+=" mousedown",Q+=" mousemove mouseup",o.mousedown=o[le],o.mousemove=o[se],o.mouseup=o[ue]),i||(y.allowPanToNext=!1)}}});function qt(e){function t(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,n.onload=n.onerror=null,n=null}e.loading=!0,e.loaded=!1;var n=e.img=g.createEl("pswp__img","img");n.onload=t,n.onerror=function(){e.loadError=!0,t()},n.src=e.src}function Vt(e,t){return e.src&&e.loadError&&e.container&&(t&&(e.container.innerHTML=""),e.container.innerHTML=y.errorMsg.replace("%url%",e.src),1)}function Xt(){if(nn.length){for(var e,t=0;t<nn.length;t++)(e=nn[t]).holder.index===e.index&&sn(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);nn=[]}}var jt,$t,Jt,Qt,en,A,tn=function(a,e,r,t){function l(){lt("initialZoom"),r?(x.template.removeAttribute("style"),x.bg.removeAttribute("style")):(E(1),e&&(e.style.display="block"),g.addClass(p,"pswp--animated-in"),I("initialZoom"+(r?"OutEnd":"InEnd"))),t&&t(),Qt=!1}jt&&clearTimeout(jt),Jt=Qt=!0,a.initialLayout?(s=a.initialLayout,a.initialLayout=null):s=y.getThumbBoundsFn&&y.getThumbBoundsFn(m);var s,u,c,d=r?y.hideAnimationDuration:y.showAnimationDuration;d&&s&&void 0!==s.x?(u=j,c=!x.currItem.src||x.currItem.loadError||y.showHideOpacity,a.miniImg&&(a.miniImg.style.webkitBackfaceVisibility="hidden"),r||(f=s.w/a.w,w.x=s.x,w.y=s.y-ge,x[c?"template":"bg"].style.opacity=.001,D()),st("initialZoom"),r&&!u&&g.removeClass(p,"pswp--animated-in"),c&&(r?g[(u?"remove":"add")+"Class"](p,"pswp--animate_opacity"):setTimeout(function(){g.addClass(p,"pswp--animate_opacity")},30)),jt=setTimeout(function(){var t,n,o,i,e;I("initialZoom"+(r?"Out":"In")),r?(t=s.w/a.w,n={x:w.x,y:w.y},o=f,i=Ze,e=function(e){1===e?(f=t,w.x=s.x,w.y=s.y-ye):(f=(t-o)*e+o,w.x=(s.x-n.x)*e+n.x,w.y=(s.y-ye-n.y)*e+n.y),D(),c?p.style.opacity=1-e:E(i-e*i)},u?ct("initialZoom",0,1,d,g.easing.cubic.out,e,l):(e(1),jt=setTimeout(l,d+20))):(f=a.initialZoomLevel,S(w,a.initialPosition),D(),E(1),c?p.style.opacity=1:E(1),jt=setTimeout(l,d+20))},r?25:90)):(I("initialZoom"+(r?"Out":"In")),f=a.initialZoomLevel,S(w,a.initialPosition),D(),p.style.opacity=r?0:1,E(1),d?setTimeout(function(){l()},d):l())},R={},nn=[],on={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return $t.length}},an=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},rn=function(e,t,n){var o=e.bounds;o.center.x=Math.round((R.x-t)/2),o.center.y=Math.round((R.y-n)/2)+e.vGap.top,o.max.x=t>R.x?Math.round(R.x-t):o.center.x,o.max.y=n>R.y?Math.round(R.y-n)+e.vGap.top:o.center.y,o.min.x=t>R.x?0:o.center.x,o.min.y=n>R.y?e.vGap.top:o.center.y},ln=function(e,t,n){var o,i;return!e.src||e.loadError?(e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=an(),e.initialPosition=e.bounds.center,e.bounds):((o=!n)&&(e.vGap||(e.vGap={top:0,bottom:0}),I("parseVerticalMargin",e)),R.x=t.x,R.y=t.y-e.vGap.top-e.vGap.bottom,o&&(t=R.x/e.w,i=R.y/e.h,e.fitRatio=t<i?t:i,"orig"===(t=y.scaleMode)?n=1:"fit"===t&&(n=e.fitRatio),e.initialZoomLevel=n=1<n?1:n,e.bounds||(e.bounds=an())),n?(rn(e,e.w*n,e.h*n),o&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0)},sn=function(e,t,n,o,i,a){t.loadError||o&&(t.imageAppended=!0,un(t,o,t===x.currItem&&qe),n.appendChild(o),a)&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500)},un=function(e,t,n){var o;e.src&&(t=t||e.container.lastChild,o=n?e.w:Math.round(e.w*e.fitRatio),n=n?e.h:Math.round(e.h*e.fitRatio),e.placeholder&&!e.loaded&&(e.placeholder.style.width=o+"px",e.placeholder.style.height=n+"px"),t.style.width=o+"px",t.style.height=n+"px")};N("Controller",{publicMethods:{lazyLoadItem:function(e){e=U(e);var t=en(e);t&&(!t.loaded&&!t.loading||ae)&&(I("gettingData",e,t),t.src)&&qt(t)},initController:function(){g.extend(y,on,!0),x.items=$t=t,en=x.getItemAt,A=y.getNumItemsFn,y.loop,A()<3&&(y.loop=!1),a("beforeChange",function(e){for(var t=y.preload,n=null===e||0<=e,o=Math.min(t[0],A()),i=Math.min(t[1],A()),a=1;a<=(n?i:o);a++)x.lazyLoadItem(m+a);for(a=1;a<=(n?o:i);a++)x.lazyLoadItem(m-a)}),a("initialLayout",function(){x.currItem.initialLayout=y.getThumbBoundsFn&&y.getThumbBoundsFn(m)}),a("mainScrollAnimComplete",Xt),a("initialZoomInEnd",Xt),a("destroy",function(){for(var e,t=0;t<$t.length;t++)(e=$t[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);nn=null})},getItemAt:function(e){return 0<=e&&void 0!==$t[e]&&$t[e]},allowProgressiveImg:function(){return y.forceProgressiveLoading||!i||y.mouseUsed||1200<screen.width},setContent:function(t,n){y.loop&&(n=U(n));var e,o,i,a=x.getItemAt(t.index),a=(a&&(a.container=null),x.getItemAt(n));a?(I("gettingData",n,a),t.index=n,o=(t.item=a).container=g.createEl("pswp__zoom-wrap"),!a.src&&a.html&&(a.html.tagName?o.appendChild(a.html):o.innerHTML=a.html),Vt(a),ln(a,v),!a.src||a.loadError||a.loaded?a.src&&!a.loadError&&((e=g.createEl("pswp__img","img")).style.opacity=1,e.src=a.src,un(a,e),sn(n,a,o,e,!0)):(a.loadComplete=function(e){if(V){if(t&&t.index===n){if(Vt(e,!0))return e.loadComplete=e.img=null,ln(e,v),je(e),void(t.index===m&&x.updateCurrZoomItem());e.imageAppended?!Qt&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null):l.transform&&(h||Qt)?nn.push({item:e,baseDiv:o,img:e.img,index:n,holder:t,clearPlaceholder:!0}):sn(n,e,o,e.img,h||Qt,!0)}e.loadComplete=null,e.img=null,I("imageLoadComplete",n,e)}},g.features.transform&&(i="pswp__img pswp__img--placeholder",i+=a.msrc?"":" pswp__img--placeholder--blank",i=g.createEl(i,a.msrc?"img":""),a.msrc&&(i.src=a.msrc),un(a,i),o.appendChild(i),a.placeholder=i),a.loading||qt(a),x.allowProgressiveImg()&&(!Jt&&l.transform?nn.push({item:a,baseDiv:o,img:a.img,index:n,holder:t}):sn(n,a,o,a.img,!0,!0))),Jt||n!==m?je(a):(ke=o.style,tn(a,e||a.img)),t.el.innerHTML="",t.el.appendChild(o)):t.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});function cn(e,t,n){var o=document.createEvent("CustomEvent"),t={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};o.initCustomEvent("pswpTap",!0,!0,t),e.target.dispatchEvent(o)}function dn(){fn&&clearTimeout(fn),gn&&clearTimeout(gn)}function pn(){var e=Dn(),t={};if(!(e.length<5)){var n,o=e.split("&");for(a=0;a<o.length;a++)o[a]&&((n=o[a].split("=")).length<2||(t[n[0]]=n[1]));if(y.galleryPIDs){for(var i=t.pid,a=t.pid=0;a<$t.length;a++)if($t[a].pid===i){t.pid=a;break}}else t.pid=parseInt(t.pid,10)-1;t.pid<0&&(t.pid=0)}return t}var mn,L,fn,hn,gn,xn,yn,wn,n,vn,bn,Cn,Z,In,Tn={},En=(N("Tap",{publicMethods:{initTap:function(){a("firstTouchStart",x.onTapStart),a("touchRelease",x.onTapRelease),a("destroy",function(){Tn={},mn=null})},onTapStart:function(e){1<e.length&&(clearTimeout(mn),mn=null)},onTapRelease:function(e,t){var n,o,i;!t||_e||De||rt||(n=t,mn&&(clearTimeout(mn),mn=null,o=n,i=Tn,Math.abs(o.x-i.x)<Ne)&&Math.abs(o.y-i.y)<Ne?I("doubleTap",n):"mouse"===t.type?cn(e,t,"mouse"):"BUTTON"===e.target.tagName.toUpperCase()||g.hasClass(e.target,"pswp__single-tap")?cn(e,t):(S(Tn,n),mn=setTimeout(function(){cn(e,t),mn=null},300)))}}}),N("DesktopZoom",{publicMethods:{initDesktopZoom:function(){xe||(i?a("mouseUsed",function(){x.setupDesktopZoom()}):x.setupDesktopZoom(!0))},setupDesktopZoom:function(e){L={};var t="wheel mousewheel DOMMouseScroll";a("bindEvents",function(){g.bind(p,t,x.handleMouseWheel)}),a("unbindEvents",function(){L&&g.unbind(p,t,x.handleMouseWheel)}),x.mouseZoomedIn=!1;function n(){x.mouseZoomedIn&&(g.removeClass(p,"pswp--zoomed-in"),x.mouseZoomedIn=!1),f<1?g.addClass(p,"pswp--zoom-allowed"):g.removeClass(p,"pswp--zoom-allowed"),i()}var o,i=function(){o&&(g.removeClass(p,"pswp--dragging"),o=!1)};a("resize",n),a("afterChange",n),a("pointerDown",function(){x.mouseZoomedIn&&(o=!0,g.addClass(p,"pswp--dragging"))}),a("pointerUp",i),e||n()},handleMouseWheel:function(e){if(f<=x.currItem.fitRatio)return y.modal&&(!y.closeOnScroll||rt||s?e.preventDefault():de&&2<Math.abs(e.deltaY)&&(j=!0,x.close())),!0;if(e.stopPropagation(),L.x=0,"deltaX"in e)1===e.deltaMode?(L.x=18*e.deltaX,L.y=18*e.deltaY):(L.x=e.deltaX,L.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(L.x=-.16*e.wheelDeltaX),L.y=e.wheelDeltaY?-.16*e.wheelDeltaY:-.16*e.wheelDelta;else{if(!("detail"in e))return;L.y=e.detail}ot(f,!0);var t=w.x-L.x,n=w.y-L.y;(y.modal||t<=d.min.x&&t>=d.max.x&&n<=d.min.y&&n>=d.max.y)&&e.preventDefault(),x.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:v.x/2+We.x,y:v.y/2+We.y};var t=y.getDoubleTapZoom(!0,x.currItem),n=f===t;x.mouseZoomedIn=!n,x.zoomTo(n?x.currItem.initialZoomLevel:t,e,333),g[(n?"remove":"add")+"Class"](p,"pswp--zoomed-in")}}}),{history:!0,galleryUID:1}),Dn=function(){return Z.hash.substring(1)},Sn=function(){var e,t;gn&&clearTimeout(gn),rt||s?gn=setTimeout(Sn,500):(xn?clearTimeout(hn):xn=!0,t=m+1,(e=en(m)).hasOwnProperty("pid")&&(t=e.pid),e=n+"&gid="+y.galleryUID+"&pid="+t,vn||-1===Z.hash.indexOf(e)&&(Cn=!0),t=Z.href.split("#")[0]+"#"+e,In?"#"+e!==window.location.hash&&history[vn?"replaceState":"pushState"]("",document.title,t):vn?Z.replace(t):Z.hash=e,vn=!0,hn=setTimeout(function(){xn=!1},60))};N("History",{publicMethods:{initHistory:function(){var e,t;g.extend(y,En,!0),y.history&&(Z=window.location,vn=bn=Cn=!1,n=Dn(),In="pushState"in history,-1<n.indexOf("gid=")&&(n=(n=n.split("&gid=")[0]).split("?gid=")[0]),a("afterChange",x.updateURL),a("unbindEvents",function(){g.unbind(window,"hashchange",x.onHashChange)}),e=function(){wn=!0,bn||(Cn?history.back():n?Z.hash=n:In?history.pushState("",document.title,Z.pathname+Z.search):Z.hash=""),dn()},a("unbindEvents",function(){j&&e()}),a("destroy",function(){wn||e()}),a("firstUpdate",function(){m=pn().pid}),-1<(t=n.indexOf("pid="))&&"&"===(n=n.substring(0,t)).slice(-1)&&(n=n.slice(0,-1)),setTimeout(function(){V&&g.bind(window,"hashchange",x.onHashChange)},40))},onHashChange:function(){Dn()===n?(bn=!0,x.close()):xn||(yn=!0,x.goTo(pn().pid),yn=!1)},updateURL:function(){dn(),yn||(vn?fn=setTimeout(Sn,800):Sn())}}}),g.extend(x,z)}}),((e,t)=>{"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()})(this,function(){return function(o,l){function e(e){if(E)return!0;e=e||window.event,T.timeToIdle&&T.mouseUsed&&!y&&r();for(var t,n,o=(e.target||e.srcElement).getAttribute("class")||"",i=0;i<L.length;i++)(t=L[i]).onTap&&-1<o.indexOf("pswp__"+t.name)&&(t.onTap(),n=!0);n&&(e.stopPropagation&&e.stopPropagation(),E=!0,e=l.features.isOldAndroid?600:30,setTimeout(function(){E=!1},e))}function n(){var e=1===T.getNumItemsFn();e!==I&&(k(d,"ui--one-slide",e),I=e)}function t(){k(g,"share-modal--hidden",O)}function i(){for(var e,t,n,o,i="",a=0;a<T.shareButtons.length;a++)e=T.shareButtons[a],t=T.getImageURLForShare(e),n=T.getPageURLForShare(e),o=T.getTextForShare(e),i+='<a href="'+e.url.replace("{{url}}",encodeURIComponent(n)).replace("{{image_url}}",encodeURIComponent(t)).replace("{{raw_image_url}}",t).replace("{{text}}",encodeURIComponent(o))+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",T.parseShareButtonOut&&(i=T.parseShareButtonOut(e,i));g.children[0].innerHTML=i,g.children[0].onclick=N}function a(e){for(var t=0;t<T.closeElClasses.length;t++)if(l.hasClass(e,"pswp__"+T.closeElClasses[t]))return!0}function r(){clearTimeout(S),R=0,y&&_.setIdle(!1)}function s(e){(e=(e=e||window.event).relatedTarget||e.toElement)&&"HTML"!==e.nodeName||(clearTimeout(S),S=setTimeout(function(){_.setIdle(!0)},T.timeToIdleOutside))}function u(e){b!==e&&(k(v,"preloader--active",!e),b=e)}function Z(e){var t,n=e.vGap;!o.likelyTouchDevice||T.mouseUsed||screen.width>T.fitControlsWidth?(t=T.barsSize,T.captionEl&&"auto"===t.bottom?(m||((m=l.createEl("pswp__caption pswp__caption--fake")).appendChild(l.createEl("pswp__caption__center")),d.insertBefore(m,p),l.addClass(d,"pswp__ui--fit")),T.addCaptionHTMLFn(e,m,!0)?(e=m.clientHeight,n.bottom=parseInt(e,10)||44):n.bottom=t.top):n.bottom="auto"===t.bottom?0:t.bottom,n.top=t.top):n.top=n.bottom=0}function P(){function e(e){if(e)for(var t=e.length,n=0;n<t;n++){i=e[n],a=i.className;for(var o=0;o<L.length;o++)r=L[o],-1<a.indexOf("pswp__"+r.name)&&(T[r.option]?(l.removeClass(i,"pswp__element--disabled"),r.onInit&&r.onInit(i)):l.addClass(i,"pswp__element--disabled"))}}e(d.children);var i,a,r,t=l.getChildByClass(d,"pswp__top-bar");t&&e(t.children)}var c,d,p,m,f,h,g,x,y,w,v,b,C,I,T,E,D,S,_=this,M=!1,F=!0,O=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://x.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return o.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return o.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},k=function(e,t,n){l[(n?"add":"remove")+"Class"](e,"pswp__"+t)},A=function(){return(O=!O)?(l.removeClass(g,"pswp__share-modal--fade-in"),setTimeout(function(){O&&t()},300)):(t(),setTimeout(function(){O||l.addClass(g,"pswp__share-modal--fade-in")},30)),O||i(),!1},N=function(e){var t=(e=e||window.event).target||e.srcElement;if(o.shout("shareLinkClick",e,t),t.href){if(t.hasAttribute("download"))return!0;window.open(t.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),O||A()}return!1},R=0,L=[{name:"caption",option:"captionEl",onInit:function(e){p=e}},{name:"share-modal",option:"shareEl",onInit:function(e){g=e},onTap:function(){A()}},{name:"button--share",option:"shareEl",onInit:function(e){h=e},onTap:function(){A()}},{name:"button--zoom",option:"zoomEl",onTap:o.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){f=e}},{name:"button--close",option:"closeEl",onTap:o.close},{name:"button--arrow--left",option:"arrowEl",onTap:o.prev},{name:"button--arrow--right",option:"arrowEl",onTap:o.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){c.isFullscreen()?c.exit():c.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){v=e}}];_.init=function(){var t;l.extend(o.options,z,!0),T=o.options,d=l.getChildByClass(o.scrollWrap,"pswp__ui"),(w=o.listen)("onVerticalDrag",function(e){F&&e<.95?_.hideControls():!F&&.95<=e&&_.showControls()}),w("onPinchClose",function(e){F&&e<.9?(_.hideControls(),t=!0):t&&!F&&.9<e&&_.showControls()}),w("zoomGestureEnded",function(){(t=!1)&&!F&&_.showControls()}),w("beforeChange",_.update),w("doubleTap",function(e){var t=o.currItem.initialZoomLevel;o.getZoomLevel()!==t?o.zoomTo(t,e,333):o.zoomTo(T.getDoubleTapZoom(!1,o.currItem),e,333)}),w("preventDragEvent",function(e,t,n){var o=e.target||e.srcElement;o&&o.getAttribute("class")&&-1<e.type.indexOf("mouse")&&(0<o.getAttribute("class").indexOf("__caption")||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)}),w("bindEvents",function(){l.bind(d,"pswpTap click",e),l.bind(o.scrollWrap,"pswpTap",_.onGlobalTap),o.likelyTouchDevice||l.bind(o.scrollWrap,"mouseover",_.onMouseOver)}),w("unbindEvents",function(){O||A(),D&&clearInterval(D),l.unbind(document,"mouseout",s),l.unbind(document,"mousemove",r),l.unbind(d,"pswpTap click",e),l.unbind(o.scrollWrap,"pswpTap",_.onGlobalTap),l.unbind(o.scrollWrap,"mouseover",_.onMouseOver),c&&(l.unbind(document,c.eventK,_.updateFullscreen),c.isFullscreen()&&(T.hideAnimationDuration=0,c.exit()),c=null)}),w("destroy",function(){T.captionEl&&(m&&d.removeChild(m),l.removeClass(p,"pswp__caption--empty")),g&&(g.children[0].onclick=null),l.removeClass(d,"pswp__ui--over-close"),l.addClass(d,"pswp__ui--hidden"),_.setIdle(!1)}),T.showAnimationDuration||l.removeClass(d,"pswp__ui--hidden"),w("initialZoomIn",function(){T.showAnimationDuration&&l.removeClass(d,"pswp__ui--hidden")}),w("initialZoomOut",function(){l.addClass(d,"pswp__ui--hidden")}),w("parseVerticalMargin",Z),P(),T.shareEl&&h&&g&&(O=!0),n(),T.timeToIdle&&w("mouseUsed",function(){l.bind(document,"mousemove",r),l.bind(document,"mouseout",s),D=setInterval(function(){2===++R&&_.setIdle(!0)},T.timeToIdle/2)}),T.fullscreenEl&&!l.features.isOldAndroid&&((c=c||_.getFullscreenAPI())?(l.bind(document,c.eventK,_.updateFullscreen),_.updateFullscreen(),l.addClass(o.template,"pswp--supports-fs")):l.removeClass(o.template,"pswp--supports-fs")),T.preloaderEl&&(u(!0),w("beforeChange",function(){clearTimeout(C),C=setTimeout(function(){o.currItem&&o.currItem.loading?o.allowProgressiveImg()&&(!o.currItem.img||o.currItem.img.naturalWidth)||u(!1):u(!0)},T.loadingIndicatorDelay)}),w("imageLoadComplete",function(e,t){o.currItem===t&&u(!0)}))},_.setIdle=function(e){k(d,"ui--idle",y=e)},_.update=function(){M=!(!F||!o.currItem||(_.updateIndexIndicator(),T.captionEl&&(T.addCaptionHTMLFn(o.currItem,p),k(p,"caption--empty",!o.currItem.title)),0)),O||A(),n()},_.updateFullscreen=function(e){e&&setTimeout(function(){o.setScrollOffset(0,l.getScrollY())},50),l[(c.isFullscreen()?"add":"remove")+"Class"](o.template,"pswp--fs")},_.updateIndexIndicator=function(){T.counterEl&&(f.innerHTML=o.getCurrentIndex()+1+T.indexIndicatorSep+T.getNumItemsFn())},_.onGlobalTap=function(e){var t=(e=e||window.event).target||e.srcElement;E||(e.detail&&"mouse"===e.detail.pointerType?a(t)?o.close():l.hasClass(t,"pswp__img")&&(1===o.getZoomLevel()&&o.getZoomLevel()<=o.currItem.fitRatio?T.clickToCloseNonZoomable&&o.close():o.toggleDesktopZoom(e.detail.releasePoint)):(T.tapToToggleControls&&(F?_.hideControls():_.showControls()),T.tapToClose&&(l.hasClass(t,"pswp__img")||a(t))&&o.close()))},_.onMouseOver=function(e){e=(e=e||window.event).target||e.srcElement;k(d,"ui--over-close",a(e))},_.hideControls=function(){l.addClass(d,"pswp__ui--hidden"),F=!1},_.showControls=function(){F=!0,M||_.update(),l.removeClass(d,"pswp__ui--hidden")},_.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},_.getFullscreenAPI=function(){var e,t=document.documentElement,n="fullscreenchange";return t.requestFullscreen?e={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:n}:t.mozRequestFullScreen?e={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+n}:t.webkitRequestFullscreen?e={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+n}:t.msRequestFullscreen&&(e={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),e&&(e.enter=function(){if(x=T.closeOnScroll,T.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK)return o.template[this.enterK]();o.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},e.exit=function(){return T.closeOnScroll=x,document[this.exitK]()},e.isFullscreen=function(){return document[this.elementK]}),e}}});