define("imageZoom",["lodash","coreUtils","santa-components","componentsCore","prop-types","skins","reactDOM","zepto","image-client-api"],function(t,e,i,n,o,s,a,r,p){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=800)}({0:function(e,i){e.exports=t},1:function(t,i){t.exports=e},2:function(t,e){t.exports=i},21:function(t,e){t.exports=p},236:function(t,e,i){var n,o;n=[i(2),i(7),i(4),i(0),i(3),i(802),i(6),i(237)],void 0===(o=function(t,e,i,n,o,s,a,r){"use strict";var p={width:240,height:60},d={width:0,height:0};function l(t){return t&&!t.target.href}function c(t){return t.isMobileDevice||t.isTabletDevice()}return{displayName:"MediaZoom",mixins:[o.mixins.skinBasedComp,t.mixins.animationsMixin,o.mixins.skinInfo,o.mixins.galleryImageExpandedActionMixin,o.mixins.cyclicTabbingMixin],propTypes:n.assign({styleId:t.santaTypesDefinitions.Component.styleId.isRequired,isZoomAllowed:t.santaTypesDefinitions.RenderFlags.isZoomAllowed.isRequired,isMobileDevice:t.santaTypesDefinitions.Device.isMobileDevice.isRequired,isTabletDevice:t.santaTypesDefinitions.Device.isTabletDevice.isRequired,rootNavigationInfo:t.santaTypesDefinitions.Component.rootNavigationInfo.isRequired,navigateToPage:t.santaTypesDefinitions.navigateToPage.isRequired,passClickEvent:t.santaTypesDefinitions.passClickEvent.isRequired,exitFullScreenMode:t.santaTypesDefinitions.exitFullScreenMode.isRequired,enterFullScreenMode:t.santaTypesDefinitions.enterFullScreenMode.isRequired,isExperimentOpen:t.santaTypesDefinitions.isExperimentOpen,isFirstRenderAfterSSR:t.santaTypesDefinitions.isFirstRenderAfterSSR.isRequired,getPrevAndNextStateFunc:i.func,isDataChangedFunc:i.func,getChildCompFunc:i.func,getBoxDimensionsFunc:i.func,actualNavigateToItemFunc:i.func,closeFunction:i.func,dataChanged:i.bool},t.utils.santaTypesUtils.getSantaTypesFromPropTypes(t.components.Image.propTypes),t.utils.santaTypesUtils.getSantaTypesByDefinition(r)),getSvgButton:function(e,i){var a=s[e],r=n.clone(a.svg),p=this.props.styleId+"_";return n.assign(r,{className:p+a.svg.className,dangerouslySetInnerHTML:{__html:a.content},tabIndex:0,role:"button",onKeyDown:o.utils.accessibility.keyboardInteractions.activateBySpaceOrEnterButton},i),t.utils.createReactElement("svg",r)},getInitialState:function(){this.isAnimating=!1,this.shouldUpdateSizeOnLayout=!0;var t="desktop";return this.props.isMobileDevice?t="mobile":this.props.isTabletDevice()&&(t="tablet"),n.assign({$buttonsState:"showButtons",$device:t},this.props.getPrevAndNextStateFunc())},componentWillReceiveProps:function(t){if(t.isZoomAllowed){var e=this.props.dataChanged||this.props.isDataChangedFunc(this.props,t);this.shouldUpdateSizeOnLayout=e&&!this.props.isFirstRenderAfterSSR,e&&this.setState(this.props.getPrevAndNextStateFunc())}else setTimeout(this.closeMediaZoom,0)},getSkinProperties:function(){var t=!!this.state.next?{}:{display:"none"},e=c(this.props)?d:p,i=this.props.getChildCompFunc({toggleButtons:this.toggleButtons,goToNextItem:this.clickOnNextButton,goToPrevItem:this.clickOnPreviousButton},e),n={"":{onKeyDown:this.preventTabbingOut,"data-width-spacer":e.width,"data-height-spacer":e.height},blockingLayer:{onClick:this.onBlockingLayerClick},xButton:{onClick:this.closeMediaZoom,children:[this.getSvgButton("buttonClose",{"aria-label":"close"})]},dialogBox:{onClick:this.handleDialogBoxClick},itemsContainer:{children:i,"aria-live":"polite",tabIndex:-1},buttonPrev:{onClick:this.clickOnPreviousButton,style:t,children:[this.getSvgButton("buttonPrevious",{"aria-label":"previous"})]},buttonNext:{onClick:this.clickOnNextButton,style:t,children:[this.getSvgButton("buttonNext",{"aria-label":"next"})]}};return c(this.props)&&(n.blockingLayer.onSwipeLeft=this.clickOnNextButton,n.blockingLayer.onSwipeRight=this.clickOnPreviousButton),n},onBlockingLayerClick:function(t){l(t)&&(this.closeMediaZoom(),t.preventDefault(),t.stopPropagation())},componentDidLayout:function(){var t=this.props.getBoxDimensionsFunc();if(this.shouldUpdateSizeOnLayout){this.shouldUpdateSizeOnLayout=!1,a.findDOMNode(this.refs.itemsContainer).focus();var i=this;if(!this.props.isFirstRenderAfterSSR){var n={width:t.dialogBoxWidth,height:t.dialogBoxHeight,marginTop:t.marginTop,marginLeft:t.marginLeft,padding:t.padding};this.sequence().add("dialogBox","BaseDimensions",.5,0,{to:n}).add("itemsContainer","FadeIn",.5,0).onCompleteAll(function(){i.unBlockNavigation(),i.handleImageExpandedAction()}).execute()}}else{var o={width:t.dialogBoxWidth,height:t.dialogBoxHeight,"margin-top":t.marginTop,"margin-left":t.marginLeft,padding:t.padding};e(a.findDOMNode(this.refs.dialogBox)).css(o)}},clickOnNextButton:function(t){this.navigateToOtherPageWithAnimations(this.state.next),t&&(t.preventDefault(),t.stopPropagation())},clickOnPreviousButton:function(t){this.navigateToOtherPageWithAnimations(this.state.prev),t&&(t.preventDefault(),t.stopPropagation())},navigateToOtherPageWithAnimations:function(t){if(!this.isNavigationBlocked()){var e=this;this.blockNavigation(),this.animate("itemsContainer","FadeOut",.5,0,null,{onComplete:function(){e.props.actualNavigateToItemFunc(t)}})}},closeMediaZoom:function(){if(this.props.closeFunction)this.props.closeFunction();else{var t=n.omit(this.props.rootNavigationInfo,["imageZoom","pageItemId","title"]);this.props.navigateToPage(t)}},handleDialogBoxClick:function(t){l(t)&&(t.preventDefault(),t.stopPropagation(),this.props.passClickEvent(t))},unBlockNavigation:function(){this.isAnimating=!1},blockNavigation:function(){this.isAnimating=!0},isNavigationBlocked:function(){return this.isAnimating},componentWillMount:function(){this.props.enterFullScreenMode()},componentDidMount:function(){this._focusedElementBeforeMediaZoom=window.document.activeElement},componentWillUnmount:function(){this.props.exitFullScreenMode(),e(this._focusedElementBeforeMediaZoom).focus()},toggleButtons:function(t){var e="showButtons"===this.state.$buttonsState?"hideButtons":"showButtons";this.setState({$buttonsState:e}),t&&(t.preventDefault(),t.stopPropagation())}}}.apply(e,n))||(t.exports=o)},237:function(t,e,i){var n,o;n=[i(4),i(0),i(3),i(1),i(21),i(2)],void 0===(o=function(t,e,i,n,o,s){"use strict";var a=n.linkRenderer,r="Go to link";function p(t,i,n,s){var a=e.assign({},t,{alt:t.title,itemProp:"contentUrl"}),r={id:this.props.id+"image",ref:"image",key:t.id,imageData:a,quality:s,containerWidth:i.imageContainerWidth,containerHeight:i.imageContainerHeight,displayMode:o.fittingTypes.LEGACY_FULL,onClick:this.props.goToNextItem,filterEffect:this.props.compProp.filterEffect,labelledById:this.props.id+"title",describedById:this.props.id+"description"};return n&&(r.onClick=this.props.toggleButtons,r.onTap=this.props.toggleButtons),this.createChildComponent(a,"core.components.Image","image",r)}return{displayName:"ImageZoomDisplayer",mixins:[i.mixins.skinBasedComp,i.mixins.createChildComponentMixin],propTypes:e.assign({id:s.santaTypesDefinitions.Component.id,compData:s.santaTypesDefinitions.Component.compData.isRequired,compProp:s.santaTypesDefinitions.Component.compProp,isMobileDevice:s.santaTypesDefinitions.Device.isMobileDevice,isTabletDevice:s.santaTypesDefinitions.Device.isTabletDevice,rootNavigationInfo:s.santaTypesDefinitions.Component.rootNavigationInfo.isRequired,linkRenderInfo:s.santaTypesDefinitions.Link.renderInfo.isRequired,goToNextItem:t.func,toggleButtons:t.func,zoomDimensions:t.object,quality:t.object},s.utils.santaTypesUtils.getSantaTypesFromPropTypes(s.components.Image.propTypes)),getInitialState:function(){var t="desktop";return this.props.isMobileDevice?t="mobile":this.props.isTabletDevice()&&(t="tablet"),{$device:t}},getSkinProperties:function(){var t=this.props.compData,e=this.props.compProp,i=this.props.zoomDimensions,n=this.props.quality,o={"":{itemScope:!0,itemType:"http://schema.org/ImageObject"},title:{children:t.title,itemProp:"name","aria-hidden":"true"},description:{children:t.description,itemProp:"description"},image:p.call(this,t,i,this.props.isMobileDevice||this.props.isTabletDevice(),n)};return t.link&&(o.link=a.renderLink(t.link,this.props.linkRenderInfo,this.props.rootNavigationInfo),o.link.children=e&&e.goToLinkText?e.goToLinkText:r),o}}}.apply(e,n))||(t.exports=o)},238:function(t){t.exports=JSON.parse('{"ENTER_EXPAND_MODE":{"eventId":376,"adapter":"ugc-viewer","params":{"site_id":"site_id"}},"ZOOM_IN_EXPAND_MODE":{"eventId":375,"adapter":"ugc-viewer","params":{"site_id":"site_id","zoomType":"zoomType"}}}')},3:function(t,e){t.exports=n},4:function(t,e){t.exports=o},5:function(t,e){t.exports=s},6:function(t,e){t.exports=a},7:function(t,e){t.exports=r},800:function(t,e,i){var n,o;n=[i(801),i(237),i(236),i(803),i(804),i(805),i(5),i(806)],void 0===(o=function(t,e,i,n,o,s,a,r){"use strict";return a.skinsMap.addBatch(r),{imageZoom:t,imageZoomDisplayer:e,mediaZoom:i,mobileMediaZoom:n,touchMediaZoom:o,touchMediaZoomItem:s}}.apply(e,n))||(t.exports=o)},801:function(t,e,i){var n,o;n=[i(2),i(4),i(0),i(3),i(236),i(1),i(238)],void 0===(o=function(t,e,i,n,o,s,a){"use strict";return{displayName:"ImageZoom",mixins:[n.mixins.mediaZoomWrapperMixin],propTypes:i.assign({id:t.santaTypesDefinitions.Component.id,compData:t.santaTypesDefinitions.Component.compData.isRequired,rootNavigationInfo:t.santaTypesDefinitions.Component.rootNavigationInfo.isRequired,reportBI:t.santaTypesDefinitions.reportBI.isRequired,siteId:t.santaTypesDefinitions.RendererModel.siteId.isRequired,siteWidth:t.santaTypesDefinitions.siteWidth,navigateToPage:t.santaTypesDefinitions.navigateToPage.isRequired,getScreenHeight:t.santaTypesDefinitions.getScreenHeight.isRequired,getScreenWidth:t.santaTypesDefinitions.getScreenWidth.isRequired,getWindowInnerHeight:t.santaTypesDefinitions.__DangerousSantaTypes.getWindowInnerHeight.isRequired,getCustomMeasureMap:t.santaTypesDefinitions.__DangerousSantaTypes.getCustomMeasureMap.isRequired,isMobileDevice:t.santaTypesDefinitions.Device.isMobileDevice,isTabletDevice:t.santaTypesDefinitions.Device.isTabletDevice,pageItemAdditionalData:e.object,galleryCompId:e.string,zoom:t.santaTypesDefinitions.NonPageItemZoom.zoom,unzoom:t.santaTypesDefinitions.NonPageItemZoom.unzoom,currentZoomItem:t.santaTypesDefinitions.NonPageItemZoom.currentItem},t.utils.santaTypesUtils.getSantaTypesByDefinition(o)),isNonOptimizedView:function(){return this.props.isMobileDevice||this.props.isTabletDevice()},fireEnterExpandModeEvent:function(){this.props.reportBI(a.ENTER_EXPAND_MODE,{site_id:this.props.siteId})},componentWillMount:function(){this.fireEnterExpandModeEvent()},getInitialState:function(){return this.isNonOptimizedView()&&(this.enableInnerScrolling=!0),{}},getPrevAndNextState:function(){var t=void 0,e=void 0,n=this.props.pageItemAdditionalData,o={next:null,prev:null};return n&&(t=i.map(n.items,"id")).length>1&&(e=t.indexOf(this.props.compData.id),o.next=t[(e+1)%t.length],o.prev=t[(e-1+t.length)%t.length]),o},isDataChanged:function(t,e){return t.compData!==e.compData},getChildComp:function(t,e){var n={isMobileDevice:this.props.isMobileDevice,isTabletDevice:this.props.isTabletDevice(),siteWidth:this.props.siteWidth},o={width:this.props.getScreenWidth(),height:this.props.getScreenHeight(),innerHeight:this.props.getWindowInnerHeight()},a=i.every(o),r={zoomDimensions:(this.isNonOptimizedView()?s.mediaZoomCalculations.getNonOptimizedViewDimensions:s.mediaZoomCalculations.getDesktopViewDimensions)(this.props.compData,n,a?o:null,e),quality:{quality:90}};return i.assign(r,t),this.createChildComponent(this.props.compData,"wysiwyg.components.ImageZoomDisplayer","imageItem",r)},getBoxDimensions:function(){return this.props.getCustomMeasureMap(this.props.id+this.props.compData.id)},actualNavigateToItem:function(t){if(this.props.currentZoomItem)if(t){var e=i.find(this.props.currentZoomItem.galleryData.items,{id:t});this.props.zoom(e,this.props.currentZoomItem.galleryData)}else this.props.unzoom();else{var n=i.clone(this.props.rootNavigationInfo);n.pageItemId=t,this.props.navigateToPage(n)}},getChildZoomComponentType:function(){return"wysiwyg.viewer.components.MediaZoom"},getImageIndex:function(){var t=i.get(this.props.pageItemAdditionalData,"items");if(t)return i.findIndex(t,{id:this.props.compData.id})},getChildZoomExtraProps:function(){return i.assign({},i.pickBy({galleryCompId:this.props.galleryCompId}),{imageIndex:this.getImageIndex()})}}}.apply(e,n))||(t.exports=o)},802:function(t,e,i){var n;void 0===(n=function(){"use strict";return{buttonClose:{svg:{viewBox:"0 0 180 180",className:"svgButtonClose"},content:''},buttonPrevious:{svg:{viewBox:"0 0 180 310",className:"svgNavButton"},content:''},buttonNext:{svg:{viewBox:"0 0 180 310",className:"svgNavButton"},content:''}}}.apply(e,[]))||(t.exports=n)},803:function(t,e,i){var n,o;n=[i(2),i(0),i(3),i(4)],void 0===(o=function(t,e,i,n){"use strict";return{displayName:"MobileMediaZoom",mixins:[i.mixins.skinBasedComp],propTypes:{compData:t.santaTypesDefinitions.Component.compData.isRequired,forceBackground:t.santaTypesDefinitions.forceBackground.isRequired,disableForcedBackground:t.santaTypesDefinitions.disableForcedBackground.isRequired,isMobileDevice:t.santaTypesDefinitions.Device.isMobileDevice.isRequired,isZoomAllowed:t.santaTypesDefinitions.RenderFlags.isZoomAllowed.isRequired,siteWidth:t.santaTypesDefinitions.siteWidth.isRequired,siteScrollingBlocker:t.santaTypesDefinitions.SiteAspects.siteScrollingBlocker.isRequired,navigateToPage:t.santaTypesDefinitions.navigateToPage.isRequired,enterFullScreenMode:t.santaTypesDefinitions.enterFullScreenMode.isRequired,exitFullScreenMode:t.santaTypesDefinitions.exitFullScreenMode.isRequired,isDataChangedFunc:n.func.isRequired,getPrevAndNextStateFunc:n.func.isRequired,getChildCompFunc:n.func.isRequired,enableInnerScrolling:n.bool.isRequired,actualNavigateToItemFunc:n.func.isRequired,closeFunction:n.func,rootNavigationInfo:n.object},getInitialState:function(){var t=this.props.getPrevAndNextStateFunc();return e.assign(t,{$viewerType:this.props.isMobileDevice?"mobile":"tablet",$buttonState:""}),this.props.enableInnerScrolling&&(t.$scrollState="scrollEnabled"),t},componentWillReceiveProps:function(t){this.props.isZoomAllowed?this.props.isDataChangedFunc(this.props,t)&&this.setState(this.props.getPrevAndNextStateFunc()):setTimeout(this.closeMediaZoom,0)},createOverlay:function(t){return i.utils.fullScreenOverlay.createOverlay(t,{siteWidth:this.props.siteWidth,isMobileDevice:this.props.isMobileDevice,siteScrollingBlocker:this.props.siteScrollingBlocker,forceBackground:this.props.forceBackground,disableForcedBackground:this.props.disableForcedBackground})},getSkinProperties:function(){var t=this.props.getChildCompFunc({key:this.props.compData.id,hideMediaZoomButtons:this.hideButtons,showMediaZoomButtons:this.showButtons},{width:0,height:0}),e=!this.state.next,i={"":{onSwipeLeft:this.clickOnNextButton,onSwipeRight:this.clickOnPreviousButton},itemsContainer:{children:t},xButton:{onClick:this.closeMediaZoom,style:{}},buttonPrev:{onClick:this.clickOnPreviousButton,style:{}},buttonNext:{onClick:this.clickOnNextButton,style:{}}};return i=this.props.enableInnerScrolling?i:this.createOverlay(i),(e||this.props.enableInnerScrolling)&&(i.buttonNext.style.display="none",i.buttonPrev.style.display="none"),i},clickOnNextButton:function(t){this.showButtons(),this.props.actualNavigateToItemFunc(this.state.next),t&&(t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},closeMediaZoom:function(){this.props.closeFunction?this.props.closeFunction():this.props.navigateToPage({pageId:this.props.rootNavigationInfo.pageId})},clickOnPreviousButton:function(t){this.showButtons(),this.props.actualNavigateToItemFunc(this.state.prev),t&&(t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},hideButtons:function(){this.setState({$buttonState:"hideButtons"})},showButtons:function(){this.setState({$buttonState:""})},componentDidMount:function(){this.props.enterFullScreenMode({scrollable:this.props.enableInnerScrolling})},componentWillUnmount:function(){this.props.exitFullScreenMode()}}}.apply(e,n))||(t.exports=o)},804:function(t,e,i){var n,o;n=[i(7),i(0),i(1),i(3),i(4),i(238),i(2)],void 0===(o=function(t,e,i,n,o,s,a){"use strict";var r=i.linkRenderer,p=i.touchMediaZoomUtils,d={displayName:"TouchMediaZoom",mixins:[n.mixins.skinBasedComp,n.mixins.createChildComponentMixin],propTypes:{browser:a.santaTypesDefinitions.Browser.browser.isRequired,id:a.santaTypesDefinitions.Component.id.isRequired,compData:a.santaTypesDefinitions.Component.compData.isRequired,compProp:a.santaTypesDefinitions.Component.compProp.isRequired,rootNavigationInfo:a.santaTypesDefinitions.Component.rootNavigationInfo.isRequired,styleId:a.santaTypesDefinitions.Component.styleId.isRequired,devicePixelRatio:a.santaTypesDefinitions.Device.devicePixelRatio.isRequired,isMobileDevice:a.santaTypesDefinitions.Device.isMobileDevice.isRequired,screenSize:a.santaTypesDefinitions.screenSize.isRequired,linkRenderInfo:a.santaTypesDefinitions.Link.renderInfo.isRequired,isLandscape:a.santaTypesDefinitions.mobile.isLandscape.isRequired,isZoomed:a.santaTypesDefinitions.mobile.isZoomed.isRequired,isZoomedIn:a.santaTypesDefinitions.mobile.isZoomedIn.isRequired,navigateToPage:a.santaTypesDefinitions.navigateToPage.isRequired,isZoomAllowed:a.santaTypesDefinitions.RenderFlags.isZoomAllowed.isRequired,siteId:a.santaTypesDefinitions.RendererModel.siteId.isRequired,reportBI:a.santaTypesDefinitions.reportBI.isRequired,staticMediaUrl:a.santaTypesDefinitions.ServiceTopology.staticMediaUrl.isRequired,windowKeyboardEvent:a.santaTypesDefinitions.SiteAspects.windowKeyboardEvent.isRequired,updateUrlIfNeeded:a.santaTypesDefinitions.Navigation.updateUrlIfNeeded.isRequired,currentZoomItem:a.santaTypesDefinitions.NonPageItemZoom.currentItem,unzoom:a.santaTypesDefinitions.NonPageItemZoom.unzoom,isExperimentOpen:a.santaTypesDefinitions.isExperimentOpen,enterMediaZoomMode:a.santaTypesDefinitions.enterMediaZoomMode.isRequired,exitMediaZoomMode:a.santaTypesDefinitions.exitMediaZoomMode.isRequired,isInSSR:a.santaTypesDefinitions.isInSSR.isRequired,pageItemAdditionalData:o.object},getSwipeOffset:function(){return this.nonReactState.swipeOffset},setSwipeOffset:function(t){this.nonReactState.swipeOffset=t;var e=p.generateTransformString(t,this.stageData.fullWidth);this.refs.swipeStage.style.transform=e,this.refs.swipeStage.style.webkitTransform=e},getCurrentSlideIndex:function(){return this.nonReactState.currentSlideIndex},setCurrentSlideIndex:function(t){this.nonReactState.currentSlideIndex=t},getIsZoomed:function(){return this.nonReactState.isZoomed},setIsZoomed:function(t){this.nonReactState.isZoomed=t},getItems:function(){return e.get(this.props.pageItemAdditionalData,"items",[this.props.compData])},enterZoomMode:function(){this.isZoomed=!0,this.refs.xButton.classList.add(this.classSet({"force-hide":!0})),this.fireZoomInExpandModeEvent("pinch")},exitZoomMode:function(){this.isZoomed=!1,this.refs.xButton.classList.remove(this.classSet({"force-hide":!0}))},onTouchMove:function(t){1!==t.touches.length||this.isZoomed?1===t.touches.length||this.isZoomed||this.enterZoomMode():t.preventDefault()},onTouchEnd:function(){this.isZoomed&&(this._touchEndTimeoutHandle=window.setTimeout(function(){this.props.isZoomedIn()||this.exitZoomMode()}.bind(this),300))},fireEnterExpandModeEvent:function(){this.props.reportBI(s.ENTER_EXPAND_MODE,{site_id:this.props.siteId})},fireZoomInExpandModeEvent:function(t){this.props.reportBI(s.ZOOM_IN_EXPAND_MODE,{site_id:this.props.siteId,zoomType:t})},componentWillMount:function(){this.fireEnterExpandModeEvent(),this.props.windowKeyboardEvent.registerToArrowLeftKey(this),this.props.windowKeyboardEvent.registerToArrowRightKey(this),Object.defineProperty(this,"swipeOffset",{get:this.getSwipeOffset,set:this.setSwipeOffset}),Object.defineProperty(this,"currentSlideIndex",{get:this.getCurrentSlideIndex,set:this.setCurrentSlideIndex}),Object.defineProperty(this,"isZoomed",{get:this.getIsZoomed,set:this.setIsZoomed}),this.stageData=p.createStageData(.2),this.stagePercentFactor=100/this.stageData.fullWidth,this.resetNonReactState(),this.setState({showInfo:!0,isZoomed:!1}),this.pageScroll=this.props.isInSSR?0:window.scrollY,this.props.enterMediaZoomMode()},componentDidMount:function(){if(this.nonReactState.firstRender=!1,this.setSwipeOffset(this.swipeOffset),this.refs.swipeStage.addEventListener("transitionend",this.onSwipeEnd),this.pageMarginTop=t("html").css("marginTop"),t("html").css({marginTop:0}),this.props.isMobileDevice){var e=this;requirejs(["hammer"],function(t){e.setupTouchHandlers(t)}),this.refs[""].addEventListener("touchend",this.onTouchEnd),this.refs[""].addEventListener("touchcancel",this.onTouchEnd),this.refs[""].addEventListener("touchmove",this.onTouchMove)}},componentWillUnmount:function(){window.clearTimeout(this._touchEndTimeoutHandle),this.props.exitMediaZoomMode(),t("html").css({marginTop:this.pageMarginTop}),window.scrollTo(0,this.pageScroll)},setupTouchHandlers:function(t){this.hammertime=new t.Manager(this.refs[""],{cssProps:{touchCallout:"default"},touchAction:"auto"}),this.hammertime.add(new t.Pan({event:"pan",direction:t.DIRECTION_HORIZONTAL})),this.hammertime.add(new t.Pan({event:"panstart",direction:t.DIRECTION_HORIZONTAL})),this.hammertime.add(new t.Pan({event:"panend",direction:t.DIRECTION_HORIZONTAL})),this.hammertime.on("panstart pan panend",this.onSwipe),this.hammertime.add(new t.Tap({event:"doubletap",taps:2,threshold:30,posThreshold:30})),this.hammertime.on("doubletap",e.partial(this.fireZoomInExpandModeEvent,"doubleTap"))},componentWillUpdate:function(){this.props.isMobileDevice&&this.setSwipeOffset(this.stageData.centerPart_begin)},componentWillReceiveProps:function(){this.props.isZoomAllowed||setTimeout(this.closeMediaZoom,0)},resetNonReactState:function(t){var i=t||this.props.compData,n=e.findIndex(this.getItems(),{id:i.id}),o=this.props.isZoomed();this.nonReactState={currentSlideIndex:n,swipeOffset:this.stageData.centerPart_begin,isZoomed:o,firstRender:!0}},onSwipe:function(t){if(!(this.isZoomed||t.center.x-t.deltaX<29))switch(t.type){case"panstart":break;case"pan":this.swipeOffset=e.clamp(this.stageData.centerPart_begin-t.deltaX/window.innerWidth,this.currentSlideIndex>0?this.stageData.leftPart_leftMargin:this.stageData.centerPart_leftMargin,this.currentSlideIndexthis.stageData.centerPart_rightMargin?{offset:this.stageData.rightPart_begin,index:this.currentSlideIndex+1}:{offset:this.stageData.centerPart_begin,index:this.currentSlideIndex}},startTransition:function(t){var e=t||this.calcTransitionTarget();this.refs.swipeStage.classList.add(this.props.styleId+"_animate"),this.swipeOffset=e.offset,this.currentSlideIndex=e.index},onSwipeEnd:function(){this.refs.swipeStage.classList.remove(this.props.styleId+"_animate"),this.swipeOffset=this.stageData.centerPart_begin,this.navigateToSlide(this.currentSlideIndex),this.setState({})},navigateToSlide:function(t){var i=this.getItems()[t].id,n=e.clone(this.props.rootNavigationInfo);n.pageItemId=i,this.props.updateUrlIfNeeded(n)},closeMediaZoom:function(){if(this.props.currentZoomItem)this.props.unzoom();else{var t=e.omit(this.props.rootNavigationInfo,["imageZoom","pageItemId","title"]);this.props.navigateToPage(t)}},onXButton:function(t){this.closeMediaZoom(),t.preventDefault()},onArrowLeftKey:function(){this.currentSlideIndex>0&&this.startTransition({offset:this.stageData.leftPart_begin,index:this.currentSlideIndex-1})},onArrowRightKey:function(){this.currentSlideIndex=0&&t.imageIndex