/*! photoswipe - v4.1.3 - 2019-01-08 * http://photoswipe.com * copyright (c) 2019 dmitry semenov; */ !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.photoswipe=t()}(this,function(){"use strict";return function(p,i,e,t){var f={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"eventlistener";t=t.split(" ");for(var a=0;a=gt()-1&&i<0)&&(e=wt.x+i*y.mainscrollendfriction)}wt.x=e,nt(e,w)}function u(e,t){var n=bt[e]-xe[e];return ye[e]+he[e]+n-t/q*n}function g(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)}function m(e){e.x=math.round(e.x),e.y=math.round(e.y)}function w(e,t){var n=$t(h.curritem,be,e);return t&&(re=n),n}function b(e){return e||(e=h.curritem),e.initialzoomlevel}function i(e){return e||(e=h.curritem),0t.min[e]?(n[e]=t.min[e],!0):n[e]re.min[e]||rre.min[e]&&(n=y.panendfriction,re.min[e],i=re.min[e]-ye[e]),(i<=0||u<0)&&1ft.x&&(a=ft.x)):re.min.x!==re.max.x&&(o=r)):(rh.curritem.fitratio&&(we[e]+=t[e]*n)}function l(e){if(!("mousedown"===e.type&&0h.curritem.fitratio&&rt(ge):ft())}}var n,u,h,y,w,b,g,x,v,k,q,$,j,j,q,ee,te,ne,ie,oe,ae,re,le,se,ue,ce,de,me,pe,fe,he,ye,xe,ve,ge,we,be,ie,ce,de,te,me,se,ae,ee,oe,ke,re,pe,ze,fe,le,ze,_e,ne,ue,he={x:0,y:0},ye={x:0,y:0},we={x:0,y:0},be={},ge=0,xe={},ve={x:0,y:0},ke=0,qe=!0,$e=[],je={},je=!1,qe={},et=function(e){pe&&(e&&(k>h.curritem.fitratio?je||(jt(h.curritem,!1,!0),je=!0):je&&(jt(h.curritem),je=!1)),o(pe,we.x,we.y,k))},tt=function(e){e.container&&o(e.container.style,e.initialposition.x,e.initialposition.y,e.initialzoomlevel,e)},nt=function(e,t){t[re]=$+e+"px, 0px"+j},it=null,ot=function(){it&&(f.unbind(document,"mousemove",ot),f.addclass(p,"pswp--has_mouse"),y.mouseused=!0,x("mouseused")),it=settimeout(function(){it=null},100)},at={},rt=0,lt={shout:x,listen:a,viewportsize:be,options:y,ismainscrollanimating:function(){return ze},getzoomlevel:function(){return k},getcurrentindex:function(){return y},isdragging:function(){return ce},iszooming:function(){return oe},setscrolloffset:function(e,t){xe.x=e,fe=xe.y=t,x("updatescrolloffset",xe)},applyzoompan:function(e,t,n,i){we.x=t,we.y=n,k=e,et(i)},init:function(){if(!n&&!u){var e;h.framework=f,h.template=p,h.bg=f.getchildbyclass(p,"pswp__bg"),de=p.classname,n=!0,he=f.detectfeatures(),ue=he.raf,ce=he.caf,re=he.transform,pe=he.oldie,h.scrollwrap=f.getchildbyclass(p,"pswp__scroll-wrap"),h.container=f.getchildbyclass(h.scrollwrap,"pswp__container"),w=h.container.style,h.itemholders=ee=[{el:h.container.children[0],wrap:0,index:-1},{el:h.container.children[1],wrap:0,index:-1},{el:h.container.children[2],wrap:0,index:-1}],ee[0].el.style.display=ee[2].el.style.display="none",function(){if(re){var e=he.perspective&&!se;return $="translate"+(e?"3d(":"("),j=he.perspective?", 0px)":")"}re="left",f.addclass(p,"pswp--ie"),nt=function(e,t){t.left=e+"px"},tt=function(e){var t=1=gt())&&(y=0),h.curritem=bt(y),(he.isoldiosphone||he.isoldandroid)&&(qe=!1),p.setattribute("aria-hidden","false"),y.modal&&(qe?p.style.position="fixed":(p.style.position="absolute",p.style.top=f.getscrolly()+"px")),fe===undefined&&(x("initiallayout"),fe=me=f.getscrolly());var n="pswp--open ";for(y.mainclass&&(n+=y.mainclass+" "),y.showhideopacity&&(n+="pswp--animate_opacity "),n+=se?"pswp--touch":"pswp--notouch",n+=he.animationname?" pswp--css_animation":"",n+=he.svg?" pswp--svg":"",f.addclass(p,n),h.updatesize(),b=-1,ke=null,e=0;e<3;e++)nt((e+b)*ve.x,ee[e].el.style);pe||f.bind(h.scrollwrap,x,h),a("initialzoominend",function(){h.setcontent(ee[0],y-1),h.setcontent(ee[2],y+1),ee[0].el.style.display=ee[2].el.style.display="block",y.focus&&p.focus(),f.bind(document,"keydown",h),he.transform&&f.bind(h.scrollwrap,"click",h),y.mouseused||f.bind(document,"mousemove",ot),f.bind(window,"resize scroll orientationchange",h),x("bindevents")}),h.setcontent(ee[1],y),h.updatecurritem(),x("afterinit"),qe||(j=setinterval(function(){rt||ce||oe||k!==h.curritem.initialzoomlevel||h.updatesize()},1e3)),f.addclass(p,"pswp--visible")}},close:function(){n&&(u=!(n=!1),x("close"),f.unbind(window,"resize scroll orientationchange",h),f.unbind(window,"scroll",v.scroll),f.unbind(document,"keydown",h),f.unbind(document,"mousemove",ot),he.transform&&f.unbind(h.scrollwrap,"click",h),ce&&f.unbind(window,g,h),cleartimeout(ye),x("unbindevents"),xt(h.curritem,null,!0,h.destroy))},destroy:function(){x("destroy"),ut&&cleartimeout(ut),p.setattribute("aria-hidden","true"),p.classname=de,j&&clearinterval(j),f.unbind(h.scrollwrap,x,h),f.unbind(window,"scroll",h),ct(),s(),qe=null},panto:function(e,t,n){n||(e>re.min.x?e=re.min.x:ere.min.y?t=re.min.y:th.curritem.initialzoomlevel+h.curritem.initialzoomlevel/15&&(ne=!0);var i=1,o=b(),a=i();if(nre.min[t]?i.backanimdestination[t]=re.min[t]:we[t]=gt()&&(y=y.loop?0:gt()-1,o=!0),o&&!y.loop||(ke+=i,ge-=i,n=!0));var l,s=ve.x*ge,u=math.abs(s-wt.x);return l=n||s>wt.x==0the image could not be loaded.',forceprogressiveloading:!1,preload:[1,1],getnumitemsfn:function(){return ht.length}},$t=function(e,t,n){if(!e.src||e.loaderror)return e.w=e.h=0,e.initialzoomlevel=e.fitratio=1,e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}},e.initialposition=e.bounds.center,e.bounds;var i=!n;if(i&&(e.vgap||(e.vgap={top:0,bottom:0}),x("parseverticalmargin",e)),vt.x=t.x,vt.y=t.y-e.vgap.top-e.vgap.bottom,i){var o=vt.x/e.w,a=vt.y/e.h;e.fitratio=ovt.x?math.round(vt.x-t):i.center.x,i.max.y=n>vt.y?math.round(vt.y-n)+e.vgap.top:i.center.y,i.min.x=t>vt.x?0:i.center.x,i.min.y=n>vt.y?e.vgap.top:i.center.y}(e,e.w*n,e.h*n),i&&n===e.initialzoomlevel&&(e.initialposition=e.bounds.center),e.bounds):void 0},jt=function(e,t,n){if(e.src){t||(t=e.container.lastchild);var i=n?e.w:math.round(e.w*e.fitratio),o=n?e.h:math.round(e.h*e.fitratio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=o+"px"),t.style.width=i+"px",t.style.height=o+"px"}};n("controller",{publicmethods:{lazyloaditem:function(e){e=s(e);var t=bt(e);t&&(!t.loaded&&!t.loading||q)&&(x("gettingdata",e,t),t.src&&zt(t))},initcontroller:function(){f.extend(y,qt,!0),h.items=ht=e,bt=h.getitemat,gt=y.getnumitemsfn,y.loop,gt()<3&&(y.loop=!1),a("beforechange",function(e){var t,n=y.preload,i=null===e||0<=e,o=math.min(n[0],gt()),a=math.min(n[1],gt());for(t=1;t<=(i?a:o);t++)h.lazyloaditem(y+t);for(t=1;t<=(i?o:a);t++)h.lazyloaditem(y-t)}),a("initiallayout",function(){h.curritem.initiallayout=y.getthumbboundsfn&&y.getthumbboundsfn(y)}),a("mainscrollanimcomplete",nt),a("initialzoominend",nt),a("destroy",function(){for(var e,t=0;t=re.max.x&&n<=re.min.y&&n>=re.max.y)&&e.preventdefault(),h.panto(t,n)},toggledesktopzoom:function(e){e=e||{x:be.x/2+xe.x,y:be.y/2+xe.y};var t=y.getdoubletapzoom(!0,h.curritem),n=k===t;h.mousezoomedin=!n,h.zoomto(n?h.curritem.initialzoomlevel:t,e,333),f[(n?"remove":"add")+"class"](p,"pswp--zoomed-in")}}});function nn(){return yn.hash.substring(1)}function on(){rn&&cleartimeout(rn),sn&&cleartimeout(sn)}function an(){var e=nn(),t={};if(e.length<5)return t;var n,i=e.split("&");for(n=0;n