"),n+=A(e.mediaItem.content);var s=D.element.getElementsByClassName("no-lazy-load");s.length||(D.text=n.replace(/src\=/g,"data-src=")),R.addChild(D),H.addChild(R),I=D.element.getElementsByClassName("responsive"),O=D.element.getElementsByClassName("responsive-width")}function r(e){return function(t){return e.replace(/[^ -~]+/g,"")===t.src}}function l(e){return e.savedOpacity=e.style.opacity,e.style.opacity=0,e.originalWidth=e.style.width,e.originalHeight=e.style.height,e}function s(e){a(),W=Math.round(Ma.mediaView.maskWidth(H.element.offsetWidth)),Ma.overrides.pageMaxWidth&&W>Ma.overrides.pageMaxWidth&&(W=Ma.overrides.pageMaxWidth),k=c(D.element),z=k.filter(function(e){return"img"===e.tagName.toLowerCase()}).map(l),y(),L(),setTimeout(function(){y(),L()},150)}function c(e){return Array.prototype.slice.apply(e.getElementsByTagName("img")).concat(Array.prototype.slice.apply(e.getElementsByTagName("video"))).concat(Array.prototype.slice.apply(e.getElementsByTagName("iframe"))).concat(Array.prototype.slice.apply(e.getElementsByTagName("input")))}function h(e){var t=e.reduce(function(e,t){if("img"===t.img.tagName.toLowerCase()){var i=t.img.src.replace(Y,"");e=e.concat({src:i,width:t.img.naturalWidth,height:t.img.naturalHeight})}return e},[]);JSON.stringify(H.mediaItem.size.pageImages)!==JSON.stringify(t)&&(H.mediaItem.size.pageImages=t,X.dispatchEvent("adminPageviewImageSizes",H.mediaItem))}function u(e){return new Promise(function(t,i){var n,o=e.getAttribute("data-src");"img"===e.tagName.toLowerCase()?(n=setInterval(function(){e.naturalWidth&&e.naturalHeight&&(e.metaLoaded=!0,clearInterval(n),t({img:e}))},10),e.addEventListener("load",function(){qe(e,.35,{opacity:e.savedOpacity||1})}),e.addEventListener("error",function(){clearInterval(n)}),setTimeout(function(){n&&clearInterval(n)},1e4)):t({img:e}),e.src=o})}function p(e){var t=void 0===Bi.disableRightClick||Bi.disableRightClick;t&&e.preventDefault()}function m(e){return e.img.oncontextmenu=p,e.img.ondragstart=p,e}function v(e){Promise.all(e.map(u)).then(function(e){return e.map(m)}).then(h).then(L).catch(function(e){})}function g(){return"native"===Ma.overrides.pageScrollType||ia&&("nativeMacOs"===Ma.overrides.pageScrollType||Pi.globalSmoothScroll)}function f(){if(Ma.section(H.section),Wi!==Xi&&Wi!==Ni||(R.element.style["-webkit-overflow-scrolling"]="touch"),/vScroll/.test(Ma.overrides.transitionType)&&Ma.siteView.unifiedPageScroll())R.element.style.overflow="hidden", R.element.style["-webkit-overflow-scrolling"]="touch",qe.defer(D,Lo,{alpha:1});else if(g()||/unifiedSite/.test(Ma.overrides.siteDisplayBehavior))R.element.style.overflowY="auto",R.element.style.overflowX="hidden",R.element.style["-webkit-overflow-scrolling"]="touch",qe.defer(D,Lo,{alpha:1});else{H.scroll&&H.scroll.destroy();var t=Ma.overrides.pageScrollbarWidth,i=Wi===Xi?-(t+5):Ma.overrides.pageScrollbarHorizontalOffset,n="right"===Ma.overrides.pageScrollbarAlignment?-i-t:i+t,o={name:"text page",types:["bar","wheel","touch"],axis:"y",align:"top",margin:Ma.overrides.pageScrollVerticalMargin,color:Ma.overrides.pageScrollbarColor,hover:Ma.overrides.pageScrollbarHover,side:Ma.overrides.pageScrollbarAlignment,alpha:Ma.overrides.pageScrollbarBgAlpha,width:t,offsetX:n,offsetY:Ma.overrides.pageScrollbarVerticalOffset,property:"translate",rounded:Ma.overrides.pageScrollbarRounded,visibility:Ma.overrides.pageScrollbarVisibility,scrollTopCheck:!0};("nativeMacOs"===Ma.overrides.pageScrollType||Pi.globalSmoothScroll)&&(o.margin=0,o.color="#000000",o.hover="#000000",o.side="right",o.alpha=0,o.width=7,o.offsetX=0,o.offsetY=0,o.rounded=!0,o.visibility="when scrolling"),H.scroll=new Re(D,R,o),H.scroll.addEventListener("WINDOW_SCROLL_TOP",function(){H.scroll.percent=0,H.scroll.update(Lo)})}Ma.section(H.section);var a=E(Ma.overrides.pageMarginTop,wa.height),r=E(Ma.overrides.pageMarginBottom,wa.height),l=a+D.element.offsetHeight+r;if(w()&&!T()){var s=He({width:e.mediaItem.size.featuredImage.width,height:e.mediaItem.size.featuredImage.height,filename:V.dataSrc}),d=(Math.round(s.width),Math.round(s.height));l=l>a+d+r?l:a+d+r}G=l!==H.contentHeight,H.contentHeight=l,b(H.section)?(xa._mediaMarginPrefix="page",R.height=Math.round(Ma.mediaView.maskHeight(void 0,H.section.key)),H.height=Math.round(Ma.mediaView.height(H.section.key))):(R.height=l,H.height=l),G&&X.dispatchEvent("MEDIA_HEIGHT_CHANGE"),H.scroll&&H.scroll.resize(),qe.defer(D,Lo,{alpha:1})}function b(e){return Ma.section(H.section),(Wi!==Xi||!/vScroll/.test(Ma.overrides.transitionType))&&("none"===Ma.overrides.siteDisplayBehavior||!/vScroll/.test(Ma.overrides.transitionType)&&e.media.length>1)}function C(){return Ma.section(H.section),Ma.overrides.pageTitle&&""!==e.mediaItem.label}function w(){return""!==e.mediaItem.featuredImage}function y(e){Ma.section(H.section),V&&Pi.imageRendering.optimizeQuality&&(V.style["image-rendering"]="optimizeQuality"),V&&Pi.imageRendering.webkitOptimizeContrast&&(V.style["image-rendering"]="-webkit-optimize-contrast"),V&&"Safari"===ra&&Pi.imageRendering.webkitBackfaceVisibility&&(V.style["-webkit-backface-visibility"]="hidden"),D.fontFamily=Ma.overrides.pageTextFont,D.fontColor=Ma.overrides.pageTextFontColor,D.fontSize=Ma.overrides.pageTextFontSize,D.letterSpacing=Ma.overrides.pageTextKerning,qe(H,H.updateSpeed,{backgroundColor:Ma.mediaView.backgroundColor()})}function L(e){Ma.section(H.section),xa.activeMediaType=H.type,F=Math.round(Ma.mediaView.maskX()),P=Math.round(Ma.mediaView.maskY(H.section.key));var t=Ma.mediaView.maskWidth(H.element.offsetWidth);if(W=Math.round(Ma.mediaView.maskWidth(H.element.offsetWidth)),N=Math.round(Ma.mediaView.maskHeight(H.element.offsetHeight,H.section.key)),Ma.overrides.pageMaxWidth&&W>Ma.overrides.pageMaxWidth)switch(W=Ma.overrides.pageMaxWidth,Ma.overrides.pageMaxAlign){case"center":F+=Math.round(.5*(t-W));break;case"right":F+=Math.round(t-W)}V&&w()&&!T()&&(F+=B+_,W-=B+_,qe(V,H.updateSpeed,{x:F-B-_,y:P})),!Z&&T()?(V&&(H.removeChild(V),V=void 0),a(),k=c(D.element),z=k.filter(function(e){return"img"===e.tagName.toLowerCase()}).map(l)):Z&&!T()&&(D.text="",a(),k=c(D.element),z=k.filter(function(e){return"img"===e.tagName.toLowerCase()}).map(l)),qe(R,0,{x:F,y:P,width:W,height:N}),qe(D,0,{width:W}),S(),I&&I.length>0?((oe()||le())&&(R.style.overflow="auto",R.style["-webkit-overflow-scrolling"]="touch"),qe.defer(D,Lo,{alpha:1})):f()}function S(){if(I){var e=I[0];e&&(e.style.overflow="hidden",e.style.width=W-e.offsetLeft+"px",e.style.height=N-e.offsetTop+"px",e.style.border="none")}if(O){var t=O[0];t&&(t.style.overflow="hidden",t.style.width=W-t.offsetLeft+"px",t.style.border="none")}if(z){var i=z.length;if(i>0)for(;i--;){var n=z[i],o=n.getAttribute("data-src")?n.getAttribute("data-src").replace(Y,""):"";if(o&&H.mediaItem.size.pageImages){var a=window.getComputedStyle(n),l=a.getPropertyValue("max-width"),s=n.getAttribute("width"),d=n.getAttribute("height");if(n.metaLoaded)n.originalWidth?n.style.width=n.originalWidth:s?n.style.width=s+"px":n.style.removeProperty("width"),n.originalHeight?n.style.height=n.originalHeight:d?n.style.height=d+"px":n.style.removeProperty("height"),"none"===l&&(n.style.maxWidth="100%");else{var c=H.mediaItem.size.pageImages.filter(r(o)),h=c[0]||{},u=h.width||n.naturalWidth,p=h.height||n.naturalHeight,m=parseFloat(a.getPropertyValue("width"),10)||s||u,v=(m>W?W:m)||W,g=p/u;n.style.width=v+"px",n.style.height=g*v+"px"}}}}}function x(t){H.updateSpeed=0;var i=He({width:V.element.offsetWidth,height:V.element.offsetHeight,filename:V.src});B=Math.round(i.width),j=Math.round(i.height),V.width=B,V.height=j,qe(V,1,{alpha:1}),H.updateSpeed=Ma.mediaView.transitionDuration(),H.events.dispatchEvent(yo,{type:"featuredImage",id:e.mediaItem.id,width:V.width,height:V.height})}function M(e){X.removeEventListener(tn,L),X.removeEventListener(_n,L),X.removeEventListener("destroy",M),X.removeEventListener("showCursor",t),X.removeEventListener("hideCursor",n),V&&V.removeEventListener(en,x),H.removeEventListener(So,s)}function T(){if(Wi===Xi)return!0;if(wa.width<(Pi.screenWidthBreakpoint||1e3))return!0;var e=250;return Ma.mediaView.maskWidth()Ma.mediaView.maskWidth()}var V,z,k,O,I,F,P,H=new Ca({events:e.events}),D=new Ca,R=new Ca,B=e.size.featuredImage.width||0,j=e.size.featuredImage.height||0,_=30,W=0,N=0,X=e.localEvents,Y=Bi.cdnSslUri+"/";H.mediaItem=e.mediaItem,H.section=e.section;var Z=T();H.alpha=0,D.alpha=0,H.updateSpeed=0,H.setClass("dx_page_text"),R.setClass("pageviewMask"),D.setClass("ql-editor"),H.id=e.mediaItem.id,H.type=e.mediaItem.type,H.dims=e.size.content,H.element.navigationCursor=!0,H.overflow="hidden",R.overflow="hidden",D.selectable=!0,H.selectable=!0,R.selectable=!0,D.selectable=!0,X.addEventListener(tn,L),X.addEventListener(_n,o),X.addEventListener("destroy",M),X.addEventListener("showCursor",t),X.addEventListener("hideCursor",n),H.addEventListener(So,s);var G;return H.load=function(){w()&&!T()&&V&&V.dataSrc&&(V.src=V.dataSrc),H.loaded=!0,D.element.getElementsByClassName("no-lazy-load").length||v(k),L()},H.unload=function(){},H.show=function(){H.display="block",qe(H,Lo,{alpha:1})},H.hide=function(){qe(H,Lo,{alpha:0,onComplete:function(){H.display="none"}})},H.updatePosition=L,H}function $t(e){function t(){return Ma.lightboxSection&&!Pi.lightboxGalleryBtnDisable&&!Pi.lightboxVideoDisable}function n(){i($.section)||(Q.element.navigationCursor=!0,te.element.navigationCursor=!0),ne&&(ne.element.navigationCursor=Q.element.navigationCursor),se&&(se.top.element.navigationCursor=Q.element.navigationCursor,se.right.element.navigationCursor=Q.element.navigationCursor,se.bottom.element.navigationCursor=Q.element.navigationCursor,se.left.element.navigationCursor=Q.element.navigationCursor)}function o(){Q.element.navigationCursor=!1,te.element.navigationCursor=!1,ne&&(ne.element.navigationCursor=Q.element.navigationCursor),se&&(se.top.element.navigationCursor=Q.element.navigationCursor,se.right.element.navigationCursor=Q.element.navigationCursor,se.bottom.element.navigationCursor=Q.element.navigationCursor,se.left.element.navigationCursor=Q.element.navigationCursor)}function a(){Ma.section($.section),i($.section)||(Q.element.navigationCursor=!0,te.element.navigationCursor=!0),Q.element.addEventListener("contextmenu",r),Q.element.addEventListener("dragstart",r),$.element.style["user-select"]="none",te.element.style["user-select"]="none",Q.element.style["user-select"]="none",ce.addEventListener(Vn,L),"spinner"===Ma.overrides.imageVideoLoaderType&&(ae=new tt({color:e.loaderColor}),ae.zIndex=2,te.addChild(ae)),$.addChild(te),te.addChild(Q),te.addChild(ce)}function r(e){var t=void 0===Bi.disableRightClick||Bi.disableRightClick;t&&e.preventDefault()}function l(e){e===$.id?!ne||ne.paused?$.play(!0):ne&&!ne.paused&&ne.src&&ne.pause():ne&&ne.src&&(ne.paused||ne.pause())}function s(e){e===$.id?($.play(),B()):ne&&ne.src&&(ne.paused||ne.pause())}function c(){pe(e.mediaItem)&&(ne.pointerEvents="none")}function h(){pe(e.mediaItem)&&(ne.pointerEvents="auto")}function u(){Ma.section($.section),ce.transition=0,ce.width=70,ce.height=70,p(),Ma.overrides.videoAutoPlay||setTimeout(function(){qe(ce,Lo,{alpha:1})},10)}function p(){ce.transition=0,setTimeout(function(){ce.x=Q.x+.5*(Q.width-70),ce.y=Q.y+.5*(Q.height-70)},10)}function m(){!ze||ne.paused||i($.section)||($.events.removeEventListener(bo,b),ne.pause(),pe(e.mediaItem)&&(ce.display="block"),ne.removeKeyListener())}function v(e){ne&&(m(e),$.events.removeEventListener($n,m),te.removeChild(ne),ne.destroy(),$.events.removeEventListener(Qn,v))}function g(){var e=new Ca;return e.element.className="vimeoMask",e.element.navigationCursor=Q.element.navigationCursor,e}function f(){return{top:g(),right:g(),bottom:g(),left:g()}}function b(){Ma.section($.section);var t={events:Ie};Wi===Xi&&Ma.overrides.mobileAutoPlay&&(t.thumbBuild=!0),pe(e.mediaItem)&&!ne?(ne=new ht(t),ne.element.navigationCursor=Q.element.navigationCursor,$.video=ne,ne.addEventListener(wo,x),te.addChild(ne),oe()||i($.section)||(se=f(),te.addChild(se.top),te.addChild(se.right),te.addChild(se.bottom),te.addChild(se.left),se.top.element.navigationCursor=Q.element.navigationCursor,se.right.element.navigationCursor=Q.element.navigationCursor,se.bottom.element.navigationCursor=Q.element.navigationCursor,se.left.element.navigationCursor=Q.element.navigationCursor),Wi===Xi?(ne.zIndex=20,ne.alpha=.01):ne.alpha=.01):ne||(ne=new dt({alwaysMuted:i($.section),parent:te,events:e.localEvents}),/disabled/.test(Pi.navCursorType)||i($.section)?ne.addEventListener(Vn,function(e){!ne.element.paused&&ne.element.muted&&"block"===ne.unmuteBtn.display?ne.unmuteClick():!ne.element.paused&&ne.element.muted?ne.hud.unmute():ne.togglePlay(e)}):(oe()||le())&&(ne.addEventListener(Vn,function(e){ne.hud.show(),clearTimeout(de),de=setTimeout(function(){ne.paused||ne.hud.hide()},3e3)}),ne.hud.addEventListener(Vn,function(e){ne.hud.show(),clearTimeout(de),de=setTimeout(function(){ne.paused||ne.hud.hide()},3e3)})),ne.element.navigationCursor=Q.element.navigationCursor,$.video=ne,ne.addEventListener(Co,S,!1),ne.addEventListener(Qi,M,!1),te.addChild(ne),ne.display="none",ne.alpha=0,Ma.overrides.videoLoop&&!i($.section)&&ne.element.setAttribute("loop",!0)),ne.addEventListener(Kn,C),ne.addEventListener(Jn,w),ne.addEventListener("playbackEnd",y)}function C(){oe()&&(ne.display="none"),W("paused")}function w(){Ma.section($.section),Wi===Xi&&Ma.overrides.mobileAutoPlay?(ne.display="block",ne.alpha=.01):oe()&&(ne.display="block",ne.alpha=1),W("playing"),$.events.dispatchEvent(Jn)}function y(){pe(e.mediaItem)&&(ce.display="block",W("ended")),$.events.dispatchEvent("playbackEnd")}function L(){ae&&qe(ae,Lo,{alpha:1}),b(),$.play(!0),!pe(e.mediaItem)&&ne&&(oe()||le())&&(clearTimeout(de),de=setTimeout(function(){ne.paused||ne.hud.hide()},3e3))}function S(t){ke=!0,i($.section)||e.mediaItem.hideControls||ne.hud.enable(),ne.removeEventListener(Co,S,!1),ne.removeEventListener(Qi,M,!1),T(t.target),ne.display="block",Le=t.target.videoWidth,xe=t.target.videoHeight,Hi[$.id].size.content.width=t.target.videoWidth,Hi[$.id].size.content.height=t.target.videoHeight,$.dispatchEvent(yo,{type:"video",id:e.mediaItem.id,width:t.target.videoWidth,height:t.target.videoHeight}),$.events.dispatchEvent(yo,{type:"video",id:e.mediaItem.id,width:t.target.videoWidth,height:t.target.videoHeight})}function x(t){ke=!0,ne.removeEventListener(wo,x),Le=this.videoWidth,xe=this.videoHeight,Hi[$.id].size.content.width=this.videoWidth,Hi[$.id].size.content.height=this.videoHeight,T(this),setTimeout(function(){B(t),$.dispatchEvent(yo,{type:"vimeo",id:e.mediaItem.id,width:Le,height:xe}),$.events.dispatchEvent(yo,{type:"vimeo",id:e.mediaItem.id,width:Le,height:xe})},200)}function M(){ae&&(ae.removeLoader(),te.removeChild(ae))}function T(e){ze=!0,$.videoLoaded=!0,$.updateSpeed=0,Le!==e.videoWidth&&(Le=e.videoWidth),xe!==e.videoHeight&&(xe=e.videoHeight),B(),z(),ae&&(ae.removeLoader(),te.removeChild(ae)),qe(Q,Lo,{alpha:0,onComplete:function(){Q.display="none"}})}function z(){Ma.section($.section),i($.section)&&"fade"===Ma.overrides.transitionType?$.backgroundColor="transparent":Wi===Xi?qe($,$.updateSpeed,{backgroundColor:Pi.containerColorMobile||Ma.mediaView.backgroundColor()}):Wi===Ni?qe($,$.updateSpeed,{backgroundColor:Pi.containerColorTablet||Ma.mediaView.backgroundColor()}):qe($,$.updateSpeed,{backgroundColor:Ma.mediaView.backgroundColor()}),ie&&setTimeout(O,1e3*$.updateSpeed)}function O(){Ma.section($.section),xa.activeMediaType=$.type,ie.container.transition=0,K(re.captionCloseButton,Ma.overrides.captionCloseButton)?ie.showCloseButton():ie.hideCloseButton();var t={onInit:function(){ie.scroll&&ie.scroll.hide()},onComplete:function(){ie.scroll&&(ie.scroll.show(),ie.scroll.resize())}},n=re.captionBackgroundRectColor||Ma.overrides.captionBackgroundRectColor,o=K(re.captionBackgroundAlpha,Ma.overrides.captionBackgroundAlpha);if(ie.backgroundColor=V(n,o),ie.fontFamily=re.captionFont||Ma.overrides.captionFont,ie.fontSize=wa.width-1)&&ie.show(O)}}function R(){ie.hide(),ie.scroll&&ie.scroll.destroy()}function B(){Ma.section($.section),Q&&Pi.imageRendering.optimizeQuality&&(Q.style["image-rendering"]="optimizeQuality"),Q&&Pi.imageRendering.webkitOptimizeContrast&&(Q.style["image-rendering"]="-webkit-optimize-contrast"),Q&&"Safari"===ra&&Pi.imageRendering.webkitBackfaceVisibility&&(Q.style["-webkit-backface-visibility"]="hidden"),xa.activeMediaType=$.type,Ce=Ma.mediaView.maskWidth($.width),ye=Ma.mediaView.maskHeight($.height,$.section.key),p(),D(Fe),qe(te,$.updateSpeed,{x:Ma.mediaView.maskX(),y:Ma.mediaView.maskY($.section.key),width:Ce,height:ye,onComplete:function(){p()}}),ae&&q(),pe(e.mediaItem)&&oe()||Oe||ae&&qe(ae,Lo,{alpha:1}),Oe&&!ze&&_(),ze&&W()}function j(){$.updateSpeed=0,Oe=!0,B(),_(),ae&&qe(ae,Lo,{alpha:0}),$.events.dispatchEvent(yo,{type:"posterImage",id:e.mediaItem.id,width:he,height:ue}),$.updateSpeed=Lo,ce.addEventListener(en,u),ce.src=go+"play@2x.png",D(Fe),"Safari"===ra&&/hScroll/.test(Ma.overrides.transitionType)&&Q.element.setAttribute("nopin","nopin")}function _(){Ma.section($.section),xa.activeMediaType=$.type,Ce=Ma.mediaView.maskWidth($.width),ye=Ma.mediaView.maskHeight($.height,$.section.key);var e=Pe({},0,{type:Ma.mediaView.imageScaleType(),width:he,height:ue,hRange:Ce,vRange:ye,hAlign:Ma.mediaView.hAlign(),vAlign:Ma.mediaView.vAlign(),disableOrientationCheck:F()});ve=Math.ceil(e.scale.width),ge=Math.ceil(e.scale.height),fe=Math.floor(e.align.x),be=Math.floor(e.align.y),qe(Q,$.updateSpeed,{x:fe,y:be,width:ve,height:ge,onComplete:function(){setTimeout(function(){Ma.section($.section),i($.section)||qe(Q,Ma.mediaView.transitionDuration(),{alpha:1,ease:"cubic-bezier(0.7, 0, 0.3, 1)"})},1e3)}}),ie&&O()}function W(t){Ma.section($.section),xa.activeMediaType=$.type,t&&($.playState=t),ne.display="block",setTimeout(function(){ne.display="block"},1e3),Ce=Ma.mediaView.maskWidth($.width),ye=Ma.mediaView.maskHeight($.height,$.section.key);var i=Pe({},0,{type:Ma.mediaView.videoScaleType(pe(e.mediaItem)),width:Le,height:xe,hRange:Ce,vRange:ye,hAlign:Ma.mediaView.hAlign(),vAlign:Ma.mediaView.vAlign(),disableOrientationCheck:F()});if(Ve=Math.floor(i.align.x),Ee=Math.floor(i.align.y),Me=Math.ceil(i.scale.width),Te=Math.ceil(i.scale.height),Me&&Te){if(qe(ne,$.updateSpeed,{x:Ve,y:Ee,width:Me,height:Te,onComplete:function(){setTimeout(function(){qe(ne,Lo,{alpha:1,ease:"cubic-bezier(0.7, 0, 0.3, 1)"})},1e3)}}),ne.setSize(Me,Te,$.updateSpeed),G(i),ne.hud){var n=Math.floor(i.align.x),o=Math.floor(i.align.y),a=Me,r=Te;Me>Ma.mediaView.maskWidth()&&"hScroll"!==Ma.overrides.transitionType?(n=0,a=Ma.mediaView.maskWidth(),r=Ma.mediaView.maskHeight(void 0,$.section.key)):Te>Ma.mediaView.maskHeight(void 0,$.section.key)&&(o=0,a=Ma.mediaView.maskWidth(),r=Ma.mediaView.maskHeight(void 0,$.section.key)),ne.hud.resize($.updateSpeed,n,o,a,r);var l=i.align.x>0?i.align.x:0,s=i.align.y>0?i.align.y:0;ne.unmuteBtn.x=Math.round(l)+20,ne.unmuteBtn.y=Math.round(s)+20}ie&&O()}}function N(){return{banner:{width:0,height:0},hdpopup:{width:170,height:180},shareCtrls:{width:50,height:180},videoCtrls:{width:Me,height:50}}}function X(){return{banner:{width:550,height:180},hdpopup:{width:170,height:180},shareCtrls:{width:50,height:180},videoCtrls:{width:Me,height:50}}}function Y(){return{banner:{width:550,height:180},hdpopup:{width:170,height:180},shareCtrls:{width:50,height:180},videoCtrls:{width:Me,height:50}}}function Z(){return"ended"===$.playState?Y():"paused"===$.playState?X():N()}function G(e){if(se){var t=Z();le()&&(t.banner.width=540,t.banner.height=170);var i=.5*(Me-t.banner.width),n=.5*(Te-t.banner.height);se.top.x=e.align.x,se.top.y=e.align.y,se.top.width=Me-t.shareCtrls.width,se.top.height=n,se.right.x=e.align.x+Me-i,se.right.y=e.align.y+t.shareCtrls.height,se.right.width=i,se.right.height=Te-t.shareCtrls.height-t.hdpopup.height,se.bottom.x=e.align.x,se.bottom.y=e.align.y+Te-n,se.bottom.width=Me-t.hdpopup.width,se.bottom.height=n-t.videoCtrls.height,se.left.x=e.align.x,se.left.y=e.align.y,se.left.width=i,se.left.height=Te-t.videoCtrls.height}}function U(t){t.id===e.mediaItem.id&&(e.mediaItem.thumb!==t.thumb,e.mediaItem.content!==t.content)}function q(){Ma.section($.section),ae&&(ae.transition=0,ae.x=.5*(Ma.mediaView.maskWidth($.width)-ae.width),ae.y=.5*(Ma.mediaView.maskHeight($.height,$.section.key)-ae.height))}function J(){$.events.removeEventListener($n,m),$.events.removeEventListener(Qn,v),$.events.removeEventListener(bo,b),$.events.removeEventListener($o,c),$.events.removeEventListener(Qo,h),Ie.removeEventListener(tn,B),Ie.removeEventListener(_n,B),Ie.removeEventListener("mediaSizeUpdate",B),Ie.removeEventListener(Wn,U),Ie.removeEventListener("mediaAutoPlay",s),Ie.removeEventListener("spacebarTogglePlay",l),Ie.removeEventListener("destroy",J),Ie.removeEventListener("showCursor",n),Ie.removeEventListener("hideCursor",o),Q.removeEventListener(en,j),ne&&(ne.element.removeEventListener("webkitendfullscreen",y),pe(e.mediaItem)?ne.removeEventListener(wo,x):ne.element.removeEventListener(Co,S,!1),ne.destroy()),$.removeEventListener(So,a)}var $=new Ca({events:e.localEvents});if($.alpha=0,$.updateSpeed=0,$.overflow="hidden",$.id=e.mediaItem.id,$.type=e.mediaItem.type,$.dims=e.size.content,$.section=e.section,$.state=e.state,$.mediaItem=e.mediaItem,e.mediaItem.thumb.length||(Hi[$.id].size.thumb.width=1200,Hi[$.id].size.thumb.height=800),/mp4/.test(e.mediaItem.thumb)){var Q=new Ca({type:"video"});Q.element.setAttribute("muted",!0),Q.element.setAttribute("autoplay",!0),Q.element.setAttribute("loop",!0),Q.element.setAttribute("playsinline",!0),Q.element.setAttribute("type","video/mp4")}else var Q=new Ke;Q.alpha=0,Q.zIndex=1;var ee,te=new Ca;te.element.className="video.mask";var ie,ne,ae,re,se,de,ce=new Ke,he=e.size.thumb.width,ue=e.size.thumb.height,ve=0,ge=0,fe=0,be=0,Ce=0,ye=0,Le=e.size.content.width,xe=e.size.content.height,Me=0,Te=0,Ve=0,Ee=0,ze=!1,ke=!1,Oe=!1,Ie=e.localEvents,Fe=e.state;if(t()&&Ma.lightboxButtonsEnabled()&&!$.mediaItem.disableLightbox){var Ae=Ma.lightboxSection.media.indexOf($.mediaItem.id),He=we({alignHorizontal:Pi.lightboxGalleryBtnAlignHorizontal||"left",alignVertical:Pi.lightboxGalleryBtnAlignVertical||"top",horizontalOffset:E(Pi.lightboxGalleryBtnHorizontalOffset,wa.height),verticalOffset:E(Pi.lightboxGalleryBtnVerticalOffset,wa.height),blendMode:Pi.lightboxGalleryBtnBlendMode||"difference",font:Pi.lightboxGalleryBtnFont||"Helvetica",fontSize:Pi.lightboxGalleryBtnFontSize||12,fontColor:Pi.lightboxGalleryBtnFontColor||"#999999"});if(He.zIndex=1,He.text=Ae>-1?Pi.lightboxGalleryBtnRemoveText||"- Lightbox":Pi.lightboxGalleryBtnAddText||"+ Lightbox",He.addEventListener("click",function(e){var t,i=Ma.lightboxSection.media.indexOf($.mediaItem.id);i>-1?(He.text=Pi.lightboxGalleryBtnAddText||"+ Lightbox",t="remove"):(He.text=Pi.lightboxGalleryBtnRemoveText||"- Lightbox",t="add"),$.events.dispatchEvent("lightboxUpdateItem",{action:t,id:$.mediaItem.id}),He.cursor="pointer"}),$.addChild(He),e.section.isLightbox&&!Pi.lightboxGalleryDownloadBtnDisable){var De=we({alignHorizontal:Pi.lightboxDownloadBtnAlignHorizontal||"right",alignVertical:Pi.lightboxDownloadBtnAlignVertical||"top",horizontalOffset:E(Pi.lightboxDownloadBtnHorizontalOffset,wa.height),verticalOffset:E(Pi.lightboxDownloadBtnVerticalOffset,wa.height),blendMode:Pi.lightboxDownloadBtnBlendMode||"difference",font:Pi.lightboxDownloadBtnFont||"Helvetica",fontSize:Pi.lightboxDownloadBtnFontSize||12,fontColor:Pi.lightboxDownloadBtnFontColor||"#999999"});De.text=Pi.lightboxDownloadBtnText||"↓",De.zIndex=1,De.addEventListener("click",function(e){$.events.dispatchEvent("lightboxDownloadOverlayOpen")}),$.addChild(De)}}te.overflow="hidden",ce.width=70,ce.height=70,ce.alpha=0,ce.zIndex=4,$.addEventListener(So,a),$.events.addEventListener(Qn,v),$.events.addEventListener($o,c),$.events.addEventListener(Qo,h),Ie.addEventListener(tn,B),Ie.addEventListener(_n,function(){ne&&(pe(e.mediaItem)?Ma.overrides.videoLoop?ne.setLoop("true"):ne.setLoop("false"):Ma.overrides.videoLoop?ne.element.setAttribute("loop",!0):ne.element.removeAttribute("loop")),B()}),Ie.addEventListener("mediaSizeUpdate",B),Ie.addEventListener(Wn,U),Ie.addEventListener("mediaAutoPlay",s),Ie.addEventListener("spacebarTogglePlay",l),Ie.addEventListener("destroy",J),Ie.addEventListener("showCursor",n),Ie.addEventListener("hideCursor",o);var Re=k(e.mediaItem);return ie||""===Re||(ie=new za,ie.container.zIndex=3,re=e.mediaItem.overrides||{},Ie.addEventListener("showCaption",D),Ie.addEventListener("hideCaption",R),Ie.addEventListener("checkCaption",I),P(Re)),$.load=function(){Ma.section($.section),$.loaded=!0,$.playState=Ma.overrides.videoAutoPlay?"playing":"paused",""!==Re&&($.addChild(ie.container),O()),me(e.mediaItem)?/mp4/.test(e.mediaItem.thumb)?(Q.element.addEventListener(Co,function(e){j(),this.muted=!0,this.play()}),Q.src=d(e.mediaItem.thumb,e.mediaItem.demoFile)):(Q.addEventListener(en,j),e.mediaItem.thumb.length?Q.src=d(e.mediaItem.thumb,e.mediaItem.demoFile):Q.src=go+"videoLarge2.png"):ne||(b(),Ma.overrides.videoAutoPlay&&Wi!==Xi&&Wi!==Ni||ne.setSource(e.mediaItem.content,!1),D(Fe))},$.unload=function(){},$.play=function(t){Ma.section($.section),t=void 0!==t?t:Ma.overrides.videoAutoPlay,ne&&ne.src?ne.play():ne&&!ne.src?ne.setSource(e.mediaItem.content,t):ne||(b(),ne.setSource(e.mediaItem.content,t)),ae&&(ae.removeLoader(),ae.zIndex=0),qe(ce,Lo,{alpha:0,onComplete:function(){ce.display="none"}}),i($.section)&&!Pi.landingMediaUnmuteBtn&&("function"==typeof ne.disableUnmuteButton&&ne.disableUnmuteButton(),pe(e.mediaItem)||ne.hud.disable())},$.pause=function(){ne&&ne.pause()},$.destroy=function(){v()},$.autoPlay=function(){$.play(!0),Wi!==Xi&&B()},$.hide=function(){1===$.alpha&&qe($,Lo,{alpha:0,onComplete:function(){$.display="none"}})},$.show=function(){0===$.alpha&&($.display="block",qe($,Lo,{alpha:1}))},$.updatePosition=B,$}function Qt(e){function t(){A.thumbs&&A.thumbs.getTotalHeight()&&(A.overlayView.contentHeight=A.thumbs.getTotalHeight()),A.overlayView.updatePosition()}function i(){A.overlayView.show(),A.thumbs&&A.thumbs.show()}function n(){A.overlayView.hide(),A.thumbs.hide()}function o(e){if(T){var t=r(e.id),i=t&&t.key.indexOf(T.key)>-1;(e&&"thumb"===e.field||e.section===T||i)&&(P=!0,T=e.section?e.section:T,A.overlayView.section=T,A.overlayView.updatePosition(e),v({mode:M,section:T}),A.thumbs&&A.thumbs.resize()),T=e.section?e.section:T,A.overlayView.section=T}else A.thumbs&&(n(),A.thumbs.scroll&&A.thumbs.scroll.destroy(),A.overlayView.removeChild(A.thumbs),delete A.thumbs)}function a(e){A.inquiry&&A.inquiry.updateInquiryInfo()}function s(e){e&&A.share&&(A.share.updateStyle(e),A.share.updatePosition(e)),e&&A.inquiry&&(A.inquiry.updateStyle(e),A.inquiry.updatePosition(e)),e&&/overlay/.test(e.id)&&("overlay"===Ma.overrides.thumbnailDock||/fill|hMasonry|vMasonry/.test(Ma.overrides.thumbnailType))&&(P=!0,A.overlayView.updatePosition(e),"changeTemplate"===e.action||(R=!0,v({mode:M,section:T}))),e&&/paginated|static|thumbnail|menuWidth|menuAlignHorizontal|menuOffsetX|sitePaddingTop|sitePaddingRight|sitePaddingBottom|sitePaddingLeft/i.test(e.id)&&(P=!0,A.overlayView.updatePosition(e),"changeTemplate"===e.action||(R=!0,v({mode:M,section:T})),A.thumbs&&A.thumbs.resize())}function d(e){(e.info.isMediaViewStateChange||e.info.isModeChange)&&A.overlayView.updatePosition(e),e.assetId&&(V=e.assetId),e.section&&Ma.section(e.section),Ma.siteView.unifiedPageScroll()&&/strip/.test(Ma.overrides.thumbnailType)?A.overlayView.position="fixed":A.overlayView.position="absolute",/inquiry|share|foto/.test(e.mode)?(A.overlayView.contentHeight=Ma.mediaView.zoneHeight(e.section.key),A.overlayView.show(),w(e),y(e),c(e)):(w(e),y(e),c(e)),v(e)}function c(t){if(t.section&&t.mode.indexOf("fotomoto")>-1){var i=S(t.section.media),n=l(i[t.assetId]);return window.FOTOMOTO&&n&&n.type===Zi&&window.FOTOMOTO.API.showWindow(10,Bi.cdnSslUri+"/"+n.content),setTimeout(function(){e.siteEvents.dispatchEvent("clearFotomotoMode","fotomoto")},100),!0}return!1}function h(e,t){return!!t&&t.indexOf(e)!==-1}function u(e){A.thumbs&&!A.thumbs.scroll&&/fill|hMasonry|vMasonry/.test(Ma.overrides.thumbnailType)?e.info&&e.info.isModeChange&&h("thumbs",e.mode)||(e.info&&!e.info.isSectionChange&&e.info.isModeChange&&h("thumbs",e.info.lastUri)?O=A.thumbs.mask.scrollY||window.scrollY:e.info&&e.info.isSectionChange&&(O=void 0)):O=void 0}function m(e){if(A.thumbs&&Ma.section(A.thumbs.section),"unifiedSiteScrollVertical"!==Ma.overrides.siteDisplayBehavior&&A.thumbs&&!A.thumbs.scroll&&/fill|hMasonry|vMasonry/.test(Ma.overrides.thumbnailType)&&(info&&info.isSectionChange&&!info.isModeChange&&h("thumbs",M)?Ma.siteView.unifiedPageScroll()&&window.scrollTo(0,0):info&&!info.isSectionChange&&info.isModeChange&&h("thumbs",M)&&(Ma.siteView.unifiedPageScroll()?window.scrollTo(0,O||0):A.thumbs.mask.scrollY=O||0)),A.thumbs&&/strip/.test(Ma.overrides.thumbnailType)&&h("thumbs",M))if(A.thumbs.scroll&&!A.thumbs.mouseHover)A.thumbs.scroll.percent=V/(k.length-1),A.thumbs.scroll.update(Lo),A.thumbs.lazyLoader&&A.thumbs.lazyLoader.update();else if("strip"===Ma.overrides.thumbnailType){var t=V/(k.length-1);if(/top|bottom/.test(Ma.overrides.thumbnailSide)){var i=A.thumbs.mask.grid.width-A.thumbs.mask.width;fa.to(A.thumbs.mask,Lo,{scrollLeft:Math.round(i*t),scrollTop:0,ease:po?"outQuart":"inOutCubic",onComplete:function(){A.thumbs&&A.thumbs.lazyLoader&&A.thumbs.lazyLoader.update()}})}else{var i=A.thumbs.mask.grid.height-A.thumbs.mask.height;fa.to(A.thumbs.mask,Lo,{scrollLeft:0,scrollTop:Math.round(i*t),ease:po?"outQuart":"inOutCubic",onComplete:function(){A.thumbs&&A.thumbs.lazyLoader&&A.thumbs.lazyLoader.update()}})}}}function v(t){if(M=t.mode||"",T=t.section||T,A.overlayView.section=T,H=t.info?t.info.isModeChange:M!==t.mode&&T===t.section,info=t.info?t.info:{},t.assetId>-1&&(V=t.assetId),E=t.path||E,t.section&&(k=t.section.mediaItems||k),/fill|hMasonry|vMasonry/.test(Ma.overrides.thumbnailType)&&/thumbs/.test(M)?(e.siteEvents.dispatchEvent($n),setTimeout(function(){e.mediaView.scroll&&e.mediaView.scroll.hide()},20)):/fill|hMasonry|vMasonry/.test(Ma.overrides.thumbnailType)&&setTimeout(function(){e.mediaView.scroll&&e.mediaView.scroll.show()},0),A.thumbs&&A.thumbs.section!==T&&(O=void 0),A.thumbs&&(A.thumbs.section!==T||P||R)&&(A.thumbs.scroll&&A.thumbs.scroll.destroy(), A.thumbs.lazyLoader&&delete A.thumbs.lazyLoader,A.overlayView.removeChild(A.thumbs),delete A.thumbs),k=t.section.media.filter(function(e){return null!==e}).filter(function(e){return!ge(r(e))}).map(function(e){var t=e<1e4?x(r(e)):JSON.parse(JSON.stringify(l(e)));return t}).filter(function(e){return!!e&&!e.slideshow}),k.filter(function(e){return"link"!==e.type}).forEach(function(e,t){e.assetId=t}),t.section&&t.section.thumb)if(z=t.section.thumb,!A.thumbs&&M.indexOf("thumbs")>-1&&k.length&&("hPaginatedGrid"===Ma.overrides.thumbnailType?(A.thumbs=new ti({assetId:V,path:E,mediaItems:k,settings:z,events:e.siteEvents,localEvents:e.localEvents,parent:e.siteView,scrollbarParent:F,section:T,thumbnailOnly:Ma.overrides.thumbnailOnly,isIndexSection:g(T)}),A.overlayView.contentHeight=Ma.mediaView.zoneHeight(t.section.key)):(A.thumbs=new ni({assetId:V,path:E,mediaItems:k,settings:z,events:e.siteEvents,localEvents:e.localEvents,parent:e.siteView,scrollbarParent:F,section:T,thumbnailOnly:Ma.overrides.thumbnailOnly,isIndexSection:g(T)}),A.overlayView.contentHeight="strip"===Ma.overrides.thumbnailType&&"unifiedSiteScrollVertical"===Ma.overrides.siteDisplayBehavior?Ma.mediaView.zoneHeight(t.section.key):A.thumbs.getTotalHeight()),A.thumbs.section=T,A.thumbs.settings=z,A.overlayView.addChild(A.thumbs)),A.thumbs&&M.indexOf("thumbs")>-1&&(!A.thumbs.toggleState()||P))setTimeout(function(){f(),m(t),i()},1e3*Lo);else if(A.thumbs&&A.thumbs.toggleState()&&M.indexOf("thumbs")===-1)if(H)if(f(),Ma.siteView.unifiedPageScroll()||/^unifiedSite/.test(Ma.overrides.siteDisplayBehavior)&&"multiple"===xa.sectionDisplayMode||"strip"===Ma.overrides.thumbnailType)n();else{var o=500*Lo;setTimeout(function(){n()},o)}else e.siteEvents.addEventListener(fo,b);u(t),setTimeout(function(){C(t),M.indexOf("thumbs")>-1&&m(t)},20),H=!1,P=!1,R=!1}function f(){"strip"===Ma.overrides.thumbnailType&&"displace"===Ma.overrides.thumbnailDock&&e.siteEvents.dispatchEvent("thumbStripDisplaceChange")}function b(){e.siteEvents.removeEventListener(fo,b),1===Pi.overlayAlpha&&e.siteEvents.dispatchEvent("OPAQUE_OVERLAY_CLOSE"),n()}function C(){A.thumbs&&(V>-1?A.thumbs.highlight(V):A.thumbs.highlight(-1))}function w(t){return t.mode.indexOf("share")>-1?(A.share||(A.share=new Mi(Object.assign({},e,{section:t.section})),A.share.pointerEvents="auto",A.overlayView.addChild(A.share)),A.share.updateContent(t),A.share.show(),!0):(A.share&&A.share.hide(),!1)}function y(t){return t.mode.indexOf("inquiry")>-1?(A.inquiry||(A.inquiry=new xi(Object.assign({},e,{section:t.section})),A.inquiry.pointerEvents="auto",A.overlayView.addChild(A.inquiry)),A.inquiry.updateContent(t),A.inquiry.show(),!0):(A.inquiry&&A.inquiry.hide(),!1)}function L(e){if(e.customThumb)return{name:e.customThumb,size:e.customThumbSize};if(e.media)for(var t=0;t9999){var i=l(e.media[t]);if(i.thumb)return{name:i.thumb,size:i.size.thumb,demoFile:i.demoFile};if("image"===i.type)return{name:i.content,size:i.size.content,demoFile:i.demoFile}}return{name:"",size:{width:0,height:0}}}function x(e){var t;if(e){var i=l(e.media[0]),n=L(e);p(i,e)?(t=JSON.parse(JSON.stringify(i)),t.size.thumb=n.size,t.thumb=n.name,t.demoFile=n.demoFile,t.subTitle=e.subTitle):t={size:{content:{width:0,height:0},thumb:{width:n.size.width,height:n.size.height},featuredImage:{width:0,height:0},bytes:0},slideshow:e.slideshow,label:e.label,subTitle:e.subTitle,alias:e.alias,title:"",type:"link",content:e.indexLink||e.key.replace(/ /g,"-"),thumb:n.name,linkTarget:e.linkTarget||"_self",caption:"",overrides:{thumbScaleFactor:e.overrides.thumbScaleFactor},featuredImage:"",filters:[],dateAdded:(new Date).toISOString(),demoFile:n.demoFile}}return!(!e||!e.visible)&&t}var M,T,V,E,z,k,O,I,F,A=new $e({parentView:e.mediaView.mask,parentController:e.parentController,events:e.siteEvents}),P=!1,H=!1,D=e.localEvents,R=!1;return A.overlayView=new ei(e),A.overlayView.zIndex=Ma.overlayView.zIndex,A.lazyLoaderUpdate=function(){A.thumbs&&A.thumbs.lazyLoader&&A.thumbs.lazyLoader.update()},/^unifiedSite|overlay/.test(Ma.overrides.siteDisplayBehavior)?(F=e.mediaView,e.mediaView.addChild(A.overlayView)):(F=e.siteView,e.siteView.addChild(A.overlayView)),D.addEventListener("UPDATE_CONTENT_HEIGHT",function(e){T&&(I=T.key,Ma.section(T)),"strip"===Ma.overrides.thumbnailType?(A.overlayView.contentHeight=Ma.mediaView.zoneHeight(I),A.overlayView.updatePosition()):e.thumbs&&(A.overlayView.contentHeight=e.thumbs,A.overlayView.updatePosition())}),e.siteEvents.addEventListener(_n,s),A.uriChange=d,e.siteEvents.addEventListener(Zn,o),e.siteEvents.addEventListener(Yn,a),e.siteEvents.addEventListener("UPDATE_CONTENT_HEIGHT",t),e.siteEvents.addEventListener("holdersBuilt",function(){C(),m()}),A.destroy=function(){A.thumbs&&(A.thumbs.scroll&&A.thumbs.scroll.destroy(),A.thumbs.staticNav&&A.thumbs.removeStaticNav()),/^unifiedSite/.test(Ma.overrides.siteDisplayBehavior)?e.mediaView.mask.removeChild(A.overlayView):e.siteView.removeChild(A.overlayView),e.siteEvents.removeEventListener(_n,s),A.uriChange=d,e.siteEvents.removeEventListener(Zn,o),e.siteEvents.removeEventListener(Yn,a),e.siteEvents.removeEventListener("UPDATE_CONTENT_HEIGHT",t),e.siteEvents.removeEventListener("holdersBuilt",function(){thumbHoldersBuilt(),m()})},A.resize=function(e){A.overlayView.updatePosition(e),A.share&&A.share.updatePosition(e),A.inquiry&&A.inquiry.updatePosition(e),A.thumbs&&A.thumbs.resize()},A}function ei(e){var t=new st({events:e.events});t.zIndex=Ma.overlayView.zIndex,t.overflow=/hPaginatedGrid/.test(Ma.overrides.thumbnailType)?"initial":"hidden",t.pointerEvents="none",t.updateSpeed=0,"Safari"===ra&&(t.style["-webkit-backface-visibility"]="hidden",t.style.transform="translateZ(0)"),t.element.setAttribute("class","OverlayView"),t.addEventListener(So,function(){t.updatePosition()}),t.show=function(){t.display="block",qe(t,Lo,{alpha:1})},t.hide=function(){qe(t,Lo,{alpha:0,onComplete:function(){t.display="none"}})};var i=20;return t.updatePosition=function(){setTimeout(function(){t.section&&(t.sectionKey=t.section.key,Ma.section(t.section)),t.overflow=/hPaginatedGrid/.test(Ma.overrides.thumbnailType)?"initial":"hidden";var e=Ma.overrides.siteDisplayBehavior&&/^unifiedSite/.test(Ma.overrides.siteDisplayBehavior)?t.contentHeight||0:Ma.overlayView.zoneHeight();"unifiedSiteScrollVertical"===Ma.overrides.siteDisplayBehavior&&/strip/.test(Ma.overrides.thumbnailType)&&(e=Ma.mediaView.zoneHeight(t.sectionKey)),qe.defer(t,0,{x:Ma.overlayView.x(),y:Ma.overlayView.y(t.sectionKey),width:Ma.overlayView.zoneWidth(),height:e}),t.updateSpeed=Lo},i)},t}function ti(e){function t(e,t,i){var n=zo[Ma.overrides.thumbnailSize].width+i,o=Math.floor((e+i)/n);return o0?f-1:0;var t=h[f];qe(c,.35,{x:-t.x,ease:na.cubic.inOut,onComplete:function(){0===f?(e.hide("prev"),e.show("next")):f===h.length-1?(e.hide("next"),e.show("prev")):e.show(),t.lazyLoader.update()}})},nextClick:function(e){f=f+10&&(c=d(new Ca),c.zIndex=1,c.element.className="paginated container",v.mask.element.className="paginated mask",v.mask.width=Ma.mediaView.zoneWidth(),v.mask.height=Ma.mediaView.zoneHeight(v.section.key),v.layout=function(){h.forEach(function(e,t){e.resize(),e.x=t*Ma.mediaView.zoneWidth()})},v.transition=new ii({mediaView:v,mediaViewContainer:c,event:e.events}),v.resize=function(){d(c),f>h.length-1&&(f=h.length-1),v.staticNav&&(v.staticNav.resize({x:0,y:0,width:Ma.overlayView.zoneWidth(),height:Ma.mediaView.zoneHeight(v.section.key)}),h.length&&1!==h.length?0===f?(v.staticNav.hide("prev"),v.staticNav.show("next")):f===h.length-1?(v.staticNav.hide("next"),v.staticNav.show("prev")):v.staticNav.show():v.staticNav.hide()),v.layout(),h[f]&&qe(c,.35,{x:-h[f].x})},v.removeStaticNav=function(){v.removeChild(v.staticNav)},v.staticNav=r(),h.length&&1!==h.length?0===f?(v.staticNav.hide("prev"),v.staticNav.show("next")):f===h.length-1?(v.staticNav.hide("next"),v.staticNav.show("prev")):v.staticNav.show():v.staticNav.hide(),v.resize()),v.show=function(){v.display="block",h.forEach(function(e,t){e.show()}),m=!0},v.hide=function(){h.forEach(function(e){e.hide()}),setTimeout(function(){v.display="none"},1e3*Lo),m=!1},v.toggleState=function(){return m},v.highlight=function(){if(c){var e=c.children[f];e&&e.highlight()}},v.mask.addChild(c),v.addChild(v.mask),v.addChild(v.staticNav),v}function ii(e){function t(e,t){Ma.section(o.section);var t=void 0!==t?t:Ma.mediaView.transitionDuration();n.dispatchEvent(fo);var a=po?na.quart.out:na.cubic.inOut,r=i.children[e];if(r){var l=r.x,s=r.y;if(qe(i,t,{translateX:-l,translateY:-s,ease:a,onComplete:function(){n.dispatchEvent(bo),o.lazyLoader&&o.lazyLoader.update()}}),Wi===Xi)for(var d=i.children,c=0;c1?(c=2*zo[Ma.overrides.thumbnailSize].width+Ma.overrides.thumbnailGap,u=2*zo[Ma.overrides.thumbnailSize].height+Ma.overrides.thumbnailGap,p=2*zo[Ma.overrides.thumbnailSize].width+Ma.overrides.thumbnailGap,g=2*zo[Ma.overrides.thumbnailSize].height+Ma.overrides.thumbnailGap):(c=zo[Ma.overrides.thumbnailSize].width,u=zo[Ma.overrides.thumbnailSize].height,p=zo[Ma.overrides.thumbnailSize].width,g=zo[Ma.overrides.thumbnailSize].height);var x=c,M=u;if(L.width=x,L.height=M,L.filename=n(l,c,u),L.original=o(l,c,u),w(e.section.id)?L.index=C(l.assetId,e.section.mediaItems.length-1):L.index=l.assetId,/mp4/.test(L.filename)?(L.thumb=new Ca({type:"video"}),L.thumb.element.setAttribute("muted",!0),L.thumb.element.setAttribute("autoplay",!0),L.thumb.element.setAttribute("loop",!0),L.thumb.element.setAttribute("playsinline",!0),L.thumb.element.setAttribute("type","video/mp4")):L.thumb=new Ke,L.thumb.attempts=0,L.thumb.selectable=!1,L.thumb.zIndex=1,!l.disableLightbox&&h(l.type)&&Ma.lightboxButtonsEnabled()){var T=Ma.lightboxSection.media.indexOf(l.id),z=we({alignHorizontal:Pi.lightboxThumbnailBtnAlignHorizontal||"right",alignVertical:Pi.lightboxThumbnailBtnAlignVertical||"top",horizontalOffset:E(Pi.lightboxThumbnailBtnHorizontalOffset,wa.height),verticalOffset:E(Pi.lightboxThumbnailBtnVerticalOffset,wa.height),blendMode:Pi.lightboxThumbnailBtnBlendMode||"difference",font:Pi.lightboxThumbnailBtnFont||"Helvetica",fontSize:Pi.lightboxThumbnailBtnFontSize||12,fontColor:Pi.lightboxThumbnailBtnFontColor||"#999999"});if(z.zIndex=5,z.text=T>-1?Pi.lightboxThumbnailBtnRemoveText||"- Lightbox":Pi.lightboxThumbnailBtnAddText||"+ Lightbox",L.lightboxBtn=z,L.lightboxBtn.addEventListener("click",function(e){var t,i=Ma.lightboxSection.media.indexOf(l.id);i>-1?(z.text=Pi.lightboxThumbnailBtnAddText||"+ Lightbox",X.section.isLightbox&&(L.thumb.alpha=.15),t="remove"):(z.text=Pi.lightboxThumbnailBtnRemoveText||"- Lightbox",X.section.isLightbox&&(L.thumb.alpha=1),t="add"),L.lightboxBtn.cursor="pointer",X.events.dispatchEvent("lightboxUpdateItem",{action:t,id:l.id})}),L.addChild(z),!Pi.lightboxThumbnailDownloadBtnDisable&&X.section.isLightbox){var k=we({alignHorizontal:Pi.lightboxThumbnailDownloadBtnAlignHorizontal||"right",alignVertical:Pi.lightboxThumbnailDownloadBtnAlignVertical||"top",horizontalOffset:E(Pi.lightboxThumbnailDownloadBtnHorizontalOffset,wa.height),verticalOffset:E(Pi.lightboxThumbnailDownloadBtnVerticalOffset,wa.height),blendMode:Pi.lightboxThumbnailDownloadBtnBlendMode||"difference",font:Pi.lightboxThumbnailDownloadBtnFont||"Helvetica",fontSize:Pi.lightboxThumbnailDownloadBtnFontSize||12,fontColor:Pi.lightboxThumbnailDownloadBtnFontColor||"#999999"});k.text=Pi.lightboxThumbnailDownloadBtnText||"↓",k.zIndex=5,k.addEventListener("click",function(e){X.events.dispatchEvent("lightboxDownloadOverlayOpen")}),L.addChild(k)}}var I=De({type:"fit",hRange:p,vRange:g,width:l.size.thumb.width||l.size.content.width||zo[Ma.overrides.thumbnailSize].width,height:l.size.thumb.height||l.size.content.height||zo[Ma.overrides.thumbnailSize].height,disableOrientationCheck:!0}),F=new xe({hRange:c,vRange:u,hAlign:Ma.overrides.thumbnailAlignHorizontal||"center",vAlign:Ma.overrides.thumbnailAlignVertical||"center",width:I.width,height:I.height});L.thumb.width=Math.ceil(I.width),L.thumb.height=Math.ceil(I.height),L.thumb.x=Math.floor(F.x),L.thumb.y=Math.floor(F.y),"strip"!==Ma.overrides.thumbnailType&&("slideUp"===Pi.thumbLoadEffect?(L.alpha=0,L.translateX=0,L.translateY=70):"slideDown"===Pi.thumbLoadEffect&&(L.alpha=0,L.translateX=0,L.translateY=-70)),l.type===Gi&&Ma.overrides.thumbnailVideoPlayIcon&&(pe(l)&&Ma.overrides.vimeoDefault&&e.thumbnailOnly||v(L,c,u)),L.playBtn&&(L.playBtn.x=Math.round(.5*(c-50)),L.playBtn.y=Math.round(.5*(u-50)));var P=ri(e.isIndexSection);if(L.selectable=!0,P&&"none"!==P){L.label=new lt,L.label.selectable=!0;var R=l.alias||l.label;l.subTitle&&(R+="