window.adf||(window.adf={});window.adf.shared=window.adf.shared||{};window.adf.shared.impl=window.adf.shared.impl||{};window.adf.shared.impl.masonryLayout=window.adf.shared.impl.masonryLayout||{};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon=function(a,b,d,e,f,g){var h=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;null==h._agentTypeAndVersion&&(h._agentTypeAndVersion=h._getAgentTypeAndVersion(navigator.userAgent));this._elem=a;this._rtl=b;this._automationEnabled=d;e&&e.tiles&&(this._tilesSelector=e.tiles);f&&(f.transitionComponentResizeToStyleClass&&(this._transitionComponentResizeToStyleClass=f.transitionComponentResizeToStyleClass),f.transitionComponentResizeToFastStyleClass&&
(this._transitionComponentResizeToFastStyleClass=f.transitionComponentResizeToFastStyleClass),f.transitionMoveToStyleClass&&(this._transitionMoveToStyleClass=f.transitionMoveToStyleClass),f.transitionMoveToFastStyleClass&&(this._transitionMoveToFastStyleClass=f.transitionMoveToFastStyleClass),f.transitionHideFromStyleClass&&(this._transitionHideFromStyleClass=f.transitionHideFromStyleClass),f.transitionHideToStyleClass&&(this._transitionHideToStyleClass=f.transitionHideToStyleClass),f.transitionShowFromStyleClass&&
(this._transitionShowFromStyleClass=f.transitionShowFromStyleClass),f.transitionShowToStyleClass&&(this._transitionShowToStyleClass=f.transitionShowToStyleClass),f.transitionResizeToStyleClass&&(this._transitionResizeToStyleClass=f.transitionResizeToStyleClass));g&&(g.addStyleClassName&&(this._addStyleClassNameFunc=g.addStyleClassName),g.removeStyleClassName&&(this._removeStyleClassNameFunc=g.removeStyleClassName),g.getSizeStyleClassName&&(this._getSizeStyleClassNameFunc=g.getSizeStyleClassName),
g.getTileSpan&&(this._getTileSpanFunc=g.getTileSpan),g.showTileOnEndFunc&&(this._showTileOnEndFunc=g.showTileOnEndFunc),g.hideTileOnEndFunc&&(this._hideTileOnEndFunc=g.hideTileOnEndFunc),g.layoutOnEndFunc&&(this._layoutOnEndFunc=g.layoutOnEndFunc),g.layoutCycleOnStartFunc&&(this._layoutCycleOnStartFunc=g.layoutCycleOnStartFunc),g.layoutCycleOnEndFunc&&(this._layoutCycleOnEndFunc=g.layoutCycleOnEndFunc),g.sortTilesOriginalOrderFunc&&(this._sortTilesOriginalOrderFunc=g.sortTilesOriginalOrderFunc));
b=document.createElement("div");d=b.style;d.display="inline-block";d.overflow="hidden";d.visibility="hidden";e=document.createElement("div");d=e.style;d.display="inline-block";b.appendChild(e);a.insertBefore(b,a.firstChild);this._sizeDivWrapper=b;this._sizeDiv=e;var k=this;this._handleTransitionEndFunc=function(a){k._handleTransitionEnd(a)};this._hideTilesFunc=function(){k._hideTiles()};this._handleHideTransitionEndFunc=function(a){k._handleHideTransitionEnd(a)};this._handleShowTransitionEndFunc=
function(a){k._handleShowTransitionEnd(a)}};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.setup=function(a,b){var d=!1;a?(d=this._layout()?!0:!1,this._reorderTilesForLayout()):(this._layoutCycleOnStartFunc&&this._layoutCycleOnStartFunc(),this._transitionStart(b),d=this._transitionLayout());return d};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.destroy=function(){for(var a=this._elem,b=this._getTileChildren(),d=0;d<b.length;d++){var e=b[d].style;this._rtl?e.right="":e.left="";e.top=""}a.removeChild(this._sizeDivWrapper);this._sortTilesOriginalOrderFunc=this._layoutCycleOnEndFunc=this._layoutCycleOnStartFunc=this._layoutOnEndFunc=this._hideTileOnEndFunc=this._showTileOnEndFunc=this._getTileSpanFunc=this._getSizeStyleClassNameFunc=this._removeStyleClassNameFunc=this._addStyleClassNameFunc=
this._elem=this._arFireHideOnEnd=this._arInfoletsToHide=this._arInfoletsToShow=this._arInfoletsToResize=this._arMovedInfolets=this._handleShowTransitionEndFunc=this._handleHideTransitionEndFunc=this._hideTilesFunc=this._handleTransitionEndFunc=this._sizeDiv=this._sizeDivWrapper=null};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.resizeTile=function(a,b){var d=this._elem.querySelector(a);if(d){this._arInfoletsToResize||(this._arInfoletsToResize=[]);var e=this._arInfoletsToResize;e.push(d);e.push(b);this._resizingInfolet=!0;this._queueRelayout()}};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.insertTileDomElem=function(a,b){var d=this._getTileChildren();this._sortTilesOriginalOrderFunc&&this._sortTilesOriginalOrderFunc(d);var e=null;0<=b&&b<d.length&&(e=d[b]);this._elem.insertBefore(a,e);this._queueRelayout()};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.showTile=function(a){if(a=this._elem.querySelector(a))this._arInfoletsToShow||(this._arInfoletsToShow=[]),this._arInfoletsToShow.push(a),this._showingInfolets=!0,a=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon,this._layoutPhase!==a._PHASE_HIDE&&this._layoutPhase!==a._PHASE_LAYOUT?this._queueRelayout():this._showingInfolets=!1};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.hideTile=function(a){if(a=this._elem.querySelector(a))this._arInfoletsToHide||(this._arInfoletsToHide=[]),this._arInfoletsToHide.push(a),this._hidingInfolets=!0,this._queueRelayout()};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.resizeNotify=function(){this._resizingInfolet||this._hidingInfolets||this._showingInfolets||(this._layoutCycleOnStartFunc&&this._layoutCycleOnStartFunc(),this._layoutPhase=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._PHASE_LAYOUT,this._handlingResizeNotify=!0,this._transitionStart(!1),this._transitionLayout())};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.getCellSize=function(){return this._cellSize};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.isAnimationEnabled=function(){if(this._temporarilyDisableAnimation)return!1;if(!this._cachedAnimationEnabled){if(this._automationEnabled)this._animationEnabled=!1;else{var a=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;this._animationEnabled=a._isMinimumAgentMet(a._agentTypeAndVersion[0],a._agentTypeAndVersion[1],"gecko",16,"trident",6,"webkit",533.1)}this._cachedAnimationEnabled=!0}return this._animationEnabled};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.isInLayoutCycle=function(){return null!=this._layoutPhase};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype.finishLayoutCycle=function(){this._temporarilyDisableAnimation=!0;this._removeStyleClassFromTiles(this._transitionMoveToStyleClass);this._removeStyleClassFromTiles(this._transitionMoveToFastStyleClass);this._removeStyleClassFromTiles(this._transitionHideFromStyleClass);this._removeStyleClassFromTiles(this._transitionHideToStyleClass);this._removeStyleClassFromTiles(this._transitionShowFromStyleClass);this._removeStyleClassFromTiles(this._transitionShowToStyleClass);
this._removeStyleClassFromTiles(this._transitionResizeToStyleClass);this._removeStyleClassNameFunc(this._sizeDiv,this._transitionComponentResizeToStyleClass);this._removeStyleClassNameFunc(this._sizeDiv,this._transitionComponentResizeToFastStyleClass);var a=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;a._removeBubbleEventListener(this._elem,"transitionend",this._handleTransitionEndFunc);a._removeBubbleEventListener(this._elem,"webkitTransitionEnd",this._handleTransitionEndFunc);for(var b=
this._getTileChildren(),d=0;d<b.length;d++){var e=b[d];e._afrOldSizeStyleClass&&delete e._afrOldSizeStyleClass;a._removeBubbleEventListener(e,"transitionend",this._handleHideTransitionEndFunc);a._removeBubbleEventListener(e,"webkitTransitionEnd",this._handleHideTransitionEndFunc);a._removeBubbleEventListener(e,"transitionend",this._handleShowTransitionEndFunc);a._removeBubbleEventListener(e,"webkitTransitionEnd",this._handleShowTransitionEndFunc)}this._hideTilesInternalTimeout?(clearTimeout(this._hideTilesInternalTimeout),
this._hideTilesInternalTimeout=null,this._handleHideTransitionEnd(null)):this._showTilesTimeout?(clearTimeout(this._showTilesTimeout),this._showTilesTimeout=null,this._showTiles()):this._layoutPhase===a._PHASE_LAYOUT?this._handleTransitionEnd(null):this._layoutPhase===a._PHASE_SHOW&&this._handleShowTransitionEnd(null);this._temporarilyDisableAnimation=!1};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._getElemSize=function(a){var b=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon,d=b._getComputedStyle(a),e=b._getCSSLengthAsInt(d.marginLeft)+b._getCSSLengthAsInt(d.marginRight),b=b._getCSSLengthAsInt(d.marginTop)+b._getCSSLengthAsInt(d.marginBottom);return{w:a.offsetWidth+e,h:a.offsetHeight+b}};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._getElemInsets=function(a){var b=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;a=b._getComputedStyle(a);return{paddingLeft:b._getCSSLengthAsInt(a.paddingLeft),paddingRight:b._getCSSLengthAsInt(a.paddingRight),paddingTop:b._getCSSLengthAsInt(a.paddingTop),paddingBottom:b._getCSSLengthAsInt(a.paddingBottom),borderLeftWidth:b._getCSSLengthAsInt(a.borderLeftWidth),borderRightWidth:b._getCSSLengthAsInt(a.borderRightWidth),borderTopWidth:b._getCSSLengthAsInt(a.borderTopWidth),
borderBottomWidth:b._getCSSLengthAsInt(a.borderBottomWidth)}};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._getComputedStyle=function(a){var b=a.ownerDocument.defaultView,d=null;return d=b?b.getComputedStyle(a,null):a.currentStyle};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._getCSSLengthAsInt=function(a){return 0<a.length&&"auto"!=a?(a=parseInt(a,10),isNaN(a)&&(a=0),a):0};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._addBubbleEventListener=function(a,b,d){a.addEventListener?a.addEventListener(b,d,!1):a.attachEvent&&a.attachEvent("on"+b,d)};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._removeBubbleEventListener=function(a,b,d){a.removeEventListener?a.removeEventListener(b,d,!1):a.detachEvent&&a.detachEvent("on"+b,d)};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._arrayIndexOf=function(a,b){if(a)for(var d=0;d<a.length;d++)if(a[d]==b)return d;return-1};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._isMinimumAgentMet=function(a,b){var d=arguments.length;if(0==d%2)for(var e=2;e<=d-2;e+=2)if(a==arguments[e]){if(b>=arguments[1+e])return!0;break}return!1};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._getAgentTypeAndVersion=function(a){var b=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._parseFloatVersion,d=null,e=-1;a=a.toLowerCase();-1!=a.indexOf("msie")||-1!=a.indexOf("trident")?(d="trident",e=b(a,/trident\/(\d+[.]\d+)/),-1==e&&(e=b(a,/msie (\d+\.\d+);/),-1==e&&(e=b(a,/msie (\d+\.\d+)b;/)),e-=4),null!=document.documentMode&&(e=Math.min(e,document.documentMode-4))):-1!=a.indexOf("applewebkit")?(d="webkit",e=b(a,/applewebkit\/(\d+([.]\d+)*)/)):
-1!=a.indexOf("gecko/")&&(d="gecko",e=b(a,/rv:(\d+[.]\d+)/));return[d,e]};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._parseFloatVersion=function(a,b){var d=a.match(b);return d&&(d=d[1])?parseFloat(d):-1};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._compareTilePositions=function(a,b){return a.startRow>b.startRow?1:a.startRow<b.startRow?-1:a.startCol>b.startCol?1:a.startCol<b.startCol?-1:0};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._queueRelayout=function(){this._hideTilesTimeout||(this._layoutPhase?this._queuedRelayout||(this._queuedRelayout=!0):this._hideTilesTimeout=setTimeout(this._hideTilesFunc,0))};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._getTileChildren=function(){for(var a=this._elem.querySelectorAll(this._tilesSelector),b=[],d=0;d<a.length;d++){var e=a[d],f=e.style;0<e.offsetWidth&&0<e.offsetHeight&&"hidden"!=f.visibility&&b.push(e)}return b};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._transitionLayout=function(){var a=this._arMovedInfolets,b=this._layout();if(this._arInfoletsToResize){var d=this._arInfoletsToResize;b||(b=[]);for(var e=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon,f=0;f<d.length;f+=2){var g=d[f];0>e._arrayIndexOf(b,g)&&b.push(g)}}d=!1;if(!b||1>b.length){if(!a||1>a.length)this._arMovedInfolets=null,this._handleTransitionEnd(null),d=!0}else this._arMovedInfolets=b;a=null!=b&&0<b.length;
this.isAnimationEnabled()||d||this._handleTransitionEnd(null);return a};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._layout=function(){var a=this._elem,b=this._getTileChildren();this._sortTilesOriginalOrderFunc&&this._sortTilesOriginalOrderFunc(b);var d=this._cellSize=null;this._cols=0;this._rows=1;this._occupancyMap=null;var e=[],f=[],g=[],h=this._rtl,k=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._getElemInsets(a),l=0,m=[];this._arTilePositions=m;for(var n=0;n<b.length;n++){var q=b[n],r=this._getTileSpanFunc(q);(d=q._afrOldSizeStyleClass)&&
delete q._afrOldSizeStyleClass;if(!this._cellSize){var t=r;d&&(t=document.createElement("div"),t.className=d,t=this._getTileSpanFunc(t));this._cellSize=this._calcCellSize(q,t)}d=this._cellSize;this._occupancyMap||(this._cols=Math.max(Math.floor((a.offsetWidth-k.paddingLeft-k.paddingRight-k.borderLeftWidth-k.borderRightWidth)/d.w),1),this._initOccupancyMap(this._cols,this._rows),l=this._cols);r.colSpan>l&&(l=r.colSpan);r.colSpan>this._cols&&(r.colSpan=this._cols);for(var u=!1,t=0;t<this._rows;t++){for(var v=
0;v<this._cols;v++)if(this._fits(v,t,r)){var u=q.style,w={top:u.top};h?w.right=u.right:w.left=u.left;f.push(w);this._position(q,v,t,r,d,k);h&&g.push(v);u=!0;m.push({startCol:v,startRow:t,tile:q});break}if(u)break;t===this._rows-1&&this._addRow()}}d&&(a=this._sizeDiv.style,a.width=l*d.w+"px",a.height=this._rows*d.h+"px");for(n=0;n<b.length;n++)q=b[n],u=q.style,w=f[n],(h&&parseInt(u.right,10)!==parseInt(w.right,10)||!h&&parseInt(u.left,10)!==parseInt(w.left,10)||parseInt(u.top,10)!==parseInt(w.top,
10))&&e.push(q);1>e.length&&(e=null);return e};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._reorderTilesForLayout=function(){var a=this._arTilePositions;this._arTilePositions=null;for(var b=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon,a=a.sort(b._compareTilePositions),d=this._getTileChildren(),e=0;e<d.length;e++){var f=d[e],g=a[e].tile;f!=g&&(f.parentNode.insertBefore(g,f),f=b._arrayIndexOf(d,g),f>e&&(d.splice(f,1),d.splice(e,0,g)))}};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._initOccupancyMap=function(a,b){for(var d=this._occupancyMap=[],e=0;e<b;e++){var f=[];d.push(f);for(var g=0;g<a;g++)f[g]=!1}};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._addRow=function(){this._rows++;var a=[];this._occupancyMap.push(a);for(var b=0;b<this._cols;b++)a[b]=!1};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._fits=function(a,b,d){var e=d.colSpan;d=d.rowSpan;for(var f=b;f<b+d;f++){f>=this._rows&&this._addRow();for(var g=a;g<a+e;g++)if(g>=this._cols||this._occupancyMap[f][g])return!1}return!0};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._position=function(a,b,d,e,f,g){var h=e.colSpan;e=e.rowSpan;for(var k=this._occupancyMap,l=d;l<d+e;l++)for(var m=b;m<b+h;m++)k[l][m]=!0;a=a.style;a.top=g.paddingTop+d*f.h+"px";this._rtl?a.right=g.paddingRight+b*f.w+"px":a.left=g.paddingLeft+b*f.w+"px"};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._addStyleClassToTiles=function(a){for(var b=this._getTileChildren(),d=0;d<b.length;d++)this._addStyleClassNameFunc(b[d],a)};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._removeStyleClassFromTiles=function(a){for(var b=this._getTileChildren(),d=0;d<b.length;d++)this._removeStyleClassNameFunc(b[d],a)};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._transitionStart=function(a){this._layoutTransition||(this._reorderTransitionStarted=a,this.isAnimationEnabled()&&(this._addStyleClassToTiles(a?this._transitionMoveToFastStyleClass:this._transitionMoveToStyleClass),this._addStyleClassNameFunc(this._sizeDiv,a?this._transitionComponentResizeToFastStyleClass:this._transitionComponentResizeToStyleClass),a=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon,a._addBubbleEventListener(this._elem,
"transitionend",this._handleTransitionEndFunc),a._addBubbleEventListener(this._elem,"webkitTransitionEnd",this._handleTransitionEndFunc)),this._layoutTransition=!0)};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._handleTransitionEnd=function(a){var b=!0;if(this._arMovedInfolets){var d=this._arMovedInfolets;if(a){var e=a.target;for(a=0;a<d.length;a++)if(e===d[a]){d.splice(a,1);break}}else this.isAnimationEnabled()||(d=this._arMovedInfolets=[]);0<d.length&&(b=!1)}if(b){if(this._arInfoletsToResize&&(b=this._arInfoletsToResize,this._arInfoletsToResize=null,this.isAnimationEnabled()))for(a=0;a<b.length;a+=2)this._removeStyleClassNameFunc(b[a],
this._transitionResizeToStyleClass);this._reorderTransitionStarted?(this.isAnimationEnabled()&&(this._removeStyleClassFromTiles(this._transitionMoveToFastStyleClass),this._removeStyleClassNameFunc(this._sizeDiv,this._transitionComponentResizeToFastStyleClass)),this._reorderTransitionStarted=!1):this.isAnimationEnabled()&&(this._removeStyleClassFromTiles(this._transitionMoveToStyleClass),this._removeStyleClassNameFunc(this._sizeDiv,this._transitionComponentResizeToStyleClass));b=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;
this.isAnimationEnabled()&&(b._removeBubbleEventListener(this._elem,"transitionend",this._handleTransitionEndFunc),b._removeBubbleEventListener(this._elem,"webkitTransitionEnd",this._handleTransitionEndFunc));this._showingInfolets=this._hidingInfolets=this._resizingInfolet=this._layoutTransition=!1;this._reorderTilesForLayout();this._layoutOnEndFunc&&this._layoutOnEndFunc();if(this._layoutPhase===b._PHASE_LAYOUT&&!this._handlingResizeNotify)if(this.isAnimationEnabled()){var f=this;this._showTilesTimeout=
setTimeout(function(){f._showTiles()},0)}else this._showTiles();else if(!this._layoutPhase||this._handlingResizeNotify)this._layoutPhase=this._handlingResizeNotify=null,this._layoutCycleOnEndFunc&&this._layoutCycleOnEndFunc()}};window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._calcCellSize=function(a,b){var d=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._getElemSize(a);return{w:d.w/b.colSpan,h:d.h/b.rowSpan}};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._hideTiles=function(){this._hideTilesTimeout&&(clearTimeout(this._hideTilesTimeout),this._hideTilesTimeout=null);this._layoutCycleOnStartFunc&&this._layoutCycleOnStartFunc();var a=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;this._layoutPhase=a._PHASE_HIDE;if(this._arInfoletsToHide&&this.isAnimationEnabled()){for(var b=this._arInfoletsToHide,d=0;d<b.length;d++){var e=b[d];a._addBubbleEventListener(e,"transitionend",this._handleHideTransitionEndFunc);
a._addBubbleEventListener(e,"webkitTransitionEnd",this._handleHideTransitionEndFunc);this._addStyleClassNameFunc(e,this._transitionHideFromStyleClass)}var f=this;this._hideTilesInternalTimeout=setTimeout(function(){for(var a=0;a<b.length;a++){var d=b[a];f._removeStyleClassNameFunc(d,f._transitionHideFromStyleClass);f._addStyleClassNameFunc(d,f._transitionHideToStyleClass)}},0)}else this._handleHideTransitionEnd(null)};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._handleHideTransitionEnd=function(a){this._hideTilesInternalTimeout&&(clearTimeout(this._hideTilesInternalTimeout),this._hideTilesInternalTimeout=null);var b=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;if(a){a.preventDefault();a.stopPropagation();a=a.target;this._removeStyleClassNameFunc(a,this._transitionHideToStyleClass);b._removeBubbleEventListener(a,"transitionend",this._handleHideTransitionEndFunc);b._removeBubbleEventListener(a,
"webkitTransitionEnd",this._handleHideTransitionEndFunc);var d=this._arInfoletsToHide;if(d){for(var e=0;e<d.length;e++){var f=d[e];if(f===a){d.splice(e,1);this._arFireHideOnEnd||(this._arFireHideOnEnd=[]);var g=this._arFireHideOnEnd;g.push(a);break}}1>d.length&&(this._arInfoletsToHide=null)}}else if(!this.isAnimationEnabled()&&(d=this._arInfoletsToHide)){for(e=0;e<d.length;e++)f=d[e],this._arFireHideOnEnd||(this._arFireHideOnEnd=[]),g=this._arFireHideOnEnd,g.push(f);this._arInfoletsToHide=null}if(!this._arInfoletsToHide){if(this._arFireHideOnEnd){g=
this._arFireHideOnEnd;for(e=0;e<g.length;e++)a=g[e],this.isAnimationEnabled()&&this._removeStyleClassNameFunc(a,this._transitionHideToStyleClass),d=a.style,this._rtl?d.right="":d.left="",d.top="",this._hideTileOnEndFunc&&this._hideTileOnEndFunc(a);this._arFireHideOnEnd=null}this._layoutPhase=b._PHASE_LAYOUT;this._transitionStart(!1);if(this._arInfoletsToResize)for(b=this._arInfoletsToResize,e=0;e<b.length;e+=2)a=b[e],g=b[e+1],d=this._getSizeStyleClassNameFunc(a),this._removeStyleClassNameFunc(a,d),
this._addStyleClassNameFunc(a,g),this.isAnimationEnabled()&&(this._addStyleClassNameFunc(a,this._transitionResizeToStyleClass),a._afrOldSizeStyleClass=d);this._transitionLayout()}};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._showTiles=function(){this._showTilesTimeout&&(clearTimeout(this._showTilesTimeout),this._showTilesTimeout=null);var a=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;this._layoutPhase=a._PHASE_SHOW;if(this._arInfoletsToShow&&this.isAnimationEnabled())for(var b=this._arInfoletsToShow,d=0;d<b.length;d++){var e=b[d];a._addBubbleEventListener(e,"transitionend",this._handleShowTransitionEndFunc);a._addBubbleEventListener(e,"webkitTransitionEnd",
this._handleShowTransitionEndFunc);this._addStyleClassNameFunc(e,this._transitionShowToStyleClass);this._removeStyleClassNameFunc(e,this._transitionShowFromStyleClass)}else{if(this._arInfoletsToShow)for(b=this._arInfoletsToShow,d=0;d<b.length;d++)e=b[d],this._removeStyleClassNameFunc(e,this._transitionShowFromStyleClass);this._handleShowTransitionEnd(null)}};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon.prototype._handleShowTransitionEnd=function(a){if(a){a.preventDefault();a.stopPropagation();a=a.target;this._removeStyleClassNameFunc(a,this._transitionShowToStyleClass);var b=window.adf.shared.impl.masonryLayout.MasonryLayoutCommon;b._removeBubbleEventListener(a,"transitionend",this._handleShowTransitionEndFunc);b._removeBubbleEventListener(a,"webkitTransitionEnd",this._handleShowTransitionEndFunc);if(b=this._arInfoletsToShow){for(var d=0;d<
b.length;d++){var e=b[d];if(e===a){b.splice(d,1);this._showTileOnEndFunc&&this._showTileOnEndFunc(a);break}}1>b.length&&(this._arInfoletsToShow=null)}}else if(!this.isAnimationEnabled()&&(b=this._arInfoletsToShow)){for(d=0;d<b.length;d++)e=b[d],this._showTileOnEndFunc&&this._showTileOnEndFunc(e);this._arInfoletsToShow=null}this._arInfoletsToShow||(this._layoutPhase=null,this._layoutCycleOnEndFunc&&this._layoutCycleOnEndFunc(),this._queuedRelayout&&(this._queuedRelayout=!1,this._queueRelayout()))};
window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._PHASE_HIDE=1;window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._PHASE_LAYOUT=2;window.adf.shared.impl.masonryLayout.MasonryLayoutCommon._PHASE_SHOW=3;