Uname:Linux webm017.cluster129.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 51.91.236.255  /  Your IP : 216.73.217.120
Web Server : Apache
System : Linux webm017.cluster129.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : laureet ( 1012854)
PHP Version : 8.0.30
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/laureet/www/wp-content/plugins/rhye-core/modules/pswp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/laureet/www/wp-content/plugins/rhye-core/modules/pswp/pswp.min.js
/*! 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(e,t,n,o){var i={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){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){i.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){i.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(i.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)if(t.hasOwnProperty(o)){if(n&&e.hasOwnProperty(o))continue;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(i.features)return i.features;var e=i.createEl().style,t="",n={};if(n.oldIE=document.all&&!document.addEventListener,n.touch="ontouchstart"in window,window.requestAnimationFrame&&(n.raf=window.requestAnimationFrame,n.caf=window.cancelAnimationFrame),n.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!n.pointerEvent){var o=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);a&&a.length>0&&(a=parseInt(a[1],10))>=1&&a<8&&(n.isOldIOSPhone=!0)}var r=o.match(/Android\s([0-9\.]*)/),l=r?r[1]:0;(l=parseFloat(l))>=1&&(l<4.4&&(n.isOldAndroid=!0),n.androidVersion=l),n.isMobileOpera=/opera mini|opera mobi/i.test(o)}for(var s,c,u=["transform","perspective","animationName"],p=["","webkit","Moz","ms","O"],d=0;d<4;d++){t=p[d];for(var m=0;m<3;m++)s=u[m],c=t+(t?s.charAt(0).toUpperCase()+s.slice(1):s),!n[s]&&c in e&&(n[s]=c);t&&!n.raf&&(t=t.toLowerCase(),n.raf=window[t+"RequestAnimationFrame"],n.raf&&(n.caf=window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"]))}if(!n.raf){var f=0;n.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-f)),o=window.setTimeout((function(){e(t+n)}),n);return f=t+n,o},n.caf=function(e){clearTimeout(e)}}return n.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,i.features=n,n}};i.detectFeatures(),i.features.oldIE&&(i.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)});var a=this,r={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"};i.extend(r,o);var l,s,c,u,p,d,m,f,h,g,w,v,y,x,b,C,I,E,_,T,D,S,k,M,A,F,O,P,R,L,Z,z,U,$,N,K,H,W,B,G,Y,q,j,V,X,Q,J,ee,te,ne,oe,ie,ae,re,le,se,ce={x:0,y:0},ue={x:0,y:0},pe={x:0,y:0},de={},me=0,fe={},he={x:0,y:0},ge=0,we=!0,ve=[],ye={},xe=!1,be=function(e,t){i.extend(a,t.publicMethods),ve.push(e)},Ce=function(e){var t=Nt();return e>t-1?e-t:e<0?t+e:e},Ie={},Ee=function(e,t){return Ie[e]||(Ie[e]=[]),Ie[e].push(t)},_e=function(e){var t=Ie[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;o<t.length;o++)t[o].apply(a,n)}},Te=function(){return(new Date).getTime()},De=function(e){re=e,a.bg.style.opacity=e*r.bgOpacity},Se=function(e,t,n,o,i){(!xe||i&&i!==a.currItem)&&(o/=i?i.fitRatio:a.currItem.fitRatio),e[S]=v+t+"px, "+n+"px"+y+" scale("+o+")"},ke=function(e){te&&(e&&(g>a.currItem.fitRatio?xe||(Vt(a.currItem,!1,!0),xe=!0):xe&&(Vt(a.currItem),xe=!1)),Se(te,pe.x,pe.y,g))},Me=function(e){e.container&&Se(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Ae=function(e,t){t[S]=v+e+"px, 0px"+y},Fe=function(e,t){if(!r.loop&&t){var n=u+(he.x*me-e)/he.x,o=Math.round(e-ut.x);(n<0&&o>0||n>=Nt()-1&&o<0)&&(e=ut.x+o*r.mainScrollEndFriction)}ut.x=e,Ae(e,p)},Oe=function(e,t){var n=pt[e]-fe[e];return ue[e]+ce[e]+n-n*(t/w)},Pe=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Re=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Le=null,Ze=function(){Le&&(i.unbind(document,"mousemove",Ze),i.addClass(e,"pswp--has_mouse"),r.mouseUsed=!0,_e("mouseUsed")),Le=setTimeout((function(){Le=null}),100)},ze=function(e,t){var n=Gt(a.currItem,de,e);return t&&(ee=n),n},Ue=function(e){return e||(e=a.currItem),e.initialZoomLevel},$e=function(e){return e||(e=a.currItem),e.w>0?r.maxSpreadZoom:1},Ne=function(e,t,n,o){return o===a.currItem.initialZoomLevel?(n[e]=a.currItem.initialPosition[e],!0):(n[e]=Oe(e,o),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))},Ke=function(e){var t="";r.escKey&&27===e.keyCode?t="close":r.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,a[t]()))},He=function(e){e&&(q||Y||ne||H)&&(e.preventDefault(),e.stopPropagation())},We=function(){a.setScrollOffset(0,i.getScrollY())},Be={},Ge=0,Ye=function(e){Be[e]&&(Be[e].raf&&F(Be[e].raf),Ge--,delete Be[e])},qe=function(e){Be[e]&&Ye(e),Be[e]||(Ge++,Be[e]={})},je=function(){for(var e in Be)Be.hasOwnProperty(e)&&Ye(e)},Ve=function(e,t,n,o,i,a,r){var l,s=Te();qe(e);var c=function(){if(Be[e]){if((l=Te()-s)>=o)return Ye(e),a(n),void(r&&r());a((n-t)*i(l/o)+t),Be[e].raf=A(c)}};c()},Xe={shout:_e,listen:Ee,viewportSize:de,options:r,isMainScrollAnimating:function(){return ne},getZoomLevel:function(){return g},getCurrentIndex:function(){return u},isDragging:function(){return B},isZooming:function(){return Q},setScrollOffset:function(e,t){fe.x=e,L=fe.y=t,_e("updateScrollOffset",fe)},applyZoomPan:function(e,t,n,o){pe.x=t,pe.y=n,g=e,ke(o)},init:function(){if(!l&&!s){var n;a.framework=i,a.template=e,a.bg=i.getChildByClass(e,"pswp__bg"),O=e.className,l=!0,Z=i.detectFeatures(),A=Z.raf,F=Z.caf,S=Z.transform,R=Z.oldIE,a.scrollWrap=i.getChildByClass(e,"pswp__scroll-wrap"),a.container=i.getChildByClass(a.scrollWrap,"pswp__container"),p=a.container.style,a.itemHolders=C=[{el:a.container.children[0],wrap:0,index:-1},{el:a.container.children[1],wrap:0,index:-1},{el:a.container.children[2],wrap:0,index:-1}],C[0].el.style.display=C[2].el.style.display="none",function(){if(S){var t=Z.perspective&&!M;return v="translate"+(t?"3d(":"("),void(y=Z.perspective?", 0px)":")")}S="left",i.addClass(e,"pswp--ie"),Ae=function(e,t){t.left=e+"px"},Me=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,o=t*e.w,i=t*e.h;n.width=o+"px",n.height=i+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},ke=function(){if(te){var e=te,t=a.currItem,n=t.fitRatio>1?1:t.fitRatio,o=n*t.w,i=n*t.h;e.width=o+"px",e.height=i+"px",e.left=pe.x+"px",e.top=pe.y+"px"}}}(),h={resize:a.updateSize,orientationchange:function(){clearTimeout(z),z=setTimeout((function(){de.x!==a.scrollWrap.clientWidth&&a.updateSize()}),500)},scroll:We,keydown:Ke,click:He};var o=Z.isOldIOSPhone||Z.isOldAndroid||Z.isMobileOpera;for(Z.animationName&&Z.transform&&!o||(r.showAnimationDuration=r.hideAnimationDuration=0),n=0;n<ve.length;n++)a["init"+ve[n]]();if(t)(a.ui=new t(a,i)).init();_e("firstUpdate"),u=u||r.index||0,(isNaN(u)||u<0||u>=Nt())&&(u=0),a.currItem=$t(u),(Z.isOldIOSPhone||Z.isOldAndroid)&&(we=!1),e.setAttribute("aria-hidden","false"),r.modal&&(we?e.style.position="fixed":(e.style.position="absolute",e.style.top=i.getScrollY()+"px")),void 0===L&&(_e("initialLayout"),L=P=i.getScrollY());var c="pswp--open ";for(r.mainClass&&(c+=r.mainClass+" "),r.showHideOpacity&&(c+="pswp--animate_opacity "),c+=M?"pswp--touch":"pswp--notouch",c+=Z.animationName?" pswp--css_animation":"",c+=Z.svg?" pswp--svg":"",i.addClass(e,c),a.updateSize(),d=-1,ge=null,n=0;n<3;n++)Ae((n+d)*he.x,C[n].el.style);R||i.bind(a.scrollWrap,f,a),Ee("initialZoomInEnd",(function(){a.setContent(C[0],u-1),a.setContent(C[2],u+1),C[0].el.style.display=C[2].el.style.display="block",r.focus&&e.focus(),i.bind(document,"keydown",a),Z.transform&&i.bind(a.scrollWrap,"click",a),r.mouseUsed||i.bind(document,"mousemove",Ze),i.bind(window,"resize scroll orientationchange",a),_e("bindEvents")})),a.setContent(C[1],u),a.updateCurrItem(),_e("afterInit"),we||(x=setInterval((function(){Ge||B||Q||g!==a.currItem.initialZoomLevel||a.updateSize()}),1e3)),i.addClass(e,"pswp--visible")}},close:function(){l&&(l=!1,s=!0,_e("close"),i.unbind(window,"resize scroll orientationchange",a),i.unbind(window,"scroll",h.scroll),i.unbind(document,"keydown",a),i.unbind(document,"mousemove",Ze),Z.transform&&i.unbind(a.scrollWrap,"click",a),B&&i.unbind(window,m,a),clearTimeout(z),_e("unbindEvents"),Kt(a.currItem,null,!0,a.destroy))},destroy:function(){_e("destroy"),Lt&&clearTimeout(Lt),e.setAttribute("aria-hidden","true"),e.className=O,x&&clearInterval(x),i.unbind(a.scrollWrap,f,a),i.unbind(window,"scroll",a),ft(),je(),Ie=null},panTo:function(e,t,n){n||(e>ee.min.x?e=ee.min.x:e<ee.max.x&&(e=ee.max.x),t>ee.min.y?t=ee.min.y:t<ee.max.y&&(t=ee.max.y)),pe.x=e,pe.y=t,ke()},handleEvent:function(e){e=e||window.event,h[e.type]&&h[e.type](e)},goTo:function(e){var t,n,o;ne||(lt=u),(u+=t=e==u+1?1:-1)<0?(u=r.loop?Nt()-1:0,o=!0):u>=Nt()&&(u=r.loop?0:Nt()-1,o=!0),o&&!r.loop||(ge+=t,me-=t,n=!0);var l=he.x*me;Math.abs(l-ut.x);return lt===u&&(n=!1),ne=!0,_e("mainScrollAnimStart"),Ve("mainScroll",ut.x,l,333,i.easing.cubic.out,Fe,(function(){je(),ne=!1,lt=-1,(n||lt!==u)&&a.updateCurrItem(),_e("mainScrollAnimComplete")})),n&&a.updateCurrItem(!0),n},next:function(){a.goTo(u+1)},prev:function(){a.goTo(u-1)},updateCurrZoomItem:function(e){if(e&&_e("beforeChange",0),C[1].el.children.length){var t=C[1].el.children[0];te=i.hasClass(t,"pswp__zoom-wrap")?t.style:null}else te=null;ee=a.currItem.bounds,w=g=a.currItem.initialZoomLevel,pe.x=ee.center.x,pe.y=ee.center.y,e&&_e("afterChange")},invalidateCurrItems:function(){b=!0;for(var e=0;e<3;e++)C[e].item&&(C[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==ge){var t,n=Math.abs(ge);if(!(e&&n<2)){a.currItem=$t(u),xe=!1,_e("beforeChange",ge),n>=3&&(d+=ge+(ge>0?-3:3),n=3);for(var o=0;o<n;o++)ge>0?(t=C.shift(),C[2]=t,d++,Ae((d+2)*he.x,t.el.style),a.setContent(t,u-n+o+1+1)):(t=C.pop(),C.unshift(t),d--,Ae(d*he.x,t.el.style),a.setContent(t,u+n-o-1-1));if(te&&1===Math.abs(ge)){var i=$t(I);i.initialZoomLevel!==g&&(Gt(i,de),Vt(i),Me(i))}ge=0,a.updateCurrZoomItem(),I=u,_e("afterChange")}}},updateSize:function(t){if(!we&&r.modal){var n=i.getScrollY();if(L!==n&&(e.style.top=n+"px",L=n),!t&&ye.x===window.innerWidth&&ye.y===window.innerHeight)return;ye.x=window.innerWidth,ye.y=window.innerHeight,e.style.height=ye.y+"px"}if(de.x=a.scrollWrap.clientWidth,de.y=a.scrollWrap.clientHeight,We(),he.x=de.x+Math.round(de.x*r.spacing),he.y=de.y,Fe(he.x*me),_e("beforeResize"),void 0!==d){for(var o,l,s,c=0;c<3;c++)o=C[c],Ae((c+d)*he.x,o.el.style),s=u+c-1,r.loop&&Nt()>2&&(s=Ce(s)),(l=$t(s))&&(b||l.needsUpdate||!l.bounds)?(a.cleanSlide(l),a.setContent(o,s),1===c&&(a.currItem=l,a.updateCurrZoomItem(!0)),l.needsUpdate=!1):-1===o.index&&s>=0&&a.setContent(o,s),l&&l.container&&(Gt(l,de),Vt(l),Me(l));b=!1}w=g=a.currItem.initialZoomLevel,(ee=a.currItem.bounds)&&(pe.x=ee.center.x,pe.y=ee.center.y,ke(!0)),_e("resize")},zoomTo:function(e,t,n,o,a){t&&(w=g,pt.x=Math.abs(t.x)-pe.x,pt.y=Math.abs(t.y)-pe.y,Pe(ue,pe));var r=ze(e,!1),l={};Ne("x",r,l,e),Ne("y",r,l,e);var s=g,c=pe.x,u=pe.y;Re(l);var p=function(t){1===t?(g=e,pe.x=l.x,pe.y=l.y):(g=(e-s)*t+s,pe.x=(l.x-c)*t+c,pe.y=(l.y-u)*t+u),a&&a(t),ke(1===t)};n?Ve("customZoomTo",0,1,n,o||i.easing.sine.inOut,p):p(1)}},Qe={},Je={},et={},tt={},nt={},ot=[],it={},at=[],rt={},lt=0,st={x:0,y:0},ct=0,ut={x:0,y:0},pt={x:0,y:0},dt={x:0,y:0},mt=function(e,t){return rt.x=Math.abs(e.x-t.x),rt.y=Math.abs(e.y-t.y),Math.sqrt(rt.x*rt.x+rt.y*rt.y)},ft=function(){j&&(F(j),j=null)},ht=function(){B&&(j=A(ht),kt())},gt=function(e,t){return!(!e||e===document)&&(!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:gt(e.parentNode,t)))},wt={},vt=function(e,t){return wt.prevent=!gt(e.target,r.isClickableElement),_e("preventDragEvent",e,t,wt),wt.prevent},yt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},xt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},bt=function(){var e=pe.y-a.currItem.initialPosition.y;return 1-Math.abs(e/(de.y/2))},Ct={},It={},Et=[],_t=function(e){for(;Et.length>0;)Et.pop();return k?(se=0,ot.forEach((function(e){0===se?Et[0]=e:1===se&&(Et[1]=e),se++}))):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Et[0]=yt(e.touches[0],Ct),e.touches.length>1&&(Et[1]=yt(e.touches[1],It))):(Ct.x=e.pageX,Ct.y=e.pageY,Ct.id="",Et[0]=Ct),Et},Tt=function(e,t){var n,o,i,l,s=pe[e]+t[e],c=t[e]>0,u=ut.x+t.x,p=ut.x-it.x;if(n=s>ee.min[e]||s<ee.max[e]?r.panEndFriction:1,s=pe[e]+t[e]*n,(r.allowPanToNext||g===a.currItem.initialZoomLevel)&&(te?"h"!==oe||"x"!==e||Y||(c?(s>ee.min[e]&&(n=r.panEndFriction,ee.min[e]-s,o=ee.min[e]-ue[e]),(o<=0||p<0)&&Nt()>1?(l=u,p<0&&u>it.x&&(l=it.x)):ee.min.x!==ee.max.x&&(i=s)):(s<ee.max[e]&&(n=r.panEndFriction,s-ee.max[e],o=ue[e]-ee.max[e]),(o<=0||p>0)&&Nt()>1?(l=u,p>0&&u<it.x&&(l=it.x)):ee.min.x!==ee.max.x&&(i=s))):l=u,"x"===e))return void 0!==l&&(Fe(l,!0),V=l!==it.x),ee.min.x!==ee.max.x&&(void 0!==i?pe.x=i:V||(pe.x+=t.x*n)),void 0!==l;ne||V||g>a.currItem.fitRatio&&(pe[e]+=t[e]*n)},Dt=function(e){if(!("mousedown"===e.type&&e.button>0))if(Ut)e.preventDefault();else if(!W||"mousedown"!==e.type){if(vt(e,!0)&&e.preventDefault(),_e("pointerDown"),k){var t=i.arraySearch(ot,e.pointerId,"id");t<0&&(t=ot.length),ot[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=_t(e),o=n.length;X=null,je(),B&&1!==o||(B=ie=!0,i.bind(window,m,a),K=le=ae=H=V=q=G=Y=!1,oe=null,_e("firstTouchStart",n),Pe(ue,pe),ce.x=ce.y=0,Pe(tt,n[0]),Pe(nt,tt),it.x=he.x*me,at=[{x:tt.x,y:tt.y}],$=U=Te(),ze(g,!0),ft(),ht()),!Q&&o>1&&!ne&&!V&&(w=g,Y=!1,Q=G=!0,ce.y=ce.x=0,Pe(ue,pe),Pe(Qe,n[0]),Pe(Je,n[1]),xt(Qe,Je,dt),pt.x=Math.abs(dt.x)-pe.x,pt.y=Math.abs(dt.y)-pe.y,J=mt(Qe,Je))}},St=function(e){if(e.preventDefault(),k){var t=i.arraySearch(ot,e.pointerId,"id");if(t>-1){var n=ot[t];n.x=e.pageX,n.y=e.pageY}}if(B){var o=_t(e);if(oe||q||Q)X=o;else if(ut.x!==he.x*me)oe="h";else{var a=Math.abs(o[0].x-tt.x)-Math.abs(o[0].y-tt.y);Math.abs(a)>=10&&(oe=a>0?"h":"v",X=o)}}},kt=function(){if(X){var e=X.length;if(0!==e)if(Pe(Qe,X[0]),et.x=Qe.x-tt.x,et.y=Qe.y-tt.y,Q&&e>1){if(tt.x=Qe.x,tt.y=Qe.y,!et.x&&!et.y&&function(e,t){return e.x===t.x&&e.y===t.y}(X[1],Je))return;Pe(Je,X[1]),Y||(Y=!0,_e("zoomGestureStarted"));var t=mt(Qe,Je),n=Pt(t);n>a.currItem.initialZoomLevel+a.currItem.initialZoomLevel/15&&(le=!0);var o=1,i=Ue(),l=$e();if(n<i)if(r.pinchToClose&&!le&&w<=a.currItem.initialZoomLevel){var s=1-(i-n)/(i/1.2);De(s),_e("onPinchClose",s),ae=!0}else(o=(i-n)/i)>1&&(o=1),n=i-o*(i/3);else n>l&&((o=(n-l)/(6*i))>1&&(o=1),n=l+o*i);o<0&&(o=0),t,xt(Qe,Je,st),ce.x+=st.x-dt.x,ce.y+=st.y-dt.y,Pe(dt,st),pe.x=Oe("x",n),pe.y=Oe("y",n),K=n>g,g=n,ke()}else{if(!oe)return;if(ie&&(ie=!1,Math.abs(et.x)>=10&&(et.x-=X[0].x-nt.x),Math.abs(et.y)>=10&&(et.y-=X[0].y-nt.y)),tt.x=Qe.x,tt.y=Qe.y,0===et.x&&0===et.y)return;if("v"===oe&&r.closeOnVerticalDrag&&"fit"===r.scaleMode&&g===a.currItem.initialZoomLevel){ce.y+=et.y,pe.y+=et.y;var c=bt();return H=!0,_e("onVerticalDrag",c),De(c),void ke()}!function(e,t,n){if(e-$>50){var o=at.length>2?at.shift():{};o.x=t,o.y=n,at.push(o),$=e}}(Te(),Qe.x,Qe.y),q=!0,ee=a.currItem.bounds,Tt("x",et)||(Tt("y",et),Re(pe),ke())}}},Mt=function(e){if(Z.isOldAndroid){if(W&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(W),W=setTimeout((function(){W=0}),600))}var t;if(_e("pointerUp"),vt(e,!1)&&e.preventDefault(),k){var n=i.arraySearch(ot,e.pointerId,"id");if(n>-1)if(t=ot.splice(n,1)[0],navigator.msPointerEnabled){t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type||(t.type=e.pointerType||"mouse")}else t.type=e.pointerType||"mouse"}var o,l=_t(e),s=l.length;if("mouseup"===e.type&&(s=0),2===s)return X=null,!0;1===s&&Pe(nt,l[0]),0!==s||oe||ne||(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"})),_e("touchRelease",e,t));var c=-1;if(0===s&&(B=!1,i.unbind(window,m,a),ft(),Q?c=0:-1!==ct&&(c=Te()-ct)),ct=1===s?Te():-1,o=-1!==c&&c<150?"zoom":"swipe",Q&&s<2&&(Q=!1,1===s&&(o="zoomPointerUp"),_e("zoomGestureEnded")),X=null,q||Y||ne||H)if(je(),N||(N=At()),N.calculateSwipeSpeed("x"),H){if(bt()<r.verticalDragRange)a.close();else{var u=pe.y,p=re;Ve("verticalDrag",0,1,300,i.easing.cubic.out,(function(e){pe.y=(a.currItem.initialPosition.y-u)*e+u,De((1-p)*e+p),ke()})),_e("onVerticalDrag",1)}}else{if((V||ne)&&0===s){if(Ot(o,N))return;o="zoomPointerUp"}ne||("swipe"===o?!V&&g>a.currItem.fitRatio&&Ft(N):Rt())}},At=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(o){at.length>1?(e=Te()-$+50,t=at[at.length-2][o]):(e=Te()-U,t=nt[o]),n.lastFlickOffset[o]=tt[o]-t,n.lastFlickDist[o]=Math.abs(n.lastFlickOffset[o]),n.lastFlickDist[o]>20?n.lastFlickSpeed[o]=n.lastFlickOffset[o]/e:n.lastFlickSpeed[o]=0,Math.abs(n.lastFlickSpeed[o])<.1&&(n.lastFlickSpeed[o]=0),n.slowDownRatio[o]=.95,n.slowDownRatioReverse[o]=1-n.slowDownRatio[o],n.speedDecelerationRatio[o]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(pe[e]>ee.min[e]?n.backAnimDestination[e]=ee.min[e]:pe[e]<ee.max[e]&&(n.backAnimDestination[e]=ee.max[e]),void 0!==n.backAnimDestination[e]&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,Ve("bounceZoomPan"+e,pe[e],n.backAnimDestination[e],t||300,i.easing.sine.out,(function(t){pe[e]=t,ke()})))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,pe[e]+=n.distanceOffset[e])},panAnimLoop:function(){if(Be.zoomPan&&(Be.zoomPan.raf=A(n.panAnimLoop),n.now=Te(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),ke(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05))return pe.x=Math.round(pe.x),pe.y=Math.round(pe.y),ke(),void Ye("zoomPan")}};return n},Ft=function(e){if(e.calculateSwipeSpeed("y"),ee=a.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;qe("zoomPan"),e.lastNow=Te(),e.panAnimLoop()},Ot=function(e,t){var n,o,l;if(ne||(lt=u),"swipe"===e){var s=tt.x-nt.x,c=t.lastFlickDist.x<10;s>30&&(c||t.lastFlickOffset.x>20)?o=-1:s<-30&&(c||t.lastFlickOffset.x<-20)&&(o=1)}o&&((u+=o)<0?(u=r.loop?Nt()-1:0,l=!0):u>=Nt()&&(u=r.loop?0:Nt()-1,l=!0),l&&!r.loop||(ge+=o,me-=o,n=!0));var p,d=he.x*me,m=Math.abs(d-ut.x);return n||d>ut.x==t.lastFlickSpeed.x>0?(p=Math.abs(t.lastFlickSpeed.x)>0?m/Math.abs(t.lastFlickSpeed.x):333,p=Math.min(p,400),p=Math.max(p,250)):p=333,lt===u&&(n=!1),ne=!0,_e("mainScrollAnimStart"),Ve("mainScroll",ut.x,d,p,i.easing.cubic.out,Fe,(function(){je(),ne=!1,lt=-1,(n||lt!==u)&&a.updateCurrItem(),_e("mainScrollAnimComplete")})),n&&a.updateCurrItem(!0),n},Pt=function(e){return 1/J*e*w},Rt=function(){var e=g,t=Ue(),n=$e();g<t?e=t:g>n&&(e=n);var o,r=re;return ae&&!K&&!le&&g<t?(a.close(),!0):(ae&&(o=function(e){De((1-r)*e+r)}),a.zoomTo(e,0,200,i.easing.cubic.out,o),!0)};be("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,o,i){E=e+t,_=e+n,T=e+o,D=i?e+i:""};(k=Z.pointerEvent)&&Z.touch&&(Z.touch=!1),k?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):Z.touch?(e("touch","start","move","end","cancel"),M=!0):e("mouse","down","move","up"),m=_+" "+T+" "+D,f=E,k&&!M&&(M=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),a.likelyTouchDevice=M,h[E]=Dt,h[_]=St,h[T]=Mt,D&&(h[D]=h[T]),Z.touch&&(f+=" mousedown",m+=" mousemove mouseup",h.mousedown=h[E],h.mousemove=h[_],h.mouseup=h[T]),M||(r.allowPanToNext=!1)}}});var Lt,Zt,zt,Ut,$t,Nt,Kt=function(t,n,o,l){var s;Lt&&clearTimeout(Lt),Ut=!0,zt=!0,t.initialLayout?(s=t.initialLayout,t.initialLayout=null):s=r.getThumbBoundsFn&&r.getThumbBoundsFn(u);var p=o?r.hideAnimationDuration:r.showAnimationDuration,d=function(){Ye("initialZoom"),o?(a.template.removeAttribute("style"),a.bg.removeAttribute("style")):(De(1),n&&(n.style.display="block"),i.addClass(e,"pswp--animated-in"),_e("initialZoom"+(o?"OutEnd":"InEnd"))),l&&l(),Ut=!1};if(!p||!s||void 0===s.x)return _e("initialZoom"+(o?"Out":"In")),g=t.initialZoomLevel,Pe(pe,t.initialPosition),ke(),e.style.opacity=o?0:1,De(1),void(p?setTimeout((function(){d()}),p):d());var m,f;m=c,f=!a.currItem.src||a.currItem.loadError||r.showHideOpacity,t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),o||(g=s.w/t.w,pe.x=s.x,pe.y=s.y-P,a[f?"template":"bg"].style.opacity=.001,ke()),qe("initialZoom"),o&&!m&&i.removeClass(e,"pswp--animated-in"),f&&(o?i[(m?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout((function(){i.addClass(e,"pswp--animate_opacity")}),30)),Lt=setTimeout((function(){if(_e("initialZoom"+(o?"Out":"In")),o){var n=s.w/t.w,a={x:pe.x,y:pe.y},r=g,l=re,c=function(t){1===t?(g=n,pe.x=s.x,pe.y=s.y-L):(g=(n-r)*t+r,pe.x=(s.x-a.x)*t+a.x,pe.y=(s.y-L-a.y)*t+a.y),ke(),f?e.style.opacity=1-t:De(l-t*l)};m?Ve("initialZoom",0,1,p,i.easing.cubic.out,c,d):(c(1),Lt=setTimeout(d,p+20))}else g=t.initialZoomLevel,Pe(pe,t.initialPosition),ke(),De(1),f?e.style.opacity=1:De(1),Lt=setTimeout(d,p+20)}),o?25:90)},Ht={},Wt=[],Bt={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 Zt.length}},Gt=function(e,t,n){if(e.src&&!e.loadError){var o=!n;if(o&&(e.vGap||(e.vGap={top:0,bottom:0}),_e("parseVerticalMargin",e)),Ht.x=t.x,Ht.y=t.y-e.vGap.top-e.vGap.bottom,o){var i=Ht.x/e.w,a=Ht.y/e.h;e.fitRatio=i<a?i:a;var l=r.scaleMode;"orig"===l?n=1:"fit"===l&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}})}if(!n)return;return function(e,t,n){var o=e.bounds;o.center.x=Math.round((Ht.x-t)/2),o.center.y=Math.round((Ht.y-n)/2)+e.vGap.top,o.max.x=t>Ht.x?Math.round(Ht.x-t):o.center.x,o.max.y=n>Ht.y?Math.round(Ht.y-n)+e.vGap.top:o.center.y,o.min.x=t>Ht.x?0:o.center.x,o.min.y=n>Ht.y?e.vGap.top:o.center.y}(e,e.w*n,e.h*n),o&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}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},Yt=function(e,t,n,o,i,r){t.loadError||o&&(t.imageAppended=!0,Vt(t,o,t===a.currItem&&xe),n.appendChild(o),r&&setTimeout((function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)}),500))},qt=function(e){e.loading=!0,e.loaded=!1;var t=e.img=i.createEl("pswp__img","img"),n=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t},jt=function(e,t){if(e.src&&e.loadError&&e.container)return t&&(e.container.innerHTML=""),e.container.innerHTML=r.errorMsg.replace("%url%",e.src),!0},Vt=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var o=n?e.w:Math.round(e.w*e.fitRatio),i=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=o+"px",e.placeholder.style.height=i+"px"),t.style.width=o+"px",t.style.height=i+"px"}},Xt=function(){if(Wt.length){for(var e,t=0;t<Wt.length;t++)(e=Wt[t]).holder.index===e.index&&Yt(e.index,e.item,e.baseDiv,e.img,0,e.clearPlaceholder);Wt=[]}};be("Controller",{publicMethods:{lazyLoadItem:function(e){e=Ce(e);var t=$t(e);t&&(!t.loaded&&!t.loading||b)&&(_e("gettingData",e,t),t.src&&qt(t))},initController:function(){i.extend(r,Bt,!0),a.items=Zt=n,$t=a.getItemAt,Nt=r.getNumItemsFn,r.loop,Nt()<3&&(r.loop=!1),Ee("beforeChange",(function(e){var t,n=r.preload,o=null===e||e>=0,i=Math.min(n[0],Nt()),l=Math.min(n[1],Nt());for(t=1;t<=(o?l:i);t++)a.lazyLoadItem(u+t);for(t=1;t<=(o?i:l);t++)a.lazyLoadItem(u-t)})),Ee("initialLayout",(function(){a.currItem.initialLayout=r.getThumbBoundsFn&&r.getThumbBoundsFn(u)})),Ee("mainScrollAnimComplete",Xt),Ee("initialZoomInEnd",Xt),Ee("destroy",(function(){for(var e,t=0;t<Zt.length;t++)(e=Zt[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);Wt=null}))},getItemAt:function(e){return e>=0&&(void 0!==Zt[e]&&Zt[e])},allowProgressiveImg:function(){return r.forceProgressiveLoading||!M||r.mouseUsed||screen.width>1200},setContent:function(e,t){r.loop&&(t=Ce(t));var n=a.getItemAt(e.index);n&&(n.container=null);var o,s=a.getItemAt(t);if(s){_e("gettingData",t,s),e.index=t,e.item=s;var c=s.container=i.createEl("pswp__zoom-wrap");if(!s.src&&s.html&&(s.html.tagName?c.appendChild(s.html):c.innerHTML=s.html),jt(s),Gt(s,de),!s.src||s.loadError||s.loaded)s.src&&!s.loadError&&((o=i.createEl("pswp__img","img")).style.opacity=1,o.src=s.src,Vt(s,o),Yt(0,s,c,o));else{if(s.loadComplete=function(n){if(l){if(e&&e.index===t){if(jt(n,!0))return n.loadComplete=n.img=null,Gt(n,de),Me(n),void(e.index===u&&a.updateCurrZoomItem());n.imageAppended?!Ut&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):Z.transform&&(ne||Ut)?Wt.push({item:n,baseDiv:c,img:n.img,index:t,holder:e,clearPlaceholder:!0}):Yt(0,n,c,n.img,0,!0)}n.loadComplete=null,n.img=null,_e("imageLoadComplete",t,n)}},i.features.transform){var p="pswp__img pswp__img--placeholder";p+=s.msrc?"":" pswp__img--placeholder--blank";var d=i.createEl(p,s.msrc?"img":"");s.msrc&&(d.src=s.msrc),Vt(s,d),c.appendChild(d),s.placeholder=d}s.loading||qt(s),a.allowProgressiveImg()&&(!zt&&Z.transform?Wt.push({item:s,baseDiv:c,img:s.img,index:t,holder:e}):Yt(0,s,c,s.img,0,!0))}zt||t!==u?Me(s):(te=c.style,Kt(s,o||s.img)),e.el.innerHTML="",e.el.appendChild(c)}else e.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var Qt,Jt,en={},tn=function(e,t,n){var o=document.createEvent("CustomEvent"),i={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};o.initCustomEvent("pswpTap",!0,!0,i),e.target.dispatchEvent(o)};be("Tap",{publicMethods:{initTap:function(){Ee("firstTouchStart",a.onTapStart),Ee("touchRelease",a.onTapRelease),Ee("destroy",(function(){en={},Qt=null}))},onTapStart:function(e){e.length>1&&(clearTimeout(Qt),Qt=null)},onTapRelease:function(e,t){var n,o;if(t&&(!q&&!G&&!Ge)){var a=t;if(Qt&&(clearTimeout(Qt),Qt=null,n=a,o=en,Math.abs(n.x-o.x)<25&&Math.abs(n.y-o.y)<25))return void _e("doubleTap",a);if("mouse"===t.type)return void tn(e,t,"mouse");if("BUTTON"===e.target.tagName.toUpperCase()||i.hasClass(e.target,"pswp__single-tap"))return void tn(e,t);Pe(en,a),Qt=setTimeout((function(){tn(e,t),Qt=null}),300)}}}}),be("DesktopZoom",{publicMethods:{initDesktopZoom:function(){R||(M?Ee("mouseUsed",(function(){a.setupDesktopZoom()})):a.setupDesktopZoom(!0))},setupDesktopZoom:function(t){Jt={};var n="wheel mousewheel DOMMouseScroll";Ee("bindEvents",(function(){i.bind(e,n,a.handleMouseWheel)})),Ee("unbindEvents",(function(){Jt&&i.unbind(e,n,a.handleMouseWheel)})),a.mouseZoomedIn=!1;var o,r=function(){a.mouseZoomedIn&&(i.removeClass(e,"pswp--zoomed-in"),a.mouseZoomedIn=!1),g<1?i.addClass(e,"pswp--zoom-allowed"):i.removeClass(e,"pswp--zoom-allowed"),l()},l=function(){o&&(i.removeClass(e,"pswp--dragging"),o=!1)};Ee("resize",r),Ee("afterChange",r),Ee("pointerDown",(function(){a.mouseZoomedIn&&(o=!0,i.addClass(e,"pswp--dragging"))})),Ee("pointerUp",l),t||r()},handleMouseWheel:function(e){if(g<=a.currItem.fitRatio)return r.modal&&(!r.closeOnScroll||Ge||B?e.preventDefault():S&&Math.abs(e.deltaY)>2&&(c=!0,a.close())),!0;if(e.stopPropagation(),Jt.x=0,"deltaX"in e)1===e.deltaMode?(Jt.x=18*e.deltaX,Jt.y=18*e.deltaY):(Jt.x=e.deltaX,Jt.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(Jt.x=-.16*e.wheelDeltaX),e.wheelDeltaY?Jt.y=-.16*e.wheelDeltaY:Jt.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;Jt.y=e.detail}ze(g,!0);var t=pe.x-Jt.x,n=pe.y-Jt.y;(r.modal||t<=ee.min.x&&t>=ee.max.x&&n<=ee.min.y&&n>=ee.max.y)&&e.preventDefault(),a.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:de.x/2+fe.x,y:de.y/2+fe.y};var n=r.getDoubleTapZoom(!0,a.currItem),o=g===n;a.mouseZoomedIn=!o,a.zoomTo(o?a.currItem.initialZoomLevel:n,t,333),i[(o?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var nn,on,an,rn,ln,sn,cn,un,pn,dn,mn,fn,hn={history:!0,galleryUID:1},gn=function(){return mn.hash.substring(1)},wn=function(){nn&&clearTimeout(nn),an&&clearTimeout(an)},vn=function(){var e=gn(),t={};if(e.length<5)return t;var n,o=e.split("&");for(n=0;n<o.length;n++)if(o[n]){var i=o[n].split("=");i.length<2||(t[i[0]]=i[1])}if(r.galleryPIDs){var a=t.pid;for(t.pid=0,n=0;n<Zt.length;n++)if(Zt[n].pid===a){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},yn=function(){if(an&&clearTimeout(an),Ge||B)an=setTimeout(yn,500);else{rn?clearTimeout(on):rn=!0;var e=u+1,t=$t(u);t.hasOwnProperty("pid")&&(e=t.pid);var n=cn+"&gid="+r.galleryUID+"&pid="+e;un||-1===mn.hash.indexOf(n)&&(dn=!0);var o=mn.href.split("#")[0]+"#"+n;fn?"#"+n!==window.location.hash&&history[un?"replaceState":"pushState"]("",document.title,o):un?mn.replace(o):mn.hash=n,un=!0,on=setTimeout((function(){rn=!1}),60)}};be("History",{publicMethods:{initHistory:function(){if(i.extend(r,hn,!0),r.history){mn=window.location,dn=!1,pn=!1,un=!1,cn=gn(),fn="pushState"in history,cn.indexOf("gid=")>-1&&(cn=(cn=cn.split("&gid=")[0]).split("?gid=")[0]),Ee("afterChange",a.updateURL),Ee("unbindEvents",(function(){i.unbind(window,"hashchange",a.onHashChange)}));var e=function(){sn=!0,pn||(dn?history.back():cn?mn.hash=cn:fn?history.pushState("",document.title,mn.pathname+mn.search):mn.hash=""),wn()};Ee("unbindEvents",(function(){c&&e()})),Ee("destroy",(function(){sn||e()})),Ee("firstUpdate",(function(){u=vn().pid}));var t=cn.indexOf("pid=");t>-1&&"&"===(cn=cn.substring(0,t)).slice(-1)&&(cn=cn.slice(0,-1)),setTimeout((function(){l&&i.bind(window,"hashchange",a.onHashChange)}),40)}},onHashChange:function(){if(gn()===cn)return pn=!0,void a.close();rn||(ln=!0,a.goTo(vn().pid),ln=!1)},updateURL:function(){wn(),ln||(un?nn=setTimeout(yn,800):yn())}}}),i.extend(a,Xe)}})),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,(function(){"use strict";return function(e,t){var n,o,i,a,r,l,s,c,u,p,d,m,f,h,g,w,v,y,x=this,b=!1,C=!0,I=!0,E={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://twitter.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 e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},_=function(e){if(w)return!0;e=e||window.event,g.timeToIdle&&g.mouseUsed&&!u&&R();for(var n,o,i=(e.target||e.srcElement).getAttribute("class")||"",a=0;a<U.length;a++)(n=U[a]).onTap&&i.indexOf("pswp__"+n.name)>-1&&(n.onTap(),o=!0);if(o){e.stopPropagation&&e.stopPropagation(),w=!0;var r=t.features.isOldAndroid?600:30;setTimeout((function(){w=!1}),r)}},T=function(){return!e.likelyTouchDevice||g.mouseUsed||screen.width>g.fitControlsWidth},D=function(e,n,o){t[(o?"add":"remove")+"Class"](e,"pswp__"+n)},S=function(){var e=1===g.getNumItemsFn();e!==h&&(D(o,"ui--one-slide",e),h=e)},k=function(){D(s,"share-modal--hidden",I)},M=function(){return(I=!I)?(t.removeClass(s,"pswp__share-modal--fade-in"),setTimeout((function(){I&&k()}),300)):(k(),setTimeout((function(){I||t.addClass(s,"pswp__share-modal--fade-in")}),30)),I||F(),!1},A=function(t){var n=(t=t||window.event).target||t.srcElement;return e.shout("shareLinkClick",t,n),!(!n.href||!n.hasAttribute("download")&&(window.open(n.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)),I||M(),1))},F=function(){for(var e,t,n,o,i="",a=0;a<g.shareButtons.length;a++)e=g.shareButtons[a],t=g.getImageURLForShare(e),n=g.getPageURLForShare(e),o=g.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>",g.parseShareButtonOut&&(i=g.parseShareButtonOut(e,i));s.children[0].innerHTML=i,s.children[0].onclick=A},O=function(e){for(var n=0;n<g.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+g.closeElClasses[n]))return!0},P=0,R=function(){clearTimeout(y),P=0,u&&x.setIdle(!1)},L=function(e){var t=(e=e||window.event).relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(y),y=setTimeout((function(){x.setIdle(!0)}),g.timeToIdleOutside))},Z=function(e){m!==e&&(D(d,"preloader--active",!e),m=e)},z=function(e){var n=e.vGap;if(T()){var r=g.barsSize;if(g.captionEl&&"auto"===r.bottom)if(a||((a=t.createEl("pswp__caption pswp__caption--fake")).appendChild(t.createEl("pswp__caption__center")),o.insertBefore(a,i),t.addClass(o,"pswp__ui--fit")),g.addCaptionHTMLFn(e,a,!0)){var l=a.clientHeight;n.bottom=parseInt(l,10)||44}else n.bottom=r.top;else n.bottom="auto"===r.bottom?0:r.bottom;n.top=r.top}else n.top=n.bottom=0},U=[{name:"caption",option:"captionEl",onInit:function(e){i=e}},{name:"share-modal",option:"shareEl",onInit:function(e){s=e},onTap:function(){M()}},{name:"button--share",option:"shareEl",onInit:function(e){l=e},onTap:function(){M()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){r=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){d=e}}];x.init=function(){t.extend(e.options,E,!0),g=e.options,o=t.getChildByClass(e.scrollWrap,"pswp__ui"),p=e.listen,function(){var e;p("onVerticalDrag",(function(e){C&&e<.95?x.hideControls():!C&&e>=.95&&x.showControls()})),p("onPinchClose",(function(t){C&&t<.9?(x.hideControls(),e=!0):e&&!C&&t>.9&&x.showControls()})),p("zoomGestureEnded",(function(){(e=!1)&&!C&&x.showControls()}))}(),p("beforeChange",x.update),p("doubleTap",(function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(g.getDoubleTapZoom(!1,e.currItem),t,333)})),p("preventDragEvent",(function(e,t,n){var o=e.target||e.srcElement;o&&o.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(o.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)})),p("bindEvents",(function(){t.bind(o,"pswpTap click",_),t.bind(e.scrollWrap,"pswpTap",x.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",x.onMouseOver)})),p("unbindEvents",(function(){I||M(),v&&clearInterval(v),t.unbind(document,"mouseout",L),t.unbind(document,"mousemove",R),t.unbind(o,"pswpTap click",_),t.unbind(e.scrollWrap,"pswpTap",x.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",x.onMouseOver),n&&(t.unbind(document,n.eventK,x.updateFullscreen),n.isFullscreen()&&(g.hideAnimationDuration=0,n.exit()),n=null)})),p("destroy",(function(){g.captionEl&&(a&&o.removeChild(a),t.removeClass(i,"pswp__caption--empty")),s&&(s.children[0].onclick=null),t.removeClass(o,"pswp__ui--over-close"),t.addClass(o,"pswp__ui--hidden"),x.setIdle(!1)})),g.showAnimationDuration||t.removeClass(o,"pswp__ui--hidden"),p("initialZoomIn",(function(){g.showAnimationDuration&&t.removeClass(o,"pswp__ui--hidden")})),p("initialZoomOut",(function(){t.addClass(o,"pswp__ui--hidden")})),p("parseVerticalMargin",z),function(){var e,n,i,a=function(o){if(o)for(var a=o.length,r=0;r<a;r++){e=o[r],n=e.className;for(var l=0;l<U.length;l++)i=U[l],n.indexOf("pswp__"+i.name)>-1&&(g[i.option]?(t.removeClass(e,"pswp__element--disabled"),i.onInit&&i.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};a(o.children);var r=t.getChildByClass(o,"pswp__top-bar");r&&a(r.children)}(),g.shareEl&&l&&s&&(I=!0),S(),g.timeToIdle&&p("mouseUsed",(function(){t.bind(document,"mousemove",R),t.bind(document,"mouseout",L),v=setInterval((function(){2==++P&&x.setIdle(!0)}),g.timeToIdle/2)})),g.fullscreenEl&&!t.features.isOldAndroid&&(n||(n=x.getFullscreenAPI()),n?(t.bind(document,n.eventK,x.updateFullscreen),x.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs")),g.preloaderEl&&(Z(!0),p("beforeChange",(function(){clearTimeout(f),f=setTimeout((function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&Z(!1):Z(!0)}),g.loadingIndicatorDelay)})),p("imageLoadComplete",(function(t,n){e.currItem===n&&Z(!0)})))},x.setIdle=function(e){u=e,D(o,"ui--idle",e)},x.update=function(){C&&e.currItem?(x.updateIndexIndicator(),g.captionEl&&(g.addCaptionHTMLFn(e.currItem,i),D(i,"caption--empty",!e.currItem.title)),b=!0):b=!1,I||M(),S()},x.updateFullscreen=function(o){o&&setTimeout((function(){e.setScrollOffset(0,t.getScrollY())}),50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},x.updateIndexIndicator=function(){g.counterEl&&(r.innerHTML=e.getCurrentIndex()+1+g.indexIndicatorSep+g.getNumItemsFn())},x.onGlobalTap=function(n){var o=(n=n||window.event).target||n.srcElement;if(!w)if(n.detail&&"mouse"===n.detail.pointerType){if(O(o))return void e.close();t.hasClass(o,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?g.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(g.tapToToggleControls&&(C?x.hideControls():x.showControls()),g.tapToClose&&(t.hasClass(o,"pswp__img")||O(o)))return void e.close()},x.onMouseOver=function(e){var t=(e=e||window.event).target||e.srcElement;D(o,"ui--over-close",O(t))},x.hideControls=function(){t.addClass(o,"pswp__ui--hidden"),C=!1},x.showControls=function(){C=!0,b||x.update(),t.removeClass(o,"pswp__ui--hidden")},x.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},x.getFullscreenAPI=function(){var t,n=document.documentElement,o="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:o}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+o}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+o}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){return c=g.closeOnScroll,g.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?e.template[this.enterK]():void e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return g.closeOnScroll=c,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}}})),function(e){"use strict";window.rhye.components.Pswp=class extends window.rhye.components.Base{constructor({scope:t,target:n,options:o}){super({scope:t,target:n}),this.options=o||{history:!1,showAnimationDuration:300},this._setGalleriesID(),this.$pswpEl=e(".pswp"),this.$container=this.$pswpEl.find(".pswp__container"),this.pswpEl=this.$pswpEl.get(0)}_bindEvents(){const t=new CustomEvent("arts/pswp/touchUp",{detail:{direction:"all"}}),n=new CustomEvent("arts/pswp/touchDown",{detail:{direction:"all"}}),o=new CustomEvent("arts/pswp/close"),i=new CustomEvent("arts/pswp/slideChange");this.$pswpEl.off("click").on("click",".pswp__button--arrow--left",(e=>{e.preventDefault(),this.gallery.prev()})).on("click",".pswp__button--arrow--right",(e=>{e.preventDefault(),this.gallery.next()})),window.$window.on("arts/barba/transition/start",(()=>{"object"==typeof this.gallery&&"function"===this.gallery.destroy&&this.gallery.destroy()})),this.gallery.listen("preventDragEvent",((o,i,a)=>{a.prevent=!1,e(o.target).is(".pswp--zoomed-in .pswp__img")&&(i?document.dispatchEvent(n):document.dispatchEvent(t))})),this.gallery.listen("close",(()=>{document.dispatchEvent(o),this.$pswpEl.find("iframe, video").remove()})),this.gallery.listen("beforeChange",(e=>{document.dispatchEvent(i),this._stopVideo()}))}_openPhotoSwipe({index:e=0,galleryElement:t=null,disableAnimation:n=!1,fromURL:o=!1}){const i=this._getItems(t,e),a={galleryUID:t.attr("data-pswp-uid"),captionEl:!!this.$pswpEl.find(".pswp__caption").length,counterEl:!!this.$pswpEl.find(".pswp__counter").length,closeEl:!!this.$pswpEl.find(".pswp__button--close"),fullscreenEl:!!this.$pswpEl.find(".pswp__button--fs"),closeOnScroll:!!this.$pswpEl.hasClass("pswp--close-on-scroll")};if(i.length){if(this.$pswpEl.hasClass("pswp--zoom-disabled")&&(a.zoomEl=!1,a.maxSpreadZoom=1,a.getDoubleTapZoom=function(e,t){return t.initialZoomLevel},a.pinchToClose=!1),void 0!==i[e]&&"el"in i[e]&&(a.getThumbBoundsFn=function(e){let t,n=window.pageYOffset||document.documentElement.scrollTop,o=i[e].el.querySelector("img");if(o)return t=o.getBoundingClientRect(),{x:t.left,y:t.top+n,w:t.width}}),o)if(a.galleryPIDs){for(let t=0;t<i.length;t++)if(i[t].pid==e){a.index=t;break}}else a.index=parseInt(e,10)-1;else a.index=parseInt(e,10);isNaN(a.index)||(n&&(a.showAnimationDuration=0),this._init({items:i,options:a}))}else console.warn("Photoswipe: Can't find any items for the gallery.")}_init({items:t,options:n}){this.gallery=new PhotoSwipe(this.pswpEl,PhotoSwipeUI_Default,t,e.extend(n,this.options)),this.gallery.init(),this._bindEvents()}_getMediaTypeFromURL(e,t,n=!1){const o={type:!1,html:null},i=t?t.split("x"):[640,360],a=n?"playsinline loop autoplay":"",r=n?"autoplay=1":"",l=n?"autoplay=1":"",s={image:/[^\s]+(\.(jpg|jpeg|jfif|pjpeg|pjp|bmp|gif|png|apng|webp|svg))/gi,video:/[^\s]+(\.(mp4|ogv|webm))/gi,youtube:/(?:http?s?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)([^&|?|\/]*)/g,vimeo:/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/(?:.*\/)?(.+)/g};return s.image.test(e)?(o.type="image",o):s.video.test(e)?(o.type="video",o.html=`<video src="${e}" controls ${a}></video>`,o):s.youtube.test(e)?(o.type="youtube",o.html=e.replace(s.youtube,`<iframe class="iframe-youtube" width="${parseInt(i[0])}" height="${parseInt(i[1])}" src="https://www.youtube.com/embed/$1?${r}&enablejsapi=1" frameborder="0" allow="autoplay; accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`),o):s.vimeo.test(e)?(o.type="vimeo",o.html=e.replace(s.vimeo,`<iframe class="iframe-vimeo" width="${parseInt(i[0])}" height="${parseInt(i[1])}" src="https://player.vimeo.com/video/$1?${l}" frameborder="0" allow="autoplay; fullscreen" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>`),o):(o.type="iframe",o.html=`<iframe width="${parseInt(i[0])}" height="${parseInt(i[1])}" src=${e} frameborder="0" allowfullscreen></iframe>`,o)}_getItems(t,n=0){const o=this,i=t.find("a").filter(((t,n)=>e(n).parents(".js-gallery").length)),a=[];return i.each((function(t){const i=e(this),r={},l=i.attr("data-size"),s=i.attr("data-autoplay")&&n===t,c=i.attr("href"),u=o._getMediaTypeFromURL(c,l,s),p=i.attr("data-title");if(l){const e=l.split("x");r.w=parseInt(e[0],10),r.h=parseInt(e[1],10)}switch(p&&(r.title=p),u.type){case"youtube":case"vimeo":case"video":default:r.html=`<div class="pswp__wrapper-embed">${u.html}</div>`;break;case"image":r.el=i.get(0),r.src=c,r.msrc=i.find("img").attr("src")}a.push(r)})),a}_photoswipeParseHash(){const e=window.location.hash.substring(1),t={};if(e.length<5)return t;const n=e.split("&");for(let e=0;e<n.length;e++){if(!n[e])continue;let o=n[e].split("=");o.length<2||(t[o[0]]=o[1])}return t.gid&&(t.gid=parseInt(t.gid,10)),t}_setGalleriesID(){this.$target.each((function(t){e(this).attr("data-pswp-uid",t+1)}))}_stopVideo(){const t=this.$pswpEl.find(".iframe-youtube"),n=this.$pswpEl.find(".iframe-vimeo"),o=this.$pswpEl.find("video");t.length&&t.each((function(){e(this).get(0).contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})),n.length&&n.each((function(){e(this).get(0).contentWindow.postMessage('{"method":"pause"}',"*")})),o.length&&o.each((function(){e(this).get(0).pause()}))}},window.rhye.components.PSWPAlbum=class extends window.rhye.components.Pswp{constructor({scope:e,target:t,options:n}){super({scope:e,target:t,options:n}),this.hashData=this._photoswipeParseHash(),this.$target.length&&this.hashData.pid&&this.hashData.gid&&this._openPhotoSwipe({index:this.hashData.pid,galleryElement:this.$target.eq(this.hashData.gid-1),disableAnimation:!0,fromURL:!0})}run(e){this._bindClickAlbumLinks(e)}_bindClickAlbumLinks(e){e.on("click",(t=>{t.preventDefault(),this._openPhotoSwipe({index:0,galleryElement:e})}))}_getItems(t,n=0){const o=this,i=t.find(".js-album__items img"),a=[];return i.each((function(t){const i=e(this),r=i.attr("data-album-src"),l=i.attr("data-autoplay")&&n===t,s=o._getMediaTypeFromURL(r,null,l),c={w:i.attr("width"),h:i.attr("height"),title:i.attr("data-title")};switch(s.type){case"youtube":case"vimeo":case"video":default:c.html=`<div class="pswp__wrapper-embed">${s.html}</div>`;break;case"image":c.el=i.get(0),c.src=r,c.msrc=i.find("img").attr("src")}a.push(c)})),a}},window.rhye.components.PSWPGallery=class extends window.rhye.components.Pswp{constructor({scope:e,target:t,options:n}){super({scope:e,target:t,options:n}),this.hashData=this._photoswipeParseHash(),this.$target.length&&!window.theme.ajax.enabled&&this.hashData.pid&&this.hashData.gid&&this._openPhotoSwipe({index:this.hashData.pid,galleryElement:this.$target.eq(this.hashData.gid-1),disableAnimation:!0,fromURL:!0})}run(e){this._bindClickGalleryLinks(e)}_bindClickGalleryLinks(t){const n=this,o=t.find("a").filter(((t,n)=>e(n).parents(".js-gallery").length));o.off("click").on("click",(function(i){const a=new gsap.timeline,r=e(this),l=r.find("img"),s=gsap.getProperty(l.get(0),"scale"),c=o.index(r);i.preventDefault(),a.add((()=>{window.$body.addClass("pointer-events-none")})).set(n.$container,{transition:"none"}).to(l,{scale:1,duration:.3}).add((()=>{n._openPhotoSwipe({index:c,galleryElement:t})})).set(l,{delay:.1,scale:s,overwrite:"all"}).set(r,{autoAlpha:1}).add((()=>{window.$body.removeClass("pointer-events-none")}))}))}}}(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit