base-build-min.js revision 50ebe4de3ac641ae0af0b39a29ccf82e4c3760b6
YUI.add("base-build",function(f){var c=f.Base,a=f.Lang,b="initializer",d="destructor",e;c._build=function(g,n,s,w,v,p){var x=c._build,h=x._ctor(n,p),k=x._cfg(n,p,s),u=x._mixCust,j=h._yuibuild.dynamic,o,m,t,y,r,q;for(o=0,m=s.length;o<m;o++){t=s[o];y=t.prototype;r=y[b];q=y[d];delete y[b];delete y[d];f.mix(h,t,true,null,1);u(h,t,k);if(r){y[b]=r;}if(q){y[d]=q;}h._yuibuild.exts.push(t);}if(w){f.mix(h.prototype,w,true);}if(v){f.mix(h,x._clean(v,k),true);u(h,v,k);}h.prototype.hasImpl=x._impl;if(j){h.NAME=g;h.prototype.constructor=h;}return h;};e=c._build;f.mix(e,{_mixCust:function(g,q,o){var n,h,p,j,k,m;if(o){n=o.aggregates;h=o.custom;p=o.statics;}if(p){f.mix(g,q,true,p);}if(n){for(m=0,k=n.length;m<k;m++){j=n[m];if(!g.hasOwnProperty(j)&&q.hasOwnProperty(j)){g[j]=a.isArray(q[j])?[]:{};}f.aggregate(g,q,true,[j]);}}if(h){for(m in h){if(h.hasOwnProperty(m)){h[m](m,g,q);}}}},_tmpl:function(g){function h(){h.superclass.constructor.apply(this,arguments);}f.extend(h,g);return h;},_impl:function(m){var p=this._getClasses(),o,h,g,n,q,k;for(o=0,h=p.length;o<h;o++){g=p[o];if(g._yuibuild){n=g._yuibuild.exts;q=n.length;for(k=0;k<q;k++){if(n[k]===m){return true;}}}}return false;},_ctor:function(g,h){var j=(h&&false===h.dynamic)?false:true,k=(j)?e._tmpl(g):g,i=k._yuibuild;if(!i){i=k._yuibuild={};}i.id=i.id||null;i.exts=i.exts||[];i.dynamic=j;return k;},_cfg:function(k,p,m){var j=[],o={},u=[],g,s=(p&&p.aggregates),t=(p&&p.custom),q=(p&&p.statics),r=k,n,h;while(r&&r.prototype){g=r._buildCfg;if(g){if(g.aggregates){j=j.concat(g.aggregates);}if(g.custom){f.mix(o,g.custom,true);}if(g.statics){u=u.concat(g.statics);}}r=r.superclass?r.superclass.constructor:null;}if(m){for(n=0,h=m.length;n<h;n++){r=m[n];g=r._buildCfg;if(g){if(g.aggregates){j=j.concat(g.aggregates);}if(g.custom){f.mix(o,g.custom,true);}if(g.statics){u=u.concat(g.statics);}}}}if(s){j=j.concat(s);}if(t){f.mix(o,p.cfgBuild,true);}if(q){u=u.concat(q);}return{aggregates:j,custom:o,statics:u};},_clean:function(p,h){var o,j,g,m=f.merge(p),n=h.aggregates,k=h.custom;for(o in k){if(m.hasOwnProperty(o)){delete m[o];}}for(j=0,g=n.length;j<g;j++){o=n[j];if(m.hasOwnProperty(o)){delete m[o];}}return m;}});c.build=function(i,g,j,h){return e(i,g,j,null,null,h);};c.create=function(g,j,i,h,k){return e(g,j,i,h,k);};c.mix=function(g,h){return e(null,g,h,null,null,{dynamic:false});};c._buildCfg={custom:{ATTRS:function(l,j,h){j.ATTRS=j.ATTRS||{};if(h.ATTRS){var i=h.ATTRS,k=j.ATTRS,g;for(g in i){if(i.hasOwnProperty(g)){k[g]=k[g]||{};f.mix(k[g],i[g],true);}}}}},aggregates:["_PLUG","_UNPLUG"]};},"@VERSION@",{requires:["base-base"]});