⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsx.js

📁 加密算法,基于MVC模式开发的!希望大家指正
💻 JS
📖 第 1 页 / 共 5 页
字号:
Array.prototype.indexOf=function(g,m){if(m==null)m=0;for(var sc=m;sc<this.length;sc++){if(this[sc]==g)return sc;}return -1;};Array.prototype.lastIndexOf=function(s,a){if(a==null)a=this.length-1;for(var nb=a;nb>=0;nb--){if(this[nb]==s)return nb;}return -1;};Array.prototype.contains=function(f){return this.indexOf(f)>=0;};Array.prototype.remove=function(i){var t=this.indexOf(i);if(t>=0)return this.splice(t,1)[0];return null;};Array.prototype.clone=function(){return this.concat();};Array.prototype.pushAll=function(k){if(typeof(k)=="array"&&k.length>0){for(var V=0;V<k.length;V++)this.push(k[V]);}else{if(typeof(k)=="object"&&typeof(k.length)=="number"&&k.length>0){for(var V=0;V<k.length;V++)this.push(k[V]);}}};Array.prototype.contentsEqual=function(o){if(o==null)return false;if(this.length!=o.length)return false;for(var Cb=0;Cb<o.length;Cb++){if(this[Cb]!=o[Cb])return false;}return true;};Array.prototype.filter=function(a){var pc=[];for(var tc=0;tc<this.length;tc++){if(a(this[tc]))pc.push(this[tc]);}return pc;};Array.prototype.map=function(i,f,g){var lc=null;if(f){if(g){lc={};for(var y=0;y<this.length;y++){var Vb=i(this[y]);for(var V=0;V<Vb.length;V=V+2)lc[Vb[y]]=Vb[y+1];}}else{lc=[];for(var y=0;y<this.length;y++){var R=i(this[y]);if(R instanceof Array)lc.pushAll(R);else lc.push(R);}}}else{if(g){lc={};for(var y=0;y<this.length;y++){var nc=i(this[y]);lc[nc[0]]=nc[1];}}else{lc=new Array(this.length);for(var y=0;y<this.length;y++)lc[y]=i(this[y]);}}return lc;};Math.modpos=function(m,h){return jsx3.util.numMod(m,h);};Math.isNaN=function(c){return jsx3.util.numIsNaN(c);};Number.prototype.roundTo=function(n){return jsx3.util.numRound(this,n);};Number.prototype.zeroPad=function(e){var Db=""+this;while(Db.length<e)Db="0"+Db;return Db;};Date.prototype.getLastDateOfMonth=function(){var S=this.getMonth();return Date.qp[S]||((new Date(this.getYear(),S,29)).getMonth()==S?29:28);};Date.prototype.equals=function(i){return i!=null&&i instanceof Date&&i.valueOf()==this.valueOf();};Date.prototype.compareTo=function(p){var wc=this.valueOf();var wb=p.valueOf();return wc==wb?0:wc>wb?1:-1;};Date.qp=[31,null,31,30,31,30,31,31,30,31,30,31];String.prototype.trim=function(){return jsx3.util.strTrim(this);};String.prototype.doReplace=function(e,i){var I=new RegExp(e,["g"]);return this.replace(I,i);};String.prototype.escapeHTML=function(){return jsx3.util.strEscapeHTML(this);};String.prototype.doTruncate=function(i){return jsx3.util.strTruncate(this,i,"...",1);};String.prototype.toAbsolute=function(){var Y;if(this.substring(0,1)=="/"||this.substring(0,7).toUpperCase()=="HTTP://"||this.substring(0,8).toUpperCase()=="HTTPS://"){Y=this.toString();}else{if(this.substring(0,4)=="JSX/"){Y=jsx3.getEnv("jsxabspath")+this;}else{Y=jsx3.getEnv("jsxhomepath")+this;}}return Y;};String.prototype.urlTo=function(k){var Ab=null;var Cb=this.lastIndexOf("/");if(Cb==this.length-1)Ab=this+k;else{if(Cb<0)Ab=k;else Ab=this.substring(0,Cb+1)+k;}Ab=Ab.doReplace("\\\\","/");var ob=Ab.split("/");for(var Gc=0;Gc<ob.length;Gc++){var A=ob[Gc];if(A=="."){ob.splice(Gc-- ,1);}else{if(A==".."){if(Gc>0&&ob[Gc-1]!=".."){ob.splice(Gc-- ,1);ob.splice(Gc-- ,1);}}}}return ob.join("/");};String.prototype.endsWith=function(q){return jsx3.util.strEndsWith(this,q);};String.prototype.constrainLength=function(a,i){return jsx3.util.strTruncate(this,a,i,0.6666666666666666);};String.prototype.toBase64=function(){return jsx3.util.strEncodeBase64(this);};String.prototype.fromBase64=function(){return jsx3.util.strDecodeBase64(this);};if(jsx3.lang==null)jsx3.lang={};jsx3.lang.STACK_MAX=50;jsx3.lang.getCaller=function(d){var Bc=(d!=null?d:0)+1;for(var vc=arguments.callee;vc!=null;vc=vc.caller){if(--Bc>=0)continue;return vc.caller;}return null;};jsx3.lang.getStack=function(l){var wb=[];var Bb=(l!=null?l:0)+1;for(var gb=arguments.callee;gb!=null&&wb.length<jsx3.lang.STACK_MAX;gb=gb.caller){if(--Bb>=0)continue;wb.push(gb.caller);}return wb;};if(window["jsx3"]==null)window["jsx3"]={};if(jsx3.lang==null)jsx3.lang={};jsx3.lang.zU=new window.Object();jsx3.lang.vV=new window.Object();jsx3.lang.jK=function(){return function(){if(arguments[0]!=jsx3.lang.zU){var dc=this.getClass?this.getClass():null;throw new jsx3.Exception((dc||this)+" may not be instantiated");}};};jsx3.lang.NI=function(){return function(){if(arguments[0]!==jsx3.lang.vV){this.init.apply(this,arguments);}};};jsx3.lang.Object=function(){this.init();};window._jsxho=function(l,p){p.init=function(){};p.getClass=function(){return this.__jsxclass__.jsxclass;};p.equals=function(d){return this==d;};p.clone=function(){return this.getClass().bless(this);};p.instanceOf=function(s){if(s instanceof jsx3.lang.Class){return s.isInstance(this);}else{if(typeof(s)=="function"&&s.prototype!=null){return this instanceof s||s.jsxclass!=null&&s.jsxclass.isInstance(this);}else{if(typeof(s)=="string"){s=jsx3.lang.Class.forName(s);if(s!=null)return s.isInstance(this);}}}throw new jsx3.IllegalArgumentException("objClass",s);};p.toString=function(){return "@"+this.getClass().getName();};p.jsxsuper=function(r){var Cc=jsx3.lang.getCaller();var gc=Cc!=null?Cc.jsxmethod:null;if(gc==null||!(gc instanceof jsx3.lang.Method))throw new jsx3.Exception("function may not call jsxsuper(): "+Cc);if(gc.isStatic())throw new jsx3.Exception("static methods may not call jsxsuper(): "+gc);var qc=gc.getDeclaringClass();var Hb=qc.WM(gc);if(Hb==null)throw new jsx3.Exception("no super method for method: "+gc);var Ac=Hb.apply(this,arguments);if(typeof(Ac)!="undefined")return Ac;};p.jsxsupermix=function(g){var hb=jsx3.lang.getCaller();var Ob=hb!=null?hb.jsxmethod:null;if(Ob==null||!(Ob instanceof jsx3.lang.Method))throw new jsx3.Exception("function may not call jsxsuper(): "+hb);if(Ob.isStatic())throw new jsx3.Exception("static methods may not call jsxsupermix(): "+Ob);var Hc=Ob.getDeclaringClass();var vc=Hc.t6(Ob);if(vc==null)throw new jsx3.Exception("no super mixin method for method: "+Ob);var J=vc.apply(this,arguments);if(typeof(J)!="undefined")return J;};p.isInstanceOf=function(h,b,d){if(this.getClass()&&(typeof(h)!="string"||jsx3.lang.Class.forName(h)!=null))return this.instanceOf(h);var M=jsx3.getClass(this.getInstanceOf());if(M==null)M=this.constructor;if(typeof(M)=="function"){var Jb=M[b?b:"INTERFACES"];var Ub=Jb?Jb[h]:null;if(Ub==1){return true;}else{if(d){return false;}else{return this.isInstanceOf(h.doReplace("jsx3","jsx3.gui"),b,true);}}}return false;};p.isSubclassOf=function(h){return this.isInstanceOf(h,"SUPERS");};p.getInstanceOf=function(){if(this.getClass())return this.getClass().getName();return this.jsxinstanceof?this.jsxinstanceof:this.constructor.className;};p.setInstanceOf=function(g){this.jsxinstanceof=g;return this;};p.getInstanceOfPackage=function(){if(this.getClass())return this.getClass().getPackageName();var Dc=this.getInstanceOf();if(Dc==null)return "";var Mb=Dc.lastIndexOf(".");if(Mb>=0)return Dc.substring(0,Mb);else return "";};p.getInstanceOfClass=function(){if(this.getClass()){var Ub=this.getClass().getName();return Ub.substring(Ub.lastIndexOf(".")+1);}var S=this.getInstanceOf();if(S==null)return "";var vc=S.lastIndexOf(".");if(vc>=0)return S.substring(vc+1);else return S;};p.debug=function(){jsx3.require("jsx3.ide.Debugger");if(!jsx3.ide.doDebug)throw new jsx3.Exception("The JS debugger is not defined. It is probably not supported on this platform.");jsx3.ide.DEBUG_ARGS=arguments.callee.caller.arguments;var xc=jsx3.ide.createExpressionObject(arguments.callee.caller.toString().doReplace("\\}\\s*else","}\r\nelse"));var yc=jsx3.CQ(this.getInstanceOf());yc.jsxMethod=jsx3.ide.doDebug;return this.jsxMethod(xc);};p.eval=function(a,f){return jsx3.eval.call(this,a,f);};};window._jsxho(jsx3.lang.Object,jsx3.lang.Object.prototype);window._jsxho=null;jsx3.lang.Object.prototype.__noSuchMethod__=function(k,o){throw new jsx3.Exception("No such method: "+this.getClass().getName()+"#"+k+"()");};if(window["jsx3"]==null)window["jsx3"]={};if(jsx3.lang==null)jsx3.lang={};jsx3.lang.Method=jsx3.lang.jK();jsx3.lang.Method.prototype=new jsx3.lang.Object();jsx3.lang.Method.prototype.constructor=jsx3.lang.Method;window._jsxho=function(d,f){d.Mi=/^\s*function(\s+\w+)?\s*\(\s*([^\)]*?)\s*\)/;f.JD=function(){if(d.Mi.exec(this.getFunction().toString())){var Z=RegExp.$2;this.nk=Z?Z.split(/\s*,\s*/):[];}else{this.nk=[];}};f.getName=function(){return this.Ok;};f.getArity=function(){if(this.nk==null)this.JD();return this.nk.length;};f.getParameterNames=function(){if(this.nk==null)this.JD();return this.nk.clone();};f.getParameterName=function(h){if(this.nk==null)this.JD();return this.nk[h];};f.getDeclaringClass=function(){return this.Ph;};f.isPackageMethod=function(){return this.Ph instanceof jsx3.lang.Package;};f.isStatic=function(){return this.SC;};f.isAbstract=function(){return this.te;};f.getFunction=function(){if(this._function!=null)return this._function;if(this.isPackageMethod()){return this.Ph.getNamespace()[this.Ok];}else{if(this.SC){return this.Ph.getConstructor()[this.Ok];}else{return this.Ph.getConstructor().prototype[this.Ok];}}};f.apply=function(j,i){return this.getFunction().apply(j,i);};f.call=function(n){var fb=arguments;if(fb.length>11)throw new jsx3.Exception("passed too many arguments to Method.call(): "+fb.length);return this.getFunction().call(fb[0],fb[1],fb[2],fb[3],fb[4],fb[5],fb[6],fb[7],fb[8],fb[9],fb[10]);};f.toString=function(){return this.Ph.getName()+"."+this.Ok;};d.newAbstract=function(n){var ub="";for(var rb=0;rb<arguments.length;rb++){if(!arguments[rb].match(/^[a-zA-Z_]\w*$/))throw new jsx3.IllegalArgumentException("paramNames["+rb+"]",arguments[rb]);ub=ub+("'"+arguments[rb]+"', ");}var Kc="var method = arguments.callee.jsxmethod;if (method instanceof jsx3.lang.Method) {  throw new jsx3.Exception(\"method \" + method.getName() + \" in class \" + method.getDeclaringClass() +    \" is abstract and may not be invoked\");} else {  throw new jsx3.Exception(\"invoked abstract method improperly initialized\");}";var Xb=jsx3.eval("new Function("+ub+"'"+Kc+"');");Xb.te=true;return Xb;};d.newDelegate=function(o,l){var Yb="return this."+l+"."+o+".apply(this."+l+", arguments);";return new Function(Yb);};d.argsAsArray=function(n,e,l){if(e==null)e=0;if(l==null)l=n.length;else l=Math.min(l,n.length);var v=l-e;if(v<=0)return [];var Dc=new Array(v);for(var qc=0;qc<v;qc++)Dc[qc]=n[qc+e];return Dc;};};window._jsxho(jsx3.lang.Method,jsx3.lang.Method.prototype);window._jsxho=null;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -