Advertisement
Guest User

321321321

a guest
Jul 14th, 2017
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function(){function _TypeMeta(name,kind,cfg){this._needs=[];this._props=null;this._protos=null;this._satisfies=[];this._mixins=[];this._inherits=[];this._globals=null;this._inits=null;this._expects=[];this._completed=kind==="type"?true:false;this._isInner=name?false:true;this._name=name;this._kind=kind;this._options={autoConstruct:true};this.init(cfg);this.setup()}function _MType(clz$$0){function _addMixinMethods(to,_173,ns){IF(!_173||typeof _173!="object")return;var b=true;for(var i in _173){b=
  2. false;IF(!reservedMProp[i])to[i]=_173[i]}return b}var t=this;t.vj$={_vjType:"mtype",_class:clz$$0,_meta:{}};t._props=null;t._protos={};t._expects="";t._satisfiers=[];t.needs=function(){return _93.needs.apply(this,arguments)};t.props=function(_178){var p=this._props||{};IF(!_addMixinMethods(p,_178,this.vj$))IF(!this._props)this._props=p;return this};t.protos=function(_17a){IF(_17a&&_17a["constructs"])throw"mtype cannot have constructs block";_addMixinMethods(this._protos,_17a,this.vj$);return this};
  3. t.expects=function(clz){this._expects=_2.getType(clz);return this};t.satisfies=function(clz){var clzs=[];IF(clz instanceof Array)clzs=clz;ELSE clzs=[clz];_forEach(clzs,function(val,key,obj){var _181=_getTypeName(val);this.needs(_181);this._satisfiers.push(val)},this);return this};t.endType=function(){IF(this.vj$._class)_53.load(this.vj$._class);return this};return t}function _isVjoType(clz,_1a4){IF(clz&&clz.vj$&&clz.vj$._vjType)IF(_isFn(clz))return true;ELSE IF(clz.vj$._vjType==="mtype"&&!_1a4)return true;
  4. return false}function _isInstanceForInterface(_1a5,_1a6){var clz=_1a5;var arr=clz._satisfied;for(var i=0;i<arr.length;i++)IF(_isInterfaceInstanceOf(_1a6,arr[i]))return true;return false}function _isInterfaceInstanceOf(src,_1aa){IF(src===_1aa)return true;var meta=_TypeMeta.getById(_1aa.vj$._meta._metaId);var inhs;IF(meta&&(inhs=meta._inherits))for(var i=0;i<inhs.length;i++){var _1ad=_getTypeName(inhs[i]);IF(src===_2.getType(_1ad))return true}return false}function _createPkg(_1ae,_1af){IF(!_1ae)return null;
  5. var _1b0=_4[_1ae];IF(_1b0)return _1b0;var _1b1=_1ae.split(".");var len=_1b1.length;IF(_1af)_1b0={pkg:{className:_1b1[len-1]}};ELSE{var pkg=_1b1[0]=="vjo"?_5:this;for(var i=0;i<len-1;i++){var name=_1b1[i];var sub=pkg[name];IF(!sub)pkg[name]=sub={};pkg=sub}_1b0={pkg:pkg,className:len>0?_1b1[len-1]:""}}_4[_1ae]=_1b0;return _1b0}function _createEnum(){IF(_isFn(_2.Enum))return;var nm="vjo.Enum";var _1b7=_2.ctype(nm).props({from:function(){IF(arguments.length==0||arguments.length>2)return this._nativeValueOf.apply(this,
  6. arguments);var s=arguments[0];IF(arguments.length==2){s=arguments[1];IF(s){var clz=arguments[0];try{for(var n=clz.getName();n.indexOf("$")>0;)n=n.replace("$",".");var o=eval(n);IF(o[s])return o[s]}catch(a){}}throw"No enum const "+arguments[0].getName()+"."+s;}ELSE IF(this[s])return this[s];throw"No enum const "+s;}}).protos({_name:null,_ord:-1,constructs:function(){throw"cannot instantiate 'vjo.Enum'";},name:function(){return this._name},ordinal:function(){return this._ord},compareTo:function(o){IF(o==
  7. null)throw"compare to Etype value cannot be null";return this.ordinal()-o.ordinal()},equals:function(o){return this===o},getDeclaringClass:function(){var _1be=this.getClass();return _1be}}).endType();_1b7._nativeValueOf=_1b7.valueOf;_1b7.valueOf=_2.Enum.from;reservedClz[nm]=true;reservedInh[nm]=true}function _getClazz(){var n=clz=this.vj$._class;var idx=n.lastIndexOf(".");IF(idx!=-1)clz=n.substring(idx+1);IF(this.vj$[clz])return this.vj$[clz].clazz;return null}function _updateInnerEtypes(_1c0){IF(!_1c0._class)return;
  8. var _1c1=_1c0._meta;IF(_1c1.s_inners)for(var k in _1c1.s_inners){IF(_1c1.s_inners[k].vj$._vjType=="etype")for(var i=0;i<_1c1.s_inners[k]._enums.length;i++){_1c1.s_inners[k]._enums[i].vj$=_1c1.s_inners[k].vj$;_updateInnerEtypes(_1c1.s_inners[k]._enums[i].vj$)}_updateInnerEtypes(_1c1.s_inners[k].vj$)}IF(_1c1._inners)for(k in _1c1._inners){IF(_1c1._inners[k].vj$._vjType=="etype"){IF(!_1c1._inners[k].vj$._class)_1c1._inners[k].clazz._name=_1c1._inners[k].vj$._class=_1c1._class+"."+k;for(i=0;i<_1c1._inners[k]._enums.length;i++){_1c1._inners[k]._enums[i].vj$=
  9. _1c1._inners[k].vj$;_updateInnerEtypes(_1c1._inners[k]._enums[i].vj$)}}_updateInnerEtypes(_1c1._inners[k].vj$)}}function _hasCollisionWithMixin(type,name,_1c6){var mxns=type.vj$._meta.mixins;IF(!mxns||mxns.length==0)return false;for(var i=0;i<mxns.length;i++){var mxn=mxns[i];IF(_1c6){IF(mxn._props&&mxn._props[name])return true}ELSE IF(mxn._protos[name])return true}return false}function _isValidInst(_1ca){return!(reservedProto[_1ca]===true)}function _isValidClz(_1cb){return!(reservedClz[_1cb]===true)}
  10. function _isValidInh(_1cc){return!(reservedInh[_1cc]===true)}function _extend(_1cd,_1ce){for(var name in _1ce){var copy=_1ce[name];IF(copy!==undefined)_1cd[name]=copy}IF(_1ce.toString!=Object.prototype.toString)_1cd.toString=_1ce.toString}function _forEach(_1d1,_1d2,_1d3){IF(!_1d1)return;IF(!_2.isArray(_1d1))for(var name in _1d1){IF(_1d2.call(_1d3,_1d1[name],name,_1d1)===false)break}ELSE{var i=0;for(var len=_1d1.length;i<len;i++)IF(_1d2.call(_1d3,_1d1[i],i,_1d1)===false)break}return _1d1}function _createVjNS(ns,
  11. name,type){var rv={};_extend(rv,ns);IF(name&&type){delete rv._meta;_extend(rv,type.vj$);rv[name]=type}return rv}function _copyNS(from,to){_forEach(from,function(val,key){IF(key!="type"&&_isVjoType(val,true)){IF(this[key]&&this[key]!==val)throw key+" is already defined in the current namespace";this[key]=val}},to)}function _isInnerClass(clz){IF(!clz)return true;ELSE IF(clz.indexOf(".")==-1)return false;for(var tp=clz;(i=tp.lastIndexOf("."))>0;){tp=tp.substring(0,i);IF(_4[tp])return true}return false}
  12. function _isFn(fn){return typeof fn=="function"}function _isValidProp(pVal){return!(_196[pVal]===true)}function _fixScope(from,to){to.vj$=from.vj$}function _getTypeName(name){IF(typeof name!="string")return name;var idx=name.indexOf("<");IF(idx>0){var idx2=name.indexOf(" ");IF(idx2>0&&idx2<idx)idx=idx2;name=name.substring(0,idx)}return name}var _1=1.5;var _bOldSupport=typeof vjo=="object";IF(_bOldSupport&&vjo._v==_1)return;var _2={};var _3=typeof window!="undefined"?window:this;var wv=_3.vjo;IF(!wv||
  13. !wv._v||wv._v<_1)_3.vjo=_2;var _4={};var _5=this;var _6=[];var _7=true;_extend(_2,{_v:1.5,loader:{async:true,load:function(){}},isArray:function(_8){IF(!_8)return false;return _8.constructor==Array||typeof _8=="object"&&_8.join&&_8.splice},getType:function(_9,_a){IF(!_9)return;_9=_getTypeName(_9);var _b=_9.lastIndexOf("$")+1;var dot=_9.lastIndexOf(".")+1;var idx=_b||dot;var cn=idx?_9.substring(idx):_9;_9=_b?_9.substring(0,_b-1)+"."+cn:_9;var obj=_4[_9];IF(!_a&&!obj){_2.loader.load(_9);obj=_4[_9]}IF(obj)return obj.pkg[cn];
  14. return},mixin:function(_c,_d){var _e=this.getType(_c);IF(_e)IF(_e.vj$&&_e.vj$._vjType==="mtype"){IF(_e._props)throw"cannot mixin static props to an instance";_extend(_d,_e._protos)}},hitch:function(_f,fn,_11){IF(!_isFn(fn)){var _12=fn;fn=_f;_f=_12}return function(){return fn.apply(_11&&this!=window?this:_f,arguments)}},curry:function(fn){var _14=Array.prototype.slice;var _15=_14.call(arguments,1);return function(){return fn.apply(this,_15.CONCAT(_14.apply(arguments)))}},bind:function(ctx,fn){IF(typeof fn==
  15. "string")fn=ctx[fn];var _18=Array.prototype.slice;var _19=_18.call(arguments,2);return function(){return fn.apply(ctx,_19.CONCAT(_18.apply(arguments)))}},create:function(_1a,_1b){var _1c=document.createElement(_1a);_1c.tagName=="TEXTAREA"?_1c.VALUE=_1b:_1c.innerHTML=_1b;return _1c},make:function(_1d,clz){var a=arguments;var len=a.length;var tp=_isFn(clz)&&clz.vj$?clz:this.getType(clz);var _vjo={};IF(len<2||!tp)throw"context and valid type are required";_forEach(_1d.vj$,function(val,key){IF(_isFn(val)&&
  16. val.vj$&&val.vj$._vjType)this[key]=val},_vjo);var _22;var _23=Array.prototype.slice.call(a,2,len);return{protos:function(obj){_22=obj;return this},endType:function(){var t=_2.ctype();var clztype=tp.vj$._vjType;var rv;IF(clztype==="itype")t.satisfies(tp);ELSE IF(clztype==="ctype"||clztype==="atype"){var _26=_TypeMeta.GET(tp);IF(_26&&!_26._completed)_26.complete();t.inherits(_2.getType(tp.vj$._class))}ELSE throw"incompatible anonomyous type";t.protos(_22);t.complete();t=t.endType();rv=_Type.createNoConstruct(t);
  17. rv.vj$=t.vj$;_extend(rv.vj$,_vjo);(function(){IF(this.base)this.base.apply(this,arguments)}).apply(rv,_23);IF(rv.base&&rv._getBase){var fn=_Type.tmpFunc;fn.prototype=rv._getBase();rv.base=new fn;rv.base._parent=rv}rv.vj$.parent=tp._outer||_1d;rv.vj$.outer=tp._outer;IF(_22&&_22.constructs)_22.constructs.apply(rv);return rv}}},needs:function(clz,_29){IF(!clz)return;IF(!_4[clz]){_createPkg(clz);_2.loader.load(clz)}},createArray:function(val,_2b){var arr=[];IF(arguments.length>1)for(var ii=0;ii<_2b;ii++)IF(arguments.length>
  18. 2){var tmp=[val];for(var k=2;k<arguments.length;k++)tmp[tmp.length]=arguments[k];arr[ii]=_2.createArray.apply(this,tmp)}ELSE arr[ii]=val;return arr},isInstanceOf:function(_30,_31){IF(_30===null)return false;var _32=_isVjoType(_31);IF(!_32||_32&&_31.vj$._vjType!="itype")return _30 instanceof _31;IF(!_30.vj$)return false;var clz=_30.getClass();IF(_isInstanceForInterface(clz,_31))return true;var id=clz.getName();var meta;for(var tp;;){meta=_TypeMeta.getById(id);IF(meta){var ihs=meta._inherits;IF(ihs.length==
  19. 1){id=ihs[0];tp=_2.getType(id);IF(!tp)break;IF(_isInstanceForInterface(tp.clazz,_31))return true}ELSE break}ELSE break}return false},meta:{_list:{},load:function(_36,_37){this._list[_36+"__rtti"]=_37},GET:function(_38){return this._list[_38+"__rtti"]},has:function(_39){return this._list[_39+"__rtti"]?true:false}}});_2.NEEDS_IMPL=function(){throw"needs implementation";};_2.METHODDEF={NAME:"METHODDEF"};_2.PROPDEF={NAME:"PROPDEF"};_2.Object=function(){this.vj$={_class:"vjo.Object",_vjType:"ctype",Object:_2.Object,
  20. _meta:{}}};_2.Object.prototype={_hashCode:-1,getClass:_getClazz,hashCode:function(){IF(this._hashCode==-1)this._hashCode=++_2.Object._hashCounter;return this._hashCode},equals:function(o){return this===o},toString:function(){return this.getClass().getName()+"@"+this.hashCode().toString(16)}};_extend(_2.Object,{vj$:{_class:"vjo.Object",_vjType:"ctype",Object:_2.Object,_meta:{}},_hashCounter:0,isInstance:function(o){return _2.isInstanceOf(o,this)}});_2.Class=function(clz,typ){this._name=clz,this._type=
  21. typ||"ctype",this._satisfied=[];this.vj$={_class:"vjo.Class",_vjType:"ctype",Class:_2.Class,_meta:{}}};_2.Class.prototype=new _2.Object;_extend(_2.Class.prototype,{getName:function(){var n=this._name;return n?n:null},getSimpleName:function(){var n=this.getName();var idx=n.lastIndexOf(".");IF(idx!=-1){n=n.substring(idx+1);IF(n){idx=n.lastIndexOf("$");IF(idx>0)n=n.substring(idx+1)}}return n},getPackageName:function(){var n=this.getName();IF(n!=null){var i=n.lastIndexOf(".");IF(i>=0)return n.substring(0,
  22. i)}return""},isInterface:function(){return this._type==="itype"},isInstance:function(obj){var tp=_2.getType(this.getName());IF(tp)return _2.isInstanceOf(obj,tp);return false},toString:function(){return(this.isInterface()?"interface ":"class ")+this.getName()},getClass:_getClazz,_rtti:null,_metaloaded:false,getMeta:function(){IF(this._rtti==null){var err="Metadata Not Available Exception";IF(this._metaloaded)throw err;ELSE{var _46=_2.meta.GET(this._name);IF(_46){this._rtti=new _2.TypeMetadata(_46());
  23. this._metaloaded=true}ELSE throw err;}}return this._rtti},getConstructors:function(){return this.getMeta().getConstructors()},getFields:function(){return this.getMeta().getFields()},getDeclaredFields:function(){return this.getMeta().getDeclaredFields()},getMethods:function(){return this.getMeta().getMethods()},getDeclaredMethods:function(){return this.getMeta().getDeclaredMethods()},getModifiers:function(){return this.getMeta().getModifiers()},getAnnotations:function(){return this.getMeta().getAnnotations()},
  24. getInterfaces:function(){return this.getMeta().getInterfaces()},getVjoType:function(){return _2.getType(this.getName())}});_extend(_2.Class,{create:function(nm,typ){IF(!nm)return new _2.Class(nm,typ?typ:"ctype");var clz=_6[nm];IF(!clz)_6[nm]=clz=new _2.Class(nm,typ?typ:"ctype");return clz}});_extend(_2.Class,{forName:function(clz){try{var o=eval(clz);IF(o&&o.clazz)return o.clazz}catch(e){}throw"Type not found for '"+clz+"'";},isInstance:function(o){return _2.isInstanceOf(o,_2.Class)},clazz:_2.Class.create("vjo.Class")});
  25. _2.Object.clazz=_2.Class.create("vjo.Object");_2.obj=function(_4d,_4e){IF(!_4d)throw"Invalid type name";IF(!_4e)return null;var _4f;var err="Invalid type '"+_4d+"'.";try{_4f=eval(_4d)}catch(e){throw err;}IF(!_4f)return err;var o=new _4f;for(var i in _4e)o[i]=_4e[i];return o};var _53=function(){function _addType(clz){var _5c=_54[clz];IF(!_5c){_5c=[];_54[clz]=_5c}return _5c}function _execInners(clz){var ins=_58[clz];IF(ins){var len=ins.length;for(var i=0;i<len;i++){var _61=ins[i];IF(_61)_61.complete()}}_58[clz]=
  26. null}function _processNeeds(clz){var n=_56[clz];IF(n){for(;n.length>0;)n.pop()();_56[clz]=null}}function _pushDep(clz,_65,_66){var arr=_54[clz];_65.push(clz);_66[clz]=true;IF(!arr||arr.length===0)return;var len=arr.length;for(var i=0;i<len;i++){var key=arr[i];IF(!_66[key])_pushDep(key,_65,_66)}return}function _isCompleted(clz){return _TypeMeta._completed[clz]}function _canCompleteInternal(clz,_6c,_6d){IF(_isCompleted(_6c))return true;var arr=_54[_6c];IF(!arr||arr.length===0)return true;var len=arr.length;
  27. for(var i=0;i<len;i++){var key=arr[i];IF(!_2.loader.async){IF(key===clz)return false}ELSE IF(!_2.getType(key)){_addIncomplete(clz,key);return false}IF(!_6d[key]){_6d[key]=true;IF(!_canCompleteInternal(clz,key,_6d))return false}}return true}function _addIncomplete(clz,dep){IF(!_5a[dep])_5a[dep]=[];_5a[dep][_5a[dep].length]=clz}function _canComplete(clz){var aD=_54[clz];IF(aD){var len=aD.length;IF(_2.loader.async)return _canCompleteInternal(clz,clz,{});ELSE{var stk=_57;var len2=stk.length;for(var i=
  28. 0;i<len;i++){var dep=aD[i];for(var j=0;j<len2;j++)IF(stk[j]===dep)return false}IF(len2>0)return _canCompleteInternal(clz,clz,{})}}return true}function _complete(_7a){_processNeeds(_7a);IF(_55[_7a]){_55[_7a].complete();_55[_7a]=null}_execInners(_7a);_59[_7a]=true}var _54={};var _55={};var _56={};var _57=[];var _58={};var _59={};var _5a=[];return{addDep:function(clz,dep){IF(!clz)return;IF(!_TypeMeta._completed[dep]){var aD=_addType(clz);aD[aD.length]=dep}IF(!_2.loader.async){var stk=_57;IF(stk.length==
  29. 0)stk.push(clz);IF(stk[stk.length-1]===clz)stk.push(dep)}},popDep:function(clz,dep){IF(_2.loader.async)return;var stk=_57;IF(stk[stk.length-1]===dep)stk.pop()},addInner:function(clz,fn){IF(!_58[clz])_58[clz]=[];var ins=_58[clz];ins.push(fn)},deferNeed:function(clz,fn){var n=_56;IF(!n[clz])n[clz]=[];n[clz].push(fn)},processNeeds:function(clz){_processNeeds(clz)},register:function(clz,fn){_55[clz]=fn},load:function(clz){IF(!clz||_59[clz])return false;var _8c=_54[clz];IF(!_2.loader.async){var stk=_57;
  30. var len=stk.length;IF(len>0&&stk[len-1]===clz)stk.pop()}var isC=false;IF(_8c&&_canComplete(clz)){stk=[];for(_pushDep(clz,stk,{});stk.length>0;){var _8f=stk.pop();IF(_isCompleted(_8f))continue;_complete(_8f)}isC=true}IF(!_8c||_8c.length==0)_complete(clz);var _90=_5a[clz];IF(!isC&&_90){var i=0;for(len=_90.length;i<len;i++){var itm=_90[i];IF(itm==null)continue;IF(_canComplete(itm)){_complete(itm);_90[i]=null}}}return true}}}();var _93={create:function(clz,isI){isI=isI||false;IF(!_isValidClz(clz))throw"Invalid type name '"+
  31. clz+"'";var _96=function(){var _97=_TypeMeta.getById(_96.vj$._meta._metaId);var bConstruct=!_96.__donotconstruct;IF(_7&&_97._canDelayInit){_97._canDelayInit=false;_97.endType()}IF(_93.shouldAutoConstruct(this,_96,_97)){var b=_93.createNoConstruct(_96);var rv=_93.construct(b,arguments);return rv||b}this.constructor=_96;IF(_97&&!_97._completed){_97.complete();_forEach(_96.prototype,function(val,key,_9b){this[key]=val},this)}this.vj$=_96.vj$;var t=this.vj$._vjType;IF(bConstruct&&(t=="itype"||t=="atype"||
  32. t=="mtype"))throw t+" "+this.vj$._class+" cannot be instantiated";_93.processInners(this,_96.vj$,_96.clazz);IF(bConstruct){var val$$0=_93.construct(this,arguments);IF(val$$0)return val$$0}return null};_96._name="base";_96.vj$={_class:clz,_meta:{}};_96.isInstance=this.isInstanceFunc;return _96},isInstanceFunc:function(o){return _2.isInstanceOf(o,this)},shouldAutoConstruct:function(ctx,_a0,_a1){return!(ctx instanceof _a0)&&!_a0.__donotconstruct&&_a1&&_a1._options.autoConstruct},createNoConstruct:function(_a2){_a2.__donotconstruct=
  33. true;var rv=new _a2;delete _a2.__donotconstruct;return rv},needs:function(clz,_a5){IF(!clz||this.vj$._meta._isInner)return this;var _a6=null;var useAlias=false;var len=1;IF(typeof clz=="string"){_a6=[clz];useAlias=_a5?true:false}ELSE IF(clz instanceof Array){_a6=clz;len=_a6.length}ELSE return this;for(var i=0;i<len;i++){var cl=_a6[i];var _aa=_4[cl];var idx=cl.lastIndexOf(".");var cn=idx>-1?cl.substring(idx+1):cl;var tp=_aa?_aa.pkg[cn]:null;_53.addDep(this.vj$._class,cl);IF(!tp)tp=_2.getType(cl);_53.popDep(this.vj$._class,
  34. cl);_93.addToNameSpace(this,tp,cl,cn,_a5,useAlias)}return this},needslib:function(){},addToNameSpace:function(ctx$$0,_ac,_ad,_ae,_af,_b0){IF(_af==="")return;IF(_ac){IF(this._vjType=="mtype")return;IF(_ac.vj$&&_ac.vj$._vjType=="mtype")return;var nm=_b0?_af:_ae;var err=false;IF(ctx$$0.vj$[nm]&&ctx$$0.vj$[nm]!==_ac)IF(_bOldSupport)err=true;ELSE throw"Name collision with type '"+nm+"' in need list.";IF(!err)ctx$$0.vj$[nm]=_ac}ELSE _53.deferNeed(ctx$$0.vj$._class,_2.curry(function(_b2,_b3,ctx){var tp=
  35. _2.getType(_b3);IF(!tp||tp.vj$._vjType=="mtype")return;IF(ctx.vj$[_b2]&&ctx.vj$[_b2]!==tp)throw"Name collision with "+nm+"in need list.";ctx.vj$[_b2]=tp},_b0?_af:_ae,_ad,ctx$$0))},props:function(obj,_b7){for(var key in obj){IF(!_isValidProp(key))continue;var o=obj[key];this[key]=o;IF(!o)continue;IF(o.vj$){IF(o.vj$._meta._isInner&&_93.addInner(this,o,"s_inners",key)){IF(this.vj$[key])throw"'"+key+"' in type '"+this.vj$._class+"' conflicts with needed type name";var _v=_createVjNS(this.vj$,key,o);o.vj$=
  36. _v;IF(!this.vj$._meta._isInner){var _bb=_TypeMeta.GET(o);IF(_bb&&!_bb._name){_53.addInner(this.vj$._class,_bb);var rt=this.vj$._class;_93.updateInners(rt,rt+"."+key,o,true)}}}}ELSE IF(_isFn(o)&&!o._name)o._name=key}IF(obj.toString!=Object.prototype.toString)this.toString=obj.toString;return this},protosHandler:function(fn,_be){return function(){var _bf=this.base;var error=false;var rv;var out=this.vj$.outer;_93.setBase(this,_be);try{rv=_93.execRealFn(fn,arguments,this,_be,out)}catch(e){error=e}this.base=
  37. _bf;IF(error)throw error;return rv}},protos:function(obj,_c1){IF(!obj)return;for(var key in obj){IF(key==="base")continue;var val=obj[key];IF(!val){this.prototype[key]=val;continue}var _c4=this.prototype[key];var isType=_isVjoType(val);IF(_c4&&_93.isValidProto(key,val,_c4)&&!isType)this.prototype[key]=_93.protosHandler(val,this);ELSE{IF(isType&&val.vj$._meta._isInner&&!this.vj$._meta._isInner){var _c5=_TypeMeta.getById(val.vj$._meta._metaId);IF(_c5&&!_c5._name){_53.addInner(this.vj$._class,_c5);var rt=
  38. this.vj$._class;_93.updateInners(rt,rt+"."+key,val,false)}}this.prototype[key]=val}IF(isType){IF(val.vj$._meta._isInner&&_93.addInner(this,val,"_inners",key))IF(this.vj$[key])throw"'"+key+"' in type '"+this.vj$._class+"' conflicts with needed type name";}ELSE IF(_isFn(val)&&!val._name)val._name=key}IF(obj.toString!=Object.prototype.toString)this.prototype.toString=obj.toString;return this},isValidProto:function(key,val,_c9){return _isFn(_c9)&&key.indexOf("constructs")!=0&&(key.indexOf("_ovld")===
  39. -1||key.indexOf("_ovld")!=key.length-5)&&!_isVjoType(_c9)&&_isFn(val)},satisfies:function(_ca,_cb){var _cc=[];IF(_ca instanceof Array)_cc=_ca;ELSE _cc=[_ca];_forEach(_cc,function(val,key,obj){var cl=_getTypeName(val);var _ca;IF(_isVjoType(cl)){_ca=cl;var clz=_ca.vj$._class||"";var idx=clz.lastIndexOf(".");var cn=idx>-1?clz.substring(idx+1):clz;IF(cn)this.vj$[cn]=_ca}var _d2=_ca?_ca:_2.getType(cl);IF(_d2){IF(!_cb)this.clazz._satisfied.push(_d2);for(var i in _d2){val=_d2[i];IF(_isValidProp(i)&&!this[i])this[i]=
  40. val}}},this);return this},inherits:function(_d4,isB){IF(_d4==="vjo.Object"||_d4===_2.Object){IF(isB)_93.createInherits(this,_2.Object);return this}_d4=_getTypeName(_d4);IF(!isB&&!_isValidInh(_d4))throw"Cannot inherit from '"+_d4+"'";var _d6;IF(_isVjoType(_d4)){_d6=_d4;var clz=_d6.vj$._class||"";var idx=clz.lastIndexOf(".");var cn=idx>-1?clz.substring(idx+1):clz;IF(cn)this.vj$[cn]=_d6}ELSE _d6=this.vj$[_d4]||_2.getType(_d4);IF(_isVjoType(_d6)){var _d8=_TypeMeta.getById(_d6.vj$._meta._metaId);IF(_d8&&
  41. !_d8._completed)_d8.complete();_93.createInherits(this,_d6)}return this},setBase:function(ctx,_da){ctx.base=_da.prototype._getBase?_da.prototype._getBase():null;IF(ctx.base)ctx.base._parent=ctx},createInherits:function(_db,_dc){var cls=this.createNoConstruct(_dc);cls.constructs=null;cls.constructor=_db;IF(_dc===_2.Object){cls.base=this.emptyFunc;_db.prototype=cls;cls._getBase=this.selfFunc;return}var _de=_dc.prototype;var _df={};_df.vj$=_dc.vj$;IF(_de._getBase&&_de._getBase()._constructs)_df._constructs=
  42. true;cls.base=function(){var _e0=this.base;var _de=_dc.prototype;var gb=_de._getBase;var c=_de.constructs;IF(_de.base)this.base=_de.base;var _e1=c?c.toString():"";var b=_e1.indexOf("this.base(")===-1&&_e1.indexOf("this.constructs")===-1;IF(gb&&gb()._constructs&&b)this.base();IF(_de.constructs){var _e2=this.vj$._meta._isInner;try{_93.execRealFn(_de.constructs,arguments,this,_dc,_e2)}catch(e){throw e;}}this.base=_e0};cls._getBase=function(){return _df};var vOP=_2.Object.prototype;for(var i in _de){IF(i===
  43. "toString")continue;var pt=_de[i];var bFn=_isFn(pt);IF(i==="constructs"&&bFn){IF(pt.length===0)_df._constructs=true}ELSE IF(_isValidInst(i))IF(bFn&&!pt.vj$&&vOP[i]!==pt&&!(pt instanceof RegExp)){var ref=this.createBaseRef(_dc,pt,_db);_df[i]=ref;IF(!pt.__isChained){cls[i]=this.hasBaseCall(pt,i)?ref:this.createChainedMethod(_dc,pt);cls[i].__isChained=true}}ELSE{IF(_isVjoType(pt)&&pt.vj$._meta._isInner){var _e7=_db.vj$._meta;IF(!_e7._inners)_e7._inners={};_e7._inners[i]=pt}cls[i]=pt}}IF(_df.toString!=
  44. _2.Object.prototype.toString)_df.toString=this.createBaseRef(_dc,_de.toString,_db);_db.prototype=cls},createChainedMethod:function(_e8,fn){return function(){try{IF(this.vj$._vjType==="etype")return _93.execRealFn(fn,arguments,this,_e8,true);ELSE return _93.execRealFn(fn,arguments,this,_e8)}catch(e){throw e;}}},emptyFunc:function(){},selfFunc:function(){return this},hasBaseCall:function(fn,key){var _ec=fn.toString();return _ec.indexOf("this.base."+key+"(")!=-1},createBaseRef:function(_ed,fn,der){return function(){var scp=
  45. this._parent?this._parent:this;var rv;var error=false;var cbase=scp.base;_93.setBase(scp,_ed);try{rv=_93.execRealFn(fn,arguments,scp,_ed)}catch(e){error=e}scp.base=cbase;IF(error)throw error;return rv}},updateInners:function(_f1,_f2,_f3,_f4){IF(_f3&&_f3.vj$){var vj=_f3.vj$;var clz=_f3.clazz;vj._class=_f2;var idx=_f2.lastIndexOf(".");var snm=_f2.substring(idx+1);vj[snm]=_f3;IF(clz&&_f1)IF(_f2.indexOf(_f1)==0){for(var tmp=_f2.replace(_f1,"");tmp.indexOf(".")>-1;)tmp=tmp.replace(".","$");clz._name=_f1+
  46. tmp}ELSE clz._name=_f1+"$"+snm;_createPkg(_f2,true).pkg[snm]=_f3;var ins=_f4?vj._meta.s_inners:vj._meta._inners;IF(ins)_forEach(ins,function(val$$0,key$$0){_forEach(vj,function(val,key){IF(!this[key]&&val&&val.vj$)this[key]=val},val$$0.vj$);var m=_TypeMeta.getById(val$$0.vj$._meta._metaId);IF(val$$0.vj$&&m)_53.addInner(_f1,m);_93.updateInners(_f1,_f2+"."+key$$0,val$$0,_f4)})}},addInner:function(clz,_ff,_100,key){IF(!clz||!_ff||!key)return false;var vj=_ff.vj$;IF(!vj)return false;IF(_isVjoType(_ff)&&
  47. vj._meta._isInner){var cvj=clz.vj$;IF(!vj._class&&cvj._class){var cn=vj._class=cvj._class+"."+key;IF(_ff.clazz){_ff.clazz._name=cn;_6[cn]=_ff.clazz}_createPkg(cn,true).pkg[key]=_ff}IF(_100){IF(!cvj._meta[_100])cvj._meta[_100]={};cvj._meta[_100][key]=_ff}return true}return false},execRealFn:function(fn,args,ctx,base,_109){var _10a=false;var rv;var t={vj$:ctx.vj$};IF(!_109)_fixScope(ctx.base&&ctx.base.vj$&&base.vj$._class==ctx.base.vj$._class?ctx.base:base,ctx);try{rv=fn.apply(ctx,args)}catch(e){_10a=
  48. e}IF(!_109)_fixScope(t,ctx);IF(_10a)throw _10a;return rv},createClazz:function(typ){var old=typ.clazz;var nm=typ.vj$._class;IF(old&&old._name)nm=old._name;typ.clazz=_2.Class.create(nm,typ.vj$._vjType);IF(old)typ.clazz._satisfied=old._satisfied;IF(typ.prototype)typ.prototype.getClass=_getClazz;ELSE typ.getClass=_getClazz;typ.vj$.type=typ},canCallBase:function(obj){var str=obj.constructs.toString();return obj.base&&str.indexOf("this.base(")===-1&&str.indexOf("this.constructs")===-1},tmpFunc:function(){},
  49. construct:function(ctx,args){var c=ctx.constructs;var fn;var rv;var _114=false;IF(ctx.base&&ctx._getBase){fn=function(){};fn.prototype=ctx._getBase();_114=fn.prototype._constructs||false}IF(_114&&(!c||this.canCallBase(ctx)))ctx.base();IF(c)rv=c.apply(ctx,args);IF(fn){ctx.base=new fn;ctx.base._parent=ctx}IF(rv)return rv},processInners:function(_115,_116,_117){var _118=_116?_116._meta._inners:null;IF(!_116||!_118||_118.length==0||!_115)return;for(var k in _118){_115[k]=_2.curry(function(t,type,nm){var cn=
  50. t.vj$._class+"."+nm;var m=_TypeMeta.getById(type.vj$._meta._metaId);IF(m)m.complete();var tp=_93.createNoConstruct(type);var _v=_createVjNS(_116,nm,type);tp.vj$=_v;tp.vj$.outer=t;_93.processInners(tp,_v,type.clazz);type.vj$._class=tp.vj$._class=cn;var s=type.prototype;IF(type.clazz&&!type.clazz._name){type.clazz._name=tp.vj$._class;_6[cn]=type.clazz}ELSE _93.createClazz(type);_93.construct(tp,Array.prototype.slice.call(arguments,3));IF(tp.vj$.outer&&tp.base.vj$){_v=_createVjNS(tp.vj$);_extend(_v,
  51. tp.base.vj$);tp.base.vj$=_v}return tp},_115,_118[k],k);_115[k]._outer=_115;_115[k].vj$=_118[k].vj$}}};var _122=typeof console!="undefined";_extend(_2,{sysout:{PRINT:function(){IF(_122)console.info.apply(this,arguments)},println:function(){IF(_122)console.info.apply(this,arguments)},printStackTrace:function(){}},syserr:{PRINT:function(){IF(_122)console.warn.apply(this,arguments)},println:function(){IF(_122)console.warn.apply(this,arguments)},printStackTrace:function(){}},jsunit:{assertEquals:function(){},
  52. assertTrue:function(){},assertFalse:function(){},assertNotNull:function(){}}});_TypeMeta.prototype={init:function(cfg){this._cfg={satisfiesFn:_93.satisfies,inheritsFn:_93.inherits,protosFn:_93.protos,postDefFn:_93.tmpFunc,typeDef:null,baseType:"vjo.Object"};IF(cfg)_extend(this._cfg,cfg)},setup:function(){var id=this._name;var t=this._type=this._cfg.typeDef||_93.create(id,"itype"===this._kind);t.vj$._vjType=this._kind||"ctype";this._canDelayInit=true;IF(this._isInner){id=_TypeMeta.id();t.vj$._meta._isInner=
  53. true}ELSE{var pObj=_createPkg(id);IF(!pObj.pkg[pObj.className])pObj.pkg[pObj.className]=this._type;t.vj$[pObj.className]=t;_53.register(id,this);this._isDup=_TypeMeta.getById(id)!=null}IF(!this._isDup)_TypeMeta.PUT(this,id);t._inherits=null;_93.createClazz(t);t.vj$._meta._metaId=id},needs:function(need,_12b){_93.needs.apply(this._type,arguments);return this},singleton:function(){return this},options:function(opts){IF(opts)for(var k in opts)this._options[k]=opts[k];return this},makeFinal:function(){return this},
  54. satisfies:function(type){var clzs=[];IF(type instanceof Array)clzs=type;ELSE clzs=[type];_forEach(clzs,function(val,key,obj){var _133=_getTypeName(val);this.needs(_133);_93.needs.call(this._type,_133);this._satisfies.push(val)},this);return this},props:function(_134){this._canDelayInit=false;IF(this._props)throw"multiple props blocks are not allowed";this._props=_134;_93.props.apply(this._type,arguments);return this},protos:function(_135){IF(this._protos)throw"multiple protos blocks are not allowed";
  55. this._protos=_135;return this},inherits:function(type){var clzs=[];IF(type instanceof Array)clzs=type;ELSE clzs=[type];_forEach(clzs,function(val,key,obj){var _13b=_getTypeName(val);this.needs(_13b);this._inherits.push(val)},this);return this},mixin:function(type){var clzs=[];IF(type instanceof Array)clzs=type;ELSE clzs=[type];_forEach(clzs,function(val,key,obj){var _141=_getTypeName(val);this.needs(_141);this._mixins.push(val)},this);return this},inits:function(fn){this._canDelayInit=false;this._inits=
  56. fn;return this},globals:function(obj){this._canDelayInit=false;this._globals=obj;return this},validateAndMerge:function(_144,_145){var p=_145?_144[_145]:_144;return function(val,key,obj){IF(p[key])throw"collision when mixing in '"+key+"' into "+this._name;ELSE p[key]=val}},mergeMixins:function(_14a){var mxns=this._mixins;for(var i=0;i<mxns.length;i++){var m=_2.getType(mxns[i]);IF(!m||!m.vj$||m.vj$._vjType!="mtype")throw mxns[i]+"is not a valid mtype.";var exp=m._expects;sats=m._satisfiers;IF(!this._protos)this._protos=
  57. {};IF(!this._props)this._props={};_copyNS(m.vj$,this._type.vj$);var nm=m.vj$._class;var idx=nm.lastIndexOf(".");var clz=idx!=-1?nm.substring(idx+1):nm;IF(!this._type.vj$[clz])this._type.vj$[clz]=this._type;ELSE throw clz+" is already defined in the current namespace";_forEach(m._protos,this.validateAndMerge(this,"_protos"),this);_forEach(m._props,this.validateAndMerge(_14a,"_props"),this);for(var j=0;j<sats.length;j++)this._satisfies.push(sats[i]);IF(exp)this._expects.push(exp)}},completeSatisfies:function(){IF(this._satisfies.length>
  58. 0)this._cfg.satisfiesFn.call(this._type,this._satisfies);IF(this._expects.length>0)this._cfg.satisfiesFn.call(this._type,this._expects,true)},completeInherits:function(){var ilen=this._inherits.length;IF(ilen>0){IF(this._kind!="itype"&&ilen>1)throw"type can only inherit from one type";for(var i=0;i<ilen;i++)this._cfg.inheritsFn.call(this._type,this._inherits[i])}ELSE IF(this._kind!="itype")this._cfg.inheritsFn.call(this._type,this._cfg.baseType,true)},completeDef:function(){IF(this._protos)this._cfg.protosFn.call(this._type,
  59. this._protos);this._cfg.postDefFn.call(this);IF(this._globals&&!this._isDup)this.__initGbs(this._globals);IF(this._inits&&!this._isDup)this._inits.call(this._type)},__initGbs:function(obj){_forEach(obj,function(val,key){IF(val!=_2.METHODDEF&&val!=_2.PROPDEF){IF(this[key]&&this[key]!==val)throw key+" is already defined in the current namespace";this[key]=val}},_3)},complete:function(){IF(this._completed)return this;this._completed=true;_TypeMeta._completed[this._name]=true;_updateInnerEtypes(this._type.vj$);
  60. IF(this._mixins.length>0){var p={_props:{}};this.mergeMixins(p);_93.props.call(this._type,p._props)}this.completeSatisfies();this.completeInherits();this.completeDef();return this},typesAvail:function(list){for(var i=0;i<list.length;i++)IF(!_isVjoType(list[i]))return false;return true},canComplete:function(){var b=this._inits==null&&this.typesAvail(this._inherits);IF(b)b=this.typesAvail(this._satisfies);IF(b)b=this.typesAvail(this._mixins);return b},endType:function(){IF(!this._isInner){IF(_7&&this._canDelayInit)return this._type;
  61. _53.load(this._name);IF(_2.validateType)_2.validateType(this._type)}ELSE IF(this.canComplete())this.complete();return this._type}};_extend(_TypeMeta,{_count:0,_pre:"tmp",_reg:{},_completed:{},id:function(){return this._pre+this._count++},PUT:function(meta,id){var nm=id?id:this._pre+this._count++;this._reg[nm]=meta},GET:function(type){var _15f;IF(_isVjoType(type))return this._reg[type.vj$._meta._metaId];ELSE IF(_15f=_2.getType(type))return this._reg[_15f.vj$._meta._metaId];ELSE return this._reg[type]},
  62. getById:function(id){return this._reg[id]}});_2.ctype=function(clz){clz=_getTypeName(clz);var t=new _TypeMeta(clz);return t};_2.type=function(clz$$0){clz$$0=_getTypeName(clz$$0);var t=new _TypeMeta(clz$$0,"type");t.inits=function(fn){IF(fn&&!this._isDup)fn.call(this._type);return this};t.props=function(_166){_93.props.apply(this._type,arguments);return this};t.protos=function(_167){_93.protos.apply(this._type,arguments);return this};t.inherits=function(clz){_93.inherits.apply(this._type,arguments);
  63. return this};t.satisfies=function(clz){_93.satisfies.apply(this._type,arguments);return this};return t};_2.itype=function(clz){clz=_getTypeName(clz);var t=new _TypeMeta(clz,"itype",{inheritsFn:function(_16c){var type=this.vj$[_16c]?this.vj$[_16c]:this.vj$.b&&this.vj$.b[_16c]?this.vj$.b[_16c]:_2.getType(_16c);IF(type)for(var i in type){var val=type[i];IF(_isValidProp(i)&&!this[i])this[i]=val}return this}});t._type.isInstance=function(obj){return _2.isInstanceOf(obj,this)};return t};_2.atype=_2.ctype;
  64. _2.mtype=function(clz){clz=_getTypeName(clz);var base=new _MType(clz);IF(!clz||_isInnerClass(clz))base.vj$._meta._isInner=true;IF(!clz)return base;var pObj=_createPkg(clz);return pObj.pkg[pObj.className]?base:pObj.pkg[pObj.className]=base};_2.etype=function(clz){clz=_getTypeName(clz);_createEnum();var eDef=function(args){this.vj$=eDef.vj$;IF(args!=false){IF(!this.constructs)throw"'"+this.vj$._class+"' cannot be instantiated";var rv=this.constructs.apply(this,args)}};eDef.vj$={_class:clz,_vjType:"etype",
  65. _meta:{}};eDef.isInstance=function(o){return _2.isInstanceOf(o,this)};var t$$0=new _TypeMeta(clz,"etype",{typeDef:eDef,baseType:"vjo.Enum",postDefFn:function(){this._type.prototype.toString=_2.Enum.prototype.name;IF(this._eVals)this._type.values.call(this._type,this._eVals)}});_extend(t$$0,{inherits:function(){throw"Invalid type definition. etype cannot be inheritted from another type";},values:function(vals){this._eVals=vals;return this}});var en=t$$0._type;en._enums=[];en.from=_2.Enum.from;en._nativeValueOf=
  66. en.valueOf;en.valueOf=_2.Enum.from;en.values=function(vals){IF(arguments.length==0)IF(this._enums.slice)return this._enums.slice();ELSE{var a=[];for(var i=0;i<this._enums.length;i++)IF(this._enums[i])a[i]=this._enums[i];return a}ELSE{var ord=0;IF(typeof vals=="string"&&vals.length>0){for(;vals.indexOf(" ")>-1;)vals=vals.replace(" ","");IF(vals.indexOf(",")>0){a=vals.split(",");var t;IF(a[0]&&a[0].indexOf(":")>0)throw"Invalid labels for etype values: "+a[0];i=0;for(var l=a.length;i<l;i++){var eV=a[i];
  67. IF(i==0&&t&&t.length>0)eV=t[0];ELSE IF(a[i].indexOf(":")>-1)eV=a[i].split(":")[0];this._enums[this._enums.length]=new en(false);this._enums[this._enums.length-1]._name=eV}}ELSE{this._enums[0]=new en(false);this._enums[0]._name=vals}}ELSE for(var itm in vals){this._enums[this._enums.length]=new en(vals[itm]);this._enums[this._enums.length-1]._name=itm}i=0;for(l=this._enums.length;i<l;i++)IF(this._enums[i]){var nm=this._enums[i]._name;IF(this[nm])throw"Invalid prop member. Cannot use etype value as prop member.";
  68. this[nm]=this._enums[i];this[nm]._ord=ord++}}en.prototype.constructs=null;return this};return t$$0};_2.otype=function(clz){return{defs:function(defs){return this},endType:function(){}}};var _196={};var reservedProto={};var reservedMProp={};var reservedClz={};var reservedInh={};_forEach("props protos inherits prototype inits satisfies mixin _inherits _satisfiers singleton isInstance vj$".split(" "),function(val,key,obj){this[val]=true},_196);_forEach("constructs getClass _getBase base vj$".split(" "),
  69. function(val,key,obj){this[val]=true},reservedProto);_forEach("props protos _props _protos vj$ _expects expects _satisfiers satisfies endType".split(" "),function(val,key,obj){this[val]=true},reservedMProp);_forEach("vjo.Class vjo.Object".split(" "),function(val,key,obj){this[val]=true},reservedClz)}).apply(this);
  70. vjo.ctype("vjo.dsf.error.Error").protos({constructs:function(_1,_2,_3){this.message=_1;this.url=_2;this.lineNumber=_3;this.userAgent=navigator.userAgent}}).endType();
  71. vjo.ctype("vjo.dsf.error.ErrorHandlerManager").needs("vjo.dsf.error.Error").props({dsfErrors:[],handlers:[],add:function(_1,_2,_3){this.dsfErrors[this.dsfErrors.length]=new vjo.dsf.error.Error(_1,_2,_3);return true},convertErrorTo:function(_4){var _5=_4?"<br>":"\n";var _6=_4?"<html><title>":"";var _7=_4?"</title><body>":_5;var _8=_4?"</body></html>":"";var _9=_4?"<h2>":"";var _a=_4?"</h2>"+_5:_5;var _b=_4?"<b>":"";var _c=_4?"</b>":"";var _d=_6+"V4 JS Errors"+_7;_d+=_9+"Total number of errors = "+
  72. this.dsfErrors.length+_a;for(var i=0;i<this.dsfErrors.length;i++){_d+=_b+"Message: "+_c+this.dsfErrors[i].message;_d+=_5;_d+=_b+"URL :"+_c+this.dsfErrors[i].url;_d+=_5;_d+=_b+"Line Number :"+_c+this.dsfErrors[i].lineNumber;_d+=_5;_d+=_b+"User Agent :"+_c+this.dsfErrors[i].userAgent;_d+=_5;_d+=_5}_d+=_8;return _d},toHTML:function(){return this.convertErrorTo(true)},toText:function(){return this.convertErrorTo(false)},show:function(){var _f=window.open("","V4JSErrors","height=500,width=500,menubar=no,status=no,scrollbars=yes");
  73. IF(window.focus)_f.focus();_f.document.WRITE(this.toHTML());_f.document.close()},register:function(_10){IF(!_10)return this;IF(typeof _10!="object")return this;this.handlers[this.handlers.length]=_10;return _10},clear:function(){this.handlers.length=0},process:function(_11,_12,_13){for(var i=0;i<this.handlers.length;i++)this.handlers[i].handle(_11,_12,_13)},enableOnError:function(_15,_16){IF(typeof _15=="undefined")_15=true;window.onerror=function(_17,url,_19){var _1a=_16?true:false;_17=_1a?vjo.dsf.error.ErrorHandlerManager.stackTrace():
  74. _17;vjo.dsf.error.ErrorHandlerManager.process(_17,url,_19);return _15}},stackTrace:function(){var msg;var err=this.errorObj();IF(err.stack)msg=this.stackTraceByError(err);ELSE msg=this.stackTraceByCallee(arguments.callee);return msg},errorObj:function(){try{var err=$undefined$<<1}catch(e){return e}},stackTraceByError:function(e){var _1f=e.stack.split("\n");_1f[0]=_1f[1]="";return _1f.join().substring(2)},stackTraceByCallee:function(_20){var _21="?";var fnRE=/function\s*([\w\-$]+)?\s*\(/i;var stack=
  75. [];var j=0;var fn;var args;var _22=10;for(_20=_20.caller;_20&&stack.length<_22;){fn=fnRE.test(_20.toString())?RegExp.$1||_21:_21;IF(fn==_21&&_20._name)fn=_20._name;args=Array.prototype.slice.call(_20["arguments"]);stack[j++]=fn+"("+this.argumentsAsString(args)+")";_20=_20.caller}return stack},argumentsAsString:function(_23){for(var i=0;i<_23.length;++i){var arg=_23[i];IF(arg===undefined)_23[i]="undefined";ELSE IF(arg===null)_23[i]="null";ELSE IF(arg.constructor)IF(arg.constructor===Array)IF(arg.length<
  76. 3)_23[i]="["+this.argumentsAsString(arg)+"]";ELSE _23[i]="["+this.argumentsAsString(Array.prototype.slice.call(arg,0,1))+"..."+this.argumentsAsString(Array.prototype.slice.call(arg,-1))+"]";ELSE IF(arg.constructor===Object)_23[i]="#object";ELSE IF(arg.constructor===Function)_23[i]="#function";ELSE IF(arg.constructor===String)_23[i]='"'+arg+'"'}return _23.join(",")}}).endType();
  77. vjo.ctype("vjo.dsf.error.DefaultErrorHandler").needs("vjo.dsf.error.ErrorHandlerManager","M").protos({constructs:function(){},handle:function(_1,_2,_3){this.vj$.M.add(_1,_2,_3)}}).endType();
  78. vjo.ctype("vjo.dsf.Event").protos({src:null,eventType:null,nativeEvent:null,constructs:function(_1,_2,_3){this.src=_1;this.eventType=_2;this.nativeEvent=_3}}).endType();
  79. vjo.ctype("vjo.dsf.Message").protos({objType:"dsf_Message",trspType:"",svcId:"",request:null,response:null,status:null,svcConfig:null,stok:"",pId:"",constructs:function(_1,_2){var a=arguments;var l=a.length;IF(l==1)this.svcId=_1;ELSE IF(l==2){this.svcId=_1+"."+_2;this.svcName=_1;this.opName=_2}this.rawRequest=this.trace="";this.clientContext={};this.trspType="InProc";this.returnData=true;this.v="0";this.headers=null}}).endType();
  80. vjo.itype("vjo.dsf.ITransport").protos({handleRequest:function(_1,_2){}}).endType();
  81. vjo.ctype("vjo.dsf.ServiceResponse").protos({objType:undefined,errors:undefined,data:undefined,constructs:function(){this.errors=[]},addError:function(_1){IF(this.errors)this.errors[this.errors.length]=_1}}).endType();
  82. vjo.ctype("vjo.dsf.InProcReqtHdl").satisfies("vjo.dsf.ITransport").needs("vjo.dsf.ServiceResponse").needs("vjo.dsf.Message").protos({constructs:function(){this.svcHdls={}},registerSvcHdl:function(_1,_2){this.svcHdls[_1]=_2},getSvcHdl:function(_3){return this.svcHdls[_3]},handleRequest:function(_4,_5){IF(!_4.response)_4.response=new vjo.dsf.ServiceResponse;var _6=this.svcHdls[_4.svcId];IF(_6)_4.response.data=_6.invoke(_4);IF(typeof _4.status=="undefined"||_4.status==null)_4.status=1}}).endType();
  83. vjo.ctype("vjo.dsf.Error").protos({id:undefined,message:undefined,constructs:function(_1,_2){this.id=_1;this.message=_2}}).endType();
  84. vjo.ctype("vjo.dsf.SvcErr").needs("vjo.dsf.Error").needs("vjo.dsf.Message").props({InvRsp:"InvalidRsp",InvRqBnd:"RqInvalidBnd",InvRspBnd:"RspInvalidBnd",InvRq:"InvalidRequest",TO:"TimedOut",RqUnk:"Client.Request.UnknownError",SvcRq:"SYS.SVC_REQUEST_ERROR",SvcRsp:"SYS.SVC_RESPONSE_ERROR",GlbRq:"SYS.GLOBAL_REQUEST_ERROR",GlbRsp:"SYS.GLOB_RESPONSE_ERROR",TrnRq:"SYS.TRANS_REQUEST_ERROR",TrnRsp:"SYS.TRANS_RESPONSE_ERROR",Prs:"SYS.JSON_PARSE_ERROR",SvcPrc:"SYS.DARWIN_SERVICE_PROTOCOL_ERROR",err:function(_1,
  85. _2,_3){_1.response.addError(new vjo.dsf.Error(_2,_3))}}).endType();
  86. vjo.ctype("vjo.dsf.ServiceRegistry").needs("vjo.dsf.ITransport").props({t:[],b:[],getBinding:function(_1){return this.b[_1]},getTransport:function(_2){return this.t[_2]},registerBinding:function(_3,_4){IF(_3&&_4){this.b[_3]=_4;return true}return false},registerTransport:function(_5,_6){IF(_5&&_6)IF(vjo.isInstanceOf(_6,vjo.dsf.ITransport))IF(null==this.t[_5]){this.t[_5]=_6;return true}return false}}).endType();
  87. vjo.ctype("vjo.dsf.RemoteReqtHdl").satisfies("vjo.dsf.ITransport").needs(["vjo.dsf.SvcErr","vjo.dsf.ServiceRegistry","vjo.dsf.ServiceResponse","vjo.dsf.ServiceEngine"]).protos({handleRequest:function(_1,_2){_1.response=new vjo.dsf.ServiceResponse;IF(!_1.svcConfig){vjo.dsf.SvcErr.err(_1,vjo.dsf.SvcErr.InvRq,"message.svcConfig is undefined");return}var _3=vjo.dsf.ServiceRegistry.getBinding(_1.svcConfig.reqtMarshalling);IF(_3)_3.serialize(_1);ELSE vjo.dsf.SvcErr.err(_1,vjo.dsf.SvcErr.InvRqBnd,"reqtMarshalling="+
  88. _1.svcConfig.reqtMarshalling);this.invoke(_1)},invoke:function(_4){var tT=_4.svcConfig.respMarshalling=="JSCALLBACK"?"JSONP":"XHR";var t=vjo.dsf.ServiceRegistry.getTransport(tT);IF(t)t.handleRequest(_4,this.callback)},callback:function(_7){try{var _8=vjo.dsf.ServiceRegistry.getBinding(_7.svcConfig.respMarshalling);IF(_8)_8.deserialize(_7);ELSE vjo.dsf.SvcErr.err(_7,vjo.dsf.SvcErr.InvRspBnd,"marshalling="+_7.svcConfig.respMarshalling+":responseText="+_7.response)}catch(e){vjo.dsf.SvcErr.err(_7,vjo.dsf.SvcErr.InvRsp,
  89. "marshalling="+_7.svcConfig.respMarshalling+":responseText="+_7.response)}vjo.dsf.ServiceEngine.handleResponse(_7)}}).endType();
  90. vjo.ctype("vjo.dsf.SvcConfig").protos({objType:null,url:null,method:null,reqtMarshalling:null,respMarshalling:null,async:true,timeout:0,operationName:null,typeMappingClassName:null,constructs:function(_1,_2){this.objType="dsf_SvcConfig";this.svcType=null;this.url=_2;this.method=_1;this.reqtMarshalling="raw";this.respMarshalling="raw";this.async=true;this.timeout=0}}).endType();
  91. vjo.ctype("vjo.dsf.XDomainRequest").satisfies("vjo.dsf.ITransport").needs(["vjo.dsf.EventDispatcher","vjo.dsf.ServiceEngine"]).props({callbacks:[],sCallbackName:"callback",sPreId:"xdr_",sPreExtId:"xdr_ext_",iCount:0,bUseIframe:navigator.userAgent.indexOf("Firefox")>0,bodyLoaded:false,onLoad:function(){this.bodyLoaded=true},getReqDiv:function(){return document.getElementsByTagName(this.bodyLoaded?"body":"head")[0]},send:function(_1){IF(!document.createElement||!_1)return;var _2="";var eid="";var rdm=
  92. "_vrdm="+(new Date).getTime();IF(typeof _1=="string"){_2=_1;eid=this.sPreExtId+this.iCount++}ELSE IF(_1.objType=="dsf_Message"&&_1.svcConfig){var cb=this.createCallback(_1);eid=this.sPreId+this.callbacks[this.callbacks.length-1];_2=_1.svcConfig.url+"&callback="+cb}var _4=null;var doc;doc=document;var _5=this.createElement("script");_5.async=true;_5.defer=true;_5.id=eid;_5.type="text/javascript";var _6=true;IF(arguments.length>1)_6=arguments[1];IF(_6)_2=_2+(_2.indexOf("?")==-1?"?":"&")+rdm;_5.src=
  93. _2;var _7=this;window.setTimeout(function(){_7.getReqDiv().appendChild(_5)},0);return eid},createCallback:function(_8){var _9=this.callbacks.length;var name=this.sCallbackName+_9;var eid=this.sPreId+name;this.callbacks[_9]=name;this[name]=function(_a){vjo.dsf.XDomainRequest.loaded(eid);_8.response=_a;vjo.dsf.ServiceEngine.handleResponse(_8)};var _b="";var rv=(_b?_b+".":"")+"vjo.dsf.XDomainRequest."+name;return rv},loaded:function(_c){var e=document.getElementById(_c);IF(e!==null)e.parentNode.removeChild(e)},
  94. createElement:function(_e){return typeof createElementV4!="undefined"?createElementV4(_e):document.createElement(_e)}}).protos({handleRequest:function(_f,_10){vjo.dsf.XDomainRequest.send(_f)}}).inits(function(){vjo.dsf.EventDispatcher.addEventListener(window,"load",this.onLoad,this)}).endType();
  95. vjo.ctype("vjo.dsf.ServiceEngine").needs(["vjo.dsf.InProcReqtHdl","vjo.dsf.RemoteReqtHdl","vjo.dsf.ServiceResponse","vjo.dsf.SvcConfig","vjo.dsf.XDomainRequest","vjo.dsf.Error","vjo.dsf.ServiceRegistry","vjo.dsf.SvcErr"]).props({STATUS:{ABORT:-1,JUMP:1},E:null,svcReqtHdls:null,svcRespHdls:null,glbReqtHdls:null,glbRespHdls:null,trspReqtHdls:null,trspRespHdls:null,svcHdls:null,inProcHdl:null,remoteHdl:null,init:function(){this.svcReqtHdls=[];this.svcRespHdls=[];this.glbReqtHdls=[];this.glbRespHdls=
  96. [];this.trspReqtHdls=[];this.trspRespHdls=[];this.inProcHdl=new this.vj$.InProcReqtHdl;this.remoteHdl=new this.vj$.RemoteReqtHdl;this.E=this.vj$.SvcErr;vjo.dsf.ServiceRegistry.registerTransport("JSONP",new vjo.dsf.XDomainRequest)},handleRequest:function(m){var rt;var ab=this.STATUS.ABORT;IF(m.status!=ab&&typeof rt=="undefined")rt=this.processServiceRequestHandlers(m);IF(m.status!=ab&&typeof rt=="undefined")rt=this.processGlobalRequestHandlers(m);IF(m.status!=ab&&typeof rt=="undefined")this.processTransportHandlers(m);
  97. IF(m.status!=ab&&("Remote"!=m.trspType||typeof rt!="undefined"))this.handleResponse(m,rt);return m.returnData},processServiceRequestHandlers:function(_4){var rt;var _6=this.svcReqtHdls[_4.svcId];IF(_6)try{var i=0;for(var len=_6.length;i<len;i++){_4.trace=_4.trace+"--\>svcReqtHdl_"+i;_6[i].handleRequest(_4);IF(_4.status==this.STATUS.JUMP){rt="SVC";this.err(_4,this.E.SvcRq,this.E.SvcRq);break}}}catch(e){rt="SVC";this.err(_4,this.E.SvcRq,this.E.SvcRq)}return rt},processGlobalRequestHandlers:function(_8){var rt;
  98. IF(_8.status!=this.STATUS.JUMP)try{var i=0;for(var len=this.glbReqtHdls.length;i<len;i++){_8.trace=_8.trace+"--\>glbReqtHdl_"+i;this.glbReqtHdls[i].handleRequest(_8);IF(_8.status==this.STATUS.JUMP){rt="GLB";this.err(_8,this.E.GlbRq,this.E.GlbRq);break}}}catch(e){rt="GLB";this.err(_8,this.E.GlbRq,this.E.GlbRq)}return rt},processTransportHandlers:function(_b){IF(_b.status!=this.STATUS.JUMP&&_b.trspType){var _c=vjo.dsf.ServiceRegistry.getTransport(_b.trspType);IF(_c)_c.handleRequest(_b,this.handleResponse);
  99. ELSE{var _d=this.trspReqtHdls[_b.trspType];IF(_d)try{var i=0;for(var len=_d.length;i<len;i++){_b.trace=_b.trace+"--\>trspReqtHdl_"+i;_d[i].handleRequest(_b);IF(_b.status==this.STATUS.JUMP){this.err(_b,this.E.TrnRq,this.E.TrnRq);break}}}catch(e){this.err(_b,this.E.TrnRq,this.E.TrnRq)}IF(_b.status!=this.STATUS.JUMP&&_b.status!=vjo.dsf.ServiceEngine.STATUS.ABORT)IF(_b.trspType=="undefined")this.err(_b,this.E.TrnRq,this.E.TrnRq);ELSE IF("InProc"===_b.trspType)this.inProcHdl.handleRequest(_b);ELSE IF("Remote"===
  100. _b.trspType)this.remoteHdl.handleRequest(_b)}}},handleResponse:function(_f,_10){IF(_f.trspType!="undefined"&&_f.trspType&&typeof _10=="undefined")this.processTransResponseHandlers(_f);IF(_10!="SVC")this.processGlobalResponseHandlers(_f);this.processServiceResponseHandlers(_f)},processTransResponseHandlers:function(msg){var _12=this.trspRespHdls[msg.trspType];try{IF(_12)for(var i=_12.length-1;i>=0;i--){msg.trace=msg.trace+"--\>trspRespHdl_"+i;_12[i].handleResponse(msg)}}catch(e){this.err(msg,this.E.TrnRsp,
  101. this.E.TrnRsp)}},processGlobalResponseHandlers:function(msg){try{for(var i=this.glbRespHdls.length-1;i>=0;i--){msg.trace=msg.trace+"--\>glbRespHdl_"+i;this.glbRespHdls[i].handleResponse(msg)}}catch(e){this.err(msg,this.E.GlbRsp,this.E.GlbRsp)}},processServiceResponseHandlers:function(msg){var _17;IF(msg.clientContext)_17=msg.clientContext.svcApplier;try{IF(_17)IF(typeof _17.onResponse=="function")_17.onResponse(msg);ELSE IF(typeof _17=="function")_17(msg)}catch(e){this.err(msg,this.E.SvcRsp,this.E.SvcRsp)}var _18=
  102. this.svcRespHdls[msg.svcId];IF(_18)try{for(var i=_18.length-1;i>=0;i--){msg.trace=msg.trace+"--\>svcRespHdl_"+i;_18[i].handleResponse(msg)}}catch(e$$0){this.err(msg,this.E.SvcRsp,this.E.SvcRsp)}},createHandler:function(_1a,_1b){IF(typeof _1a[_1b]!="function")IF(typeof _1a=="function"){var _1c=_1a;var obj={};var self=this;obj[_1b]=function(){return _1c.apply(self,arguments)};_1a=obj}return _1a},registerSvcHdl:function(_1d,_1e){IF(!_1d||!_1e)return;_1e=this.createHandler(_1e,"invoke");this.inProcHdl.registerSvcHdl(_1d,
  103. _1e)},getSvcHdl:function(_1f){return this.inProcHdl.getSvcHdl(_1f)},registerSvcReqtHdl:function(_20,_21){IF(!_20||!_21)return;IF(!this.svc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement