500&&o.clientWidth>500?500:370:i.expand,r._defEx=f,p=f*i.expFactor,g=i.hFac,W=null,G2&&P>2&&!t.hidden?(G=p,$=0):G=P>1&&$>1&&J<6?f:0),h!==c&&(R=innerWidth+c*g,z=innerHeight+c,u=-1*c,h=c),s=v[n].getBoundingClientRect(),(B=s.bottom)>=u&&(F=s.top)<=z&&(U=s.right)>=u*g&&(H=s.left)<=R&&(B||U||H||F)&&(i.loadHidden||Q(v[n]))&&(D&&J<3&&!d&&(P<3||$<4)||K(v[n],c))){if(ae(v[n]),l=!0,J>9)break}else!l&&D&&!a&&J<4&&$<4&&P>2&&(N[0]||i.preloadAfterLoad)&&(N[0]||!d&&(B||U||H||F||"auto"!=v[n].getAttribute(i.sizesAttr)))&&(a=N[0]||v[n]);a&&!l&&ae(a)}},te=function(e){var t,r=0,o=i.throttleDelay,s=i.ricTimeout,a=function(){t=!1,r=n.now(),e()},c=u&&s>49?function(){u(a,{timeout:s}),s!==i.ricTimeout&&(s=i.ricTimeout)}:C((function(){l(a)}),!0);return function(e){var i;(e=!0===e)&&(s=33),t||(t=!0,(i=o-(n.now()-r))<0&&(i=0),e||i<9?c():l(c,i))}}(ee),ne=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(Z(e),v(t,i.loadedClass),m(t,i.loadingClass),y(t,ie),b(t,"lazyloaded"))},re=C(ne),ie=function(e){re({target:e.target})},oe=function(e){var t,n=e.getAttribute(i.srcsetAttr);(t=i.customMedia[e.getAttribute("data-media")||e.getAttribute("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)},se=C((function(e,t,n,r,o){var s,a,c,u,h,f;(h=b(e,"lazybeforeunveil",t)).defaultPrevented||(r&&(n?v(e,i.autosizesClass):e.setAttribute("sizes",r)),a=e.getAttribute(i.srcsetAttr),s=e.getAttribute(i.srcAttr),o&&(u=(c=e.parentNode)&&d.test(c.nodeName||"")),f=t.firesLoad||"src"in e&&(a||s||u),h={target:e},v(e,i.loadingClass),f&&(clearTimeout(I),I=l(Z,2500),y(e,ie,!0)),u&&p.call(c.getElementsByTagName("source"),oe),a?e.setAttribute("srcset",a):s&&!u&&(X.test(e.nodeName)?function(e,t){try{e.contentWindow.location.replace(t)}catch(n){e.src=t}}(e,s):e.src=s),o&&(a||u)&&w(e,{src:s})),e._lazyRace&&delete e._lazyRace,m(e,i.lazyClass),S((function(){var t=e.complete&&e.naturalWidth>1;f&&!t||(t&&v(e,"ls-is-cached"),ne(h),e._lazyCache=!0,l((function(){"_lazyCache"in e&&delete e._lazyCache}),9)),"lazy"==e.loading&&J--}),!0)})),ae=function(e){if(!e._lazyRace){var t,n=V.test(e.nodeName),r=n&&(e.getAttribute(i.sizesAttr)||e.getAttribute("sizes")),o="auto"==r;(!o&&D||!n||!e.getAttribute("src")&&!e.srcset||e.complete||g(e,i.errorClass)||!g(e,i.lazyClass))&&(t=b(e,"lazyunveilread").detail,o&&T.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,J++,se(e,t,o,r,n))}},le=k((function(){i.loadMode=3,te()})),ce=function(){3==i.loadMode&&(i.loadMode=2),le()},ue=function(){D||(n.now()-M<999?l(ue,999):(D=!0,i.loadMode=3,te(),a("scroll",ce,!0)))},{_:function(){M=n.now(),r.elements=t.getElementsByClassName(i.lazyClass),N=t.getElementsByClassName(i.lazyClass+" "+i.preloadClass),a("scroll",te,!0),a("resize",te,!0),a("pageshow",(function(e){if(e.persisted){var n=t.querySelectorAll("."+i.loadingClass);n.length&&n.forEach&&c((function(){n.forEach((function(e){e.complete&&ae(e)}))}))}})),e.MutationObserver?new MutationObserver(te).observe(o,{childList:!0,subtree:!0,attributes:!0}):(o.addEventListener("DOMNodeInserted",te,!0),o.addEventListener("DOMAttrModified",te,!0),setInterval(te,999)),a("hashchange",te,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(e){t.addEventListener(e,te,!0)})),/d$|^c/.test(t.readyState)?ue():(a("load",ue),t.addEventListener("DOMContentLoaded",te),l(ue,2e4)),r.elements.length?(ee(),S._lsFlush()):te()},checkElems:te,unveil:ae,_aLSL:ce}),T=(j=C((function(e,t,n,r){var i,o,s;if(e._lazysizesWidth=r,r+="px",e.setAttribute("sizes",r),d.test(t.nodeName||""))for(o=0,s=(i=t.getElementsByTagName("source")).length;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e[s]=e[s]||[],i={all:r,evt:null,found:null};return t&&n&&N(r)>0&&l(r,(function(e,r){if(e.eventName==t&&e.fn.toString()==n.toString())return i.found=!0,i.evt=r,!1})),i}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.onElement,r=t.withCallback,i=t.avoidDuplicate,o=void 0===i||i,s=t.once,a=void 0!==s&&s,u=t.useCapture,d=void 0!==u&&u,h=arguments.length>2?arguments[2]:void 0,f=n||[];function p(e){k(r)&&r.call(h,e,this),a&&p.destroy()}return A(f)&&(f=document.querySelectorAll(f)),p.destroy=function(){l(f,(function(t){var n=c(t,e,p);n.found&&n.all.splice(n.evt,1),t.removeEventListener&&t.removeEventListener(e,p,d)}))},l(f,(function(t){var n=c(t,e,p);(t.addEventListener&&o&&!n.found||!o)&&(t.addEventListener(e,p,d),n.all.push({eventName:e,fn:p}))})),p}function d(e,t){l(t.split(" "),(function(t){return e.classList.add(t)}))}function h(e,t){l(t.split(" "),(function(t){return e.classList.remove(t)}))}function f(e,t){return e.classList.contains(t)}function p(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if("function"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||""===t)return!1;if("none"==t)return k(n)&&n(),!1;var r=x(),i=t.split(" ");l(i,(function(t){d(e,"g"+t)})),u(r,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){l(i,(function(e){h(t,"g"+e)})),k(n)&&n()}})}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""==t)return e.style.webkitTransform="",e.style.MozTransform="",e.style.msTransform="",e.style.OTransform="",e.style.transform="",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function m(e){e.style.display="block"}function y(e){e.style.display="none"}function b(e){var t=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=e;n.firstChild;)t.appendChild(n.firstChild);return t}function w(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function x(){var e,t=document.createElement("fakeelement"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}function E(e,t,n,r){if(e())t();else{var i;n||(n=100);var o=setInterval((function(){e()&&(clearInterval(o),i&&clearTimeout(i),t())}),n);r&&(i=setTimeout((function(){clearInterval(o)}),r))}}function S(e,t,n){if(L(e))console.error("Inject videos api error");else{var r;if(k(t)&&(n=t,t=!1),-1!==e.indexOf(".css")){if((r=document.querySelectorAll('link[href="'+e+'"]'))&&r.length>0)return void(k(n)&&n());var i=document.getElementsByTagName("head")[0],o=i.querySelectorAll('link[rel="stylesheet"]'),s=document.createElement("link");return s.rel="stylesheet",s.type="text/css",s.href=e,s.media="all",o?i.insertBefore(s,o[0]):i.appendChild(s),void(k(n)&&n())}if((r=document.querySelectorAll('script[src="'+e+'"]'))&&r.length>0){if(k(n)){if(A(t))return E((function(){return void 0!==window[t]}),(function(){n()})),!1;n()}}else{var a=document.createElement("script");a.type="text/javascript",a.src=e,a.onload=function(){if(k(n)){if(A(t))return E((function(){return void 0!==window[t]}),(function(){n()})),!1;n()}},document.body.appendChild(a)}}}function C(){return"navigator"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function k(e){return"function"==typeof e}function A(e){return"string"==typeof e}function T(e){return!(!e||!e.nodeType||1!=e.nodeType)}function O(e){return Array.isArray(e)}function _(e){return e&&e.length&&isFinite(e.length)}function j(t){return"object"===e(t)&&null!=t&&!k(t)&&!O(t)}function L(e){return null==e}function q(e,t){return null!==e&&hasOwnProperty.call(e,t)}function N(e){if(j(e)){if(e.keys)return e.keys().length;var t=0;for(var n in e)q(e,n)&&t++;return t}return e.length}function D(e){return!isNaN(parseFloat(e))&&isFinite(e)}function I(e){if(e.events.hasOwnProperty("keyboard"))return!1;e.events.keyboard=u("keydown",{onElement:window,withCallback:function(t,n){var r=(t=t||window.event).keyCode;if(9==r){var o=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if("input"==o||"textarea"==o||"button"==o)return;t.preventDefault();var s=document.querySelectorAll(".gbtn");if(!s||s.length<=0)return;var a=i(s).filter((function(e){return f(e,"focused")}));if(!a.length){var l=document.querySelector('.gbtn[tabindex="0"]');return void(l&&(l.focus(),d(l,"focused")))}s.forEach((function(e){return h(e,"focused")}));var c=a[0].getAttribute("tabindex");c=c||"0";var u=parseInt(c)+1;u>s.length-1&&(u="0");var p=document.querySelector('.gbtn[tabindex="'.concat(u,'"]'));p&&(p.focus(),d(p,"focused"))}39==r&&e.nextSlide(),37==r&&e.prevSlide(),27==r&&e.close()}})}function P(e){return Math.sqrt(e.x*e.x+e.y*e.y)}var M=function(){function e(n){t(this,e),this.handlers=[],this.el=n}return r(e,[{key:"add",value:function(e){this.handlers.push(e)}},{key:"del",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:"dispatch",value:function(){for(var e=0,t=this.handlers.length;e0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var n={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=n.x,t.y=n.y,this.pinchStartLen=P(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}},{key:"move",value:function(e){if(e.touches){var t=this.preV,n=e.touches.length,r=e.touches[0].pageX,i=e.touches[0].pageY;if(this.isDoubleTap=!1,n>1){var o=e.touches[1].pageX,s=e.touches[1].pageY,a={x:e.touches[1].pageX-r,y:e.touches[1].pageY-i};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=P(a)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=function(e,t){var n=function(e,t){var n=P(e)*P(t);if(0===n)return 0;var r=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/n;return r>1&&(r=1),Math.acos(r)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(n*=-1),180*n/Math.PI}(a,t),this.rotate.dispatch(e,this.element)),t.x=a.x,t.y=a.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(r-this.x2+o-this.sx2)/2,e.deltaY=(i-this.y2+s-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=o,this.sy2=s}else{if(null!==this.x2){e.deltaX=r-this.x2,e.deltaY=i-this.y2;var l=Math.abs(this.x1-this.x2),c=Math.abs(this.y1-this.y2);(l>10||c>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=r,this.y2=i,n>1&&e.preventDefault()}}},{key:"end",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){t.swipe.dispatch(e,t.element)}),0)):(this.tapTimeout=setTimeout((function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)}),0),t.isDoubleTap||(t.singleTapTimeout=setTimeout((function(){t.singleTap.dispatch(e,t.element)}),250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:"cancelAll",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:"cancel",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:"_cancelLongTap",value:function(){clearTimeout(this.longTapTimeout)}},{key:"_cancelSingleTap",value:function(){clearTimeout(this.singleTapTimeout)}},{key:"_swipeDirection",value:function(e,t,n,r){return Math.abs(e-t)>=Math.abs(n-r)?e-t>0?"Left":"Right":n-r>0?"Up":"Down"}},{key:"on",value:function(e,t){this[e]&&this[e].add(t)}},{key:"off",value:function(e,t){this[e]&&this[e].del(t)}},{key:"destroy",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener("scroll",this._cancelAllHandler),null}}]),e}();function F(e){var t=function(){var e,t=document.createElement("fakeelement"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}(),n=f(e,"gslide-media")?e:e.querySelector(".gslide-media"),r=e.querySelector(".gslide-description");d(n,"greset"),v(n,"translate3d(0, 0, 0)"),u(t,{onElement:n,once:!0,withCallback:function(e,t){h(n,"greset")}}),n.style.opacity="",r&&(r.style.opacity="")}function H(e){if(e.events.hasOwnProperty("touch"))return!1;var t,n,r,i=w(),o=i.width,s=i.height,a=!1,l=null,c=null,u=null,g=!1,m=1,y=1,b=!1,x=!1,E=null,S=null,C=null,k=null,A=0,T=0,O=!1,_=!1,j={},L={},q=0,N=0,D=document.getElementById("glightbox-slider"),I=document.querySelector(".goverlay"),P=new z(D,{touchStart:function(t){if(f(t.targetTouches[0].target,"ginner-container")||p(t.targetTouches[0].target,".gslide-desc"))return a=!1,!1;a=!0,L=t.targetTouches[0],j.pageX=t.targetTouches[0].pageX,j.pageY=t.targetTouches[0].pageY,q=t.targetTouches[0].clientX,N=t.targetTouches[0].clientY,l=e.activeSlide,c=l.querySelector(".gslide-media"),r=l.querySelector(".gslide-inline"),u=null,f(c,"gslide-image")&&(u=c.querySelector("img")),h(I,"greset"),t.pageX>20&&t.pageXs){var l=j.pageX-L.pageX;if(Math.abs(l)<=13)return!1}g=!0;var d,h=i.targetTouches[0].clientX,f=i.targetTouches[0].clientY,p=q-h,m=N-f;if(Math.abs(p)>Math.abs(m)?(O=!1,_=!0):(_=!1,O=!0),t=L.pageX-j.pageX,A=100*t/o,n=L.pageY-j.pageY,T=100*n/s,O&&u&&(d=1-Math.abs(n)/s,I.style.opacity=d,e.settings.touchFollowAxis&&(A=0)),_&&(d=1-Math.abs(t)/o,c.style.opacity=d,e.settings.touchFollowAxis&&(T=0)),!u)return v(c,"translate3d(".concat(A,"%, 0, 0)"));v(c,"translate3d(".concat(A,"%, ").concat(T,"%, 0)"))}},touchEnd:function(){if(a){if(g=!1,x||b)return C=E,void(k=S);var t=Math.abs(parseInt(T)),n=Math.abs(parseInt(A));if(!(t>29&&u))return t<29&&n<25?(d(I,"greset"),I.style.opacity=1,F(c)):void 0;e.close()}},multipointEnd:function(){setTimeout((function(){b=!1}),50)},multipointStart:function(){b=!0,m=y||1},pinch:function(e){if(!u||g)return!1;b=!0,u.scaleX=u.scaleY=m*e.zoom;var t=m*e.zoom;if(x=!0,t<=1)return x=!1,t=1,k=null,C=null,E=null,S=null,void u.setAttribute("style","");t>4.5&&(t=4.5),u.style.transform="scale3d(".concat(t,", ").concat(t,", 1)"),y=t},pressMove:function(e){if(x&&!b){var t=L.pageX-j.pageX,n=L.pageY-j.pageY;C&&(t+=C),k&&(n+=k),E=t,S=n;var r="translate3d(".concat(t,"px, ").concat(n,"px, 0)");y&&(r+=" scale3d(".concat(y,", ").concat(y,", 1)")),v(u,r)}},swipe:function(t){if(!x)if(b)b=!1;else{if("Left"==t.direction){if(e.index==e.elements.length-1)return F(c);e.nextSlide()}if("Right"==t.direction){if(0==e.index)return F(c);e.prevSlide()}}}});e.events.touch=P}var U=function(){function e(n,r){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t(this,e),this.img=n,this.slide=r,this.onclose=o,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener("mousedown",(function(e){return i.dragStart(e)}),!1),this.img.addEventListener("mouseup",(function(e){return i.dragEnd(e)}),!1),this.img.addEventListener("mousemove",(function(e){return i.drag(e)}),!1),this.img.addEventListener("click",(function(e){return i.slide.classList.contains("dragging-nav")?(i.zoomOut(),!1):i.zoomedIn?void(i.zoomedIn&&!i.dragging&&i.zoomOut()):i.zoomIn()}),!1),this.img.setZoomEvents=!0}return r(e,[{key:"zoomIn",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute("data-style",t.getAttribute("style")),t.style.maxWidth=t.naturalWidth+"px",t.style.maxHeight=t.naturalHeight+"px",t.naturalWidth>e){var n=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,n,0)}this.slide.classList.add("zoomed"),this.zoomedIn=!0}}},{key:"zoomOut",value:function(){this.img.parentNode.setAttribute("style",""),this.img.setAttribute("style",this.img.getAttribute("data-style")),this.slide.classList.remove("zoomed"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&"function"==typeof this.onclose&&this.onclose()}},{key:"dragStart",value:function(e){e.preventDefault(),this.zoomedIn?("touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add("dragging"))):this.active=!1}},{key:"dragEnd",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove("dragging")}),100)}},{key:"drag",value:function(e){this.active&&(e.preventDefault(),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:"onMove",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,n=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,n)}}},{key:"setTranslate",value:function(e,t,n){e.style.transform="translate3d("+t+"px, "+n+"px, 0)"}},{key:"widowWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),e}(),B=function(){function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);var i=r.dragEl,o=r.toleranceX,s=void 0===o?40:o,a=r.toleranceY,l=void 0===a?65:a,c=r.slide,u=void 0===c?null:c,d=r.instance,h=void 0===d?null:d;this.el=i,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=s,this.toleranceY=l,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=u,this.instance=h,this.el.addEventListener("mousedown",(function(e){return n.dragStart(e)}),!1),this.el.addEventListener("mouseup",(function(e){return n.dragEnd(e)}),!1),this.el.addEventListener("mousemove",(function(e){return n.drag(e)}),!1)}return r(e,[{key:"dragStart",value:function(e){if(this.slide.classList.contains("zoomed"))this.active=!1;else{"touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains("nodrag")||p(e.target,".nodrag")||-1!==["input","select","textarea","button","a"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||"img"!==t&&p(e.target,".gslide-inline"))&&(this.active=!0,this.el.classList.add("dragging"),this.dragContainer=p(e.target,".ginner-container")))}}},{key:"dragEnd",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,"right"==this.doSlideChange&&this.instance.prevSlide(),"left"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout((function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove("dragging"),t.slide.classList.remove("dragging-nav"),t.dragContainer.style.transform="",t.dragContainer.style.transition=""}),100)}},{key:"drag",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add("dragging-nav"),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),n=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||"x"==this.lastDirection)){this.yOffset=0,this.lastDirection="x",this.setTranslate(this.dragContainer,this.currentX,0);var r=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&r&&(this.doSlideChange=r),this.instance.settings.dragAutoSnap&&r)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),"right"==r&&this.instance.prevSlide(),void("left"==r&&this.instance.nextSlide())}if(this.toleranceY>0&&n>0&&n>=t&&(!this.lastDirection||"y"==this.lastDirection)){this.xOffset=0,this.lastDirection="y",this.setTranslate(this.dragContainer,0,this.currentY);var i=this.shouldClose();return!this.instance.settings.dragAutoSnap&&i&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&i&&this.instance.close())}}}},{key:"shouldChange",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?"right":"left";("left"==t&&this.slide!==this.slide.parentNode.lastChild||"right"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:"shouldClose",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:"setTranslate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=r?"all .2s ease":"",e.style.transform="translate3d("+t+"px, "+n+"px, 0)"}}]),e}();function W(e,t,n){var r=e.querySelector(".gslide-media"),i=new Image,o="gSlideTitle_"+t.index,s="gSlideDesc_"+t.index;i.addEventListener("load",(function(){k(n)&&n()}),!1),i.src=t.href,i.alt="",""!==t.title&&i.setAttribute("aria-labelledby",o),""!==t.description&&i.setAttribute("aria-describedby",s),r.insertBefore(i,r.firstChild)}function V(e,t,n){var r=this,i=e.querySelector(".ginner-container"),o="gvideo"+t.index,s=e.querySelector(".gslide-media"),a=this.getAllPlayers();d(i,"gvideo-container"),s.insertBefore(b('
'),s.firstChild);var l=e.querySelector(".gvideo-wrapper");S(this.settings.plyr.css);var c=t.href,u=location.protocol.replace(":",""),h="",f="",p=!1;"file"==u&&(u="http"),s.style.maxWidth=t.width,S(this.settings.plyr.js,"Plyr",(function(){if(c.match(/vimeo\.com\/([0-9]*)/)){var e=/vimeo.*\/(\d+)/i.exec(c);h="vimeo",f=e[1]}if(c.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||c.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||c.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)){var i=function(e){return void 0!==(e=e.replace(/(>|<)/gi,"").split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/))[2]?e[2].split(/[^0-9a-z_\-]/i)[0]:e}(c);h="youtube",f=i}if(null!==c.match(/\.(mp4|ogg|webm|mov)$/)){h="local";var s='';var u=c.toLowerCase().split(".").pop(),g={mp4:"",ogg:"",webm:""};for(var v in g[u="mov"==u?"mp4":u]=c,g)if(g.hasOwnProperty(v)){var m=g[v];t.hasOwnProperty(v)&&(m=t[v]),""!==m&&(s+=''))}p=b(s+=" ")}var y=p||b('
'));d(l,"".concat(h,"-video gvideo")),l.appendChild(y),l.setAttribute("data-id",o),l.setAttribute("data-index",t.index);var w=q(r.settings.plyr,"config")?r.settings.plyr.config:{},x=new Plyr("#"+o,w);x.on("ready",(function(e){var t=e.detail.plyr;a[o]=t,k(n)&&n()})),x.on("enterfullscreen",X),x.on("exitfullscreen",X)}))}function X(e){var t=p(e.target,".gslide-media");"enterfullscreen"==e.type&&d(t,"fullscreen"),"exitfullscreen"==e.type&&h(t,"fullscreen")}function Y(e,t,n){var r,i=this,o=e.querySelector(".gslide-media"),s=!(!q(t,"href")||!t.href)&&t.href.split("#").pop().trim(),a=!(!q(t,"content")||!t.content)&&t.content;if(a&&(A(a)&&(r=b(''.concat(a,"
"))),T(a))){"none"==a.style.display&&(a.style.display="block");var l=document.createElement("div");l.className="ginlined-content",l.appendChild(a),r=l}if(s){var c=document.getElementById(s);if(!c)return!1;var h=c.cloneNode(!0);h.style.height=t.height,h.style.maxWidth=t.width,d(h,"ginlined-content"),r=h}if(!r)return console.error("Unable to append inline slide content",t),!1;o.style.height=t.height,o.style.width=t.width,o.appendChild(r),this.events["inlineclose"+s]=u("click",{onElement:o.querySelectorAll(".gtrigger-close"),withCallback:function(e){e.preventDefault(),i.close()}}),k(n)&&n()}function G(e,t,n){var r=e.querySelector(".gslide-media"),i=function(e){var t=e.url,n=e.allow,r=e.callback,i=e.appendTo,o=document.createElement("iframe");return o.className="vimeo-video gvideo",o.src=t,o.style.width="100%",o.style.height="100%",n&&o.setAttribute("allow",n),o.onload=function(){d(o,"node-ready"),k(r)&&r()},i&&i.appendChild(o),o}({url:t.href,callback:n});r.parentNode.style.maxWidth=t.width,r.parentNode.style.height=t.height,r.appendChild(i)}var J=function(){function e(n,r){t(this,e),this.element=n,this.settings=r,this.defaults={href:"",title:"",type:"",description:"",descPosition:"bottom",effect:"",width:"",height:"",node:!1,content:!1,zoomable:!0,draggable:!0}}return r(e,[{key:"sourceType",value:function(e){var t=e;return null!==(e=e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|svg)$/)?"image":e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)||null!==e.match(/\.(mp4|ogg|webm|mov)$/)?"video":null!==e.match(/\.(mp3|wav|wma|aac|ogg)$/)?"audio":e.indexOf("#")>-1&&""!==t.split("#").pop().trim()?"inline":e.indexOf("goajax=true")>-1?"ajax":"external"}},{key:"parseConfig",value:function(e,t){var n=this,r=a({descPosition:t.descPosition},this.defaults);if(j(e)&&!T(e)){q(e,"type")||(q(e,"content")&&e.content?e.type="inline":q(e,"href")&&(e.type=this.sourceType(e.href)));var i=a(r,e);return this.setSize(i,t),i}var o="",s=e.getAttribute("data-glightbox"),c=e.nodeName.toLowerCase();if("a"===c&&(o=e.href),"img"===c&&(o=e.src),r.href=o,l(r,(function(i,o){q(t,o)&&"width"!==o&&(r[o]=t[o]);var s=e.dataset[o];L(s)||(r[o]=n.sanitizeValue(s))})),r.content&&(r.type="inline"),!r.type&&o&&(r.type=this.sourceType(o)),L(s)){if("a"==c){var u=e.title;L(u)||""===u||(r.title=u)}if("img"==c){var d=e.alt;L(d)||""===d||(r.title=d)}var h=e.getAttribute("data-description");L(h)||""===h||(r.description=h)}else{var f=[];l(r,(function(e,t){f.push(";\\s?"+t)})),f=f.join("\\s?:|"),""!==s.trim()&&l(r,(function(e,t){var i=s,o=new RegExp("s?"+t+"s?:s?(.*?)("+f+"s?:|$)"),a=i.match(o);if(a&&a.length&&a[1]){var l=a[1].trim().replace(/;\s*$/,"");r[t]=n.sanitizeValue(l)}}))}if(r.description&&"."==r.description.substring(0,1)&&document.querySelector(r.description))r.description=document.querySelector(r.description).innerHTML;else{var p=e.querySelector(".glightbox-desc");p&&(r.description=p.innerHTML)}return this.setSize(r,t),this.slideConfig=r,r}},{key:"setSize",value:function(e,t){var n="video"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),r=this.checkSize(t.height);return e.width=q(e,"width")&&""!==e.width?this.checkSize(e.width):n,e.height=q(e,"height")&&""!==e.height?this.checkSize(e.height):r,e}},{key:"checkSize",value:function(e){return D(e)?"".concat(e,"px"):e}},{key:"sanitizeValue",value:function(e){return"true"!==e&&"false"!==e?e:"true"===e}}]),e}(),$=function(){function e(n,r){t(this,e),this.element=n,this.instance=r}return r(e,[{key:"setContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(f(t,"loaded"))return!1;var r=this.instance.settings,i=this.slideConfig,o=C();k(r.beforeSlideLoad)&&r.beforeSlideLoad({index:i.index,slide:t,player:!1});var s=i.type,a=i.descPosition,l=t.querySelector(".gslide-media"),c=t.querySelector(".gslide-title"),u=t.querySelector(".gslide-desc"),h=t.querySelector(".gdesc-inner"),p=n,g="gSlideTitle_"+i.index,v="gSlideDesc_"+i.index;if(k(r.afterSlideLoad)&&(p=function(){k(n)&&n(),r.afterSlideLoad({index:i.index,slide:t,player:e.instance.getSlidePlayerInstance(i.index)})}),""==i.title&&""==i.description?h&&h.parentNode.parentNode.removeChild(h.parentNode):(c&&""!==i.title?(c.id=g,c.innerHTML=i.title):c.parentNode.removeChild(c),u&&""!==i.description?(u.id=v,o&&r.moreLength>0?(i.smallDescription=this.slideShortDesc(i.description,r.moreLength,r.moreText),u.innerHTML=i.smallDescription,this.descriptionEvents(u,i)):u.innerHTML=i.description):u.parentNode.removeChild(u),d(l.parentNode,"desc-".concat(a)),d(h.parentNode,"description-".concat(a))),d(l,"gslide-".concat(s)),d(t,"loaded"),"video"!==s){if("external"!==s)return"inline"===s?(Y.apply(this.instance,[t,i,p]),void(i.draggable&&new B({dragEl:t.querySelector(".gslide-inline"),toleranceX:r.dragToleranceX,toleranceY:r.dragToleranceY,slide:t,instance:this.instance}))):void("image"!==s?k(p)&&p():W(t,i,(function(){var n=t.querySelector("img");i.draggable&&new B({dragEl:n,toleranceX:r.dragToleranceX,toleranceY:r.dragToleranceY,slide:t,instance:e.instance}),i.zoomable&&n.naturalWidth>n.offsetWidth&&(d(n,"zoomable"),new U(n,t,(function(){e.instance.resize()}))),k(p)&&p()})));G.apply(this,[t,i,p])}else V.apply(this.instance,[t,i,p])}},{key:"slideShortDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n;if((e=e.trim()).length<=t)return e;var i=e.substr(0,t-1);return r?i+'... '+n+" ":i}},{key:"descriptionEvents",value:function(e,t){var n=this,r=e.querySelector(".desc-more");if(!r)return!1;u("click",{onElement:r,withCallback:function(e,r){e.preventDefault();var i=document.body,o=p(r,".gslide-desc");if(!o)return!1;o.innerHTML=t.description,d(i,"gdesc-open");var s=u("click",{onElement:[i,p(o,".gslide-description")],withCallback:function(e,r){"a"!==e.target.nodeName.toLowerCase()&&(h(i,"gdesc-open"),d(i,"gdesc-closed"),o.innerHTML=t.smallDescription,n.descriptionEvents(o,t),setTimeout((function(){h(i,"gdesc-closed")}),400),s.destroy())}})}})}},{key:"create",value:function(){return b(this.instance.settings.slideHTML)}},{key:"getConfig",value:function(){var e=new J;return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]),e}(),Z=C(),Q=null!==C()||void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,K=document.getElementsByTagName("html")[0],ee={selector:".glightbox",elements:null,skin:"clean",closeButton:!0,startAt:null,autoplayVideos:!0,descPosition:"bottom",width:"900px",height:"506px",videosWidth:"960px",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plyr:{css:"https://cdn.plyr.io/3.5.6/plyr.css",js:"https://cdn.plyr.io/3.5.6/plyr.js",config:{ratio:"16:9",youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:"zoom",closeEffect:"zoom",slideEffect:"slide",moreText:"See more",moreLength:60,lightboxHTML:'\n
\n
\n
\n
\n
{nextSVG} \n
{prevSVG} \n
{closeSVG} \n
\n
',cssEfects:{fade:{in:"fadeIn",out:"fadeOut"},zoom:{in:"zoomIn",out:"zoomOut"},slide:{in:"slideInRight",out:"slideOutLeft"},slide_back:{in:"slideInLeft",out:"slideOutRight"},none:{in:"none",out:"none"}},svg:{close:' ',next:' ',prev:' '},slideHTML:''},te=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.settings=a(ee,n),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}return r(e,[{key:"init",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=u("click",{onElement:t,withCallback:function(t,n){t.preventDefault(),e.open(n)}})),this.elements=this.getElements()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0==this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var n=D(t)?t:this.settings.startAt;if(T(e)){var r=e.getAttribute("data-gallery");r&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,r)),L(n)&&(n=this.getElementIndex(e))<0&&(n=0)}D(n)||(n=0),this.build(),g(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.in);var i=document.body,o=window.innerWidth-document.documentElement.clientWidth;if(o>0){var s=document.createElement("style");s.type="text/css",s.className="gcss-styles",s.innerText=".gscrollbar-fixer {margin-right: ".concat(o,"px}"),document.head.appendChild(s),d(i,"gscrollbar-fixer")}d(i,"glightbox-open"),d(K,"glightbox-open"),Z&&(d(document.body,"glightbox-mobile"),this.settings.slideEffect="slide"),this.showSlide(n,!0),1==this.elements.length?(y(this.prevButton),y(this.nextButton)):(m(this.prevButton),m(this.nextButton)),this.lightboxOpen=!0,this.trigger("open"),k(this.settings.onOpen)&&this.settings.onOpen(),Q&&this.settings.touchNavigation&&H(this),this.settings.keyboardNavigation&&I(this)}},{key:"openAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:"showSlide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m(this.loader),this.index=parseInt(t);var r=this.slidesContainer.querySelector(".current");r&&h(r,"current"),this.slideAnimateOut();var i=this.slidesContainer.querySelectorAll(".gslide")[t];if(f(i,"loaded"))this.slideAnimateIn(i,n),y(this.loader);else{m(this.loader);var o=this.elements[t];this.trigger("slide_before_load",o),o.instance.setContent(i,(function(){y(e.loader),e.resize(),e.slideAnimateIn(i,n),e.trigger("slide_after_load",o)}))}this.slideDescription=i.querySelector(".gslide-description"),this.slideDescriptionContained=this.slideDescription&&f(this.slideDescription.parentNode,"gslide-media"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=i}},{key:"preloadSlide",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(L(this.elements[e]))return!1;var n=this.slidesContainer.querySelectorAll(".gslide")[e];if(f(n,"loaded"))return!1;var r=this.elements[e],i=r.type;this.trigger("slide_before_load",r),"video"==i||"external"==i?setTimeout((function(){r.instance.setContent(n,(function(){t.trigger("slide_after_load",r)}))}),200):r.instance.setContent(n,(function(){t.trigger("slide_after_load",r)}))}},{key:"prevSlide",value:function(){this.goToSlide(this.index-1)}},{key:"nextSlide",value:function(){this.goToSlide(this.index+1)}},{key:"goToSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:"insertSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=new $(e,this),r=n.getConfig(),i=n.create(),o=this.elements.length-1;if(t<0&&(t=this.elements.length),r.index=t,r.node=!1,r.instance=n,this.elements.splice(t,0,r),this.slidesContainer){if(t>o)this.slidesContainer.appendChild(i);else{var s=this.slidesContainer.querySelectorAll(".gslide")[t];this.slidesContainer.insertBefore(i,s)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0==this.index&&0==t&&(this.index=1),this.updateNavigationClasses()}this.trigger("slide_inserted",{index:t,slide:this.slidesContainer.querySelectorAll(".gslide")[t],player:this.getSlidePlayerInstance(t)}),k(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:this.slidesContainer.querySelectorAll(".gslide")[t],player:this.getSlidePlayerInstance(t)})}},{key:"removeSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(".gslide")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger("slide_removed",e),k(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:"slideAnimateIn",value:function(e,t){var n=this,r=e.querySelector(".gslide-media"),i=e.querySelector(".gslide-description"),o={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},s={index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)};if(r.offsetWidth>0&&i&&(y(i),i.style.display=""),h(e,this.effectsClasses),t)g(e,this.settings.cssEfects[this.settings.openEffect].in,(function(){!Z&&n.settings.autoplayVideos&&n.slidePlayerPlay(e),n.trigger("slide_changed",{prev:o,current:s}),k(n.settings.afterSlideChange)&&n.settings.afterSlideChange.apply(n,[o,s])}));else{var a=this.settings.slideEffect,l="none"!==a?this.settings.cssEfects[a].in:a;this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(l=this.settings.cssEfects.slide_back.in),g(e,l,(function(){!Z&&n.settings.autoplayVideos&&n.slidePlayerPlay(e),n.trigger("slide_changed",{prev:o,current:s}),k(n.settings.afterSlideChange)&&n.settings.afterSlideChange.apply(n,[o,s])}))}setTimeout((function(){n.resize(e)}),100),d(e,"current")}},{key:"slideAnimateOut",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;h(e,this.effectsClasses),d(e,"prev");var t=this.settings.slideEffect,n="none"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger("slide_before_change",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}}),k(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(n=this.settings.cssEfects.slide_back.out),g(e,n,(function(){var t=e.querySelector(".gslide-media"),n=e.querySelector(".gslide-description");t.style.transform="",h(t,"greset"),t.style.opacity="",n&&(n.style.opacity=""),h(e,"prev")}))}},{key:"getAllPlayers",value:function(){return this.videoPlayers}},{key:"getSlidePlayerInstance",value:function(e){var t="gvideo"+e,n=this.getAllPlayers();return!(!q(n,t)||!n[t])&&n[t]}},{key:"stopSlideVideo",value:function(e){if(T(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("stopSlideVideo is deprecated, use slidePlayerPause");var n=this.getSlidePlayerInstance(e);n&&n.playing&&n.pause()}},{key:"slidePlayerPause",value:function(e){if(T(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}var n=this.getSlidePlayerInstance(e);n&&n.playing&&n.pause()}},{key:"playSlideVideo",value:function(e){if(T(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("playSlideVideo is deprecated, use slidePlayerPlay");var n=this.getSlidePlayerInstance(e);n&&!n.playing&&n.play()}},{key:"slidePlayerPlay",value:function(e){if(T(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&n.play()}},{key:"setElements",value:function(e){var t=this;this.settings.elements=!1;var n=[];e&&e.length&&l(e,(function(e,r){var i=new $(e,t),o=i.getConfig();o.instance=i,o.index=r,n.push(o)})),this.elements=n,this.lightboxOpen&&(this.slidesContainer.innerHTML="",this.elements.length&&(l(this.elements,(function(){var e=b(t.settings.slideHTML);t.slidesContainer.appendChild(e)})),this.showSlide(0,!0)))}},{key:"getElementIndex",value:function(e){var t=!1;return l(this.elements,(function(n,r){if(q(n,"node")&&n.node==e)return t=r,!0})),t}},{key:"getElements",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!L(this.settings.elements)&&O(this.settings.elements)&&this.settings.elements.length&&l(this.settings.elements,(function(n,r){var i=new $(n,e),o=i.getConfig();o.node=!1,o.index=r,o.instance=i,t.push(o)}));var n=!1;return this.getSelector()&&(n=document.querySelectorAll(this.getSelector())),n?(l(n,(function(n,r){var i=new $(n,e),o=i.getConfig();o.node=n,o.index=r,o.instance=i,o.gallery=n.getAttribute("data-gallery"),t.push(o)})),t):t}},{key:"getGalleryElements",value:function(e,t){return e.filter((function(e){return e.gallery==t}))}},{key:"getSelector",value:function(){return!this.settings.elements&&(this.settings.selector&&"data-"==this.settings.selector.substring(0,5)?"*[".concat(this.settings.selector,"]"):this.settings.selector)}},{key:"getActiveSlide",value:function(){return this.slidesContainer.querySelectorAll(".gslide")[this.index]}},{key:"getActiveSlideIndex",value:function(){return this.index}},{key:"getAnimationClasses",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var n=this.settings.cssEfects[t];e.push("g".concat(n.in)),e.push("g".concat(n.out))}return e.join(" ")}},{key:"build",value:function(){var e=this;if(this.built)return!1;var t=q(this.settings.svg,"next")?this.settings.svg.next:"",n=q(this.settings.svg,"prev")?this.settings.svg.prev:"",r=q(this.settings.svg,"close")?this.settings.svg.close:"",i=this.settings.lightboxHTML;i=b(i=(i=(i=i.replace(/{nextSVG}/g,t)).replace(/{prevSVG}/g,n)).replace(/{closeSVG}/g,r)),document.body.appendChild(i);var o=document.getElementById("glightbox-body");this.modal=o;var s=o.querySelector(".gclose");this.prevButton=o.querySelector(".gprev"),this.nextButton=o.querySelector(".gnext"),this.overlay=o.querySelector(".goverlay"),this.loader=o.querySelector(".gloader"),this.slidesContainer=document.getElementById("glightbox-slider"),this.events={},d(this.modal,"glightbox-"+this.settings.skin),this.settings.closeButton&&s&&(this.events.close=u("click",{onElement:s,withCallback:function(t,n){t.preventDefault(),e.close()}})),s&&!this.settings.closeButton&&s.parentNode.removeChild(s),this.nextButton&&(this.events.next=u("click",{onElement:this.nextButton,withCallback:function(t,n){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=u("click",{onElement:this.prevButton,withCallback:function(t,n){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=u("click",{onElement:o,withCallback:function(t,n){e.preventOutsideClick||f(document.body,"glightbox-mobile")||p(t.target,".ginner-container")||p(t.target,".gbtn")||f(t.target,"gnext")||f(t.target,"gprev")||e.close()}})),l(this.elements,(function(t){e.slidesContainer.appendChild(t.instance.create())})),Q&&d(document.body,"glightbox-touch"),this.events.resize=u("resize",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!f(e,"zoomed")){var t=w(),n=e.querySelector(".gvideo-wrapper"),r=e.querySelector(".gslide-image"),i=this.slideDescription,o=t.width,s=t.height;if(o<=768?d(document.body,"glightbox-mobile"):h(document.body,"glightbox-mobile"),n||r){var a=!1;if(i&&(f(i,"description-bottom")||f(i,"description-top"))&&!f(i,"gabsolute")&&(a=!0),r)if(o<=768){var l=r.querySelector("img");l.setAttribute("style","")}else if(a){var c=i.offsetHeight,u=r.querySelector("img");u.setAttribute("style","max-height: calc(100vh - ".concat(c,"px)")),i.setAttribute("style","max-width: ".concat(u.offsetWidth,"px;"))}if(n){var p=q(this.settings.plyr.config,"ratio")?this.settings.plyr.config.ratio:"16:9",g=p.split(":"),v=900,m=v/(parseInt(g[0])/parseInt(g[1]));if(m=Math.floor(m),a&&(s-=i.offsetHeight),sv){var y=n.offsetWidth,b=n.offsetHeight,x=s/b,E={width:y*x,height:b*x};n.parentNode.setAttribute("style","max-width: ".concat(E.width,"px")),a&&i.setAttribute("style","max-width: ".concat(E.width,"px;"))}else n.parentNode.style.maxWidth="".concat(v,"px"),a&&i.setAttribute("style","max-width: ".concat(v,"px;"))}}}}},{key:"reload",value:function(){this.init()}},{key:"updateNavigationClasses",value:function(){var e=this.loop();h(this.nextButton,"disabled"),h(this.prevButton,"disabled"),0==this.index&&this.elements.length-1==0?(d(this.prevButton,"disabled"),d(this.nextButton,"disabled")):0!==this.index||e?this.index!==this.elements.length-1||e||d(this.nextButton,"disabled"):d(this.prevButton,"disabled")}},{key:"loop",value:function(){var e=q(this.settings,"loopAtEnd")?this.settings.loopAtEnd:null;return e=q(this.settings,"loop")?this.settings.loop:e}},{key:"close",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),d(this.modal,"glightbox-closing"),g(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.out),g(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,(function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var n=document.body;h(K,"glightbox-open"),h(n,"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"),e.modal.parentNode.removeChild(e.modal),e.trigger("close"),k(e.settings.onClose)&&e.settings.onClose();var r=document.querySelector(".gcss-styles");r&&r.parentNode.removeChild(r),e.lightboxOpen=!1,e.closing=null}))}},{key:"destroy",value:function(){this.close(),this.clearAllEvents(),this.baseEvents.destroy()}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!k(t))throw new TypeError("Event name and callback must be defined");this.apiEvents.push({evt:e,once:n,callback:t})}},{key:"once",value:function(e,t){this.on(e,t,!0)}},{key:"trigger",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[];l(this.apiEvents,(function(t,i){var o=t.evt,s=t.once,a=t.callback;o==e&&(a(n),s&&r.push(i))})),r.length&&l(r,(function(e){return t.apiEvents.splice(e,1)}))}},{key:"clearAllEvents",value:function(){this.apiEvents.push({evt:evt,once:once,callback:callback})}},{key:"version",value:function(){return"3.0.5"}}]),e}();return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new te(e);return t.init(),t}}()},function(e,t,n){"use strict";
+/*! npm.im/object-fit-images 3.2.4 */var r="bfred-it:object-fit-images",i=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,o="undefined"==typeof Image?{style:{"object-position":1}}:new Image,s="object-fit"in o.style,a="object-position"in o.style,l="background-size"in o.style,c="string"==typeof o.currentSrc,u=o.getAttribute,d=o.setAttribute,h=!1;function f(e,t,n){var r="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+(t||1)+"' height='"+(n||0)+"'%3E%3C/svg%3E";u.call(e,"src")!==r&&d.call(e,"src",r)}function p(e,t){e.naturalWidth?t(e):setTimeout(p,100,e,t)}function g(e){var t=function(e){for(var t,n=getComputedStyle(e).fontFamily,r={};null!==(t=i.exec(n));)r[t[1]]=t[2];return r}(e),n=e[r];if(t["object-fit"]=t["object-fit"]||"fill",!n.img){if("fill"===t["object-fit"])return;if(!n.skipTest&&s&&!t["object-position"])return}if(!n.img){n.img=new Image(e.width,e.height),n.img.srcset=u.call(e,"data-ofi-srcset")||e.srcset,n.img.src=u.call(e,"data-ofi-src")||e.src,d.call(e,"data-ofi-src",e.src),e.srcset&&d.call(e,"data-ofi-srcset",e.srcset),f(e,e.naturalWidth||e.width,e.naturalHeight||e.height),e.srcset&&(e.srcset="");try{!function(e){var t={get:function(t){return e[r].img[t||"src"]},set:function(t,n){return e[r].img[n||"src"]=t,d.call(e,"data-ofi-"+n,t),g(e),t}};Object.defineProperty(e,"src",t),Object.defineProperty(e,"currentSrc",{get:function(){return t.get("currentSrc")}}),Object.defineProperty(e,"srcset",{get:function(){return t.get("srcset")},set:function(e){return t.set(e,"srcset")}})}(e)}catch(e){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}!function(e){if(e.srcset&&!c&&window.picturefill){var t=window.picturefill._;e[t.ns]&&e[t.ns].evaled||t.fillImg(e,{reselect:!0}),e[t.ns].curSrc||(e[t.ns].supported=!1,t.fillImg(e,{reselect:!0})),e.currentSrc=e[t.ns].curSrc||e.src}}(n.img),e.style.backgroundImage='url("'+(n.img.currentSrc||n.img.src).replace(/"/g,'\\"')+'")',e.style.backgroundPosition=t["object-position"]||"center",e.style.backgroundRepeat="no-repeat",e.style.backgroundOrigin="content-box",/scale-down/.test(t["object-fit"])?p(n.img,(function(){n.img.naturalWidth>e.width||n.img.naturalHeight>e.height?e.style.backgroundSize="contain":e.style.backgroundSize="auto"})):e.style.backgroundSize=t["object-fit"].replace("none","auto").replace("fill","100% 100%"),p(n.img,(function(t){f(e,t.naturalWidth,t.naturalHeight)}))}function v(e,t){var n=!h&&!e;if(t=t||{},e=e||"img",a&&!t.skipTest||!l)return!1;"img"===e?e=document.getElementsByTagName("img"):"string"==typeof e?e=document.querySelectorAll(e):"length"in e||(e=[e]);for(var i=0;i<]/g}},function(e,t,n){"use strict";(function(t){var r=void 0!==t?t:n(0),i=0,o=null,s=function(e,t){(o=new r(e)).onOpen((function(){i=0})),o.onClose((function(){if(0===i&&t.close(),o=null,i<=10){var n=1e3*Math.pow(2,i)+100*Math.random();i+=1,setTimeout((function(){s(e,t)}),n)}})),o.onMessage((function(e){var n=JSON.parse(e);t[n.type]&&t[n.type](n.data)}))};e.exports=s}).call(this,n(0))},function(e,t,n){(function(t){e.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=!1,s=0;s1?this._listeners[e]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[e])}},r.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,n=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,n),t in this._listeners)for(var r=this._listeners[t],i=0;i=3e3&&e<=4999}"production"!==t.env.NODE_ENV&&(E=e("debug")("sockjs-client:main")),s(S,m),S.prototype.close=function(e,t){if(e&&!C(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==S.CLOSING&&this.readyState!==S.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},S.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===S.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===S.OPEN&&this._transport.send(c.quote(e))},S.version=e("./version"),S.CONNECTING=0,S.OPEN=1,S.CLOSING=2,S.CLOSED=3,S.prototype._receiveInfo=function(e,t){if(E("_receiveInfo",t),this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=f.extend(e,this._urlInfo),E("info",e);var n=i.filterToEnabled(this._transportsWhitelist,e);this._transports=n.main,E(this._transports.length+" enabled transports"),this._connect()}else this._close(1002,"Cannot connect to server")},S.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(E("attempt",e.transportName),e.needBody&&(!r.document.body||void 0!==r.document.readyState&&"complete"!==r.document.readyState&&"interactive"!==r.document.readyState))return E("waiting for body"),this._transports.unshift(e),void d.attachEvent("load",this._connect.bind(this));var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t),E("using timeout",t);var n=u.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),i=this._transportOptions[e.transportName];E("transport url",n);var o=new e(n,this._transUrl,i);return o.on("message",this._transportMessage.bind(this)),o.once("close",this._transportClose.bind(this)),o.transportName=e.transportName,void(this._transport=o)}this._close(2e3,"All transports failed",!1)},S.prototype._transportTimeout=function(){E("_transportTimeout"),this.readyState===S.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},S.prototype._transportMessage=function(e){E("_transportMessage",e);var t,n=this,r=e.slice(0,1),i=e.slice(1);switch(r){case"o":return void this._open();case"h":return this.dispatchEvent(new v("heartbeat")),void E("heartbeat",this.transport)}if(i)try{t=a.parse(i)}catch(e){E("bad json",i)}if(void 0!==t)switch(r){case"a":Array.isArray(t)&&t.forEach((function(e){E("message",n.transport,e),n.dispatchEvent(new w(e))}));break;case"m":E("message",this.transport,t),this.dispatchEvent(new w(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}else E("empty payload",i)},S.prototype._transportClose=function(e,t){E("_transportClose",this.transport,e,t),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),C(e)||2e3===e||this.readyState!==S.CONNECTING?this._close(e,t):this._connect()},S.prototype._open=function(){E("_open",this._transport&&this._transport.transportName,this.readyState),this.readyState===S.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=S.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new v("open")),E("connected",this.transport)):this._close(1006,"Server lost session")},S.prototype._close=function(e,t,n){E("_close",this.transport,e,t,n,this.readyState);var r=!1;if(this._ir&&(r=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===S.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=S.CLOSING,setTimeout(function(){this.readyState=S.CLOSED,r&&this.dispatchEvent(new v("error"));var i=new b("close");i.wasClean=n||!1,i.code=e||1e3,i.reason=t,this.dispatchEvent(i),this.onmessage=this.onclose=this.onerror=null,E("disconnected")}.bind(this),0)},S.prototype.countRTO=function(e){return e>100?4*e:300+e},n.exports=function(t){return i=h(t),e("./iframe-bootstrap")(S,t),S}}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./event/close":2,"./event/event":4,"./event/eventtarget":5,"./event/trans-message":6,"./iframe-bootstrap":8,"./info-receiver":12,"./location":13,"./shims":15,"./utils/browser":44,"./utils/escape":45,"./utils/event":46,"./utils/log":48,"./utils/object":49,"./utils/random":50,"./utils/transport":51,"./utils/url":52,"./version":53,debug:55,inherits:57,json3:58,"url-parse":61}],15:[function(e,t,n){"use strict";var r,i=Array.prototype,o=Object.prototype,s=Function.prototype,a=String.prototype,l=i.slice,c=o.toString,u=function(e){return"[object Function]"===o.toString.call(e)},d=function(e){return"[object String]"===c.call(e)},h=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();r=h?function(e,t,n,r){!r&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)};var f=function(e,t,n){for(var i in t)o.hasOwnProperty.call(t,i)&&r(e,i,t[i],n)},p=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function g(e){var t=+e;return t!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function v(){}f(s,{bind:function(e){var t=this;if(!u(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n=l.call(arguments,1),r=function(){if(this instanceof a){var r=t.apply(this,n.concat(l.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(l.call(arguments)))},i=Math.max(0,t.length-n.length),o=[],s=0;s>>0;if(!u(e))throw new TypeError;for(;++i>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=g(arguments[1])),r=r>=0?r:Math.max(0,n+r);r1?(S=void 0===/()??/.exec("")[1],a.split=function(e,t){var n=this;if(void 0===e&&0===t)return[];if("[object RegExp]"!==c.call(e))return C.call(this,e,t);var r,o,s,a,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),d=0;for(e=new RegExp(e.source,u+"g"),n+="",S||(r=new RegExp("^"+e.source+"$(?!\\s)",u)),t=void 0===t?-1>>>0:t>>>0;(o=e.exec(n))&&!((s=o.index+o[0].length)>d&&(l.push(n.slice(d,o.index)),!S&&o.length>1&&o[0].replace(r,(function(){for(var e=1;e1&&o.index=t));)e.lastIndex===o.index&&e.lastIndex++;return d===n.length?!a&&e.test("")||l.push(""):l.push(n.slice(d)),l.length>t?l.slice(0,t):l}):"0".split(void 0,0).length&&(a.split=function(e,t){return void 0===e&&0===t?[]:C.call(this,e,t)});var k=a.substr,A="".substr&&"b"!=="0b".substr(-1);f(a,{substr:function(e,t){return k.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},A)},{}],16:[function(e,t,n){"use strict";t.exports=[e("./transport/websocket"),e("./transport/xhr-streaming"),e("./transport/xdr-streaming"),e("./transport/eventsource"),e("./transport/lib/iframe-wrap")(e("./transport/eventsource")),e("./transport/htmlfile"),e("./transport/lib/iframe-wrap")(e("./transport/htmlfile")),e("./transport/xhr-polling"),e("./transport/xdr-polling"),e("./transport/lib/iframe-wrap")(e("./transport/xhr-polling")),e("./transport/jsonp-polling")]},{"./transport/eventsource":20,"./transport/htmlfile":21,"./transport/jsonp-polling":23,"./transport/lib/iframe-wrap":26,"./transport/websocket":38,"./transport/xdr-polling":39,"./transport/xdr-streaming":40,"./transport/xhr-polling":41,"./transport/xhr-streaming":42}],17:[function(e,n,r){(function(t,r){"use strict";var i=e("events").EventEmitter,o=e("inherits"),s=e("../../utils/event"),a=e("../../utils/url"),l=r.XMLHttpRequest,c=function(){};function u(e,t,n,r){c(e,t);var o=this;i.call(this),setTimeout((function(){o._start(e,t,n,r)}),0)}"production"!==t.env.NODE_ENV&&(c=e("debug")("sockjs-client:browser:xhr")),o(u,i),u.prototype._start=function(e,t,n,r){var i=this;try{this.xhr=new l}catch(e){}if(!this.xhr)return c("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=s.unloadAdd((function(){c("unload cleanup"),i._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){c("xhr timeout"),i.emit("finish",0,""),i._cleanup(!1)})}catch(e){return c("exception",e),this.emit("finish",0,""),void this._cleanup(!1)}if(r&&r.noCredentials||!u.supportsCORS||(c("withCredentials"),this.xhr.withCredentials=!0),r&&r.headers)for(var o in r.headers)this.xhr.setRequestHeader(o,r.headers[o]);this.xhr.onreadystatechange=function(){if(i.xhr){var e,t,n=i.xhr;switch(c("readyState",n.readyState),n.readyState){case 3:try{t=n.status,e=n.responseText}catch(e){}c("status",t),1223===t&&(t=204),200===t&&e&&e.length>0&&(c("chunk"),i.emit("chunk",t,e));break;case 4:t=n.status,c("status",t),1223===t&&(t=204),12005!==t&&12029!==t||(t=0),c("finish",t,n.responseText),i.emit("finish",t,n.responseText),i._cleanup(!1)}}};try{i.xhr.send(n)}catch(e){i.emit("finish",0,""),i._cleanup(!1)}},u.prototype._cleanup=function(e){if(c("cleanup"),this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},u.prototype.close=function(){c("close"),this._cleanup(!0)},u.enabled=!!l;var d=["Active"].concat("Object").join("X");!u.enabled&&d in r&&(c("overriding xmlhttprequest"),l=function(){try{return new r[d]("Microsoft.XMLHTTP")}catch(e){return null}},u.enabled=!!new l);var h=!1;try{h="withCredentials"in new l}catch(e){}u.supportsCORS=h,n.exports=u}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/event":46,"../../utils/url":52,debug:55,events:3,inherits:57}],18:[function(e,n,r){(function(e){n.exports=e.EventSource}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,n,r){(function(e){"use strict";var t=e.WebSocket||e.MozWebSocket;n.exports=t?function(e){return new t(e)}:void 0}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./lib/ajax-based"),o=e("./receiver/eventsource"),s=e("./sender/xhr-cors"),a=e("eventsource");function l(e){if(!l.enabled())throw new Error("Transport created when disabled");i.call(this,e,"/eventsource",o,s)}r(l,i),l.enabled=function(){return!!a},l.transportName="eventsource",l.roundTrips=2,t.exports=l},{"./lib/ajax-based":24,"./receiver/eventsource":29,"./sender/xhr-cors":35,eventsource:18,inherits:57}],21:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./receiver/htmlfile"),o=e("./sender/xhr-local"),s=e("./lib/ajax-based");function a(e){if(!i.enabled)throw new Error("Transport created when disabled");s.call(this,e,"/htmlfile",i,o)}r(a,s),a.enabled=function(e){return i.enabled&&e.sameOrigin},a.transportName="htmlfile",a.roundTrips=2,t.exports=a},{"./lib/ajax-based":24,"./receiver/htmlfile":30,"./sender/xhr-local":37,inherits:57}],22:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),i=e("json3"),o=e("events").EventEmitter,s=e("../version"),a=e("../utils/url"),l=e("../utils/iframe"),c=e("../utils/event"),u=e("../utils/random"),d=function(){};function h(e,t,n){if(!h.enabled())throw new Error("Transport created when disabled");o.call(this);var r=this;this.origin=a.getOrigin(n),this.baseUrl=n,this.transUrl=t,this.transport=e,this.windowId=u.string(8);var i=a.addPath(n,"/iframe.html")+"#"+this.windowId;d(e,t,i),this.iframeObj=l.createIframe(i,(function(e){d("err callback"),r.emit("close",1006,"Unable to load an iframe ("+e+")"),r.close()})),this.onmessageCallback=this._message.bind(this),c.attachEvent("message",this.onmessageCallback)}"production"!==n.env.NODE_ENV&&(d=e("debug")("sockjs-client:transport:iframe")),r(h,o),h.prototype.close=function(){if(d("close"),this.removeAllListeners(),this.iframeObj){c.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},h.prototype._message=function(e){if(d("message",e.data),a.isOriginEqual(e.origin,this.origin)){var t;try{t=i.parse(e.data)}catch(t){return void d("bad json",e.data)}if(t.windowId===this.windowId)switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",i.stringify([s,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var n;try{n=i.parse(t.data)}catch(e){return void d("bad json",t.data)}this.emit("close",n[0],n[1]),this.close()}else d("mismatched window id",t.windowId,this.windowId)}else d("not same origin",e.origin,this.origin)},h.prototype.postMessage=function(e,t){d("postMessage",e,t),this.iframeObj.post(i.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},h.prototype.send=function(e){d("send",e),this.postMessage("m",e)},h.enabled=function(){return l.iframeEnabled},h.transportName="iframe",h.roundTrips=2,t.exports=h}).call(this,{env:{}})},{"../utils/event":46,"../utils/iframe":47,"../utils/random":50,"../utils/url":52,"../version":53,debug:55,events:3,inherits:57,json3:58}],23:[function(e,n,r){(function(t){"use strict";var r=e("inherits"),i=e("./lib/sender-receiver"),o=e("./receiver/jsonp"),s=e("./sender/jsonp");function a(e){if(!a.enabled())throw new Error("Transport created when disabled");i.call(this,e,"/jsonp",s,o)}r(a,i),a.enabled=function(){return!!t.document},a.transportName="jsonp-polling",a.roundTrips=1,a.needBody=!0,n.exports=a}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/sender-receiver":28,"./receiver/jsonp":31,"./sender/jsonp":33,inherits:57}],24:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),i=e("../../utils/url"),o=e("./sender-receiver"),s=function(){};function a(e,t,n,r){o.call(this,e,t,function(e){return function(t,n,r){s("create ajax sender",t,n);var o={};"string"==typeof n&&(o.headers={"Content-type":"text/plain"});var a=i.addPath(t,"/xhr_send"),l=new e("POST",a,n,o);return l.once("finish",(function(e){if(s("finish",e),l=null,200!==e&&204!==e)return r(new Error("http status "+e));r()})),function(){s("abort"),l.close(),l=null;var e=new Error("Aborted");e.code=1e3,r(e)}}}(r),n,r)}"production"!==n.env.NODE_ENV&&(s=e("debug")("sockjs-client:ajax-based")),r(a,o),t.exports=a}).call(this,{env:{}})},{"../../utils/url":52,"./sender-receiver":28,debug:55,inherits:57}],25:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),i=e("events").EventEmitter,o=function(){};function s(e,t){o(e),i.call(this),this.sendBuffer=[],this.sender=t,this.url=e}"production"!==n.env.NODE_ENV&&(o=e("debug")("sockjs-client:buffered-sender")),r(s,i),s.prototype.send=function(e){o("send",e),this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},s.prototype.sendScheduleWait=function(){o("sendScheduleWait");var e,t=this;this.sendStop=function(){o("sendStop"),t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){o("timeout"),t.sendStop=null,t.sendSchedule()}),25)},s.prototype.sendSchedule=function(){o("sendSchedule",this.sendBuffer.length);var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(o("error",t),e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},s.prototype._cleanup=function(){o("_cleanup"),this.removeAllListeners()},s.prototype.close=function(){o("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],26:[function(e,n,r){(function(t){"use strict";var r=e("inherits"),i=e("../iframe"),o=e("../../utils/object");n.exports=function(e){function n(t,n){i.call(this,e.transportName,t,n)}return r(n,i),n.enabled=function(n,r){if(!t.document)return!1;var s=o.extend({},r);return s.sameOrigin=!0,e.enabled(s)&&i.enabled()},n.transportName="iframe-"+e.transportName,n.needBody=!0,n.roundTrips=i.roundTrips+e.roundTrips-1,n.facadeTransport=e,n}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/object":49,"../iframe":22,inherits:57}],27:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),i=e("events").EventEmitter,o=function(){};function s(e,t,n){o(t),i.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=n,this._scheduleReceiver()}"production"!==n.env.NODE_ENV&&(o=e("debug")("sockjs-client:polling")),r(s,i),s.prototype._scheduleReceiver=function(){o("_scheduleReceiver");var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){o("message",t),e.emit("message",t)})),t.once("close",(function(n,r){o("close",n,r,e.pollIsClosing),e.poll=t=null,e.pollIsClosing||("network"===r?e._scheduleReceiver():(e.emit("close",n||1006,r),e.removeAllListeners()))}))},s.prototype.abort=function(){o("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],28:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),i=e("../../utils/url"),o=e("./buffered-sender"),s=e("./polling"),a=function(){};function l(e,t,n,r,l){var c=i.addPath(e,t);a(c);var u=this;o.call(this,e,n),this.poll=new s(r,c,l),this.poll.on("message",(function(e){a("poll message",e),u.emit("message",e)})),this.poll.once("close",(function(e,t){a("poll close",e,t),u.poll=null,u.emit("close",e,t),u.close()}))}"production"!==n.env.NODE_ENV&&(a=e("debug")("sockjs-client:sender-receiver")),r(l,o),l.prototype.close=function(){o.prototype.close.call(this),a("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},t.exports=l}).call(this,{env:{}})},{"../../utils/url":52,"./buffered-sender":25,"./polling":27,debug:55,inherits:57}],29:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),i=e("events").EventEmitter,o=e("eventsource"),s=function(){};function a(e){s(e),i.call(this);var t=this,n=this.es=new o(e);n.onmessage=function(e){s("message",e.data),t.emit("message",decodeURI(e.data))},n.onerror=function(e){s("error",n.readyState,e);var r=2!==n.readyState?"network":"permanent";t._cleanup(),t._close(r)}}"production"!==n.env.NODE_ENV&&(s=e("debug")("sockjs-client:receiver:eventsource")),r(a,i),a.prototype.abort=function(){s("abort"),this._cleanup(),this._close("user")},a.prototype._cleanup=function(){s("cleanup");var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){s("close",e);var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},t.exports=a}).call(this,{env:{}})},{debug:55,events:3,eventsource:18,inherits:57}],30:[function(e,n,r){(function(t,r){"use strict";var i=e("inherits"),o=e("../../utils/iframe"),s=e("../../utils/url"),a=e("events").EventEmitter,l=e("../../utils/random"),c=function(){};function u(e){c(e),a.call(this);var t=this;o.polluteGlobalNamespace(),this.id="a"+l.string(6),e=s.addQuery(e,"c="+decodeURIComponent(o.WPrefix+"."+this.id)),c("using htmlfile",u.htmlfileEnabled);var n=u.htmlfileEnabled?o.createHtmlfile:o.createIframe;r[o.WPrefix][this.id]={start:function(){c("start"),t.iframeObj.loaded()},message:function(e){c("message",e),t.emit("message",e)},stop:function(){c("stop"),t._cleanup(),t._close("network")}},this.iframeObj=n(e,(function(){c("callback"),t._cleanup(),t._close("permanent")}))}"production"!==t.env.NODE_ENV&&(c=e("debug")("sockjs-client:receiver:htmlfile")),i(u,a),u.prototype.abort=function(){c("abort"),this._cleanup(),this._close("user")},u.prototype._cleanup=function(){c("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r[o.WPrefix][this.id]},u.prototype._close=function(e){c("_close",e),this.emit("close",null,e),this.removeAllListeners()},u.htmlfileEnabled=!1;var d=["Active"].concat("Object").join("X");if(d in r)try{u.htmlfileEnabled=!!new r[d]("htmlfile")}catch(e){}u.enabled=u.htmlfileEnabled||o.iframeEnabled,n.exports=u}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],31:[function(e,n,r){(function(t,r){"use strict";var i=e("../../utils/iframe"),o=e("../../utils/random"),s=e("../../utils/browser"),a=e("../../utils/url"),l=e("inherits"),c=e("events").EventEmitter,u=function(){};function d(e){u(e);var t=this;c.call(this),i.polluteGlobalNamespace(),this.id="a"+o.string(6);var n=a.addQuery(e,"c="+encodeURIComponent(i.WPrefix+"."+this.id));r[i.WPrefix][this.id]=this._callback.bind(this),this._createScript(n),this.timeoutId=setTimeout((function(){u("timeout"),t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),d.timeout)}"production"!==t.env.NODE_ENV&&(u=e("debug")("sockjs-client:receiver:jsonp")),l(d,c),d.prototype.abort=function(){if(u("abort"),r[i.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},d.timeout=35e3,d.scriptErrorTimeout=1e3,d.prototype._callback=function(e){u("_callback",e),this._cleanup(),this.aborting||(e&&(u("message",e),this.emit("message",e)),this.emit("close",null,"network"),this.removeAllListeners())},d.prototype._abort=function(e){u("_abort",e),this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},d.prototype._cleanup=function(){if(u("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete r[i.WPrefix][this.id]},d.prototype._scriptError=function(){u("_scriptError");var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),d.scriptErrorTimeout))},d.prototype._createScript=function(e){u("_createScript",e);var t,n=this,i=this.script=r.document.createElement("script");if(i.id="a"+o.string(8),i.src=e,i.type="text/javascript",i.charset="UTF-8",i.onerror=this._scriptError.bind(this),i.onload=function(){u("onload"),n._abort(new Error("JSONP script loaded abnormally (onload)"))},i.onreadystatechange=function(){if(u("onreadystatechange",i.readyState),/loaded|closed/.test(i.readyState)){if(i&&i.htmlFor&&i.onclick){n.loadedOkay=!0;try{i.onclick()}catch(e){}}i&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===i.async&&r.document.attachEvent)if(s.isOpera())(t=this.script2=r.document.createElement("script")).text="try{var a = document.getElementById('"+i.id+"'); if(a)a.onerror();}catch(x){};",i.async=t.async=!1;else{try{i.htmlFor=i.id,i.event="onclick"}catch(e){}i.async=!0}void 0!==i.async&&(i.async=!0);var a=r.document.getElementsByTagName("head")[0];a.insertBefore(i,a.firstChild),t&&a.insertBefore(t,a.firstChild)},n.exports=d}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],32:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),i=e("events").EventEmitter,o=function(){};function s(e,t){o(e),i.call(this);var n=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){o("finish",e,t),n._chunkHandler(e,t),n.xo=null;var r=200===e?"network":"permanent";o("close",r),n.emit("close",null,r),n._cleanup()}))}"production"!==n.env.NODE_ENV&&(o=e("debug")("sockjs-client:receiver:xhr")),r(s,i),s.prototype._chunkHandler=function(e,t){if(o("_chunkHandler",e),200===e&&t)for(var n=-1;;this.bufferPosition+=n+1){var r=t.slice(this.bufferPosition);if(-1===(n=r.indexOf("\n")))break;var i=r.slice(0,n);i&&(o("message",i),this.emit("message",i))}},s.prototype._cleanup=function(){o("_cleanup"),this.removeAllListeners()},s.prototype.abort=function(){o("abort"),this.xo&&(this.xo.close(),o("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],33:[function(e,n,r){(function(t,r){"use strict";var i,o,s=e("../../utils/random"),a=e("../../utils/url"),l=function(){};"production"!==t.env.NODE_ENV&&(l=e("debug")("sockjs-client:sender:jsonp")),n.exports=function(e,t,n){l(e,t),i||(l("createForm"),(i=r.document.createElement("form")).style.display="none",i.style.position="absolute",i.method="POST",i.enctype="application/x-www-form-urlencoded",i.acceptCharset="UTF-8",(o=r.document.createElement("textarea")).name="d",i.appendChild(o),r.document.body.appendChild(i));var c="a"+s.string(8);i.target=c,i.action=a.addQuery(a.addPath(e,"/jsonp_send"),"i="+c);var u=function(e){l("createIframe",e);try{return r.document.createElement('