/*
	UIZE JAVASCRIPT FRAMEWORK 2011-01-31

	http://www.uize.com/reference/Uize.html
	Available under MIT License or GNU General Public License -- http://www.uize.com/license.html
*/
(function(){var _a,_b='string',_c='object',_d='number',_e='boolean',_f=Function,_g=false,_h=true,_i=null;var _j=0,_k=[],_l={},_m={string:1,number:1,'boolean':1};function _n(_o){if(_o==_a)return _o;var _p=typeof _o;if(_p==_b||_p==_d||_p==_e||_q(_o))return _o;var _r=_o.constructor;if(_r==RegExp||_r==Date||_r==String||_r==Number||_r==Boolean)return new _r(_o.valueOf());var _s=_r==Object;if(_s||_t(_o)){var _u,_v,_w=_s?{}:[];for(var _x in _o)_w[_x]=(_v=typeof(_u=_o[_x]))==_b||_v==_d||_v==_e||_u==_a?_u:_n(_u);return _w;}return _o;}function _y(){function _z(_A){var _B=_C(_A).moduleName,_D=_A.subclass;return('['+(_E(_A)||(!_D&& !_B)?_c:_D?'class':'package')+' '+(_B||'Function')+']');}var _w=_z(this);if(this.get){var _F=this.get(),_G=[];for(var _H in _F){var _I=_F[_H];_G.push(_H+' : '+(_I&&(_E(_I)||_q(_I))?_z(_I):_I));}_w+='\n\n'+_G.sort().join('\n');}return _w;}function _J(){return this[_K(this,'value')];}var _L=Uize=_M(function(){},function(){this.instanceId=_N();},function(_F){_F||(_F=_l);var _O={},
_P=this.Class._P,_x,_Q;for(_x in _P){if(_x in _F)_O[_x]=_F[_x];else if((_Q=_P[_x])!==_a)_O[_x]=_Q;}for(_x in _F)_x in _O||(_O[_x]=_F[_x]);this.set(_O);}),_R=_L.prototype,_S=_L.nonInheritableStatics;function _C(_T){return _T.Class||_T}var _U={},_V={Uize:_L};function _W(_B){var _X;return(_V[_B]||(_B=='*'&&_V)||((_X=(new _f('try {return '+_B+'} catch (e) {}'))())&&(_V[_B]=_X)));}function _Y(_X){var _Z=_U[_X];if(_Z){for(var _0= -1,_1=_Z.length;++_0<_1;)_Z[_0]();delete _U[_X];}}function _2(_3,_4){var _L=_C(_3);return(_L._5[_4]||_L._6[_4]);}function _K(_3,_4){var _7=_2(_3,_4);return _7?_7._8:_4;}_L._9=_R._9=function(_ba,_bb){if(_ba.charCodeAt(0)==67&& !_ba.indexOf('Changed.')){var _3=this,_bc=_ba.slice(8),_7=_2(_3,_bc);if(_7&&_bc!=_7._bd)_ba='Changed.'+(_bc=_7._bd);_bb(_ba);(_3._be||(_3._be={}))[_bc]=_3._bf&&_3._bf[_ba];}else{_bb(_ba);}};_L.wire=_R.wire=function(_bg,_bh){var _3=this;if(arguments.length==2){_3._9(_bg,function(_ba){var _bf=_3._bf||(_3._bf=_3.eventHandlers={});(_bf[_ba]||(_bf[_ba]=[])).push({_ba:_ba,
_bh:_q(_bh)?_bh:typeof _bh==_b?new _f(_bh):function(_bi){_bh.fire(_bi)},_bj:_bh});});}else if(typeof _bg==_c&&_bg){for(var _ba in _bg)this.wire(_ba,_bg[_ba]);}};_L.fire=_R.fire=function(_bi){if(typeof _bi!=_c)_bi={name:_bi};var _3=this,_bf=_3._bf;if(_bf){var _bk=_bf[_bi.name],_bl=_bf['*'];if(_bk||_bl){_bi.source||(_bi.source=_3);var _bm=_bl&&_bk?_bl.concat(_bk):_bl||_bk,_bn=_bm.length;if(_bn==1){_bm[0]._bh(_bi);}else if(_bn==2){var _bo=_bm[0]._bh,_bp=_bm[1]._bh;_bo(_bi);_bp(_bi);}else{if(!_bl|| !_bk)_bm=_bm.concat();for(var _bq= -1;++_bq<_bn;)_bm[_bq]._bh(_bi);}}}if(_bi.bubble&&_3.Class&&_3.parent){_bi.source||(_bi.source=_3);_3.parent.fire(_bi);}return _bi;};_L.unwire=_R.unwire=function(_bg,_bh){var _3=this;if(typeof _bg==_c&&_bg){for(var _ba in _bg)_3.unwire(_ba,_bg[_ba]);}else{_3._9(_bg,function(_ba){var _bf=_3._bf;if(_bf){var _br=_bf[_ba];if(_br){if(_bh){var _bq=0;while(_bq<_br.length){_br[_bq]._bj==_bh?_br.splice(_bq,1):_bq++;}}(_bh&&_br.length)||delete _bf[_ba];}}});}};_L.get=_R.get=function(_x){
if(typeof _x==_b){return this[_K(this,_x)];}else{var _3=this,_w={};if(!_x){var _L=_C(_3),_6=_L._6;for(var _bs in _6)_w[_6[_bs]._bd]=_3[_bs];}else if(_t(_x)){for(var _bt= -1,_bu=_x.length;++_bt<_bu;){var _bv=_x[_bt];_w[_bv]=_3[_K(_3,_bv)];}}else{for(var _bv in _x)_w[_bv]=_3[_K(_3,_bv)];}return _w;}};_L.registerProperties=function(_bw){var _3=this,_6=_3._6,_5=_3._5;for(var _bs in _bw){var _bx=_bw[_bs],_by=typeof _bx==_c,_bc=(_by?_bx.name:_bx)||_bs,_bz=_bc,_7=_6[_bs]={_8:_bs};if(_bc.indexOf('|')> -1){var _bA=_bc.split('|');_bz=_bA[0];for(var _bB= -1;++_bB<_bA.length;)_5[_bA[_bB]]=_7;}else{_5[_bc]=_7;}_7._bd=_bz;if(_by){if(_bx.onChange)_7._bC=_bx.onChange;if(_bx.conformer)_7._bD=_bx.conformer;_3[_bs]=_bx.value;}}_3._P=this.get();};_L.set=_R.set=function(_F){if(arguments.length==2)_F=_bE(_F,arguments[1]);var _3=this,_E= !!_3.Class,_L=_3.Class||_3,_5=_L._5,_6=_L._6,_7,_bF,_bG,_bH,_be=_E&&_3._be,_bI=_be&&_be['*'],_bJ,_bK,_bs,_bc,_bL,_I,_bM;for(var _4 in _F){_I=_F[_4];if(_7=_5[_4]||_6[_4]){_bs=_7._8;_bc=_7._bd;if(_E)
(_bM||(_bM={}))[_bc]=_7._bD?(_I=_7._bD.call(_3,_I,_3[_bs])):_I;if(_I!==_3[_bs]){if(_E){_bI&&((_bJ||(_bJ={}))[_bc]=_I);_be&&_be[_bc]&&(_bK||(_bK=[])).push(_bc);function _bN(_bH){if(_q(_bH)){if(!_bF){_bF=[];_bG=_3.instanceId+'_handlerAlreadyAdded';}if(!_bH[_bG]){_bH[_bG]=1;_bF.push(_bH);}}else if(typeof _bH==_b){_bN(_3[_bH]);}else if(_t(_bH)){for(var _bq= -1,_bO=_bH.length;++_bq<_bO;)_bN(_bH[_bq]);}}_7._bC&&_bN(_7._bC);}_3[_bs]=_I;}}else{_3[_4]=_I;(_bL||(_bL={}))[_4]=_4;}}_bL&&_L.registerProperties(_bL);if(_E){if(_bF){for(var _bq= -1,_bP=_bF.length;++_bq<_bP;){var _bH=_bF[_bq];delete _bH[_bG];_bH.call(_3,_bM);}}_bJ&&_3.fire({name:'Changed.*',properties:_bJ});if(_bK){for(var _bQ= -1,_bR=_bK.length;++_bQ<_bR;)_3.fire('Changed.'+_bK[_bQ]);}}else{_L._P=this.get();}};_L.toggle=_R.toggle=function(_H){var _o= !this.get(_H);this.set(_H,_o);return _o;};_R.kill=function(){var _bS=this.instanceId;_bT('if(typeof '+_bS+'!=\'undefined\')'+_bS+'=null');};_L.capFirstChar=function(_bU){
return _bU.charAt(0).toUpperCase()+_bU.slice(1);};_S.capFirstChar=1;_L.clone=_n;_S.clone=1;_L.constrain=function(_o,_bV,_bW){return(_bV<_bW?(_o<_bV?_bV:_o>_bW?_bW:_o):(_o<_bW?_bW:_o>_bV?_bV:_o));};_S.constrain=1;var _bX=_L.copyInto=function(_bY,_bZ){if(typeof _bZ==_c&&_bZ){for(var _H in _bZ)_bY[_H]=_bZ[_H];}if(arguments.length>2){for(var _b0=0;++_b0<arguments.length;){if(typeof(_bZ=arguments[_b0])==_c&&_bZ){for(var _H in _bZ)_bY[_H]=_bZ[_H];}}}return _bY;};_S.copyInto=1;_L.callOn=function(_A,_b1,_b2){if(!_A)return;_b2||(_b2=_k);var _b3=typeof _b1==_b,_b4= !_b3&&_q(_b1);function _b5(_A){if(_A&&typeof _A==_c){if(_t(_A)){for(var _b6= -1,_b7=_A.length;++_b6<_b7;)_b5(_A[_b6]);}else{var _b8=_b3&&_q(_A[_b1]);if(_E(_A)||_b8){if(_b4||_b8)(_b4?_b1:_A[_b1]).apply(_A,_b2);}else{for(var _b9 in _A)_b5(_A[_b9]);}}}}_b5(_A);};_S.callOn=1;_L.defaultNull=function(_o,_ca){return _o!=_a?_o:_ca;};_S.defaultNull=1;_L.getModuleByName=_W;_S.getModuleByName=1;_L.indexIn=function(_cb,_o,_cc,_cd){if(_t(_cb)){_cd=_cd!==_g;
for(var _ce=_cb.length-1,_cf=_ce+1,_w;--_cf>=0;){var _cg=_cb[_w=_cc?_cf:_ce-_cf];if(_cd?_cg===_o:_cg==_o)return _w;}}return-1;};_S.indexIn=1;var _t=_L.isArray=function(_A){return _A instanceof Array||(!!_A&&_q(_A.splice));};_S.isArray=1;var _q=_L.isFunction=function(_o){var _r=_o!=_a&&_o.constructor;return!!(_r&&_r==_r.constructor);};_S.isFunction=1;_L.isNumber=function(_o){return typeof _o==_d&& !isNaN(_o);};_S.isNumber=1;_L.isIn=function(_cb,_o,_cd){return _L.indexIn(_cb,_o,false,_cd)> -1;};_S.isIn=1;var _ch=_L.recordMatches=function(_ci,_cj){if(!_ci)return!_cj;for(var _H in _cj){if(_ci[_H]!==_cj[_H])return _g;}return _h;};_S.recordMatches=1;_L.findRecordNo=function(_ck,_cj,_cl){var _w=_L.isNumber(_cl)?_cl: -1;if(_ck){for(var _cm= -1,_cn=_ck.length;++_cm<_cn;){if(_ch(_ck[_cm],_cj)){_w=_cm;break;}}}return _w;};_S.findRecordNo=1;_L.findRecord=function(_ck,_cj,_cl){var _cm=_L.findRecordNo(_ck,_cj,_cl);return _cm> -1?_ck[_cm]:null;};_S.findRecord=1;var _N=_L.getGuid=function(){return'uizeGuid'+_j++;};
_S.getGuid=1;var _co=_L.getPathToLibrary=function(_cp,_cq){if(typeof document!='undefined'&&document.getElementsByTagName){for(var _cr= -1,_cs=document.getElementsByTagName('SCRIPT'),_ct=_cs.length,_cu,_cv;++_cr<_ct;){if((_cv=(_cu=_cs[_cr].src).indexOf(_cp))> -1)return(_cq?_cu.replace(_cp,_cq):_cu.slice(0,_cu.lastIndexOf('/',_cv)+1));}}return'';};_S.getPathToLibrary=1;var _bT=_L.globalEval=new _f('toEval','return eval (toEval)');_S.globalEval=1;var _E=_L.isInstance=function(_A){return!!(_A&&_A.Class);};_S.isInstance=1;_L.module=function(_cw){var _cx=_cw.name||'',_cy=_cx.lastIndexOf('.'),_cz=_cx.substr(0,_cy),_cA=_cw.superclass||_cz,_cB=_cw.required||[],_cC=[];_U[_cx]||(_U[_cx]=[]);if(typeof _cB==_b)_cB=_cB.split(',');_cz&&_cB.push(_cz);_cA!=_cz&&_cB.push(_cA);for(var _cD= -1,_cE=_cB.length;++_cD<_cE;){var _cF=_cB[_cD];_cF&& !_W(_cF)&&_cC.push(_cF);}function _cG(){var _cH=_cw.builder,_X=_cH&&_cH(_W(_cA));_cx&&(new _f('m',_cx+'=m'))(_X=_V[_cx]=_X||function(){});if(_q(_X)){_X.moduleName=_cx;if(!_X.subclass)
_X.toString=_y;}_Y(_cx);}var _cI=_cC.length;if(_cI){var _cJ=_L.moduleLoader;if(_cJ){var _cK= -1;function _cL(){_cK++;if(_cK<_cI){var _cM=_cC[_cK];_W(_cM)?_cL():_U[_cM]?_U[_cM].push(_cL):_cJ(_cM,function(_cN){if(_W(_cM)){_cL();}else{_cN&&_bT(_cN);if(_W(_cM)){_Y(_cM);_cL();}else{(_U[_cM]||(_U[_cM]=[])).push(_cL);}}});}else{_cG();}}_cL();}else{_cG();}}else{_cG();}};_S.module=1;var _bE=_L.pairUp=function(_cO,_o){var _w={};_w[_cO]=_o;return _w;};_S.pairUp=1;var _cP=_L.escapeRegExpLiteral=function(_cQ){return _cQ.replace(/([\^\$\|\{\}\[\]\(\)\?\.\*\+\\])/g,'\\$1');};_S.escapeRegExpLiteral=1;var _cR=_L.substituteInto=function(_cS,_cT,_cU){if(!(_cS=_cS==_a?'':_cS+'')||_cT==_a)return _cS;if(_m[typeof _cT])_cT=[_cT];var _cV=(_cU||'[#KEY]').split('KEY'),_cW=[];for(var _cX in _cT)_cW.push(_cP(_cX));return _cS.replace(new RegExp(_cP(_cV[0])+'('+_cW.join('|')+')'+_cP(_cV[1]),'g'),function(_cY,_cX){return _cT[_cX]+''});};_S.substituteInto=1;function _M(_L,_cZ,_c0){var _c1=function(){var _c2,_c3,_c4;for(var _c5 in _c6){_c3=
(_c2=_c6[_c5]).length;for(var _c7= -1;++_c7<_c3;)if(_c4=_c2[_c7])_c4.apply(this,arguments);}return this;};var _R=_L.prototype;var _I,_c8=_L.nonInheritableStatics||_l;for(var _x in _L)if(!_c8[_x]&&(_I=_L[_x])!=_R&& !(_q(_I)&&_I.moduleName&&/[A-Z]/.test(_x.charAt(0))))_c1[_x]=_n(_I);var _c9=_c1.prototype;for(var _x in _R)_c9[_x]=_R[_x];_c9.toString=_y;_c9.valueOf=_J;_c9.Class=_c1;_c1.nonInheritableStatics={nonInheritableStatics:1,toString:0,valueOf:0};_c1.superclass=_L;_c1.toString=_y;_c1.valueOf=_J;var _da=_L._da||{alphastructor:_k,omegastructor:_k},_c6=_c1._da={alphastructor:_da.alphastructor.concat(_cZ),omegastructor:_da.omegastructor.concat(_c0)};_c1._6||(_c1._6={});_c1._5||(_c1._5={});return _c1;};_L.subclass=function(_cZ,_c0){return _M(this,_cZ,_c0);};_L.moduleName='Uize';var _db='[#modulePath]',_dc;_L.moduleUrlResolver=function(_B){return _L.moduleUrlTemplate.replace(_db,_B+'.js');};_S.moduleUrlResolver=1;_L.moduleLoader=function(_cM,_dd){_dd();var _de=document.createElement('script');
_de.type='text/javascript';_de.src=_L.moduleUrlResolver(_cM);(_dc||(_dc=document.getElementsByTagName('HEAD')[0])).appendChild(_de);};_S.moduleLoader=1;_L.moduleUrlTemplate=_co('Uize.js',_db);_S.moduleUrlTemplate=1;_L.pathToResources=_co('Uize.js');_S.pathToResources=1;})();
