/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.lang.aspect"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.lang.aspect"]){_4._hasResource["dojox.lang.aspect"]=true;_4.provide("dojox.lang.aspect");(function(){var d=_4,_7=_6.lang.aspect,ap=Array.prototype,_8=[],_9;var _a=function(){this.next_before=this.prev_before=this.next_around=this.prev_around=this.next_afterReturning=this.prev_afterReturning=this.next_afterThrowing=this.prev_afterThrowing=this;this.counter=0;};d.extend(_a,{add:function(_b){var _c=d.isFunction(_b),_d={advice:_b,dynamic:_c};this._add(_d,"before","",_c,_b);this._add(_d,"around","",_c,_b);this._add(_d,"after","Returning",_c,_b);this._add(_d,"after","Throwing",_c,_b);++this.counter;return _d;},_add:function(_e,_f,_10,dyn,_11){var _12=_f+_10;if(dyn||_11[_f]||(_10&&_11[_12])){var _13="next_"+_12,_14="prev_"+_12;(_e[_14]=this[_14])[_13]=_e;(_e[_13]=this)[_14]=_e;}},remove:function(_15){this._remove(_15,"before");this._remove(_15,"around");this._remove(_15,"afterReturning");this._remove(_15,"afterThrowing");--this.counter;},_remove:function(_16,_17){var _18="next_"+_17,_19="prev_"+_17;if(_16[_18]){_16[_18][_19]=_16[_19];_16[_19][_18]=_16[_18];}},isEmpty:function(){return !this.counter;}});var _1a=function(){return function(){var _1b=arguments.callee,_1c=_1b.advices,ret,i,a,e,t;if(_9){_8.push(_9);}_9={instance:this,joinPoint:_1b,depth:_8.length,around:_1c.prev_around,dynAdvices:[],dynIndex:0};try{for(i=_1c.prev_before;i!=_1c;i=i.prev_before){if(i.dynamic){_9.dynAdvices.push(a=new i.advice(_9));if(t=a.before){t.apply(a,arguments);}}else{t=i.advice;t.before.apply(t,arguments);}}try{ret=(_1c.prev_around==_1c?_1b.target:_7.proceed).apply(this,arguments);}catch(e){_9.dynIndex=_9.dynAdvices.length;for(i=_1c.next_afterThrowing;i!=_1c;i=i.next_afterThrowing){a=i.dynamic?_9.dynAdvices[--_9.dynIndex]:i.advice;if(t=a.afterThrowing){t.call(a,e);}if(t=a.after){t.call(a);}}throw e;}_9.dynIndex=_9.dynAdvices.length;for(i=_1c.next_afterReturning;i!=_1c;i=i.next_afterReturning){a=i.dynamic?_9.dynAdvices[--_9.dynIndex]:i.advice;if(t=a.afterReturning){t.call(a,ret);}if(t=a.after){t.call(a);}}var ls=_1b._listeners;for(i in ls){if(!(i in ap)){ls[i].apply(this,arguments);}}}finally{for(i=0;i<_9.dynAdvices.length;++i){a=_9.dynAdvices[i];if(a.destroy){a.destroy();}}_9=_8.length?_8.pop():null;}return ret;};};_7.advise=function(obj,_1d,_1e){if(typeof obj!="object"){obj=obj.prototype;}var _1f=[];if(!(_1d instanceof Array)){_1d=[_1d];}for(var j=0;j<_1d.length;++j){var t=_1d[j];if(t instanceof RegExp){for(var i in obj){if(d.isFunction(obj[i])&&t.test(i)){_1f.push(i);}}}else{if(d.isFunction(obj[t])){_1f.push(t);}}}if(!d.isArray(_1e)){_1e=[_1e];}return _7.adviseRaw(obj,_1f,_1e);};_7.adviseRaw=function(obj,_20,_21){if(!_20.length||!_21.length){return null;}var m={},al=_21.length;for(var i=_20.length-1;i>=0;--i){var _22=_20[i],o=obj[_22],ao=new Array(al),t=o.advices;if(!t){var x=obj[_22]=_1a();x.target=o.target||o;x.targetName=_22;x._listeners=o._listeners||[];x.advices=new _a;t=x.advices;}for(var j=0;j<al;++j){ao[j]=t.add(_21[j]);}m[_22]=ao;}return [obj,m];};_7.unadvise=function(_23){if(!_23){return;}var obj=_23[0],_24=_23[1];for(var _25 in _24){var o=obj[_25],t=o.advices,ao=_24[_25];for(var i=ao.length-1;i>=0;--i){t.remove(ao[i]);}if(t.isEmpty()){var _26=true,ls=o._listeners;if(ls.length){for(i in ls){if(!(i in ap)){_26=false;break;}}}if(_26){obj[_25]=o.target;}else{var x=obj[_25]=d._listener.getDispatcher();x.target=o.target;x._listeners=ls;}}}};_7.getContext=function(){return _9;};_7.getContextStack=function(){return _8;};_7.proceed=function(){var _27=_9.joinPoint,_28=_27.advices;for(var c=_9.around;c!=_28;c=_9.around){_9.around=c.prev_around;if(c.dynamic){var a=_9.dynAdvices[_9.dynIndex++],t=a.around;if(t){return t.apply(a,arguments);}}else{return c.advice.around.apply(c.advice,arguments);}}return _27.target.apply(_9.instance,arguments);};})();}}};});