/*
	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.wire._base"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.wire._base"]){_4._hasResource["dojox.wire._base"]=true;_4.provide("dojox.wire._base");_6.wire._defaultWireClass="dojox.wire.Wire";_6.wire._wireClasses={"attribute":"dojox.wire.DataWire","path":"dojox.wire.XmlWire","children":"dojox.wire.CompositeWire","columns":"dojox.wire.TableAdapter","nodes":"dojox.wire.TreeAdapter","segments":"dojox.wire.TextAdapter"};_6.wire.register=function(_7,_8){if(!_7||!_8){return;}if(_6.wire._wireClasses[_8]){return;}_6.wire._wireClasses[_8]=_7;};_6.wire._getClass=function(_9){_4["require"](_9);return _4.getObject(_9);};_6.wire.create=function(_a){if(!_a){_a={};}var _b=_a.wireClass;if(_b){if(_4.isString(_b)){_b=_6.wire._getClass(_b);}}else{for(var _c in _a){if(!_a[_c]){continue;}_b=_6.wire._wireClasses[_c];if(_b){if(_4.isString(_b)){_b=_6.wire._getClass(_b);_6.wire._wireClasses[_c]=_b;}break;}}}if(!_b){if(_4.isString(_6.wire._defaultWireClass)){_6.wire._defaultWireClass=_6.wire._getClass(_6.wire._defaultWireClass);}_b=_6.wire._defaultWireClass;}return new _b(_a);};_6.wire.isWire=function(_d){return (_d&&_d._wireClass);};_6.wire.transfer=function(_e,_f,_10,_11){if(!_e||!_f){return;}if(!_6.wire.isWire(_e)){_e=_6.wire.create(_e);}if(!_6.wire.isWire(_f)){_f=_6.wire.create(_f);}var _12=_e.getValue(_10);_f.setValue(_12,(_11||_10));};_6.wire.connect=function(_13,_14,_15){if(!_13||!_14||!_15){return;}var _16={topic:_13.topic};if(_13.topic){_16.handle=_4.subscribe(_13.topic,function(){_6.wire.transfer(_14,_15,arguments);});}else{if(_13.event){_16.handle=_4.connect(_13.scope,_13.event,function(){_6.wire.transfer(_14,_15,arguments);});}}return _16;};_6.wire.disconnect=function(_17){if(!_17||!_17.handle){return;}if(_17.topic){_4.unsubscribe(_17.handle);}else{_4.disconnect(_17.handle);}};}}};});