//>>built
define("dojox/mvc/_atBindingMixin","dojo/_base/array,dojo/_base/lang,dojo/_base/declare,dojo/has,./resolve,./sync".split(","),function(o,l,h,j,p,q){function r(a){var b;try{b=require("dijit/registry")}catch(c){return}for(a=a.domNode&&a.domNode.parentNode;a;){if(a=b.getEnclosingWidget(a)){var e=a._relTargetProp||"target";if((l.isFunction(a.get)?a.get(e):a[e])||e in a.constructor.prototype)return a}a=a&&a.domNode.parentNode}}function k(a,b,c,e,h){function k(){f.Two&&f.Two.unwatch();delete f.Two;var g=
d&&(l.isFunction(d.get)?d.get(m):d[m]),i=p(a,g),g=p(c,g);j("mvc-bindings-log-api")&&(!i||/^rel:/.test(a));j("mvc-bindings-log-api")&&(!g||/^rel:/.test(c));if(i&&g&&(!/^rel:/.test(a)&&!/^rel:/.test(c)||d))(!i.set||!i.watch)&&"*"==b?j("mvc-bindings-log-api"):null==b?(l.isFunction(g.set)?g.set(e,i):g[e]=i,j("mvc-bindings-log-api")):f.Two=q(i,b,g,e,h)}var f={},d=r(c),m=d&&d._relTargetProp||"target";k();if(d&&/^rel:/.test(a)||/^rel:/.test(c)&&l.isFunction(d.set)&&l.isFunction(d.watch))f.rel=d.watch(m,
function(a,b,c){b!==c&&(j("mvc-bindings-log-api"),k())});var n={};n.unwatch=n.remove=function(){for(var a in f)f[a]&&f[a].unwatch(),delete f[a]};return n}j("mvc-bindings-log-api");h=h("dojox/mvc/_atBindingMixin",null,{dataBindAttr:"data-mvc-bindings",_dbpostscript:function(a){var b=this._refs=(a||{}).refs||{},c;for(c in a)if("dojox.mvc.at"==(a[c]||{}).atsignature){var e=a[c];delete a[c];b[c]=e}},_startAtWatchHandles:function(){var a=this._refs;if(a){var b=this._atWatchHandles=this._atWatchHandles||
{};this._excludes=null;for(var c in a)a[c]&&"*"!=c&&(b[c]=k(a[c].target,a[c].targetProp,this,c,{bindDirection:a[c].bindDirection,converter:a[c].converter}));if("dojox.mvc.at"==(a["*"]||{}).atsignature)b["*"]=k(a["*"].target,a["*"].targetProp,this,"*",{bindDirection:a["*"].bindDirection,converter:a["*"].converter})}},_stopAtWatchHandles:function(){for(var a in this._atWatchHandles)this._atWatchHandles[a].unwatch(),delete this._atWatchHandles[a]},_setAtWatchHandle:function(a,b){if("ref"==a)throw Error(this+
": 1.7 ref syntax used in conjuction with 1.8 dojox/mvc/at syntax, which is not supported.");var c=this._atWatchHandles=this._atWatchHandles||{};c[a]&&(c[a].unwatch(),delete c[a]);this._excludes=this[a]=null;this._started?c[a]=k(b.target,b.targetProp,this,a,{bindDirection:b.bindDirection,converter:b.converter}):this._refs[a]=b},_setBind:function(a){var a=eval("({"+a+"})"),b;for(b in a){var c=a[b];"dojox.mvc.at"==(c||{}).atsignature&&this._setAtWatchHandle(b,c)}},_getExcludesAttr:function(){if(this._excludes)return this._excludes;
var a=[],b;for(b in this._atWatchHandles)"*"!=b&&a.push(b);return a},_getPropertiesAttr:function(){if(this.constructor._attribs)return this.constructor._attribs;var a=["onClick"].concat(this.constructor._setterAttrs);o.forEach(["id","excludes","properties","ref","binding"],function(b){b=o.indexOf(a,b);0<=b&&a.splice(b,1)});return this.constructor._attribs=a}});h.prototype[h.prototype.dataBindAttr]="";return h});