Maine Alewives 15 Maine Commercial and Editorial Photographer - Michael Wilson Stories/Katahdin Woods Stories/Built In Brooklyn Stories/Wind Power instagram Stories/North Maine Road Trip Stories/collegiate woodsmen New-Projects/Maine Cannabis New-Projects/Centenarians New-Projects/Dino Mini Golf New-Projects/American Roots Projects/Apiarists Commissions/Marine Partrol Commissions/Fly Fishing Commissions/Mulch Markers Projects/Centenarians Commissions/American Roots Projects/Falconry Projects/Run Portland Portfolios/Overview Portfolios/Vacationland Portfolios/Artisans Portfolios/Apiarists Portfolios/Marine Patrol Portfolios/Centenarians Portfolios/Fly Fishing Portfolios/Mulch Makers Portfolios/Cannabis Portfolios/American Roots Portfolios/Falconry Portfolios/Competitive Woodsmen Portfolios/Run Portland Portfolios/Ice Fishing Portfolios/Can-Am Crown Portfolios/Alewives Assignments/Competitive Woodsmen Assignments/Cannabis Assignments/Ice Fishing Assignments/Can-Am Crown Assignments/Alewives linkedin Published Portfolios/Edibles About Maine Alewives 15 15 of 21 next -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 TextField;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 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,g=n.getBounds(),m="x"===o.axis?g.width-o.gap:n.perpLength,p=g.height+("x"===o.axis?0:o.gap+d);for(r=0;rlayoutCalcs.menuView.width()&&(m=f)}}o.width=m,o.height=p,o.dispatchEvent(ACCORDION_SIZE_CHANGE,{width:m,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";g.element.style["mix-blend-mode"]=e}function n(e){O=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(){m=new Svg,m.left=-20,m.top=-20,m.width=40,m.height=40,g.addChild(m),m.element.style["pointer-events"]="none",g.svg=m,p=new Path,p.id="icon",m.addChild(p),p.element.style["pointer-events"]="none",g.iconLeft=p,L=new Path,L.id="icon",m.addChild(L),L.element.style["pointer-events"]="none",g.iconCenter=L,g.iconCenter.d=svgPaths.cursorThumbs,f=new Path,f.id="icon",m.addChild(f),f.element.style["pointer-events"]="none",g.iconRight=f,s(),stage.addEventListener(MOUSE_MOVE,d),g.listenerAdded=!0}function s(){var e=USER_AGENT!==MOBILE&&USER_AGENT!==TABLET&&LAYOUT_MODEL.cursorIconBlendMode?LAYOUT_MODEL.cursorIconBlendMode:"normal";g.cursorIconStyle=LAYOUT_MODEL.cursorIconStyle||"arrow2";var t=C.left[g.cursorIconStyle],i=C.right[g.cursorIconStyle];g.element.style["mix-blend-mode"]=e,g.navCursorType=LAYOUT_MODEL.navCursorType,g.iconLeft.d=t.d,g.iconLeft.fill=t.fill,g.iconLeft.stroke=t.stroke,g.iconLeft.strokeWidth=t.strokeWidth,g.iconCenter.fill=LAYOUT_MODEL.cursorColor,g.iconRight.d=i.d,g.iconRight.fill=i.fill,g.iconRight.stroke=i.stroke,g.iconRight.strokeWidth=i.strokeWidth}function d(e){if(g.enabled){if(e.target!==m.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();g.transition=0,g.translateX=i-2,g.translateY=n-2,e.target.navigationCursor&&g.enabled?v||h(e):v&&u(e);var E=A?.333*d:.5*d,b=A?.333*c:.5*c,y="x"===O?E:b,w="x"===O?i-o:n-l,M=y,_=2*y;(LAYOUT_MODEL.cursorColor!==C.left.arrow1.fill||LAYOUT_MODEL.cursorIconStyle!==g.cursorIconStyle&&LAYOUT_MODEL.navCursorType!==g.navCursorType)&&(C=t(),s()),wM&&w<_?(g.iconLeft.alpha=0,g.iconCenter.alpha=1,g.iconRight.alpha=0,g.svg.rotate=0,g.type="thumbs"):(!A||w>_)&&(g.iconLeft.alpha=0,g.iconCenter.alpha=0,g.iconRight.alpha=1,g.svg.rotate="y"===O&&/arrow/.test(g.cursorIconStyle)?90:0,g.type="next")}}else T(e);clearTimeout(S),S=setTimeout(function(){T(e)},5e3)}function c(t){t.target.navigationCursor&&g.enabled&&(g.alpha=0,v=!1,"thumbs"===g.type?e.events.dispatchEvent(NAVBAR_OVERLAY_BTN_CLICK,g.type):e.events.dispatchEvent(NAVBAR_NAV_CLICK,{navDir:g.type}))}function h(e){"cursor"===LAYOUT_MODEL.navCursorType?(v=!0,g.display="block",g.alpha=.85,/none/.test(LAYOUT_MODEL.cursorIconStyle)||(e.target.style.cursor="none",g.iconLeft.cursor="none",g.iconCenter.cursor="none",g.iconRight.cursor="none",g.svg.cursor="none",g.cursor="none"),b||(stage.element.addEventListener(CLICK,c),stage.element.addEventListener("contextmenu",E),stage.element.addEventListener("dragstart",E),b=!0)):g.display="none"}function u(){v&&(v=!1,g.alpha=0,g.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,g.alpha=0,g.display="none",e&&e.target&&e.target.style&&(e.target.style.cursor="default"),g.iconLeft.cursor="default",g.iconCenter.cursor="default",g.iconRight.cursor="default",g.svg.cursor="default",g.cursor="default","disabled"===LAYOUT_MODEL.navCursorType?g.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 g=new Sprite({events:new EventSandbox });g.setClass("no-invert"),g.position="fixed";var m,p,L,f,v,S,C=t(),O="x",A=!1,b=!1;return g.enabled=!0,g.zIndex=999,g.alpha=0,g.display="none",g.addEventListener("cursorAxisUpdate",n),g.addEventListener("cursorThumbsUpdate",o),g.addEventListener("cursorBlendMode",i),g.destroy=function(){stage.removeEventListener(MOUSE_MOVE,d),g.removeEventListener("cursorAxisUpdate",n),g.removeEventListener("cursorThumbsUpdate",o),g.removeEventListener("cursorBlendMode",i),g.iconLeft.cursor="default",g.iconCenter.cursor="default",g.iconRight.cursor="default",g.svg.cursor="default",g.cursor="default",b&&(stage.element.removeEventListener(CLICK,c),stage.element.removeEventListener("contextmenu",E),stage.element.removeEventListener("dragstart",E),b=!1),g.text=""},l.call(g),g}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,w=b+v}function i(e){O=e.pageX/window.innerWidth;var t=Math.round(d.width*O);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:g,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",g=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,g=!(!LAYOUT_MODEL.inputOverlayFontColor||!LAYOUT_MODEL.inputOverlayBarColor),m=!(!LAYOUT_MODEL.menuOverlayFontColor||!LAYOUT_MODEL.menuOverlayBgColor);g?(c=LAYOUT_MODEL.inputOverlayFontColor,h=LAYOUT_MODEL.inputOverlayBarColor):m?(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=m,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=m,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,g=new Svg,g.element.style["user-select"]="none",g.alpha=0,g.x=4,g.width=14,g.height=14,g.transition=.25,g.cursor="pointer",g.addEventListener("click",function(){a(c.value),c.value=""}),g.alpha=0,b=new Path,b.d=svgPaths.plusSmall,b.strokeWidth=2,b.fill="none",b.stroke=m,g.addChild(b),L.addChild(g),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:w,alpha:M,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=m,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=m,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)),g.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()):(g.y=v+4+.5*((E.element.offsetHeight||25)-14),g.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,g,m,p,L=new Sprite({events:e.events}),f=.9*stage.width>800?800:.9*stage.width,v=78,S=e.tags||[],C=!(!LAYOUT_MODEL.inputOverlayFontColor||!LAYOUT_MODEL.inputOverlayBarColor),O=!(!LAYOUT_MODEL.menuOverlayFontColor||!LAYOUT_MODEL.menuOverlayBgColor);C?(m=LAYOUT_MODEL.inputOverlayFontColor,p=LAYOUT_MODEL.inputOverlayBarColor):O?(m=LAYOUT_MODEL.menuOverlayFontColor,p=LAYOUT_MODEL.menuOverlayBgColor):(m="#000000",p="#FFFFFF");var A,b,y,w=LAYOUT_MODEL.inputOverlayBgColor||LAYOUT_MODEL.menuOverlayBgColor||"#000000",M=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,g.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 g=u.mask.element[E],m=(u.margin||u.marginTop)+e.element[E]+(u.margin||u.marginBottom);if(m&&g){d=m-g,u.captionScroll?n(m,g):o(m,g),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(g,.35,{alpha:i,backgroundColor:e.hover})}function i(t){!e.ing&&/when scrolling|hidden/.test(e.visibility)&&Tween(g,.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(g,.35,{alpha:i,backgroundColor:e.hover}),u=r(t)-E[e.axis]-g[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]-g[e.dim]),e.update(0),e.dispatchEvent(SCROLL)}function a(t){setTimeout(function(){e.ing=!1},10),Tween(g,.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 g=this.handle=new Sprite;g.alpha=0,g.backgroundColor=e.color,e.zIndex&&(g.zIndex=e.zIndex),g.selectable=!1,g.cursor="default",g.borderRadius=e.rounded?Math.ceil(e.width/2):0,g.style.pointerEvents="auto",e.parent.addChild(g),g.addEventListener(MOUSE_OVER,t),g.addEventListener(MOUSE_OUT,i),g.addEventListener(MOUSE_DOWN,n),g.addEventListener(TOUCH_START,n),this.moveHandle=function(t){g.transition=t||0,g[e.axis]=(E[e.dim]-g[e.dim])*e.percent+E[e.axis],"hidden"===e.visibility?g.alpha=0:"when scrolling"===e.visibility?g.alpha=.5:g.alpha=1},this.resize=function(){E.transition=UPDATE_SPEED,g.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(),g[e.perpDim]=e.width,"left"===e.side||"top"===e.side?(E[e.perpAxis]=c[e.perpAxis]-e.width+s(),g[e.perpAxis]=c[e.perpAxis]-e.width+s()):(E[e.perpAxis]=c[e.perpAxis]+c[e.perpDim]+s(),g[e.perpAxis]=c[e.perpAxis]+c[e.perpDim]+s()),this.moveHandle(0),setTimeout(this.checkVisible,0)},this.checkVisible=function(){E.style.transition="opacity 750ms",g.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",g.transition=0,g.alpha=0,g.display="none",g[e.dim]=E[e.dim],e.scrollTo(0,0)):(Tween(E,.35,{alpha:0,onComplete:function(){this.dislplay="none"}}),Tween(g,.35,{alpha:0,onComplete:function(){setTimeout(function(){g.dislplay="none"},200),e.scrollTo(0,0)}}))},this.destroy=function(){e.parent.removeChild(g),e.parent.removeChild(E),g.removeEventListener(MOUSE_OVER,t),g.removeEventListener(MOUSE_OUT,i),g.removeEventListener(MOUSE_DOWN,n),g.removeEventListener(TOUCH_START,n)},this.setAlpha=function(e){g.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(){g.removeEventListener(MOUSE_OVER,t),g.removeEventListener(MOUSE_OUT,i),g.removeEventListener(MOUSE_DOWN,n),g.removeEventListener(TOUCH_START,n)},this.enable=function(){g.addEventListener(MOUSE_OVER,t),g.addEventListener(MOUSE_OUT,i),g.addEventListener(MOUSE_DOWN,n),g.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?(m+=1,g=0):p.wrap&&!p.horizontalMasonry&&(g+=1)}else!p.wrap||f[g]&&L[t]&&f[g].size+L[t].height>p.perpLength?(g+=1,m=0):p.wrap&&(m+=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;t<=n.size)return L[e].x=n.x,L[e].y=n.y,L[e].width=n.isLastColumn?p.lastColumnWidth:L[e].width,n.size=n.size-(L[e].height+p.vGap),n.y=n.y+L[e].height+p.vGap,{index:e,rowId:n.rowId}}return!1}function c(){var e=v[v.length-1],t=l(e);if(e&&e.ids.length){var i=s(e);return t?i+p.vGap:i}return 0}function h(e,t){return e+t}function u(e,t){return e.test(t)}function T(e,t){return e===t-1}function E(e,t,i,n,o){var a=i[t],r=a.size-p.hGap,d=a.gapRowSize-p.hGap;a.scaledSize=0,a.scaledGapRowSize=0,t===i.length-1&&rb+v?(c="top",g=S,m=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){(!C||Cn)&&(O=n);var X;return X=C?(C+O)/2:h/2+n,A++,E(e,t,i,X,o)}return C=void 0,O=void 0,A=0,a}e=e||{};var g,m,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(){g=-1,m=-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,C=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}),w=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}),w=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;O===!1&&(L[T].x=t("x",b,A),L[T].y=t("y",w,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,C=v.length;T-i||n<-i}function r(){E&&!g?(n(),d=requestAnimationFrame(r)):E||(md.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