!function(){var moduleFactory=function($){var module=this,exports=function(){var timer,resizers=$(),resizeCount=0,win=$(window),windowWidth=0,windowHeight=0;$(function(){windowWidth=win.width(),windowHeight=win.height()}),$.event.special.resize={setup:function(){return this!==window&&(resizers.push(this),$.unique(resizers)),this!==window},teardown:function(){return resizers=resizers.not(this),this!==window},add:function(handleObj){var origHandler=handleObj.handler;handleObj.origHandler=origHandler,handleObj.handler=function(ev,data){var isWindow=this===window;
if(isWindow&&ev.originalEvent){var width=win.width(),height=win.height();return(width!=windowWidth||height!=windowHeight)&&(windowWidth=width,windowHeight=height,clearTimeout(timer),timer=setTimeout(function(){win.trigger("resize")},1)),void 0}if(0===resizeCount){resizeCount++;var where=data===!1?ev.target:this;if($.event.handle.call(where,ev),ev.isPropagationStopped())return resizeCount--,void 0;for(var child,sub,index=resizers.index(this),length=resizers.length;++index<length&&(child=resizers[index])&&(isWindow||$.contains(where,child));)if($.event.handle.call(child,ev),ev.isPropagationStopped())for(;++index<length&&(sub=resizers[index]);)if(!$.contains(child,sub)){index--;
break}ev.stopImmediatePropagation(),resizeCount--}else handleObj.origHandler.call(this,ev,data)}}},$([document,window]).bind("resize",function(){})};exports(),module.resolveWith(exports)};dispatch("mvc/event.resize").containing(moduleFactory).to("Foundry/2.1 Modules")}();