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

📄 painted.js

📁 DWR is the way for AJAX implementation
💻 JS
📖 第 1 页 / 共 2 页
字号:
 */jsx3.Class.defineClass("jsx3.gui.Painted",jsx3.app.Model,null,function(b,c){b.MASK_NO_EDIT={NN:false,EE:false,SS:false,WW:false,MM:false};b.MASK_ALL_EDIT={NN:true,EE:true,SS:true,WW:true,MM:true};c.init=function(l){this.jsxsuper(l);};c.getAbsolutePosition=function(q,o){if(o==null)o=this.getRendered(q);if(o==null)return {L:0,T:0,W:0,H:0};if(q==null)q=this.tA().getRendered(o);return jsx3.html.getRelativePosition(q,o);};c.applyDynamicProperties=function(){if(this._jsxvq!=null){var vc=this.getServer();if(vc==null)return;var H=vc.getProperties();for(var Lc in this._jsxvq)this[Lc]=H.get(this._jsxvq[Lc]);}};c.setDynamicProperty=function(o,s){if(this._jsxvq==null)this._jsxvq={};if(s==null){delete this._jsxvq[o];}else{if(o!=null&&o!=""){this._jsxvq[o]=s;}}return this;};c.getDynamicProperty=function(j){return this._jsxvq!=null?this._jsxvq[j]:null;};c.setAttribute=function(g,h){this.getAttributes()[g]=h;return this;};c.getAttribute=function(a){return this.getAttributes()[a];};c.getAttributes=function(){if(this.jsxcustom==null)this.jsxcustom={};return this.jsxcustom;};c.renderAttributes=function(o,f){var Ub=[];if(this.jsxcustom!=null){var z=jsx3.gui.Interactive&&this.instanceOf(jsx3.gui.Interactive);for(var C in this.jsxcustom){var Hb=o!=null&&(o instanceof Array&&o.indexOf(C)>=0||o[C])||f&&z&&jsx3.gui.Interactive.isBridgeEventHandler(C);var t=this.jsxcustom[C];if(!Hb&&t!=null)Ub.push(" "+C+"=\""+t.replace(/\"/g,"&quot;")+"\"");}}return Ub.join("");};c.removeAttribute=function(e){delete this.getAttributes()[e];return this;};c.removeAttributes=function(){delete this.jsxcustom;return this;};c.focus=function(){var G=this.getRendered();if(G!=null&&G.focus)G.focus();return G;};c.getMaskProperties=function(){return b.MASK_NO_EDIT;};c.getRendered=function(m){var eb=null;if(m instanceof jsx3.gui.Event){if(m.exists()&&m.srcElement())eb=m.srcElement().ownerDocument;}else{if(m!=null){eb=m.getElementById?m:m.ownerDocument;}}if(eb==null)eb=this.getDocument();return eb!=null?eb.getElementById(this.getId()):null;};c.containsHtmlElement=function(n){var wb=this.getRendered(n);if(wb){while(n!=null){if(wb==n)return true;n=n.parentNode;}}return false;};c.getDocument=function(){var Jb=this;while(Jb!=null){if(jsx3.gui.Window&&Jb instanceof jsx3.gui.Window)return Jb.getDocument();else{if(Jb._jsxW9!=null)return Jb._jsxW9.getRootDocument();}Jb=Jb.getParent();}return null;};c.tA=function(){var Xb=this;while(Xb!=null){if(jsx3.gui.Window&&Xb instanceof jsx3.gui.Window)return Xb.getRootBlock();else{if(Xb._jsxW9!=null)return Xb._jsxW9.getRootBlock();}Xb=Xb.getParent();}return null;};b.yj=null;c.repaint=function(){var B=this.getRendered();if(this.isDomPaint()){if(B!=null){var wb=B.previousSibling;var ab=this.paintDom();if(ab!=B)B.parentNode.replaceChild(ab,B);else{if(ab.parentNode==null)wb.parentNode.insertBefore(ab,wb);}}return null;}else{var xc=null;if(B!=null){xc=this.paint();jsx3.html.setOuterHTML(B,xc);var tb=B.ownerDocument;if(tb.recalc!=null)jsx3.sleep(function(){tb.recalc(true);},"jsx3.gui.Painted.recalc");}return xc;}};c.paint=jsx3.Method.newAbstract();c.isDomPaint=function(){return false;};c.paintDom=function(){throw new jsx3.Exception();};c.dg=function(){return "<span id=\""+this.getId()+"\" style=\"display:none;\"></span>";};b.mp=[];b.Bl=function(q){b.mp.push(q);jsx3.sleep(b.He,"jsx3.gui.Painted.domPaint");};b.He=function(){for(var Xb=0;Xb<b.mp.length;Xb++){var kb=b.mp[Xb];var Ic=kb.getRendered();if(Ic!=null){var gc=kb.paintDom();Ic.parentNode.replaceChild(gc,Ic);}}b.mp.splice(0,b.mp.length);};c.paintChild=function(a,q,p){if(p==null)p=this.getRendered();if(p!=null){if(a.isDomPaint()){p.appendChild(a.paintDom());}else{jsx3.html.insertAdjacentHTML(p,"beforeEnd",a.paint());}}};c.Zu=function(a,q){this.paintChild(a,q);};c.insertHTML=function(a){this.paintChild(a);return this;};c.paintChildren=function(q){if(q==null)q=this.getChildren();var bc=[];for(var Tb=0;Tb<q.length;Tb++){var Ac=q[Tb];if(Ac.isDomPaint()){bc.push(Ac.dg());b.Bl(Ac);}else{bc.push(Ac.paint());}}return bc.join("");};c.RL=function(s,j){if(this._jsxHg)this.vQ();if(this._jsxUf==null&&s)this._jsxUf=this.T5(j);return this._jsxUf;};c.I9=function(i){this._jsxUf=i;};c.C5=function(){this._jsxHg=true;};c.vQ=function(a){if(a){this.findDescendants(function(q){q.vQ(false);},true,true,false,true);}else{delete this._jsxUf;delete this._jsxHg;}};b.Nn=/(-\S)/gi;b.HM=function(m,l,q){if(l){var u=l.split(";");for(var Vb=0;u.length;Vb++){var P=(u[Vb]+"").trim();if(P=="")return;var wb=P.split(/\s*:\s*/);if(wb&&wb.length==2){var yc=wb[0].replace(b.Nn,function(r,i){return i.substring(1).toUpperCase();});m.style[yc]=wb[1];}}}else{if(q){var kc=["Top","Right","Bottom","Left"];for(var Vb=0;Vb<4;Vb++){var yc=q+kc[Vb];m.style[yc]="";}}}};c.recalcBox=function(k){this.findDescendants(function(o){o.vQ(false);},true,true,false,true);this.J1(this.getParent()?this.getParent().IO(this):null,this.getRendered());if(k){var nb=this.getRendered();if(nb!=null){var Eb=this.RL(true);for(var O=0;O<k.length;O++){if(k[O]=="padding"){b.HM(nb,Eb.N4(),"padding");}else{if(k[O]=="margin"){b.HM(nb,Eb.Q2(),"margin");}else{if(k[O]=="border"){b.HM(nb,Eb.jO(),"border");}}}}}}};c.IO=function(){var wb=this.RL();return wb!=null?{parentwidth:wb.XK(),parentheight:wb.P5()}:{};};c.T5=function(l){return new b.Box({});};c.k7=function(e,r,p){this.B_(e,r,p,1);};c.B_=function(d,a,n,s){if(s==1){this.C5();if(a!=null)n.addRepaint(this);}else{if(s==2){var Gc=this.RL(true,d);if(Gc.recalculate(d,a,n)){if(jsx3.gui.Interactive&&a){var J={parentwidth:Gc.XK(),parentheight:Gc.P5()};this.publish({subject:jsx3.gui.Interactive.AFTER_RESIZE_VIEW,gui:a,implicit:J});}var G=this.getChildren();for(var eb=G.length-1;eb>=0;eb--){var jc=a?a.childNodes[eb]?a.childNodes[eb]:true:null;n.add(G[eb],{parentwidth:Gc.XK(),parentheight:Gc.P5()},jc,true);}}}else{if(s==3){var Gc=this.RL(true,d);if(a)Gc.recalculate(d,a,n);}}}};c.nW=function(r,o,d){var Cb=new b.Queue(d);Cb.add(this,r,o);Cb.start();};c.J1=function(a,q,f){var oc={};oc.add=function(k,j,i){k.yE(this,j,i);};oc.addRepaint=function(k){k.repaint();};oc.isPositional=function(){return f;};oc.add(this,a,q);};c.yE=function(n,d,a){var Hc=this.RL(false);if(Hc==null||Hc.isValidQueue(n)){if(!n.isPositional())this.applyDynamicProperties();this.k7(d,a,n);}else{}};});jsx3.Class.defineClass("jsx3.gui.Painted.Queue",jsx3.lang.Object,null,function(h,g){h.Ad=250;h.SG=0;h.Kt=[];h.HE=true;h.jt=false;h.enableChunking=function(s){h.HE=s;};h.Ze=function(){if(h.HE){if(!h.jt)h.doChunk();}else{h.doChunk();}};h.doChunk=function(){if(h.HE){h.jt=false;if(h.od==null)h.od=(new Date()).getTime();var ib=h.od;var t=(new Date()).getTime();var ab=h.Kt.shift();while(ab!=null&&t<ib+h.Ad){if(ab.zy.length>0){var Wb=ab.zy.shift();if(Wb instanceof Array)Wb[0].yE(ab,Wb[1],Wb[2]);else Wb.repaint();t=(new Date()).getTime();}else{ab.destroy();ab=h.Kt.shift();}}h.od=null;if(ab!=null){h.Kt.unshift(ab);jsx3.sleep(h.doChunk,"jsx3.gui.Painted.queue");h.jt=true;}}else{while(h.Kt.length>0){var ab=h.Kt.shift();while(ab.zy.length>0){var Wb=ab.zy.shift();if(Wb instanceof Array)Wb[0].yE(ab,Wb[1],Wb[2]);else Wb.repaint();}}}};g.init=function(s){this.Gl= ++h.SG;this.zy=[];this.st=s;h.Kt.push(this);};g.add=function(d,l,i,p){if(i===true)i=d.getRendered();this.zy[p?"unshift":"push"]([d,l,i]);};g.addRepaint=function(s,a){this.zy[a?"unshift":"push"](s);};g.start=function(){h.Ze();};g.destroy=function(){delete this.zy;h.Kt.remove(this);};g.isPositional=function(){return this.st;};g.toString=function(){return "{Painted.Queue "+this.Gl+" "+(this.zy!=null?this.zy.length:"-")+"}";};});jsx3.Class.defineClass("jsx3.gui.Painted.Box",jsx3.lang.Object,null,function(p,c){p.Lf=/[^\d^-]*([-]*[\d]*)[^\d^-]*([-]*[\d]*)[^\d^-]*([-]*[\d]*)[^\d^-]*([-]*[\d]*)/;p.JG=/\b([\d])*px/g;p.Pp=["boxtype","tagname","margin","padding","border","left","top","width","height","empty","container"];p.ji=["top","right","bottom","left"];p.il=null;p.yz=0;p.Rw=["","display:-moz-inline-box;","display:inline-block;","display:-moz-inline-box;"];p.getCssFix=function(){return p.Rw[jsx3.html.getMode()];};c.init=function(i){this.styles="";this.attributes="";this.tokenindex=p.yz;this.implicit=i?i:{};this.calculate();};c.paint=function(){var Ac=new Array(2);var gc="<"+this.explicit.tagname+" "+this.attributes;var ob=this.KZ();ob=!jsx3.util.numIsNaN(ob)?"width:"+Math.max(0,ob)+"px;":"";var kb=this.wI();kb=!jsx3.util.numIsNaN(kb)?"height:"+Math.max(0,kb)+"px;":"";var D=this.explicit.empty?"\"/>":"\">";if(this.explicit.boxtype=="box"){var ub=this.O8();ub=jsx3.util.numIsNaN(ub)?"0px;":"left:"+ub+"px;";var dc=this.hH();dc=jsx3.util.numIsNaN(dc)?"0px;":"top:"+dc+"px;";var Eb=this.implicit.omitpos?"":"position:absolute;";Ac[0]=gc+" style=\""+Eb+ob+kb+ub+dc+this.N4()+this.Q2()+this.jO()+this.styles+D;}else{if(this.explicit.boxtype=="relativebox"){var Eb=this.implicit.omitpos?"":"position:relative;";Ac[0]=gc+" style=\""+Eb+this.RA()+ob+kb+this.N4()+this.Q2()+this.jO()+this.styles+D;}else{var ub=this.O8();ub=jsx3.util.numIsNaN(ub)?"":"left:"+ub+"px;";var dc=this.hH();dc=jsx3.util.numIsNaN(dc)?"":"top:"+dc+"px;";var Eb=this.implicit.omitpos?"":"position:relative;";Ac[0]=gc+" style=\""+Eb+ob+kb+ub+dc+this.N4()+this.Q2()+this.jO()+this.styles+D;}}Ac[1]=this.explicit.empty?"":"</"+this.explicit.tagname+">";return Ac;};c.setStyles=function(r){this.styles=r;return this;};c.setAttributes=function(j){this.attributes=j;return this;};c.RA=function(){return this.explicit.container&&(jsx3.html.getMode()==jsx3.html.MODE_FF_STRICT||jsx3.html.getMode()==jsx3.html.MODE_FF_QUIRKS)?"":p.getCssFix();};c.recalculate=function(o,e,j){for(var Ac in o)this.implicit[Ac]=o[Ac];var Gb=this.explicit.clientwidth;var Ub=this.explicit.clientheight;this.calculate();var y,Qb,Ob,Jb;if(e&&e.style){if(j==null||!j.isPositional()){y=this.KZ();if(!isNaN(y)&&y<0)y=0;if(y>=0)e.style.width=y+"px";Ob=this.wI();if(!isNaN(Ob)&&Ob<0)Ob=0;if(Ob>=0)e.style.height=Ob+"px";}if(this.explicit.boxtype=="box"&&!isNaN(this.O8())&&!isNaN(this.hH())){e.style.left=this.O8()+"px";e.style.top=this.hH()+"px";}}return true;};c.calculate=function(){this.explicit={};for(var Wb=0;Wb<p.Pp.length;Wb++){var D=p.Pp[Wb];var eb=this.implicit[D];if((eb==null||eb=="")&&(D=="margin"||D=="padding"||D=="border")){this.explicit[D+"width"]=0;this.explicit[D+"height"]=0;}else{if((eb==null||eb=="")&&this.implicit.boxtype=="box"&&(D=="left"||D=="top")){this.explicit[D]=0;}else{if(eb!=null){this.addProperty(D,eb);}}}}};p.registerServer=function(q,g){var K=q.getEnv("GUIREF");if(K){var X=K.clientWidth;var ob=K.clientHeight;}if(g)jsx3.gui.Event.subscribe(jsx3.gui.Event.RESIZE,q,"onResize");};p.unregisterServer=function(o,i){if(i)jsx3.gui.Event.unsubscribe(jsx3.gui.Event.RESIZE,o,"onResize");};c.addProperty=function(n,e){if(n=="width"||n=="height"){if(typeof(e)=="string"&&e.indexOf("%")>-1)e=parseInt(this.implicit["parent"+n]*(parseInt(e)/100));this.explicit[n]=Number(e);this.explicit["client"+n]=e-this.explicit["padding"+n]-this.explicit["border"+n];if(this.explicit["client"+n]<0)this.explicit["client"+n]=0;}else{if(n=="left"||n=="top"){this.explicit[n]=typeof(e)=="string"&&e.indexOf("%")>-1?parseInt(this.implicit["parent"+(n=="left"?"width":"height")]*(parseInt(e)/100)):Number(e);}else{if(n=="margin"||n=="padding"){e=(e+"").trim();if(e=="")return;var X=e.match(/\s/)?e.match(p.Lf):[null,e,e,e,e];if(!(isNaN(parseInt(X[1]))||isNaN(parseInt(X[2]))||isNaN(parseInt(X[3]))||isNaN(parseInt(X[4])))&&n=="padding"){this.explicit["paddingwidth"]=parseInt(X[2])+parseInt(X[4]);this.explicit["paddingheight"]=parseInt(X[1])+parseInt(X[3]);}else{if(e.indexOf(":")>-1){var Jb=p.AG(e,n);X=Jb.match(p.Lf);if(!(isNaN(parseInt(X[1]))||isNaN(parseInt(X[2]))||isNaN(parseInt(X[3]))||isNaN(parseInt(X[4])))&&n=="padding"){this.explicit["paddingwidth"]=parseInt(X[2])+parseInt(X[4]);this.explicit["paddingheight"]=parseInt(X[1])+parseInt(X[3]);}else{if(n=="padding"){this.explicit["paddingwidth"]=0;this.explicit["paddingheight"]=0;X=[null,0,0,0,0];}}}else{if(n=="padding"){this.explicit["paddingwidth"]=0;this.explicit["paddingheight"]=0;X=[null,0,0,0,0];}}}this.explicit[n]=n+":"+X[1]+"px "+X[2]+"px "+X[3]+"px "+X[4]+"px;";}else{if(n=="border"){e=e.trim();if(e=="")return;if(e.replace(/(^;*)|(;*$)/g,"").search(/(;)|(:)/)==-1){e=e.replace(/(^;*)|(;*$)/g,"");for(var zb=0;zb<2;zb++)e=e+(";"+e);}else{if(e.replace(/(^;*)|(;*$)/g,"").search(/:/)==-1){e=e.replace(/(^;*)|(;*$)/g,"");}}var X=e.match(p.JG);var Qb=e.split(";");if(e.indexOf(":")==-1&&X&&X.length==4){this.explicit["borderwidth"]=parseInt(X[1])+parseInt(X[3]);this.explicit["borderheight"]=parseInt(X[0])+parseInt(X[2]);}else{if(e.indexOf(":")>-1){var Jb=p.rp(e);Qb=Jb.split(";");X=Jb.match(p.JG);if(X!=null&&Qb.length==4){this.explicit["borderwidth"]=parseInt(X[1])+parseInt(X[3]);this.explicit["borderheight"]=parseInt(X[0])+parseInt(X[2]);}else{this.explicit["borderwidth"]=0;this.explicit["borderheight"]=0;Qb=["none"];}}else{this.explicit["borderwidth"]=0;this.explicit["borderheight"]=0;Qb=["none"];}}if(Qb.length==1||Qb[0]==Qb[1]&&Qb[1]==Qb[2]&&Qb[2]==Qb[3]){this.explicit[n]=n+":"+Qb[0]+";";}else{if(Qb.length==4){var db=new Array(4);for(var zb=0;zb<4;zb++){if(Qb[zb].match(/\d+px/))db[zb]=n+"-"+p.ji[zb]+":"+Qb[zb]+";";else db[zb]=n+"-"+p.ji[zb]+":0px;";}this.explicit[n]=db.join("");}}}else{if(n=="tagname"){if(e.search(/input\[(\S*)\]/i)>-1){this.explicit.tagname="input";this.explicit.type=RegExp.$1;}else{this.explicit.tagname=e;}}else{this.explicit[n]=e;}}}}}};c.W8=function(q){if(typeof(this.children)=="undefined")this.children=[];this.children.push(q);};c.pQ=function(s){return this.children!=null?this.children[s]:null;};c.jJ=function(){var Bc=0;var Lb=0;if(typeof(this.explicit.border)=="string"){var rb=this.explicit.border.match(p.JG);Lb=rb?parseInt(rb[rb.length-1]):0;}if(typeof(this.explicit.padding)=="string"){var rb=this.explicit.padding.match(p.Lf);Bc=rb?parseInt(rb[4]):0;}return Lb+Bc;};c.G_=function(){var ac=0;var Y=0;if(typeof(this.explicit.border)=="string"){var Jc=this.explicit.border.match(p.JG);Y=Jc?parseInt(Jc[0]):0;}if(typeof(this.explicit.padding)=="string"){var Jc=this.explicit.padding.match(p.Lf);ac=Jc?parseInt(Jc[1]):0;}return Y+ac;};c.XK=function(){return this.explicit.clientwidth;};c.P5=function(){return this.explicit.clientheight;};c.jU=function(){return this.explicit.width;};c.JV=function(){return this.explicit.height;};c.KZ=function(){return (this.explicit.type&&(this.explicit.type.toUpperCase()=="TEXT"||this.explicit.type.toUpperCase()=="PASSWORD")||this.explicit.tagname=="textarea")&&jsx3.html.getMode()==jsx3.html.MODE_FF_QUIRKS||jsx3.html.getMode()==jsx3.html.MODE_IE_QUIRKS?this.explicit.width:this.explicit.clientwidth;};c.wI=function(){return (this.explicit.type&&(this.explicit.type.toUpperCase()=="TEXT"||this.explicit.type.toUpperCase()=="PASSWORD")||this.explicit.tagname=="textarea")&&jsx3.html.getMode()==jsx3.html.MODE_FF_QUIRKS||jsx3.html.getMode()==jsx3.html.MODE_IE_QUIRKS?this.explicit.height:this.explicit.clientheight;};c.O8=function(){return this.explicit.left;};c.hH=function(){return this.explicit.top;};c.getBoxType=function(){return this.explicit.boxtype;};c.isValidQueue=function(q){if(q.Gl==null)return true;if(this.tokenindex<q.Gl){this.tokenindex=q.Gl;return true;}else{return false;}};c.Q2=function(){return this.explicit.margin?this.explicit.margin:"";};c.N4=function(){return this.explicit.padding?this.explicit.padding:"";};c.jO=function(){return this.explicit.border?this.explicit.border:"";};p.getBody=function(){return document.getElementsByTagName("body")[0];};p.getScrollSize=function(r){if(p.il==null){var J=r||p.getBody();var tc="<div id=\"_jsx3_gui_painted_box_0\" label=\"block\" class=\"jsx30block\" style=\"padding:0px;margin:0px;border-width:0px;position:absolute;width:100px;height:100px;left:-100px;top:-100px;overflow:scroll;\">&#160;</div>";jsx3.html.insertAdjacentHTML(J,"beforeEnd",tc);p.il=100-parseInt(document.getElementById("_jsx3_gui_painted_box_0").clientWidth);}return p.il;};p.getScrollSizeOffset=function(d){var v=p.getScrollSize();return jsx3.html.getScrollSizeOffset(v,d);};p.AG=function(h,o){var pc="not matched";var dc="0";var jc="0";var Mc="0";var jb="0";var Wb=/(\s*(padding|padding-top|padding-right|padding-bottom|padding-left)\s*:\s*(\d+)(px)?\s*((\d+)(px)?)?\s*((\d+)(px)?)?\s*((\d+)(px)?)?\s*;)+/ig;var fc=/(\s*(margin|margin-top|margin-right|margin-bottom|margin-left)\s*:\s*(-*\d+)(px)?\s*((-*\d+)(px)?)?\s*((-*\d+)(px)?)?\s*((-*\d+)(px)?)?\s*;)+/ig;var Ec=o=="padding"?Wb:fc;var yc=h.split(";");if(yc){try{for(var bb=0;bb<yc.length;bb++){var yb=yc[bb]+";";var Nc=yb.search(Ec);if(Nc>0){var Yb={};Yb.desc="Missing Semicolon";Yb.cause=yc[bb];throw Yb;}else{if(Nc==-1){if(yc[bb].search(/[^\s*]/i)>=0){var Yb={};Yb.desc="Mismatch Rule";Yb.cause=yc[bb];throw Yb;}}else{pc=yb.replace(Ec,function(j,i,g,f,e,d,b,a,s,r,q,n,m){if(g.match(/-top/)){dc=f==null?"0":f;}else{if(g.match(/-right/)){jc=f==null?"0":f;}else{if(g.match(/-bottom/)){Mc=f==null?"0":f;}else{if(g.match(/-left/)){jb=f==null?"0":f;}else{dc=jsx3.util.strEmpty(f)?"0":f;jc=jsx3.util.strEmpty(b)?dc:b;Mc=jsx3.util.strEmpty(r)?dc:r;jb=jsx3.util.strEmpty(m)?jc:m;}}}}return dc+" "+jc+" "+Mc+" "+jb;});pc=dc+" "+jc+" "+Mc+" "+jb;}}}}catch(Kc){if(Kc.desc=="Missing Semicolon")pc="Migration broken. Semicolon is missing: "+Kc.cause;if(Kc.desc=="Mismatch Rule")pc="Migration broken. Dosen't match the regular expression. \nPlease control the rule '"+Kc.cause+"'.\nPlease check if all units are in px.\nPlease check if a colon is missing.\n"+"Please check the rule name";return pc;}}return pc;};p.rp=function(j){var D="not matched";var W=["0px","solid",""];var K=["0px","solid",""];var ac=["0px","solid",""];var x=["0px","solid",""];var Mb="";var bb="";var Sb="";var lc=/border\s*.*[^;]\s*border/ig;var wc=/^(\d+)(px)?$/i;var Nc=/^(dashed|dotted|double|groove|hidden|inset|none|outset|ridge|solid)$/i;var rb=/^(#[a-zA-Z0-9]{6}|rgb\s*\(\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)|(AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenrod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|Goldenrod|Gray|Green|GreenYellow|Honeydew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCora|LightCyan|LightGoldenrodYellow|LightGreen|LightGrey|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlu|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquamarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenrod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|Seashell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen))$/i;var Hb=j.split(";");if(Hb){for(var Y=0;Y<Hb.length;Y++){try{if(Hb[Y].match(lc)){var dc={};dc.desc="Missing Semicolon";dc.cause=Hb[Y];throw dc;}var Ic=Hb[Y].split(":");if(Ic.length==2){var wb=Ic[1].split(" ");for(var fc=0;fc<wb.length;fc++){if(wb[fc]!=""){if(wb[fc].match(wc)){Mb=wb[fc].replace(wc,function(h,g,f,e){return g;});Mb=Mb+"px";}else{if(wb[fc].match(Nc)){bb=wb[fc];}else{if(wb[fc].match(rb)){Sb=wb[fc];}else{var dc={};dc.desc="Mismatch Width Color Style";dc.cause=wb[fc];throw dc;}}}if(Ic[0].match(/^\s*border\s*$/)){W=[Mb,bb,Sb];K=[Mb,bb,Sb];ac=[Mb,bb,Sb];x=[Mb,bb,Sb];}else{if(Ic[0].match(/^\s*border-top\s*$/)){W[0]=Mb;W[1]=bb;W[2]=Sb;}else{if(Ic[0].match(/^\s*border-bottom\s*$/)){ac[0]=Mb;ac[1]=bb;ac[2]=Sb;}else{if(Ic[0].match(/^\s*border-right\s*$/)){K[0]=Mb;K[1]=bb;K[2]=Sb;}else{if(Ic[0].match(/^\s*border-left\s*$/)){x[0]=Mb;x[1]=bb;x[2]=Sb;}else{if(Ic[0].match(/^\s*border-width\s*$/)){W[0]=Mb;K[0]=Mb;ac[0]=Mb;x[0]=Mb;}else{if(Ic[0].match(/^\s*border-top-width\s*$/)){W[0]=Mb;}else{if(Ic[0].match(/^\s*border-bottom-width\s*$/)){ac[0]=Mb;}else{if(Ic[0].match(/^\s*border-right-width\s*$/)){K[0]=Mb;}else{if(Ic[0].match(/^\s*border-left-width\s*$/)){x[0]=Mb;}else{if(Ic[0].match(/^\s*border-style\s*$/)){W[1]=bb;K[1]=bb;ac[1]=bb;x[1]=bb;}else{if(Ic[0].match(/^\s*border-top-style\s*$/)){W[1]=bb;}else{if(Ic[0].match(/^\s*border-bottom-style\s*$/)){ac[1]=bb;}else{if(Ic[0].match(/^\s*border-right-style\s*$/)){K[1]=bb;}else{if(Ic[0].match(/^\s*border-left-style\s*$/)){x[1]=bb;}else{if(Ic[0].match(/^\s*border-color\s*$/)){W[2]=Sb;K[2]=Sb;ac[2]=Sb;x[2]=Sb;}else{if(Ic[0].match(/^\s*border-top-color\s*$/)){W[2]=Sb;}else{if(Ic[0].match(/^\s*border-bottom-color\s*$/)){ac[2]=Sb;}else{if(Ic[0].match(/^\s*border-right-color\s*$/)){K[2]=Sb;}else{if(Ic[0].match(/^\s*border-left-color\s*$/)){x[2]=Sb;}else{var dc={};dc.desc="Mismatch Name";dc.cause=Ic[0];throw dc;}}}}}}}}}}}}}}}}}}}}}}}else{if(Hb[Y].search(/[^\s*]/i)>=0){var dc={};dc.desc="Missing Colon";dc.cause=Hb[Y];throw dc;}}}catch(Kc){if(Kc.desc=="Missing Semicolon")D="Migration broken. Semicolon is missing: "+Kc.cause;if(Kc.desc=="Mismatch Width Color Style")D="Migration broken. Dosen't match the regular expression. \nPlease control the rule '"+Kc.cause+"'.\nPlease check if all units are in px.\nPlease control the type of the border.\nPlease control the color";if(Kc.desc=="Mismatch Name")D="Migration broken. Rule name "+Kc.cause+" must match one of these rule names:\n border, border-left, ...";if(Kc.desc=="Missing Colon")D="Migration broken. Colon missing: "+Kc.cause;return D;}}D=W[0]+" "+W[1]+" "+W[2]+";"+K[0]+" "+K[1]+" "+K[2]+";"+ac[0]+" "+ac[1]+" "+ac[2]+";"+x[0]+" "+x[1]+" "+x[2];}return D;};c.toString=function(){var Tb="IMPLICIT:\n";for(var P in this.implicit)Tb=Tb+(P+": "+this.implicit[P]+"\n");Tb=Tb+"\nEXPLICIT:\n";for(var P in this.explicit)Tb=Tb+(P+": "+this.explicit[P]+"\n");return Tb;};});

⌨️ 快捷键说明

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