(function(){var e=function(e){var t=this,n=function(){var t=e.fn.closest;e.fn.closest=function(n,r){var i={},s,o,u,a,f,l,c=!0,l,h=n;typeof n=="string"&&(h=[n]),e.each(h,function(e,t){if(t.indexOf(">")==0){if(t.indexOf(" ")!=-1)throw" closest does not work with > followed by spaces!";i[h[e]=t.substr(1)]=t,typeof n=="string"&&(n=t.substr(1)),c=!1}}),s=t.call(this,n,r);if(c)return s;a=0;while(a<s.length){o=s[a],l=o.selector;if(i[l]!==undefined){o.selector=i[l],i[l]=!1;if(typeof o.selector!="string"||o.elem.parentNode!==r){s.splice(a,1);continue}}a++}return s}};n(),t.resolveWith(n)};dispatch("mvc/dom.closest").containing(e).to("Foundry/2.1 Modules")})();