367972375
-1}function showPosterImage(e){return isVimeo(e)?!(STATE.overrides.videoAutoPlay||STATE.overrides.vimeoDefault):!STATE.overrides.videoAutoPlay}function getCursorAxis(e){switch(e){case"fade":case"hSlide":case"mSlide":case"hScroll":case"hScrollNC":case"grid":return"x";case"vSlide":case"vScroll":case"vScrollNC":return"y"}}function inBounds(e,t){return e.x=0&&e.y>=0}function adjustOutOfBoundsPanel(e,t,i,n){var o=e,a=t;return a<0&&(a=0),a+theme.titleBarHeight>stage.height&&(a=stage.height-theme.titleBarHeight),o+i-theme.titleBarHeight-100<0&&(o=-(i-theme.titleBarHeight-100)),o+theme.titleBarHeight>stage.width&&(o=stage.width-theme.titleBarHeight),{x:o,y:a}}function isSpacer(e){return"%SPACER%"===e.label}function isSingleTextPage(e){return e&&e.media&&1===e.media.length&&/html|contact/.test(getMediaById(e.media[0]).type)}function getPropWithoutReflow(e,t){var i=e.style.display||"block";e.style.display="none";var n=e[t];return e.style.display=i,n}function clamp(e,t){return function(i){return it?t:i}}function resolveSectionPath(e){var t=getFirstValidSub(e);return!sectionHasMedia(e)&&(e.isIndex?e.key:t?t.key:e.key)}function fullscreen(e){return function(){function t(){e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode("fullscreen")&&"inline"===e.webkitPresentationMode?e.removeAttribute("controls"):document.isFullscreen||document.webkitIsFullscreen||e.removeAttribute("controls")}document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement?document.webkitExitFullscreen():e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode("fullscreen")?(e.webkitSetPresentationMode("fullscreen"),e.setAttribute("controls",!0)):e.requestFullscreen?(e.requestFullscreen(),e.setAttribute("controls",!0)):e.webkitRequestFullscreen&&(e.webkitRequestFullscreen(),e.setAttribute("controls",!0)),document.addEventListener("fullscreenchange",t,!1),document.addEventListener("webkitfullscreenchange",t,!1),e.addEventListener("webkitendfullscreen",t,!1)}}function buildAttachmentButton(e){var t=new Sprite;t.selectable=!1,t.style.display="flex",t.style.alignItems="center",t.style.gap="4px";var i=new Svg;i.id="svg",i.position="relative",i.width=21,i.height=21,i.left=0,i.top=0,t.addChild(i);var n=new Path;n.id="icon",n.position="relative",n.d=e.icon,n.strokeWidth=0,n.fill=e.iconColor,i.addChild(n);var o=new TextField;switch(o.selectable=!1,o.cursor="pointer",o.position="relative",o.fontFamily=e.font,o.fontColor=e.fontColor,o.fontSize=e.fontSize,o.text=e.text,e.text&&t.addChild(o),e.alignVertical){case"top":t.element.style.top="calc(0% + "+(e.verticalOffset||20)+"px)";break;case"center":t.element.style.top="calc(50% + "+(e.verticalOffset||0)+"px)";break;case"bottom":t.element.style.bottom="calc(0% + "+(e.verticalOffset||20)+"px)"}switch(e.alignHorizontal){case"left":t.element.style.left="calc(0% + "+(e.horizontalOffset||20)+"px)";break;case"center":t.element.style.left="calc(50% + "+(e.horizontalOffset||0)+"px)";break;case"right":t.element.style.right="calc(0% + "+(e.horizontalOffset||20)+"px)"}return"center"===e.alignVertical&&"center"===e.alignHorizontal?t.element.style.transform="translate(-50%, -50%)":"center"===e.alignVertical?t.element.style.transform="translateY(-50%)":"center"===e.alignHorizontal&&(t.element.style.transform="translateX(-50%)"),t.element.style["mix-blend-mode"]=e.blendMode,t.cursor="pointer",t}function buildAlignedButton(e){var t=new Sprite;switch(t.selectable=!1,t.fontFamily=e.font,t.fontColor=e.fontColor,t.fontSize=e.fontSize,e.alignVertical){case"top":t.element.style.top="calc(0% + "+(e.verticalOffset||20)+"px)";break;case"center":t.element.style.top="calc(50% + "+(e.verticalOffset||0)+"px)";break;case"bottom":t.element.style.bottom="calc(0% + "+(e.verticalOffset||20)+"px)"}switch(e.alignHorizontal){case"left":t.element.style.left="calc(0% + "+(e.horizontalOffset||20)+"px)";break;case"center":t.element.style.left="calc(50% + "+(e.horizontalOffset||0)+"px)";break;case"right":t.element.style.right="calc(0% + "+(e.horizontalOffset||20)+"px)"}return"center"===e.alignVertical&&"center"===e.alignHorizontal?t.element.style.transform="translate(-50%, -50%) rotate("+(e.rotation||0)+"deg)":"center"===e.alignVertical?t.element.style.transform="translateY(-50%) rotate("+(e.rotation||0)+"deg)":"center"===e.alignHorizontal?t.element.style.transform="translateX(-50%) rotate("+(e.rotation||0)+"deg)":t.element.style.transform="rotate("+(e.rotation||0)+"deg)",t.element.style["mix-blend-mode"]=e.blendMode,t.cursor="pointer",t}function copyToClipboard(e){var t=document.createElement("input");t.value=e,t.style.opacity=0,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(t)}function isOverlayAndNotGalleryOnly(){return"overlay"===STATE.overrides.siteDisplayBehavior&&!STATE.overrides.siteDisplayGalleryOnlyOverlay}function isClosedGalleryOnlyOverlay(){return"overlay"===STATE.overrides.siteDisplayBehavior&&STATE.overrides.siteDisplayGalleryOnlyOverlay&&"open"!==layoutCalcs.mediaOverlayState}function isInMediaOverlay(){return isOverlayAndNotGalleryOnly()||"overlay"===STATE.overrides.siteDisplayBehavior&&STATE.overrides.siteDisplayGalleryOnlyOverlay&&"open"===layoutCalcs.mediaOverlayState}function getMarginOverlap(){return/top|bottom/.test(STATE.menuView.placement())?percentToPixels(LAYOUT_MODEL.marginOverlap,stage.height):percentToPixels(LAYOUT_MODEL.marginOverlap,stage.width)}function hasMode(e,t){return!!t&&t.indexOf(e)!==-1}function Accordion(e){function t(e){e.isOpen?o.closeItem(e):o.openItem(e)}function i(){n=new Tile,n.gap=o.gap,n.axis=o.axis,n.align=o.align,n.wrap=o.wrap,n.perpLength=0}e=e||{};var n,o=new Sprite(e),a=[];return o.identity="menu",o.element.setAttribute("data-identity","menu"),o.gap=e.gap||1,o.axis=e.axis||"y",o.align=e.align||"left",o.wrap=e.wrap||!1,o.perpLength=e.perpLength||o.width,o.expand="auto",o.toggle=e.toggle||!0,o.updateSpeed=e.updateSpeed||.35,o.animate=e.animate||!0,o.addEventListener(SELECT_ACCORDION_ITEM,o.select),o.addItem=function(e,t,i,n){"all"===o.expand&&(n=!0);var r={container:e,title:t,content:i,isOpen:n||!1,hasSubs:e.hasSubs||!1};"x"===o.axis&&LAYOUT_MODEL.dropdownSubMenu?isPod()||isPad()?(t.addEventListener("click",function(){o.animate=!0,o.updateSpeed=.25,o.openItem(r)}),i&&i.addEventListener("click",function(){o.closeItem(r)})):(t.addEventListener("mouseover",function(){o.animate=!0,o.updateSpeed=.25,o.openItem(r)}),t.addEventListener("mouseout",function(){o.animate=!0,o.updateSpeed=.25,o.closeItem(r)}),i&&(i.addEventListener("mouseover",function(){o.openItem(r)}),i.addEventListener("mouseout",function(){o.closeItem(r)}))):t.addEventListener(CLICK,o.select),a.push(r),t.accordionItem=r,o.addChild(e)},o.select=function(e){for(var i=a.length;i--;)a[i]===this.accordionItem?"y"!==o.axis&&"x"===o.axis&&LAYOUT_MODEL.dropdownSubMenu||(o.toggle?t(this.accordionItem):this.accordionItem.isOpen||o.openItem(this.accordionItem),o.dispatchEvent(ACCORDION_SELECT,this.accordionItem)):"single"===o.expand&&o.closeItem(a[i]);o.layout(UPDATE_SPEED)},o.closeItem=function(e){"all"!==o.expand&&(e.isOpen=!1,e.content&&(e.content.overflow="hidden",Tween(e.content,o.animate?o.updateSpeed:0,{height:0}),e.container.height=e.title.element.offsetHeight))},o.openItem=function(e){e.isOpen=!0,e.content&&(Tween(e.content,o.animate?o.updateSpeed:0,{height:e.contentHeight,onComplete:function(){LAYOUT_MODEL.dropdownSubMenu&&/top|bottom/.test(STATE.menuView.placement())||(e.content.overflow="visible")}}),e.container.height=e.title.element.offsetHeight+e.contentHeight)},o.layout=function(e){function t(e,t,i){return e+(t<0?-t:0)+(i+t-e<0?0:i+t-e)}o.updateSpeed=e||0,i();var r,l,s=a.length,d=-o.gap;for(n.perpLength=0,r=0;rn.perpLength?u:n.perpLength:n.perpLength=h>n.perpLength?h:n.perpLength,n.addItem(h,u)}n.layoutItems();var T="x"===o.axis?o.gap+d:0,E="x"===o.axis?0:o.gap+d,m=n.getBounds(),g="x"===o.axis?m.width-o.gap:n.perpLength,p=m.height+("x"===o.axis?0:o.gap+d);for(r=0;rlayoutCalcs.menuView.width()&&(g=f)}}o.width=g,o.height=p,o.dispatchEvent(ACCORDION_SIZE_CHANGE,{width:g,height:p})},o}function Align(e,t,i){var n=new AlignEngine({hRange:i.hRange,vRange:i.vRange,hAlign:i.hAlign,vAlign:i.vAlign,width:i.width||e.width,height:i.height||e.height,hOffset:i.hOffset,vOffset:i.vOffset}),o=i.hOrigin||0,a=i.vOrigin||0,r={x:Math.round(n.x+o),y:Math.round(n.y+a),onComplete:i.onComplete,onCompleteParams:i.onCompleteParams,onCompleteScope:i.onCompleteScope,onUpdate:i.onUpdate,onUpdateParams:i.onUpdateParams,onUpdateScope:i.onUpdateScope,onInit:i.onInit,onInitScope:i.onInitScope,onInitParams:i.onInitParams};return Tween(e,t,r),r}function AlignEngine(e){e=e||{};var t=e.hRange||0,i=e.vRange||0,n=e.width||0,o=e.height||0,a=e.hAlign||"left",r=e.vAlign||"top",l=e.hOffset||0,s=e.vOffset||0;return{set hRange(e){t=e},set vRange(e){i=e},set width(e){n=e},set height(e){o=e},set hAlign(e){a=e},set vAlign(e){r=e},set hOffset(e){l=e},set vOffset(e){s=e},get x(){return"center"===a?.5*(t-n)+l:"right"===a?t-n-l:l},get y(){return"center"===r||"middle"===r?.5*(i-o)+s:"bottom"===r?i-o-s:s}}}function Cursor(e){function t(){return{left:{arrow1:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.arrow1Left,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},arrow2:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.arrow2Left,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},arrow3:{fill:"none",d:svgPaths.arrow3Left,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:1.5},plus1:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.plus1Left,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},plus2:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.plus2Left,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},none:{fill:"none",d:"",stroke:"none",strokeWidth:0},disabled:{fill:"none",d:"",stroke:"none",strokeWidth:0}},right:{arrow1:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.arrow1Right,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},arrow2:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.arrow2Right,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},arrow3:{fill:"none",d:svgPaths.arrow3Right,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:1.5},plus1:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.plus1Right,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},plus2:{fill:LAYOUT_MODEL.cursorColor,d:svgPaths.plus2Right,stroke:LAYOUT_MODEL.cursorColor,strokeWidth:0},none:{fill:"none",d:"",stroke:"none",strokeWidth:0},disabled:{fill:"none",d:"",stroke:"none",strokeWidth:0}}}}function i(){var e=USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&LAYOUT_MODEL.cursorIconBlendMode?LAYOUT_MODEL.cursorIconBlendMode:"normal";m.element.style["mix-blend-mode"]=e}function n(e){C=e||"x"}function o(e){A=!/none|disabled/.test(LAYOUT_MODEL.navCursorType)&&e}function a(e){return TOUCH_DEVICE&&e.touches?e.touches[0].pageX:e.clientX}function r(e){return TOUCH_DEVICE&&e.touches?e.touches[0].pageY:e.clientY}function l(){g=new Svg,g.left=-20,g.top=-20,g.width=40,g.height=40,m.addChild(g),g.element.style["pointer-events"]="none",m.svg=g,p=new Path,p.id="icon",g.addChild(p),p.element.style["pointer-events"]="none",m.iconLeft=p,L=new Path,L.id="icon",g.addChild(L),L.element.style["pointer-events"]="none",m.iconCenter=L,m.iconCenter.d=svgPaths.cursorThumbs,f=new Path,f.id="icon",g.addChild(f),f.element.style["pointer-events"]="none",m.iconRight=f,s(),stage.addEventListener(MOUSE_MOVE,d),m.listenerAdded=!0}function s(){var e=USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&LAYOUT_MODEL.cursorIconBlendMode?LAYOUT_MODEL.cursorIconBlendMode:"normal";m.cursorIconStyle=LAYOUT_MODEL.cursorIconStyle||"arrow2";var t=O.left[m.cursorIconStyle],i=O.right[m.cursorIconStyle];m.element.style["mix-blend-mode"]=e,m.navCursorType=LAYOUT_MODEL.navCursorType,m.iconLeft.d=t.d,m.iconLeft.fill=t.fill,m.iconLeft.stroke=t.stroke,m.iconLeft.strokeWidth=t.strokeWidth,m.iconCenter.fill=LAYOUT_MODEL.cursorColor,m.iconRight.d=i.d,m.iconRight.fill=i.fill,m.iconRight.stroke=i.stroke,m.iconRight.strokeWidth=i.strokeWidth}function d(e){if(m.enabled){if(e.target!==g.element&&e.target!==p.element&&e.target!==L.element&&e.target!==f.element){var i=a(e),n=r(e),o=STATE.mediaView.x(),l=STATE.mediaView.y(),d=STATE.mediaView.width(),c=STATE.mediaView.height();m.transition=0,m.translateX=i-2,m.translateY=n-2,e.target.navigationCursor&&m.enabled?v||h(e):v&&u(e);var E=A?.333*d:.5*d,b=A?.333*c:.5*c,y="x"===C?E:b,M="x"===C?i-o:n-l,w=y,_=2*y;(LAYOUT_MODEL.cursorColor!==O.left.arrow1.fill||LAYOUT_MODEL.cursorIconStyle!==m.cursorIconStyle&&LAYOUT_MODEL.navCursorType!==m.navCursorType)&&(O=t(),s()),Mw&&M<_?(m.iconLeft.alpha=0,m.iconCenter.alpha=1,m.iconRight.alpha=0,m.svg.rotate=0,m.type="thumbs"):(!A||M>_)&&(m.iconLeft.alpha=0,m.iconCenter.alpha=0,m.iconRight.alpha=1,m.svg.rotate="y"===C&&/arrow/.test(m.cursorIconStyle)?90:0,m.type="next")}}else T(e);clearTimeout(S),S=setTimeout(function(){T(e)},5e3)}function c(t){t.target.navigationCursor&&m.enabled&&(m.alpha=0,v=!1,"thumbs"===m.type?e.events.dispatchEvent(NAVBAR_OVERLAY_BTN_CLICK,m.type):e.events.dispatchEvent(NAVBAR_NAV_CLICK,{navDir:m.type}))}function h(e){"cursor"===LAYOUT_MODEL.navCursorType?(v=!0,m.display="block",m.alpha=.85,/none/.test(LAYOUT_MODEL.cursorIconStyle)||(e.target.style.cursor="none",m.iconLeft.cursor="none",m.iconCenter.cursor="none",m.iconRight.cursor="none",m.svg.cursor="none",m.cursor="none"),b||(stage.element.addEventListener(CLICK,c),stage.element.addEventListener("contextmenu",E),stage.element.addEventListener("dragstart",E),
b=!0)):m.display="none"}function u(){v&&(v=!1,m.alpha=0,m.display="none"),b&&(stage.element.removeEventListener(CLICK,c),stage.element.removeEventListener("contextmenu",E),stage.element.removeEventListener("dragstart",E),b=!1)}function T(e){v=!1,m.alpha=0,m.display="none",e&&e.target&&e.target.style&&(e.target.style.cursor="default"),m.iconLeft.cursor="default",m.iconCenter.cursor="default",m.iconRight.cursor="default",m.svg.cursor="default",m.cursor="default","disabled"===LAYOUT_MODEL.navCursorType?m.display="none":b||(stage.element.addEventListener(CLICK,c),stage.element.addEventListener("contextmenu",E),stage.element.addEventListener("dragstart",E),b=!0)}function E(e){var t=void 0===SETTINGS_MODEL.disableRightClick||SETTINGS_MODEL.disableRightClick;t&&e.preventDefault()}var m=new Sprite({events:new EventSandbox});m.setClass("no-invert"),m.position="fixed";var g,p,L,f,v,S,O=t(),C="x",A=!1,b=!1;return m.enabled=!0,m.zIndex=999,m.alpha=0,m.display="none",m.addEventListener("cursorAxisUpdate",n),m.addEventListener("cursorThumbsUpdate",o),m.addEventListener("cursorBlendMode",i),m.destroy=function(){stage.removeEventListener(MOUSE_MOVE,d),m.removeEventListener("cursorAxisUpdate",n),m.removeEventListener("cursorThumbsUpdate",o),m.removeEventListener("cursorBlendMode",i),m.iconLeft.cursor="default",m.iconCenter.cursor="default",m.iconRight.cursor="default",m.svg.cursor="default",m.cursor="default",b&&(stage.element.removeEventListener(CLICK,c),stage.element.removeEventListener("contextmenu",E),stage.element.removeEventListener("dragstart",E),b=!1),m.text=""},l.call(m),m}function StaticNav(e){var t=new Sprite,i=t;t.element.className="staticnav",t.axis=e.axis||"x",t.zone=e.zone,t.zIndex=e.zIndex;var n=new Sprite,o=new Svg,a=new Svg({type:"g"}),r=new Path,l=new Sprite,s=new Svg,d=new Svg({type:"g"}),c=new Path;n.zIndex=e.zIndex,n.position="absolute",n.cursor="pointer",n.width=100*e.scale,n.height=100*e.scale,o.width=100*e.scale,o.height=100*e.scale,n.addEventListener("click",function(){e.prevClick(i)}),r.d=e.paths.prev.d,r.fill=e.paths.prev.fill,r.stroke=e.paths.prev.stroke,r.strokeWidth=e.paths.prev.strokeWidth,o.addChild(a),a.addChild(r),n.addChild(o),l.zIndex=e.zIndex,l.position="absolute",l.cursor="pointer",l.width=100*e.scale,l.height=100*e.scale,s.width=100*e.scale,s.height=100*e.scale,l.addEventListener("click",function(){e.nextClick(i)}),c.d=e.paths.next.d,c.fill=e.paths.next.fill,c.stroke=e.paths.next.stroke,c.strokeWidth=e.paths.next.strokeWidth,s.addChild(d),d.addChild(c),l.addChild(s),t.addChild(n),t.addChild(l);var h=USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&LAYOUT_MODEL.cursorIconBlendMode?LAYOUT_MODEL.cursorIconBlendMode:"normal";return n.element.style["mix-blend-mode"]=h,l.element.style["mix-blend-mode"]=h,t.nextClick=function(){"function"==typeof e.nextClick&&e.nextClick(i)},t.prevClick=function(){"function"==typeof e.prevClick&&e.prevClick(i)},t.updateAxis=function(e){t.axis=e,n.element.style.transformOrigin="center",l.element.style.transformOrigin="center","y"===t.axis?(n.position="fixed",l.position="fixed",n.element.style.transform="rotate(90deg)",l.element.style.transform="rotate(90deg)"):(n.position="absolute",l.position="absolute",n.element.style.transform="rotate(0deg)",l.element.style.transform="rotate(0deg)"),t.resize(t.zone)},t.resize=function(i){t.zone=i;var o,r;if("y"===t.axis)switch(e.align){case"start":o={x:i.x,y:i.y},r={x:i.x,y:i.y+i.height-l.height};break;case"end":o={x:i.x+i.width-n.width,y:i.y},r={x:i.x+i.width-l.width,y:i.y+i.height-l.height};break;default:o={x:i.x+(i.width-n.width)/2,y:i.y},r={x:i.x+(i.width-l.width)/2,y:i.y+i.height-l.height}}else switch(e.align){case"start":o={x:i.x,y:i.y},r={x:i.x+i.width-l.width,y:i.y};break;case"end":o={x:i.x,y:i.y+i.height-n.height},r={x:i.x+i.width-l.width,y:i.y+i.height-l.height};break;default:o={x:i.x,y:i.y+(i.height-n.height)/2},r={x:i.x+i.width-l.width,y:i.y+(i.height-l.height)/2}}n.x=o.x+e.offset.prevX,n.y=o.y+e.offset.prevY,l.x=r.x+e.offset.nextX,l.y=r.y+e.offset.nextY,a.scale=e.scale,d.scale=e.scale},t.hide=function(e){switch(e){case"prev":n.display="none";break;case"next":l.display="none";break;default:n.display="none",l.display="none"}},t.show=function(e){switch(e){case"prev":n.display="block";break;case"next":l.display="block";break;default:n.display="block",l.display="block"}},t.resize(e.zone),t.updateAxis(e.axis),t}function Tooltip(e){function t(e){u.text=e.target.tooltip,u.alpha=1,c.width=u.element.offsetWidth+2*S,c.height=u.element.offsetHeight+2*S,d.width=c.width+2*v,d.height=c.height+2*v,y=b+d.height+.5*v,M=b+v}function i(e){C=e.pageX/window.innerWidth;var t=Math.round(d.width*C);t-h.point-Ld.width?(h.x=d.width-(v+h.width+L),d.x=e.pageX-d.width+v+h.point+L):(h.x=t-(v-h.width),d.x=e.pageX-t)}function n(e){e.pageYd||Mth.abs(stage.dragElements[t].deltaY)>d);h.dispatchEvent(DRAG_MOVE,e)}function n(e){stage.removeEventListener(MOUSE_MOVE,i),stage.removeEventListener(TOUCH_MOVE,i),stage.removeEventListener(MOUSE_UP,n),stage.removeEventListener(TOUCH_END,n),stage.removeEventListener(TOUCH_CANCEL,a),stage.removeEventListener(KEY_DOWN,o);for(var t=stage.dragElements.length;t--;)stage.dragElements[t].dragging=!1,stage.dragElements[t].alpha=1;h.dispatchEvent(DRAG_STOP,e)}function o(e){keyCode[e.keyCode]===ESCAPE&&a(e)}function a(e){stage.removeEventListener(MOUSE_MOVE,i),stage.removeEventListener(TOUCH_MOVE,i),stage.removeEventListener(MOUSE_UP,n),stage.removeEventListener(TOUCH_END,n),stage.removeEventListener(TOUCH_CANCEL,a),stage.removeEventListener(KEY_DOWN,o);for(var t=stage.dragElements.length;t--;)stage.dragElements[t].dragging=!1,stage.dragElements[t].alpha=1;h.dispatchEvent(DRAG_CANCEL,e)}var r=e.dragZone||!1,l=e.dragElements||!1,s=new EventSandbox,d=e.threshold||20,c=!1,h={listeners:s.listeners,dispatchEvent:s.dispatchEvent,addEventListener:s.addEventListener,removeEventListener:s.removeEventListener,set dragZone(i){if(r=i,!l)throw"you must define the dragElement before the dragZone";h.item=e.item,r.addEventListener(MOUSE_DOWN,t),r.addEventListener(TOUCH_START,t)},get dragZone(){return r},set dragElements(e){l=e},get dragElements(){return l},set threshold(e){d=e},get threshold(){return c}};if(!l)throw"you must define a dragElement";return r.addEventListener(MOUSE_DOWN,t),r.addEventListener(TOUCH_START,t),h}function LazyLoader(e,t,i){function n(){for(var t=0,n=i.targetChildren||e.children,o=n.length;t=o-1&&t<=o+1},default:function(e){return e.isInViewport}};this.update=function(e){setTimeout(function(){e&&(o=e),n()},0)}}function alert(e,t){function i(e){Tween(this,.2,{backgroundColor:theme.bgColorLighter,fontColor:theme.fontColorSelected})}function n(e){Tween(this,.2,{backgroundColor:theme.bgColor,fontColor:theme.fontColor})}t=t||{};var o=new Sprite;o.backgroundColor=t.backgroundColor||theme.bgColorLight,o.width=250,o.height=150,o.borderRadius=4,o.overflow="hidden",o.boxShadow=theme.shadowDark,o.addEventListener(CLICK,function(e){e.stopPropagation()});var a=new Sprite;a.x=25,a.y=20,a.fontColor=t.fontColor||theme.fontColor,a.fontFamily="Helvetica Neue, Arial, sans-serif",a.fontSize=15.5,a.selectable=!0,a.text=e,a.textAlign="center";var r=new Sprite({type:"button"});r.width=65,r.height=40,r.text="OK",r.outline="none",r.border="none",r.fontWeight="bold",r.fontSize=theme.fontSize,r.fontColor=theme.fontColor,r.fontFamily="Helvetica Neue, Arial, sans-serif",r.backgroundColor=theme.bgColor,o.addChild(r),o.addChild(a);var l=[];dx&&exists(dx,"site.siteView")&&(l=[exists(dx,"site.siteView")]),dx&&exists(dx,"admin.adminView")&&(l=[dx.site.siteView,dx.admin.adminView]);var s=new Overlay(o,{userOverride:t.userOverride||!0,backgroundColor:t.backgroundColor||"#000000",alpha:t.alpha||.5,blurLayers:t.blurLayers||l});s.open(),r.addEventListener(MOUSE_OVER,i),r.addEventListener(MOUSE_OUT,n),r.addEventListener(FOCUS,i),r.addEventListener(BLUR,n),r.addEventListener(CLICK,function(e){t.onClose&&t.onClose(),s.close()});var d=r.element.offsetHeight,c=a.element.offsetWidth;return o.width=c+50,a.width=o.width-50,o.height=a.element.offsetHeight+d+50,r.width=o.width,r.y=o.height-d-0,s.overlayResize(),r.focus(),s}function confirm(e,t){function i(e){Tween(this,.2,{backgroundColor:theme.bgColorLighter,fontColor:theme.fontColorSelected})}function n(e){a.call(this)}function o(e){stage.activeFocus&&(a.call(stage.activeFocus),stage.activeFocus.blur()),Tween(this,.2,{backgroundColor:theme.bgColorLighter,fontColor:theme.fontColorSelected})}function a(e){Tween(this,.2,{backgroundColor:theme.bgColor,fontColor:theme.fontColor})}t=t||{};var r,l=new Sprite;l.backgroundColor=t.backgroundColor||theme.bgColorLight,l.width=t.width||250,l.height=150,l.borderRadius=5,l.overflow="hidden",l.boxShadow=theme.shadowDark,l.addEventListener(CLICK,function(e){e.stopPropagation()});var s=new Sprite;s.x=25,s.y=23,s.fontColor=t.fontColor||theme.fontColor,s.fontFamily="Helvetica Neue, Arial, sans-serif",s.fontSize=15.5,s.selectable=!0,s.text=e,s.textAlign="center";var d=new Sprite({type:"button"});d.width=65,d.height=40,d.text=t.cancelLabel||"CANCEL",d.outline="none",d.border="none",d.fontWeight="bold",d.fontSize=theme.fontSize,d.fontColor=theme.fontColor,d.fontFamily="Helvetica Neue, Arial, sans-serif",d.backgroundColor=theme.bgColor,l.addChild(d);var c=new Sprite({type:"button"});c.width=65,c.height=40,c.text=t.okLabel||"OK",c.outline="none",c.border="none",c.fontWeight="bold",c.fontSize=theme.fontSize,c.fontColor=theme.fontColor,c.fontFamily="Helvetica Neue, Arial, sans-serif",c.backgroundColor=theme.bgColor,l.addChild(c),l.addChild(s);var h=[dx.site.siteView];dx&&exists(dx,"admin.adminView")&&(h=[dx.site.siteView,dx.admin.adminView]);var u=new Overlay(l,{userOverride:!0,backgroundColor:"#000000",alpha:.5,blurLayers:h,onClose:function(){t.onCancel&&!r&&t.onCancel()}});u.open(),d.addEventListener(MOUSE_OVER,o),d.addEventListener(MOUSE_OUT,a),c.addEventListener(MOUSE_OVER,o),c.addEventListener(MOUSE_OUT,a),d.addEventListener(FOCUS,i),d.addEventListener(BLUR,n),c.addEventListener(FOCUS,i),c.addEventListener(BLUR,n),d.addEventListener(CLICK,function(e){t.onCancel&&t.onCancel(),u.close()}),c.addEventListener(CLICK,function(e){r=!0,t.onConfirm&&t.onConfirm(),u.close()});var T=c.element.offsetHeight,E=s.element.offsetWidth;return l.width=E+50,s.width=l.width-50,l.height=s.element.offsetHeight+d.element.offsetHeight+T+50,d.width=l.width,d.y=l.height-d.height-T,c.width=l.width,c.y=l.height-T-0,u.overlayResize(),c.focus(),u}function lightboxDownloadOverlay(e){function t(){i.width=d,i.height=c,i.backgroundColor=s,i.boxShadow="0px 2px 10px rgba(0,0,0,0.05)",i.borderRadius=2,i.display="flex",a=new Button,a.textTransform="uppercase",a.text="share ↑",a.position="relative",a.element.style.padding="0 20px",a.element.style.margin="0 10px",a.height=38,a.fontFamily=LAYOUT_MODEL.menuFont,a.fontSize=16,a.fontColor=l,a.element.style.flexGrow=1,a.backgroundColor="transparent",a.addEventListener(CLICK,function(){alert("The lightbox link was copied to your clipboard."),copyToClipboard(window.location.href)}),a.addEventListener(MOUSE_OVER,function(){this.style.textDecoration="underline"}),a.addEventListener(MOUSE_OUT,function(){this.style.textDecoration="none"}),a.style.cursor="pointer",i.addChild(a),/pdf/.test(LAYOUT_MODEL.lightboxDownloadOptions)&&(n=new Button,n.textTransform="uppercase",n.text="pdf ↓",n.position="relative",n.element.style.padding="0 20px",n.element.style.margin="0 10px",n.height=38,n.fontFamily=LAYOUT_MODEL.menuFont,n.fontSize=16,n.fontColor=l,n.element.style.flexGrow=1,n.backgroundColor="transparent",n.addEventListener(CLICK,function(){alert("Please wait, it may take a few minutes while we build your PDF file."),i.events.dispatchEvent("lightboxDownloadPdf")}),n.addEventListener(MOUSE_OVER,function(){this.style.textDecoration="underline"}),n.addEventListener(MOUSE_OUT,function(){this.style.textDecoration="none"}),n.style.cursor="pointer",i.addChild(n)),/zip/.test(LAYOUT_MODEL.lightboxDownloadOptions)&&(o=new Button,o.textTransform="uppercase",o.text="zip ↓",o.position="relative",o.element.style.padding="0 20px",o.element.style.margin="0 10px",o.height=38,o.fontFamily=LAYOUT_MODEL.menuFont,o.fontSize=16,o.fontColor=l,o.element.style.flexGrow=1,o.backgroundColor="transparent",o.addEventListener(CLICK,function(){alert("Please wait, it may take a few minutes while we build your ZIP file."),i.events.dispatchEvent("lightboxDownloadZip")}),o.addEventListener(MOUSE_OVER,function(){this.style.textDecoration="underline"}),o.addEventListener(MOUSE_OUT,function(){this.style.textDecoration="none"}),o.style.cursor="pointer",i.addChild(o));var e=dx&&exists(dx,"admin.adminView")?[dx.site.siteView,dx.admin.adminView]:[dx.site.siteView];r=new Overlay(i,{userOverride:!0,backgroundColor:E,alpha:m,blurLayers:e,zIndex:99}),r.zIndex=99,i.open(),r.onClose=function(){T=!1},i.overlay=r,r.overlayResize(),T=!0}var i=new Sprite({events:e.events});i.display="flex",i.element.style.alignItems="center",i.element.style.padding="0px 10px";var n,o,a,r,l,s,d=.9*stage.width>530?530:.9*stage.width,c=78,h=!(!LAYOUT_MODEL.inputOverlayFontColor||!LAYOUT_MODEL.inputOverlayBarColor),u=!(!LAYOUT_MODEL.menuOverlayFontColor||!LAYOUT_MODEL.menuOverlayBgColor);h?(l=LAYOUT_MODEL.inputOverlayFontColor,s=LAYOUT_MODEL.inputOverlayBarColor):u?(l=LAYOUT_MODEL.menuOverlayFontColor,s=LAYOUT_MODEL.menuOverlayBgColor):(l="#000000",s="#FFFFFF");var T,E=LAYOUT_MODEL.inputOverlayBgColor||LAYOUT_MODEL.menuOverlayBgColor||"#000000",m=LAYOUT_MODEL.inputOverlayBgAlpha||LAYOUT_MODEL.menuOverlayBgAlpha||.5;return i.updateSpeed=0,i.addEventListener(CHILD_ADDED,function(e){}),i.updatePosition=function(e){d=.9*stage.width>800?800:.9*stage.width,n.x=d-.5*(c-n.width),i.width=d,i.x=layoutCalcs.mediaView.x()+.5*(layoutCalcs.mediaView.width()-d),i.y=layoutCalcs.mediaView.y()+.5*(layoutCalcs.mediaView.height()-c),i.updateSpeed=UPDATE_SPEED},i.close=function(){T=!1,r.close()},i.open=function(t){t&&(e.section=t),r.open(),setTimeout(function(){},100),T=!0},t(),i}function passwordInput(e){function t(){u.width=T,u.height=E,l=new Sprite,l.backgroundColor=h,l.boxShadow="0px 2px 10px rgba(0,0,0,0.05)",l.borderRadius=2,l.width=T,l.height=E,r=new Input,r.backgroundColor="transparent",r.fontFamily=LAYOUT_MODEL.menuFont,r.fontColor=c,r.fontSize=16,r.height=E,r.x=0,r.y=0,r.element.style.padding="0px 46px",r.addEventListener(FOCUS,a),r.addEventListener(BLUR,o),r.element.addEventListener(CLICK,function(e){e.stopPropagation()}),r.element.tabIndex=1,u.setMessage("PASSWORD"),s=new Svg;var e=new Path;e.d=svgPaths.arrowRight,e.strokeWidth=3,e.fill="none",e.stroke=c,s.addChild(e),s.width=11,s.height=15,s.x=T-.5*(E-s.width),s.y=.5*(E-s.height),s.alpha=.5,s.cursor="pointer",s.addEventListener(MOUSE_OVER,function(){Tween(this,UPDATE_SPEED,{alpha:1})}),s.addEventListener(MOUSE_OUT,function(){Tween(this,UPDATE_SPEED,{alpha:.5})}),r.width=T-E-96,u.addChild(l),u.addChild(r),u.addChild(s);var t=dx&&exists(dx,"admin.adminView")?[dx.site.siteView,dx.admin.adminView]:[dx.site.siteView];d=new Overlay(u,{userOverride:!0,backgroundColor:L,alpha:f,blurLayers:t,zIndex:99}),d.zIndex=99,u.open(),d.onClose=function(){p=!1,r.removeEventListener(KEY_UP,i),s.removeEventListener(CLICK,n)},u.overlay=d,d.overlayResize(),p=!0}function i(e){p&&13===e.keyCode&&n(e)}function n(t){u.events.dispatchEvent("SITE_SERVICE_PASSWORD_CHECK",{sectionKey:e.section.key,value:r.value})}function o(e){stage.isInputFocus=!1,""===r.value&&u.setMessage("PASSWORD")}function a(e){stage.isInputFocus=!0,r.value=""}var r,l,s,d,c,h,u=new Sprite({events:e.events}),T=.9*stage.width>800?800:.9*stage.width,E=78,m=!(!LAYOUT_MODEL.inputOverlayFontColor||!LAYOUT_MODEL.inputOverlayBarColor),g=!(!LAYOUT_MODEL.menuOverlayFontColor||!LAYOUT_MODEL.menuOverlayBgColor);m?(c=LAYOUT_MODEL.inputOverlayFontColor,h=LAYOUT_MODEL.inputOverlayBarColor):g?(c=LAYOUT_MODEL.menuOverlayFontColor,h=LAYOUT_MODEL.menuOverlayBgColor):(c="#000000",h="#FFFFFF");var p,L=LAYOUT_MODEL.inputOverlayBgColor||LAYOUT_MODEL.menuOverlayBgColor||"#000000",f=LAYOUT_MODEL.inputOverlayBgAlpha||LAYOUT_MODEL.menuOverlayBgAlpha||.5;return u.updateSpeed=0,u.addEventListener(CHILD_ADDED,function(e){}),u.updatePosition=function(e){T=.9*stage.width>800?800:.9*stage.width,s.x=T-.5*(E-s.width),r.width=T-E-96,l.width=T,u.width=T,u.x=layoutCalcs.mediaView.x()+.5*(layoutCalcs.mediaView.width()-T),u.y=layoutCalcs.mediaView.y()+.5*(layoutCalcs.mediaView.height()-E),u.updateSpeed=UPDATE_SPEED},u.close=function(){p=!1,r.removeEventListener(KEY_UP,i),s.removeEventListener(CLICK,n),d.close()},u.setMessage=function(e){r.value=e},u.open=function(t){t&&(e.section=t),d.open(),setTimeout(function(){r.addEventListener(KEY_UP,i),s.addEventListener(CLICK,n)},100),p=!0},t(),u}function searchInput(e){function t(){L.width=f,L.height=v,h=new Sprite,h.backgroundColor=p,h.boxShadow="0px 2px 10px rgba(0,0,0,0.05)",h.borderRadius=2,h.width=f,h.height=v,c=new Input,c.backgroundColor="transparent",c.fontFamily=LAYOUT_MODEL.menuFont,c.fontColor=g,c.fontSize=16,c.height=v,c.x=0,c.y=0,c.element.style.padding="0px 46px",c.addEventListener(FOCUS,d),c.addEventListener(BLUR,s),c.element.addEventListener(CLICK,function(e){e.stopPropagation()}),c.element.tabIndex=1,L.setMessage("Search"),u=new Svg,A=new Path,A.d=svgPaths.search,A.fill=g,A.fillRule="evenodd",u.addChild(A),u.width=25,u.height=25,u.x=f-u.width-24,u.y=.5*(v-u.height),u.alpha=.5,u.cursor="pointer",u.addEventListener(MOUSE_OVER,function(){Tween(this,UPDATE_SPEED,{alpha:1})}),u.addEventListener(MOUSE_OUT,function(){Tween(this,UPDATE_SPEED,{alpha:.5})}),c.width=f-v-92,E=new Sprite,E.display="flex",E.width=f-20,E.x=20,E.y=v,E.zIndex=-1,m=new Svg,m.element.style["user-select"]="none",m.alpha=0,m.x=4,m.width=14,m.height=14,m.transition=.25,m.cursor="pointer",m.addEventListener("click",function(){a(c.value),c.value=""}),m.alpha=0,b=new Path,b.d=svgPaths.plusSmall,b.strokeWidth=2,b.fill="none",b.stroke=g,m.addChild(b),L.addChild(m),L.addChild(h),L.addChild(c),L.addChild(u),L.addChild(E);var e=dx&&exists(dx,"admin.adminView")?[dx.site.siteView,dx.admin.adminView]:[dx.site.siteView];T=new Overlay(L,{userOverride:!0,backgroundColor:M,alpha:w,blurLayers:e,zIndex:99}),T.onClose=function(){y=!1,c.removeEventListener(KEY_UP,r),u.removeEventListener(CLICK,l)},L.open(),L.overlay=T,T.overlayResize(),y=!0}function i(e){E.text="",e=e.filter(function(e,t,i){return i.indexOf(e)===t}).map(n),e.forEach(function(e){E.addChild(e)})}function n(e){var t=new Sprite;t.position="relative",t.backgroundColor=toRgba(p,.35),t.boxShadow="0px 2px 10px rgba(0,0,0,0.05)",t.borderRadius=20,t.display="flex",t.element.style.padding="3px 8px 3px 10px",t.element.style.margin="8px 0 0 8px";var n=new Button;n.position="relative",n.background="transparent",n.fontSize=12,n.fontFamily=LAYOUT_MODEL.menuFont,n.color=g,n.text="×",n.alpha=.2,n.top=0,n.cursor="pointer",n.addEventListener(MOUSE_OVER,function(){Tween(this,UPDATE_SPEED,{alpha:1})}),n.addEventListener(MOUSE_OUT,function(){Tween(this,UPDATE_SPEED,{alpha:.2})});var o=new Sprite;return o.position="relative",o.color=g,o.fontSize=12,o.fontFamily=LAYOUT_MODEL.menuFont,o.paddingRight=7,o.text=e,n.addEventListener("click",function(){S=S.filter(function(t){return e!==t}),i(S)}),t.addChild(o),t.addChild(n),t}function o(e){return e.replace(/^\s+|\s+$/g,"")}function a(e){""===c.value||c.isPlaceholder||(S=S.concat(c.value.split(",").map(o)),i(S)),m.y=v+4+.5*((E.element.offsetHeight||25)-14)}function r(e){y&&(13===e.keyCode?""===c.value||c.isPlaceholder?S.length&&l():(a(c.value),c.value="",l()):(m.y=v+4+.5*((E.element.offsetHeight||25)-14),m.alpha=""===c.value||c.isPlaceholder?0:1,c.isPlaceholder=!1))}function l(t){c.value&&!c.isPlaceholder&&(S=S.concat(c.value.split(",").map(o))),S.length&&L.events.dispatchEvent("SEARCH_SUBMIT",Object.assign({},e.navEvent,{searchTerm:S.join(","),searchSubmit:!0}))}function s(e){stage.isInputFocus=!1,""===c.value&&L.setMessage("Search")}function d(e){stage.isInputFocus=!0,c.isPlaceholder&&(c.value="")}var c,h,u,T,E,a,m,g,p,L=new Sprite({events:e.events}),f=.9*stage.width>800?800:.9*stage.width,v=78,S=e.tags||[],O=!(!LAYOUT_MODEL.inputOverlayFontColor||!LAYOUT_MODEL.inputOverlayBarColor),C=!(!LAYOUT_MODEL.menuOverlayFontColor||!LAYOUT_MODEL.menuOverlayBgColor);O?(g=LAYOUT_MODEL.inputOverlayFontColor,p=LAYOUT_MODEL.inputOverlayBarColor):C?(g=LAYOUT_MODEL.menuOverlayFontColor,p=LAYOUT_MODEL.menuOverlayBgColor):(g="#000000",p="#FFFFFF");var A,b,y,M=LAYOUT_MODEL.inputOverlayBgColor||LAYOUT_MODEL.menuOverlayBgColor||"#000000",w=LAYOUT_MODEL.inputOverlayBgAlpha||LAYOUT_MODEL.menuOverlayBgAlpha||.5;return L.updateSpeed=0,L.addEventListener(CHILD_ADDED,function(e){}),L.updatePosition=function(e){f=.9*stage.width>800?800:.9*stage.width,u.x=f-u.width-24,c.width=f-v-92,h.width=f,E.width=f,m.y=v+4+.5*((E.element.offsetHeight||25)-14),L.width=f,L.x=layoutCalcs.mediaView.x()+.5*(layoutCalcs.mediaView.width()-f),L.y=layoutCalcs.mediaView.y()+.5*(layoutCalcs.mediaView.height()-v),L.updateSpeed=UPDATE_SPEED},L.setMessage=function(e){c.value=e,c.isPlaceholder=!0},L.setTags=function(e){S=e},L.setSortBy=function(e){},L.close=function(){y=!1,c.removeEventListener(KEY_UP,r),u.removeEventListener(CLICK,l),T.close()},L.blur=function(){c.element.blur()},L.open=function(t){t&&(e.section=t),T.open(),i(S),setTimeout(function(){c.addEventListener(KEY_UP,r),u.addEventListener(CLICK,l)},100),y=!0},t(),L}function inputPopup(e){function t(){c.width=h,c.height=u,l=new Sprite,l.backgroundColor=e.backgroundColor||LAYOUT_MODEL.overlayColor,l.width=h,l.height=u,r=new Input,r.backgroundColor=e.backgroundColor2||LAYOUT_MODEL.contactFieldRectColor,r.fontFamily=e.fontFamily||LAYOUT_MODEL.contactFont,r.fontColor=e.fontColor||LAYOUT_MODEL.contactFontColor,r.fontSize=e.fontSize||12,r.width=170,r.height=23,r.x=10,r.y=.5*(u-r.height),r.paddingLeft=3,r.addEventListener(FOCUS,a),r.addEventListener(BLUR,o),r.element.addEventListener(CLICK,function(e){e.stopPropagation()}),r.element.tabIndex=1,r.element.setAttribute("class","dx_placeholder_input"),c.setMessage(e.placeholder||""),s=new Button,s.text="SUBMIT",s.x=r.x+r.width+10,s.y=r.y,s.height=23,s.width=70,s.fontSize=12,s.fontFamily=LAYOUT_MODEL.contactFont,s.fontColor=e.fontColor||LAYOUT_MODEL.contactFontColor,s.backgroundColor=e.backgroundColor2||LAYOUT_MODEL.contactFieldRectColor,c.addChild(l),c.addChild(r),c.addChild(s);var t=dx&&exists(dx,"admin.adminView")?[dx.site.siteView,dx.admin.adminView]:[dx.site.siteView];d=new Overlay(c,{userOverride:!0,backgroundColor:"#000000",alpha:.5,blurLayers:t}),c.open(),d.overlayResize()}function i(e){13===e.keyCode&&n(e)}function n(t){"function"==typeof e.onSubmit&&e.onSubmit(r.value)}function o(e){}function a(e){}var r,l,s,d,c=new Sprite({events:e.events}),h=272,u=47;return c.updateSpeed=0,c.addEventListener(CHILD_ADDED,function(e){}),c.updatePosition=function(e){Tween(c,c.updateSpeed,{x:layoutCalcs.mediaView.x()+.5*(layoutCalcs.mediaView.width()-h),y:layoutCalcs.mediaView.y()+.5*(layoutCalcs.mediaView.height()-u)}),c.updateSpeed=UPDATE_SPEED},c.close=function(){stage.removeEventListener(KEY_UP,i),s.removeEventListener(CLICK,n),d.close()},c.setMessage=function(e){r.element.setAttribute("placeholder",e)},c.open=function(){d.open(),setTimeout(function(){stage.addEventListener(KEY_UP,i),s.addEventListener(CLICK,n)},100)},t(),c}function Resize(e,t,i){var n=new ScaleEngine({type:i.type,hRange:i.hRange,vRange:i.vRange,width:i.width||e.width,height:i.height||e.height,disableOrientationCheck:i.disableOrientationCheck}),o=new AlignEngine({hRange:i.hRange,vRange:i.vRange,hAlign:i.hAlign,vAlign:i.vAlign,width:n.width,height:n.height}),a={x:Math.round(o.x),y:Math.round(o.y),width:n.width,height:n.height,onComplete:i.onComplete,onCompleteParams:i.onCompleteParams,onCompleteScope:i.onCompleteScope,onUpdate:i.onUpdate,onUpdateParams:i.onUpdateParams,onUpdateScope:i.onUpdateScope,onInit:i.onInit,onInitScope:i.onInitScope,onInitParams:i.onInitParams};return i.onComplete&&(a.onComplete=i.onComplete),e&&Tween(e,t,a),{scale:n,align:o}}function RetinaResizeEngine(e){function t(e){var t=e.match(/[@]([0-9]*\.?[0-9]+)?[x]/i),i=e.match(/__at__([0-9]*\.?[0-9]+)?x/i);return t?Number(t[1]):i?Number(i[1]):1}var i=e.width,n=e.height,o=t(e.filename);return{width:Math.round(i/o),height:Math.round(n/o)}}function Scale(e,t,i){var n=ScaleEngine({type:i.type,hRange:i.hRange,vRange:i.vRange,width:i.width||e.width,height:i.height||e.height,disableOrientationCheck:i.disableOrientationCheck||!1}),o={width:Mth.round(n.width),height:Mth.round(n.height),onComplete:i.onComplete,onCompleteParams:i.onCompleteParams,onCompleteScope:i.onCompleteScope,onUpdate:i.onUpdate,onUpdateParams:i.onUpdateParams,onUpdateScope:i.onUpdateScope,onInit:i.onInit,onInitScope:i.onInitScope,onInitParams:i.onInitParams};return i.onComplete&&(o.onComplete=i.onComplete),Tween(e,t,o),n}function ScaleEngine(e){function t(){return E=d/c,"fit"===l||"native"===l?ET}function i(){T=h/u,n(),"fitWidth"===e.type||t()?(h=d,u=d/T):c?(h=c*T,u=c):(h=d,u=d/T),"native"===e.type&&(h>e.width||u>e.height)&&(h=e.width,u=e.height)}function n(){s||o(h,u,d,c)||r(h,u)||(l="fit")}function o(e,t,i,n){return a(e,t)===a(i,n)}function a(e,t){return e>t}function r(e,t){return e===t}e=e||{};var l=e.type||"fit",s=e.disableOrientationCheck||!1,d=e.hRange,c=e.vRange,h=e.width||0,u=e.height||0,T=-1,E=-1;return i(),{set hRange(e){d=e},set vRange(e){c=e},set type(e){l=e},get type(){return l},set width(e){h=e},set height(e){u=e},get width(){return h},get height(){return u}}}function Scroll(e,t,i){function n(e,t){e>t?u.alignSave||(u.alignSave=u.align,u.align="width"===u.dim?"left":"top",l=u.alignment()):(u.alignSave&&(u.align=u.alignSave,delete u.alignSave),l=u.alignment())}function o(e,t){e1?1:e,l=e},get position(){return s},set position(e){s=e},get scrollDist(){return d},set scrollDist(e){d=e},get ing(){return c},set ing(e){c=e}};u.perpAxis="x"===i.axis?"y":"x",
u.dim="x"===i.axis?"width":"height",u.perpDim="x"===i.axis?"height":"width",u.alpha=isNaN(i.alpha)?.35:i.alpha;var T=!1,E="width"===u.dim?"offsetWidth":"offsetHeight";return u.alignment=function(){switch(u.align){case"middle":case"center":return.5;case"right":case"bottom":return 1;default:return 0}},u.scrollTo=function(e){u.bar&&u.bar.scrollTo(e,0)},u.update=function(t,a,c){t=t||0,T||(T=!0,c||u.dispatchEvent("scrollStart"));var m=u.mask.element[E],g=(u.margin||u.marginTop)+e.element[E]+(u.margin||u.marginBottom);if(g&&m){d=g-m,u.captionScroll?n(g,m):o(g,m),s=-(d*l)+(u.margin||u.marginTop);var p={};e.transition=0,"translate"===u.property?p["translate"+i.axis.toUpperCase()]=Mth.round(s):p[i.axis]=Mth.round(s),p.ease="cubic-bezier(0.5, 0.5, 0.5, 0.8)",u.hvr&&(p.onUpdate=function(){u.dispatchEvent(SCROLL)}),Tween(e,t,p),u.bar&&u.bar.moveHandle(0),u.bar&&"when scrolling"===u.visibility&&(u.bar.show(),u.bar.checkVisible()),clearTimeout(r),r=setTimeout(function(){h||u.dispatchEvent("scrollStop"),u.bar&&"when scrolling"===u.visibility&&(u.bar.hide(),u.bar.checkVisible()),T=!1,u.bar&&u.bar.resize(),h=!1},200)}},u.resize=function(e){u.update(e||0,!1,!0),u.bar&&u.bar.resize()},u.destroy=function(){u.bar&&u.bar.destroy(),u.wheel&&u.wheel.destroy(),u.hvr&&u.hvr.destroy(),u.touch&&u.touch.destroy()},u.hide=function(){u.bar&&(u.bar.hide(),u.bar.checkVisible())},u.show=function(){u.bar&&(u.bar.show(),u.bar.checkVisible())},u.enable=function(){u.disabled=!1,u.bar&&u.bar.enable()},u.disable=function(){u.disabled=!0,u.bar&&u.bar.disable()},u.setAlpha=function(e){u.bar&&u.bar.setAlpha(e)},u.getBack=function(){return u.bar?u.bar.getBack():null},a(),u.resize(),u.update(),Scrolls.register(u),u}function ScrollBar(e){function t(t){var i="when scrolling"===e.visibility?.5:1;!e.active&&/hidden/.test(e.visibility)&&(i=0),Tween(m,.35,{alpha:i,backgroundColor:e.hover})}function i(t){!e.ing&&/when scrolling|hidden/.test(e.visibility)&&Tween(m,.35,{alpha:0,backgroundColor:e.color})}function n(t){var i="when scrolling"===e.visibility?.5:1;!e.active&&/hidden/.test(e.visibility)&&(i=0),Tween(m,.35,{alpha:i,backgroundColor:e.hover}),u=r(t)-E[e.axis]-m[e.axis],stage.addEventListener(MOUSE_UP,a,!1),stage.addEventListener(MOUSE_MOVE,o,!1),stage.addEventListener(TOUCH_END,a,!1),stage.addEventListener(TOUCH_MOVE,o,!1)}function o(t){e.ing===!1&&(e.ing=!0,t.preventDefault()),window.getSelection().removeAllRanges(),h=r(t)-u-E[e.axis],e.percent=(h-E[e.axis])/(E[e.dim]-m[e.dim]),e.update(0),e.dispatchEvent(SCROLL)}function a(t){setTimeout(function(){e.ing=!1},10),Tween(m,.35,{backgroundColor:e.color}),stage.removeEventListener(MOUSE_MOVE,o),stage.removeEventListener(MOUSE_UP,a),stage.removeEventListener(TOUCH_END,a,!1),stage.removeEventListener(TOUCH_MOVE,o,!1)}function r(t){return"x"===e.axis?getX(t):getY(t)}function l(){return"x"===e.axis?e.offsetX:e.offsetY}function s(){return"y"===e.axis?e.offsetX:e.offsetY}var d=e.obj,c=e.mask,h=0,u=0,T=!0,E=this.back=new Sprite;E.alpha=0,E.selectable=!0,E.backgroundColor=e.color,e.zIndex&&(E.zIndex=e.zIndex),e.parent.addChild(E);var m=this.handle=new Sprite;m.alpha=0,m.backgroundColor=e.color,e.zIndex&&(m.zIndex=e.zIndex),m.selectable=!1,m.cursor="default",m.borderRadius=e.rounded?Math.ceil(e.width/2):0,m.style.pointerEvents="auto",e.parent.addChild(m),m.addEventListener(MOUSE_OVER,t),m.addEventListener(MOUSE_OUT,i),m.addEventListener(MOUSE_DOWN,n),m.addEventListener(TOUCH_START,n),this.moveHandle=function(t){m.transition=t||0,m[e.axis]=(E[e.dim]-m[e.dim])*e.percent+E[e.axis],"hidden"===e.visibility?m.alpha=0:"when scrolling"===e.visibility?m.alpha=.5:m.alpha=1},this.resize=function(){E.transition=UPDATE_SPEED,m.transition=UPDATE_SPEED,E[e.perpDim]=e.width,E[e.dim]=c[e.dim],e.parent===c?E[e.axis]=l():E[e.axis]=c[e.axis]+l(),m[e.perpDim]=e.width,"left"===e.side||"top"===e.side?(E[e.perpAxis]=c[e.perpAxis]-e.width+s(),m[e.perpAxis]=c[e.perpAxis]-e.width+s()):(E[e.perpAxis]=c[e.perpAxis]+c[e.perpDim]+s(),m[e.perpAxis]=c[e.perpAxis]+c[e.perpDim]+s()),this.moveHandle(0),setTimeout(this.checkVisible,0)},this.checkVisible=function(){E.style.transition="opacity 750ms",m.style.transition="opacity 750ms";var t="offset"+e.dim[0].toUpperCase()+e.dim.substr(1),i=c.element[t],n=(e.margin||e.marginTop)+d.element[t]+(e.margin||e.marginBottom),o=i/n*i;o=E[e.dim]?(E.transition=0,E.alpha=0,E.display="none",m.transition=0,m.alpha=0,m.display="none",m[e.dim]=E[e.dim],e.scrollTo(0,0)):(Tween(E,.35,{alpha:0,onComplete:function(){this.dislplay="none"}}),Tween(m,.35,{alpha:0,onComplete:function(){setTimeout(function(){m.dislplay="none"},200),e.scrollTo(0,0)}}))},this.destroy=function(){e.parent.removeChild(m),e.parent.removeChild(E),m.removeEventListener(MOUSE_OVER,t),m.removeEventListener(MOUSE_OUT,i),m.removeEventListener(MOUSE_DOWN,n),m.removeEventListener(TOUCH_START,n)},this.setAlpha=function(e){m.alpha=E.alpha=e},this.getBack=function(){return E},this.scrollTo=function(e){},this.hide=function(){T=!1},this.show=function(){T=!0},this.disable=function(){m.removeEventListener(MOUSE_OVER,t),m.removeEventListener(MOUSE_OUT,i),m.removeEventListener(MOUSE_DOWN,n),m.removeEventListener(TOUCH_START,n)},this.enable=function(){m.addEventListener(MOUSE_OVER,t),m.addEventListener(MOUSE_OUT,i),m.addEventListener(MOUSE_DOWN,n),m.addEventListener(TOUCH_START,n)}}function ScrollTouch(e){function t(t){e.active&&!e.ing&&e.dispatchEvent("WINDOW_SCROLL_TOP")}function i(t){Scrolls.setActive(e),r=o(t),l=e.percent||0,e.mask.addEventListener(TOUCH_END,a),e.mask.addEventListener(TOUCH_MOVE,n)}function n(t){e.ing===!1&&(e.ing=!0,isAppleMobile()&&!STATE.podUseDesktop&&window.scrollTo(0,1),t.preventDefault()),s=o(t)-r,e.percent=-(s/e.scrollDist)+l,e.percent=e.percent<0?0:e.percent,e.percent=e.percent>1?1:e.percent,e.update(0),e.dispatchEvent(SCROLL)}function o(t){return"x"===e.axis?TOUCH_DEVICE?event.touches[0].pageX:event.clientX:TOUCH_DEVICE?event.touches[0].pageY:event.clientY}function a(t){e.ing=!1,e.mask.removeEventListener(TOUCH_END,a),e.mask.removeEventListener(TOUCH_MOVE,n)}var r=0,l=0,s=0;e.mask.addEventListener(TOUCH_START,i),isAppleMobile()&&e.scrollTopCheck&&window.addEventListener("scroll",t),this.destroy=function(){r&&(e.ing=!1,e.mask.removeEventListener(TOUCH_END,a),e.mask.removeEventListener(TOUCH_MOVE,n))}}function ScrollWheel(e){function t(){var t="offset"+e.dim[0].toUpperCase()+e.dim.substr(1),i=(e.margin||e.marginTop)+e.obj.element[t]+(e.margin||e.marginBottom),n=i-e.mask.element[t];return n>0}function i(){t()&&(s=!0,Scrolls.focusTarget=l,stage.addEventListener(WHEEL,o,!1),stage.addEventListener(MOUSE_WHEEL,o,!1))}function n(){s=!1,stage.removeEventListener(WHEEL,o,!1),stage.removeEventListener(MOUSE_WHEEL,o,!1)}function o(t){if(e.active){var i="x"===e.axis?t.deltaX:t.deltaY;(Math.abs(t.deltaX)>Math.abs(t.deltaY)&&"x"===e.axis||Math.abs(t.deltaY)>Math.abs(t.deltaX)&&"y"===e.axis)&&(e.percent>=0&&e.percent<1&&i>0?(a(i),t.preventDefault()):e.percent>0&&e.percent<=1&&i<0&&(a(i),t.preventDefault()))}}function a(t){t="bottom"===e.align?t=-t:t,isNaN(e.percent)&&(e.percent=0);var i="offset"+e.dim[0].toUpperCase()+e.dim.substr(1),n=(e.margin||e.marginTop)+e.obj.element[i]+(e.margin||e.marginBottom),o=n-e.mask.element[i],a=e.percent+t/o;e.percent=a<0?0:a,e.percent=a>1?1:a,e.update(0),e.dispatchEvent(SCROLL)}var r=e.mask,l=this,s=!1;e.active=!1,r.addEventListener(MOUSE_OVER,i),r.addEventListener(MOUSE_OUT,n),this.destroy=function(){r.removeEventListener(MOUSE_OVER,i),s&&n()}}function ScrollHover(e){function t(){e.mask.addEventListener(MOUSE_MOVE,o),stage.addEventListener(MOUSE_MOVE,i)}function i(t){e.mask.hitTestPoint(getX(t),getY(t))?c=!0:c&&(c=!1,n())}function n(){clearTimeout(r),e.mask.removeEventListener(MOUSE_MOVE,o),stage.removeEventListener(MOUSE_MOVE,i)}function o(t){l.enabled&&(r=setTimeout(function(){var i="x"===e.axis?t.mouseX:t.mouseY,n="offset"+e.dim[0].toUpperCase()+e.dim.substr(1);s=i/e.mask.element[n],0===s&&i>.5*e.mask.element[n]?s=.98:0===s&&i<.5*e.mask.element[n]&&(s=.15),e.percent=s>.5?1:0;var o=e.position,r=e.obj._private[e.axis],l=Math.abs(o-r),h=Math.abs(l)/e.maxSpeed;if(d+=.1*(h-d),d+=.1*(a()-d),e.update(d,!0),e.dispatchEvent(SCROLL),!c){var u,T={};u="x"===e.axis?e.obj.element.offsetLeft:e.obj.element.offsetTop,T[e.axis]=Mth.round(u),Tween(e.obj,1,T)}},50))}function a(){var t=s<.5?2*s:s*-2+2;return Math.round(Math.pow(t,5)*e.maxSpeed+e.minSpeed)}var r,l=this,s=0,d=0,c=!1;return l.enabled=!0,l.destroy=n,e.mask.addEventListener(MOUSE_OVER,t),l}function Sort(e){function t(e){var t,o={x:getX(e),y:getY(e)},a=E.group.length;for(t=0;t-1){var n=e.splice(i,1)[0];t.push(n)}return t}function a(e){E.stopIndex=e;for(var t=e,i=E.dragGroup.length;i--;)E.group.splice(t,0,E.dragGroup[i]),t++}function r(e){c=this.dragElements,E.startIndex=this.dragElements[0].startIndex,E.dispatchEvent(REORDER_START,e),d()}function l(e){var i=this;E.isDragging=!0,T||(h&&clearTimeout(h),h=setTimeout(function(){t.apply(i.dragElements,[e])},80))}function s(e){E.isDragging&&E.sorted&&(E.direction=E.startIndexp.perpLength,!p.wrap||p.isWrap?(g+=1,m=0):p.wrap&&!p.horizontalMasonry&&(m+=1)}else!p.wrap||f[m]&&L[t]&&f[m].size+L[t].height>p.perpLength?(m+=1,g=0):p.wrap&&(g+=1)}function o(e,t){for(var i=t.length,n=t[0]&&t[0].size?t[0].size:0;i--;)t[0]&&t[i].size<=n&&(n=t[i].size,e=i);return e}function a(e){for(var t=e.length,i=0;t--;)e[t]&&e[t].size>i&&(i=e[t].size);return i}function r(e,t){return e===t-1}function l(e){return!!e.ids.filter(function(e){return L[e].isDoubleSize}).length}function s(e){var t=L[e.ids[0]],i=t.isDoubleSize?Math.round(.5*(t.height-p.vGap)):t.height,n=1===e.ids.length&&t.isDoubleSize,o=n?p.vGap:0;return l(e)?2*i+o:i}function d(e){if(S.length)for(var t=0,i=S.length;tb+v?(c="top",m=S,g=L):S+L1&&(h=p.perpLength-(G+F),G=p.perpLength-F),z.x=Math.round(G),z.y=Math.round(I),z.height=Math.round(B),z.width=Math.round(F),a.scaledSize=z.x+z.width,a.remainder=N}a.gapRowIds=a.gapRowIds.map(function(t){return e[t].id=t,e[t]}).sort(function(e,t){return e.xt.x?1:0}).map(function(e){return e.id});for(var j=0,W=a.gapRowIds.length;j2&&A<12){(!O||On)&&(C=n);var X;return X=O?(O+C)/2:h/2+n,A++,E(e,t,i,X,o)}return O=void 0,C=void 0,A=0,a}e=e||{};var m,g,p=this,L=[],f=[],v=[],S=[];p.axis=e.axis||"y",p.perpLength=e.perpLength||300,p.align=e.align||"left",p.wrap=e.wrap||!0,p.hGap=firstValid(e.hGap,e.gap,0),p.vGap=firstValid(e.vGap,e.gap,0),p.width=0,p.height=0,p.horizontalMasonry=e.horizontalMasonry,p.masonryFill=e.masonryFill,p.isWrap=!1,p.items=L,p.maintainOrder=e.maintainOrder,p.lastRowGap=e.lastRowGap||!1,Object.defineProperty(p,"gap",{get:function(){return this.hGap},set:function(e){this.hGap=e,this.vGap=e}}),p.layoutItems=function(){m=-1,g=-1,f=Array.apply(null,Array(p.numberOfColumns||1)).map(function(){return{size:0,ids:[]}}),v=[{size:0,gapRowSize:0,ids:[],gapRowIds:[],doubleSizeIds:[]}],S=[];var i,u,T=0,O=L.length;for(T;T1&&L[T].isDoubleSize){if(r(i,p.numberOfColumns)){var P=L[T],Y=f[i].size,R=f[i-1].size,N=(i-1)*(A+p.hGap);if(b=t("x",N,A),R<=Y){var z=Y-R;S.push({x:t("x",N,A),y:R,size:z,isLastColumn:!0}),f[i].size+=P.height+p.vGap,f[i-1].size+=P.height+z+p.vGap}else{var z=R-Y,k=i*(A+p.hGap);S.push({x:t("x",k,A),y:f[i].size,size:z,isLastColumn:!0}),M=R,f[i-1].size+=P.height+p.vGap,f[i].size+=P.height+z+p.vGap}f[i].ids.push(T)}else{var B=0;f[i+1]&&f[i+1].size>f[i].size&&(B=f[i+1].size-f[i].size,S.push({x:t("x",b,A),y:f[i].size,size:B}),M=f[i+1].size),f[i].size+=L[T].height+p.vGap+B,f[i+1]||(f[i+1]={size:0,ids:[]}),f[i+1].size+=L[T].height+p.vGap}f[i].ids.push(T)}else f[i].ids.push(T),f[i].size+=L[T].height+p.vGap;C===!1&&(L[T].x=t("x",b,A),L[T].y=t("y",M,y))}p.isWrap=!1}if(p.horizontalMasonry){var H;if(0===v[u].ids.length&&(H=v.pop()),p.masonryFill&&v.length>1){f[0].size=0;for(var F,G=p.perpLength,j=.5*G,T=0,O=v.length;T-i||n<-i}function r(){E&&!m?(n(),d=requestAnimationFrame(r)):E||(gd.width?(h.x=d.width-(v+h.width+L),d.x=e.pageX-d.width+v+h.point+L):(h.x=t-(v-h.width),d.x=e.pageX-t)}function n(e){e.pageY=Mth.abs(n)?i>0?"right":"left":Mth.abs(i)0?"down":"up")}function a(t){d=(new Date).getTime();var i=r(s,d,t.pageX-u);e.events.dispatchEvent(TOUCH_NAVIGATION_END,{flickSpeed:i,isMove:v,swipeDirection:c.swipeDirection}),c.startdrag=!1,c.swipeDirection=!1,v=!1,sectionEnd=!1,p=0}function r(e,t,i){var n=1,o=.7,a=(t-e)/Math.abs(i);return a>n&&(a=n),a=Mth.abs(t)?e>0?"right":"left":Mth.abs(e)0?"down":"up")}function a(t){if(c.startdrag&&stage.zoom<=1){d=(new Date).getTime();var i=r(s,d,u-E);e.events.dispatchEvent(TOUCH_NAVIGATION_END,{flickSpeed:i,isMove:v,swipeDirection:c.swipeDirection}),c.startdrag=!1,c.swipeDirection=!1,v=!1,sectionEnd=!1,p=0,u=0,T=0}}function r(e,t,i){var n=1,o=.5,a=(t-e)/Math.abs(i);return a>n&&(a=n),a-1?o():n()},1e3*g)}function n(){l(),r()}function o(){s(),a()}function a(){if(!document.getElementById("likesrc")){var e=document.createElement("script");e.setAttribute("id","likesrc"),e.setAttribute("type","text/javascript"),e.setAttribute("src","https://connect.facebook.net/en_US/all.js#xfbml=1"),document.getElementsByTagName("head")[0].appendChild(e)}}function r(){if(!document.getElementById("plus1src")){var e=document.createElement("script");e.setAttribute("id","plus1src"),e.setAttribute("type","text/javascript"),e.setAttribute("src","https://apis.google.com/js/plusone.js"),document.getElementsByTagName("head")[0].appendChild(e)}}function l(){if(Popup.plusDiv)Popup.plusDiv.alpha=0,Popup.plusDiv.display="block",u(Popup.plusDiv,0),Popup.plusDiv.alpha=1;else{var e=c("plus1",100,40);e.overflow="hidden",e.text="";var i=h();i.x=e.width-2,i.y=2,e.addChild(i),stage.addChild(e),Popup.plusDiv=e,Popup.plusClose=i}Popup.plusClose.addEventListener(CLICK,T)}function s(){if(Popup.likeDiv)Popup.likeDiv.alpha=0,Popup.likeDiv.display="block",u(Popup.likeDiv,0),Popup.likeDiv.alpha=1;else{var e=c("like",430,40);e.overflow="visible",e.text="";var t=h();t.x=e.width-2,t.y=2,e.addChild(t),stage.addChild(e),Popup.likeDiv=e,Popup.likeClose=t}Popup.likeClose.addEventListener(CLICK,T)}function d(){m.backgroundColor=toRgba("#000000",.65),m.width=stage.width,m.alpha=0,m.addEventListener(CLICK,T),E.addChild(m),m.height=stage.height,stage.addChild(E),Tween(m,g,{alpha:1})}function c(e,t,i){var n=new Sprite;return n.element.setAttribute("id",e),n.backgroundColor=toRgba("#FFFFFF",.85),n.x=.5*(stage.width-t),n.y=.5*(stage.height-i),n.width=t,n.height=i,n.paddingTop=20,n.paddingBottom=2,n.paddingLeft=15,n.zIndex=2e3,n}function h(){var e=new Svg;e.width=14,e.height=14,e.rotate=0;var t=new Path;return t.id="icon",t.d=svgPaths.close,t.strokeWidth=2,t.fill="none",t.stroke="#555",e.addChild(t),e}function u(e,t){if(e&&"block"===e.style.display){var i=.5*(stage.width-e.width),n=.5*(stage.height-e.height);Tween(e,t,{x:i,y:n})}}function T(e){e.target.removeEventListener(CLICK,T),Tween(m,g,{alpha:0,onComplete:function(){stage.removeChild(E)}}),Popup.plusDiv&&(Popup.plusDiv.display="none"),Popup.likeDiv&&(Popup.likeDiv.display="none")}var E=new ViewProxy({events:e.events}),m=new Sprite,g=.35;return E.overflow="hidden",E.events.addEventListener(RESIZE_END,function(e){E.resize()}),i(),E.resize=function(){Tween(m,g,{width:stage.width,height:stage.height}),u(Popup.plusDiv,g),u(Popup.likeDiv,g)},E}function Tween(e,t,i){function n(){i.onInit&&o(),setTimeout(r,1e3*t),i.onUpdate&&(d=requestAnimationFrame(a)),l(t);var e;for(e in i)/delay|ease|overwrite|css|onComplete|onCompleteScope|onCompleteParams|onUpdate|onUpdateScope|onUpdateParams|onInit|onInitScope|onInitParams/.test(e)||s(e,i[e])}function o(){i.onInit.apply(i.onInitScope||e,i.onInitParams||[!1])}function a(){d&&(d=requestAnimationFrame(a)),i.onUpdate.apply(i.onUpdateScope||e,i.onUpdateParams||[!1])}function r(t){d&&cancelAnimationFrame(d),i.onComplete&&i.onComplete.apply(i.onCompleteScope||e,i.onCompleteParams||[!1]),i={},l(0)}function l(t){t?(t="all "+t+"s",i.ease&&(t+=" "+i.ease)):t="",e&&e.style&&(e.style.WebkitTransition=t,e.style.MozTransition=t,e.style.OTransition=t,e.style.transition=t)}function s(t,i){e&&e.element?e[t]=i:e&&e.style&&(e.style[t]=i)}var d,c=i.delay||0;return setTimeout(n,1e3*c),{destroy:function(){delete i.onComplete}}}function Bitmap(e){e=e||{},e.type="img",e.className="Bitmap";var t=new Sprite(e);return t.element.style["user-select"]="none",t}function Button(e){e=e||{},e.type="button",e.className="Button";var t=new Sprite(e);return t.borderRadius=0,t.enable=function(){this.alpha=1,this.element.removeAttribute("disabled")},t.disable=function(){this.alpha=.25,this.element.setAttribute("disabled",!0)},t}function ControllerProxy(e){var t=e||{};t.events=t.events||new EventSandbox;var i,n={listeners:t.events.listeners,dispatchEvent:t.events.dispatchEvent,addEventListener:t.events.addEventListener,removeEventListener:t.events.removeEventListener};for(i in n)t[i]=n[i];return t}function EventSandbox(){function e(e,t){for(var i=t.length;i--;)if(e.callback===t[i].callback&&e.target===t[i].target)return!0;return!1}var t=!1;return{listeners:{},addEventListener:function(t,i){this.listeners[t]||(this.listeners[t]=[]);var n={type:t,callback:i,target:this};e(n,this.listeners[t])||this.listeners[t].push(n)},removeEventListener:function(e,t){if(!this.listeners[e],t&&"function"==typeof t){if(this.listeners[e])for(var i=0,n=this.listeners[e].length;i-264?a.y-=24:a.y=0)}e=e||{};var i=(e.type||"spinner",e.alpha||.75),n=e.color||"#FFFFFF",o=new Sprite;o.width=24,o.height=24,o.alpha=i,o.overflow="hidden";var a=new Bitmap;a.width=24,a.height=288,"#FFFFFF"===n?a.src=ICONS+"loader1.png":a.src=ICONS+"loader2.png",o.addChild(a);var r=setInterval(t,80);return o.removeLoader=function(){clearInterval(r)},o}function Stage(){function e(){d&&d(function(){r.zoom<=1&&!r.isInputFocus&&(document.body.style["-webkit-overflow-scrolling"]="touch")})}var t,i=!1,n=1,o={},a="Stage",r={children:[],dragElements:[],activeFocus:void 0,isInputFocus:void 0,element:document.body,listeners:globalEvents.listeners,dispatchEvent:globalEvents.dispatchEvent,addEventListener:globalEvents.addEventListener,removeEventListener:globalEvents.removeEventListener,addChild:function(e){e.element.parentNode||document.body.appendChild(e.element),e.parent=this,this.children.push(e),e.dispatchEvent(CHILD_ADDED,e)},get topParentName(){return a},addChildAt:function(e,t){},removeChild:function(e){e.events&&e.events.removeAllListeners(e),e.removeLoader&&e.removeLoader(),e.element.parentNode&&document.body.removeChild(e.element);for(var t=this.children.length;t--;)this.children[t]===e&&this.children.splice(t,1);e=null},removeChildren:function(e){if(e&&e.children&&e.children.length>0)for(var t=e.children.length;t--;)this.removeChildren(e.children[t]),e.removeChild(e.children[t])},moveToTop:function(e){for(var t=0,i=this.children.length;i--;)this.children[i].zIndex>=t&&!this.children[i]===e?t=this.children[i].zIndex+1:this.children[i].zIndex--;e.zIndex=t},domContentLoaded:function(){t||(setTimeout(function(){r.element=document.body,i||(document.body.style.overflow="hidden"),document.body.style.margin=0,document.body.style.padding=0,
r.dispatchEvent(LOAD,r)},10),t=!0)},documentReadyListener:function(){function e(e){return Object.keys(e).map(function(t){return e[t]})}function t(e){return e.reduce(function(e,t){return t&&t.override&&(t.overrides.captionFont&&e.push(t.overrides.captionFont),t.overrides.pageTextFont&&e.push(t.overrides.pageTextFont),t.overrides.pageTitleFont&&e.push(t.overrides.pageTitleFont)),t&&t.thumb&&t.thumb.titleFont&&e.push(t.thumb.titleFont),e},[])}function i(e,t,i){return i.indexOf(e)===t}function n(e,t,i){var n=getFontData(e);return"system"!==n.service}function o(e){return e.reduce(function(e,t){if(!t)return e;var i=getFontData(t);if(i&&i.family&&i.weight&&i.charset&&i.service){e[i.service]||(e[i.service]={families:[]});var n=i.family,o=i.weight.join(","),a=i.charset;e[i.service].families.push(n+":"+o+":"+a)}return e},{})}var a=[LAYOUT_MODEL.captionFont,LAYOUT_MODEL.contactFont,LAYOUT_MODEL.contactTitleFont,LAYOUT_MODEL.copyrightFont,LAYOUT_MODEL.logoFont,LAYOUT_MODEL.menuFont,LAYOUT_MODEL.navbarFont,LAYOUT_MODEL.pageTextFont,LAYOUT_MODEL.pageTitleFont,LAYOUT_MODEL.thumbnailTitleFont,LAYOUT_MODEL.thumbnailTitleBlockFont||""];LAYOUT_MODEL.menuIconFont&&a.push(LAYOUT_MODEL.menuIconFont),!isAdmin&&LAYOUT_MODEL.menuFontMobile&&a.push(LAYOUT_MODEL.menuFontMobile),!isAdmin&&LAYOUT_MODEL.menuFontTablet&&a.push(LAYOUT_MODEL.menuFontTablet),!isAdmin&&LAYOUT_MODEL.mobileLogoFont&&a.push(LAYOUT_MODEL.mobileLogoFont),!isAdmin&&LAYOUT_MODEL.tabletLogoFont&&a.push(LAYOUT_MODEL.tabletLogoFont),WebFontConfig={loading:function(){},fontloading:function(e,t){},fontactive:function(e,t){},fontinactive:function(e,t){},active:function(){r.domContentLoaded(),r.style=document.body.style,r.element=document.body},inactive:function(){r.domContentLoaded(),r.style=document.body.style,r.element=document.body}};var l=a.concat(t(e(SECTIONS_MODEL))).filter(i).filter(n),s=o(l);s.google&&(WebFontConfig.google=s.google),s.typekit&&SETTINGS_MODEL.typekitId&&(WebFontConfig.typekit={id:SETTINGS_MODEL.typekitId}),s.custom&&SETTINGS_MODEL.customFonts.length&&(WebFontConfig.custom=s.custom,WebFontConfig.custom.urls=["https://"+window.location.host+"/css"]),WebFontConfig.custom||WebFontConfig.google||(r.domContentLoaded(),r.style=document.body.style,r.element=document.body)},globalToLocal:function(e){return{x:e.x,y:e.y}},localToGlobal:function(e){return{x:e.x,y:e.y}},event:function(e){var t={type:e.type,target:e.target,currentTarget:e.target,x:e.x,y:e.y,keyCode:e.which,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,mouseX:e.clientX-r.stageX,mouseY:e.clientY-r.stageY,deltaX:e.deltaX||-e.wheelDeltaX||0,deltaY:e.deltaY||-e.wheelDeltaY||0,preventDefault:function(){e.preventDefault()},stopPropagation:function(){e.stopPropagation()},dataTransfer:e.dataTransfer};e.touches&&(t.touches=e.touches),e.type!==WHEEL&&e.type!==MOUSE_WHEEL||(t.type=MOUSE_WHEEL),e.type!==RESIZE&&e.type!==GESTURE_CHANGE&&e.type!==GESTURE_END&&e.type!==ORIENTATION_CHANGE||(n=window.visualViewport?window.visualViewport.scale:isPod()||isPad()?document.documentElement.clientWidth/window.innerWidth:document.documentElement.clientHeight/window.innerHeight,n=n<1?1:n),Scrolls&&e.clientX&&e.clientY&&Scrolls.hitMask(e.clientX,e.clientY),/click|key|touch|down/.test(e.type)&&(r.userInteraction=!0),r.dispatchEvent(e.type,t)},get disableScroll(){return r._disableScroll},set disableScroll(e){r._disableScroll=e;var t=document.getElementsByTagName("html")[0];e?(r._previousOverflow={x:document.body.style.overflowX,y:document.body.style.overflowY},t.style.overflow="hidden",r.element.style.overflow="hidden"):(t.style.overflow="initial",r._previousOverflow&&(r.element.style.overflowX=r._previousOverflow.x,r.element.style.overflowY=r._previousOverflow.y))},get getChildren(){return children},get images(){return document.images},get forms(){return document.forms},get links(){return document.links},get anchors(){return document.anchors},get scripts(){return document.scripts},get plugins(){return document.plugins},get embeds(){return document.embeds},get width(){var e=window.innerWidth,t=e*n;return n<=1?t:e},get height(){var e=USER_AGENT!==MOBILE&&isPod()&&window.innerHeight===document.documentElement.clientHeight&&window.innerWidth>window.innerHeight?window.innerHeight+81:window.innerHeight,t=e*n;return n<=1?t:e},get stageX(){return 0},get stageY(){return 0},get scrollX(){return o.scrollX||window.scrollX},set scrollX(e){o.scrollX=e},get scrollY(){return o.scrollY||window.scrollY},set scrollY(e){o.scrollY=e},get selectable(){return i},set selectable(e){i=e},get zoom(){return n},set zoom(e){n=e},get backgroundColor(){return o.backgroundColor||document.body.style.backgroundColor},set backgroundColor(e){o.backgroundColor=e,document.body.style.backgroundColor=e},get transition(){return o.transition},set transition(e){o.transition=e,e=0===e?"none":"all "+e+"s",document.body.style.WebkitTransition=e,document.body.style.MozTransition=e,document.body.style.OTransition=e,document.body.style.transition=e},get disableKeyNavigation(){return o.disableKeyNavigation},set disableKeyNavigation(e){o.disableKeyNavigation=e},focus:function(){r.activeFocus=r},blur:function(){}};r.proxy=r;var l=document.createElement("div");l.className="scrollbar-measure",document.body.appendChild(l);var s=l.offsetWidth-l.clientWidth;document.body.removeChild(l),MAC_SCROLLBARS=0===s;var d;USER_AGENT!==MOBILE&&USER_AGENT!==TABLET||(d=createDebounce(200)),window.addEventListener(ORIENTATION_CHANGE,function(t){setTimeout(function(){e(),r.event(t)},50)},!1),window.addEventListener(SCROLL,function(e){r.scrollY=window.scrollY,r.event(e)},!1),window.addEventListener(TOUCH_START,r.event,!1),window.addEventListener(TOUCH_MOVE,r.event,!1),window.addEventListener(TOUCH_END,r.event,!1),window.addEventListener(TOUCH_CANCEL,r.event,!1),window.addEventListener(MOUSE_OVER,r.event,!1),window.addEventListener(MOUSE_DOWN,r.event,!1),window.addEventListener(MOUSE_MOVE,r.event,!1),window.addEventListener(MOUSE_UP,r.event,!1),window.addEventListener(MOUSE_OUT,r.event,!1),window.addEventListener(CLICK,r.event,!1),window.addEventListener(RESIZE,r.event,!1),window.addEventListener(GESTURE_START,r.event,!1),window.addEventListener(GESTURE_CHANGE,r.event,!1),window.addEventListener(GESTURE_END,r.event,!1),window.addEventListener(KEY_UP,r.event,!1),window.addEventListener(KEY_DOWN,r.event,!1);var c;return window.addEventListener(RESIZE,function(e){clearTimeout(c),c=setTimeout(function(){isPod()?window.innerHeight>window.innerWidth:r.dispatchEvent(RESIZE_END,e)},50)},!1),window.addEventListener(ORIENTATION_CHANGE,function(e){r.dispatchEvent(ORIENTATION_CHANGE,e)},!1),window.addEventListener(WHEEL,r.event,{passive:!1}),window.addEventListener(MOUSE_WHEEL,r.event,{passive:!1}),r.documentReadyListener(),r}function addChild(e){stage.addChild(e)}function Path(){return new Svg({type:"path"})}function Rect(){return new Svg({type:"rect"})}function Circle(){return new Svg({type:"circle"})}function TextArea(e){var t;return e=e||{},e.type="textarea",e.className="TextArea",t=new Sprite(e),t.borderRadius=0,t.style["-webkit-appearance"]="none",t.element.addEventListener("focus",function(){"Safari"===BROWSER_NAME&&document.webkitCancelFullScreen(),stage.disableKeyNavigation=!0,stage.activeFocus=t,stage.isInputFocus=!0}),t.element.addEventListener("blur",function(){stage.disableKeyNavigation=!1,stage.isInputFocus=!1}),t}function TextField(e){e=e||{},e.type="span",e.className="TextField";var t=new Sprite(e);return t.selectable=!0,t.fontFamily="sans-serif",t.element.addEventListener("focus",function(){stage.disableKeyNavigation=!0,stage.activeFocus=t,stage.isInputFocus=!0}),t.element.addEventListener("blur",function(){stage.disableKeyNavigation=!1,stage.isInputFocus=!1}),t}function ViewProxy(e){var t=e||{};return t.events=t.events||new EventSandbox,new Sprite(t)}function VideoPlayer(e){function t(e){a.dispatchEvent(METADATA_LOADED,e),r&&a.play()}function i(e){a.dispatchEvent(ERROR,e)}function n(e,t){var i=a.element.canPlayType(e+';codecs="'+t+'"');return""!==i}function o(){a.dispatchEvent("playbackEnd")}e=e||{},e.type="video",e.className="VideoPlayer";var a=new Sprite(e),r=!1;a.element.setAttribute("playsinline",!0),a.element.addEventListener(METADATA_LOADED,t,!1),a.element.addEventListener(ERROR,i,!1),a.width=e.width||640,a.height=e.height||480,a.parent=e.parent,a.hud=new VideoHud(a),a.hud.disable(),a.playerID="player"+VideoPlayer.getNextPlayerID();var l=e.alwaysMuted,s=!0,d=new Button;return d.x=20,d.y=20,d.zIndex=10,d.borderRadius=2,d.backgroundColor="white",d.text="TAP TO UNMUTE",d.display="none",d.element.style.padding="3px 6px",a.unmuteBtn=d,a.unmuteClick=function(){a.hud.unmute(),a.hud.enable(),d.display="none",d.removeEventListener("click",a.unmuteClick),l=!1},d.addEventListener("click",a.unmuteClick),a.unmuteBtn=d,a.parent.addChild(d),a.disableUnmuteButton=function(){s=!1,d.display="none"},a.play=function(){var e=a.element.play();void 0!==e&&e.then(function(){a.paused=!1,l?a.element.muted=!0:stage.userInteraction&&(d.display="none",a.hud?a.hud.unmute():a.element.muted=!1),a.dispatchEvent(PLAY)}).catch(function(){a&&(a.hud?a.hud.mute():a.element.muted=!0,s&&(d.display="block"),a.element.play(),a.paused=!1,a.dispatchEvent(PLAY))})},a.pause=function(){a.element.pause(),a.paused=!0,a.dispatchEvent(PAUSED)},a.togglePlay=function(){a.element.paused?a.play():a.pause()},a.setSize=function(e,t,i){a&&(0===i?(a.width=e,a.height=t):Tween(a,i,{width:e,height:t}))},a.setSource=function(e,t){t&&a.element.setAttribute("autoplay",!0),n("video/mp4","avc1.42E01E, mp4a.40.2")?(a.src=cdnMediaPath(e),a.element.addEventListener("ended",o),t&&(r=!0)):fileExist(MEDIA_ORIGINAL+e.replace(getExt(e),"webm"))?(a.src=cdnMediaPath(e.replace(getExt(e),"webm")),a.element.addEventListener("ended",o),t&&(r=!0)):window.open(MEDIA_ORIGINAL+e)},a.destroy=function(){a&&(a.element.removeEventListener("ended",o),a.removeKeyListener(),a.element.removeEventListener(METADATA_LOADED,t,!1),a=null)},a.removeKeyListener=function(){},a}function VideoHud(e){function t(){O.height=50,O.width=e.width,O.alpha=0,O.zIndex=5,e.parent.addChild(O);var t;t=e.element.paused?svgPaths.pause:svgPaths.play,m=a(t,h),O.addChild(m),g=a(svgPaths.fullscreen,fullscreen(e.element)),O.addChild(g);var i=svgPaths.volume,n=u;USER_AGENT===TABLET&&(i="",n=function(){}),p=a(i,n),O.addChild(p),r(),O.interval=setInterval(d,100),e.element.addEventListener("ended",c)}function i(t){if(!isPod()&&!isPad()){clearTimeout(M);var i=getX(t),a=STATE.siteView.unifiedPageScroll()||/unifiedSiteScroll/.test(STATE.overrides.siteDisplayBehavior)?t.pageY:getY(t);e.hitTestAbs(i,a)?(n(),M=setTimeout(function(){o()},3e3)):o()}}function n(){y||(y=!0,O.display="block",Tween(O,UPDATE_SPEED,{alpha:1}))}function o(){y&&(y=!1,Tween(O,UPDATE_SPEED,{alpha:0,onComplete:function(){O.display="none",y=!1}}))}function a(e,t){var i=new Sprite;i.width=C,i.height=A,i.backgroundColor=b;var n=new Svg;n.id="svg",n.width=12,n.height=12,n.left=Mth.round(.5*(i.width-n.width)),n.top=Mth.round(.5*(i.height-n.height)),i.addChild(n);var o=new Path;o.id="icon",o.d=e,o.fill="#FFFFFF",o.alpha=.65,n.addChild(o);var a=new Sprite;return a.width=i.width,a.height=i.height,i.addChild(a),i.hit=a,i.icon=o,i.svg=n,a.icon=o,a.bg=i,a.addEventListener(CLICK,t),a.addEventListener(MOUSE_OVER,function(){Tween(this.bg,UPDATE_SPEED,{backgroundColor:"rgba(0,0,0,0.85)"}),Tween(this.icon,UPDATE_SPEED,{alpha:1})}),a.addEventListener(MOUSE_OUT,function(){Tween(this.bg,UPDATE_SPEED,{backgroundColor:b}),Tween(this.icon,UPDATE_SPEED,{alpha:.65})}),i}function r(){L=new Sprite,L.zIndex=-1,L.backgroundColor=b,L.height=A,O.addChild(L),L.buffer=new Sprite,L.buffer.backgroundColor="#FFFFFF",L.buffer.alpha=.12,L.buffer.width=1,L.buffer.height=O.height,L.addChild(L.buffer),L.progress=new Sprite,L.progress.backgroundColor="#FFFFFF",L.progress.alpha=.25,L.progress.width=1,L.progress.height=O.height,L.addChild(L.progress),L.time=new Sprite,L.time.fontFamily="Arial, Helvetia, sans-serif",L.time.fontColor="#FFF",L.time.fontSize=10,L.time.text="00:00 / 00:00",L.time.alpha=1,L.addChild(L.time),L.time.x=10,L.time.y=20,L.head=new Sprite,L.head.backgroundColor="#FFFFFF",L.head.alpha=0,L.head.x=30,L.head.width=1,L.head.height=O.height,L.addChild(L.head),L.headTime=new Sprite,L.headTime.fontFamily="Arial, Helvetia, sans-serif",L.headTime.fontColor="#FFFFFF",L.headTime.fontSize=10,L.headTime.alpha=0,L.headTime.text="00:00",L.headTime.x=30,L.headTime.y=-15,L.addChild(L.headTime),L.hit=new Sprite,L.hit.height=O.height,L.addChild(L.hit),isPod()||isPad()||(L.hit.addEventListener(MOUSE_OVER,function(){Tween(L.buffer,UPDATE_SPEED,{alpha:.2}),Tween(L.progress,UPDATE_SPEED,{alpha:.4}),Tween(L.time,UPDATE_SPEED,{alpha:1}),Tween(L.head,UPDATE_SPEED,{alpha:1}),Tween(L.headTime,UPDATE_SPEED,{alpha:1}),Tween(L,UPDATE_SPEED,{backgroundColor:"rgba(0,0,0,0.85)"})}),L.hit.addEventListener(MOUSE_OUT,function(){Tween(L.buffer,UPDATE_SPEED,{alpha:.12}),Tween(L.progress,UPDATE_SPEED,{alpha:.25}),Tween(L.time,UPDATE_SPEED,{alpha:.5}),Tween(L.head,UPDATE_SPEED,{alpha:0}),Tween(L.headTime,UPDATE_SPEED,{alpha:0}),Tween(L,UPDATE_SPEED,{backgroundColor:b})}),L.hit.addEventListener(MOUSE_MOVE,l)),L.hit.addEventListener(CLICK,s)}function l(t){var i=T(t);L.head.transition=0,L.head.x=i,L.headTime.transition=0,L.headTime.x=i,L.headTime.text=E(i/S*e.element.duration)}function s(t){var i=T(t);L.head.x=i,L.headTime.x=i;var n=i/S*e.element.duration;e.element.currentTime=n,L.headTime.text=E(n),d(e)}function d(){e.element.buffered.length>0&&(bufferedPercent=e.element.buffered.end(0)/e.element.duration,L.buffer.transition=0,L.buffer.width=bufferedPercent*S,playedPercent=e.element.currentTime/e.element.duration,L.progress.transition=0,L.progress.width=playedPercent*S,L.time.text=E(e.element.currentTime)+" / "+E(e.element.duration))}function c(){clearInterval(O.interval)}function h(){e.element.paused?(e.play(),m.icon.d=svgPaths.pause,O.interval=setInterval(d,50)):(e.pause(),m.icon.d=svgPaths.play)}function u(){e.element.muted?O.unmute():O.mute()}function T(e){return TOUCH_DEVICE&&e.touches?e.touches[0].offsetX-C-L.x:e.offsetX}function E(e){return minutes=Math.floor(e/60),e=Math.floor(e-60*minutes),minutes=minutes<10?"0"+minutes:minutes,e=e<10?"0"+e:e,minutes+":"+e}var m,g,p,L,f,v,S,O=new Sprite,C=50,A=50,b="rgba(0,0,0,0.65)",y=!0;O.setClass("no-invert");var M;return O.show=n,O.hide=o,O.resize=function(e,t,i,n,o){var a=t,r=i,l=n,s=o;f=n,v=o,S=l-3*C,0===e?(O.width=l,O.x=Mth.floor(a),O.y=Mth.floor(r+s-O.height),g.x=l-g.width,p.x=l-g.width-p.width,L.x=C,L.width=S,L.hit.width=S):(Tween(O,e,{width:l,x:a,y:r+o-O.height}),Tween(g,e,{x:l-g.width}),Tween(p,e,{x:l-g.width-p.width}),Tween(L,e,{x:C,width:S}),Tween(L.hit,e,{width:S})),d()},O.mute=function(){e.element.muted=!0,p.icon.d=svgPaths.mute},O.unmute=function(){e.element.muted=!1,p.icon.d=svgPaths.volume},O.disable=function(){o(),isPod()||isPad()||stage.removeEventListener(MOUSE_MOVE,i)},O.enable=function(){n(),isPod()||isPad()||stage.addEventListener(MOUSE_MOVE,i)},t.call(O),O}function VimeoPlayer(e){function t(e){var t=new Button;return t.x=20,t.y=20,t.zIndex=10,t.borderRadius=2,t.backgroundColor="white",t.text="TAP TO UNMUTE",t.display="block",t.element.style.padding="3px 6px",e.unmuteBtn=t,e.unmuteClick=function(){t.display="none",t.removeEventListener("click",e.unmuteClick),e.element.contentWindow.postMessage(JSON.stringify({method:"setMuted",value:!1}),h)},t.addEventListener("click",e.unmuteClick),e.unmuteBtn=t,e.addEventListener("load",function(){setTimeout(function(){e.parent.addChild(t)},1e3)}),e.disableUnmuteButton=function(){t.display="none"},t}function i(){c.ended||c.dispatchEvent("playbackEnd"),c.ended=!0}function n(){l="player"+VimeoPlayer.getNextPlayerID(),c.playerID=l,c.element.id=l,c.element.setAttribute("frameborder","0"),c.element.setAttribute("webkitAllowFullScreen",""),c.element.setAttribute("mozallowfullscreen",""),c.element.setAttribute("allowFullScreen",""),c.element.style["user-select"]="none"}function o(t){return function(t){var n;try{n=JSON.parse(t.data)}catch(e){n={}}if(!n.player_id&&"play"===n.event,n.player_id===c.playerID)switch("ready"===n.event&&setTimeout(function(){a(n)},10),"error"===n.event,"volumechange"===n.event&&n.data.volume>0&&(u&&c.unmuteBtn&&(stage.userInteraction=!0,c.unmuteBtn.display="none",c.unmuteBtn.removeEventListener("click",c.unmuteClick)),u=!0),"getVideoWidth"===n.method&&n.value&&n.value!==c.videoWidth&&(e.thumbBuild||(c.width=n.value,c.element.setAttribute("width",n.value)),c.videoWidth=n.value,c.videoHeight&&c.dispatchEvent(VIMEO_METADATA_LOADED)),"getVideoHeight"===n.method&&n.value&&n.value!==c.videoHeight&&(e.thumbBuild||(c.height=n.value,c.element.setAttribute("height",n.value)),c.videoHeight=n.value,c.videoWidth&&c.dispatchEvent(VIMEO_METADATA_LOADED)),n.event){case"finish":i();break;case"pause":n.data.seconds>=n.data.duration-1?i():(c.dispatchEvent(PAUSED),"function"==typeof c.onpause&&c.onpause(),c.paused=!0);break;case"play":c.dispatchEvent(PLAY),"function"==typeof c.onplay&&c.onplay(),c.paused=!1}}}function a(e){c&&(c.loaded=!0,!stage.userInteraction&&d&&c.element.contentWindow.postMessage(JSON.stringify({method:"setMuted",value:!0}),h),c&&c.element.contentWindow&&(c.element.contentWindow.postMessage(JSON.stringify({method:"getVolume",value:l}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"getMuted",value:l}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"getVideoWidth",value:l}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"getVideoHeight",value:l}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"volumechange"}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"finish"}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"pause"}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"play"}),h),c.element.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"error"}),h)))}function r(e){c&&keyCode[e.keyCode]===SPACE_BAR&&c.togglePlay()}e=e||{},e.type="iframe",e.className="VimeoPlayer";var l,s,d,c=new Sprite(e),h="*",u=!1;return c.parent=e.parent,c.style.pointerEvents="auto",n(),c.setSource=function(i,n){c.element.ownerDocument.defaultView.addEventListener("message",o(l)),d=!!n,c.element.setAttribute("allow","autoplay");try{s="https://player.vimeo.com/video/"+i.split("vimeo:")[1];var a=n?"&autoplay=1":"";STATE.overrides.videoLoop?c.src=s+"?api=1&autopause=0&loop=1&wmode=opaque"+a+"&player_id="+l:c.src=s+"?api=1&autopause=0&wmode=opaque"+a+"&player_id="+l;var r=c.width||e.width||640,u=c.height||e.height||480;c.element.setAttribute("width",r),c.element.setAttribute("height",u),c.width=r,c.height=u,n&&(stage.userInteraction?(c.unmuteBtn&&(c.unmuteBtn.display="none",c.unmuteBtn.removeEventListener("click",c.unmuteClick)),c.element.setAttribute("allow","autoplay"),c.element.contentWindow.postMessage(JSON.stringify({method:"setMuted",value:!1}),h)):c.unmuteBtn?(c.unmuteBtn.display="block",c.unmuteBtn.addEventListener("click",c.unmuteClick)):c.unmuteBtn||t(c)),c.element.setAttribute("frameborder",0),c.element.setAttribute("webkitallowfullscreen",!0),c.element.setAttribute("mozallowfullscreen",!0),c.element.setAttribute("allowfullscreen",!0)}catch(e){}},c.togglePlay=function(){c.paused?c.play():c.pause()},c.setLoop=function(e){c&&c.loaded&&c.element.contentWindow&&c.element.contentWindow.postMessage(JSON.stringify({method:"loop",value:e}),h)},c.play=function(){c.ended=!1,stage.userInteraction?(c.unmuteBtn&&(c.unmuteBtn.display="none",c.unmuteBtn.removeEventListener("click",c.unmuteClick)),c.element.contentWindow.postMessage(JSON.stringify({method:"setMuted",value:!1}),h)):c.unmuteBtn?(c.unmuteBtn.display="block",c.unmuteBtn.addEventListener("click",c.unmuteClick)):c.unmuteBtn||t(c),c&&c.element.contentWindow&&(c.loaded?(c.element.contentWindow.postMessage(JSON.stringify({method:"play",value:""}),h),stage.addEventListener(KEY_DOWN,r),c.paused=!1,c.dispatchEvent(PLAY)):c.element.addEventListener("load",function(){c.loaded=!0,c.element.contentWindow.postMessage(JSON.stringify({method:"play",value:""}),h),stage.addEventListener(KEY_DOWN,r),c.paused=!1,c.dispatchEvent(PLAY)}))},c.pause=function(){c&&c.loaded&&c.element.contentWindow&&(c.element.contentWindow.postMessage(JSON.stringify({method:"pause",value:""}),h),c.paused=!0)},c.setSize=function(e,t){c&&(c.transition=0,c.width=e,c.height=t)},c.align=function(e,t){c&&(c.transition=0,c.style.left=e+"px",c.style.top=t+"px")},c.destroy=function(){c.element.ownerDocument.defaultView.removeEventListener("message",o),c.removeKeyListener(),c=null},c.removeKeyListener=function(){stage.removeEventListener(KEY_DOWN,r)},c}function SiteController(e){function t(){if(LAYOUT_MODEL.siteDisplayBehavior||STATE.siteView.unifiedPageScroll()||(LAYOUT_MODEL.siteDisplayBehavior="none"),USER_AGENT!==MOBILE&&USER_AGENT!==TABLET||(LAYOUT_MODEL.siteDisplayBehavior="none"),/disabled/.test(LAYOUT_MODEL.cursorIconStyle)?LAYOUT_MODEL.navCursorType=LAYOUT_MODEL.cursorIconStyle:LAYOUT_MODEL.navCursorType=LAYOUT_MODEL.navCursorType?LAYOUT_MODEL.navCursorType:"cursor",stage.backgroundColor=LAYOUT_MODEL.siteBackgroundColor,isAndroidMobile()&&(LAYOUT_MODEL.mobileAutoPlay=!1),ge.siteView.updateStyle(),e.parentView=ge.siteView,e.parentController=ge,e.events=ge.events,e.siteControllerEvents=ge.events,ge.sectionController=new e.SectionController(e),ge.menuController=new e.MenuController(e),e.menuController=ge.menuController,USER_AGENT===MOBILE||USER_AGENT===TABLET&&LAYOUT_MODEL.footerOnMenuTablet||(ge.footerController=new e.FooterController(e)),ge.logoController=new e.LogoController(e),ge.navbarController=new e.NavbarController(e),ge.caption=new Caption,ge.siteView.addChild(ge.caption.container),ge.addressController=new e.AddressController(e),"cursor"!==LAYOUT_MODEL.navCursorType||isPod()||isPad()||(ge.cursor=new e.Cursor(e),ge.siteView.addChild(ge.cursor)),ge.tooltip=new e.Tooltip(e),ge.service=new e.SiteService(e),ge.addressController.service=ge.service,isLogin&&(SETTINGS_MODEL.adminLockout?alert("ADMIN LOCKED FOR MAINTENANCE.
Please try again later.
If problem persists, contact support."):isSupportedBrowserForAdmin(BROWSER_NAME,BROWSER_VERSION)?ge.login=new Login(e):alert("Admin not supported for this browser ["+BROWSER_NAME+" "+BROWSER_VERSION+"]. Please use latest version of Chrome, Firefox, Safari or MS Edge.")),ge.events.dispatchEvent(LAYOUT_MODEL_CHANGE,{id:"layoutModelInit"}),ge.events.addEventListener(NAVBAR_OVERLAY_BTN_CLICK,h),ge.events.addEventListener(NAVBAR_NAV_CLICK,u),ge.events.addEventListener(NAVBAR_FULLSCREEN,T),ge.events.addEventListener(MENU_CLICK,m),ge.events.addEventListener(FOOTER_CLICK,E),ge.events.addEventListener(LOGO_CLICK,p),ge.events.addEventListener(THUMB_CLICK,g),ge.events.addEventListener(ADDRESS_URI_CHANGE,v),ge.events.addEventListener("ADDRESS_URI_CHANGE_PASSIVE",A),ge.events.addEventListener(ADMIN_LOADED,i),ge.events.addEventListener(CONTACT_FORM_SUBMIT,ie),ge.events.addEventListener(SHARE_FORM_SUBMIT,ne),ge.events.addEventListener(INQUIRY_FORM_SUBMIT,oe),ge.events.addEventListener(POP_UP,c),ge.events.addEventListener("OVER_LOGO",ae),ge.events.addEventListener("privateGalleryAuthCheck",F),ge.events.addEventListener("passwordViewUpdate",G),ge.events.addEventListener("updateAssetId",b),ge.events.addEventListener("UPDATE_CONTENT_HEIGHT",function(){clearTimeout(me),me=setTimeout(function(){ge.siteView.updatePosition()},50)}),ge.events.addEventListener(PAGE_LOADED,n),ge.events.addEventListener("siteAnchorCaptionUpdate",y),ge.events.addEventListener("SEARCH_SUBMIT",D),ge.events.addEventListener("lightboxDownloadOverlayOpen",U),ge.events.addEventListener("lightboxUpdateItem",I),ge.events.addEventListener("lightboxDownloadPdf",z),ge.events.addEventListener("lightboxDownloadZip",k),ge.events.addEventListener("attachmentDownload",H),ge.events.addEventListener("MENU_DOCK_TOGGLE",S),stage.addEventListener(RESIZE_END,s),stage.addEventListener(GESTURE_END,r),stage.addEventListener(ORIENTATION_CHANGE,d),stage.addEventListener(KEY_DOWN,L),(isPod()||isPad())&&window.addEventListener("scroll",function(){clearTimeout(Ee),Le=!0,Ee=setTimeout(function(){Ee=null,Le=!1,l()&&(ge.events.dispatchEvent(RESIZE_END),ve=!1)},200)}),stage.zoom>1?ge.events.dispatchEvent(RESIZE_END):s(),ge.events.addEventListener("cursorAxisUpdate",le),ORIENTATION=90===Math.abs(window.orientation)?"horizontal":"vertical",window.isStaging){var t=de();ge.siteView.addChild(t)}STATE.cacheLightboxSection()}function i(){dx.admin.events.addEventListener(ACCOUNT_MODEL_CHANGE,W),dx.admin.events.addEventListener(FONTS_MODEL_CHANGE,Z),dx.admin.events.addEventListener(FILES_MODEL_CHANGE,X),dx.admin.events.addEventListener(LAYOUT_MODEL_CHANGE,K),dx.admin.events.addEventListener(MEDIA_MODEL_CHANGE,J),dx.admin.events.addEventListener(NAVBAR_MODEL_CHANGE,Q),dx.admin.events.addEventListener(PDF_MODEL_CHANGE,$),dx.admin.events.addEventListener(SETTINGS_MODEL_CHANGE,ee),dx.admin.events.addEventListener(SECTIONS_MODEL_CHANGE,te),dx.admin.events.addEventListener(ADMIN_MOUSE_DOWN,o),dx.admin.events.addEventListener(ADMIN_MOUSE_UP,a),ge.events.addEventListener("adminPageviewImageSizes",function(e){dx.admin.events.dispatchEvent("adminPageviewImageSizes",e)})}function n(){ge.events.dispatchEvent(SITE_SERVICE_GET_FILE,{name:"js"})}function o(){ge.events.dispatchEvent(ADMIN_MOUSE_DOWN)}function a(){ge.events.dispatchEvent(ADMIN_MOUSE_UP)}function r(){stage.zoom<=1}function l(){return(isPod()||isPad())&&ve&&window.innerHeight===document.documentElement.clientHeight}function s(e){if(/responsive/.test(LAYOUT_MODEL.menuAlignHorizontal)){var t=1;isPod()&&(t=window.devicePixelRatio||1);var i=(LAYOUT_MODEL.screenWidthBreakpoint||800)*t,n=layoutCalcs.isMenuResponsiveOverlay;layoutCalcs.isMenuResponsiveOverlay=USER_AGENT!==MOBILE&&stage.width-1)&&n&&"site"===o?(ge.caption.text=plainTextToHtml(n),ge.caption.show(M)):(ge.caption.text="",ge.caption.hide(),ge.caption.scroll&&ge.caption.scroll.destroy())}}function y(e){if(ce&&ce.asset&&ge.caption){var e=e||ce.asset;e.overrides||(e.overrides={}),fe=e.overrides||{},ge.caption.text=plainTextToHtml(getCaptionText(e));var t=isSlideshowGallery(ce.section)&&LAYOUT_MODEL.slideshowCaptions,i=firstValid(USER_AGENT!==MOBILE||LAYOUT_MODEL.captionMobileOverrides||t?void 0:"site",e.overrides.captionAnchorTo,STATE.overrides.captionAnchorTo);"site"===i&&(t||ce.mode.indexOf("caption")>-1)?ge.caption.show(M):(ge.caption.text="",ge.caption.hide(),ge.caption.scroll&&ge.caption.scroll.destroy())}else ge.caption&&(ge.caption.text="",ge.caption.hide(),ge.caption.scroll&&ge.caption.scroll.destroy())}function M(){USER_AGENT!==MOBILE&&(ge.caption.container.position="fixed"),ge.caption.container.transition=0,ge.caption.container.zIndex=STATE.captionView.zIndex(),firstValid(fe.captionCloseButton,STATE.overrides.captionCloseButton)?ge.caption.showCloseButton():ge.caption.hideCloseButton();var e={onInit:function(){
ge.caption.scroll&&ge.caption.scroll.hide()},onComplete:function(){ge.caption.scroll&&(ge.caption.scroll.show(),ge.caption.scroll.resize())}},t=USER_AGENT===MOBILE&&!LAYOUT_MODEL.captionMobileOverrides,i=firstValid(fe.captionBackgroundRectColor,STATE.overrides.captionBackgroundRectColor),n=firstValid(t?LAYOUT_MODEL.overlayAlpha:void 0,fe.captionBackgroundAlpha,STATE.overrides.captionBackgroundAlpha);ge.caption.backgroundColor=toRgba(i,n),ge.caption.fontFamily=fe.captionFont||STATE.overrides.captionFont,ge.caption.fontSize=stage.width0&&n.addPage({size:[PDF_MODEL.pdfDocPageWidth,PDF_MODEL.pdfDocPageHeight],margins:{top:0,right:0,bottom:0,left:0}}),n.rect(0,0,PDF_MODEL.pdfDocPageWidth,PDF_MODEL.pdfDocPageHeight).fill(PDF_MODEL.pdfDocPageBgColor).image(e,{fit:[PDF_MODEL.pdfDocPageWidth,PDF_MODEL.pdfDocPageHeight],align:"center",valign:"center"})}catch(e){}}),n.end()}),o.on("finish",function(){t(o.toBlob("application/pdf"))}),o.on("error",i)})}function z(){var e=STATE.lightboxSection.media;window.PDFDocument&&window.blobStream||Promise.all([R(CDN_PF_SSL_URI+"/scripts/blob-stream.js"),R(CDN_PF_SSL_URI+"/scripts/pdfkit.standalone.js"),ge.service.getPdfModel()]).then(function(t){var i=t[2];if("fail"===i.status);else{PDF_MODEL=DX_MODEL.pdf=i;var n=PDF_MODEL.pdfDocCustomName?PDF_MODEL.pdfDocCustomName:window.location.host+"-lightbox";n="pdf"===n.split(".").pop()?n:n+".pdf",N(e).then(function(e){Y(e,n)}).catch(function(e){})}}).catch(function(e){})}function k(){var e=window.location.host+"-lightbox.zip";Promise.all([R(CDN_PF_SSL_URI+"/scripts/runtime1.min.js"),R(CDN_PF_SSL_URI+"/scripts/client-zip-2.js")]).then(function(e){var t=STATE.lightboxSection.media.map(function(e){return fetch(SETTINGS_MODEL.cdnSslUri+"/"+MEDIA_MODEL[e].content)});return downloadZip(t)}).then(function(e){return e.blob()}).then(function(t){return Y(t,e)})}function B(e,t){var i=new XMLHttpRequest;i.addEventListener("load",function(e){var i=JSON.parse(e.target.response);i.url&&"pass"===i.status?t(i.url):alert("could not get upload authorization, check your connection")},!1),i.open("POST","/dx/service/attachment/downloadurl"),i.setRequestHeader("Content-Type","application/json"),i.send(JSON.stringify({filename:webSafeChars(e)}))}function H(e){B(e,function(t){P(t,e)})}function F(e){he?(he.setMessage("PASSWORD"),he.open(e.section)):(he=passwordInput({section:e.section,events:ge.events}),ge.events.dispatchEvent(PAUSE_MEDIA)),"overlay"===STATE.menuView.placement()&&ge.menuController.menuView.dock.toggleState()&&ge.menuController.menuView.closeDock()}function G(e){e?j():(he.setMessage("INCORRECT PASSWORD"),setTimeout(function(){he.setMessage("")},1e3))}function j(){he&&he.close()}function W(e){ge.events.dispatchEvent(ACCOUNT_MODEL_CHANGE,e)}function Z(e){ge.events.dispatchEvent(FONTS_MODEL_CHANGE,e)}function X(){}function K(t){t&&/site/.test(t.id)&&ge.siteView.updateStyle(),ge.events.dispatchEvent(LAYOUT_MODEL_CHANGE,t),y(),q(),ge.siteView.updatePosition(),/navCursorType/.test(t.id)&&"cursor"===t.value?ge.cursor?ge.cursor.enabled=!0:(ge.cursor=new e.Cursor(e),ge.cursor.dispatchEvent("cursorAxisUpdate",getCursorAxis(STATE.overrides.transitionType)),ge.siteView.addChild(ge.cursor)):/navCursorType/.test(t.id)&&ge.cursor&&(ge.cursor.enabled=!1),ge.cursor&&/cursorBlendMode/.test(t.id)&&ge.cursor.dispatchEvent("cursorBlendMode",t),Te?(stage.removeChild(Te.overlay.background),Te=searchInput({navEvent:ce,section:ce.section,events:ge.events,tags:ce.searchTags})):he&&(stage.removeChild(he.overlay.background),he=passwordInput({section:ce.section,events:ge.events}))}function q(){document.body.style.overflowY="none"===STATE.overrides.siteDisplayBehavior?"hidden":"auto"}function J(e){ge.addressController.setTitle(),ge.addressController.setMetaDescription(),ge.events.dispatchEvent(MEDIA_MODEL_CHANGE,e),exists(ce,"asset.id")===e.id&&(ce.asset=e),y()}function Q(e){ge.events.dispatchEvent(NAVBAR_MODEL_CHANGE,e)}function $(e){ge.events.dispatchEvent(PDF_MODEL_CHANGE,e)}function ee(e){ge.addressController.setTitle(),ge.addressController.setMetaDescription(),ge.events.dispatchEvent(SETTINGS_MODEL_CHANGE,e)}function te(e){if(exists(ce,"section.id")===e.id){var t=getSectionById(e.id);STATE.section(t)}ge.addressController.setTitle(),ge.addressController.setMetaDescription(),STATE.cacheLightboxSection(),ge.events.dispatchEvent(SECTIONS_MODEL_CHANGE,e),y()}function ie(e){ge.events.dispatchEvent(SITE_SERVICE_CONTACT_FORM_SUBMIT,e)}function ne(e){ge.events.dispatchEvent(SITE_SERVICE_SHARE_FORM_SUBMIT,e)}function oe(e){ge.events.dispatchEvent(SITE_SERVICE_INQUIRY_FORM_SUBMIT,e)}function ae(){stage.addEventListener(MOUSE_MOVE,re)}function re(e){ge.menuController.menuView.menuText.hitTestPoint(e.pageX,e.pageY)?ge.logoController.logoView.element.style.pointerEvents="none":ge.logoController.logoView.element.style.pointerEvents="auto"}function le(e){ge.cursor&&ge.cursor.dispatchEvent("cursorAxisUpdate",e)}function se(e){STATE.section(e.section);var t="none"!==STATE.overrides.thumbnailType&&"none"!==LAYOUT_MODEL.cursorIconStyle;ge.cursor&&ge.cursor.dispatchEvent("cursorThumbsUpdate",t)}function de(){var e=new Button;return e.position="fixed",e.element.style.display="block",e.element.style.zIndex=500,e.text="VIEW LIVE SITE",e.fontColor="#FFF",e.backgroundColor="#51CC47",e.width=111,e.height=22,e.right=5,e.bottom=5,e.borderRadius=2,e.alpha=.8,e.addEventListener("mouseover",function(){e.alpha=1}),e.addEventListener("mouseout",function(){e.alpha=.8}),e.addEventListener(CLICK,function(){confirm("Switching to LIVE SITE, the page will refresh.",{onConfirm:function(){location.assign("/unstage")},onCancel:function(){}})}),e}var ce,he,ue,Te,Ee,me,ge=new ControllerProxy({events:new EventSandbox}),pe=!0,Le=!1,fe={},ve=!1;return e.parent=ge,e.siteControllerEvents=ge.events,ge.siteView=new SiteView(e),USER_AGENT===MOBILE&&STATE.overrides.menuDisplaceMobile||USER_AGENT===TABLET&&STATE.overrides.menuDisplaceTablet||stage.addChild(ge.siteView),stage.addEventListener(KEY_DOWN,function(e){keyCode[e.keyCode]===SPACE_BAR&&ge.events.dispatchEvent("spacebarPlay",ce)}),t.call(ge),ge}function SiteView(e){var t=new ViewProxy({events:e.siteControllerEvents});t.zIndex=0,t.position=STATE.siteView.unifiedPageScroll()?"relative":"absolute",t.setOverflow=function(){USER_AGENT!==TABLET||LAYOUT_MODEL.menuDisplaceTablet===!1?USER_AGENT!==MOBILE&&/none/.test(STATE.overrides.siteDisplayBehavior)?t.element.style.overflow="hidden":/^unified/.test(STATE.overrides.siteDisplayBehavior)?t.element.style.overflow="hidden":(t.element.style.overflowX="hidden",t.element.style.overflowY="auto"):t.element.style.overflow="visible"},t.setOverflow(),t.element.setAttribute("class","SiteView"),t.name="SiteView","Chrome"===BROWSER_NAME&&(t.selectable=!0),t.addEventListener(CHILD_ADDED,function(){t.updatePosition()});return t.updatePosition=function(){t.position=STATE.siteView.unifiedPageScroll()?"relative":"absolute",t.width=STATE.siteView.width(),"open"!==layoutCalcs.mediaOverlayState&&(t.height=STATE.siteView.height()||stage.height),(window.fullScreen||document.webkitCurrentFullScreenElement)&&(t.height=stage.height,t.overflowY="scroll"),USER_AGENT===MOBILE&&STATE.overrides.menuDisplaceMobile?t.x=stage.width:USER_AGENT===TABLET&&STATE.overrides.menuDisplaceTablet&&(t.x=layoutCalcs.menuView.width())},t.updateStyle=function(){t.backgroundColor=LAYOUT_MODEL.siteBackgroundColor},t}function touchDeviceTransition(){return isPod()&&LAYOUT_MODEL.transitionTypeMobile?LAYOUT_MODEL.transitionTypeMobile:isPad()&&LAYOUT_MODEL.transitionTypeTablet?LAYOUT_MODEL.transitionTypeTablet:void 0}function updateCustomThumbSize(e,t){return{custom:{width:e||300,height:t||200},small:{width:100,height:66},medium:{width:200,height:133},large:{width:300,height:200},xLarge:{width:400,height:266},xxLarge:{width:500,height:333},small_sq:{width:100,height:100},medium_sq:{width:200,height:200},large_sq:{width:300,height:300},xLarge_sq:{width:400,height:400},xxLarge_sq:{width:500,height:500},small_v:{width:66,height:100},medium_v:{width:133,height:200},large_v:{width:200,height:300},xLarge_v:{width:266,height:400},xxLarge_v:{width:333,height:500}}}function SiteService(e){function t(){l.events.addEventListener(SITE_SERVICE_CONTACT_FORM_SUBMIT,n),l.events.addEventListener(SITE_SERVICE_SHARE_FORM_SUBMIT,o),l.events.addEventListener(SITE_SERVICE_INQUIRY_FORM_SUBMIT,a),l.events.addEventListener(SITE_SERVICE_GET_FILE,r),l.events.addEventListener("SITE_SERVICE_PASSWORD_CHECK",i)}function i(e){JSONXHR({url:"/dx/siteservice/sectionpasswordcheck",params:e,callback:function(e){"pass"===e.status&&STATE.setPassedSection(e.sectionId),dx.site.events.dispatchEvent("SECTION_PASSWORD_AUTH",e)}})}function n(e){JSONXHR({url:"/dx/siteservice/email/contact",params:e,callback:function(e){if("pass"!==e.status)throw new Error("contact form failed");dx.site.events.dispatchEvent(CONTACT_FORM_SENT,e)}})}function o(e){JSONXHR({url:"/dx/siteservice/email/share",params:e,callback:function(e){if("pass"!==e.status)throw new Error("share form failed");dx.site.events.dispatchEvent(SHARE_FORM_SENT,e)}})}function a(e){JSONXHR({url:"/dx/siteservice/email/inquiry",params:e,callback:function(e){if("pass"!==e.status)throw new Error("inquiry form failed");dx.site.events.dispatchEvent(INQUIRY_FORM_SENT,e)}})}function r(){l.customJsResponse({content:FILES_MODEL.js})}var l=new ControllerProxy({events:e.events});return l.inquiryResponse=function(e){if("pass"!==e.status)throw new Error("inquiry form failed");dx.site.events.dispatchEvent(INQUIRY_FORM_SENT,e)},l.customJsResponse=function(e){if(e.content){var t=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.id="customJs",i.innerHTML=e.content.replace(/\\/g,"");var n=document.getElementById("customJs");n||t.appendChild(i)}},l.createLightbox=function(e){return new Promise(function(t,i){JSONXHR({url:"/dx/siteservice/lightbox/create",params:{ids:e},callback:function(e){"pass"===e.status?t(e):i(e)}})})},l.updateLightbox=function(e,t){return new Promise(function(i,n){JSONXHR({url:"/dx/siteservice/lightbox/update",params:{hash:e,ids:t},callback:function(e){"pass"===e.status?i(e):n(e)}})})},l.getLightboxMedia=function(e){return new Promise(function(t,i){JSONXHR({url:"/dx/siteservice/lightbox/media",params:{hash:e},callback:function(e){"pass"===e.status?t(e):i(e)}})})},l.downloadPdf=function(e){return fetch("/dx/siteservice/lightbox/pdfbuild",{method:"POST",body:JSON.stringify({ids:e}),headers:{"Content-Type":"application/json"}}).then(function(e){return e.blob()}).catch(function(e){})},l.getPdfModel=function(){return fetch("/dx/siteservice/pdf/model").then(function(e){return e.json()}).catch(function(e){})},t.call(l),l}function AddressController(e){function t(e){$.events.dispatchEvent("passwordViewUpdate","pass"===e.status),setTimeout(function(){STATE.getPassedSection(e.sectionId)&&(se=!0,i(K))},350)}function i(e,t){m(e,function(){var i=getParentSection(ee);if(ee&&ee.password.length>0&&!STATE.getPassedSection(ee.id))K=e,$.events.dispatchEvent("privateGalleryAuthCheck",{section:ee});else if(i&&i.password.length>0&&!STATE.getPassedSection(i.id))K=e,$.events.dispatchEvent("privateGalleryAuthCheck",{section:i});else if(ee){K=void 0;var o=r(ee),i=getParentSection(ee),l={section:ee,searchTags:le&&le.search&&le.search.split(",")||[],sortBy:le&&le.sort||"date-asc",parentSection:i,mediaToRender:removeLinksFromMedia(ee.mediaItems),path:te,assetId:ie,asset:getMediaById(ee.mediaItems[ie]),mode:ne,prevState:{section:oe.section,mode:oe.mode,assetId:oe.assetId},info:{isInit:ae,isSectionChange:ee!==exists(oe,"section")||re,isPasswordSection:se,isSearchSubmit:re,isParentSectionChange:i!==exists(oe,"parentSection"),isAssetChange:ie!==exists(oe,"assetId"),isModeChange:ne!==exists(oe,"mode"),isLandingMedia:isSlideshowGallery(ee),mediaViewState:o,isDeepLink:ae&&"/"!==e,isMediaViewStateChange:exists(oe,"info.mediaViewState")!==o,isIntroGallery:ee.isIntroGallery,flickSpeed:J,lastUri:Z,isThumbsFirst:isThumbsFirst(ee),isMobileVideoClick:Q,isBlog:isBlogFeed(ee.id)}};$.setTitle(),$.setMetaDescription(),layoutCalcs.updateSectionState(ee.key,{assetId:ie,mode:ne}),layoutCalcs._section=l.section,layoutCalcs._uriState=l,X=l,re=!1,se=!1,t?$.events.dispatchEvent("ADDRESS_URI_CHANGE_PASSIVE",X):n(),a(ee),oe=l,Z=e,ae=!1,J=void 0,Q=!1}})}function n(){$.events.dispatchEvent(ADDRESS_URI_CHANGE,X)}function o(){X.asset=getMediaById(ee.mediaItems[ie]),$.events.dispatchEvent(ADDRESS_URI_CHANGE,X)}function a(e){var t=getMediaById(e.media[0]);"link"!==t.type||t.thumb||("_blank"===t.linkTarget?window.open(t.content):"_self"===t.linkTarget&&(window.location.href=t.content))}function r(e){return e.slideshow||e.label===LANDING_MEDIA?"landingMedia":"mediaView"}function l(e){ie=isBlogFeed(ee.id)?inverseAssetId(e.id,ee.mediaItems.length-1):e.id,C(),Address.setValue(x(),!0,!1)}function s(e){e.section&&ee.key!==e.section.key&&(ne=e.mode,ie=e.assetId,ee=e.section,e.path=e.section.key,clearTimeout(de),de=setTimeout(function(){N(e,!0)},60))}function d(e,t){if(e.indexOf("/")>-1){var i=e.split("/");return i[0]==t||i[1]==t}return e==t}function c(e,t){return e.indexOf(t)>-1}function h(e){return e.split("&").reduce(function(e,t){var i=t.split("=");return e[i[0]]=i[1],e},{originalQuery:"?"+e})}function u(e){var t=e.split("?")[1];return t?h(t):{}}function T(){return Object.keys(SECTIONS_MODEL).reduce(function(e,t){var i=SECTIONS_MODEL[t];return i.password&&i.password.length>0||!i.visible?e.concat(i.media):e},[])}function E(){return Object.keys(SECTIONS_MODEL).reduce(function(e,t){var i=SECTIONS_MODEL[t];return!i.password&&i.visible?e.concat(i.media):e},[])}function m(e,t){var i=le.search;if(le=u(e),i&&le.search&&i!==le.search&&(re=!0),e=e.replace(/^\/|\/$/g,"").replace(le.originalQuery,"").split("/"),ne=y(e),delete ee.isIntroGallery,ee=p(e),le.lightbox)$.service.getLightboxMedia(le.lightbox).then(function(e){STATE.cacheLightboxSection(),ee.media=e.media,ee.mediaItems=e.media,"function"==typeof t&&t()}).catch(function(e){"function"==typeof t&&t()}),ie=b(e)?b(e):0,ie=ee&&ee.key&&d(ee.key,ie)&&!c(e,ie)?0:ie,ie=0!==ie?ie-1:ie,!b(e)&&isThumbsFirst(ee)&&(ie=-1,F("thumbs"));else{if(le.search&&!ee.isSearch)le={};else if(le.search&&ee.isSearch){var n=le.search,o=le.sort&&le.sort.split("-")||["date","asc"],a=o[0],r=o[1],l=T(),s=E(),h=Object.keys(MEDIA_MODEL).filter(function(e){var t=l.indexOf(Number(e));return t===-1||t>-1&&s.indexOf(Number(e))>-1}).map(function(e){var t=MEDIA_MODEL[e];return t.keywords=t.keywords||[],Date.parse(t.dateAdded)?t.dateAdded=new Date(t.dateAdded).toISOString():t.dateAdded=(new Date).toISOString(),t}).filter(function(e){var t=(SETTINGS_MODEL.searchCaptions||SETTINGS_MODEL.searchLabels||e.keywords.length)&&/image|video/.test(e.type);return(SETTINGS_MODEL.globalMediaSearch&&e.searchable!==!1||!SETTINGS_MODEL.globalMediaSearch&&e.searchable)&&t}).filter(function(e){var t=n.split(",").map(function(e){return"\\b"+e.replace(/\s+/g,".*")}).join("|"),i=new RegExp(t,"gi"),o=SETTINGS_MODEL.searchCaptions&&i.test(e.caption),a=SETTINGS_MODEL.searchLabels&&i.test(e.label),r=e.keywords.reduce(function(e,t){return e?e:i.test(t)},!1);return r||o||a}).sort(function(e,t){var i="size"===a?e.size.bytes:e[a],n="size"===a?t.size.bytes:t[a];return i>n?1:i0)for(var n=0;n1&&F("thumbs")}function C(){if(USER_AGENT!==MOBILE&&ee&&(ie>-1||ee.isSearch)){var e=getMediaById(ee.mediaItems[ie]);e||(e={overrides:{}});var t=firstValid(e.overrides.captionDefault,STATE.overrides.captionDefault);USER_AGENT===MOBILE&&(t=!1),"caption"===q?F("caption"):""===q?G("caption"):t?F("caption"):G("caption"),B()}}function A(e){var t=f(e.split("/"));return t?addDashes(e).replace(addDashes(t),""):e}function b(e){var t=I(e.join("/")),i=A(t),n=i.split("/")[1];return!isNaN(n)&&Number(n)}function y(e){var t=/thumbs|^share$|^inquiry$|caption|^fotomoto$/;return t.test(e[3])?e[3]:t.test(e[2])?e[2]:t.test(e[1])?e[1]:""}function M(e){return"mailTo:"+e.replace("mailto:","").replace("mailTo:","")}function w(e){var t=/[-0-9a-zA-Z.+_]+@[-0-9a-zA-Z.+_]+\.[a-zA-Z]{2,4}/g.test(e.path);return!!t&&function(){window.location.href=M(e.path)}}function _(e){return("[one]"===e.label||"[like]"===e.label)&&function(){$.events.dispatchEvent(POP_UP,e)}}function D(e){return"_blank"===e.linkTarget&&function(){window.open(e.path)}}function U(e){return!P(e)&&"_self"===e.linkTarget&&"external"===e.type&&function(){window.location.href=e.path}}function x(){var e=I(te),t=e,i=le.originalQuery;if(ee&&!V(te)){var n=R(t);if(n){t=n&&n.key||"",t="/"+t+"/";var o=b(e.split("/"));o&&ie>-1&&(ie=o-1),ie>-1&&(t+=Number(ie)+1+"/"),ne.length>0&&(t+=ne+"/")}else t="/"}return n&&"landingMedia"===n.key&&(t="/"),i?t+i:t}function V(e){return/^(ht|f)tp(s?):\/\//.test(e)}function I(e){var t=window.location.protocol+"//"+window.location.host;return"string"==typeof e?e.replace(t,"").replace(/^\/|\/$/g,""):""}function P(e){return!!e.path&&(L(e.path.split("/"))?(e.section=L(e.path.split("/")),e.type="internal",!0):(e.path=I(e.path),e.section=R(e.path),e.type="internal",!0))}function Y(e){e.section&&!isSlideshowGallery(e.section)&&(!e.isThumbClick&&isIndexSection(e.section)?F("thumbs"):"none"===STATE.overrides.thumbnailType?G("thumbs"):(e.section.isSearch||e.section.mediaItems.length>1)&&STATE.overrides.thumbnailDefaultOn&&!e.isThumbClick?F("thumbs"):e.section.mediaItems.length>1&&e.isThumbClick&&"strip"===STATE.overrides.thumbnailType&&STATE.overrides.thumbnailDefaultOn&&"displace"===STATE.overrides.thumbnailDock&&F("thumbs"),e.nothumbs&&G("thumbs"),!e.isThumbClick&&isThumbsFirst(e.section)&&0===ie&&hasMode("thumbs",ne)&&(ie=-1))}function R(e){var t,i=e.split("/"),n=i[0];return i[0]&&i[1]&&(t=i[0]+"/"+i[1]),t?p(t.split("/")):!!n&&p(n.split("/"))}function N(e,t){action=_(e)||w(e)||D(e)||U(e)||z(e,t),action()}function z(e,t){return e.section?(STATE.section(e.section),ee=e.section,ee.isSearch||(le={}),re=e.searchSubmit):e.section||e.path||(m(""),STATE.section(ee)),te=e.path,ie=e.section&&isBlogFeed(e.section.id)?firstValid(e.assetId,e.section.mediaItems.length-1):e.assetId||0,ne=e.mode,Q=!!e.isMobileVideoClick,t||Y(e),C(),G("inquiry"),G("share"),function(){var i;e.section&&e.section.isSearch&&e.searchTerm?(le={},i=x()+"?search="+e.searchTerm,e.section.sortBy&&(i+="&sort="+(e.section.sortBy||"date-asc"))):e.section&&e.section.isLightbox&&STATE.lightboxHash?i=x()+"?lightbox="+STATE.lightboxHash:(le=u(te),re=e.section&&e.section.isSearch&&le.search,i=x()),Address.setValue(i,t,!t)}}function k(e){j(e),B(),Address.setValue(x())}function B(){hasMode("thumbs",ne)&&/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)&&G("caption")}function H(e){var t=removeLinksFromMedia(ee.mediaItems).length-1;isBlogFeed(ee.id)&&(ie=inverseAssetId(ie,t)),isBlogFeed(ee.id)?"next"===e.navDir?ie=ie>0?ie-1:0:"prev"===e.navDir&&(ie=ie0?ie-1:0:"next"===e.navDir&&(ie=USER_AGENT===MOBILE||USER_AGENT===TABLET?ie-1&&(a.footerView.updateStyle(e),a.footerView.updatePosition(e)))}function n(){USER_AGENT===MOBILE&&a.footerView.hide()}function o(){a.footerView.show()}var a=new ControllerProxy({parentView:e.parentView,parentController:e.parentController,events:e.siteControllerEvents});return a.updateSpeed=0,a.footerView=new e.FooterView(e),a.footerView.alpha=0,a.parentView.addChild(a.footerView),a.events.addEventListener(LAYOUT_MODEL_CHANGE,i),a.events.addEventListener(MEDIA_MODEL_CHANGE,i),a.events.addEventListener(SETTINGS_MODEL_CHANGE,i),a.events.addEventListener(RESIZE_END,a.footerView.updatePosition),a.events.addEventListener(MENU_DOCK_CLOSE,n),a.events.addEventListener(MENU_DOCK_OPEN,o),a.events.addEventListener(SITE_URI_CHANGE,function(){a.footerView.updateSpeed=0,a.footerView.updatePosition()}),a.events.addEventListener("UPDATE_CONTENT_HEIGHT",function(){a.footerView.updateSpeed=0,a.footerView.updatePosition()}),a.events.addEventListener("mediaOverlayClose",function(){a.footerView.updateSpeed=0,a.footerView.updatePosition()}),a.footerView.addEventListener(FOOTER_CLICK,t),a}function FooterView(e){function t(){return STATE.siteView.unifiedPageScroll()&&!LAYOUT_MODEL.copyrightPositionFixed&&STATE.footerView.zIndex>STATE.introView.zIndex?2e3:0}function i(){v=""!==STATE.copyright?[STATE.copyright].concat(csvToArray(STATE.socialLinks)):csvToArray(STATE.socialLinks);var e=0,t=v.length,i=USER_AGENT===MOBILE?"y":"x";for(p=new m("x"),g=new m(i),L.addChild(g),L.addChild(p);e0&&E()}function n(e){return/src=/.test(e.label)}function o(e){e=e.replace(/\[|\]|\s+/g,"");var t="",i=20,n=20;if(e.indexOf(",")>-1){var o=e.split(",");t=o[0].split("=")[1];var a=o[1].split("x");i=Number(a[0].split("=")[1]),n=Number(a[1])}else t=e.split("=")[1];return{path:t,width:i,height:n}}function a(e){var t=o(e.label),i=new Bitmap;return i.src=SETTINGS_MODEL.cdnSslUri+"/"+t.path,i.width=t.width,i.height=t.height,i.element.style.cursor="pointer",i.customLabel=e.label.toLowerCase(),i}function r(t,i,n){var o=socialIcons[t.label.toLowerCase()],a=new e.Bitmap;return a.src=ICONS+o.filename,a.width=o.width,a.height=o.height,a.element.style.cursor="pointer",a.addEventListener(LOAD,d),a}function l(e){switch(LAYOUT_MODEL.footerIconShape){
case"standard":return e.svgStdPath;case"rectangle":return e.svgRectPath;case"circle":return e.svgCircPath}}function s(e){var t=socialIcons[e.label.toLowerCase()],i=new Svg,n=new Svg({type:"g"}),o=new Path,a=USER_AGENT===TABLET||USER_AGENT===MOBILE?1:LAYOUT_MODEL.footerIconScale;if(n.scale=a,/circle|rectangle/.test(LAYOUT_MODEL.footerIconShape)){var r=new Rect;r.rx="circle"===LAYOUT_MODEL.footerIconShape?t.bgCircRadius:t.bgRectRadius,r.width=t.width,r.height=t.height,r.fill=LAYOUT_MODEL.footerIconColor,n.addChild(r)}return o.d=l(t),o.fill="standard"===LAYOUT_MODEL.footerIconShape?LAYOUT_MODEL.footerIconColor:LAYOUT_MODEL.footerIconBgColor,o.fillRule="evenodd",n.addChild(o),i.addChild(n),i.width=t.width*a,i.height=t.height*a,i.element.style.cursor="pointer",i.socialLabel=e.label.toLowerCase(),i}function d(e){E(),L.updatePosition()}function c(e){var t=getMediaById(e);return e&&t&&t.label&&socialIcons[t.label.toLowerCase()]&&!isNaN(e)}function h(t){var i=document.createElement("span"),n=getFontData(LAYOUT_MODEL.copyrightFont);i.style.position="absolute",i.style.display="block",USER_AGENT===MOBILE&&(i.style.width=stage.width-12+"px"),i.style.fontFamily=n.family,i.style.textTransform=LAYOUT_MODEL.copyrightTextTransform||"none",i.style.fontWeight=n.weight,i.style.fontSize=LAYOUT_MODEL.copyrightFontSize.toString().replace("px","")+"px",i.style.letterSpacing=LAYOUT_MODEL.footerKerning+"px",i.innerHTML=t,i.whiteSpace=USER_AGENT===MOBILE?"normal":"nowrap",document.body.appendChild(i);var o=new e.Sprite;return o.fontFamily=LAYOUT_MODEL.copyrightFont,o.textTransform=LAYOUT_MODEL.copyrightTextTransform||"none",o.fontSize=LAYOUT_MODEL.copyrightFontSize.toString().replace("px","")+"px",o.fontColor=LAYOUT_MODEL.copyrightColor,o.letterSpacing=LAYOUT_MODEL.footerKerning,o.text=t,o.width=i.offsetWidth,o.height=i.offsetHeight,o.textWrap=USER_AGENT===MOBILE,document.body.removeChild(i),i=null,o}function u(e){this.btn.txt?Tween(this.btn.txt,UPDATE_SPEED,{fontColor:toRgba(LAYOUT_MODEL.copyrightColor,.5)}):Tween(this.btn,UPDATE_SPEED,{alpha:.5})}function T(e){this.btn.txt?Tween(this.btn.txt,UPDATE_SPEED,{fontColor:toRgba(LAYOUT_MODEL.copyrightColor,1)}):Tween(this.btn,UPDATE_SPEED,{alpha:1})}function E(){var e,t=L.children,i=t.length;for(g.layoutContent(),p.layoutContent(),f=new Tile,f.gap=0,f.axis=USER_AGENT===MOBILE?"y":"x",f.align="left",f.wrap=!1,"x"===f.axis?f.perpLength=stage.height:f.perpLength=stage.width,e=0;e-1||(this.txt?Tween(this.txt,UPDATE_SPEED,{ease:"ease-out",fontColor:toRgba(LAYOUT_MODEL.logoFontColor,.5)}):Tween(this,UPDATE_SPEED,{ease:"ease-out",alpha:.5}))}function n(e){this.txt&&this.txt.text.indexOf("-1||(this.txt?Tween(this.txt,UPDATE_SPEED,{fontColor:toRgba(LAYOUT_MODEL.logoFontColor,1)}):Tween(this,UPDATE_SPEED,{alpha:1}))}function o(){USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&r()}function a(){l()}function r(){d.logoView.style.pointerEvents="none",Tween(d.logoView,UPDATE_SPEED,{alpha:0,display:"none"})}function l(){d.logoView.updatePosition(),d.logoView.display="block",Tween.defer(d.logoView,UPDATE_SPEED,{alpha:1,onComplete:function(){d.logoView.style.pointerEvents="auto"}})}function s(e){if(this.txt&&this.txt.text.indexOf("-1);else{var t={type:"internal",path:"",target:"_self"};if(d.events.dispatchEvent(LOGO_CLICK,t),LAYOUT_MODEL.globalSmoothScroll){Anim.to(window,UPDATE_SPEED,{scrollY:0,ease:TOUCH_DEVICE?"outQuart":"inOutCubic"})}}}var d=new ControllerProxy({parentView:e.parentView,parentController:e.parentController,events:e.siteControllerEvents});return d.updateSpeed=0,d.logoView=new e.LogoView({parentView:d.parentView,parentController:d,events:e.siteControllerEvents}),d.logoView.alpha=0,d.events.addEventListener("LOGO_CHILD_ADDED",l),USER_AGENT===MOBILE?/thumbs|site/.test(LAYOUT_MODEL.mobileLogoPlacement)?d.parentView.addChild(d.logoView):e.menuController.menuView.mask.addChild(d.logoView):"menu"===LAYOUT_MODEL.logoPlacement?e.menuController.menuView.addChild(d.logoView):d.parentView.addChild(d.logoView),d.events.addEventListener(SETTINGS_MODEL_CHANGE,function(e){/intro|logo/i.test(e.id)&&(d.logoView.updateStyle(e),d.logoView.updatePosition(e))}),d.events.addEventListener(LAYOUT_MODEL_CHANGE,t),d.events.addEventListener(RESIZE_END,d.logoView.updatePosition),d.events.addEventListener(SITE_URI_CHANGE,d.logoView.updatePosition),d.events.addEventListener(MENU_DOCK_CLOSE,o),d.events.addEventListener(MENU_DOCK_OPEN,a),d.logoView.addEventListener(CLICK,s),USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&(d.logoView.addEventListener(MOUSE_OVER,i),d.logoView.addEventListener(MOUSE_OUT,n)),d.show=l,d.hide=r,d}function LogoView(e){function t(){USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&(m.position=LAYOUT_MODEL.logoPositionFixed?"fixed":"absolute")}function i(e){var t=void 0===SETTINGS_MODEL.disableRightClick||SETTINGS_MODEL.disableRightClick;t&&e.preventDefault()}function n(e){m.events.dispatchEvent("OVER_LOGO")}function o(){return isPod()?firstValid(LAYOUT_MODEL.mobileLogoFontSize,LAYOUT_MODEL.logoFontSize):isPad()?firstValid(LAYOUT_MODEL.tabletLogoFontSize,LAYOUT_MODEL.logoFontSize):LAYOUT_MODEL.logoFontSize}function a(){return isPod()?firstValid(LAYOUT_MODEL.mobileLogoFontColor,LAYOUT_MODEL.logoFontColor):isPad()?firstValid(LAYOUT_MODEL.tabletLogoFontColor,LAYOUT_MODEL.logoFontColor):LAYOUT_MODEL.logoFontColor}function r(){return isPod()?firstValid(LAYOUT_MODEL.mobileLogoFont,LAYOUT_MODEL.logoFont):isPad()?firstValid(LAYOUT_MODEL.tabletLogoFont,LAYOUT_MODEL.logoFont):LAYOUT_MODEL.logoFont}function l(){return isPod()?firstValid(LAYOUT_MODEL.mobileLogoKerning,LAYOUT_MODEL.logoKerning):isPad()?firstValid(LAYOUT_MODEL.tabletLogoKerning,LAYOUT_MODEL.logoKerning):LAYOUT_MODEL.logoKerning}function s(e,t){var i=document.createElement("img");i.addEventListener("load",function(e){var n=i.offsetWidth,o=i.offsetHeight;document.body.removeChild(i),t({width:n,height:o})}),i.style.opacity=0,document.body.appendChild(i),i.src=e}function d(){E=!0,setTimeout(function(){m.updatePosition(),m.events.dispatchEvent(LOGO_LOADED),Tween.defer(m.img,UPDATE_SPEED,{alpha:1}),m.events.dispatchEvent("LOGO_LOADED")},10),m.img.element.removeEventListener(LOAD,d)}var c,h,u,T,E,m=new ViewProxy({events:e.events});return USER_AGENT===MOBILE?m.textWrap=!0:m.textWrap=!1,m.zIndex=STATE.overrides.logoViewZIndex,t(),m.updateSpeed=0,m.style.pointerEvents="none",m.element.addEventListener("contextmenu",i),m.element.addEventListener("dragstart",i),m.element.setAttribute("data-identity","logo"),m.addEventListener(CHILD_ADDED,function(e){m.updatePosition(),setTimeout(function(){m.updatePosition(),m.updateSpeed=UPDATE_SPEED,m.events.dispatchEvent("LOGO_CHILD_ADDED")},500)}),m.addEventListener(MOUSE_OVER,n),m.updatePosition=function(e){if(m.zIndex=STATE.overrides.logoViewZIndex,t(),m.transition=0,m.txt)USER_AGENT!==MOBILE||/site|thumbs/.test(LAYOUT_MODEL.mobileLogoPlacement)?isPod()?(m.txt.element.style.whiteSpace="nowrap",m.width=m.txt.element.offsetWidth):m.width=m.txt.element.offsetWidth:(m.txt.width=stage.width,m.width=stage.width),m.height=m.txt.element.offsetHeight;else if(m.img&&E&&(!e||!e.action||"changeTemplate"!==e.action))if(USER_AGENT===MOBILE&&(LAYOUT_MODEL.mobileLogoWidth||LAYOUT_MODEL.mobileLogoHeight)||LAYOUT_MODEL.logoWidth||LAYOUT_MODEL.logoHeight){var i=percentToPixels(LAYOUT_MODEL.logoWidth,stage.width)||2e3,n=percentToPixels(LAYOUT_MODEL.logoHeight,stage.height)||2e3;USER_AGENT===MOBILE&&(i=percentToPixels(LAYOUT_MODEL.mobileLogoWidth,stage.width)||i,n=percentToPixels(LAYOUT_MODEL.mobileLogoHeight,stage.height)||n,i=(percentToPixels(LAYOUT_MODEL.mobileLogoWidth,stage.width)||percentToPixels(LAYOUT_MODEL.logoWidth,stage.width)||2e3)>stage.width-2*percentToPixels(LAYOUT_MODEL.mobileLogoOffsetX,stage.width)?stage.width-2*percentToPixels(LAYOUT_MODEL.mobileLogoOffsetX,stage.width):i,n=percentToPixels(LAYOUT_MODEL.mobileLogoHeight,stage.height)||percentToPixels(LAYOUT_MODEL.logoHeight,stage.height)||2e3);var o={type:"fit",hRange:i,vRange:n,width:u,height:T,disableOrientationCheck:!0},a=ScaleEngine(o);m.img.width=a.width,m.img.height=a.height,m.width=a.width,m.height=a.height}else if(!e||!e.action||"changeTemplate"!==e.action){var r={width:u,height:T,filename:c},l=RetinaResizeEngine(r),i=l.width;USER_AGENT===MOBILE&&(i=l.width>stage.width-2*percentToPixels(LAYOUT_MODEL.mobileLogoOffsetX,stage.width)?stage.width-2*percentToPixels(LAYOUT_MODEL.mobileLogoOffsetX,stage.width):i);var a=ScaleEngine({type:"fit",hRange:i,vRange:l.height,width:u,height:T,disableOrientationCheck:!0});m.img.width=a.width,m.img.height=a.height,m.width=a.width,m.height=a.height}USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&(m.element.style.transform="rotate("+(LAYOUT_MODEL.logoRotation||0)+"deg)"),Tween.defer(m,0,{x:layoutCalcs.logoView.x(m.width),y:layoutCalcs.logoView.y(m.height)})},m.updateStyle=function(t){if(t&&t.id&&/logo|layoutModelInit/i.test(t.id)){var i="",n="",g="",p="normal";if(isPod()?(i=SETTINGS_MODEL.mobileLogoFile||LAYOUT_MODEL.mobileLogoFile||"",n=SETTINGS_MODEL.mobileLogoText||LAYOUT_MODEL.mobileLogoText||"",g=SETTINGS_MODEL.mobileLogoHtml||LAYOUT_MODEL.mobileLogoHtml||"",p=firstValid(LAYOUT_MODEL.mobileLogoBlendMode,LAYOUT_MODEL.logoBlendMode,"normal"),i||n||g||(i=STATE.logoFile||LAYOUT_MODEL.logoFile||"",n=STATE.logoText||LAYOUT_MODEL.logoText||"",g=STATE.logoHtml||LAYOUT_MODEL.logoHtml||"")):isPad()?(i=SETTINGS_MODEL.tabletLogoFile||LAYOUT_MODEL.tabletLogoFile||"",n=SETTINGS_MODEL.tabletLogoText||LAYOUT_MODEL.tabletLogoText||"",g=SETTINGS_MODEL.tabletLogoHtml||LAYOUT_MODEL.tabletLogoHtml||"",p=firstValid(LAYOUT_MODEL.tabletLogoBlendMode,LAYOUT_MODEL.logoBlendMode,"normal"),i||n||g||(i=STATE.logoFile||LAYOUT_MODEL.logoFile||"",n=STATE.logoText||LAYOUT_MODEL.logoText||"",g=STATE.logoHtml||LAYOUT_MODEL.logoHtml||"")):(i=STATE.logoFile||LAYOUT_MODEL.logoFile||"",n=STATE.logoText||LAYOUT_MODEL.logoText||"",g=STATE.logoHtml||LAYOUT_MODEL.logoHtml||"",p=firstValid(LAYOUT_MODEL.logoBlendMode,"normal")),m.element.style["mix-blend-mode"]=p,c=i.indexOf("dxlogo1__at__2x.png")>-1||i.indexOf("dxlogo2__at__2x.png")>-1?CDN_PF_SSL_URI+"/media/"+i:""!==i?SETTINGS_MODEL.cdnSslUri+"/"+i:void 0,m.txt&&(m.removeChild(m.txt),m.txt=void 0),c&&c!==h)m.img&&(m.removeChild(m.img),m.img=void 0),m.img=new Bitmap,m.img.element.style["user-select"]="none",m.img.element.setAttribute("data-identity","logo"),m.img.alpha=0,m.img.element.setAttribute("class","logoImage"),s(c,function(e){u=e.width,T=e.height,h=c,m.img.element.src=c}),m.img.element.addEventListener("load",d),m.addChild(m.img),m.img.element.style.cursor="pointer";else if(!c){m.img&&(m.removeChild(m.img),m.img=void 0),c=void 0,h=void 0,E=!1,m.txt=new Sprite,m.txt.text=g.replace(/(\\*'|\\*")/g,"'")||n.replace(/(\\*'|\\*")/g,"'"),m.txt.element.setAttribute("class","logoText"),m.txt.element.style["user-select"]="none",m.addChild(m.txt),m.txt.element.style.cursor="pointer",USER_AGENT===MOBILE&&(m.txt.textAlign=LAYOUT_MODEL.mobileLogoAlignHorizontal||"left");var L=o(),f=a(),v=r(),S=l();L!==m.txt.fontSize&&(m.txt.fontSize=L),f!==m.txt.fontColor&&Tween(m.txt,e.parentController.updateSpeed,{fontColor:f}),v!==m.txt.fontFamily&&(m.txt.fontFamily=v),S!==m.txt.letterSpacing&&(m.txt.letterSpacing=S),LAYOUT_MODEL.logoTextTransform&&LAYOUT_MODEL.logoTextTransform!==m.txt.textTransform&&(m.txt.textTransform=LAYOUT_MODEL.logoTextTransform)}}},m}function SectionController(e){function t(){}function i(){M&&a(),M!==!1&&(M=void 0)}function n(){void 0===M&&(M=!0),M&&a()}function o(e){V||t(e),clearTimeout(V),n(e),V=setTimeout(function(){i(e),V=null},300)}function a(){O&&"multiple"===layoutCalcs.sectionDisplayMode&&Object.keys(O).map(function(e){return O[e]}).forEach(function(e){var t=e.view.y;window.scrollY+.5*window.innerHeight>=t&&window.scrollY+.5*window.innerHeight<=t+e.view.height&&(e.controller.checkCaption(),STATE.section(e.controller.section),D.dispatchEvent("cursorAxisUpdate",getCursorAxis(STATE.overrides.transitionType)),D.dispatchEvent("updateSectionPassive",{section:e.controller.section,assetId:e.controller.getCurrentAssetId(),mode:e.controller.getCurrentMode()}))})}function r(e){return STATE.section(e),!isSlideshowGallery(e)&&STATE.overrides.thumbnailDefaultOn&&/fill|paginated|vMasonry|hMasonry/i.test(STATE.overrides.thumbnailType)&&1===LAYOUT_MODEL.overlayAlpha||isIndexSection(e)}function l(e){return isSlideshowGallery(e)?"":r(e)?"thumbs":s(e)&&d(e)?"thumbs-caption":s(e)?"thumbs":d(e)?"caption":""}function s(e){return STATE.section(e),!isSlideshowGallery(e)&&"none"!==STATE.overrides.thumbnailType&&(STATE.overrides.thumbnailDefaultOn||isIndexSection(e))&&e&&e.media&&e.media.length>1}function d(e){STATE.section(e);var t=getMediaById(e.mediaItems[0]);return t||(t={overrides:{}}),USER_AGENT!==MOBILE&&firstValid(t.overrides.captionDefault,STATE.overrides.captionDefault)}function c(e){var t=new Sprite,i=new Svg,n=new Svg({type:"g"}),o=new Path,a=100*e.scale;t.zIndex=5,t.width=a,t.height=a,t.element.style["mix-blend-mode"]=e.blendMode,t.alpha=0,t.addEventListener("click",function(){var e=O[1];if(e){var t=e.view.y-STATE.mediaView.y(e.controller.section.key);Anim.to(window,.35,{scrollY:t,ease:TOUCH_DEVICE?"outQuart":"inOutCubic"})}});var r;return t.updatePosition=function(i){clearTimeout(r),r=setTimeout(function(i){t.y=i-a-e.offsetY,t.x=.5*(stage.width-a),Tween(t,UPDATE_SPEED,{alpha:1})},50,i)},i.position="absolute",i.width=a,i.height=a,t.element.style.transformOrigin="center",n.scale=e.scale,o.d=e.path,o.fill="none",o.stroke=e.color,o.strokeWidth=e.strokeWidth,i.addChild(n),n.addChild(o),t.addChild(i),t}function h(e){return STATE.section(e),!e.hideFromUnifiedSite&&"%SPACER%"!==e.label&&e.visible&&(!!isIndexSection(e)||e.mediaItems.length)&&(!e.password.length||STATE.getPassedSection(e.id))&&(!/none|overlay|unifiedPageScrolling/.test(e.displayBehavior)||/overlay/.test(e.displayBehavior)&&STATE.overrides.siteDisplayGalleryOnlyOverlay&&r(e))&&(!u(e)||e.isIndex)}function u(e){var t=getMediaById(e.media[0]);return!!t&&("link"===t.type&&!e.mediaItems.length)}function T(e){function t(){layoutCalcs.sectionDisplayMode="multiple";var t=p.media.map(getSectionById).filter(h);if("ROOT_SECTION"===p.label&&STATE.backgroundImages.length){var i=STATE.backgroundImages.filter(function(e){return!!MEDIA_MODEL[e]}),n={id:LANDING_MEDIA,key:"/",label:LANDING_MEDIA,visible:1,password:"",media:i,mediaItems:i,overrides:{captionDefault:LAYOUT_MODEL.slideshowCaptions}};t=[n].concat(t)}var o=t[0];t[1];("ROOT_SECTION"===p.label&&LAYOUT_MODEL.slideshowScrollDownIcon&&isSlideshowGallery(o)||p.scrollDownIcon||o&&o.scrollDownIcon)&&(m=c({path:svgPaths.arrow3Down,color:LAYOUT_MODEL.scrollDownIconColor||"#F2F2F2",strokeWidth:LAYOUT_MODEL.scrollDownIconStrokeWidth||1,scale:LAYOUT_MODEL.scrollDownIconScale||1,offsetY:LAYOUT_MODEL.scrollDownIconOffsetY||0,blendMode:LAYOUT_MODEL.scrollDownIconBlendMode||"normal"}),_.addChild(m)),O=t.reduce(function(i,n,o){STATE.section(n);var a=e.section===n?e:{section:n,mediaToRender:removeLinksFromMedia(n.mediaItems),path:n.key,assetId:r(n)?-1:0,asset:getMediaById(n.mediaItems[0]),mode:l(n),info:{isSectionChange:!0,isAssetChange:!0,isModeChange:!1,isLandingMedia:isSlideshowGallery(n),mediaViewState:isSlideshowGallery(n)?"landingMedia":"mediaView",isDeepLink:!1,isMediaViewStateChange:!0,isIntroGallery:n.isIntroGallery,flickSpeed:.35,lastUri:"/",isThumbsFirst:r(n),isMobileVideoClick:!1,isBlog:isBlogFeed(n.id)}};layoutCalcs.updateSectionState(n.key,{assetId:a.assetId,mode:a.mode});var s=new U(D,_,null,{position:o,length:t.length});return s.controller.mediaView.element.id=n&&n.key||"section:"+o,layoutCalcs._uriState=a,s.controller.build(a),i.concat(s)},[]),window.addEventListener("scroll",E)}function i(e){function t(){var t=0,i=getMarginOverlap()||0,n=O[0].controller.section;STATE.section(n);var o=percentToPixels(LAYOUT_MODEL.sitePaddingTop,stage.height),a=o;if(isFillSiteSlideshow(n))a=0;else if(/top/.test(STATE.menuView.placement())&&!LAYOUT_MODEL.isMenuScrollReveal){var r=percentToPixels(LAYOUT_MODEL.menuWidth,stage.height)-percentToPixels(LAYOUT_MODEL.menuOffsetX,stage.height);a=o+r-i}var l=a||0,s=0;O.forEach(function(e,i,n){STATE.section(e.controller.section);var o=n[i-1],a=o?o.view.y+(o.view.height||0):l,r=e.controller.getTotalHeight();s+=e.controller.section.media.length;e.controller.section;t+=r||0,e.view.transition=0,e.view.x=0,e.view.y=a,e.view.width=stage.width,e.view.height=r,e.view.mask.x=STATE.mediaView.x(),e.view.container.y=0,e.view.mask.transition=0,e.view.mask.width=STATE.mediaView.width(),e.view.mask.height=r}),layoutCalcs.mediaModules=O,layoutCalcs.mediaViewsHeight=t,_.totalHeight=t,_.height=STATE.siteView.height(),m&&m.updatePosition(O[0].view.height),d(A,e)}t(),clearTimeout(L),L=setTimeout(t,500)}function n(){}function o(){T(),t()}function a(e){STATE.section(e.controller.section);var t=e.view.y-STATE.mediaView.y(e.controller.section.key);e===O[0]&&(t=0),window.scrollTo(0,t)}function s(e){STATE.section(e.controller.section);var t=e.view.y-STATE.mediaView.y(e.controller.section.key);e===O[0]&&(t=0),Anim.to(window,.35,{scrollY:t,ease:TOUCH_DEVICE?"outQuart":"inOutCubic"})}function d(e,t){if(g){var i=O.filter(function(t){return e.path===t.controller.section.key})[0];i||(i=O[0]),e.info.isParentSectionChange||t?a(i):e.info.isSectionChange?s(i):e.info.isModeChange&&s(i),t&&!e.info.isParentSectionChange||i.controller.navigate(e),g=!1}}function u(e,t){g=!0;var n=O.filter(function(t){return e.path===t.controller.section.key})[0];n||(n=O[0]);var o=n.controller.state.mode!==e.mode;t&&!e.info.isParentSectionChange||n.controller.navigate(e),o&&i(t),D.dispatchEvent("cursorAxisUpdate",n.controller.cursorAxis)}function T(){O.forEach(function(e){e.controller.destroy()}),window.removeEventListener("scroll",E),m&&_.removeChild(m)}function E(){clearTimeout(f),f=setTimeout(function(){O.forEach(function(e){e.view.lazyLoader&&e.view.lazyLoader.update(),e.controller.overlayController&&e.controller.overlayController.lazyLoaderUpdate()})},10)}var m,g,p=e.parentSection;t();var L,f;return{type:"unified",layout:i,uriChange:u,modelChange:o,scrollTo:d,transition:n,destroy:T}}function E(){function e(e){clearTimeout(a),a=setTimeout(function(){var t=r.getTotalHeight();STATE.section(l.section),Tween(l,0,{x:STATE.mediaView.x(),y:STATE.mediaView.y(l.section.key),width:STATE.mediaView.width(),height:t});var i="none"===STATE.overrides.siteDisplayBehavior&&/vScroll/.test(STATE.overrides.transitionType)?STATE.mediaView.zoneHeight():l.container.boundsHeight;l.container.height=i,Tween(l.mask,0,{width:STATE.mediaView.width(),height:i}),layoutCalcs._mediaContentHeight=t,l.lazyLoader&&l.lazyLoader.update(),"function"==typeof e&&setTimeout(e,500)},20)}function t(){}function i(e,t,i){t||r.navigate(e,i)}function n(){Tween(l.container,UPDATE_SPEED,{backgroundColor:STATE.mediaView.backgroundColor()}),e(),r.destroyStaticNav(),r.createStaticNav()}layoutCalcs.sectionDisplayMode="single";var o=new U(D,_);C=o;var a,r=o.controller,l=o.view;return{type:"legacy",module:o,layout:e,uriChange:i,modelChange:n,transition:t,destroy:function(){o.controller.destroy()}}}function m(){function e(){var e=r.getTotalHeight();STATE.section(l.section),l.x=0,l.y=0,l.width=stage.width,l.height=stage.height,l.mask.width=STATE.mediaView.width(),l.mask.height=STATE.mediaView.contentHeight(),layoutCalcs._mediaContentHeight=e,l.lazyLoader&&l.lazyLoader.update()}function t(){}function i(e){r.navigate(e)}function n(){STATE.section(l.section),Tween(l.container,UPDATE_SPEED,{backgroundColor:STATE.mediaView.backgroundColor()}),e(),r.destroyStaticNav(),r.createStaticNav()}layoutCalcs.lastSectionDisplayMode=layoutCalcs.sectionDisplayMode,layoutCalcs.sectionDisplayMode=/unifiedSiteScroll/.test(STATE.overrides.siteDisplayBehavior)?"multiple":"single";var o=!0,a=new U(D,_,o);C=a;var r=a.controller,l=a.view;return{type:"overlay",module:a,layout:e,uriChange:i,modelChange:n,transition:t,destroy:function(){a.controller.destroy()}}}function g(e,t){D.removeEventListener(RESIZE_END,function(){t?P(e.layout):I(e.layout)}),D.removeEventListener("UPDATE_CONTENT_HEIGHT",function(){t?P(e.layout):I(e.layout)}),D.removeEventListener(LAYOUT_MODEL_CHANGE,e.modelChange),D.removeEventListener(SECTIONS_MODEL_CHANGE,e.modelChange),D.removeEventListener(SETTINGS_MODEL_CHANGE,function(t){/backgroundimages|template|staging/.test(t.id)&&e.modelChange()}),D.removeEventListener("mediaOverlayClose",function(){x&&STATE.section(x.section),b?D.dispatchEvent("updateSectionPassive",{section:x.section,assetId:x.assetId,mode:x.mode}):D.dispatchEvent(ADDRESS_SECTION_CHANGE,{type:"internal",path:"",target:"_self"})})}function p(e,t){D.addEventListener(RESIZE_END,function(){t?P(e.layout):I(e.layout)}),D.addEventListener("UPDATE_CONTENT_HEIGHT",function(){t?P(e.layout):I(e.layout)}),D.addEventListener(LAYOUT_MODEL_CHANGE,e.modelChange),D.addEventListener(SECTIONS_MODEL_CHANGE,e.modelChange),D.addEventListener(SETTINGS_MODEL_CHANGE,function(t){/backgroundimages|template|staging/.test(t.id)&&e.modelChange()}),D.addEventListener("mediaOverlayClose",function(){x&&STATE.section(x.section),b?D.dispatchEvent("updateSectionPassive",{section:x.section,assetId:x.assetId,mode:x.mode}):D.dispatchEvent(ADDRESS_SECTION_CHANGE,{type:"internal",path:"",target:"_self"})})}function L(e){A=e;var t=!1;if(STATE.section(e.section),/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior))y&&y.module.view.close(function(){y&&y.destroy(),y=null}),b?e.info.isParentSectionChange||b&&"legacy"===b.type||e.info.isPasswordSection||e.info.isSearchSubmit?(b&&(g(b),b.destroy()),b=T(e),p(b),t=!0,b.uriChange(e,t),b.layout(t)):e.info.isModeChange?(b.uriChange(e,t),b.layout(t)):(b.uriChange(e,t),b.scrollTo(e,t)):(b=T(e),p(b),t=!0,b.uriChange(e,t),b.layout(t));else if(!/overlay/.test(STATE.overrides.siteDisplayBehavior)||STATE.overrides.siteDisplayGalleryOnlyOverlay&&r(e.section)&&/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)&&/thumbs/.test(e.mode))if(y&&y.module.view.close(function(){y&&y.destroy(),y=null}),e.info.isSectionChange||!b||b&&"unified"===b.type){b&&(g(b),b.destroy()),b=E(),p(b),b.module.controller.build(e),t=!0;b.layout(function(){})}else e.info.isModeChange?(b.uriChange(e,t),b.layout()):b&&b.uriChange(e,t);else y&&(e.info.isSectionChange||e.section.id!==y.module.view.section.id)&&(g(y,!0),y.destroy(),y=null),y||(x=e.prevState,y=m(),p(y,!0),t=!0,y.module.controller.build(e)),y.uriChange(e,t),y.layout(),y.module.view.open(),w=layoutCalcs.sectionDisplayMode}function f(e,t){return e.key===t.section.key}function v(e){if(/unifiedSiteScroll/.test(STATE.overrides.siteDisplayBehavior))O&&Object.keys(O).map(function(e){return O[e]}).forEach(function(t){var i;if(f(t.controller.section,e)&&(STATE.section(t.controller.section),!/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)||!/thumbs/.test(e.mode))){var n=t.view.container.children[e.assetId];i=n?n.id:void 0}t.events.dispatchEvent("spacebarTogglePlay",i)});else if(C){if(STATE.section(C.controller.section),!/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)||!/thumbs/.test(e.mode))var t=C.view.container.children[e.assetId],i=t?t.id:void 0;C.events.dispatchEvent("spacebarTogglePlay",i)}}function S(e){if(/unifiedSiteScroll/.test(STATE.overrides.siteDisplayBehavior))O&&Object.keys(O).map(function(e){return O[e]}).forEach(function(t){var i;if(f(t.controller.section,e)&&(STATE.section(t.controller.section),(!/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)||!/thumbs/.test(e.mode))&&STATE.mediaView.videoAutoPlay())){var n=t.view.container.children[e.assetId];i=n?n.id:void 0}t.events.dispatchEvent("mediaAutoPlay",i)});else if(C){if(STATE.section(C.controller.section),(!/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)||!/thumbs/.test(e.mode))&&STATE.mediaView.videoAutoPlay())var t=C.view.container.children[e.assetId],i=t?t.id:void 0;C.events.dispatchEvent("mediaAutoPlay",i)}}var O,C,A,b,y,M,w,_=e.parentView,D=e.siteControllerEvents,U=e.MediaModule,x={};/unifiedSiteScroll/.test(STATE.overrides.siteDisplayBehavior)&&window.addEventListener("scroll",o);var V,I=createDebounce(50),P=createDebounce(50);D.addEventListener("autoplayTarget",S),D.addEventListener("spacebarPlay",v),D.addEventListener(SITE_URI_CHANGE,L),D.addEventListener(LAYOUT_MODEL_CHANGE,function(e){/siteDisplayBehavior|transitionType/.test(e.id)&&b&&(g(b),b.destroy(),STATE.section(A.section),"unifiedSiteScrollVertical"===STATE.overrides.siteDisplayBehavior?b=T(A):(b=E(),b.module.controller.build(A)),p(b),built=!0,b.layout())}),D.addEventListener(SECTIONS_MODEL_CHANGE,function(){b&&(g(b),b.destroy(),STATE.section(A.section),"unifiedSiteScrollVertical"===STATE.overrides.siteDisplayBehavior?b=T(A):(b=E(),b.module.controller.build(A)),p(b),built=!0,b.layout())})}function MediaNavigation(e){function t(e){1===y.assetId&&"right"===e.swipeDirection?w.touchNav&&(w.touchNav.disabled=!0):w.touchNav&&(w.touchNav.disabled=!1),e.isMove?n()&&"right"===e.swipeDirection?l():o()&&"left"===e.swipeDirection?l():"left"===e.swipeDirection||"right"===e.swipeDirection?(e.navDir="left"===e.swipeDirection?"next":"prev",C.dispatchEvent(ADDRESS_ASSET_CHANGE,e)):l():e.isMove&&/left|right/.test(e.swipeDirection)&&l()}function i(){v||r(),"mSlide"!==S||w.touchNav||a(),v(y.assetId),/scroll/i.test(S)||l()}function n(){return 0===y.assetId}function o(){return y.assetId===csvToArray(y.section.media).length-1}function a(){w.touchNav=new TouchNavMobile({events:C,mediaViewContainer:b}),w.touchNav.section=y.section&&y.section.key||"no section"}function r(){STATE.section(y.section),A.scroll&&(A.scroll.destroy(),A.scroll=null),S=STATE.overrides.transitionType;var t="fade"===S||"mSlide"===S?"fade":"default",i=A.container,n=A.mask;A.lazyLoader=new LazyLoader(i,n,{type:t,property:"translate"}),A.lazyLoader.name="mediaView",L&&"function"==typeof L.destroy&&L.destroy(),C.dispatchEvent("cursorAxisUpdate",getCursorAxis(S));var o=STATE.mediaView.transitionDuration();switch(S){case"fade":f=new FadeLayout({siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C}),L=new FadeTransition({transitionDuration:o,siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C});break;case"hSlide":f=new SlideLayoutHorizontal({siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C}),L=new SlideTransitionHorizontal({transitionDuration:o,mediaView:A,mediaViewContainer:b,localEvents:C});break;case"vSlide":f=new SlideLayoutVertical({siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C}),L=new SlideTransitionVertical({transitionDuration:o,siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C});break;case"hScroll":f=new ScrollLayoutHorizontal({siteView:e.siteView,mediaView:A,localEvents:C}),L=new ScrollTransitionHorizontal({transitionDuration:o,siteView:e.siteView,mediaView:A,localEvents:C});break;case"hScrollNC":f=new ScrollLayoutHorizontalNoCrop({siteView:e.siteView,mediaView:A,localEvents:C}),L=new ScrollTransitionHorizontalNoCrop({transitionDuration:o,siteView:e.siteView,mediaView:A,localEvents:C});break;case"vScroll":f=new ScrollLayoutVertical({siteView:e.siteView,mediaView:A,localEvents:C}),L=new ScrollTransitionVertical({transitionDuration:o,siteView:e.siteView,mediaView:A,localEvents:C});break;case"vScrollNC":f=new ScrollLayoutVerticalNoCrop({siteView:e.siteView,mediaView:A,localEvents:C}),L=new ScrollTransitionVerticalNoCrop({transitionDuration:o,siteView:e.siteView,mediaView:A,localEvents:C});break;case"grid":f=new GridLayout({siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C}),L=new GridTransition({transitionDuration:o,siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C});break;case"mSlide":f=new MobileSlideLayout({siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C}),L=new MobileSlideTransition({transitionDuration:o,siteView:e.siteView,mediaView:A,mediaViewContainer:b,localEvents:C});break;case"vScrollStatic":f=new StaticVLayout({siteView:e.siteView,mediaView:A,localEvents:C}),L=new StaticVTransition}v=function(){STATE.section(y.section),f(y.assetId)}}function l(){var e=isPod()||isPad()?0:.85;1===stage.zoom&&(y.mediaToRender&&y.mediaToRender.length>y.assetId&&L?y.assetId>-1&&L(y.assetId,e):L&&L(0,e))}function s(e){L(e,0)}function d(){1===stage.zoom&&isAppleMobile()&&!STATE.podUseDesktop&&window.scrollTo(1,0),v&&v(y.assetId),y.mediaToRender&&y.mediaToRender.length>0&&y.assetId>-1&&(L||r(),"mSlide"!==S||w.touchNav||a(),/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior)||s(y.assetId)),O=!1,A&&A.lazyLoader&&A.lazyLoader.update()}function c(e){O=!0}function h(e){u(e),g()}function u(){r(),"mSlide"!==S||w.touchNav||a(),v(y.assetId)}function T(e){"siteDisplayBehavior"===e.id&&r(),"mSlide"!==S||w.touchNav||a(),v&&v(y.assetId)}function E(e,t){return e.key===t.section.key}function m(e){clearTimeout(_),_=setTimeout(function(){M=e.id,y&&E(A.section,y)&&(y.assetId=e.id)},200)}function g(){b.transition=0,Math.abs(b.translateX)>0&&(b.translateX=0),Math.abs(b.translateY)>0&&(b.translateY=0),b.x=0,b.y=0;var e=STATE.mediaView.backgroundColor();Tween(b,UPDATE_SPEED,{backgroundColor:e})}function p(){L&&L.destroy&&L.destroy(),v=void 0,L=void 0,C.removeEventListener(LAYOUT_MODEL_CHANGE,T),C.removeEventListener(SECTIONS_MODEL_CHANGE,T),C.removeEventListener(LAYOUT_MODEL_CHANGE,T),C.removeEventListener(RESIZE,d),C.removeEventListener(ORIENTATION_CHANGE,c),C.removeEventListener("layoutMediaView",h),C.removeEventListener("mediaSizeUpdate",i),C.removeEventListener("MEDIA_HEIGHT_CHANGE",i),C.removeEventListener("assetReset",l),C.removeEventListener(TOUCH_NAVIGATION_END,t),C.removeEventListener("ScrollTransition/updateAssetId",m),
A.scroll&&A.scroll.destroy(),w.touchNav&&w.touchNav.destroy(),w.touchNav=null,A.scroll=null}var L,f,v,S,O,C=e.localEvents,A=e.mediaView,b=e.mediaView.container,y={assetId:0},M=0,w=this;C.addEventListener("layoutMediaView",h),C.addEventListener(SECTIONS_MODEL_CHANGE,T),C.addEventListener(LAYOUT_MODEL_CHANGE,T),C.addEventListener(RESIZE,d),C.addEventListener(ORIENTATION_CHANGE,c),C.addEventListener("mediaSizeUpdate",i),C.addEventListener("MEDIA_HEIGHT_CHANGE",i),C.addEventListener("assetReset",l),C.addEventListener(TOUCH_NAVIGATION_MOVE,function(e){n()&&"prev"===e&&w.touchNav&&(w.touchNav.disabled=!0)}),C.addEventListener(MENU_DOCK_CLOSE,function(e){w.touchNav&&(w.touchNav.disabled=!1)}),C.addEventListener(TOUCH_NAVIGATION_END,t),C.addEventListener("ScrollTransition/updateAssetId",m),this.init=function(e){y=e,b.transition=0,b.alpha=0,v||r(),"mSlide"!==S||w.touchNav||a(),v(y.assetId),setTimeout(function(){Tween(b,STATE.mediaView.transitionDuration(),{alpha:1})},1e3)},this.updateState=function(e){y=e},this.uriChange=function(e,t){y=e,STATE.section(y.section);var i=b.children.length>0;if(y.mediaToRender&&i){if(t||(y.mode.indexOf("thumbs")!==-1&&y.assetId===-1&&(b.transition=0,b.alpha=0),y.assetId>-1&&(y.info.isDeeplink?s(y.assetId):STATE.siteView.unifiedPageScroll()&&y.info.isModeChange&&/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)&&/thumbs/.test(y.mode)?(b.transition=0,b.alpha=0,setTimeout(function(){Tween(b,STATE.mediaView.transitionDuration(),{alpha:1})},1e3*UPDATE_SPEED+10)):y.info.isModeChange&&/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)&&/thumbs/.test(y.info.lastUri)?(b.transition=0,b.alpha=0,STATE.siteView.unifiedPageScroll()?setTimeout(function(){s(y.assetId),Tween(b,STATE.mediaView.transitionDuration(),{alpha:1})},1e3*UPDATE_SPEED+10):(s(y.assetId),setTimeout(function(){Tween(b,STATE.mediaView.transitionDuration(),{alpha:1})},500*UPDATE_SPEED))):y.info.isModeChange&&/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)&&/thumbs/.test(y.mode)||(L||r(),"mSlide"!==S||w.touchNav||a(),w.touchNav?(1!==stage.zoom||USER_AGENT!==MOBILE||STATE.podUseDesktop||A.mask.element.scrollTo(0,0),Tween(b,STATE.mediaView.transitionDuration(),{alpha:1}),L(y.assetId,y.info.flickSpeed,w.touchNav.swipeDirection)):y.info.isSectionChange?(b.transition=0,L(y.assetId,y.info.flickSpeed),setTimeout(function(){Tween(b,STATE.mediaView.transitionDuration(),{alpha:1})},1e3*UPDATE_SPEED+10)):(Tween(b,STATE.mediaView.transitionDuration(),{alpha:1}),L(y.assetId,y.info.flickSpeed))))),y.assetId>-1&&(!/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)||!/thumbs/.test(e.mode))&&STATE.mediaView.videoAutoPlay()){var n=b.children[y.assetId]&&b.children[y.assetId].id;C.dispatchEvent("mediaAutoPlay",n)}else if(!(/fill|vMasonry|hMasonry/.test(STATE.overrides.thumbnailType)&&/thumbs/.test(e.mode)||USER_AGENT!==MOBILE)){var n=b.children[y.assetId]&&b.children[y.assetId].id,o=MEDIA_MODEL[n];o&&"video"===o.type&&0!==o.content.indexOf("vimeo")&&STATE.mediaView.videoAutoPlay()&&C.dispatchEvent("mediaAutoPlay",n)}y.assetId>-1&&b.children[y.assetId]&&"html"===b.children[y.assetId].type&&C.dispatchEvent(PAGE_LOADED),w.touchNav&&(w.touchNav.assetId=e.assetId)}};var _;return this.destroy=p,w}function MediaSlideshow(e){function t(e){var t=v.children[O];"image"===t.type?setTimeout(function(){g||d(),g(O),m.resume()},1e3):"video"===t.type&&(g||d(),t.autoPlay(),setTimeout(function(){g(O)},1e3))}function i(e){var t=v.children[O];return t&&getMediaById(t.id)}function n(){O=0,g(O),L.dispatchEvent("siteAnchorCaptionUpdate",i(O)),L.dispatchEvent("showCaption",C)}function o(){O=r(),C.assetId=O;var e=v.children[O];isLogin?(g(O),m.pause()):"video"===e.type&&e.loaded?(m.pause(),e.autoPlay(),setTimeout(function(){g(O)},350)):"video"===e.type?(m.pause(),e.addEventListener(MEDIA_LOADED,t),e.autoPlay()):/html/.test(e.type)?g(O):/image/.test(e.type)&&e.loaded?g(O):/image/.test(e.type)&&!e.loaded&&(m.pause(),e.addEventListener(MEDIA_LOADED,t)),L.dispatchEvent("siteAnchorCaptionUpdate",i(O)),LAYOUT_MODEL.slideshowCaptions?L.dispatchEvent("showCaption",C):L.dispatchEvent("hideCaption",C),f.lazyLoader.update()}function a(e){m.resume(),o()}function r(){return O1||"video"===o.type)?(m&&m.destroy(),s()):n()}},L.addEventListener("playbackEnd",a),this.destroy=function(){p=void 0,g=void 0,L.removeEventListener(LAYOUT_MODEL_CHANGE,T),L.removeEventListener(RESIZE,c),L.removeEventListener("layoutMediaView",h),L.removeEventListener(SETTINGS_MODEL_CHANGE,E),L.removeEventListener("mediaSizeUpdate",u),L.removeEventListener("assetReset",l),m&&m.destroy()},d()}function MediaView(e){function t(e){n()}function i(e){n()}function n(){d.section&&STATE.section(d.section),Tween(l,UPDATE_SPEED,{backgroundColor:STATE.mediaView.backgroundColor()})}function o(e){l.removeChildren(l);for(var t=0,i=e.length;ti.v&&(r=i.v),e.height=r+t.top+t.bottom}e.updatePosition()}var n=e.mediaViewContainer,o=e.localEvents,a=e.mediaView;return t}function FadeTransition(e){function t(e,t){t=void 0!==t?t:a;var l=0,s=i.children,d=s.length;for(n.dispatchEvent(TRANSITION_START);li.v&&(a=i.v),e.height=a+t.top+t.bottom}e.updatePosition()}var n=Tile,o=e.mediaViewContainer,a=e.localEvents,r=e.mediaView;return t}function GridTransition(e){function t(e,t){var t=void 0!==t?t:a,r=i.children[e];if(r){var l=r.x,s=r.y;anime({targets:i,duration:1e3*t,translateX:-l,translateY:-s,easing:TOUCH_DEVICE?"easeOutQuart":"easeInOutCubic",complete:function(){n.dispatchEvent(TRANSITION_END),setTimeout(function(){o.lazyLoader&&o.lazyLoader.update()},360)}})}}var i=e.mediaViewContainer,n=e.localEvents,o=e.mediaView,a=e.transitionDuration;return n.dispatchEvent(TRANSITION_START),t.destroy=function(){},t}function ScrollLayoutHorizontal(e){function t(e,t){return e.contentHeight&&1===t}function i(e){var i=new o;i.gap=0,i.axis="x",i.align="left",i.wrap=!1,i.perpLength=STATE.mediaView.height(a.section.key),a.section&&STATE.section(a.section);var s=STATE.mediaView.height(a.section.key),d=a.maxScroll&&/unifiedSite/.test(STATE.overrides.siteDisplayBehavior);d&&(s=layoutCalcs.getMaxScrollSectionHeight(a));for(var c=0,h=l.children,u=h.length;ci.v&&(r=i.v),e.height=r+t.top+t.bottom}else e.height=STATE.mediaView.height()}e.updatePosition()}var o=Tile,a=e.mediaView,r=e.localEvents,l=a.container,s=a.mask;if("native"===STATE.overrides.imageVideoScrollType)s.element.style.overflowY="hidden",s.element.style.overflowX="scroll";else if(MAC_SCROLLBARS&&("nativeMacOs"===STATE.overrides.imageVideoScrollType||LAYOUT_MODEL.globalSmoothScroll))s.element.style.overflowY="hidden",s.element.style.overflowX="scroll";else{a.scroll&&a.scroll.destroy();var d={name:"horiz scroll",types:["bar","wheel","touch"],axis:"x",align:"left",color:STATE.overrides.imageVideoScrollbarColor,hover:STATE.overrides.imageVideoScrollbarHover,side:STATE.overrides.imageVideoScrollbarAlignment,alpha:STATE.overrides.imageVideoScrollbarBgTransparency,width:STATE.overrides.imageVideoScrollbarWidth,offsetX:STATE.overrides.imageVideoScrollbarHorizontalOffset,offsetY:STATE.overrides.imageVideoScrollbarVerticalOffset,topPad:0,property:"translate",zIndex:STATE.mediaView.zIndex,rounded:STATE.overrides.imageVideoScrollbarRounded,visibility:STATE.overrides.imageVideoScrollbarVisibility};("nativeMacOs"===STATE.overrides.imageVideoScrollType||LAYOUT_MODEL.globalSmoothScroll)&&(d.margin=0,d.color="#000000",d.hover="#000000",d.side="bottom",d.alpha=0,d.width=7,d.offsetX=0,d.offsetY=0,d.rounded=!0,d.visibility="when scrolling"),a.scroll=new Scroll(l,s,d)}return i}function ScrollTransitionHorizontal(e){function t(e,t){T=e;var t=void 0!==t?t:f;L.dispatchEvent(TRANSITION_START);var a=g.children[e];if(a){var r=a.x,l=a.y,s=o(e,g.children.length);p.width=STATE.mediaView.width();var d=AlignEngine({width:a.width,hRange:p.width,hAlign:s});if(r=a.x-d.x,u=!0,c=!1,m.scroll){var h=g.width-p.width,v=r/h;m.scroll.percent=v,m.scroll.bar.moveHandle(STATE.mediaView.transitionDuration()),Tween(g,t,{translateX:-r,translateY:-l,ease:TOUCH_DEVICE?EASE.quart.out:EASE.cubic.inOut,onComplete:function(){c=void 0,L.dispatchEvent(TRANSITION_END),setTimeout(function(){u=!1,m.lazyLoader&&m.lazyLoader.update()},360)}})}else t?(E&&E.kill(),E=Anim.to(p,t,{scrollLeft:r,scrollTop:l,ease:TOUCH_DEVICE?"outQuart":"inOutCubic",onComplete:function(){c=void 0,L.dispatchEvent(TRANSITION_END),setTimeout(function(){u=!1,m.lazyLoader&&m.lazyLoader.update()},310)}})):setTimeout(function(){p.scrollLeft=r,p.scrollTop=l,c=void 0,L.dispatchEvent(TRANSITION_END),setTimeout(function(){u=!1,m.lazyLoader&&m.lazyLoader.update()},310)},10);c?n():i(e)}}function i(e){for(var t=g.children.length;t--;){var i=g.children[t],n=void 0===e||!isNaN(e)&&e===t?1:STATE.overrides.imageVideoInactiveAlpha;Tween(i,STATE.mediaView.transitionDuration(),{alpha:n})}}function n(){for(var e=g.children.length;e--;)Tween(g.children[e],STATE.mediaView.transitionDuration(),{alpha:1})}function o(e,t){return 0===e?"left":e===t-1?"right":STATE.mediaView.hAlign()}function a(){for(var e=g.children.length;e--;){var t=g.children[e],i=.5*p.width;m.scroll?-g.translateX+i>=t.x&&-g.translateX+i<=t.x+t.width&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e}):p.scrollLeft+i>=t.x&&p.scrollLeft+i<=t.x+t.width&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e})}}function r(e){L.dispatchEvent("mediaScrollStart"),c!==!1&&L.dispatchEvent("pauseMedia"),u?i(T):n()}function l(e){c&&a(),c!==!1&&(c=void 0)}function s(e){void 0===c&&(c=!0),m.lazyLoader&&m.lazyLoader.update(),c&&a()}function d(e){h||r(e),clearTimeout(h),s(e),h=setTimeout(function(){l(e),h=null},300)}var c,h,u,T,E,m=e.mediaView,g=m.container,p=m.mask,L=e.localEvents,f=e.transitionDuration;return m.scroll?(m.scroll.addEventListener("scrollStop",l),m.scroll.addEventListener("scrollStart",r),m.scroll.addEventListener(SCROLL,s)):p.element.addEventListener("scroll",d),t.destroy=function(){m.scroll?(m.scroll.removeEventListener("scrollStop",l),m.scroll.removeEventListener("scrollStart",r),m.scroll.removeEventListener(SCROLL,s)):p.element&&p.element.removeEventListener("scroll",d)},t}function ScrollLayoutHorizontalNoCrop(e){function t(e){var t=new n;t.gap=0,t.axis="x",t.align="left",t.wrap=!1,t.perpLength=STATE.mediaView.height(o.section.key),o.section&&STATE.section(o.section);var l=0,s=r.children,d=s.length,c=STATE.mediaView.height(o.section.key),h=o.maxScroll&&/unifiedSite/.test(STATE.overrides.siteDisplayBehavior);for(h&&(c=layoutCalcs.getMaxScrollSectionHeight(o));li.v&&(r=i.v),e.height=r+t.top+t.bottom}else e.height=STATE.mediaView.height()}e.updatePosition()}var n=Tile,o=e.mediaView,a=e.localEvents,r=o.container,l=o.mask;if("native"===STATE.overrides.imageVideoScrollType)l.element.style.overflowY="hidden",l.element.style.overflowX="scroll";else if(MAC_SCROLLBARS&&("nativeMacOs"===STATE.overrides.imageVideoScrollType||LAYOUT_MODEL.globalSmoothScroll))l.element.style.overflowY="hidden",l.element.style.overflowX="scroll";else{o.scroll&&o.scroll.destroy();var s={name:"horiz scroll",types:["bar","wheel","touch"],axis:"x",align:"left",color:STATE.overrides.imageVideoScrollbarColor,hover:STATE.overrides.imageVideoScrollbarHover,side:STATE.overrides.imageVideoScrollbarAlignment,alpha:STATE.overrides.imageVideoScrollbarBgTransparency,width:STATE.overrides.imageVideoScrollbarWidth,offsetX:STATE.overrides.imageVideoScrollbarHorizontalOffset,offsetY:STATE.overrides.imageVideoScrollbarVerticalOffset,topPad:0,property:"translate",zIndex:STATE.mediaView.zIndex,rounded:STATE.overrides.imageVideoScrollbarRounded,visibility:STATE.overrides.imageVideoScrollbarVisibility};("nativeMacOs"===STATE.overrides.imageVideoScrollType||LAYOUT_MODEL.globalSmoothScroll)&&(s.margin=0,s.color="#000000",s.hover="#000000",s.side="bottom",s.alpha=0,s.width=7,s.offsetX=0,s.offsetY=0,s.rounded=!0,s.visibility="when scrolling"),o.scroll=new Scroll(r,l,s)}return t}function ScrollTransitionHorizontalNoCrop(e){function t(e,t){T=e;var t=void 0!==t?t:f;L.dispatchEvent(TRANSITION_START);var a=g.children[e];if(a){var r=a.x,l=a.y,s=o(e,g.children.length);p.width=STATE.mediaView.width();var d=AlignEngine({width:a.width,hRange:p.width,hAlign:s});if(r=a.x-d.x,u=!0,c=!1,m.scroll){var h=g.width-p.width,v=r/h;m.scroll.percent=v,m.scroll.bar.moveHandle(STATE.mediaView.transitionDuration()),Tween(g,t,{translateX:-r,translateY:-l,ease:TOUCH_DEVICE?EASE.quart.out:EASE.cubic.inOut,onComplete:function(){c=void 0,L.dispatchEvent(TRANSITION_END),setTimeout(function(){u=!1,m.lazyLoader&&m.lazyLoader.update()},360)}})}else t?(E&&E.kill(),E=Anim.to(p,t,{scrollLeft:r,scrollTop:l,ease:TOUCH_DEVICE?"outQuart":"inOutCubic",onComplete:function(){c=void 0,L.dispatchEvent(TRANSITION_END),setTimeout(function(){u=!1,m.lazyLoader&&m.lazyLoader.update()},310)}})):setTimeout(function(){p.scrollLeft=r,p.scrollTop=l,c=void 0,L.dispatchEvent(TRANSITION_END),setTimeout(function(){u=!1,m.lazyLoader&&m.lazyLoader.update()},310)},10);u?i(e):n()}}function i(e){for(var t=g.children.length;t--;){var i=g.children[t],n=void 0===e||!isNaN(e)&&e===t?1:STATE.overrides.imageVideoInactiveAlpha;Tween(i,STATE.mediaView.transitionDuration(),{alpha:n})}}function n(){for(var e=g.children.length;e--;)Tween(g.children[e],STATE.mediaView.transitionDuration(),{alpha:1})}function o(e,t){return 0===e?"left":e===t-1?"right":STATE.mediaView.hAlign()}function a(){for(var e=g.children.length;e--;){var t=g.children[e],i=.5*p.width;m.scroll?-g.translateX+i>=t.x&&-g.translateX+i<=t.x+t.width&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e}):p.scrollLeft+i>=t.x&&p.scrollLeft+i<=t.x+t.width&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e})}}function r(e){L.dispatchEvent("mediaScrollStart"),c!==!1&&L.dispatchEvent("pauseMedia"),u?i(T):n()}function l(e){c&&a(),c!==!1&&(c=void 0)}function s(e){void 0===c&&(c=!0),m.lazyLoader&&m.lazyLoader.update(),c&&a()}function d(e){h||r(e),clearTimeout(h),s(e),h=setTimeout(function(){l(e),h=null},300)}var c,h,u,T,E,m=e.mediaView,g=m.container,p=m.mask,L=e.localEvents,f=e.transitionDuration;return m.scroll?(m.scroll.addEventListener("scrollStop",l),m.scroll.addEventListener("scrollStart",r),m.scroll.addEventListener(SCROLL,s)):p.element.addEventListener("scroll",d),t.destroy=function(){m.scroll?(m.scroll.removeEventListener("scrollStop",l),m.scroll.removeEventListener("scrollStart",r),m.scroll.removeEventListener(SCROLL,s)):p.element&&p.element.removeEventListener("scroll",d)},t}function ScrollLayoutVertical(e){function t(e){clearTimeout(d),d=setTimeout(function(){var t=new n;t.gap=0,t.axis="y",t.align="left",t.wrap=!1,t.perpLength=STATE.mediaView.width(),t.name="vScroll",o.section&&STATE.section(o.section);for(var l=0,s=r.children,d=s.length;lSTATE.mediaView.zoneHeight(m.section.key)&&USER_AGENT!==MOBILE?i(e):n()}},"Firefox"===BROWSER_NAME?1e3:300)}function i(e){for(var t=g.children.length;t--;){var i=g.children[t],n=void 0===e||!isNaN(e)&&e===t?1:STATE.overrides.imageVideoInactiveAlpha;Tween(i,STATE.mediaView.transitionDuration(),{alpha:n})}}function n(){for(var e=g.children.length;e--;)Tween(g.children[e],STATE.mediaView.transitionDuration(),{alpha:1})}function o(e,t){return isBlogFeed(m.section.id)?"top":0===e?"top":e===t-1?"bottom":STATE.mediaView.vAlign()}function a(){for(var e=g.children.length;e--;){var t=g.children[e],i=.5*p.height;m.scroll?-g.translateY+i>=t.y&&-g.translateY+i<=t.y+t.height&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e}):STATE.siteView.unifiedPageScroll()?window.scrollY+.5*window.innerHeight>=t.absY&&window.scrollY+.5*window.innerHeight<=t.absY+t.height&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e}):p.scrollTop+i>=t.y&&p.scrollTop+i<=t.y+t.height&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e})}}function r(e){L.dispatchEvent("mediaScrollStart"),c!==!1&&L.dispatchEvent("pauseMedia"),u?i(T):n()}function l(e){c&&!u&&a(),c!==!1&&(c=void 0)}function s(e){void 0!==c||u||(c=!0),m.lazyLoader&&m.lazyLoader.update(),c&&!u&&a()}function d(e){h||r(e),clearTimeout(h),s(e),h=setTimeout(function(){l(e),h=null},300)}var c,h,u,T,E,m=e.mediaView,g=m.container,p=m.mask,L=e.localEvents,f=e.transitionDuration;return m.scroll?(m.scroll.addEventListener("scrollStop",l),m.scroll.addEventListener("scrollStart",r),m.scroll.addEventListener(SCROLL,s)):STATE.siteView.unifiedPageScroll()?window.addEventListener("scroll",d):p.element.addEventListener("scroll",d),t.destroy=function(){m.scroll?(m.scroll.removeEventListener("scrollStop",l),m.scroll.removeEventListener("scrollStart",r),m.scroll.removeEventListener(SCROLL,s)):STATE.siteView.unifiedPageScroll()?window.removeEventListener("scroll",d):p.element&&p.element.removeEventListener("scroll",d)},t}function ScrollLayoutVerticalNoCrop(e){function t(e){clearTimeout(d),d=setTimeout(function(){var t=new n;t.gap=0,t.axis="y",t.align="left",t.wrap=!1,t.perpLength=STATE.mediaView.width(),o.section&&STATE.section(o.section);for(var l=0,s=r.children,d=s.length;lSTATE.mediaView.zoneHeight(m.section.key)?i(e):n()}},"Firefox"===BROWSER_NAME?1e3:300)}function i(e){for(var t=g.children.length;t--;){var i=g.children[t],n=void 0===e||!isNaN(e)&&e===t?1:STATE.overrides.imageVideoInactiveAlpha;Tween(i,STATE.mediaView.transitionDuration(),{alpha:n})}}function n(){for(var e=g.children.length;e--;)Tween(g.children[e],STATE.mediaView.transitionDuration(),{alpha:1})}function o(e,t){return isBlogFeed(m.section.id)?"top":0===e?"top":e===t-1?"bottom":STATE.mediaView.vAlign()}function a(){for(var e=g.children.length;e--;){var t=g.children[e],i=.5*p.height;m.scroll?-g.translateY+i>=t.y&&-g.translateY+i<=t.y+t.height&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e}):STATE.siteView.unifiedPageScroll()?window.scrollY+.5*window.innerHeight>=t.absY&&window.scrollY+.5*window.innerHeight<=t.absY+t.height&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e}):p.scrollTop+i>=t.y&&p.scrollTop+i<=t.y+t.height&&L.dispatchEvent("ScrollTransition/updateAssetId",{id:e})}}function r(e){L.dispatchEvent("mediaScrollStart"),c!==!1&&L.dispatchEvent("pauseMedia"),u?i(T):n()}function l(e){c&&!u&&a(),c!==!1&&(c=void 0)}function s(e){void 0!==c||u||(c=!0),m.lazyLoader&&m.lazyLoader.update(),c&&!u&&a()}function d(e){h||r(e),clearTimeout(h),s(e),h=setTimeout(function(){l(e),h=null},300)}var c,h,u,T,E,m=e.mediaView,g=m.container,p=m.mask,L=e.localEvents,f=e.transitionDuration;return m.scroll?(m.scroll.addEventListener("scrollStop",l),m.scroll.addEventListener("scrollStart",r),m.scroll.addEventListener(SCROLL,s)):STATE.siteView.unifiedPageScroll()?window.addEventListener("scroll",d):p.element.addEventListener("scroll",d),t.destroy=function(){m.scroll?(m.scroll.removeEventListener("scrollStop",l),m.scroll.removeEventListener("scrollStart",r),m.scroll.removeEventListener(SCROLL,s)):STATE.siteView.unifiedPageScroll()?window.removeEventListener("scroll",d):p.element&&p.element.removeEventListener("scroll",d)},t}function SlideLayoutHorizontal(e){function t(){r.mask.element.scrollLeft=0,r.mask.element.scrollTop=0,r.mask.element.style.overflow="hidden";var e=new n;e.gap=0,e.axis="x",e.align="left",e.wrap=!1,e.perpLength=STATE.mediaView.height(r.section.key),r.section&&STATE.section(r.section);var t=0,l=o.children,s=l.length,d=STATE.mediaView.width(),c=STATE.mediaView.height(r.section.key),h=r.maxScroll&&/unifiedSite/.test(STATE.overrides.siteDisplayBehavior);for(h&&(c=layoutCalcs.getMaxScrollSectionHeight(r));ti.v&&(a=i.v),e.height=a+t.top+t.bottom}e.updatePosition()}var n=Tile,o=e.mediaViewContainer,a=e.localEvents,r=e.mediaView;return t}function SlideTransitionHorizontal(e){function t(e,t){var t=void 0!==t?t:a;n.dispatchEvent(TRANSITION_START);var r=i.children[e];if(r){var l=r.x,s=r.y;if(Tween(i,t,{translateX:-l,translateY:-s,ease:TOUCH_DEVICE?EASE.quart.out:EASE.cubic.inOut,onComplete:function(){n.dispatchEvent(TRANSITION_END),setTimeout(function(){o.lazyLoader&&o.lazyLoader.update()},360)}}),USER_AGENT===MOBILE)for(var d=i.children,c=0;ci.v&&(a=i.v),e.height=a+t.top+t.bottom}e.updatePosition()}var n=Tile,o=e.mediaViewContainer,a=e.localEvents,r=e.mediaView;return t}function SlideTransitionVertical(e){function t(e,t){var t=void 0!==t?t:a;n.dispatchEvent(TRANSITION_START);var r=i.children[e];if(r){var l=r.x,s=r.y;Tween(i,t,{translateX:-l,translateY:-s,ease:TOUCH_DEVICE?EASE.quart.out:EASE.cubic.inOut,onComplete:function(){n.dispatchEvent(TRANSITION_END),setTimeout(function(){o.lazyLoader&&o.lazyLoader.update()},360)}})}}var i=e.mediaViewContainer,n=e.localEvents,o=e.mediaView,a=e.transitionDuration;return t.destroy=function(){},t}function MobileSlideLayout(e){function t(){r.mask.element.scrollLeft=0,r.mask.element.scrollTop=0,r.mask.element.style.overflow="hidden";var e=new n;e.gap=0,e.axis="x",e.align="left",e.wrap=!1,e.perpLength=STATE.mediaView.height(r.section.key),r.section&&STATE.section(r.section);var t=0,l=o.children,s=l.length,d=STATE.mediaView.height(r.section.key),c=r.maxScroll&&/unifiedSite/.test(STATE.overrides.siteDisplayBehavior);for(c&&(d=layoutCalcs.getMaxScrollSectionHeight(r));ti.v&&(a=i.v),e.height=a+t.top+t.bottom}e.updatePosition()}var n=Tile,o=e.mediaViewContainer,a=e.localEvents,r=e.mediaView;return t}function MobileSlideTransition(e){function t(e,t,l){var t=void 0!==t?t:r;o.dispatchEvent(TRANSITION_START);var s=EASE.quart.out,d=n.children,c=d[e-1],h=d[e],u=d[e+1];c&&setTimeout(function(){c.transition=0,"right"===l&&(c.translateX=-STATE.mediaView.width()),c.display="block",c.updateSpeed=0,c.updatePosition(),c.loaded||c.load(),Tween.defer(c,t,{translateX:-STATE.mediaView.width(),alpha:1,ease:s})},0),h&&(h.transition=0,h.display="block",h.updateSpeed=0,h.updatePosition(),h.loaded||h.load(),clearTimeout(i),i=setTimeout(function(){d.filter(function(e){return e!==h&&e!==c&&e!==u}).forEach(function(e){e.display="none"})},200),Tween.defer(h,t,{translateX:0,alpha:1,ease:s,onComplete:function(){o.dispatchEvent(TRANSITION_END),a.lazyLoader&&a.lazyLoader.update()}})),u&&setTimeout(function(){u.transition=0,"left"===l&&(u.translateX=STATE.mediaView.width()),u.display="block",u.updateSpeed=0,u.updatePosition(),u.loaded||u.load(),Tween.defer(u,t,{translateX:STATE.mediaView.width(),alpha:1,ease:s})},0)}var i,n=e.mediaViewContainer,o=e.localEvents,a=e.mediaView,r=e.transitionDuration;return t.destroy=function(){},t}function StaticVLayout(e){function t(){var e=new n;e.gap=0,e.axis="y",e.align="left",e.wrap=!1,e.perpLength=STATE.mediaView.width(),o.section&&STATE.section(o.section);for(var t=0,l=r.children,s=l.length;t").replace(/\\r\\n/g,"
").replace(/\n\r/g,"
").replace(/\\n\\r/g,"
").replace(/\r/g,"
").replace(/\\r/g,"
").replace(/\n/g,"
").replace(/\\n/g,"
").replace(/\\/g,""),y.selectable=!0,y.setClass("dx_page_text ql-editor"),y.fontFamily=LAYOUT_MODEL.contactFont,y.fontSize=LAYOUT_MODEL.contactFontSize,y.fontColor=LAYOUT_MODEL.contactFontColor,y.textAlign="right",y.textWrap=!1,b.addChild(y),b.addChild(M);var n=b.element.getElementsByTagName("img"),o=n.length;if(n.length>0)for(;o--;){var a=n[o];a.addEventListener(LOAD,function(e){m()})}D>320&&(D=320,y.width=320,y.textWrap=!0,y.style["word-wrap"]="break-word");for(var o=0,l=S.length,s=0;oM.height?v+=y.element.offsetHeight+t:(v+=M.height,v+=C.element.offsetHeight+5+t),b.height=v}function a(){if(STATE.section(A.section),USER_AGENT===MOBILE||USER_AGENT===TABLET)A.element.style.overflowY="scroll",A.element.style.overflowX="hidden",A.element.style["-webkit-overflow-scrolling"]="touch";else if(STATE.siteView.unifiedPageScroll()&&/vScroll/.test(STATE.overrides.transitionType))o(),setTimeout(function(){STATE.section(A.section);var e=v;e=e>STATE.mediaView.height()?e:STATE.mediaView.height();var t=e!==A.contentHeight;A.contentHeight=e,A.height=e,t&&_.dispatchEvent("MEDIA_HEIGHT_CHANGE")},30);else if("native"===LAYOUT_MODEL.pageScrollType)A.element.style.overflowY="scroll",A.element.style.overflowX="hidden";else if("Macintosh"===OS&&"nativeMacOs"===LAYOUT_MODEL.pageScrollType)A.element.style.overflowY="scroll",A.element.style.overflowX="hidden";else{A.scroll&&A.scroll.destroy();var e=LAYOUT_MODEL.pageScrollbarWidth,t=USER_AGENT===MOBILE?-(e+5):LAYOUT_MODEL.pageScrollbarHorizontalOffset,i="right"===LAYOUT_MODEL.pageScrollbarAlignment?-t-e:t+e,n={name:"text page",types:["bar","wheel","touch"],axis:"y",align:"top",margin:LAYOUT_MODEL.pageScrollVerticalMargin,color:LAYOUT_MODEL.pageScrollbarColor,hover:LAYOUT_MODEL.pageScrollbarHover,side:LAYOUT_MODEL.pageScrollbarAlignment,alpha:LAYOUT_MODEL.pageScrollbarBgAlpha,width:e,offsetX:i,offsetY:LAYOUT_MODEL.pageScrollbarVerticalOffset,property:"translate",rounded:LAYOUT_MODEL.pageScrollbarRounded,visibility:LAYOUT_MODEL.pageScrollbarVisibility,scrollTopCheck:!0,parent:A};"nativeMacOs"===LAYOUT_MODEL.pageScrollType&&(n.margin=0,n.color="#000000",n.hover="#000000",n.side="right",n.alpha=0,n.width=7,n.offsetX=0,n.offsetY=0,n.rounded=!0,n.visibility="when scrolling"),A.scroll=new Scroll(b,A,n),A.scroll.addEventListener("WINDOW_SCROLL_TOP",function(){A.scroll.percent=0,A.scroll.update(UPDATE_SPEED)})}}function r(e){function t(e){_.removeEventListener("destroy",t),o.removeEventListener(FOCUS,l),o.removeEventListener(BLUR,s)}var i=new Sprite;i.width=300;var n=new TextField;n.fontFamily=LAYOUT_MODEL.contactTitleFont,n.fontColor=LAYOUT_MODEL.contactFontColor,n.fontSize=11,n.text=e,n.selectable=!1,i.addChild(n);var o="Comments"===e?new TextArea:new Input;return o.backgroundColor=toRgba(LAYOUT_MODEL.contactFieldRectColor,.1),o.border="1px solid "+toRgba(LAYOUT_MODEL.contactFieldRectColor,.3),o.fontFamily=LAYOUT_MODEL.contactTitleFont,o.fontColor=LAYOUT_MODEL.contactFontColor,o.fontSize=16,o.height="Comments"===e?150:20,o.width=300,o.y=17,o.addEventListener(FOCUS,l),o.addEventListener(BLUR,s),_.addEventListener("destroy",t),i.addChild(o),i.id=e,i.input=o,i}function l(e){Tween(this,UPDATE_SPEED,{backgroundColor:toRgba(LAYOUT_MODEL.contactFieldRectColor,.2),border:"1px solid "+toRgba(LAYOUT_MODEL.contactFieldRectColor,.7)})}function s(e){Tween(this,UPDATE_SPEED,{backgroundColor:toRgba(LAYOUT_MODEL.contactFieldRectColor,.1),border:"1px solid "+toRgba(LAYOUT_MODEL.contactFieldRectColor,.3)})}function d(e){Tween(this,UPDATE_SPEED,{backgroundColor:toRgba(LAYOUT_MODEL.contactFieldRectColor,.8)})}function c(e){Tween(this,UPDATE_SPEED,{backgroundColor:toRgba(LAYOUT_MODEL.contactFieldRectColor,1)})}function h(e){w.text=e.response,w.x=D+17,Tween(M,UPDATE_SPEED,{alpha:0,onComplete:function(e){M.display="none"}}),Tween(w,UPDATE_SPEED,{alpha:1})}function u(e){var t=MEDIA_MODEL[A.id],i=[].slice.apply(M.children).filter(function(e){return e.id}).reduce(function(e,t){if(e){if(e[t.id]=t.input.value||"","Name"===t.id&&""===t.input.value)return alert("Name field cannot be blank."),!1;if("Email"===t.id&&(t.input.value.indexOf("@")===-1||t.input.value.indexOf(".")===-1))return alert("Please enter valid email address."),!1;if("Comments"===t.id&&""===t.input.value)return alert("Comments field cannot be blank."),!1}return e},{});i.Title=t.label,i.toEmail=t.content.contactFormEmail,i.subject=t.content.contactFormSubject,i&&_.dispatchEvent(CONTACT_FORM_SUBMIT,i)}function T(e){STATE.section(A.section),Tween(A,A.updateSpeed,{backgroundColor:STATE.mediaView.backgroundColor()})}function E(){return STATE.section(A.section),USER_AGENT===MOBILE||b.width+16>STATE.mediaView.width()}function m(e){STATE.section(A.section),layoutCalcs.activeMediaType=A.type,D=y.element.offsetWidth,D>320&&(D=320,y.width=320,y.textWrap=!0,y.style["word-wrap"]="break-word"),b.width=D+M.width+18,E()?(y.x=8,M.x=-8,LAYOUT_MODEL.contactTitleShow?(O&&(O.x=8,O.y=percentToPixels(LAYOUT_MODEL.contactTitleFontSize,100)),y.y=O.y+percentToPixels(LAYOUT_MODEL.contactTitleFontSize,100)+16,M.y=y.y+y.element.offsetHeight+16):(y.y=0,M.y=y.element.offsetHeight),A.scroll&&(A.scroll.align="top"),M.borderLeft="1px solid "+toRgba(LAYOUT_MODEL.contactFieldRectColor,0),y.textAlign="left"):(y.x=0,y.y=0,M.x=D+16,M.y=44,M.borderLeft="1px solid "+toRgba(LAYOUT_MODEL.contactFieldRectColor,.3),y.textAlign="right",LAYOUT_MODEL.contactTitleShow&&O&&(O.textWrap=!0,O.x=D+32,O.y=percentToPixels(LAYOUT_MODEL.contactTitleFontSize,100)-33),A.scroll&&(A.scroll.align="top")),f&&!f.contactFormExtra&&(A.scroll&&(A.scroll.align="top"),M.borderLeft="1px solid "+toRgba(LAYOUT_MODEL.contactFieldRectColor,0),M.x=-8,O&&(O.x=8)),b.transition=0,o(),Tween.defer(b,A.updateSpeed,{x:g(),y:p(),onComplete:function(){A.scroll&&A.scroll.resize(),Tween(b,UPDATE_SPEED,{alpha:1})}}),A.updateSpeed=UPDATE_SPEED,isInit=!1,a()}function g(){if(STATE.section(A.section),layoutCalcs._activeView="contact",b.width+16>STATE.mediaView.width()){var e=Math.round(.5*(STATE.mediaView.width()-M.width));return e}var e=Math.round(.5*(STATE.mediaView.width()-b.width));return e}function p(){return STATE.section(A.section),layoutCalcs._activeView="contact",v>STATE.mediaView.height()?USER_AGENT===MOBILE||USER_AGENT===TABLET?40:22:Math.round(.5*(STATE.mediaView.height()-v))}function L(e){_.removeEventListener(RESIZE,m),_.removeEventListener(LAYOUT_MODEL_CHANGE,m),_.removeEventListener("destroy",L),_.removeEventListener("showCursor",t),_.removeEventListener("hideCursor",i),_.removeEventListener(CONTACT_FORM_SENT,h),A.removeEventListener(CHILD_ADDED,n)}var f,v,S,O,C,A=new Sprite({events:e.events}),b=new Sprite,y=new Sprite,M=new Sprite,w=new Sprite,_=e.localEvents,D=0;return A.section=e.section,A.alpha=0,b.alpha=0,b.selectable=!0,A.updateSpeed=0,A.id=e.mediaItem.id,A.type=e.mediaItem.type,A.dims=e.size.content,A.element.navigationCursor=!isSlideshowGallery(A.section),A.mediaItem=e.mediaItem,A.addEventListener(CHILD_ADDED,n),_.addEventListener(RESIZE,m),_.addEventListener(LAYOUT_MODEL_CHANGE,m),_.addEventListener("destroy",L),_.addEventListener("showCursor",t),_.addEventListener("hideCursor",i),A.load=function(){A.loaded=!0},A.unload=function(){},A.show=function(){A.display="block",Tween(A,UPDATE_SPEED,{alpha:1})},A.hide=function(){Tween(A,UPDATE_SPEED,{alpha:0,onComplete:function(){A.display="none"}})},A.updatePosition=m,A}function ImageView(e){function t(){return STATE.lightboxSection&&!LAYOUT_MODEL.lightboxGalleryBtnDisable&&!LAYOUT_MODEL.lightboxImageDisable}function i(){isSlideshowGallery(L.section)||(L.element.navigationCursor=!0,O.element.navigationCursor=!0,C.element.navigationCursor=!0),O.element.addEventListener("contextmenu",n),O.element.addEventListener("dragstart",n),L.element.style["user-select"]="none",C.element.style["user-select"]="none",O.element.style["user-select"]="none",L.addChild(C),C.addChild(O),"spinner"===STATE.overrides.imageVideoLoaderType&&(v=new LoadingIndicator({color:e.loaderColor}),C.addChild(v)),r(),T()}function n(e){var t=void 0===SETTINGS_MODEL.disableRightClick||SETTINGS_MODEL.disableRightClick;t&&e.preventDefault()}function o(){isSlideshowGallery(L.section)||(L.element.navigationCursor=!0,O.element.navigationCursor=!0,C.element.navigationCursor=!0)}function a(){L.element.navigationCursor=!1,O.element.navigationCursor=!1,C.element.navigationCursor=!1}function r(){if(STATE.section(L.section),O&&LAYOUT_MODEL.imageRendering.optimizeQuality&&(O.style["image-rendering"]="optimizeQuality"),O&&LAYOUT_MODEL.imageRendering.webkitOptimizeContrast&&(O.style["image-rendering"]="-webkit-optimize-contrast"),O&&"Safari"===BROWSER_NAME&&LAYOUT_MODEL.imageRendering.webkitBackfaceVisibility&&(O.element.style["-webkit-backface-visibility"]="hidden"),O&&USER_AGENT===MOBILE&&(O.element.style["-webkit-backface-visibility"]="hidden"),USER_AGENT===MOBILE)Tween(L,L.updateSpeed,{backgroundColor:LAYOUT_MODEL.containerColorMobile||STATE.mediaView.backgroundColor()});else if(USER_AGENT===TABLET)Tween(L,L.updateSpeed,{backgroundColor:LAYOUT_MODEL.containerColorTablet||STATE.mediaView.backgroundColor()});else{var e=STATE.mediaView.backgroundColor();Tween(L,L.updateSpeed,{backgroundColor:e})}h(I)}function l(){if(/media/.test(S.captionAnchorTo)||/media/.test(STATE.overrides.captionAnchorTo)){STATE.section(L.section),layoutCalcs.activeMediaType=L.type,f.container.transition=0,firstValid(S.captionCloseButton,STATE.overrides.captionCloseButton)?f.showCloseButton():f.hideCloseButton();var t={onInit:function(){f.scroll&&f.scroll.hide()},onComplete:function(){f.scroll&&(f.scroll.show(),f.scroll.resize())}},i=S.captionBackgroundRectColor||STATE.overrides.captionBackgroundRectColor,n=firstValid(S.captionBackgroundAlpha,STATE.overrides.captionBackgroundAlpha);if(f.backgroundColor=toRgba(i,n),f.fontFamily=S.captionFont||STATE.overrides.captionFont,f.fontSize=stage.width-1)){I=t,STATE.section(L.section),layoutCalcs.activeMediaType=L.type;var n=getCaptionText(e.mediaItem);f.text=plainTextToHtml(n);var o=c(firstValid(e.mediaItem.overrides.captionAnchorTo,STATE.overrides.captionAnchorTo)),a=isSlideshowGallery(L.section)&&LAYOUT_MODEL.slideshowCaptions;o&&(a||I&&I.mode&&(i||I.mode.indexOf("caption")>-1))&&f.show(l)}}}function u(){var e=isSlideshowGallery(L.section)&&LAYOUT_MODEL.slideshowCaptions;e||f.hide()}function T(){STATE.section(L.section),layoutCalcs.activeMediaType=L.type,D=STATE.mediaView.maskWidth(L.width),U=STATE.mediaView.maskHeight(L.height,L.section.key),Tween(C,L.updateSpeed,{x:STATE.mediaView.maskX(),y:STATE.mediaView.maskY(L.section.key),width:D,height:U}),g(),x&&m(),h(I)}function E(){L.updateSpeed=0,x=!0,this.width&&A!==this.width&&(A=this.width),this.height&&b!==this.height&&(b=this.height),v&&(v.removeLoader(),C.removeChild(v)),T(),h(I),L.dispatchEvent(MEDIA_LOADED,{type:"image",id:e.mediaItem.id,width:this.width,height:this.height}),L.events.dispatchEvent(MEDIA_LOADED,{type:"image",id:e.mediaItem.id,width:this.width,height:this.height}),L.updateSpeed=UPDATE_SPEED,"Safari"===BROWSER_NAME&&/hScroll/.test(STATE.overrides.transitionType)&&O.element.setAttribute("nopin","nopin")}function m(){STATE.section(L.section);var e=Resize(null,0,{type:STATE.mediaView.imageScaleType(),width:A,height:b,hRange:D,vRange:U,hAlign:STATE.mediaView.hAlign(),vAlign:STATE.mediaView.vAlign(),disableOrientationCheck:getOrientationCheck(L.type)});y=Math.ceil(e.scale.width),M=Math.ceil(e.scale.height),w=Math.floor(e.align.x),_=Math.floor(e.align.y),Tween(O,L.updateSpeed,{x:w,y:_,width:y,height:M,onComplete:function(){setTimeout(function(){Tween(O,STATE.mediaView.transitionDuration(),{alpha:1,ease:"cubic-bezier(0.7, 0, 0.3, 1)"})},0)}}),h(I)}function g(){v&&(v.x=.5*(D-v.width),v.y=.5*(U-v.height))}function p(){V.removeEventListener("destroy",p),V.removeEventListener(RESIZE,T),V.removeEventListener(LAYOUT_MODEL_CHANGE,T),V.removeEventListener("showCursor",o),V.removeEventListener("hideCursor",a),O.removeEventListener(LOAD,E),L.removeEventListener(CHILD_ADDED,i)}var L=new Sprite({events:e.localEvents});L.alpha=0,L.updateSpeed=0,L.overflow="hidden",L.id=e.mediaItem.id,L.type=e.mediaItem.type,L.dims=e.size.content,L.section=e.section,L.state=e.state,L.mediaItem=e.mediaItem;var f,v,S,O=new Bitmap,C=new Sprite,A=e.size.content.width,b=e.size.content.height,y=0,M=0,w=0,_=0,D=0,U=0,x=!1,V=e.localEvents,I=e.state,P=getCaptionText(e.mediaItem);if(P&&STATE.overrides.captionMobileOverrides){var Y=1,R=new Svg;R.left=0,R.top=0,R.rotate=0,R.path=new Path,R.path.scale=Y,R.width=15*Y,R.height=15*Y,R.path.d=svgPaths.navInfo[LAYOUT_MODEL.navbarIconSet],R.path.strokeWidth="thin"===LAYOUT_MODEL.navbarIconSet?1:0,R.path.fill="thin"===LAYOUT_MODEL.navbarIconSet?"none":LAYOUT_MODEL.navbarColor,R.path.stroke="thin"===LAYOUT_MODEL.navbarIconSet?LAYOUT_MODEL.navbarColor:"none",R.addChild(R.path);var N=buildAlignedButton({alignHorizontal:"right",alignVertical:"top",horizontalOffset:25,verticalOffset:20,blendMode:"normal",font:"Helvetica",fontSize:12,fontColor:"#999999"});N.zIndex=1,N.width=15*Y,N.height=15*Y,N.addChild(R),N.addEventListener("click",function(t){if(f)if(f.isShowing)f.hide();else{var i=getCaptionText(e.mediaItem);f.text=plainTextToHtml(i),f.show(l)}}),L.addChild(N)}if(t()&&STATE.lightboxButtonsEnabled()){var z=STATE.lightboxSection.media.indexOf(L.mediaItem.id);if(!L.mediaItem.disableLightbox){var k=buildAlignedButton({alignHorizontal:LAYOUT_MODEL.lightboxGalleryBtnAlignHorizontal||"left",alignVertical:LAYOUT_MODEL.lightboxGalleryBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.lightboxGalleryBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.lightboxGalleryBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.lightboxGalleryBtnBlendMode||"difference",font:LAYOUT_MODEL.lightboxGalleryBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.lightboxGalleryBtnFontSize||12,fontColor:LAYOUT_MODEL.lightboxGalleryBtnFontColor||"#999999"});if(k.zIndex=1,k.text=z>-1?LAYOUT_MODEL.lightboxGalleryBtnRemoveText||"- Lightbox":LAYOUT_MODEL.lightboxGalleryBtnAddText||"+ Lightbox",k.addEventListener("click",function(e){var t,i=STATE.lightboxSection.media.indexOf(L.mediaItem.id);i>-1?(k.text=LAYOUT_MODEL.lightboxGalleryBtnAddText||"+ Lightbox",t="remove"):(k.text=LAYOUT_MODEL.lightboxGalleryBtnRemoveText||"- Lightbox",t="add"),L.events.dispatchEvent("lightboxUpdateItem",{action:t,id:L.mediaItem.id}),k.cursor="pointer"}),L.addChild(k),e.section.isLightbox&&!LAYOUT_MODEL.lightboxGalleryDownloadBtnDisable){var B=buildAlignedButton({alignHorizontal:LAYOUT_MODEL.lightboxDownloadBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.lightboxDownloadBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.lightboxDownloadBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.lightboxDownloadBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.lightboxDownloadBtnBlendMode||"difference",font:LAYOUT_MODEL.lightboxDownloadBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.lightboxDownloadBtnFontSize||12,fontColor:LAYOUT_MODEL.lightboxDownloadBtnFontColor||"#999999"});B.zIndex=1,B.text=LAYOUT_MODEL.lightboxDownloadBtnText||"↓",B.addEventListener("click",function(e){L.events.dispatchEvent("lightboxDownloadOverlayOpen")}),L.addChild(B)}}}if(!isSlideshowGallery(L.section)&&e.mediaItem.attachment&&!LAYOUT_MODEL.attachmentGalleryBtnDisable){var H=buildAttachmentButton({alignHorizontal:LAYOUT_MODEL.attachmentGalleryBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.attachmentGalleryBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.attachmentGalleryBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.attachmentGalleryBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.attachmentGalleryBtnBlendMode||"difference",font:LAYOUT_MODEL.attachmentGalleryBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.attachmentGalleryBtnFontSize||12,fontColor:LAYOUT_MODEL.attachmentGalleryBtnFontColor||"#999999",iconColor:LAYOUT_MODEL.attachmentGalleryBtnFontColor||"#999999",icon:svgPaths.cloud,text:LAYOUT_MODEL.attachmentGalleryBtnText});H.zIndex=1,H.addEventListener("click",function(t){L.events.dispatchEvent("attachmentDownload",e.mediaItem.attachment)}),L.addChild(H)}O.alpha=0,O.selectable=!1,C.overflow="hidden",V.addEventListener(RESIZE,T),V.addEventListener(LAYOUT_MODEL_CHANGE,T),V.addEventListener("destroy",p),V.addEventListener("showCursor",o),V.addEventListener("hideCursor",a),L.addEventListener(CHILD_ADDED,i);var P=getCaptionText(e.mediaItem);return f||""===P||(f=new Caption,S=e.mediaItem.overrides||{},V.addEventListener("showCaption",h),V.addEventListener("hideCaption",u),V.addEventListener("checkCaption",s),d(P)),L.load=function(){L.loaded=!0,O.addEventListener(LOAD,E),O.src=cdnMediaPath(e.mediaItem.content,e.mediaItem.demoFile),""!==P&&(L.addChild(f.container),l())},L.unload=function(){},L.hide=function(){1===L.alpha&&Tween(L,UPDATE_SPEED,{alpha:0,onComplete:function(){L.display="none"}})},L.show=function(){0===L.alpha&&(L.display="block",Tween(L,UPDATE_SPEED,{alpha:1}))},L.updatePosition=T,L}function PageView(e){function t(e){isSlideshowGallery(y.section)||(y.element.navigationCursor=!0,b&&(b.element.navigationCursor=!0),w.element.navigationCursor=!0)}function i(e){y.element.navigationCursor=!1,b&&(b.element.navigationCursor=!1),w.element.navigationCursor=!1}function n(e){/page|imageRendering/.test(e.id)&&(f(),v())}function o(){STATE.section(y.section),e.mediaItem.content=unescapeScriptTags(e.mediaItem.content),y.loaded=!1;var t=RetinaResizeEngine({width:P,height:Y,filename:e.mediaItem.featuredImage});P=Math.round(t.width),Y=Math.round(t.height),L()&&!A()?(b=new Bitmap,b.dataSrc=cdnMediaPath(e.mediaItem.featuredImage,e.mediaItem.demoFile),isSlideshowGallery(y.section)||(b.element.navigationCursor=!0,w.element.navigationCursor=!0),b.addEventListener(LOAD,O),b.alpha=0,y.addChild(b)):(y.events.dispatchEvent(MEDIA_LOADED,{}),setTimeout(function(){y.updateSpeed=STATE.mediaView.transitionDuration()},0));var i="";if(p()){var n=STATE.overrides.pageTitleFont.split(":"),o=n[0],a=n[1],r=percentToPixels(STATE.overrides.pageTitleFontSize,22);i+=""+e.mediaItem.label+"
"}H=A(),A()&&L()&&(i+="+")
"),i+=plainTextToHtml(e.mediaItem.content),i.indexOf("no-lazy-load")===-1?M.text=i.replace(/src\=/g,"data-src="):M.text=i,w.addChild(M),y.addChild(w),x=M.element.getElementsByClassName("responsive"),U=M.element.getElementsByClassName("responsive-width")}function a(e){return function(t){return e.replace(/[^ -~]+/g,"")===t.src}}function r(e){return e.savedOpacity=e.style.opacity,e.style.opacity=0,e.originalWidth=e.style.width,e.originalHeight=e.style.height,e}function l(e){o(),N=Math.round(STATE.mediaView.maskWidth(y.element.offsetWidth)),STATE.overrides.pageMaxWidth&&N>STATE.overrides.pageMaxWidth&&(N=STATE.overrides.pageMaxWidth),D=s(M.element),_=D.filter(function(e){return"img"===e.tagName.toLowerCase()}).map(r),f(),v(),setTimeout(function(){f(),v()},150)}function s(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 d(e){var t=e.reduce(function(e,t){if("img"===t.img.tagName.toLowerCase()){var i=t.img.src.replace(B,"");e=e.concat({src:i,width:t.img.naturalWidth,height:t.img.naturalHeight})}return e},[]);JSON.stringify(y.mediaItem.size.pageImages)!==JSON.stringify(t)&&(y.mediaItem.size.pageImages=t,k.dispatchEvent("adminPageviewImageSizes",y.mediaItem))}function c(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(){Tween(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 h(e){var t=void 0===SETTINGS_MODEL.disableRightClick||SETTINGS_MODEL.disableRightClick;t&&e.preventDefault()}function u(e){return e.img.oncontextmenu=h,e.img.ondragstart=h,e}function T(e){Promise.all(e.map(c)).then(function(e){return e.map(u)}).then(d).then(v).catch(function(e){})}function E(){return"native"===STATE.overrides.pageScrollType||MAC_SCROLLBARS&&("nativeMacOs"===STATE.overrides.pageScrollType||LAYOUT_MODEL.globalSmoothScroll)}function m(){if(STATE.section(y.section),USER_AGENT!==MOBILE&&USER_AGENT!==TABLET||(w.element.style["-webkit-overflow-scrolling"]="touch"),/vScroll/.test(STATE.overrides.transitionType)&&STATE.siteView.unifiedPageScroll())w.element.style.overflow="hidden",w.element.style["-webkit-overflow-scrolling"]="touch",Tween.defer(M,UPDATE_SPEED,{alpha:1});else if(E()||/unifiedSite/.test(STATE.overrides.siteDisplayBehavior))w.element.style.overflowY="auto",w.element.style.overflowX="hidden",w.element.style["-webkit-overflow-scrolling"]="touch",Tween.defer(M,UPDATE_SPEED,{alpha:1});else{y.scroll&&y.scroll.destroy();var t=STATE.overrides.pageScrollbarWidth,i=USER_AGENT===MOBILE?-(t+5):STATE.overrides.pageScrollbarHorizontalOffset,n="right"===STATE.overrides.pageScrollbarAlignment?-i-t:i+t,o={name:"text page",types:["bar","wheel","touch"],axis:"y",align:"top",margin:STATE.overrides.pageScrollVerticalMargin,color:STATE.overrides.pageScrollbarColor,hover:STATE.overrides.pageScrollbarHover,side:STATE.overrides.pageScrollbarAlignment,alpha:STATE.overrides.pageScrollbarBgAlpha,width:t,offsetX:n,offsetY:STATE.overrides.pageScrollbarVerticalOffset,property:"translate",rounded:STATE.overrides.pageScrollbarRounded,visibility:STATE.overrides.pageScrollbarVisibility,scrollTopCheck:!0};("nativeMacOs"===STATE.overrides.pageScrollType||LAYOUT_MODEL.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"),y.scroll=new Scroll(M,w,o),y.scroll.addEventListener("WINDOW_SCROLL_TOP",function(){y.scroll.percent=0,y.scroll.update(UPDATE_SPEED)})}STATE.section(y.section);var a=percentToPixels(STATE.overrides.pageMarginTop,stage.height),r=percentToPixels(STATE.overrides.pageMarginBottom,stage.height),l=a+M.element.offsetHeight+r;if(L()&&!A()){var s=RetinaResizeEngine({width:e.mediaItem.size.featuredImage.width,height:e.mediaItem.size.featuredImage.height,filename:b.dataSrc}),d=(Math.round(s.width),Math.round(s.height));l=l>a+d+r?l:a+d+r}G=l!==y.contentHeight,y.contentHeight=l,g(y.section)?(layoutCalcs._mediaMarginPrefix="page",w.height=Math.round(STATE.mediaView.maskHeight(void 0,y.section.key)),y.height=Math.round(STATE.mediaView.height(y.section.key))):(w.height=l,y.height=l),G&&setTimeout(function(){k.dispatchEvent("MEDIA_HEIGHT_CHANGE")},100),y.scroll&&y.scroll.resize(),Tween.defer(M,UPDATE_SPEED,{alpha:1})}function g(e){return STATE.section(y.section),(USER_AGENT!==MOBILE&&USER_AGENT!==TABLET||!/vScroll/.test(STATE.overrides.transitionType))&&("none"===STATE.overrides.siteDisplayBehavior||!/vScroll/.test(STATE.overrides.transitionType)&&e.media.length>1)}function p(){return STATE.section(y.section),STATE.overrides.pageTitle&&""!==e.mediaItem.label}function L(){return""!==e.mediaItem.featuredImage}function f(e){STATE.section(y.section),b&&LAYOUT_MODEL.imageRendering.optimizeQuality&&(b.style["image-rendering"]="optimizeQuality"),b&&LAYOUT_MODEL.imageRendering.webkitOptimizeContrast&&(b.style["image-rendering"]="-webkit-optimize-contrast"),b&&"Safari"===BROWSER_NAME&&LAYOUT_MODEL.imageRendering.webkitBackfaceVisibility&&(b.style["-webkit-backface-visibility"]="hidden"),M.fontFamily=STATE.overrides.pageTextFont,M.fontColor=STATE.overrides.pageTextFontColor,M.fontSize=STATE.overrides.pageTextFontSize,M.letterSpacing=STATE.overrides.pageTextKerning,Tween(y,y.updateSpeed,{backgroundColor:STATE.mediaView.backgroundColor()})}function v(e){STATE.section(y.section),layoutCalcs.activeMediaType=y.type,V=Math.round(STATE.mediaView.maskX()),I=Math.round(STATE.mediaView.maskY(y.section.key));var t=STATE.mediaView.maskWidth(y.element.offsetWidth);if(N=Math.round(STATE.mediaView.maskWidth(y.element.offsetWidth)),z=Math.round(STATE.mediaView.maskHeight(y.element.offsetHeight,y.section.key)),STATE.overrides.pageMaxWidth&&N>STATE.overrides.pageMaxWidth)switch(N=STATE.overrides.pageMaxWidth,STATE.overrides.pageMaxAlign){case"center":V+=Math.round(.5*(t-N));break;case"right":V+=Math.round(t-N)}b&&L()&&!A()&&(V+=P+R,N-=P+R,Tween(b,y.updateSpeed,{x:V-P-R,y:I})),!H&&A()?(b&&(y.removeChild(b),b=void 0),o(),D=s(M.element),_=D.filter(function(e){return"img"===e.tagName.toLowerCase()}).map(r)):H&&!A()&&(M.text="",o(),D=s(M.element),_=D.filter(function(e){return"img"===e.tagName.toLowerCase()}).map(r)),Tween(w,0,{x:V,y:I,width:N}),Tween(M,0,{width:N}),S(),x&&x.length>0&&((isPod()||isPad())&&(w.style.overflow="auto",w.style["-webkit-overflow-scrolling"]="touch"),Tween.defer(M,UPDATE_SPEED,{alpha:1})),m()}function S(){if(x){var e=x[0];if(e&&"iframe"===e.tagName.toLowerCase())e.style.overflow="hidden",e.style.width=N+"px",e.style.height=z+"px",e.style.border="none";else if(e){var t=Math.round(STATE.mediaView.maskHeight(M.element.offsetHeight,y.section.key)),i=Math.round(STATE.mediaView.maskHeight(void 0,y.section.key)),n=t>i?t:i;e.style.overflow="hidden",e.style.width=N-e.offsetLeft+"px",e.style.height=n-e.offsetTop+"px",e.style.border="none"}}if(U){var o=U[0];o&&(o.style.overflow="hidden",o.style.width=N-o.offsetLeft+"px",o.style.border="none")}if(_){var r=_.length;if(r>0)for(;r--;){var l=_[r],s=l.getAttribute("data-src")?l.getAttribute("data-src").replace(B,""):"";if(s&&y.mediaItem.size.pageImages){var d=window.getComputedStyle(l),c=d.getPropertyValue("max-width"),h=l.getAttribute("width"),u=l.getAttribute("height");if(l.metaLoaded)l.originalWidth?l.style.width=l.originalWidth:h?l.style.width=h+"px":l.style.removeProperty("width"),l.originalHeight?l.style.height=l.originalHeight:u?l.style.height=u+"px":l.style.removeProperty("height"),"none"===c&&(l.style.maxWidth="100%");else{var T=y.mediaItem.size.pageImages.filter(a(s)),E=T[0]||{},m=E.width||l.naturalWidth,g=E.height||l.naturalHeight,p=parseFloat(d.getPropertyValue("width"),10)||h||m,L=(p>N?N:p)||N,f=g/m;l.style.width=L+"px",l.style.height=f*L+"px"}}}}}function O(t){y.updateSpeed=0;var i=RetinaResizeEngine({width:b.element.offsetWidth,height:b.element.offsetHeight,filename:b.src});P=Math.round(i.width),Y=Math.round(i.height),b.width=P,b.height=Y,Tween(b,1,{alpha:1}),y.updateSpeed=STATE.mediaView.transitionDuration(),y.events.dispatchEvent(MEDIA_LOADED,{type:"featuredImage",id:e.mediaItem.id,width:b.width,height:b.height})}function C(e){k.removeEventListener(RESIZE,v),k.removeEventListener(LAYOUT_MODEL_CHANGE,v),k.removeEventListener("destroy",C),k.removeEventListener("showCursor",t),k.removeEventListener("hideCursor",i),b&&b.removeEventListener(LOAD,O),y.removeEventListener(CHILD_ADDED,l)}function A(){if(USER_AGENT===MOBILE)return!0;var e=STATE.overrides.pageMaxWidth||LAYOUT_MODEL.screenWidthBreakpoint||1e3;if(stage.widthe}var b,y=new Sprite({events:e.localEvents}),M=new Sprite,w=new Sprite;w.id="pageViewMask";var _,D,U,x,V,I,P=e.size.featuredImage.width||0,Y=e.size.featuredImage.height||0,R=30,N=0,z=0,k=e.localEvents,B=SETTINGS_MODEL.cdnSslUri+"/";y.mediaItem=e.mediaItem,y.section=e.section;var H=A();if(y.alpha=0,M.alpha=0,y.updateSpeed=0,y.setClass("dx_page_text"),w.setClass("pageviewMask"),M.setClass("ql-editor"),y.id=e.mediaItem.id,y.type=e.mediaItem.type,y.dims=e.size.content,y.element.navigationCursor=!0,y.overflow="hidden",w.overflow="hidden",M.selectable=!0,y.selectable=!0,w.selectable=!0,M.selectable=!0,k.addEventListener(RESIZE,v),k.addEventListener(LAYOUT_MODEL_CHANGE,n),k.addEventListener("destroy",C),k.addEventListener("showCursor",t),k.addEventListener("hideCursor",i),y.addEventListener(CHILD_ADDED,l),!isSlideshowGallery(y.section)&&e.mediaItem.attachment&&!LAYOUT_MODEL.attachmentGalleryBtnDisable){var F=buildAttachmentButton({alignHorizontal:LAYOUT_MODEL.attachmentGalleryBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.attachmentGalleryBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.attachmentGalleryBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.attachmentGalleryBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.attachmentGalleryBtnBlendMode||"difference",font:LAYOUT_MODEL.attachmentGalleryBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.attachmentGalleryBtnFontSize||12,fontColor:LAYOUT_MODEL.attachmentGalleryBtnFontColor||"#999999",iconColor:LAYOUT_MODEL.attachmentGalleryBtnFontColor||"#999999",icon:svgPaths.cloud,text:LAYOUT_MODEL.attachmentGalleryBtnText});F.zIndex=1,F.addEventListener("click",function(t){y.events.dispatchEvent("attachmentDownload",e.mediaItem.attachment)}),y.addChild(F)}var G;return y.load=function(){L()&&!A()&&b&&b.dataSrc&&(b.src=b.dataSrc),y.loaded=!0,M.element.getElementsByClassName("no-lazy-load").length||T(D),v()},y.unload=function(){},y.show=function(){y.display="block",Tween(y,UPDATE_SPEED,{alpha:1})},y.hide=function(){Tween(y,UPDATE_SPEED,{alpha:0,onComplete:function(){y.display="none"}})},y.updatePosition=v,y}function VideoView(e){function t(){return STATE.lightboxSection&&!LAYOUT_MODEL.lightboxGalleryBtnDisable&&!LAYOUT_MODEL.lightboxVideoDisable}function i(){isSlideshowGallery(G.section)||(j.element.navigationCursor=!0,Z.element.navigationCursor=!0),K&&(K.element.navigationCursor=j.element.navigationCursor),Q&&(Q.top.element.navigationCursor=j.element.navigationCursor,Q.right.element.navigationCursor=j.element.navigationCursor,Q.bottom.element.navigationCursor=j.element.navigationCursor,Q.left.element.navigationCursor=j.element.navigationCursor)}function n(){j.element.navigationCursor=!1,Z.element.navigationCursor=!1,K&&(K.element.navigationCursor=j.element.navigationCursor),Q&&(Q.top.element.navigationCursor=j.element.navigationCursor,Q.right.element.navigationCursor=j.element.navigationCursor,Q.bottom.element.navigationCursor=j.element.navigationCursor,Q.left.element.navigationCursor=j.element.navigationCursor)}function o(){STATE.section(G.section),isSlideshowGallery(G.section)||(j.element.navigationCursor=!0,Z.element.navigationCursor=!0),j.element.addEventListener("contextmenu",a),j.element.addEventListener("dragstart",a),G.element.style["user-select"]="none",Z.element.style["user-select"]="none",j.element.style["user-select"]="none",ee.addEventListener(CLICK,v),"spinner"===STATE.overrides.imageVideoLoaderType&&(q=new LoadingIndicator({color:e.loaderColor}),q.zIndex=2,Z.addChild(q)),G.addChild(Z),Z.addChild(j),Z.addChild(ee)}function a(e){var t=void 0===SETTINGS_MODEL.disableRightClick||SETTINGS_MODEL.disableRightClick;t&&e.preventDefault()}function r(e){e===G.id?!K||K.paused?G.play(!0):K&&!K.paused&&K.src&&K.pause():K&&K.src&&(K.paused||K.pause())}function l(e){e===G.id?(G.play(),x()):K&&K.src&&(K.paused||K.pause())}function s(){isVimeo(e.mediaItem)&&(K.pointerEvents="none")}function d(){isVimeo(e.mediaItem)&&(K.pointerEvents="auto")}function c(){STATE.section(G.section),ee.transition=0,ee.width=70,ee.height=70,h(),STATE.overrides.videoAutoPlay||setTimeout(function(){Tween(ee,UPDATE_SPEED,{alpha:1})},10)}function h(){ee.transition=0,setTimeout(function(){ee.x=j.x+.5*(j.width-70),ee.y=j.y+.5*(j.height-70)},10)}function u(){me&&!isSlideshowGallery(G.section)&&(K&&K.pause(),G.events.removeEventListener(TRANSITION_END,g),isVimeo(e.mediaItem)&&(ee.display="block"),K.removeKeyListener())}function T(e){K&&(u(e),G.events.removeEventListener(PAUSE_MEDIA,u),Z.removeChild(K),K.destroy(),G.events.removeEventListener(DESTROY_MEDIA,T))}function E(){var e=new Sprite;return e.element.className="vimeoMask",e.element.navigationCursor=j.element.navigationCursor,e}function m(){return{top:E(),right:E(),bottom:E(),left:E()}}function g(){STATE.section(G.section);var t={events:Le};USER_AGENT===MOBILE&&STATE.overrides.mobileAutoPlay&&(t.thumbBuild=!0),isVimeo(e.mediaItem)&&!K?(K=new VimeoPlayer(t),K.element.navigationCursor=j.element.navigationCursor,G.video=K,K.addEventListener(VIMEO_METADATA_LOADED,O),Z.addChild(K),isPod()||isSlideshowGallery(G.section)||(Q=m(),Z.addChild(Q.top),Z.addChild(Q.right),Z.addChild(Q.bottom),Z.addChild(Q.left),Q.top.element.navigationCursor=j.element.navigationCursor,Q.right.element.navigationCursor=j.element.navigationCursor,Q.bottom.element.navigationCursor=j.element.navigationCursor,Q.left.element.navigationCursor=j.element.navigationCursor),USER_AGENT===MOBILE?(K.zIndex=20,K.alpha=.01):K.alpha=.01):K||(K=new VideoPlayer({alwaysMuted:isSlideshowGallery(G.section),parent:Z,events:e.localEvents}),/disabled/.test(LAYOUT_MODEL.navCursorType)||isSlideshowGallery(G.section)?K.addEventListener(CLICK,function(e){!K.element.paused&&K.element.muted&&"block"===K.unmuteBtn.display?K.unmuteClick():!K.element.paused&&K.element.muted?K.hud.unmute():K.togglePlay(e)}):(isPod()||isPad())&&(K.addEventListener(CLICK,function(e){K.hud.show(),clearTimeout($),$=setTimeout(function(){K.paused||K.hud.hide()},3e3)}),K.hud.addEventListener(CLICK,function(e){K.hud.show(),clearTimeout($),$=setTimeout(function(){K.paused||K.hud.hide()},3e3)})),K.element.navigationCursor=j.element.navigationCursor,G.video=K,K.addEventListener(METADATA_LOADED,S,!1),K.addEventListener(ERROR,C,!1),Z.addChild(K),K.display="none",K.alpha=0,STATE.overrides.videoLoop&&!isSlideshowGallery(G.section)&&K.element.setAttribute("loop",!0)),K.addEventListener(PAUSED,p),K.addEventListener(PLAY,L),K.addEventListener("playbackEnd",f)}function p(){isPod()&&(K.display="none"),P("paused")}function L(){STATE.section(G.section),USER_AGENT===MOBILE&&STATE.overrides.mobileAutoPlay?(K.display="block",K.alpha=.01):isPod()&&(K.display="block",K.alpha=1),P("playing"),G.events.dispatchEvent(PLAY)}function f(){isVimeo(e.mediaItem)&&(ee.display="block",P("ended")),G.events.dispatchEvent("playbackEnd")}function v(){q&&Tween(q,UPDATE_SPEED,{alpha:1}),g(),G.play(!0),!isVimeo(e.mediaItem)&&K&&(isPod()||isPad())&&(clearTimeout($),$=setTimeout(function(){K.paused||K.hud.hide()},3e3))}function S(t){ge=!0,isSlideshowGallery(G.section)||e.mediaItem.hideControls||K.hud.enable(),K.removeEventListener(METADATA_LOADED,S,!1),K.removeEventListener(ERROR,C,!1),A(t.target),K.display="block",de=t.target.videoWidth,ce=t.target.videoHeight,MEDIA_MODEL[G.id].size.content.width=t.target.videoWidth,MEDIA_MODEL[G.id].size.content.height=t.target.videoHeight,G.dispatchEvent(MEDIA_LOADED,{type:"video",id:e.mediaItem.id,width:t.target.videoWidth,height:t.target.videoHeight}),G.events.dispatchEvent(MEDIA_LOADED,{type:"video",id:e.mediaItem.id,width:t.target.videoWidth,height:t.target.videoHeight})}function O(t){ge=!0,K.removeEventListener(VIMEO_METADATA_LOADED,O),de=this.videoWidth,ce=this.videoHeight,MEDIA_MODEL[G.id].size.content.width=this.videoWidth,MEDIA_MODEL[G.id].size.content.height=this.videoHeight,A(this),setTimeout(function(){x(t),G.dispatchEvent(MEDIA_LOADED,{type:"vimeo",id:e.mediaItem.id,width:de,height:ce}),G.events.dispatchEvent(MEDIA_LOADED,{type:"vimeo",id:e.mediaItem.id,width:de,height:ce})},200)}function C(){q&&(q.removeLoader(),Z.removeChild(q))}function A(e){me=!0,G.videoLoaded=!0,G.updateSpeed=0,de!==e.videoWidth&&(de=e.videoWidth),ce!==e.videoHeight&&(ce=e.videoHeight),x(),b(),q&&(q.removeLoader(),Z.removeChild(q)),Tween(j,UPDATE_SPEED,{alpha:0,onComplete:function(){j.display="none"}})}function b(){STATE.section(G.section),isSlideshowGallery(G.section)&&"fade"===STATE.overrides.transitionType?G.backgroundColor="transparent":USER_AGENT===MOBILE?Tween(G,G.updateSpeed,{backgroundColor:LAYOUT_MODEL.containerColorMobile||STATE.mediaView.backgroundColor()}):USER_AGENT===TABLET?Tween(G,G.updateSpeed,{backgroundColor:LAYOUT_MODEL.containerColorTablet||STATE.mediaView.backgroundColor()}):Tween(G,G.updateSpeed,{backgroundColor:STATE.mediaView.backgroundColor()}),X&&setTimeout(y,1e3*G.updateSpeed)}function y(){STATE.section(G.section),layoutCalcs.activeMediaType=G.type,X.container.transition=0,firstValid(J.captionCloseButton,STATE.overrides.captionCloseButton)?X.showCloseButton():X.hideCloseButton();var t={onInit:function(){X.scroll&&X.scroll.hide()},onComplete:function(){X.scroll&&(X.scroll.show(),X.scroll.resize())}},i=J.captionBackgroundRectColor||STATE.overrides.captionBackgroundRectColor,n=firstValid(J.captionBackgroundAlpha,STATE.overrides.captionBackgroundAlpha);if(X.backgroundColor=toRgba(i,n),X.fontFamily=J.captionFont||STATE.overrides.captionFont,X.fontSize=stage.width-1)){fe=t,STATE.section(G.section),layoutCalcs.activeMediaType=G.type;var o=getCaptionText(e.mediaItem);X.text=plainTextToHtml(o);var a=_(firstValid(e.mediaItem.overrides.captionAnchorTo,STATE.overrides.captionAnchorTo));(!showPosterImage(e.mediaItem)||pe)&&a&&(i||fe&&fe.mode&&(n||fe.mode.indexOf("caption")>-1))&&X.show(y)}}}function U(){X.hide(),X.scroll&&X.scroll.destroy()}function x(){STATE.section(G.section),j&&LAYOUT_MODEL.imageRendering.optimizeQuality&&(j.style["image-rendering"]="optimizeQuality"),j&&LAYOUT_MODEL.imageRendering.webkitOptimizeContrast&&(j.style["image-rendering"]="-webkit-optimize-contrast"),j&&"Safari"===BROWSER_NAME&&LAYOUT_MODEL.imageRendering.webkitBackfaceVisibility&&(j.style["-webkit-backface-visibility"]="hidden"),layoutCalcs.activeMediaType=G.type,le=STATE.mediaView.maskWidth(G.width),se=STATE.mediaView.maskHeight(G.height,G.section.key),h(),D(fe),Tween(Z,G.updateSpeed,{x:STATE.mediaView.maskX(),y:STATE.mediaView.maskY(G.section.key),width:le,height:se,onComplete:function(){h()}}),q&&H(),isVimeo(e.mediaItem)&&isPod()||pe||q&&Tween(q,UPDATE_SPEED,{alpha:1}),pe&&!me&&I(),me&&P()}function V(){G.updateSpeed=0,pe=!0,x(),I(),q&&Tween(q,UPDATE_SPEED,{alpha:0}),G.events.dispatchEvent(MEDIA_LOADED,{type:"posterImage",id:e.mediaItem.id,width:te,height:ie}),G.updateSpeed=UPDATE_SPEED,ee.addEventListener(LOAD,c),ee.src=ICONS+"play@2x.png",D(fe),"Safari"===BROWSER_NAME&&/hScroll/.test(STATE.overrides.transitionType)&&j.element.setAttribute("nopin","nopin")}function I(){STATE.section(G.section),layoutCalcs.activeMediaType=G.type,le=STATE.mediaView.maskWidth(G.width),se=STATE.mediaView.maskHeight(G.height,G.section.key);var e=Resize({},0,{type:STATE.mediaView.imageScaleType(),width:te,height:ie,hRange:le,vRange:se,hAlign:STATE.mediaView.hAlign(),vAlign:STATE.mediaView.vAlign(),disableOrientationCheck:getOrientationCheck(G.type)});ne=Math.ceil(e.scale.width),oe=Math.ceil(e.scale.height),ae=Math.floor(e.align.x),re=Math.floor(e.align.y),Tween(j,G.updateSpeed,{x:ae,y:re,width:ne,height:oe,onComplete:function(){setTimeout(function(){STATE.section(G.section),isSlideshowGallery(G.section)||Tween(j,STATE.mediaView.transitionDuration(),{alpha:1,ease:"cubic-bezier(0.7, 0, 0.3, 1)"})},1e3)}}),X&&y()}function P(t){STATE.section(G.section),layoutCalcs.activeMediaType=G.type,t&&(G.playState=t),K.display="block",setTimeout(function(){K.display="block"},1e3),le=STATE.mediaView.maskWidth(G.width),se=STATE.mediaView.maskHeight(G.height,G.section.key);var i=Resize({},0,{type:STATE.mediaView.videoScaleType(isVimeo(e.mediaItem)),width:de,height:ce,hRange:le,vRange:se,hAlign:STATE.mediaView.hAlign(),vAlign:STATE.mediaView.vAlign(),disableOrientationCheck:getOrientationCheck(G.type)});if(Te=Math.floor(i.align.x),Ee=Math.floor(i.align.y),he=Math.ceil(i.scale.width),ue=Math.ceil(i.scale.height),he&&ue){if(Tween(K,0,{x:Te,y:Ee,width:he,height:ue,onComplete:function(){Tween(K,0,{alpha:1,ease:"cubic-bezier(0.7, 0, 0.3, 1)"})}}),K.setSize(he,ue,G.updateSpeed),k(i),K.hud){var n=Math.floor(i.align.x),o=Math.floor(i.align.y),a=he,r=ue;he>STATE.mediaView.maskWidth()&&"hScroll"!==STATE.overrides.transitionType?(n=0,a=STATE.mediaView.maskWidth(),r=STATE.mediaView.maskHeight(void 0,G.section.key)):ue>STATE.mediaView.maskHeight(void 0,G.section.key)&&(o=0,a=STATE.mediaView.maskWidth(),r=STATE.mediaView.maskHeight(void 0,G.section.key)),K.hud.resize(G.updateSpeed,n,o,a,r);var l=i.align.x>0?i.align.x:0,s=i.align.y>0?i.align.y:0;K.unmuteBtn.x=Math.round(l)+20,K.unmuteBtn.y=Math.round(s)+20}X&&y()}}function Y(){return{banner:{width:0,height:0},hdpopup:{width:170,height:180},shareCtrls:{width:50,height:180},videoCtrls:{width:he,height:50}}}function R(){return{banner:{width:550,height:180},hdpopup:{width:170,height:180},shareCtrls:{width:50,height:180},videoCtrls:{width:he,height:50}}}function N(){return{banner:{width:550,height:180},hdpopup:{width:170,height:180},shareCtrls:{width:50,height:180},videoCtrls:{width:he,height:50}}}function z(){return"ended"===G.playState?N():"paused"===G.playState?R():Y()}function k(e){if(Q){var t=z();isPad()&&(t.banner.width=540,t.banner.height=170);var i=.5*(he-t.banner.width),n=.5*(ue-t.banner.height);Q.top.x=e.align.x,Q.top.y=e.align.y,Q.top.width=he-t.shareCtrls.width,Q.top.height=n,Q.right.x=e.align.x+he-i,Q.right.y=e.align.y+t.shareCtrls.height,Q.right.width=i,Q.right.height=ue-t.shareCtrls.height-t.hdpopup.height,Q.bottom.x=e.align.x,Q.bottom.y=e.align.y+ue-n,Q.bottom.width=he-t.hdpopup.width,Q.bottom.height=n-t.videoCtrls.height,Q.left.x=e.align.x,Q.left.y=e.align.y,Q.left.width=i,Q.left.height=ue-t.videoCtrls.height}}function B(t){t.id===e.mediaItem.id&&(e.mediaItem.thumb!==t.thumb,e.mediaItem.content!==t.content)}function H(){STATE.section(G.section),q&&(q.transition=0,q.x=.5*(STATE.mediaView.maskWidth(G.width)-q.width),q.y=.5*(STATE.mediaView.maskHeight(G.height,G.section.key)-q.height))}function F(){G.events.removeEventListener(PAUSE_MEDIA,u),G.events.removeEventListener(DESTROY_MEDIA,T),G.events.removeEventListener(TRANSITION_END,g),G.events.removeEventListener(ADMIN_MOUSE_DOWN,s),G.events.removeEventListener(ADMIN_MOUSE_UP,d),Le.removeEventListener(RESIZE,x),Le.removeEventListener(LAYOUT_MODEL_CHANGE,x),Le.removeEventListener("mediaSizeUpdate",x),Le.removeEventListener(MEDIA_MODEL_CHANGE,B),Le.removeEventListener("mediaAutoPlay",l),Le.removeEventListener("spacebarTogglePlay",r),Le.removeEventListener("destroy",F),Le.removeEventListener("showCursor",i),Le.removeEventListener("hideCursor",n),j.removeEventListener(LOAD,V),K&&(K.element.removeEventListener("webkitendfullscreen",f),isVimeo(e.mediaItem)?K.removeEventListener(VIMEO_METADATA_LOADED,O):K.element.removeEventListener(METADATA_LOADED,S,!1),K.destroy()),G.removeEventListener(CHILD_ADDED,o)}var G=new Sprite({events:e.localEvents});if(G.alpha=0,G.updateSpeed=0,G.overflow="hidden",G.id=e.mediaItem.id,G.type=e.mediaItem.type,G.dims=e.size.content,G.section=e.section,G.state=e.state,G.mediaItem=e.mediaItem,e.mediaItem.thumb.length||(MEDIA_MODEL[G.id].size.thumb.width=1200,MEDIA_MODEL[G.id].size.thumb.height=800),/mp4/.test(e.mediaItem.thumb)){var j=new Sprite({type:"video"});j.element.setAttribute("muted",!0),j.element.setAttribute("autoplay",!0),j.element.setAttribute("loop",!0),j.element.setAttribute("playsinline",!0),j.element.setAttribute("type","video/mp4")}else var j=new Bitmap;j.alpha=0,j.zIndex=1;var W,Z=new Sprite;Z.element.className="video.mask";var X,K,q,J,Q,$,ee=new Bitmap,te=e.size.thumb.width,ie=e.size.thumb.height,ne=0,oe=0,ae=0,re=0,le=0,se=0,de=e.size.content.width,ce=e.size.content.height,he=0,ue=0,Te=0,Ee=0,me=!1,ge=!1,pe=!1,Le=e.localEvents,fe=e.state,ve=getCaptionText(e.mediaItem);if(ve&&STATE.overrides.captionMobileOverrides){var Se=1,Oe=new Svg;Oe.left=0,Oe.top=0,Oe.rotate=0,Oe.path=new Path,Oe.path.scale=Se,Oe.width=15*Se,Oe.height=15*Se,Oe.path.d=svgPaths.navInfo[LAYOUT_MODEL.navbarIconSet],Oe.path.strokeWidth="thin"===LAYOUT_MODEL.navbarIconSet?1:0,Oe.path.fill="thin"===LAYOUT_MODEL.navbarIconSet?"none":LAYOUT_MODEL.navbarColor,Oe.path.stroke="thin"===LAYOUT_MODEL.navbarIconSet?LAYOUT_MODEL.navbarColor:"none",Oe.addChild(Oe.path);var Ce=buildAlignedButton({alignHorizontal:"right",alignVertical:"top",horizontalOffset:25,verticalOffset:20,blendMode:"normal",font:"Helvetica",fontSize:12,fontColor:"#999999"});Ce.zIndex=1,Ce.addChild(Oe),Ce.addEventListener("click",function(t){if(X)if(X.isShowing)X.hide();else{var i=getCaptionText(e.mediaItem);X.text=plainTextToHtml(i),X.show(y)}}),G.addChild(Ce)}if(t()&&STATE.lightboxButtonsEnabled()&&!G.mediaItem.disableLightbox){var Ae=STATE.lightboxSection.media.indexOf(G.mediaItem.id),be=buildAlignedButton({alignHorizontal:LAYOUT_MODEL.lightboxGalleryBtnAlignHorizontal||"left",alignVertical:LAYOUT_MODEL.lightboxGalleryBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.lightboxGalleryBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.lightboxGalleryBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.lightboxGalleryBtnBlendMode||"difference",font:LAYOUT_MODEL.lightboxGalleryBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.lightboxGalleryBtnFontSize||12,fontColor:LAYOUT_MODEL.lightboxGalleryBtnFontColor||"#999999"});if(be.zIndex=1,be.text=Ae>-1?LAYOUT_MODEL.lightboxGalleryBtnRemoveText||"- Lightbox":LAYOUT_MODEL.lightboxGalleryBtnAddText||"+ Lightbox",be.addEventListener("click",function(e){var t,i=STATE.lightboxSection.media.indexOf(G.mediaItem.id);i>-1?(be.text=LAYOUT_MODEL.lightboxGalleryBtnAddText||"+ Lightbox",t="remove"):(be.text=LAYOUT_MODEL.lightboxGalleryBtnRemoveText||"- Lightbox",t="add"),G.events.dispatchEvent("lightboxUpdateItem",{action:t,id:G.mediaItem.id}),be.cursor="pointer"}),G.addChild(be),e.section.isLightbox&&!LAYOUT_MODEL.lightboxGalleryDownloadBtnDisable){var ye=buildAlignedButton({alignHorizontal:LAYOUT_MODEL.lightboxDownloadBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.lightboxDownloadBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.lightboxDownloadBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.lightboxDownloadBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.lightboxDownloadBtnBlendMode||"difference",font:LAYOUT_MODEL.lightboxDownloadBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.lightboxDownloadBtnFontSize||12,fontColor:LAYOUT_MODEL.lightboxDownloadBtnFontColor||"#999999"});ye.text=LAYOUT_MODEL.lightboxDownloadBtnText||"↓",ye.zIndex=1,ye.addEventListener("click",function(e){G.events.dispatchEvent("lightboxDownloadOverlayOpen")}),G.addChild(ye)}}if(!isSlideshowGallery(G.section)&&e.mediaItem.attachment&&!LAYOUT_MODEL.attachmentGalleryBtnDisable){var Me=buildAttachmentButton({alignHorizontal:LAYOUT_MODEL.attachmentGalleryBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.attachmentGalleryBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.attachmentGalleryBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.attachmentGalleryBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.attachmentGalleryBtnBlendMode||"difference",font:LAYOUT_MODEL.attachmentGalleryBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.attachmentGalleryBtnFontSize||12,fontColor:LAYOUT_MODEL.attachmentGalleryBtnFontColor||"#999999",iconColor:LAYOUT_MODEL.attachmentGalleryBtnFontColor||"#999999",icon:svgPaths.cloud,text:LAYOUT_MODEL.attachmentGalleryBtnText});Me.zIndex=1,Me.addEventListener("click",function(t){G.events.dispatchEvent("attachmentDownload",e.mediaItem.attachment)}),G.addChild(Me)}Z.overflow="hidden",ee.width=70,ee.height=70,ee.alpha=0,ee.zIndex=4,G.addEventListener(CHILD_ADDED,o),G.events.addEventListener(PAUSE_MEDIA,u),G.events.addEventListener(DESTROY_MEDIA,T),G.events.addEventListener(ADMIN_MOUSE_DOWN,s),G.events.addEventListener(ADMIN_MOUSE_UP,d),Le.addEventListener(RESIZE,x),Le.addEventListener(LAYOUT_MODEL_CHANGE,function(){K&&(isVimeo(e.mediaItem)?STATE.overrides.videoLoop?K.setLoop("true"):K.setLoop("false"):STATE.overrides.videoLoop?K.element.setAttribute("loop",!0):K.element.removeAttribute("loop")),x()}),Le.addEventListener("mediaSizeUpdate",x),Le.addEventListener(MEDIA_MODEL_CHANGE,B),Le.addEventListener("mediaAutoPlay",l),Le.addEventListener("spacebarTogglePlay",r),Le.addEventListener("destroy",F),Le.addEventListener("showCursor",i),Le.addEventListener("hideCursor",n);var ve=getCaptionText(e.mediaItem);return X||""===ve||(X=new Caption,X.container.zIndex=3,J=e.mediaItem.overrides||{},Le.addEventListener("showCaption",D),Le.addEventListener("hideCaption",U),Le.addEventListener("checkCaption",M),w(ve)),G.load=function(){STATE.section(G.section),G.loaded=!0,G.playState=STATE.overrides.videoAutoPlay?"playing":"paused",""!==ve&&(G.addChild(X.container),y()),showPosterImage(e.mediaItem)?/mp4/.test(e.mediaItem.thumb)?(j.element.addEventListener(METADATA_LOADED,function(e){V(),this.muted=!0,this.play()}),j.src=cdnMediaPath(e.mediaItem.thumb,e.mediaItem.demoFile)):(j.addEventListener(LOAD,V),e.mediaItem.thumb.length?j.src=cdnMediaPath(e.mediaItem.thumb,e.mediaItem.demoFile):j.src=ICONS+"videoLarge2.png"):K||(g(),STATE.overrides.videoAutoPlay&&USER_AGENT!==MOBILE&&USER_AGENT!==TABLET||K.setSource(e.mediaItem.content,!1),D(fe))},G.unload=function(){},G.play=function(t){Le.dispatchEvent(PAUSE_MEDIA),setTimeout(function(){STATE.section(G.section),t=void 0!==t?t:STATE.overrides.videoAutoPlay,K&&K.src?K.play():K&&!K.src?K.setSource(e.mediaItem.content,t):K||(g(),K.setSource(e.mediaItem.content,t)),q&&(q.removeLoader(),q.zIndex=0),Tween(ee,UPDATE_SPEED,{alpha:0,onComplete:function(){ee.display="none"}}),isSlideshowGallery(G.section)&&!LAYOUT_MODEL.landingMediaUnmuteBtn&&("function"==typeof K.disableUnmuteButton&&K.disableUnmuteButton(),isVimeo(e.mediaItem)||K.hud.disable())},0)},G.pause=function(){K&&K.pause()},G.destroy=function(){T()},G.autoPlay=function(){G.play(!0),USER_AGENT!==MOBILE&&x()},G.hide=function(){1===G.alpha&&Tween(G,UPDATE_SPEED,{alpha:0,onComplete:function(){G.display="none"}})},G.show=function(){0===G.alpha&&(G.display="block",Tween(G,UPDATE_SPEED,{alpha:1}))},G.updatePosition=x,G}function OverlayController(e){function t(){y.thumbs&&y.thumbs.getTotalHeight()&&(y.overlayView.contentHeight=y.thumbs.getTotalHeight()),y.overlayView.updatePosition()}function i(){y.overlayView.show(),y.thumbs&&y.thumbs.show()}function n(){y.overlayView.hide(),y.thumbs.hide()}function o(e){if(f){var t=getSectionById(e.id),i=t&&t.key.indexOf(f.key)>-1;(e&&"thumb"===e.field||e.section===f||i)&&(_=!0,f=e.section?e.section:f,y.overlayView.section=f,y.overlayView.updatePosition(e),c({mode:L,section:f}),y.thumbs&&y.thumbs.resize()),f=e.section?e.section:f,y.overlayView.section=f}else y.thumbs&&(n(),y.thumbs.scroll&&y.thumbs.scroll.destroy(),y.overlayView.removeChild(y.thumbs),delete y.thumbs)}function a(e){y.inquiry&&y.inquiry.updateInquiryInfo()}function r(e){if(e&&y.share&&(y.share.updateStyle(e),y.share.updatePosition(e)),e&&y.inquiry&&(y.inquiry.updateStyle(e),y.inquiry.updatePosition(e)),e&&/overlay/.test(e.id)&&("overlay"===STATE.overrides.thumbnailDock||/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)))if(y.overlayView.updatePosition(e),"changeTemplate"===e.action);else{D=!0;var t=y.thumbs.savedScrollY;c({mode:L,section:f}),y.thumbs.savedScrollY=t,D=!0,d(),D=!1}if(e&&/attachmentThumbnail|paginated|static|thumbnail|menuWidth|menuAlignHorizontal|menuOffsetX|sitePaddingTop|sitePaddingRight|sitePaddingBottom|sitePaddingLeft/i.test(e.id)){if(y.overlayView.updatePosition(e),"changeTemplate"===e.action);else{D=!0;var t=y.thumbs.savedScrollY;c({mode:L,section:f}),y.thumbs.savedScrollY=t,D=!0,d(),D=!1}y.thumbs&&y.thumbs.resize()}}function l(e){(e.info.isMediaViewStateChange||e.info.isModeChange)&&y.overlayView.updatePosition(e),e.assetId&&(v=e.assetId),e.section&&STATE.section(e.section),STATE.siteView.unifiedPageScroll()&&/strip/.test(STATE.overrides.thumbnailType)?y.overlayView.position="fixed":y.overlayView.position="absolute",/inquiry|share|foto/.test(e.mode)?(y.overlayView.contentHeight=STATE.mediaView.zoneHeight(e.section.key),y.overlayView.show(),E(e),m(e),s(e)):(E(e),m(e),s(e)),c(e)}function s(t){if(t.section&&t.mode.indexOf("fotomoto")>-1){var i=csvToArray(t.section.media),n=getMediaById(i[t.assetId]);return window.FOTOMOTO&&n&&n.type===IMAGE&&window.FOTOMOTO.API.showWindow(10,SETTINGS_MODEL.cdnSslUri+"/"+n.content),setTimeout(function(){e.siteEvents.dispatchEvent("clearFotomotoMode","fotomoto")},100),!0}return!1}function d(e){if(y.thumbs&&STATE.section(y.thumbs.section),"unifiedSiteScrollVertical"!==STATE.overrides.siteDisplayBehavior&&y.thumbs&&!y.thumbs.scroll&&/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&(info&&info.isSectionChange&&!info.isModeChange&&hasMode("thumbs",L)?STATE.siteView.unifiedPageScroll()&&window.scrollTo(0,0):info&&!info.isSectionChange&&info.isModeChange&&hasMode("thumbs",L)?STATE.siteView.unifiedPageScroll()?window.scrollTo(0,y.thumbs.savedScrollY||0):y.thumbs.mask.scrollTop=y.thumbs.savedScrollY||0:(D||U)&&hasMode("thumbs",L)&&(STATE.siteView.unifiedPageScroll()?window.scrollTo(0,y.thumbs.savedScrollY||0):y.thumbs.mask.scrollTop=y.thumbs.savedScrollY||0)),y.thumbs&&/strip/.test(STATE.overrides.thumbnailType)&&hasMode("thumbs",L))if(y.thumbs.scroll&&!y.thumbs.mouseHover)y.thumbs.scroll.percent=v/(C.length-1),y.thumbs.scroll.update(UPDATE_SPEED),y.thumbs.lazyLoader&&y.thumbs.lazyLoader.update();else if("strip"===STATE.overrides.thumbnailType){var t=v/(C.length-1);if(/top|bottom/.test(STATE.overrides.thumbnailSide)){var i=y.thumbs.mask.grid.width-y.thumbs.mask.width;Anim.to(y.thumbs.mask,UPDATE_SPEED,{scrollLeft:Math.round(i*t),scrollTop:0,ease:TOUCH_DEVICE?"outQuart":"inOutCubic",onComplete:function(){y.thumbs&&y.thumbs.lazyLoader&&y.thumbs.lazyLoader.update()}})}else{var i=y.thumbs.mask.grid.height-y.thumbs.mask.height;Anim.to(y.thumbs.mask,UPDATE_SPEED,{scrollLeft:0,scrollTop:Math.round(i*t),ease:TOUCH_DEVICE?"outQuart":"inOutCubic",onComplete:function(){y.thumbs&&y.thumbs.lazyLoader&&y.thumbs.lazyLoader.update()}})}}}function c(t){if(L=t.mode||"",f=t.section||f,y.overlayView.section=f,M=t.info?t.info.isModeChange:L!==t.mode&&f===t.section,info=t.info?t.info:{},t.assetId>-1&&(v=t.assetId),S=t.path||S,t.section&&(C=t.section.mediaItems||C),/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&/thumbs/.test(L)?(e.siteEvents.dispatchEvent(PAUSE_MEDIA),setTimeout(function(){e.mediaView.scroll&&e.mediaView.scroll.hide()},20)):/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&setTimeout(function(){e.mediaView.scroll&&e.mediaView.scroll.show()},0),y.thumbs&&y.thumbs.section!==f&&(savedThumbsPosition=void 0),y.thumbs&&(y.thumbs.section!==f||_||D||U)&&(y.thumbs.scroll&&y.thumbs.scroll.destroy(),y.thumbs.lazyLoader&&delete y.thumbs.lazyLoader,y.overlayView.removeChild(y.thumbs),delete y.thumbs),C=t.section.media.filter(function(e){return null!==e}).filter(function(e){return!isSpacer(getSectionById(e))}).map(function(e){var t=e<1e4?p(getSectionById(e)):JSON.parse(JSON.stringify(getMediaById(e)));return t}).filter(function(e){return!!e&&!e.slideshow}),C.filter(function(e){return"link"!==e.type}).forEach(function(e,t){e.assetId=t}),t.section&&t.section.thumb)if(O=t.section.thumb,!y.thumbs&&L.indexOf("thumbs")>-1&&C.length&&("hPaginatedGrid"===STATE.overrides.thumbnailType?(y.thumbs=new PaginatedThumbs({assetId:v,path:S,mediaItems:C,settings:O,events:e.siteEvents,localEvents:e.localEvents,parent:e.siteView,scrollbarParent:b,section:f,thumbnailOnly:STATE.overrides.thumbnailOnly,isIndexSection:isIndexSection(f)}),y.overlayView.contentHeight=STATE.mediaView.zoneHeight(t.section.key)):(y.thumbs=new ThumbsModule({assetId:v,path:S,mediaItems:C,settings:O,events:e.siteEvents,localEvents:e.localEvents,parent:e.siteView,scrollbarParent:b,section:f,thumbnailOnly:STATE.overrides.thumbnailOnly,isIndexSection:isIndexSection(f)}),y.overlayView.contentHeight="strip"===STATE.overrides.thumbnailType&&"unifiedSiteScrollVertical"===STATE.overrides.siteDisplayBehavior?STATE.mediaView.zoneHeight(t.section.key):y.thumbs.getTotalHeight()),y.thumbs.section=f,y.thumbs.settings=O,y.overlayView.addChild(y.thumbs)),y.thumbs&&(isInMediaOverlay()?parallax.init(y.thumbs.mask.element):STATE.siteView.unifiedPageScroll()||/^unified/.test(STATE.overrides.siteDisplayBehavior)?parallax.init(window):parallax.init(y.thumbs.mask.element)),y.thumbs&&L.indexOf("thumbs")>-1&&(!y.thumbs.toggleState()||_||D||U))setTimeout(function(){h(),d(t),i()},1300*UPDATE_SPEED);else if(y.thumbs&&y.thumbs.toggleState()&&L.indexOf("thumbs")===-1)if(M)if(h(),STATE.siteView.unifiedPageScroll()||/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior)&&"multiple"===layoutCalcs.sectionDisplayMode||"strip"===STATE.overrides.thumbnailType)n();else{setTimeout(function(){n()},0)}else e.siteEvents.addEventListener(TRANSITION_START,u);setTimeout(function(){T(t),L.indexOf("thumbs")>-1&&d(t)},20),M=!1,_=!1,D=!1,U=!1}function h(){"strip"===STATE.overrides.thumbnailType&&"displace"===STATE.overrides.thumbnailDock&&e.siteEvents.dispatchEvent("thumbStripDisplaceChange")}function u(){e.siteEvents.removeEventListener(TRANSITION_START,u),1===LAYOUT_MODEL.overlayAlpha&&e.siteEvents.dispatchEvent("OPAQUE_OVERLAY_CLOSE"),n()}function T(){y.thumbs&&(v>-1?y.thumbs.highlight(v):y.thumbs.highlight(-1))}function E(t){return t.mode.indexOf("share")>-1?(y.share||(y.share=new ShareView(Object.assign({},e,{section:t.section})),y.share.pointerEvents="auto",y.overlayView.addChild(y.share)),y.share.updateContent(t),y.share.show(),!0):(y.share&&y.share.hide(),!1)}function m(t){return t.mode.indexOf("inquiry")>-1?(y.inquiry||(y.inquiry=new InquiryView(Object.assign({},e,{section:t.section})),y.inquiry.pointerEvents="auto",y.overlayView.addChild(y.inquiry)),y.inquiry.updateContent(t),y.inquiry.show(),!0):(y.inquiry&&y.inquiry.hide(),!1)}function g(e){if(e.customThumb)return{name:e.customThumb,size:e.customThumbSize};if(e.media)for(var t=0;t9999){var i=getMediaById(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 p(e){var t;if(e){var i=getMediaById(e.media[0]),n=g(e);isOnlyLinkItem(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 L,f,v,S,O,C,A,b,y=new ControllerProxy({parentView:e.mediaView.mask,parentController:e.parentController,events:e.siteEvents}),M=!1,w=e.localEvents,_=!1,D=!1,U=!1;return y.overlayView=new OverlayView(e),y.overlayView.zIndex=STATE.overlayView.zIndex,y.lazyLoaderUpdate=function(){y.thumbs&&y.thumbs.lazyLoader&&y.thumbs.lazyLoader.update()},/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior)||isInMediaOverlay()?(b=e.mediaView,e.mediaView.addChild(y.overlayView)):(b=e.siteView,e.siteView.addChild(y.overlayView)),w.addEventListener("UPDATE_CONTENT_HEIGHT",function(e){f&&(A=f.key,STATE.section(f)),"strip"===STATE.overrides.thumbnailType?(y.overlayView.contentHeight=STATE.mediaView.zoneHeight(A),y.overlayView.updatePosition()):e.thumbs&&(y.overlayView.contentHeight=e.thumbs,y.overlayView.updatePosition())}),e.siteEvents.addEventListener(LAYOUT_MODEL_CHANGE,r),y.uriChange=l,e.siteEvents.addEventListener(SECTIONS_MODEL_CHANGE,o),e.siteEvents.addEventListener(MEDIA_MODEL_CHANGE,function(e){U=!0;var t=y.thumbs.savedScrollY;c({mode:L,section:f}),y.thumbs.savedScrollY=t,U=!0,setTimeout(function(){d(),U=!1},500)}),e.siteEvents.addEventListener(SETTINGS_MODEL_CHANGE,a),e.siteEvents.addEventListener("UPDATE_CONTENT_HEIGHT",t),e.siteEvents.addEventListener("holdersBuilt",function(){T(),d()}),y.destroy=function(){y.thumbs&&(y.thumbs.scroll&&y.thumbs.scroll.destroy(),y.thumbs.staticNav&&y.thumbs.removeStaticNav()),/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior)?e.mediaView.mask.removeChild(y.overlayView):e.siteView.removeChild(y.overlayView),e.siteEvents.removeEventListener(LAYOUT_MODEL_CHANGE,r),y.uriChange=l,e.siteEvents.removeEventListener(SECTIONS_MODEL_CHANGE,o),e.siteEvents.removeEventListener(SETTINGS_MODEL_CHANGE,a),e.siteEvents.removeEventListener("UPDATE_CONTENT_HEIGHT",t),e.siteEvents.removeEventListener("holdersBuilt",function(){thumbHoldersBuilt(),d()})},y.resize=function(e){y.overlayView.updatePosition(e),y.share&&y.share.updatePosition(e),y.inquiry&&y.inquiry.updatePosition(e),y.thumbs&&y.thumbs.resize()},y}function OverlayView(e){var t=new ViewProxy({events:e.events});t.zIndex=STATE.overlayView.zIndex,t.overflow=/hPaginatedGrid/.test(STATE.overrides.thumbnailType)?"initial":"hidden",t.pointerEvents=/hMasonryHScroll/.test(STATE.overrides.thumbnailType)?"auto":"none",t.display="none",t.updateSpeed=0,"Safari"===BROWSER_NAME&&(t.style["-webkit-backface-visibility"]="hidden",t.style.transform="translateZ(0)"),t.element.setAttribute("class","OverlayView"),t.addEventListener(CHILD_ADDED,function(){t.updatePosition()}),t.show=function(){t.display="block",Tween(t,UPDATE_SPEED,{alpha:1})},t.hide=function(){Tween(t,UPDATE_SPEED,{alpha:0,onComplete:function(){t.display="none"}})};var i=20;return t.updatePosition=function(){setTimeout(function(){if(t.section&&(t.sectionKey=t.section.key,STATE.section(t.section)),STATE.overrides.siteDisplayGalleryOnlyOverlay&&"open"===layoutCalcs.mediaOverlayState);else{t.overflow=/hPaginatedGrid/.test(STATE.overrides.thumbnailType)?"initial":"hidden";var e=/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior)||(STATE.siteView.unifiedPageScroll()||/unified/.test(LAYOUT_MODEL.siteDisplayBehavior))&&/overlay/.test(t.section.displayBehavior)&&STATE.overrides.siteDisplayGalleryOnlyOverlay?t.contentHeight||0:STATE.overlayView.zoneHeight();"unifiedSiteScrollVertical"===STATE.overrides.siteDisplayBehavior&&/strip/.test(STATE.overrides.thumbnailType)&&(e=STATE.mediaView.zoneHeight(t.sectionKey)),Tween.defer(t,0,{x:STATE.overlayView.x(),y:STATE.overlayView.y(t.sectionKey),width:STATE.overlayView.zoneWidth(),height:e}),t.updateSpeed=UPDATE_SPEED}},i)},t}function PaginatedThumbs(e){function t(e,t,i){var n=THUMB_SIZES[STATE.overrides.thumbnailSize].width+i,o=Math.floor((e+i)/n);return oMath.abs(n)-10&&(e.preventDefault(),e.stopPropagation()),u.x=i-t},!1),u.addEventListener(TOUCH_END,function(n){if(i-touchStartPointXRef>20){v=v-1>0?v-1:0;var o=T[v];Tween(u,.35,{x:-o.x,ease:EASE.cubic.out,onComplete:function(){0===v?(e.hide("prev"),e.show("next")):v===T.length-1?(e.hide("next"),e.show("prev")):e.show(),L.lazyLoader.update(),p=u.x}})}else if(i-touchStartPointXRef<-20){v=v+1Math.abs(n.deltaY)){var o=T[T.length-1].x;p-=Math.round(n.deltaX),p<-Math.abs(o)?(u.x=-Math.abs(o),p=-Math.abs(o)):p<0?u.x=p:p>=0&&(u.x=0,p=0),t=setTimeout(function(){v=Math.round(Math.abs(p)/o*(T.length-1));var t=T[v];Tween(u,.35,{x:-t.x,ease:EASE.cubic.inOut,onComplete:function(){0===v?(e.hide("prev"),e.show("next")):v===T.length-1?(e.hide("next"),e.show("prev")):e.show(),L.lazyLoader.update(),p=u.x}})},i)}})}function s(){return STATE.section(e.section),new StaticNav({zIndex:201,axis:"x",align:LAYOUT_MODEL.staticNavAlignment||"center",scale:LAYOUT_MODEL.staticNavIconScale||1,zone:{x:0,y:0,width:STATE.mediaView.zoneWidth(),height:STATE.mediaView.zoneHeight(L.section.key)},offset:{prevX:LAYOUT_MODEL.staticNavPrevOffsetX||0,prevY:LAYOUT_MODEL.staticNavPrevOffsetY||0,nextX:LAYOUT_MODEL.staticNavNextOffsetX||0,nextY:LAYOUT_MODEL.staticNavNextOffsetY||0},paths:{prev:{d:svgPaths.arrow3Left,fill:"none",stroke:LAYOUT_MODEL.cursorColor||"#333",strokeWidth:LAYOUT_MODEL.staticNavStrokeWidth||1},next:{d:svgPaths.arrow3Right,fill:"none",stroke:LAYOUT_MODEL.cursorColor||"#333",strokeWidth:LAYOUT_MODEL.staticNavStrokeWidth||1}},prevClick:function(e){v=v-1>0?v-1:0;var t=T[v];Tween(u,.35,{x:-t.x,ease:EASE.cubic.inOut,onComplete:function(){0===v?(e.hide("prev"),e.show("next")):v===T.length-1?(e.hide("next"),e.show("prev")):e.show(),L.lazyLoader.update(),p=u.x}})},nextClick:function(e){v=v+10&&(u=h(new Sprite),u.zIndex=1,u.element.className="paginated container",L.mask.element.className="paginated mask",L.mask.width=STATE.mediaView.zoneWidth(),L.mask.height=STATE.mediaView.zoneHeight(L.section.key),L.layout=function(){T.forEach(function(e,t){e.resize(),e.x=t*STATE.mediaView.zoneWidth()})},L.transition=new PaginatedSlideTransition({mediaView:L,mediaViewContainer:u,event:e.events}),L.resize=function(){h(u),v>T.length-1&&(v=T.length-1),L.staticNav&&(L.staticNav.resize({x:0,y:0,width:STATE.overlayView.zoneWidth(),height:STATE.mediaView.zoneHeight(L.section.key)}),T.length&&1!==T.length?0===v?(L.staticNav.hide("prev"),L.staticNav.show("next")):v===T.length-1?(L.staticNav.hide("next"),L.staticNav.show("prev")):L.staticNav.show():L.staticNav.hide()),L.layout(),T[v]&&Tween(u,.35,{x:-T[v].x})},L.removeStaticNav=function(){L.removeChild(L.staticNav)},L.staticNav=s(),L.swipeNav=l(L.staticNav),L.touchNav=r(L.staticNav),T.length&&1!==T.length?0===v?(L.staticNav.hide("prev"),L.staticNav.show("next")):v===T.length-1?(L.staticNav.hide("next"),L.staticNav.show("prev")):L.staticNav.show():L.staticNav.hide(),L.resize()),L.show=function(){L.display="block",T.forEach(function(e,t){e.show()}),g=!0},L.hide=function(){T.forEach(function(e){e.hide()}),setTimeout(function(){L.display="none"},1e3*UPDATE_SPEED),g=!1},L.toggleState=function(){return g},L.highlight=function(){if(u){var e=u.children[v];e&&e.highlight()}},L.mask.addChild(u),L.addChild(L.mask),L.addChild(L.staticNav),L}function PaginatedSlideTransition(e){function t(e,t){STATE.section(o.section);var t=void 0!==t?t:STATE.mediaView.transitionDuration();n.dispatchEvent(TRANSITION_START);var a=TOUCH_DEVICE?EASE.quart.out:EASE.cubic.inOut,r=i.children[e];if(r){var l=r.x,s=r.y;if(Tween(i,t,{translateX:-l,translateY:-s,ease:a,onComplete:function(){n.dispatchEvent(TRANSITION_END),o.lazyLoader&&o.lazyLoader.update()}}),USER_AGENT===MOBILE)for(var d=i.children,c=0;c1?(E=2*THUMB_SIZES[STATE.overrides.thumbnailSize].width+STATE.overrides.thumbnailGap,v=2*THUMB_SIZES[STATE.overrides.thumbnailSize].height+STATE.overrides.thumbnailGap,S=2*THUMB_SIZES[STATE.overrides.thumbnailSize].width+STATE.overrides.thumbnailGap,O=2*THUMB_SIZES[STATE.overrides.thumbnailSize].height+STATE.overrides.thumbnailGap):(E=THUMB_SIZES[STATE.overrides.thumbnailSize].width,v=THUMB_SIZES[STATE.overrides.thumbnailSize].height,S=THUMB_SIZES[STATE.overrides.thumbnailSize].width,O=THUMB_SIZES[STATE.overrides.thumbnailSize].height);var y=E,M=v;if(C.width=y,C.height=M,C.filename=o(l,E,v),C.original=a(l,E,v),isBlogFeed(e.section.id)?C.index=inverseAssetId(l.assetId,e.section.mediaItems.length-1):C.index=l.assetId,/mp4/.test(C.filename)?(C.thumb=new Sprite({type:"video"}),C.thumb.element.setAttribute("muted",!0),C.thumb.element.setAttribute("autoplay",!0),C.thumb.element.setAttribute("loop",!0),C.thumb.element.setAttribute("playsinline",!0),C.thumb.element.setAttribute("type","video/mp4")):C.thumb=new Bitmap,C.thumb.attempts=0,C.thumb.selectable=!1,C.thumb.zIndex=1,C.thumb.element.style.borderRadius=STATE.overrides.thumbnailCornerRadius+"px",!l.disableLightbox&&d(l.type)&&STATE.lightboxButtonsEnabled()){var _=STATE.lightboxSection.media.indexOf(l.id),x=buildAlignedButton({alignHorizontal:LAYOUT_MODEL.lightboxThumbnailBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.lightboxThumbnailBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.lightboxThumbnailBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.lightboxThumbnailBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.lightboxThumbnailBtnBlendMode||"difference",font:LAYOUT_MODEL.lightboxThumbnailBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.lightboxThumbnailBtnFontSize||12,fontColor:LAYOUT_MODEL.lightboxThumbnailBtnFontColor||"#999999"});if(x.zIndex=5,x.text=_>-1?LAYOUT_MODEL.lightboxThumbnailBtnRemoveText||"- Lightbox":LAYOUT_MODEL.lightboxThumbnailBtnAddText||"+ Lightbox",C.lightboxBtn=x,C.lightboxBtn.addEventListener("click",function(e){var t,i=STATE.lightboxSection.media.indexOf(l.id);i>-1?(x.text=LAYOUT_MODEL.lightboxThumbnailBtnAddText||"+ Lightbox",N.section.isLightbox&&(C.thumb.alpha=.15),t="remove"):(x.text=LAYOUT_MODEL.lightboxThumbnailBtnRemoveText||"- Lightbox",N.section.isLightbox&&(C.thumb.alpha=1),t="add"),C.lightboxBtn.cursor="pointer",N.events.dispatchEvent("lightboxUpdateItem",{action:t,id:l.id})}),C.addChild(x),!LAYOUT_MODEL.lightboxThumbnailDownloadBtnDisable&&N.section.isLightbox){var V=buildAlignedButton({alignHorizontal:LAYOUT_MODEL.lightboxThumbnailDownloadBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.lightboxThumbnailDownloadBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.lightboxThumbnailDownloadBtnHorizontalOffset,stage.height),verticalOffset:percentToPixels(LAYOUT_MODEL.lightboxThumbnailDownloadBtnVerticalOffset,stage.height),blendMode:LAYOUT_MODEL.lightboxThumbnailDownloadBtnBlendMode||"difference",font:LAYOUT_MODEL.lightboxThumbnailDownloadBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.lightboxThumbnailDownloadBtnFontSize||12,fontColor:LAYOUT_MODEL.lightboxThumbnailDownloadBtnFontColor||"#999999"});V.text=LAYOUT_MODEL.lightboxThumbnailDownloadBtnText||"↓",V.zIndex=5,V.addEventListener("click",function(e){N.events.dispatchEvent("lightboxDownloadOverlayOpen")}),C.addChild(V)}}if(!isSlideshowGallery(N.section)&&l.attachment&&!LAYOUT_MODEL.attachmentThumbnailBtnDisable){var I=buildAttachmentButton({alignHorizontal:LAYOUT_MODEL.attachmentThumbnailBtnAlignHorizontal||"right",alignVertical:LAYOUT_MODEL.attachmentThumbnailBtnAlignVertical||"top",horizontalOffset:percentToPixels(LAYOUT_MODEL.attachmentThumbnailBtnHorizontalOffset,stage.height)||10,verticalOffset:percentToPixels(LAYOUT_MODEL.attachmentThumbnailBtnVerticalOffset,stage.height)||10,blendMode:LAYOUT_MODEL.attachmentThumbnailBtnBlendMode||"difference",font:LAYOUT_MODEL.attachmentThumbnailBtnFont||"Helvetica",fontSize:LAYOUT_MODEL.attachmentThumbnailBtnFontSize||12,fontColor:LAYOUT_MODEL.attachmentThumbnailBtnFontColor||"#999999",iconColor:LAYOUT_MODEL.attachmentGalleryBtnFontColor||"#999999",icon:svgPaths.cloud,text:LAYOUT_MODEL.attachmentGalleryBtnText||"Download"});I.zIndex=5,I.addEventListener("click",function(e){N.events.dispatchEvent("attachmentDownload",l.attachment)}),C.addChild(I)}var P=ScaleEngine({type:"fit",hRange:S,vRange:O,width:l.size.thumb.width||l.size.content.width||THUMB_SIZES[STATE.overrides.thumbnailSize].width,height:l.size.thumb.height||l.size.content.height||THUMB_SIZES[STATE.overrides.thumbnailSize].height,disableOrientationCheck:!0}),Y=new AlignEngine({hRange:E,vRange:v,hAlign:STATE.overrides.thumbnailAlignHorizontal||"center",vAlign:STATE.overrides.thumbnailAlignVertical||"center",width:P.width,height:P.height});C.thumb.width=Math.ceil(P.width),C.thumb.height=Math.ceil(P.height),C.thumb.x=Math.floor(Y.x),C.thumb.y=Math.floor(Y.y),"strip"!==STATE.overrides.thumbnailType&&("slideUp"===LAYOUT_MODEL.thumbLoadEffect?(C.alpha=0,C.translateX=0,C.translateY=70):"slideDown"===LAYOUT_MODEL.thumbLoadEffect&&(C.alpha=0,C.translateX=0,C.translateY=-70)),l.type===VIDEO&&STATE.overrides.thumbnailVideoPlayIcon&&(isVimeo(l)&&STATE.overrides.vimeoDefault&&e.thumbnailOnly||g(C,E,v)),C.playBtn&&(C.playBtn.x=Math.round(.5*(E-50)),C.playBtn.y=Math.round(.5*(v-50)));var R=getLabelPosition(e.isIndexSection);if(C.selectable=!0,R&&"none"!==R){C.label=new TextField,C.label.selectable=!0;var z=l.alias||l.label;l.subTitle&&(z+="
"+l.subTitle+"
"),C.label.text=z,C.label.element.style.wordBreak="break-word",C.label.fontFamily=STATE.overrides.thumbnailTitleFont,C.label.fontColor=STATE.overrides.thumbnailTitleFontColor,C.label.fontSize=STATE.overrides.thumbnailTitleFontSize,C.label.width=E,C.label.textAlign=getLabelJustification(e.isIndexSection),C.label.zIndex=5;var k=getSpriteDims(C.label);switch(R){case"top":C.label.y=firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5),C.thumb.y=k.height+firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5),F=k.height+2*firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5)>F?k.height+2*firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5):F,C.height=v+F;break;case"over":case"hover":l.type===VIDEO&&STATE.overrides.thumbnailVideoPlayIcon?C.label.y=.5*(v-50)-k.height+firstValid(STATE.overrides.thumbnailLabelVerticalOffset,0):C.label.y=.5*(v-k.height)+firstValid(STATE.overrides.thumbnailLabelVerticalOffset,0),C.label.pointerEvents="none",USER_AGENT===MOBILE||isPod()?C.label.alpha=1:USER_AGENT===TABLET||isPad()?C.label.alpha=1:"over"===R?C.label.alpha=1:C.label.alpha=0;break;case"hover-bottom":C.label.pointerEvents="none",USER_AGENT===MOBILE||isPod()?C.label.alpha=1:USER_AGENT===TABLET||isPad()?C.label.alpha=1:"over"===R?C.label.alpha=1:C.label.alpha=0,C.label.y=v+firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5),F=k.height+2*firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5)>F?k.height+2*firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5):F,C.height=v+F;break;case"bottom":default:C.label.y=v+firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5),F=k.height+2*firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5)>F?k.height+2*firstValid(STATE.overrides.thumbnailLabelVerticalOffset,5):F,C.height=v+F}C.addChild(C.label)}"spinner"===STATE.overrides.thumbnailLoaderType&&(C.loader=new LoadingIndicator({type:"spinner",alpha:.65,color:s()}),C.addChild(C.loader),C.loader.x=.5*(E-C.loader.width),C.loader.y=.5*(v-C.loader.height));var H=new Sprite;H.id="hit",H.zIndex=4,H.element.style.borderRadius=STATE.overrides.thumbnailCornerRadius+"px",e.thumbnailOnly||(H.cursor="pointer"),USER_AGENT===MOBILE&&/hover|over/.test(R)?H.alpha=firstValid(STATE.overrides.thumbnailHoverAlphaMobile,0):USER_AGENT===TABLET&&/hover|over/.test(R)?H.alpha=firstValid(STATE.overrides.thumbnailHoverAlphaTablet,0):H.alpha=0,H.y=0,H.width=y,H.height=M,H.backgroundColor=STATE.overrides.thumbnailHoverColor,"Safari"===BROWSER_NAME&&(H.style["-webkit-backface-visibility"]="hidden",H.style.transform="translateZ(0px)"),C.addChild(H),C.hit=H;var j=getZoneWidth(),W=getNumberOfColumns(j,STATE.overrides.thumbnailMinCols,STATE.overrides.thumbnailMaxCols,STATE.overrides.thumbnailGap),Z=/hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryMaintainOrder,X=!(!(W>1&&/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType))||Z)&&u;G.addItem(E,C.height,X),C.defaultWidth=y,C.defaultHeight=M,B.push(C),e.thumbnailOnly&&"link"!==l.type||H.addEventListener(CLICK,f),isPod()||isPad()||(H.addEventListener(MOUSE_OVER,p),H.addEventListener(MOUSE_OUT,L)),H.element.addEventListener("contextmenu",r),H.element.addEventListener("dragstart",r),C.load=b,C.unload=w,n===i-1&&setTimeout(function(){T(B).forEach(function(e){U.addChild(e)}),D.gridContainer.addChild(U),N.holdersBuilt=!0,N.updateSpeed=UPDATE_SPEED,STATE.section(N.section),N.events.dispatchEvent("holdersBuilt"),m(),N.resize()},0)}},0)}(n)}function T(e){var t=e.slice(0);if(STATE.overrides.thumbnailRandomize){var i=STATE.overrides.thumbnailRandomInterval||1e-4,n=36e5*i,o=(Math.floor((new Date).getTime()/n)*n).toString();t=shuffleSeed.shuffle(t,o)}return t}function E(e){var t=ICONS;switch(e){case VIDEO:t+="video2@2x.png";break;case HTML:t+="text3@2x.png";break;case SWF:t+="swf@2x.png";break;case LINK:t+="link@2x.png";break;case PDF:t+="pdf@2x.png";break;case CONTACT:t+="contact@2x.png"}return t}function m(){if(STATE.section(e.section),/fill|hMasonry|vMasonry|hPaginatedGrid/.test(STATE.overrides.thumbnailType))V=new ThumbsFill({titleBlock:I,container:N,mask:D,items:B,side:STATE.overrides.thumbnailSide,size:STATE.overrides.thumbnailSize,horizontalMargin:percentToPixels(STATE.overrides.thumbnailHorizontalMargin,stage.width),verticalMargin:I?H+percentToPixels(STATE.overrides.thumbnailVerticalMargin,stage.height)-STATE.overrides.thumbnailTitleBlockTopMargin:percentToPixels(STATE.overrides.thumbnailVerticalMargin,stage.height),masonry:STATE.overrides.thumbnailMasonry,tile:G,parent:N,grid:U,gap:STATE.overrides.thumbnailGap,maxGap:F,events:e.events,localEvents:e.localEvents,isIndexSection:e.isIndexSection,section:e.section});else if("strip"===STATE.overrides.thumbnailType){var t="displace"===STATE.overrides.thumbnailDock?0:24;"Safari"===BROWSER_NAME&&(N.style["-webkit-backface-visibility"]="hidden");var i=isHorizontalStrip()?percentToPixels(STATE.overrides.thumbnailHorizontalMargin,stage.width):percentToPixels(STATE.overrides.thumbnailVerticalMargin,stage.height),n=layoutCalcs.mediaView.size;Y=new Dock(N,{get x(){return n.x()},get y(){return n.y(e.section.key)},get width(){return n.width()},get height(){var t=STATE.mediaView.zoneHeight(e.section.key);return t}},{side:STATE.overrides.thumbnailSide,align:"left",pOffset:i,margin:0,reveal:t,updateSpeed:UPDATE_SPEED}),V=new ThumbsStrip({section:e.section,dock:Y,container:N,mask:D,items:B,side:STATE.overrides.thumbnailSide,size:STATE.overrides.thumbnailSize,horizontalMargin:percentToPixels(STATE.overrides.thumbnailHorizontalMargin,stage.width),verticalMargin:percentToPixels(STATE.overrides.thumbnailVerticalMargin,stage.height),tile:G,parent:N,localEvents:e.localEvents})}}function g(e,t,i){var n=new Bitmap;n.src=ICONS+"play@2x.png",n.width=50,n.height=50,n.alpha=0,n.zIndex=3,n.thumbHolder=e,n.index=e.index,Tween(n,1,{alpha:.85}),e.playBtn=n,e.addChild(n)}function p(t){if(STATE.section(e.section),t.target.parent.label){var i=isIndexSection(e.section);(i&&/hover/.test(STATE.overrides.thumbnailLabelPosition)||!i&&/hover/.test(STATE.overrides.thumbnailStdLabelPosition))&&Tween(t.target.parent.label,.35,{alpha:1})}e.thumbnailOnly||Tween(t.target,.35,{alpha:r(),backgroundColor:STATE.overrides.thumbnailHoverColor})}function L(t){if(STATE.section(e.section),"link"===t.target.parent.mediaItem.type||R!==t.target.parent.index||0===l()?Tween(t.target,.2,{alpha:0}):Tween(t.target,.2,{alpha:l(),backgroundColor:STATE.overrides.thumbnailSelectedColor}),t.target.parent.label){var i=isIndexSection(e.section);(i&&/hover/.test(STATE.overrides.thumbnailLabelPosition)||!i&&/hover/.test(STATE.overrides.thumbnailStdLabelPosition))&&Tween(t.target.parent.label,.35,{alpha:0})}}function f(t){t.stopPropagation();var i=t.target.parent.mediaItem;"string"==typeof i.content&&0===i.content.indexOf("vimeo:")&&t.target.parent.vimeo?(t.target.parent.vimeo.setSource(i.content),t.target.parent.vimeo.element.style.zIndex=5,Tween(t.target.parent.vimeo,UPDATE_SPEED,{alpha:1})):"link"===i.type?N.events.dispatchEvent(THUMB_CLICK,{nothumbs:/nothumbs(\/|)$/.test(i.content),type:"internal",path:i.content.replace(/nothumbs(\/|)/i,""),linkTarget:i.linkTarget,isThumbClick:!1}):(STATE.section(e.section),N.events.dispatchEvent(THUMB_CLICK,{assetId:Number(t.target.parent.index),type:"internal",path:e.path,linkTarget:"_self",isThumbClick:!0,isMobileVideoClick:"video"===i.type&&USER_AGENT===MOBILE&&STATE.overrides.mobileAutoPlay}))}function v(t){e.events.dispatchEvent(NAVBAR_OVERLAY_BTN_CLICK,"thumbs")}function S(e){var t=e.target;t.attempts<2&&t.parent.mediaItem.thumb?(t.src=CDN_PF_SSL_URI+"/media/"+t.parent.mediaItem.thumb,t.attempts++):t.removeEventListener(ERROR,S)}function O(e){return RETINA?e.width>500||e.height>500:e.width>1e3||e.height>1e3}function C(t){var i=t.thumb,n=t.mediaItem,o=new VimeoPlayer({parent:t,thumbBuild:!0,width:Math.floor(t.width),height:Math.floor(t.height)});o.setSize(Math.floor(t.width),Math.floor(t.height)),o.zIndex=-2,o.alpha=0,t.addChild(o),t.vimeo=o,e.thumbnailOnly&&(STATE.overrides.vimeoDefault?(o.zIndex=5,Tween(o,UPDATE_SPEED,{alpha:1}),Tween(i,UPDATE_SPEED,{alpha:0}),o.setSource(n.content)):t.hit.element.onclick=function(e){o.zIndex=5,Tween(o,UPDATE_SPEED,{alpha:1}),Tween(i,UPDATE_SPEED,{alpha:0}),o.addEventListener(VIMEO_METADATA_LOADED,function(e){o.play()}),o.setSource(n.content)}),o.onplay=function(){M(o)},o.onpause=function(){}}function A(e){var t=e.thumb,i=e.mediaItem,n=new VideoPlayer({parent:e,thumbBuild:!0,width:Math.floor(e.hit.width),height:Math.floor(e.hit.height)});n.alpha=0,e.addChild(n),e.video=n,e.hit.element.onclick=function(){M(n),n.setSource(i.content),n.play(),n.element.style.zIndex=5,Tween(n,UPDATE_SPEED,{alpha:1}),Tween(t,UPDATE_SPEED,{alpha:0})},n.element.onclick=function(){n.paused?(M(n),n.play()):n.pause()}}function b(){var t=this,i=(t.thumb,t.mediaItem);STATE.section(e.section),!V||t.loaded&&t.thumb.src||(/mp4/.test(t.filename)?(t.thumb.element.addEventListener(METADATA_LOADED,function(e){V.thumbLoaded.call(t.thumb),this.muted=!0,this.play()}),t.thumb.src=t.filename):(t.thumb.addEventListener(LOAD,V.thumbLoaded),O(t.thumb)||STATE.overrides.thumbnailFullRes?t.thumb.src=t.original:t.thumb.src=t.filename),t.thumb.addEventListener(ERROR,S),t.thumb.alpha=0,t.loaded=!0,t.addChild(t.thumb)),i.type!==VIDEO||t.vimeo||t.video||(isVimeo(i)&&(USER_AGENT===MOBILE&&STATE.overrides.mobileAutoPlay&&e.thumbnailOnly||USER_AGENT!==MOBILE&&e.thumbnailOnly)?C(t):!isVimeo(i)&&e.thumbnailOnly&&A(t))}function y(e){return"video"===e.mediaItem.type&&(e.vimeo||e.video)}function M(e){N.mask.grid.children.filter(y).forEach(function(t){isVimeo(t.mediaItem)?e&&t.vimeo&&t.vimeo.playerID!==e.playerID?t.vimeo.pause():!e&&t.vimeo&&t.vimeo.pause():t.video&&e&&t.video!==e&&t.video.pause()})}function w(){this.mediaItem.type===VIDEO&&this.vimeo&&0===this.mediaItem.content.indexOf("vimeo")&&USER_AGENT===MOBILE&&this.removeChild(this.vimeo)}function _(){P.state=!0,N.holdersBuilt&&(N.updateSpeed=UPDATE_SPEED)}STATE.section(e.section);var D,U,x,V,I,P,Y,R,N=new Sprite({events:e.events}),z="left"===STATE.overrides.thumbnailSide||"right"===STATE.overrides.thumbnailSide||/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)?"y":"x",k="y"===z?"top":"left",B=[],H=0,F=STATE.overrides.thumbnailGap,G=new Tile({name:"thumbs",type:STATE.overrides.thumbnailType,marginHorizontal:percentToPixels(STATE.overrides.thumbnailHorizontalMargin,stage.width),marginVertical:percentToPixels(STATE.overrides.thumbnailVerticalMargin,stage.height),maintainOrder:/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryMaintainOrder,horizontalMasonry:/hMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryEvenRowHeight,masonryFill:/hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryFill,gap:STATE.overrides.thumbnailGap});return/hMasonryHScroll/.test(STATE.overrides.thumbnailType)&&(z="x"),e.localEvents.addEventListener(PAUSE_MEDIA,function(e){M()}),N.getTotalHeight=function(){return V?V.totalHeight:0},N.currentThumb=1,N.settings=e.settings,N.section=e.section,N.tile=G,N.pointerEvents=/^unified/.test(STATE.overrides.siteDisplayBehavior)&&LAYOUT_MODEL.globalSmoothScroll&&USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&""!==LAYOUT_MODEL.logoZIndex&&LAYOUT_MODEL.logoZIndex<5?"none":"auto",/hMasonryHScroll/.test(STATE.overrides.thumbnailType)&&(N.pointerEvents="auto"),N.isInit=!0,N.element.setAttribute("class","Thumbs.container"),N.selectable=!1,N.build=function(){var o=e.mediaItems.reduce(function(e,t){return e?e:t.overrides.thumbHorizontalOffset||t.overrides.thumbVerticalOffset},!1),a=o||STATE.overrides.thumbnailShadow?"":"hidden";STATE.section(e.section),N.updateSpeed=0,N.holdersBuilt=!1,N.id="thumbs",N.overflow=a,N.zIndex=200,N.alpha=0,D=N.mask=new Sprite,D.id="mask",D.overflow=a,D.zIndex=1,D.element.setAttribute("class","Thumbs.mask"),("overlay"===STATE.overrides.thumbnailDock||/fill|hMasonry|vMasonry|hPaginatedGrid/.test(STATE.overrides.thumbnailType))&&(D.backgroundColor=toRgba(STATE.overrides.thumbnailOverlayColor,STATE.overrides.thumbnailOverlayAlpha)),N.addChild(D),N.mask=D,U=new Sprite,U.id="grid",U.element.setAttribute("class","Thumbs.grid"),U.element.style.transform="translateZ(0)",/hMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryFill&&(U.overflow=a),D.grid=U,x=new Sprite,x.id="grid-container",x.element.setAttribute("class","Thumbs.grid.container"),x.element.style.transform="translateZ(0)",D.gridContainer=x,D.addChild(x);var r={Containername:"thumbs"};(isPod()||isPad())&&(r.domElementScroll=!0),STATE.siteView.unifiedPageScroll()&&(/native/.test(STATE.overrides.thumbnailScrollType)||LAYOUT_MODEL.globalSmoothScroll)&&"strip"!==STATE.overrides.thumbnailType&&"MSIE"!==BROWSER_NAME&&(r.windowScroll=!0),/slide/.test(LAYOUT_MODEL.thumbLoadEffect)?r.boundaryMultiplier=.9:/hPaginatedGrid/.test(STATE.overrides.thumbnailType)&&(r.boundaryMultiplier=2),MAC_SCROLLBARS&&(/native/.test(STATE.overrides.thumbnailScrollType)||LAYOUT_MODEL.globalSmoothScroll)?r.domElementScroll=!0:r.property="translate",r.targetChildren=U.children;var l="strip"===STATE.overrides.thumbnailType?U:x;N.lazyLoader=new LazyLoader(l,D,r),N.lazyLoader.name="thumbs",P=new Toggle({target:N,on:N.hide,off:N.show});var s,d,c=0,h=0,T=0,E=0;if(/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&e.section.thumb&&e.section.thumb.titleBlock&&(I=i(e.section),H=STATE.overrides.thumbnailTitleBlockTopMargin+I.element.offsetHeight,I.y=STATE.overrides.thumbnailTitleBlockTopMargin,D.gridContainer.addChild(I)),isPod()||isPad())/^unified/.test(STATE.overrides.siteDisplayBehavior)&&USER_AGENT!==MOBILE&&USER_AGENT!==TABLET||("y"===z?(D.element.style.overflowY="scroll",D.element.style.overflowX="hidden"):(D.element.style.overflowY="hidden",D.element.style.overflowX="scroll")),D.element.style["-webkit-overflow-scrolling"]="touch",U.element.addEventListener("touchstart",function(e){c=0,h=0,T=e.touches[0].pageX,E=e.touches[0].pageY}),U.element.addEventListener("touchmove",function(e){c=e.touches[0].pageX-T,h=e.touches[0].pageY-E,Mth.abs(c)>Mth.abs(h)?(c>0?D.element.scrollLeft>0&&D.element.scrollLeft<=U.width-STATE.overlayView.zoneWidth()&&e.stopPropagation():"x"===z&&e.stopPropagation(),s=!0,d=!1):(d=!0,s=!1),t(D.element.scrollTop||window.scrollY)}),U.element.addEventListener("touchend",function(e){t(D.element.scrollTop||window.scrollY)}),D.element.addEventListener("scroll",function(){t(D.element.scrollTop||window.scrollY)}),STATE.siteView.unifiedPageScroll()&&window.addEventListener("scroll",function(e){t(D.element.scrollTop||window.scrollY)});else if(STATE.siteView.unifiedPageScroll()&&/hMasonryHScroll/.test(STATE.overrides.thumbnailType)&&(/native/.test(STATE.overrides.thumbnailScrollType)||LAYOUT_MODEL.globalSmoothScroll))D.element.addEventListener("scroll",function(){t(D.element.scrollTop||window.scrollY)}),D.element.style.overflowY="hidden",D.element.style.overflowX="scroll";else if(/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior))window.addEventListener("scroll",function(e){t(window.scrollY)});else if(STATE.siteView.unifiedPageScroll()&&/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&(/native/.test(STATE.overrides.thumbnailScrollType)||LAYOUT_MODEL.globalSmoothScroll))document.getElementsByClassName("SiteView")[0].addEventListener("scroll",function(e){N.lazyLoader&&N.lazyLoader.update()}),window.addEventListener("scroll",function(e){t(window.scrollY)});else if(MAC_SCROLLBARS&&(/native/.test(STATE.overrides.thumbnailScrollType)||LAYOUT_MODEL.globalSmoothScroll))D.element.addEventListener("scroll",function(){t(D.element.scrollTop||window.scrollY)}),"y"===z?(D.element.style.overflowY="scroll",D.element.style.overflowX="hidden"):(D.element.style.overflowY="hidden",D.element.style.overflowX="scroll");else{n();var m="strip"===STATE.overrides.thumbnailType?0:STATE.overrides.thumbnailScrollbarWidth,g="right"===STATE.overrides.thumbnailScrollbarAlignment?-STATE.overrides.thumbnailScrollbarHorizontalOffset-m:STATE.overrides.thumbnailScrollbarHorizontalOffset+m,p=isHorizontalStrip()?"x":"y";"strip"===STATE.overrides.thumbnailType&&(k="y"===z?STATE.overrides.thumbnailAlignVertical||"center":STATE.overrides.thumbnailAlignHorizontal||"center");var L={name:"thumbs",types:["bar","wheel","touch"],axis:p,align:k,zIndex:STATE.overlayView.zIndex+1,color:STATE.overrides.thumbnailScrollbarColor,hover:STATE.overrides.thumbnailScrollbarHover,side:STATE.overrides.thumbnailScrollbarAlignment,alpha:STATE.overrides.thumbnailScrollbarBgAlpha,width:m,offsetX:STATE.overlayView.x()+g,offsetY:STATE.overlayView.y(e.section.key)+STATE.overrides.thumbnailScrollbarVerticalOffset,property:"translate",rounded:STATE.overrides.thumbnailScrollbarRounded,visibility:STATE.overrides.thumbnailScrollbarVisibility,parent:e.scrollbarParent};/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)?(L.marginTop=I?STATE.overrides.thumbnailTitleBlockTopMargin:percentToPixels(STATE.overrides.thumbnailVerticalMargin,stage.height),L.marginBottom=percentToPixels(STATE.overrides.thumbnailVerticalMargin,stage.height)):L.margin=0,(/native/.test(STATE.overrides.thumbnailScrollType)||LAYOUT_MODEL.globalSmoothScroll)&&(L.margin=0,L.color="#000000",L.hover="#000000",L.side="right",L.alpha=0,L.width=m,L.offsetX=STATE.overlayView.x()-10,L.offsetY=STATE.overlayView.y(e.section.key),L.rounded=!0,L.visibility="when scrolling");var l="strip"===STATE.overrides.thumbnailType?U:x;N.scroll=new Scroll(l,D,L)}N.scroll&&(N.scroll.addEventListener(SCROLL,function(){N.lazyLoader&&N.lazyLoader.update()}),N.scroll.addEventListener("WINDOW_SCROLL_TOP",function(){N.scroll.percent=0,N.scroll.update(UPDATE_SPEED)})),e.mediaItems.length>0&&u(),P.state=!0,N.resize(),P.state=!1,N.isInit=!1},N.resizeThumbVideo=function(){N.mask.grid.children.filter(y).forEach(function(e){e.video?e.video.setSize(e.width,e.height):e.vimeo&&e.vimeo.setSize(e.width,e.height)})},N.highlight=function(t){if(STATE.section(e.section),USER_AGENT!==MOBILE&&!e.thumbnailOnly){var i=B.length;for(R=Number(void 0!==t?t:e.assetId);i--;)if(i!==R){var n=B[i].hit.parent.mediaItem,o=getLabelPosition(e.isIndexSection);isThumbLink(n)||USER_AGENT===MOBILE||USER_AGENT===TABLET||(Tween(B[i].hit,UPDATE_SPEED,{alpha:0}),B[i].hit.parent.label&&/hover/.test(o)&&USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&Tween(B[i].hit.parent.label,.35,{alpha:0}))}if(R>-1&&B[R]&&"link"!==B[R].hit.parent.mediaItem.type){N.currentThumb=R+1;var n=B[R].hit.parent.mediaItem,o=getLabelPosition(e.isIndexSection);Tween(B[R].hit,UPDATE_SPEED,{alpha:l(),backgroundColor:STATE.overrides.thumbnailSelectedColor}),B[R].hit.parent.label&&/hover/.test(o)&&USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&Tween(B[R].hit.parent.label,.35,{alpha:0})}}},N.hide=function(){P.state&&(STATE.section(e.section),Tween(N,UPDATE_SPEED,{alpha:0,onComplete:function(){N.display="none",N.updateSpeed=0,P.state=!1}}),"strip"===STATE.overrides.thumbnailType&&Y&&Y.hide(),N.scroll&&(N.scroll.disable(),N.scroll.hide()))},N.show=function(){
P.state||(N.display="block",setTimeout(function(){STATE.section(e.section),Y&&Y.resize(0),Y&&Y.show(),N.resize(),Tween(N,UPDATE_SPEED,{alpha:1,onComplete:_}),"scrollbar"===STATE.overrides.thumbnailScrollType&&/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&N.scroll&&N.scroll.enable(),N.scroll&&(N.scroll.show(),N.scroll.update())},0))},N.toggle=function(){P.flip(),"strip"===STATE.overrides.thumbnailType&&Y.toggle(),P.state?N.show():N.hide()},N.toggleState=function(){return P.state},N.resize=function(){V||m(),V&&V.resize(),N.scroll&&N.scroll.resize()},N.build(),N}function getIndexLabelPosition(){return isPod()?firstValid(STATE.overrides.thumbnailLabelPositionMobile,STATE.overrides.thumbnailLabelPosition):isPad()?firstValid(STATE.overrides.thumbnailLabelPositionTablet,STATE.overrides.thumbnailLabelPosition):STATE.overrides.thumbnailLabelPosition}function getStdLabelPosition(){return isPod()?firstValid(STATE.overrides.thumbnailStdLabelPositionMobile,STATE.overrides.thumbnailStdLabelPosition):isPad()?firstValid(STATE.overrides.thumbnailStdLabelPositionTablet,STATE.overrides.thumbnailStdLabelPosition):STATE.overrides.thumbnailStdLabelPosition}function getLabelPosition(e){var t=getIndexLabelPosition(),i=getStdLabelPosition();if(e){if(t)return t}else if(i)return i;return!1}function getIndexLabelJustification(){var e=STATE.overrides.thumbnailLabelJustification;return e}function getStdLabelJustification(){var e=STATE.overrides.thumbnailStdLabelJustification;return e}function getLabelJustification(e){var t=getIndexLabelJustification(),i=getStdLabelJustification();if(e){if(t)return t}else if(i)return i;return"center"}function isHorizontalStrip(){return"hMasonryHScroll"===STATE.overrides.thumbnailType||"strip"===STATE.overrides.thumbnailType&&("top"===STATE.overrides.thumbnailSide||"bottom"===STATE.overrides.thumbnailSide)}function isVerticalStrip(){return"strip"===STATE.overrides.thumbnailType&&("left"===STATE.overrides.thumbnailSide||"right"===STATE.overrides.thumbnailSide)}function isMasonryGrid(){return/hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)}function getThumbWidth(e){return!isDefaultThumb(e)&&(isHorizontalStrip()||isMasonryGrid()||isVerticalStrip())?e.size.thumb.width||e.size.content.width:THUMB_SIZES[STATE.overrides.thumbnailSize].width}function getThumbHeight(e){return!isDefaultThumb(e)&&(isHorizontalStrip()||isMasonryGrid()||isVerticalStrip())?e.size.thumb.height||e.size.content.height:THUMB_SIZES[STATE.overrides.thumbnailSize].height}function getHRange(e,t){if("hMasonry"===STATE.overrides.thumbnailType||/vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryFill)return getGridFillWidth(e,t);var i=THUMB_SIZES[STATE.overrides.thumbnailSize].width,n=getNumberOfColumns(getZoneWidth(),STATE.overrides.thumbnailMinCols,STATE.overrides.thumbnailMaxCols,t);return"hMasonryHScroll"===STATE.overrides.thumbnailType?4*i+t:/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&e&&n>1?2*i+t:isHorizontalStrip()?10*i:i}function getVRange(e,t,i){var n=THUMB_SIZES[STATE.overrides.thumbnailSize].height;return i=i?i:getNumberOfColumns(getZoneWidth(),STATE.overrides.thumbnailMinCols,STATE.overrides.thumbnailMaxCols,t),"hMasonryHScroll"===STATE.overrides.thumbnailType?4*n+t:/fill|hMasonry/.test(STATE.overrides.thumbnailType)&&e&&i>1?2*n+t:isMasonryGrid()&&!STATE.overrides.thumbnailMasonryEvenRowHeight||isVerticalStrip()?10*n:n}function getZoneWidth(){var e=percentToPixels(STATE.overrides.thumbnailHorizontalMargin,stage.width);return STATE.overlayView.zoneWidth()-2*e}function capToRange(e,t,i){return it&&(i=t),i}function getNumberOfColumns(e,t,i,n){i=/fill|hPaginatedGrid/.test(STATE.overrides.thumbnailType)?1/0:i;var o=THUMB_SIZES[STATE.overrides.thumbnailSize].width+n,a=/vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryFill?Math.round:Math.floor,r=a((e+n)/o);return capToRange(t,i,r)}function getGridFillWidth(e,t){if(STATE.overrides.thumbnailMasonryEvenRowHeight)return stage.width;var i=getZoneWidth(),n=getNumberOfColumns(i,STATE.overrides.thumbnailMinCols,STATE.overrides.thumbnailMaxCols,t),o=STATE.overrides.thumbnailGap*(n-1),a=(i-o)/n;return/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&e&&n>1?2*Math.round(a)+t:Math.round(a)}function isThumbLink(e){return"link"===e.type&&!!e.thumb}function isDefaultThumb(e){return!e.thumb&&"image"!==e.type}function ThumbsFill(e){function t(){if(STATE.section(e.section),/hscroll/i.test(STATE.overrides.thumbnailType))l.perpLength=THUMB_SIZES[a].height,n.height=THUMB_SIZES[a].height,o.height=THUMB_SIZES[a].height;else if(/hMasonry/.test(STATE.overrides.thumbnailType)||/vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryFill)l.perpLength=getZoneWidth();else{var t=getNumberOfColumns(getZoneWidth(),STATE.overrides.thumbnailMinCols,STATE.overrides.thumbnailMaxCols,STATE.overrides.thumbnailGap),i=getHRange(!1,STATE.overrides.thumbnailGap),r=STATE.overrides.thumbnailGap*(t-1);l.perpLength=i*t+r}l.layoutItems();for(var s=o.grid.children,d=0,c=s.length;d1?(L=2*THUMB_SIZES[STATE.overrides.thumbnailSize].width+STATE.overrides.thumbnailGap,f=2*THUMB_SIZES[STATE.overrides.thumbnailSize].height+STATE.overrides.thumbnailGap,v=2*THUMB_SIZES[STATE.overrides.thumbnailSize].width+STATE.overrides.thumbnailGap,S=2*THUMB_SIZES[STATE.overrides.thumbnailSize].height+STATE.overrides.thumbnailGap):(L=THUMB_SIZES[STATE.overrides.thumbnailSize].width,f=THUMB_SIZES[STATE.overrides.thumbnailSize].height,v=THUMB_SIZES[STATE.overrides.thumbnailSize].width,S=THUMB_SIZES[STATE.overrides.thumbnailSize].height);var C=ScaleEngine({type:"fit",hRange:v,vRange:S,width:g.size.thumb.width||g.size.content.width||THUMB_SIZES[STATE.overrides.thumbnailSize].width,height:g.size.thumb.height||g.size.content.height||THUMB_SIZES[STATE.overrides.thumbnailSize].height,disableOrientationCheck:!0}),A=new AlignEngine({hRange:L,vRange:f,hAlign:STATE.overrides.thumbnailAlignHorizontal||"center",vAlign:STATE.overrides.thumbnailAlignVertical||"center",width:C.width,height:C.height});h[u].thumb.width=Math.ceil(C.width),h[u].thumb.height=Math.ceil(C.height),h[u].thumb.x=Math.round(A.x),h[u].thumb.y=Math.round(A.y),h[u].playBtn&&(h[u].playBtn.x=Math.round(.5*(L-50)),h[u].playBtn.y=Math.round(.5*(f-50))),h[u].width=L,h[u].height=f,h[u].hit.width=L,h[u].hit.height=f;var b=/hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryMaintainOrder,y=!(!(m>1&&/fill|hMasonry|vMasonry/.test(STATE.overrides.thumbnailType))||b)&&p;l.addItem(L,f,y,g.content)}/fill|vMasonry/.test(STATE.overrides.thumbnailType)&&(l.gridWidths=getHRange(!1,STATE.overrides.thumbnailGap),l.lastColumnWidth=/vMasonry/.test(STATE.overrides.thumbnailType)&&STATE.overrides.thumbnailMasonryFill?E-(l.gridWidths+STATE.overrides.thumbnailGap)*(m-1):l.gridWidths,l.numberOfColumns=m),l.items.length&&t(),setTimeout(function(){STATE.section(e.section);var t=l.getBounds(),a=new AlignEngine({hRange:STATE.overlayView.zoneWidth(),vRange:"hPaginatedGrid"===STATE.overrides.thumbnailType?STATE.mediaView.zoneHeight(e.section.key):STATE.overlayView.zoneHeight(e.section.key),width:l.perpLength,height:t.height,hAlign:"hMasonryHScroll"===STATE.overrides.thumbnailType?"left":"center",vAlign:/hPaginatedGrid|hMasonryHScroll/.test(STATE.overrides.thumbnailType)?"center":"top",hOffset:0,vOffset:"hPaginatedGrid"===STATE.overrides.thumbnailType?0:e.verticalMargin});if((STATE.overrides.thumbnailMasonryFill||STATE.overrides.thumbnailMasonryEvenRowHeight)&&/hMasonry|vMasonry/.test(STATE.overrides.thumbnailType)?o.gridContainer.x=e.horizontalMargin:(o.gridContainer.x=Math.floor(a.x),r&&(r.width=l.perpLength,d=STATE.overrides.thumbnailTitleBlockTopMargin+r.element.offsetHeight,r.y=STATE.overrides.thumbnailTitleBlockTopMargin)),/hPaginatedGrid|hMasonryHScroll/.test(STATE.overrides.thumbnailType)?o.gridContainer.y=Math.floor(a.y):(o.gridContainer.y=0,o.grid.y=d+e.verticalMargin),n.width=STATE.overlayView.zoneWidth(),o.width=STATE.overlayView.zoneWidth(),o.grid.width=l.perpLength,o.gridContainer.width=l.perpLength,"hMasonryHScroll"===STATE.overrides.thumbnailType){var c=STATE.mediaView.zoneHeight(e.section.key)+e.verticalMargin;s=d+(c+e.verticalMargin),n.height=s,o.height=s,o.grid.height=c,o.gridContainer.height=s}else if("hPaginatedGrid"===STATE.overrides.thumbnailType){var h=STATE.mediaView.zoneHeight(e.section.key);n.height=h,o.height=h,i.height=h,o.grid.height=t.height,o.gridContainer.height=t.height,s=h}else if(/^unifiedSite/.test(STATE.overrides.siteDisplayBehavior)||(STATE.siteView.unifiedPageScroll()||/unified/.test(LAYOUT_MODEL.siteDisplayBehavior))&&/overlay/.test(e.section.displayBehavior)&&STATE.overrides.siteDisplayGalleryOnlyOverlay){var u=!isIndexSection(e.section)&&STATE.mediaView.height(e.section.key)>t.height?STATE.mediaView.height(e.section.key):t.height,c=u+e.verticalMargin;s=d+(c+e.verticalMargin),n.height=s,o.height=s,o.grid.height=c,o.gridContainer.height=s}else if(STATE.siteView.unifiedPageScroll()&&(USER_AGENT!==MOBILE&&isPod()||USER_AGENT!==TABLET&&isPad()||/native/.test(STATE.overrides.thumbnailScrollType)||LAYOUT_MODEL.globalSmoothScroll)){var c=t.height+e.verticalMargin;c=c>STATE.mediaView.height()?c:STATE.mediaView.height(),s=d+(c+e.verticalMargin),n.height=s,o.height=s,o.grid.height=c,o.gridContainer.height=s}else s=d+(t.height+e.verticalMargin),n.height=STATE.overlayView.zoneHeight(),o.height=n.height,i.height=n.height,o.grid.height=t.height+e.verticalMargin,o.gridContainer.height=s;r&&"bottom"===LAYOUT_MODEL.thumbnailTitleBlockPosition&&(r.y=t.height+e.verticalMargin+STATE.overrides.thumbnailTitleBlockTopMargin,o.grid.y=e.verticalMargin),i.totalHeight=s,e.localEvents.dispatchEvent("UPDATE_CONTENT_HEIGHT",{thumbs:s}),n.resizeThumbVideo(),parallax.update()},20)},this.thumbLoaded=function(e){this.parent.loader&&this.parent.removeChild(this.parent.loader),"slideUp"!==LAYOUT_MODEL.thumbLoadEffect&&"slideDown"!==LAYOUT_MODEL.thumbLoadEffect||Tween(this.parent,.85,{alpha:1,translateY:0}),Tween(this,.25,{alpha:1})}}function ThumbsStrip(e){function t(){switch(a){case"top":l.axis="x",l.perpLength=THUMB_SIZES[r].height,n.height=THUMB_SIZES[r].height,o.height=THUMB_SIZES[r].height;break;case"right":l.axis="y",l.perpLength=THUMB_SIZES[r].width,n.width=THUMB_SIZES[r].width,o.width=THUMB_SIZES[r].width;break;case"bottom":l.axis="x",l.perpLength=THUMB_SIZES[r].height,n.height=THUMB_SIZES[r].height,o.height=THUMB_SIZES[r].height;break;case"left":l.axis="y",l.perpLength=THUMB_SIZES[r].width,n.width=THUMB_SIZES[r].width,o.width=THUMB_SIZES[r].width}}function i(){l.layoutItems(),items=o.grid.children;for(var t=0,i=items.length;t573?573:STATE.mediaView.width(),w=STATE.mediaView.height(y.section.key)>400?400:STATE.mediaView.height(y.section.key),T.height=T.element.offsetHeight,O.width=O.element.offsetWidth,E.y=T.height+10,SETTINGS_MODEL.inquiryInfo?(m.y=T.height+20,g.x=2,g.y=m.y+m.element.offsetHeight+10):(g.x=2,g.y=T.height+20),layoutCalcs.mediaView.width()>573?SETTINGS_MODEL.inquiryInfo?(p.x=222,p.y=m.y+m.element.offsetHeight+10):(p.x=222,p.y=g.y):(p.transition=0,p.x=U,p.width=STATE.mediaView.width()-2*U,p.y=g.y+b+10,g.x=.5*(layoutCalcs.mediaView.width()-g.width),T.x=.5*(layoutCalcs.mediaView.width()-T.element.offsetWidth),f.input.width=.5*p.width-U,v.input.width=.5*p.width,S.input.width=p.width,v.x=.5*p.width,E.alpha=0),O.x=p.element.offsetWidth-O.width,SETTINGS_MODEL.inquiryInfo?(_.x=p.x,_.y=m.y+m.element.offsetHeight+10):(_.x=p.x,_.y=40),0===y.updateSpeed?(y.width=STATE.mediaView.width(),y.height=STATE.mediaView.height(y.section.key),u.x=.5*(STATE.mediaView.width()-M),u.y=.5*(STATE.mediaView.height(y.section.key)-w),u.width=M,u.height=w):(Tween(y,y.updateSpeed,{width:STATE.mediaView.width(),height:STATE.mediaView.height(y.section.key)}),Tween(u,y.updateSpeed,{x:.5*(STATE.mediaView.width()-M),y:.5*(STATE.mediaView.height(y.section.key)-w),width:M,height:w})),C.width=STATE.mediaView.width(),C.height=STATE.mediaView.height(y.section.key),y.updateSpeed=UPDATE_SPEED},y.show=function(){y.updateSpeed=0,y.visible||(y.visible=!0,y.display="block",Tween(y,UPDATE_SPEED,{alpha:1}),Tween(p,UPDATE_SPEED,{alpha:1}),Tween(_,UPDATE_SPEED,{alpha:0})),y.updatePosition()},y.hide=function(){y.visible&&(y.visible=!1,Tween(y,UPDATE_SPEED,{alpha:0,onComplete:function(){this.display="none"}}))},y.updateInquiryInfo=function(){T.text=SETTINGS_MODEL.inquiryTitle?SETTINGS_MODEL.inquiryTitle:"Inquire about this image",SETTINGS_MODEL.inquiryInfo&&(m.text=SETTINGS_MODEL.inquiryInfo),y.updatePosition()},y.updateContent=function(e){var t=csvToArray(e.section.media);L=getMediaById(t[e.assetId]),g&&u.removeChild(g),g=new Bitmap,g.alpha=0,SETTINGS_MODEL.inquiryInfo?(g.x=2,g.y=m.y+m.element.offsetHeight+10):(g.x=2,g.y=T.height+20),g.src=getThumbQuery(200,200,L.thumb||L.featuredImage||L.content,L.demoFile),g.width=200,u.addChild(g),g.addEventListener(LOAD,i)},y.addEventListener(CHILD_ADDED,function(e){t.call(y)}),y}function ShareView(e){function t(){E=new Sprite,E.backgroundColor="#cccccc",E.alpha=0,E.addEventListener(MOUSE_DOWN,o),p.addChild(E),a=new Sprite,a.width=L,a.height=f,p.addChild(a),r=new TextField,r.text="Share this item",r.fontFamily=STATE.overrides.overlayTitleFont,r.fontColor=STATE.overrides.overlayTitleFontColor,r.fontSize=STATE.overrides.overlayTitleFontSize,a.addChild(r),r.height=r.element.offsetHeight,l=new Sprite,l.backgroundColor=toRgba(STATE.overrides.overlayTitleFontColor,.35),l.width=L,l.height=1,l.y=STATE.overrides.overlayTitleFontSize+10,a.addChild(l),s=new Bitmap,s.alpha=0,a.addChild(s),s.addEventListener(LOAD,i),d=new Sprite,d.x=222,d.y=r.height+20,d.width=L-d.x,d.height=f-d.y,a.addChild(d);var e="https://"+window.location.host+window.location.pathname.split("/").slice(0,-1).join("/");h=new Sprite({type:"iframe"}),h.src="https://www.facebook.com/plugins/share_button.php?href="+encodeURIComponent(e)+"&width="+O.width+"&layout="+O.layout+"&action=like&size="+O.size+"&show_faces="+O.showFaces+"&share="+O.showShareButton+"&height="+O.height,h.width=O.width,h.height=O.height,h.element.setAttribute("scrolling","no"),h.element.setAttribute("frameborder","0"),h.element.setAttribute("allowTransparency","true"),u=new Button,u.addEventListener("click",function(){var e="https://"+window.location.host+window.location.pathname.split("/").slice(0,-1).join("/");window.open("https://twitter.com/intent/tweet?text="+encodeURI(e),"_blank")});var t=new Bitmap;t.position="relative",t.width=20,t.height=20,t.src="https://33acda504924667afc4c-95ab99cbba1f87315d458f4e201677b2.ssl.cf1.rackcdn.com/icon/twitter@2x.png",u.addChild(t),T=new Button,T.addEventListener("click",function(){var e="https://"+window.location.host+window.location.pathname.split("/").slice(0,-1).join("/");window.location.href="mailto:?subject=Shared item from "+window.location.host+"&body="+SETTINGS_MODEL.portfolioEmailMessage+"%0A%0A"+e});var c=new Bitmap;c.position="relative",c.width=20,c.height=20,c.src="https://33acda504924667afc4c-95ab99cbba1f87315d458f4e201677b2.ssl.cf1.rackcdn.com/icon/email@2x.png",T.addChild(c),h.y=0,u.y=30,T.y=60,d.addChild(h),d.addChild(u),d.addChild(T),v.alpha=0,v.x=d.x,v.y=40,v.fontFamily=STATE.overrides.overlayTitleFont,v.fontColor=STATE.overrides.overlayTitleFontColor,v.fontSize=14,a.addChild(v),p.updateStyle(),p.updatePosition(),p.show(),S.addEventListener(SHARE_FORM_SENT,n)}function i(e){var t=RetinaResizeEngine({width:this.width,height:this.element.offsetHeight,filename:s.src}),i=Resize(null,0,{type:"fit",width:t.width,height:t.height,hRange:200,vRange:isPod()?200:300,hAlign:0,vAlign:0,disableOrientationCheck:!0});m=Math.ceil(i.scale.width),g=Math.ceil(i.scale.height),this.width=m,this.height=g,Tween(this,UPDATE_SPEED,{alpha:1}),p.updatePosition()}function n(e){v.text=e.response,Tween(d,UPDATE_SPEED,{alpha:0}),Tween(v,UPDATE_SPEED,{alpha:1}),p.addEventListener(MOUSE_DOWN,o)}function o(e){e.target===p&&p.removeEventListener(MOUSE_DOWN,o),S.dispatchEvent(NAVBAR_OVERLAY_BTN_CLICK,"share")}var a,r,l,s,d,c,h,u,T,E,m,g,p=new Sprite(e),L=573,f=400,v=new Sprite,S=e.localEvents;p.section=e.section;var O={layout:"button",size:"small",showFaces:!1,showShareButton:!0,width:67,height:20};return p.updateSpeed=0,p.backgroundColor=toRgba(LAYOUT_MODEL.overlayColor,LAYOUT_MODEL.overlayAlpha),p.zIndex=100,p.alpha=0,p.visible=!1,p.updateStyle=function(e){STATE.overrides.overlayTitleFont!==r.fontFamily&&(r.fontFamily=STATE.overrides.overlayTitleFont,h.fontFamily=STATE.overrides.overlayTitleFont,u.fontFamily=STATE.overrides.overlayTitleFont,T.fontFamily=STATE.overrides.overlayTitleFont),STATE.overrides.overlayTitleFontSize!==r.fontSize&&Tween(r,UPDATE_SPEED,{fontSize:STATE.overrides.overlayTitleFontSize,onComplete:function(){p.updatePosition(e)}}),STATE.overrides.overlayTitleFontColor!==r.fontColor&&(Tween(r,UPDATE_SPEED,{fontColor:STATE.overrides.overlayTitleFontColor}),Tween(l,UPDATE_SPEED,{backgroundColor:toRgba(STATE.overrides.overlayTitleFontColor,.35)}),Tween(h,UPDATE_SPEED,{fontColor:toRgba(LAYOUT_MODEL.overlayColor,.35),backgroundColor:toRgba(STATE.overrides.overlayTitleFontColor,.35)}),Tween(u,UPDATE_SPEED,{fontColor:toRgba(LAYOUT_MODEL.overlayColor,.35),backgroundColor:toRgba(STATE.overrides.overlayTitleFontColor,.35)}),Tween(T,UPDATE_SPEED,{fontColor:toRgba(LAYOUT_MODEL.overlayColor,.35),backgroundColor:toRgba(STATE.overrides.overlayTitleFontColor,.35)})),toRgba(LAYOUT_MODEL.overlayColor,LAYOUT_MODEL.overlayAlpha)!==p.backgroundColor&&Tween(p,UPDATE_SPEED,{backgroundColor:toRgba(LAYOUT_MODEL.overlayColor,LAYOUT_MODEL.overlayAlpha)})},p.updatePosition=function(e){STATE.section(p.section),p.x=0,p.y=0,L=STATE.mediaView.width()>573?573:STATE.mediaView.width(),f=STATE.mediaView.height(p.section.key)>400?400:STATE.mediaView.height(p.section.key),s.x=2,s.y=r.height+20,l.y=STATE.overrides.overlayTitleFontSize+10,layoutCalcs.mediaMask.width()>573?(d.x=222,d.y=r.height+20):(d.transition=0,d.x=.5*(layoutCalcs.mediaView.width()-d.width),d.y=s.y+g+10,s.x=.5*(layoutCalcs.mediaView.width()-s.width),r.x=.5*(layoutCalcs.mediaView.width()-r.element.offsetWidth),h.x=.5*(d.width-67),u.x=.5*(d.width-20),T.x=.5*(d.width-20),l.alpha=0),0===p.updateSpeed?(p.width=STATE.mediaView.width(),p.height=STATE.mediaView.height(p.section.key),a.x=.5*(STATE.mediaView.width()-L),a.y=.5*(STATE.mediaView.height(p.section.key)-f),a.width=L,a.height=f):(Tween(p,p.updateSpeed,{width:STATE.mediaView.width(),height:STATE.mediaView.height(p.section.key)}),Tween(a,p.updateSpeed,{x:.5*(STATE.mediaView.width()-L),y:.5*(STATE.mediaView.height(p.section.key)-f),width:L,height:f})),E.width=STATE.mediaView.width(),E.height=STATE.mediaView.height(p.section.key),p.updateSpeed=UPDATE_SPEED},p.show=function(){p.updateSpeed=0,p.updatePosition(),p.visible||(p.visible=!0,p.display="block",Tween(p,UPDATE_SPEED,{alpha:1}),Tween(d,UPDATE_SPEED,{alpha:1}),Tween(v,UPDATE_SPEED,{alpha:0}))},p.hide=function(e){p.visible&&(p.visible=!1,Tween(p,UPDATE_SPEED,{alpha:0,onComplete:function(){this.display="none"}}))},p.updateContent=function(e){var t=csvToArray(e.section.media);c=getMediaById(t[e.assetId]),r.text="Share this "+c.type;var n=r.element.offsetHeight;s&&a.removeChild(s),s=new Bitmap,s.alpha=0,s.x=2,s.y=n+20,s.width=200,s.src=getThumbQuery(200,200,c.thumb||c.content,c.demoFile),d.y=n+20;var o="https://"+window.location.host+window.location.pathname.split("/").slice(0,-1).join("/");h.src="https://www.facebook.com/plugins/share_button.php?href="+encodeURIComponent(o)+"&width="+O.width+"&layout="+O.layout+"&action=like&size="+O.size+"&show_faces="+O.showFaces+"&share="+O.showShareButton+"&height="+O.height,a.addChild(s),s.addEventListener(LOAD,i)},p.addEventListener(CHILD_ADDED,function(e){t.call(p)}),p}function MenuController(e){function t(e){return window.scrollY>e?e:window.scrollY<0?0:window.scrollY}function i(e){LAYOUT_MODEL.menuRevealOnInit!==!1&&b&&e<10?m.menuView.dock.toggleState()||m.menuView.dock.show():e>stage.height*LAYOUT_MODEL.menuScrollReveal?m.menuView.dock.toggleState()||m.menuView.dock.show():m.menuView.dock.toggleState()&&m.menuView.dock.hide()}function n(){m.menuView.dock.toggleState()&&m.menuView.closeDock()}function o(e){if(m.menuView.isInitUri=!1,USER_AGENT===MOBILE||USER_AGENT===TABLET){var t=e.info.isDeepLink||""===LAYOUT_MODEL.menuAutoCloseMobile||void 0===LAYOUT_MODEL.menuAutoCloseMobile||LAYOUT_MODEL.menuAutoCloseMobile;""===STATE.introFile&&""===LAYOUT_MODEL.introFile||e.path?!p&&M(e)&&m.menuView.dock.toggleState()?setTimeout(m.menuView.closeDock,200):p||t?t&&m.menuView.dock.toggleState()&&setTimeout(m.menuView.closeDock,2e3):m.menuView.dock.toggleState()&&(clearTimeout(E),E=setTimeout(m.menuView.closeDock,200)):(m.menuView.dock.toggleState()||m.menuView.openDock(),
t&&setTimeout(m.menuView.closeDock,2e3))}else"overlay"===STATE.menuView.placement()?(!p&&m.menuView.dock.toggleState()&&m.menuView.closeDock(),p&&(LAYOUT_MODEL.menuOpenOverlayOnInit?m.menuView.openDock():m.menuView.closeDock())):isRevealMenuOnScrollPercent()&&i();a(e),p=!1}function a(e){(void 0===LAYOUT_MODEL.isAutoHighlightMenuOnScroll||LAYOUT_MODEL.isAutoHighlightMenuOnScroll)&&m.menuView.menuText.setActiveMenuItem(e)}function r(e){var t=csvToArray(e.value);return"media"===e.field&&"update"===e.method&&1===t.length&&"link"===getMediaById(t[0]).type}function l(e){return"media"===e.field&&"update"===e.method&&""===e.value}function s(e){setTimeout(function(){m.menuView.menuText.display="block",m.menuView.display="block",m.menuView.menuText.rebuild({model:e})},400)}function d(e){T&&clearTimeout(T),T=setTimeout(function(){e.action&&"sectionReorder"===e.action||(e.action&&"remove"===e.action?l(e)&&s(c()):e.action&&"addMediaToSection"===e.action||(e.action&&"addSelectionToSection"===e.action?r(e)&&s(c()):s(c())))},0)}function c(){var e={};for(var t in SECTIONS_MODEL)SECTIONS_MODEL[t].media&&SECTIONS_MODEL[t].mediaItems&&SECTIONS_MODEL.hasOwnProperty(t)&&(e[t]={id:SECTIONS_MODEL[t].id,key:SECTIONS_MODEL[t].key,hideFromMenu:SECTIONS_MODEL[t].hideFromMenu,customLink:SECTIONS_MODEL[t].customLink,isIndex:SECTIONS_MODEL[t].isIndex,indexLink:SECTIONS_MODEL[t].indexLink,linkTarget:SECTIONS_MODEL[t].linkTarget,isOpen:SECTIONS_MODEL[t].isOpen,hideSubs:SECTIONS_MODEL[t].hideSubs,label:SECTIONS_MODEL[t].label,alias:SECTIONS_MODEL[t].alias,media:SECTIONS_MODEL[t].media.slice(0),mediaItems:SECTIONS_MODEL[t].mediaItems.slice(0),overrides:SECTIONS_MODEL[t].overrides,password:SECTIONS_MODEL[t].password,thumb:SECTIONS_MODEL[t].thumb,visible:SECTIONS_MODEL[t].visible,isSearch:SECTIONS_MODEL[t].isSearch,isLightbox:SECTIONS_MODEL[t].isLightbox});if((USER_AGENT===MOBILE||USER_AGENT===TABLET&&LAYOUT_MODEL.footerOnMenuTablet)&&(STATE.socialLinks.forEach(function(t){var i=MEDIA_MODEL[t],n=getNextId(e);e[t]={id:n,key:i.label,label:i.label,media:[t],mediaItems:[],overrides:{},password:"",thumb:{},visible:!0},e.ROOT_SECTION.media.push(n)}),STATE.copyright)){var i=getNextId(e);e.copyright={id:i,key:"copyright",label:STATE.copyright,media:[],mediaItems:[],overrides:{},password:"",thumb:{},visible:!0},e.ROOT_SECTION.media.push(i)}return e}function h(e){if(g||e&&/menu|marginOverlap|dropdownSubMenu|sitePaddingTop|sitePaddingRight|sitePaddingBottom|sitePaddingLeft|footerIcon/.test(e.id)){m.menuView.updateStyle(),m.menuView.layoutChange();var t=c();m.menuView.menuText.display="block",m.menuView.display="block",m.menuView.menuText.rebuild({model:t}),m.menuView.menuText.updatePosition(0),m.menuView.updatePosition("layoutModelChange"),m.menuView.updateScroll(),g=!1,s(t)}}function u(e){"link"===e.type&&"Footer Links"!==e.filters&&(m.menuView.updateStyle(),m.menuView.menuText.display="block",m.menuView.display="block",m.menuView.menuText.rebuild({model:c()}),m.menuView.menuText.updatePosition(0),m.menuView.updatePosition(),m.menuView.updateScroll())}var T,E,m=new ControllerProxy({parentView:e.parentView,parentController:e.parentController,events:e.siteControllerEvents}),g=!0,p=!0,L=!0,f=350,v=!1,S=!1;m.updateSpeed=0,m.menuView=new e.MenuView(e),m.menuView.alpha=0,USER_AGENT===MOBILE&&STATE.overrides.menuDisplaceMobile?(stage.addChild(m.menuView),m.menuView.addChild(e.parentView),m.menuView.setClass("MenuView invertSite")):USER_AGENT===TABLET&&STATE.overrides.menuDisplaceTablet?(stage.addChild(m.menuView),m.menuView.addChild(e.parentView),m.menuView.setClass("MenuView invertSite")):(m.parentView.addChild(m.menuView),m.parentView.setClass("SiteView invertSite")),e.model=SECTIONS_MODEL,m.menuView.menuText=new MenuText(e),m.menuView.menuText.onclick=function(){m.events.removeEventListener("SITE_URI_CHANGE_PASSIVE",a),setTimeout(function(){m.events.addEventListener("SITE_URI_CHANGE_PASSIVE",a)},2e3)},m.menuView.menuText.element.setAttribute("class","menuText"),m.menuView.addContent(m.menuView.menuText),m.events.addEventListener("menuUpdatePosition",function(){m.menuView.updatePosition()}),m.events.addEventListener(LAYOUT_MODEL_CHANGE,h),m.events.addEventListener(MEDIA_MODEL_CHANGE,u),m.events.addEventListener(SECTIONS_MODEL_CHANGE,d),m.events.addEventListener(ORIENTATION_CHANGE,function(){v=!0}),m.events.addEventListener(RESIZE_END,function(){layoutCalcs.isMenuOverlayStateChange?(m.menuView.transition=0,m.menuView.alpha=0,setTimeout(function(){layoutCalcs.isMenuResponsiveOverlay&&USER_AGENT!==MOBILE?m.menuView.closeDock(0):m.menuView.openDock(0),m.menuView.menuText.display="block",m.menuView.display="block",m.menuView.menuText.rebuild({model:c()}),m.menuView.menuText.updatePosition(0),m.menuView.updatePosition(0),m.menuView.updateStyle(0),m.menuView.updateScroll(),m.menuView.dock.toggleState()&&setTimeout(function(){m.menuView.transition=0,m.menuView.alpha=1},350)},f)):(USER_AGENT===MOBILE&&(v||L)&&(m.menuView.menuText.rebuild({model:c()}),v=!1),m.menuView.menuText.updatePosition(0),m.menuView.updatePosition(),USER_AGENT===MOBILE||USER_AGENT===TABLET||m.menuView.dock.toggleState()||LAYOUT_MODEL.isMenuScrollReveal||setTimeout(function(){m.menuView.display="none"},f)),f=50,L=!1}),m.events.addEventListener(SITE_URI_CHANGE,o),m.events.addEventListener("SITE_URI_CHANGE_PASSIVE",a),m.events.addEventListener(TOUCH_NAVIGATION_END,n),m.events.addEventListener(MENU_BUILT,function(){T=setTimeout(function(){m.menuView.dock.toggleState()&&(m.menuView.menuText.display="block",m.menuView.display="block"),m.menuView.menuText.updatePosition(0),m.menuView.updatePosition()},0)}),m.events.addEventListener(MENU_SIZE_CHANGE,m.menuView.updatePosition),m.events.addEventListener("LOGO_LOADED",function(){m.menuView.menuText.display="block",m.menuView.display="block",m.menuView.menuText.updatePosition(0),m.menuView.updatePosition()});var O,C=0,A=!1,b=!0,y=void 0===LAYOUT_MODEL.menuRevealOnInit||LAYOUT_MODEL.menuRevealOnInit;LAYOUT_MODEL.menuRevealOnInit!==!1&&"overlay"!==STATE.menuView.placement()||USER_AGENT===MOBILE||USER_AGENT===TABLET||m.menuView.dock.hide(),window.addEventListener("scroll",function(){S=!1,LAYOUT_MODEL.isMenuScrollReveal&&/top/.test(STATE.menuView.placement())&&(A=!0,clearTimeout(O),O=setTimeout(function(){var e=STATE.siteView.height()-stage.height;C=t(e),LAYOUT_MODEL.menuRevealOnInit!==!0&&b?(m.menuView.dock.hide(),y=!1):isRevealMenuOnScrollPercent()?(S=!0,i(C)):LAYOUT_MODEL.isMenuScrollReveal&&(0!==C&&C>window.oldScrollY-1?m.menuView.dock.toggleState()&&!b&&(m.menuView.dock.hide(),y=!1):CMth.abs(p)?(b=!0,C=!1,e.stopPropagation()):(C=!0,USER_AGENT===MOBILE&&(h.dock.toggleState()?h.dock.show(0):h.dock.hide(0)),b=!1),USER_AGENT!==MOBILE&&USER_AGENT!==TABLET||!b||e.preventDefault();var t=/left|top|bottom/.test(STATE.menuView.placement())?"left":"right";if(USER_AGENT!==TABLET&&USER_AGENT!==MOBILE||(t="left"),b){h.transition=0;var i=g+v;"left"===t?h.dock.toggleState()?h.translateX=i>0?0:i:h.translateX=i<-layoutCalcs.menuView.width()?-layoutCalcs.menuView.width():i:h.translateX=i=e.touches[0].pageX&&(S="left"===t?"close":"open",O=e.touches[0].pageX)}}function s(){b&&"close"===S?(A=!1,h.dock.toggleState()&&h.closeDock()):b&&"open"===S&&(A=!1,h.dock.toggleState()||h.openDock()),A=!1,b=!1,h.removeEventListener(TOUCH_MOVE,l),h.removeEventListener(TOUCH_END,s),h.removeEventListener(TOUCH_CANCEL,s)}function d(){h.dock.toggleState()?(D=!1,h.closeDock()):(D=!0,h.openDock())}function c(){return USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&LAYOUT_MODEL.menuBlendMode&&"overlay"!==STATE.menuView.placement()?LAYOUT_MODEL.menuBlendMode:"normal"}var h=new ViewProxy({events:e.events});h.identity="menu",h.element.setAttribute("data-identity","menu"),h.isInitUri=!0,h.alpha=0,h.updateSpeed=0,h.zIndex=STATE.menuView.zIndex,h.style.pointerEvents="none",h.x=0,h.y=0,h.position=STATE.menuView.menuPositionFixed()||"overlay"===STATE.menuView.placement()?"fixed":"absolute",h.element.style["mix-blend-mode"]=c();var u=(e.parentView,new Sprite);u.identity="menu",u.element.setAttribute("data-identity","menu"),u.element.setAttribute("class","mask"),u.backgroundColor=toRgba("#FF0000",0),u.width=layoutCalcs.menuView.width(),h.mask=u,h.addChild(u);var T,E,m=!0,g=0,p=0,L=0,f=0,v=0,S="open",O=0,C=!1,A=!1,b=!1,y=isVerticalMenu()?"top":"left",M=isHorizontalMenu()?layoutCalcs.menuView.y():layoutCalcs.menuView.x(),w=isHorizontalMenu()?layoutCalcs.menuView.x():layoutCalcs.menuView.y(),_={width:stage.width,height:stage.height};h.addEventListener(CHILD_ADDED,function(){h.updatePosition(),"overlay"===STATE.menuView.placement()?m=!1:Tween(h,UPDATE_SPEED,{delay:UPDATE_SPEED,alpha:1,onComplete:function(){m=!1}})}),h.dock=new Dock(h,_,{side:USER_AGENT===TABLET||USER_AGENT===MOBILE?"left":STATE.menuView.placement(),align:y,margin:M,pOffset:w,reveal:0,disableResize:"overlay"===STATE.menuView.placement()}),h.layoutChange=function(){var e=STATE.menuView.placement();h.prevPlacement!==e&&"overlay"===e?h.element.addEventListener(CLICK,function(e){h.element!==e.target&&h.mask.element!==e.target||d()}):"overlay"===h.prevPlacement&&"overlay"!==e&&h.element.removeEventListener(CLICK,function(e){h.element!==e.target&&h.mask.element!==e.target||d()}),h.prevPlacement=e},h.layoutChange(),h.showCloseButton=function(){if(USER_AGENT===MOBILE||USER_AGENT===TABLET){var e=STATE.menuView.menuIconOverlayColor(),i=Number(LAYOUT_MODEL.menuIconSizeMobile||27),n=t(i);n.isClosed=!1,n.color=firstValid(LAYOUT_MODEL.menuIconOverlayColorMobile,"#000000"),n.rotate=-180,n.line1Y=2*n.topMargin-(Number(LAYOUT_MODEL.menuIconLineWidthMobile||3)+1),n.line3Y=2*n.topMargin-(Number(LAYOUT_MODEL.menuIconLineWidthMobile||3)+1),n.leftMargin*=.5,LAYOUT_MODEL.menuShowCloseIconMobile&&o(n)}else if("text"!==LAYOUT_MODEL.menuOverlayIconType){var e=STATE.menuView.menuIconOverlayColor(),i=Number(LAYOUT_MODEL.menuIconSize||36),n=t(i);n.isClosed=!1,n.color=e,n.rotate=-180,n.line1Y=2*n.topMargin-(Number(LAYOUT_MODEL.menuIconLineWidth||1)+1),n.line3Y=2*n.topMargin-(Number(LAYOUT_MODEL.menuIconLineWidth||1)+1),n.leftMargin*=.5,o(n)}else T.fontColor=LAYOUT_MODEL.menuIconOverlayColor||"#333333",T.text=LAYOUT_MODEL.menuIconCloseText||"close"},h.showMenuIcon=function(){if(USER_AGENT===MOBILE||USER_AGENT===TABLET){var e=Number(LAYOUT_MODEL.menuIconSizeMobile||27),i=t(e);i.isClosed=!0,i.color=firstValid(LAYOUT_MODEL.menuIconColorMobile,LAYOUT_MODEL.menuIconColor,"#606060"),i.rotate=0,i.line1Y=i.topMargin,i.line3Y=3*i.topMargin,i.diagonal=i.width,LAYOUT_MODEL.menuShowCloseIconMobile&&o(i)}else if("text"!==LAYOUT_MODEL.menuOverlayIconType){var e=Number(LAYOUT_MODEL.menuIconSize||36),i=t(e);i.isClosed=!0,i.color=LAYOUT_MODEL.menuIconColor||"#333333",i.rotate=0,i.line1Y=i.topMargin,i.line3Y=3*i.topMargin,i.diagonal=i.width,o(i)}else T.fontColor=LAYOUT_MODEL.menuIconColor||"#333333",T.text=LAYOUT_MODEL.menuIconText||"menu"},USER_AGENT===TABLET||USER_AGENT===MOBILE?(n(),T.addEventListener(CLICK,d),h.addEventListener(TOUCH_START,r),h.style.pointerEvents="auto"):"overlay"===STATE.menuView.placement()&&("text"!==LAYOUT_MODEL.menuOverlayIconType?n():"text"===LAYOUT_MODEL.menuOverlayIconType&&i());var D=!1;return h.openDock=function(e){e=isNaN(e)?UPDATE_SPEED:e,USER_AGENT===MOBILE||USER_AGENT===TABLET?(h.dock.show(e),h.showCloseButton(),h.events.dispatchEvent(MENU_DOCK_OPEN),h.events.dispatchEvent("MENU_DOCK_TOGGLE")):"overlay"===STATE.menuView.placement()&&(h.showCloseButton(),T&&"hover"===LAYOUT_MODEL.menuIconAction&&(T.element.onmouseenter=null),h.dock.show(0,function(t){t.display="block",h.menuText.updatePosition(0),Tween(t,e,{delay:.15,alpha:1,onComplete:function(){T&&(h.dock.toggleState()?(h.showCloseButton(),"hover"===LAYOUT_MODEL.menuIconAction&&(T.element.onmouseenter=null),T.element.onclick=d):(h.showMenuIcon(),"hover"===LAYOUT_MODEL.menuIconAction?(T.element.onmouseenter=d,T.element.onclick=isPod()||isPad()?d:null):T.element.onclick=d))}}),E=document.body.style.overflowY,document.body.style.overflowY="hidden"}))},h.closeDock=function(e){e=isNaN(e)?UPDATE_SPEED:e,A||USER_AGENT!==MOBILE&&USER_AGENT!==TABLET?"overlay"===STATE.menuView.placement()&&(h.showMenuIcon(),T&&("hover"===LAYOUT_MODEL.menuIconAction?(T.element.onmouseenter=d,T.element.onclick=isPod()||isPad()?d:null):T.element.onclick=d),h.dock.hide(0,function(t){Tween(t,e,{delay:.05,alpha:0,onComplete:function(){t.display="none",T&&(h.dock.toggleState()?(h.showCloseButton(),"hover"===LAYOUT_MODEL.menuIconAction&&(T.element.onmouseenter=null),T.element.onclick=d):(h.showMenuIcon(),"hover"===LAYOUT_MODEL.menuIconAction?(T.element.onmouseenter=d,T.element.onclick=isPod()||isPad()?d:null):T.element.onclick=d))}}),setTimeout(function(){/unified/.test(STATE.overrides.siteDisplayBehavior)||"overlay"===STATE.overrides.siteDisplayBehavior&&STATE.overrides.siteDisplayGalleryOnlyOverlay?document.body.style.overflowY="scroll":document.body.style.overflowY="hidden"},100)})):(h.dock.hide(e),h.showMenuIcon(),h.dock.toggleState()&&(h.events.dispatchEvent(MENU_DOCK_CLOSE),h.events.dispatchEvent("MENU_DOCK_TOGGLE")))},h.updateStyle=function(){USER_AGENT===MOBILE?Tween(h,h.updateSpeed,{backgroundColor:toRgba(LAYOUT_MODEL.menuBgColorMobile||LAYOUT_MODEL.menuBgColor,LAYOUT_MODEL.menuBgAlphaMobile||LAYOUT_MODEL.menuBgAlpha)}):USER_AGENT===TABLET?Tween(h,h.updateSpeed,{backgroundColor:toRgba(LAYOUT_MODEL.menuBgColorTablet||LAYOUT_MODEL.menuBgColor,LAYOUT_MODEL.menuBgAlphaTablet||LAYOUT_MODEL.menuBgAlpha)}):Tween(h,0,{backgroundColor:toRgba(STATE.menuView.menuBgColor(),STATE.menuView.menuBgAlpha())})},h.updatePosition=function(t){var o="layoutModelChange"===t,a=isNaN(t)?h.updateSpeed:t;h.position=STATE.menuView.menuPositionFixed()||"overlay"===STATE.menuView.placement()?"fixed":"absolute",h.element.style["mix-blend-mode"]=c();var r=exists(h,"menuText.height")||0,l=layoutCalcs.menuView.height()-layoutCalcs.menuText.y(r),s=layoutCalcs.menuText.y(r);if(USER_AGENT===MOBILE?l=layoutCalcs._footerHeight?layoutCalcs.menuView.height()-layoutCalcs.menuText.y(r)-layoutCalcs._footerHeight-2*layoutCalcs.mobileFooterPadding:layoutCalcs.menuView.height()-layoutCalcs.menuText.y(r):l>layoutCalcs.menuView.height()&&(l=layoutCalcs.menuView.height(),s=0),USER_AGENT!==TABLET&&USER_AGENT!==MOBILE&&LAYOUT_MODEL.navbarAlignHorizontal===STATE.menuView.placement()&&"bottom"===LAYOUT_MODEL.navbarAlignVertical&&layoutCalcs._navbarVisible){var d=12;l=layoutCalcs.navbarView.y()-percentToPixels(LAYOUT_MODEL.sitePaddingTop,stage.height)-s-LAYOUT_MODEL.menuOffsetY-d}USER_AGENT===TABLET||USER_AGENT===MOBILE||("overlay"===STATE.menuView.placement()?T?o&&T&&(e.parentView.removeChild(T),"text"!==LAYOUT_MODEL.menuOverlayIconType?n():"text"===LAYOUT_MODEL.menuOverlayIconType&&i()):"text"!==LAYOUT_MODEL.menuOverlayIconType?n():"text"===LAYOUT_MODEL.menuOverlayIconType&&i():T&&(h.dock.show(0,function(e){e.display="block",Tween(e,a,{alpha:1})}),/overlay/.test(STATE.menuView.placement())?stage.removeChild(T):e.parentView.removeChild(T),T=null));var E=isPod()&&"overlay"===STATE.menuView.placement()?250:0;Tween(h,0,{width:layoutCalcs.menuView.width(),height:layoutCalcs.menuView.height()+E}),USER_AGENT===MOBILE?(Tween(u,a,{width:layoutCalcs.menuView.width(),height:layoutCalcs.menuView.height(),y:0}),h.menuText&&Tween(h.menuText,a,{y:s})):Tween(u,a,{width:layoutCalcs.menuView.width(),height:l,y:s}),h.updateSpeed=UPDATE_SPEED,_.width=stage.width,_.height=stage.height,USER_AGENT===TABLET||USER_AGENT===MOBILE?h.dock.side="left":h.dock.side=STATE.menuView.placement(),h.dock.align=isVerticalMenu()?"top":"left",h.dock.margin=isHorizontalMenu()?layoutCalcs.menuView.y():layoutCalcs.menuView.x(),h.dock.pOffset=isHorizontalMenu()?layoutCalcs.menuView.x():layoutCalcs.menuView.y(),h.dock.disableResize="overlay"===STATE.menuView.placement(),h.dock.resize(m?0:UPDATE_SPEED),setTimeout(function(){h.scroll&&h.scroll.resize()},1e3*UPDATE_SPEED)},h.addContent=function(e){h.mask.addChild(e),setTimeout(function(){h.updateScroll()},1e3*UPDATE_SPEED)},h.removeContent=function(e){h.mask.removeChild(e),setTimeout(function(){h.updateScroll()},1e3*UPDATE_SPEED)},h.updateScroll=function(){if((isPod()||isPad())&&(u.element.style["-webkit-overflow-scrolling"]="touch"),"native"===LAYOUT_MODEL.menuScrollType)h.style.pointerEvents="auto",!isVerticalMenu()&&LAYOUT_MODEL.dropdownSubMenu?u.element.style.overflow="visible":isVerticalMenu()?(u.element.style.overflowY="scroll",u.element.style.overflowX="hidden"):(u.element.style.overflowY="hidden",u.element.style.overflowX="scroll");else if(MAC_SCROLLBARS&&("nativeMacOs"===LAYOUT_MODEL.menuScrollType||LAYOUT_MODEL.globalSmoothScroll||USER_AGENT===MOBILE))h.style.pointerEvents="auto",!isVerticalMenu()&&LAYOUT_MODEL.dropdownSubMenu?u.element.style.overflow="visible":isVerticalMenu()?(u.element.style.overflowY="scroll",u.element.style.overflowX="hidden"):u.element.style.overflow="auto";else if(isVerticalMenu()||!LAYOUT_MODEL.dropdownSubMenu){h.scroll&&h.scroll.destroy(),u.overflow="hidden";var e=LAYOUT_MODEL.menuScrollbarWidth,t="right"===LAYOUT_MODEL.menuScrollbarAlign?-e:-percentToPixels(LAYOUT_MODEL.menuWidth,stage.width),i=["bar","wheel","touch"],n=percentToPixels(STATE.menuView.menuTextPaddingHorizontal(),stage.width),o={name:"menu",types:i,axis:isVerticalMenu()?"y":"x",align:isVerticalMenu()?"top":STATE.menuView.menuTextAlignHorizontal(),alpha:LAYOUT_MODEL.menuScrollbarBgAlpha,color:LAYOUT_MODEL.menuScrollbarColor,hover:LAYOUT_MODEL.menuScrollbarHover,side:LAYOUT_MODEL.menuScrollbarAlignment,width:e,topPad:0,margin:isVerticalMenu()?2:n,offsetX:isVerticalMenu()?t:0,zIndex:500,rounded:STATE.overrides.thumbnailScrollbarRounded,visibility:STATE.overrides.thumbnailScrollbarVisibility};("nativeMacOs"===LAYOUT_MODEL.menuScrollType||LAYOUT_MODEL.globalSmoothScroll)&&(o.color="#000000",o.hover="#000000",o.side="right",o.alpha=0,o.width=7,o.offsetX=-10,o.offsetY=0,o.rounded=!0,o.visibility="when scrolling"),h.scroll=new Scroll(h.menuText,u,o)}else h.style.pointerEvents="auto",u.element.style.overflow="visible"},h.updateStyle(),h}function MenuText(e){function t(){_.text="",_.children=[],x=new Accordion(e),x.alpha=0,USER_AGENT===MOBILE?x.gap=0:USER_AGENT===TABLET?x.gap=percentToPixels(firstValid(LAYOUT_MODEL.menuTextGapTablet,STATE.menuView.menuTextGap()),100):x.gap=percentToPixels(STATE.menuView.menuTextGap(),100),LAYOUT_MODEL.menuExpandAll?x.expand="all":x.expand="single",x.toggle=!1,x.wrap=!1;var t=USER_AGENT===TABLET?LAYOUT_MODEL.menuTextAlignHorizontalTablet||"left":STATE.menuView.menuTextAlignHorizontal(),r=t;USER_AGENT===MOBILE?r="left":/top|bottom/.test(STATE.menuView.placement())&&USER_AGENT!==TABLET&&(r="top"),x.align=r,x.updateSpeed=_.updateSpeed,x.axis=isVerticalMenu()?"y":"x",x.perpLength=isVerticalMenu()?_.height:_.width,x.animate=!1,_.addChild(x),a(P,!1,x,!1),_.width=x.width,_.height=x.height,x.addEventListener(ACCORDION_SIZE_CHANGE,o),o(),x.layout(),D&&_.selectMenuItem(),setTimeout(function(){i(),n(),_.events.dispatchEvent(MENU_BUILT),N=0},N)}function i(){O(),x.perpLength=isVerticalMenu()?_.height:_.width,x.layout()}function n(){setTimeout(function(){Tween(x,UPDATE_SPEED,{alpha:1})},350)}function o(e){e&&(_.width=e.width,_.height=e.height),_.x=Math.round(layoutCalcs.menuText.x(_.width)),_.events.dispatchEvent(MENU_SIZE_CHANGE)}function a(e,t,i,n){i.parentLabel=n;for(var o=0,a=e.length;o-1){var o=e.split(",");t=o[0].split("=")[1];var a=o[1].split("x");i=Number(a[0].split("=")[1]),n=Number(a[1])}else t=e.split("=")[1];return{path:t,width:i,height:n}}function u(e){var t=h(e.label),i=new Bitmap;return i.src=SETTINGS_MODEL.cdnSslUri+"/"+t.path,i.width=t.width,i.height=t.height,i.customLabel=e.label.toLowerCase(),i.cursor="pointer",i}function T(e){var t=socialIcons[e.label.toLowerCase()],i=new Bitmap;return i.src=ICONS+t.filename,i.width=t.width,i.height=t.height,i.style.padding="2px 0",i.socialLabel=e.label.toLowerCase(),i.cursor="pointer",i}function E(e){switch(LAYOUT_MODEL.footerIconShape){case"standard":return e.svgStdPath;case"rectangle":return e.svgRectPath;case"circle":return e.svgCircPath}}function m(e){var t=socialIcons[e.label.toLowerCase()],i=new Svg;i.identity="menu",i.element.setAttribute("data-identity","menu");var n=new Svg({type:"g"});n.identity="menu",n.element.setAttribute("data-identity","menu");var o=new Path;o.identity="menu",o.element.setAttribute("data-identity","menu");var a=USER_AGENT===TABLET||USER_AGENT===MOBILE?1:LAYOUT_MODEL.footerIconScale;if(n.scale=a,/circle|rectangle/.test(LAYOUT_MODEL.footerIconShape)){var r=new Rect;r.rx="circle"===LAYOUT_MODEL.footerIconShape?t.bgCircRadius:t.bgRectRadius,r.width=t.width,r.height=t.height,r.fill=LAYOUT_MODEL.footerIconColor,n.addChild(r)}return o.d=E(t),o.fill="standard"===LAYOUT_MODEL.footerIconShape?LAYOUT_MODEL.footerIconColor:LAYOUT_MODEL.footerIconBgColor,o.fillRule="evenodd",n.addChild(o),i.addChild(n),i.width=t.width*a,i.height=t.height*a,i.socialLabel=e.label.toLowerCase(),i}function g(e,t){var i="%spacer%"===e.toLowerCase()?"span":"a",n=new Sprite({type:i});return n.identity="menu",n.element.setAttribute("data-identity","menu"),n.element.setAttribute("class","menuLabel"),n.element.style["user-select"]="none",USER_AGENT===MOBILE?(t?(n.fontFamily=LAYOUT_MODEL.menuSubFontMobile||LAYOUT_MODEL.menuFontMobile||LAYOUT_MODEL.menuFont,n.fontSize=LAYOUT_MODEL.menuSubFontSizeMobile||LAYOUT_MODEL.menuFontSizeMobile||LAYOUT_MODEL.menuSubFontSize,n.textTransform=LAYOUT_MODEL.menuSubTextTransform||"none"):(n.fontFamily=LAYOUT_MODEL.menuFontMobile||LAYOUT_MODEL.menuFont,n.fontSize=LAYOUT_MODEL.menuFontSizeMobile||LAYOUT_MODEL.menuFontSize,n.textTransform=LAYOUT_MODEL.menuTextTransform||"none"),n.fontColor=LAYOUT_MODEL.menuFontColorMobile||LAYOUT_MODEL.menuFontColor):USER_AGENT===TABLET?(t?(n.fontFamily=LAYOUT_MODEL.menuSubFontTablet||LAYOUT_MODEL.menuFontTablet||LAYOUT_MODEL.menuFont,n.fontSize=LAYOUT_MODEL.menuSubFontSizeTablet||LAYOUT_MODEL.menuFontSizeTablet||LAYOUT_MODEL.menuSubFontSize,n.textTransform=LAYOUT_MODEL.menuSubTextTransform||"none"):(n.fontFamily=LAYOUT_MODEL.menuFontTablet||LAYOUT_MODEL.menuFont,n.fontSize=LAYOUT_MODEL.menuFontSizeTablet||LAYOUT_MODEL.menuFontSize,n.textTransform=LAYOUT_MODEL.menuTextTransform||"none"),n.fontColor=LAYOUT_MODEL.menuFontColorTablet||LAYOUT_MODEL.menuFontColor):(t?(n.fontFamily=LAYOUT_MODEL.menuSubFont||LAYOUT_MODEL.menuFont,n.fontSize=STATE.menuView.menuSubFontSize(),n.textTransform=LAYOUT_MODEL.menuSubTextTransform||"none"):(n.fontFamily=LAYOUT_MODEL.menuFont,n.fontSize=STATE.menuView.menuFontSize(),n.textTransform=LAYOUT_MODEL.menuTextTransform||"none"),n.fontColor=STATE.menuView.menuFontColor()),n.fontStyle=LAYOUT_MODEL.menuFontStyle||"normal",n.letterSpacing=LAYOUT_MODEL.menuKerning,n.textWrap=USER_AGENT===MOBILE,n.text="%spacer%"===e.toLowerCase()?"":e,n.label=n,"%spacer%"!==e.toLowerCase()&&(n.cursor="pointer"),n}function p(e){var t=isNaN(LAYOUT_MODEL.menuIndentMobile)?20:LAYOUT_MODEL.menuIndentMobile,i=isNaN(LAYOUT_MODEL.menuSubIndentMobile)?t+10:t+LAYOUT_MODEL.menuSubIndentMobile;return e?i:t}function L(e,t){var i,n=LAYOUT_MODEL.menuTextAlignHorizontalMobile?LAYOUT_MODEL.menuTextAlignHorizontalMobile:"left",o=p(t),a=""===LAYOUT_MODEL.menuLinesMobile||void 0===LAYOUT_MODEL.menuLinesMobile||LAYOUT_MODEL.menuLinesMobile,r=LAYOUT_MODEL.menuLineHeightMobile||60;switch(n){case"left":
i="flex-start";break;case"center":i="center";break;case"right":i="flex-end"}var l=new Sprite;return l.identity="menu",l.element.setAttribute("data-identity","menu"),l.addChild(e),l.label=e,l.width=layoutCalcs.menuView.width(),l.minHeight=r,l.position="relative",l.display="flex",l.style.justifyContent=i,l.style.alignItems="center",a&&(l.borderBottom="1px solid "+toRgba(STATE.menuView.menuFontColor(),STATE.menuView.menuBgAlpha()+.15)),e.position="relative",layoutCalcs.menuBullet.updateSize(t),e.x=0,e.y=a?1:0,e.textAlign=n,e.paddingLeft=o,e.paddingRight=o,l}function f(e){var t;if("custom_png"===LAYOUT_MODEL.menuBulletType)t=new Bitmap,t.isSub=e,layoutCalcs.menuBullet.updateSize(e),t.alpha=0,_.addChild(t),t.element.addEventListener(LOAD,function(i){var n={width:i.target.offsetWidth,height:i.target.offsetHeight,filename:this.src};setTimeout(function(){var i=RetinaResizeEngine(n);t.width=i.width,t.height=i.height,layoutCalcs.menuBullet.width=i.width,layoutCalcs.menuBullet.height=i.height,t.width=layoutCalcs.menuBullet.width,e?(t.x=Math.round(-(t.width+15)+LAYOUT_MODEL.menuSubBulletOffsetHorizontal),t.y=0+LAYOUT_MODEL.menuSubBulletOffsetVertical):(t.x=Math.round(-(t.width+15)+LAYOUT_MODEL.menuBulletOffsetHorizontal),t.y=0+LAYOUT_MODEL.menuBulletOffsetVertical)},10)}),t.src=SETTINGS_MODEL.cdnSslUri+"/menu-bullet__at__2x.png";else if(/^underline/.test(LAYOUT_MODEL.menuBulletType)){var i=Number(LAYOUT_MODEL.menuBulletType.split("_")[1]);t=new Sprite,t.identity="menu",t.element.setAttribute("data-identity","menu"),t.isSub=e,t.backgroundColor=toRgba(STATE.menuView.menuFontColor(),0),t.width=0,t.height=i}else t=new Sprite,t.identity="menu",t.element.setAttribute("data-identity","menu"),t.isSub=e,layoutCalcs.menuBullet.updateSize(e),t.fontFamily=LAYOUT_MODEL.menuFont,t.fontColor=toRgba(STATE.menuView.menuFontColor(),0),t.fontSize=e?STATE.menuView.menuSubFontSize():STATE.menuView.menuFontSize(),t.width=layoutCalcs.menuBullet.width,t.text=menuBullet[LAYOUT_MODEL.menuBulletType],e?(t.x=Math.round(-(t.width+15)+LAYOUT_MODEL.menuSubBulletOffsetHorizontal),t.y=0+LAYOUT_MODEL.menuSubBulletOffsetVertical):(t.x=Math.round(-(t.width+15)+LAYOUT_MODEL.menuBulletOffsetHorizontal),t.y=0+LAYOUT_MODEL.menuBulletOffsetVertical);return t}function v(){var e="inherit"===STATE.menuView.menuSubTextAlignHorizontal()?STATE.menuView.menuTextAlignHorizontal():STATE.menuView.menuSubTextAlignHorizontal();return USER_AGENT===MOBILE?LAYOUT_MODEL.menuTextAlignHorizontalMobile||"left":USER_AGENT===TABLET?LAYOUT_MODEL.menuTextAlignHorizontalTablet||"left":e}function S(){return USER_AGENT===MOBILE?0:USER_AGENT===TABLET?firstValid(LAYOUT_MODEL.menuSubIndentTablet,LAYOUT_MODEL.menuSubIndent):LAYOUT_MODEL.menuSubIndent}function O(){for(var e=0,t=Y.length,i=v(),n=firstValid(LAYOUT_MODEL.menuSubTextPaddingHorizontal,5);eo.tile.perpLength?a:o.tile.perpLength,o.tile.addItem(a,r)}o.tile.layoutItems();var l=STATE.menuView.menuSubTextGap();USER_AGENT===TABLET&&(l=firstValid(LAYOUT_MODEL.menuTextGapTablet,STATE.menuView.menuSubTextGap())),l=percentToPixels(l,100);for(var s=0;s0){for(d=new Tile({id:"nav"}),d.gap=LAYOUT_MODEL.navbarGap+2,d.axis="horizontal"===LAYOUT_MODEL.navbarLayout?"x":"y",d.align="vertical"===LAYOUT_MODEL.navbarLayout?LAYOUT_MODEL.navbarJustifi