(function(F,G,H,I,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,aa,d,ba,ca,da,ea,fa,ga,ha,ia,ja,j,ka,la,ma,na,r,p,A,q,s,t,l,C,oa,pa,B,y,u,x,w,D,qa,ra,sa,ta,E,ua,va,wa,xa,ya,za,z){p("J.modelset");q(null,"J.modelset.Object2d",["java.lang.Float","J.util.C","J.viewer.JC"],function(){c$=t(function(){this.isLabelOrHover=!1;this.script=this.target=this.xyz=this.gdata=null;this.atomY=this.atomX=this.valign=this.align=this.pointer=this.bgcolix=this.colix=0;this.atomZ=2147483647;this.movableZ=this.movableY=this.movableX=
0;this.movableZPercent=this.movableYPercent=this.movableXPercent=2147483647;this.offsetY=this.offsetX=0;this.z=1;this.zSlab=-2147483648;this.pymolOffset=null;this.windowHeight=this.windowWidth=0;this.adjustForWindow=!1;this.boxY=this.boxX=this.boxHeight=this.boxWidth=0;this.modelIndex=-1;this.visible=!0;this.hidden=!1;this.boxXY=null;this.scalePixelsPerMicron=0;s(this,arguments)},J.modelset,"Object2d");w(c$,function(){this.boxXY=u(5,0)});d(c$,"getScalePixelsPerMicron",function(){return this.scalePixelsPerMicron});
d(c$,"setScalePixelsPerMicron",function(a){this.scalePixelsPerMicron=a},"~N");d(c$,"setModel",function(a){this.modelIndex=a},"~N");d(c$,"setVisibility",function(a){this.visible=a},"~B");d(c$,"setXYZ",function(a,b){this.xyz=a;null==a&&(this.zSlab=-2147483648);b&&(this.valign=null==a?0:4,this.setAdjustForWindow(null==a))},"JU.P3,~B");d(c$,"setAdjustForWindow",function(a){this.adjustForWindow=a},"~B");d(c$,"setColix",function(a){this.colix=a},"~N");d(c$,"setColixO",function(a){this.colix=J.util.C.getColixO(a)},
"~O");d(c$,"setTranslucent",function(a,b){b?0!=this.bgcolix&&(this.bgcolix=J.util.C.getColixTranslucent3(this.bgcolix,!Float.isNaN(a),a)):this.colix=J.util.C.getColixTranslucent3(this.colix,!Float.isNaN(a),a)},"~N,~B");d(c$,"setBgColix",function(a){this.bgcolix=a},"~N");d(c$,"setBgColixO",function(a){this.bgcolix=null==a?0:J.util.C.getColixO(a)},"~O");d(c$,"setMovableX",function(a){this.valign=4==this.valign?4:0;this.movableX=a;this.movableXPercent=2147483647},"~N");d(c$,"setMovableY",function(a){this.valign=
4==this.valign?4:0;this.movableY=a;this.movableYPercent=2147483647},"~N");d(c$,"setMovableXPercent",function(a){this.valign=4==this.valign?4:0;this.movableX=2147483647;this.movableXPercent=a},"~N");d(c$,"setMovableYPercent",function(a){this.valign=4==this.valign?4:0;this.movableY=2147483647;this.movableYPercent=a},"~N");d(c$,"setMovableZPercent",function(a){4!=this.valign&&(this.valign=0);this.movableZ=2147483647;this.movableZPercent=a},"~N");d(c$,"setZs",function(a,b){this.z=a;this.zSlab=b},"~N,~N");
d(c$,"setXYZs",function(a,b,c,e){this.setMovableX(a);this.setMovableY(b);this.setZs(c,e)},"~N,~N,~N,~N");d(c$,"setScript",function(a){this.script=null==a||0==a.length?null:a},"~S");d(c$,"getScript",function(){return this.script});d(c$,"setOffset",function(a){this.offsetX=J.viewer.JC.getXOffset(a);this.offsetY=J.viewer.JC.getYOffset(a);this.pymolOffset=null;this.valign=0},"~N");d(c$,"setAlignmentLCR",function(a){return"left".equals(a)?this.setAlignment(1):"center".equals(a)?this.setAlignment(2):"right".equals(a)?
this.setAlignment(3):!1},"~S");d(c$,"setAlignment",function(a){this.align!=a&&(this.align=a,this.recalc());return!0},"~N");d(c$,"setPointer",function(a){this.pointer=a},"~N");d(c$,"setBoxOffsetsInWindow",function(a,b,c){var e=this.boxWidth+a,g=this.boxX;g+e>this.windowWidth&&(g=this.windowWidth-e);g<a&&(g=a);this.boxX=g;a=this.boxHeight;c+a>this.windowHeight&&(c=this.windowHeight-a);c<b&&(c=b);this.boxY=c},"~N,~N,~N");d(c$,"setWindow",function(a,b,c){this.windowWidth=a;this.windowHeight=b;null==this.pymolOffset&&
(0>this.scalePixelsPerMicron&&0!=c)&&(this.scalePixelsPerMicron=c)},"~N,~N,~N");d(c$,"checkObjectClicked",function(a,b,c,e){if(this.hidden||null==this.script||0<=this.modelIndex&&!e.get(this.modelIndex))return!1;a&&(b<<=1,c<<=1);return b>=this.boxX&&b<=this.boxX+this.boxWidth&&c>=this.boxY&&c<=this.boxY+this.boxHeight},"~B,~N,~N,JU.BS");c$.setProperty=d(c$,"setProperty",function(a,b,c){if("script"===a)return null!=c&&c.setScript(b),!0;if("xpos"===a)return null!=c&&c.setMovableX(b.intValue()),!0;if("ypos"===
a)return null!=c&&c.setMovableY(b.intValue()),!0;if("%xpos"===a)return null!=c&&c.setMovableXPercent(b.intValue()),!0;if("%ypos"===a)return null!=c&&c.setMovableYPercent(b.intValue()),!0;if("%zpos"===a)return null!=c&&c.setMovableZPercent(b.intValue()),!0;if("xypos"===a){if(null==c)return!0;c.setXYZ(null,!0);3.4028235E38==b.z?(c.setMovableX(l(b.x)),c.setMovableY(l(b.y))):(c.setMovableXPercent(l(b.x)),c.setMovableYPercent(l(b.y)));return!0}return"xyz"===a?(null!=c&&c.setXYZ(b,!0),!0):!1},"~S,~O,J.modelset.Object2d")});
p("J.modelset");q(["J.modelset.Object2d"],"J.modelset.Text",["javajs.awt.Font","JU.PT"],function(){c$=t(function(){this.fontScale=0;this.textUnformatted=null;this.doFormatText=!1;this.font=this.lines=null;this.textHeight=this.textWidth=this.lineHeight=this.descent=this.ascent=this.fid=0;this.image=this.viewer=this.widths=this.text=null;this.imageScale=1;this.y0=this.yAdj=this.xAdj=this.boxYoff2=0;this.pointerPt=null;s(this,arguments)},J.modelset,"Text",J.modelset.Object2d);j(c$,"setScalePixelsPerMicron",
function(a){this.fontScale=0;this.scalePixelsPerMicron=a},"~N");d(c$,"getText",function(){return this.text});C(c$,function(){D(this,J.modelset.Text,[])});c$.newLabel=d(c$,"newLabel",function(a,b,c,e,g,d,f,k){var n=new J.modelset.Text;n.set(a,b,e,d,!0,f,k);n.setText(c);n.bgcolix=g;return n},"J.util.GData,javajs.awt.Font,~S,~N,~N,~N,~N,~A");c$.newEcho=d(c$,"newEcho",function(a,b,c,e,g,d,f,k){var n=new J.modelset.Text;n.set(b,c,g,f,!1,k,null);n.viewer=a;n.target=e;e.equals("error")&&(d=1);n.valign=d;
n.z=2;n.zSlab=-2147483648;return n},"J.viewer.Viewer,J.util.GData,javajs.awt.Font,~S,~N,~N,~N,~N");d(c$,"set",function(a,b,c,e,g,d,f){this.scalePixelsPerMicron=d;this.gdata=a;this.isLabelOrHover=g;this.colix=c;this.align=e;this.pymolOffset=f;this.setFont(b,g)},"J.util.GData,javajs.awt.Font,~N,~N,~B,~N,~A");d(c$,"getFontMetrics",function(){this.descent=this.font.getDescent();this.ascent=this.font.getAscent();this.lineHeight=this.ascent+this.descent});d(c$,"setFontFromFid",function(a){this.fid!=a&&
(this.fontScale=0,this.setFont(javajs.awt.Font.getFont3D(a),!0))},"~N");d(c$,"setText",function(a){null!=this.image&&this.getFontMetrics();this.image=null;a=this.fixText(a);null!=this.text&&this.text.equals(a)||(this.textUnformatted=this.text=a,(this.doFormatText=null!=this.viewer&&null!=a&&(0<=a.indexOf("%{")||0<=a.indexOf("@{")))||this.recalc())},"~S");d(c$,"setImage",function(a){this.image=a;this.recalc()},"~O");d(c$,"setScale",function(a){this.imageScale=a;this.recalc()},"~N");d(c$,"setFont",
function(a,b){this.font=a;null!=this.font&&(this.getFontMetrics(),b&&(this.fid=this.font.fid,this.recalc()))},"javajs.awt.Font,~B");d(c$,"setFontScale",function(a){this.fontScale!=a&&(this.fontScale=a,0!=this.fontScale&&this.setFont(this.gdata.getFont3DScaled(this.font,a),!0))},"~N");d(c$,"fixText",function(a){if(null==a||0==a.length)return null;for(var b;0<=(b=a.indexOf("\n"));)a=a.substring(0,b)+"|"+a.substring(b+1);return a},"~S");j(c$,"recalc",function(){if(null!=this.image)this.textWidth=this.textHeight=
0,this.boxWidth=this.viewer.apiPlatform.getImageWidth(this.image)*this.fontScale*this.imageScale,this.boxHeight=this.viewer.apiPlatform.getImageHeight(this.image)*this.fontScale*this.imageScale,this.ascent=0;else if(null==this.text)this.widths=this.lines=this.text=null;else if(null!=this.font){this.lines=JU.PT.split(this.text,"|");this.textWidth=0;this.widths=B(this.lines.length,0);for(var a=this.lines.length;0<=--a;)this.textWidth=Math.max(this.textWidth,this.widths[a]=this.stringWidth(this.lines[a]));
this.textHeight=this.lines.length*this.lineHeight;this.boxWidth=this.textWidth+(2<=this.fontScale?16:8);this.boxHeight=this.textHeight+(2<=this.fontScale?16:8)}});d(c$,"formatText",function(){this.text=null==this.viewer?this.textUnformatted:this.viewer.formatText(this.textUnformatted);this.recalc()});d(c$,"setPosition",function(a,b,c,e,g,d,f){null==f?f=this.boxXY:this.boxXY=f;this.setWindow(b,c,e);0!=e&&0!=this.scalePixelsPerMicron?this.setFontScale(e/this.scalePixelsPerMicron):this.fontScale!=g&&
this.setFontScale(g);this.doFormatText&&this.formatText();b=this.offsetX*g;g*=this.offsetY;this.xAdj=2<=this.fontScale?8:4;this.yAdj=this.ascent-this.lineHeight+this.xAdj;this.isLabelOrHover?(f[0]=this.movableX,f[1]=this.movableY,null!=this.pymolOffset?(d=a.scaleToScreen(this.z,1E3),g=this.pymolOffset[3],d*=(0>g?-1:1)*Math.max(0,Math.abs(g)-1),this.z-=l(d),d=a.scaleToScreen(this.z,1E3),b=this.getPymolXYOffset(this.pymolOffset[1],this.textWidth,d),g=-this.getPymolXYOffset(-this.pymolOffset[2],this.ascent-
this.descent,d),this.xAdj=2<=this.fontScale?8:4,this.yAdj=0,g+=this.descent,f[0]=this.movableX-this.xAdj,f[1]=this.movableY-this.yAdj,this.y0=this.movableY-g-this.descent,d=!0,this.boxYoff2=-2):this.boxYoff2=0,J.modelset.Text.setBoxXY(this.boxWidth,this.boxHeight,b,g,f,d)):this.setPos(this.fontScale);this.boxX=f[0];this.boxY=f[1];this.adjustForWindow&&this.setBoxOffsetsInWindow(0,this.isLabelOrHover?16*this.fontScale+this.lineHeight:0,this.boxY-this.textHeight);d||(this.y0=this.boxY+this.yAdj)},"J.viewer.Viewer,~N,~N,~N,~N,~B,~A");
d(c$,"getPymolXYOffset",function(a,b,c){var e=-1>a?-1:1<a?0:(a-1)/2;return e*b+(-1>a||1<a?a+(0>a?1:-1):0)*c},"~N,~N,~N");d(c$,"setPos",function(a){var b,c,e,g=null!=this.xyz;0==this.valign||4==this.valign?b=e=c=(2147483647!=this.movableXPercent?r(this.movableXPercent*this.windowWidth/100):g?this.movableX:this.movableX*a)+this.offsetX*a:(b=5*a,c=r(this.windowWidth/2),e=this.windowWidth-b);this.boxXY[0]=b;switch(this.align){case 2:this.boxXY[0]=c-this.boxWidth/2;break;case 3:this.boxXY[0]=e-this.boxWidth}this.boxXY[1]=
0;switch(this.valign){case 1:break;case 3:this.boxXY[1]=r(this.windowHeight/2);break;case 2:this.boxXY[1]=this.windowHeight;break;default:b=2147483647!=this.movableYPercent?r(this.movableYPercent*this.windowHeight/100):g?this.movableY:this.movableY*a,this.boxXY[1]=(g?b:this.windowHeight-b)+this.offsetY*a}2==this.align?this.boxXY[1]-=(null!=this.image?this.boxHeight:null!=this.xyz?this.boxHeight:this.ascent-this.boxHeight)/2:null!=this.image?this.boxXY[1]-=0:null!=this.xyz&&(this.boxXY[1]-=r(this.ascent/
2))},"~N");c$.setBoxXY=d(c$,"setBoxXY",function(a,b,c,e,g,d){var f;0<c||d?f=c:(f=-a,f=0==c?f/2:f+c);g[0]+=f;g[1]+=d?-e:0>e?-b+e:0==e?-b/2:e;g[2]=a;g[3]=b},"~N,~N,~N,~N,~A,~B");d(c$,"stringWidth",function(a){var b=0,c=1;if(null==a)return 0;if(0>a.indexOf("<su"))return this.font.stringWidth(a);for(var e=a.length,g,d=0;d<e;d++){if("<"==a.charAt(d)){if(d+4<e&&((g=a.substring(d,d+5)).equals("<sub>")||g.equals("<sup>"))){d+=4;c=1;continue}if(d+5<e&&((g=a.substring(d,d+6)).equals("</sub>")||g.equals("</sup>"))){d+=
5;c=1;continue}}b+=this.font.stringWidth(a.substring(d,d+1))*c}return b},"~S");d(c$,"setXYA",function(a,b){if(0==b){a[2]=this.boxX;switch(this.align){case 2:a[2]+=this.boxWidth/2;break;case 3:a[2]+=this.boxWidth-this.xAdj;break;default:a[2]+=this.xAdj}a[0]=a[2];a[1]=this.y0}switch(this.align){case 2:a[0]=a[2]-r(this.widths[b]/2);break;case 3:a[0]=a[2]-this.widths[b]}a[1]+=this.lineHeight},"~A,~N")});p("J.shape");q(["J.shape.Shape","java.util.Hashtable"],"J.shape.Object2dShape",["JU.P3","J.util.Logger",
"$.Txt"],function(){c$=t(function(){this.currentBgColor=this.currentColor=this.currentFont=this.currentObject=this.objects=null;this.currentBgTranslucentLevel=this.currentTranslucentLevel=0;this.thisID=null;this.isAll=this.isHover=!1;s(this,arguments)},J.shape,"Object2dShape",J.shape.Shape);w(c$,function(){this.objects=new java.util.Hashtable});d(c$,"setPropOS",function(a,b,c){if("allOff"===a)this.currentObject=null,this.isAll=!0,this.objects=new java.util.Hashtable;else if("delete"===a)if(null==
this.currentObject){if(this.isAll||null!=this.thisID)for(a=this.objects.values().iterator();a.hasNext();){var e=a.next();(this.isAll||J.util.Txt.isMatch(e.target.toUpperCase(),this.thisID,!0,!0))&&a.remove()}}else this.objects.remove(this.currentObject.target),this.currentObject=null;else if("off"===a)this.isAll&&(this.objects=new java.util.Hashtable,this.isAll=!1,this.currentObject=null),null!=this.currentObject&&(this.objects.remove(this.currentObject.target),this.currentObject=null);else if("model"===
a)if(b=b.intValue(),null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext()&&((e=a.next())||1);)e.setModel(b)}else this.currentObject.setModel(b);else if("align"===a)if(null==this.currentObject){if(this.isAll)for(var d,e=this.objects.values().iterator();e.hasNext()&&((d=e.next())||1);)d.setAlignmentLCR(b)}else this.currentObject.setAlignmentLCR(b)||J.util.Logger.error("unrecognized align:"+b);else if("bgcolor"===a)if(this.currentBgColor=b,null==this.currentObject){if(this.isAll)for(a=
this.objects.values().iterator();a.hasNext();)a.next().setBgColixO(b)}else this.currentObject.setBgColixO(b);else if("color"===a)if(this.currentColor=b,null==this.currentObject){if(this.isAll||null!=this.thisID)for(a=this.objects.values().iterator();a.hasNext();)e=a.next(),(this.isAll||J.util.Txt.isMatch(e.target.toUpperCase(),this.thisID,!0,!0))&&e.setColixO(b)}else this.currentObject.setColixO(b);else if("target"===a){if((this.isAll=b.equals("all"))||b.equals("none"))this.currentObject=null}else if((e=
"bgtranslucency"===a)||"translucency"===a)if(b="translucent"===b,e?this.currentBgTranslucentLevel=b?this.translucentLevel:0:this.currentTranslucentLevel=b?this.translucentLevel:0,null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext();)a.next().setTranslucent(this.translucentLevel,e)}else this.currentObject.setTranslucent(this.translucentLevel,e);else if("deleteModelAtoms"===a){b=b[2][0];for(a=this.objects.values().iterator();a.hasNext();)e=a.next(),e.modelIndex==
b?a.remove():e.modelIndex>b&&e.modelIndex--}else this.setPropS(a,b,c)},"~S,~O,JU.BS");j(c$,"initModelSet",function(){this.currentObject=null;this.isAll=!1});j(c$,"setVisibilityFlags",function(a){if(!this.isHover)for(var b,c=this.objects.values().iterator();c.hasNext()&&((b=c.next())||1);)b.setVisibility(0>b.modelIndex||a.get(b.modelIndex))},"JU.BS");j(c$,"checkObjectClicked",function(a,b,c,e){if(this.isHover||0==c)return null;c=this.viewer.isAntialiased();for(var d,h=this.objects.values().iterator();h.hasNext()&&
((d=h.next())||1);)if(d.checkObjectClicked(c,a,b,e))return a=d.getScript(),null!=a&&this.viewer.evalStringQuiet(a),a=new java.util.Hashtable,a.put("pt",null==d.xyz?new JU.P3:d.xyz),b=d.modelIndex,0>b&&(b=0),a.put("modelIndex",Integer.$valueOf(b)),a.put("model",this.viewer.getModelNumberDotted(b)),a.put("id",d.target),a.put("type","echo"),a;return null},"~N,~N,~N,JU.BS,~B");j(c$,"checkObjectHovered",function(a,b,c){if(this.isHover)return!1;for(var e=!1,d=this.viewer.isAntialiased(),h,f=this.objects.values().iterator();f.hasNext()&&
((h=f.next())||1);)if(null!=h.getScript()&&(e=!0,h.checkObjectClicked(d,a,b,c)))return this.viewer.setCursor(12),!0;e&&this.viewer.setCursor(0);return!1},"~N,~N,JU.BS")});p("J.shape");q(["J.shape.Object2dShape"],"J.shape.TextShape",null,function(){c$=x(J.shape,"TextShape",J.shape.Object2dShape);j(c$,"setProperty",function(a,b,c){this.setPropTS(a,b,c)},"~S,~O,JU.BS");d(c$,"setPropTS",function(a,b,c){if("text"===a)if(null==this.currentObject){if(this.isAll){var e;for(a=this.objects.values().iterator();a.hasNext()&&
((e=a.next())||1);)e.setText(b)}}else this.currentObject.setText(b);else if("font"===a)if(this.currentFont=b,null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext()&&((e=a.next())||1);)e.setFont(this.currentFont,!0)}else this.currentObject.setFont(this.currentFont,!0),this.currentObject.setFontScale(0);else this.setPropOS(a,b,c)},"~S,~O,JU.BS")});p("J.shape");q(["J.shape.AtomShape","java.util.Hashtable"],"J.shape.Labels","javajs.awt.Font JU.AU $.BS J.constant.EnumPalette J.modelset.LabelToken $.Text J.util.BSUtil $.C J.viewer.JC".split(" "),
function(){c$=t(function(){this.bsBgColixSet=this.bsFontSet=this.labelBoxes=this.text=this.atomLabels=this.offsets=this.fids=this.bgcolixes=this.formats=this.strings=null;this.zeroFontId=this.defaultPointer=this.defaultPaletteID=this.defaultBgcolix=this.defaultColix=this.defaultFontId=this.defaultZPos=this.defaultAlignment=this.defaultOffset=0;this.defaultsOnlyForNone=!0;this.isScaled=this.setDefaults=!1;this.scalePixelsPerMicron=0;this.pickedAtom=-1;this.pickedY=this.pickedX=this.pickedOffset=0;
s(this,arguments)},J.shape,"Labels",J.shape.AtomShape);w(c$,function(){this.atomLabels=new java.util.Hashtable});d(c$,"initShape",function(){z(this,J.shape.Labels,"initShape",[]);this.defaultFontId=this.zeroFontId=this.gdata.getFont3DFSS("SansSerif","Plain",13).fid;this.defaultBgcolix=this.defaultColix=0;this.defaultOffset=J.shape.Labels.zeroOffset;this.defaultZPos=0;this.translucentAllowed=!1});j(c$,"setProperty",function(a,b,c){this.isActive=!0;if("setDefaults"===a)this.setDefaults=b.booleanValue();
else if("color"===a){var e=J.constant.EnumPalette.pidOf(b);b=J.util.C.getColixO(b);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setLabelColix(a,b,e);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultColix=b,this.defaultPaletteID=e}else if("scalereference"===a){if(null!=this.strings){a=b.floatValue();b=0==a?0:1E4/a;for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.strings.length<=a||(this.text=this.getLabel(a),null==this.text?
(this.text=J.modelset.Text.newLabel(this.gdata,null,this.strings[a],0,0,0,b,null),this.putLabel(a,this.text)):this.text.setScalePixelsPerMicron(b))}}else if("label"===a){this.setScaling();e=null==b||0==b.length?J.shape.Labels.nullToken:[null];for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setLabel(e,b,a)}else if("labels"===a){this.setScaling();var d=b;a=c.nextSetBit(0);for(var h=0;0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))b=d.get(h++),e=null==b||0==b.length?J.shape.Labels.nullToken:
[null],this.setLabel(e,b,a)}else if("clearBoxes"===a)this.labelBoxes=null;else if(!("translucency"===a||"bgtranslucency"===a))if("bgcolor"===a){this.isActive=!0;null==this.bsBgColixSet&&(this.bsBgColixSet=new JU.BS);b=J.util.C.getColixO(b);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setBgcolix(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultBgcolix=b}else if(null==this.bsFontSet&&(this.bsFontSet=new JU.BS),"textLabels"===a){this.setScaling();
d=b;for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setTextLabel(a,d.get(Integer.$valueOf(a)))}else if("fontsize"===a)if(a=b.intValue(),0>a)this.fids=null;else{b=this.gdata.getFontFid(a);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setFont(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultFontId=b}else if("font"===a){b=b.fid;if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setFont(a,
b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultFontId=b}else if("offset"===a||"offsetexact"===a)if(A(b,Integer)){b=b.intValue();e="offsetexact"===a;0==b?b=32767:b==J.shape.Labels.zeroOffset&&(b=0);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setOffsets(a,b,e);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultOffset=b}else{if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setPymolOffset(a,
b)}else if("align"===a){e=1;b.equalsIgnoreCase("right")?e=3:b.equalsIgnoreCase("center")&&(e=2);for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setAlignment(a,e);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultAlignment=e}else if("pointer"===a){b=b.intValue();if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setPointer(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultPointer=b}else if("front"===a){b=b.booleanValue();
if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setFront(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultZPos=b?32:0}else if("group"===a){b=b.booleanValue();if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setGroup(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultZPos=b?16:0}else if("display"===a||"toggleLabel"===a){d="toggleLabel"===a?0:b.booleanValue()?1:-1;null==this.mads&&(this.mads=
E(this.atomCount,0));var f=h=null,k=null,n=null;for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1)){var m=this.atoms[a];if(null==this.formats||a>=this.formats.length)this.formats=JU.AU.ensureLengthS(this.formats,a+1);null!=this.strings&&this.strings.length>a&&null!=this.strings[a]?this.mads[a]=0==d&&0>this.mads[a]||1==d?1:-1:(null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS),this.strings=JU.AU.ensureLengthS(this.strings,a+1),m.getGroup3(!1).equals("UNK")?(null==k&&(k=this.viewer.getStandardLabelFormat(1),
n=J.modelset.LabelToken.compile(this.viewer,k,"\x00",null)),b=k,e=n):(null==h&&(h=this.viewer.getStandardLabelFormat(2),f=J.modelset.LabelToken.compile(this.viewer,h,"\x00",null)),b=h,e=f),this.strings[a]=J.modelset.LabelToken.formatLabelAtomArray(this.viewer,m,e,"\x00",null),this.formats[a]=b,this.bsSizeSet.set(a),(null==this.bsBgColixSet||!this.bsBgColixSet.get(a))&&0!=this.defaultBgcolix&&this.setBgcolix(a,this.defaultBgcolix),this.mads[a]=0<=d?1:-1);m.setShapeVisibility(this.myVisibilityFlag,
null!=this.strings&&a<this.strings.length&&null!=this.strings[a]&&0<=this.mads[a])}}else a.startsWith("label:")?(this.setScaling(),this.setLabel(Array(1),a.substring(6),b.intValue())):("deleteModelAtoms"===a&&(this.labelBoxes=null,e=b[2][1],d=b[2][2],this.fids=JU.AU.deleteElements(this.fids,e,d),this.bgcolixes=JU.AU.deleteElements(this.bgcolixes,e,d),this.offsets=JU.AU.deleteElements(this.offsets,e,d),this.formats=JU.AU.deleteElements(this.formats,e,d),this.strings=JU.AU.deleteElements(this.strings,
e,d),J.util.BSUtil.deleteBits(this.bsFontSet,c),J.util.BSUtil.deleteBits(this.bsBgColixSet,c)),this.setPropAS(a,b,c))},"~S,~O,JU.BS");d(c$,"setPymolOffset",function(a,b){var c=this.getLabel(a);if(null==c){c=null!=this.bsFontSet&&this.bsFontSet.get(a)?this.fids[a]:-1;0>c&&this.setFont(a,c=this.defaultFontId);var c=javajs.awt.Font.getFont3D(c),e=this.getColix2(a,this.atoms[a],!1),c=J.modelset.Text.newLabel(this.gdata,c,this.strings[a],e,this.getColix2(a,this.atoms[a],!0),0,this.scalePixelsPerMicron,
b);this.setTextLabel(a,c)}else c.pymolOffset=b},"~N,~A");d(c$,"setScaling",function(){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);this.scalePixelsPerMicron=(this.isScaled=this.viewer.getBoolean(603979845))?1E4*this.viewer.getScalePixelsPerAngstrom(!1):0});d(c$,"setTextLabel",function(a,b){if(null!=b){var c=b.getText(),e=this.atoms[a];this.addString(e,a,c,c);e.setShapeVisibility(this.myVisibilityFlag,!0);0<=b.colix&&this.setLabelColix(a,b.colix,J.constant.EnumPalette.UNKNOWN.id);
this.setFont(a,b.font.fid);this.putLabel(a,b)}},"~N,J.modelset.Text");d(c$,"setLabel",function(a,b,c){var e=this.atoms[c],d=a[0];null==d&&(d=a[0]=J.modelset.LabelToken.compile(this.viewer,b,"\x00",null));a=null==d?null:J.modelset.LabelToken.formatLabelAtomArray(this.viewer,e,d,"\x00",null);this.addString(e,c,a,b);this.text=this.getLabel(c);this.isScaled?(this.text=J.modelset.Text.newLabel(this.gdata,null,a,0,0,0,this.scalePixelsPerMicron,null),this.putLabel(c,this.text)):null!=this.text&&null!=a&&
this.text.setText(a);this.defaultOffset!=J.shape.Labels.zeroOffset&&this.setOffsets(c,this.defaultOffset,!1);1!=this.defaultAlignment&&this.setAlignment(c,this.defaultAlignment);0!=(this.defaultZPos&32)?this.setFront(c,!0):0!=(this.defaultZPos&16)&&this.setGroup(c,!0);0!=this.defaultPointer&&this.setPointer(c,this.defaultPointer);(0!=this.defaultColix||0!=this.defaultPaletteID)&&this.setLabelColix(c,this.defaultColix,this.defaultPaletteID);0!=this.defaultBgcolix&&this.setBgcolix(c,this.defaultBgcolix);
this.defaultFontId!=this.zeroFontId&&this.setFont(c,this.defaultFontId)},"~A,~S,~N");d(c$,"addString",function(a,b,c,e){a.setShapeVisibility(this.myVisibilityFlag,null!=c);if(null==this.strings||b>=this.strings.length)this.strings=JU.AU.ensureLengthS(this.strings,b+1);if(null==this.formats||b>=this.formats.length)this.formats=JU.AU.ensureLengthS(this.formats,b+1);this.strings[b]=c;this.formats[b]=null!=e&&0<=e.indexOf("%{")?c:e;this.bsSizeSet.setBitTo(b,null!=e)},"J.modelset.Atom,~N,~S,~S");j(c$,
"getProperty",function(a,b){return a.equals("offsets")?this.offsets:a.equals("label")?null!=this.strings&&b<this.strings.length&&null!=this.strings[b]?this.strings[b]:"":null},"~S,~N");d(c$,"putLabel",function(a,b){null==b?this.atomLabels.remove(Integer.$valueOf(a)):this.atomLabels.put(Integer.$valueOf(a),b)},"~N,J.modelset.Text");d(c$,"getLabel",function(a){return this.atomLabels.get(Integer.$valueOf(a))},"~N");d(c$,"putBox",function(a,b){null==this.labelBoxes&&(this.labelBoxes=new java.util.Hashtable);
this.labelBoxes.put(Integer.$valueOf(a),b)},"~N,~A");d(c$,"getBox",function(a){return null==this.labelBoxes?null:this.labelBoxes.get(Integer.$valueOf(a))},"~N");d(c$,"setLabelColix",function(a,b,c){this.setColixAndPalette(b,c,a);null!=this.colixes&&null!=(this.text=this.getLabel(a))&&this.text.setColix(this.colixes[a])},"~N,~N,~N");d(c$,"setBgcolix",function(a,b){if(null==this.bgcolixes||a>=this.bgcolixes.length){if(0==b)return;this.bgcolixes=JU.AU.ensureLengthShort(this.bgcolixes,a+1)}this.bgcolixes[a]=
b;this.bsBgColixSet.setBitTo(a,0!=b);this.text=this.getLabel(a);null!=this.text&&this.text.setBgColix(b)},"~N,~N");d(c$,"setOffsets",function(a,b,c){if(null==this.offsets||a>=this.offsets.length){if(0==b)return;this.offsets=JU.AU.ensureLengthI(this.offsets,a+1)}this.offsets[a]=this.offsets[a]&255|b<<8;c&&(this.offsets[a]|=128);this.text=this.getLabel(a);null!=this.text&&this.text.setOffset(b)},"~N,~N,~B");d(c$,"setAlignment",function(a,b){if(null==this.offsets||a>=this.offsets.length){if(1==b)return;
this.offsets=JU.AU.ensureLengthI(this.offsets,a+1)}this.offsets[a]=this.offsets[a]&-13|b<<2;this.text=this.getLabel(a);null!=this.text&&this.text.setAlignment(b)},"~N,~N");c$.getAlignment=d(c$,"getAlignment",function(a){return(a&12)>>2},"~N");d(c$,"setPointer",function(a,b){if(null==this.offsets||a>=this.offsets.length){if(0==b)return;this.offsets=JU.AU.ensureLengthI(this.offsets,a+1)}this.offsets[a]=(this.offsets[a]&-4)+b;this.text=this.getLabel(a);null!=this.text&&this.text.setPointer(b)},"~N,~N");
d(c$,"setFront",function(a,b){if(null==this.offsets||a>=this.offsets.length){if(!b)return;this.offsets=JU.AU.ensureLengthI(this.offsets,a+1)}this.offsets[a]=(this.offsets[a]&-49)+(b?32:0)},"~N,~B");d(c$,"setGroup",function(a,b){if(null==this.offsets||a>=this.offsets.length){if(!b)return;this.offsets=JU.AU.ensureLengthI(this.offsets,a+1)}this.offsets[a]=(this.offsets[a]&-49)+(b?16:0)},"~N,~B");d(c$,"setFont",function(a,b){if(null==this.fids||a>=this.fids.length){if(b==this.zeroFontId)return;this.fids=
JU.AU.ensureLengthByte(this.fids,a+1)}this.fids[a]=b;this.bsFontSet.set(a);this.text=this.getLabel(a);null!=this.text&&this.text.setFontFromFid(b)},"~N,~N");j(c$,"setModelClickability",function(){if(null!=this.strings)for(var a=this.strings.length;0<=--a;)null!=this.strings[a]&&(this.modelSet.atoms.length>a&&!this.modelSet.isAtomHidden(a))&&this.modelSet.atoms[a].setClickable(this.myVisibilityFlag)});j(c$,"getShapeState",function(){return!this.isActive||null==this.bsSizeSet?"":this.viewer.getShapeState(this)});
j(c$,"checkObjectDragged",function(a,b,c,e){if(2!=this.viewer.getPickingMode()||null==this.labelBoxes)return!1;if(-2147483648==a)return a=this.findNearestLabel(c,e),0<=a?(this.pickedAtom=a,this.pickedX=c,this.pickedY=e,this.pickedOffset=(null==this.offsets||this.pickedAtom>=this.offsets.length?0:this.offsets[this.pickedAtom])>>8,!0):!1;if(2147483647==a)return this.pickedAtom=-1,!1;if(0>this.pickedAtom)return!1;this.move2D(this.pickedAtom,c,e);return!0},"~N,~N,~N,~N,~N,JU.BS");d(c$,"findNearestLabel",
function(a,b){if(null==this.labelBoxes)return-1;for(var c=3.4028235E38,e=-1,d=3.4028235E38,h,f=this.labelBoxes.entrySet().iterator();f.hasNext()&&((h=f.next())||1);)if(this.atoms[h.getKey().intValue()].isVisible(this.myVisibilityFlag)){var k=h.getValue(),n=a-k[0],m=b-k[1];0>=n||(0>=m||n>=k[2]||m>=k[3]||k[4]>d)||(d=k[4],k=Math.min(Math.abs(n-k[2]/2),Math.abs(m-k[3]/2)),k<=c&&(c=k,e=h.getKey().intValue()))}return e},"~N,~N");d(c$,"move2D",function(a,b,c){var e=J.viewer.JC.getXOffset(this.pickedOffset),
d=-J.viewer.JC.getYOffset(this.pickedOffset),e=e+(b-this.pickedX),d=d+(this.pickedY-c);b=J.viewer.JC.getOffset(e,d);0==b?b=32767:b==J.shape.Labels.zeroOffset&&(b=0);this.setOffsets(a,b,!0)},"~N,~N,~N");d(c$,"getColix2",function(a,b,c){c?a=null==this.bgcolixes||a>=this.bgcolixes.length?0:this.bgcolixes[a]:(a=null==this.colixes||a>=this.colixes.length?0:this.colixes[a],a=J.util.C.getColixInherited(a,b.getColix()),J.util.C.isColixTranslucent(a)&&(a=J.util.C.getColixTranslucent3(a,!1,0)));return a},"~N,J.modelset.Atom,~B");
y(c$,"zeroOffset",1028);c$.nullToken=c$.prototype.nullToken=[null]});p("J.shape");q(["J.shape.TextShape"],"J.shape.Echo",["J.modelset.Object2d","$.Text","J.util.Txt"],function(){c$=x(J.shape,"Echo",J.shape.TextShape);d(c$,"initShape",function(){z(this,J.shape.Echo,"initShape",[]);this.setProperty("target","top",null)});j(c$,"setProperty",function(a,b){if("scalereference"===a){if(null!=this.currentObject){var c=b.floatValue();this.currentObject.setScalePixelsPerMicron(0==c?0:1E4/c)}}else if("point"===
a)null!=this.currentObject&&(c=this.currentObject,c.pointerPt=null==b?null:b,c.pointer=null==b?0:1);else if("xyz"===a&&null!=this.currentObject&&this.viewer.getBoolean(603979845)&&this.currentObject.setScalePixelsPerMicron(1E4*this.viewer.getScalePixelsPerAngstrom(!1)),"scale"===a)if(null==this.currentObject){if(this.isAll)for(var e=this.objects.values().iterator();e.hasNext()&&((c=e.next())||1);)c.setScale(b.floatValue())}else this.currentObject.setScale(b.floatValue());else if("image"===a)if(null==
this.currentObject){if(this.isAll)for(e=this.objects.values().iterator();e.hasNext()&&((c=e.next())||1);)c.setImage(b)}else this.currentObject.setImage(b);else if("thisID"===a)c=b,this.currentObject=this.objects.get(c),null==this.currentObject&&J.util.Txt.isWild(c)&&(this.thisID=c.toUpperCase());else if("hidden"===a){var d=b.booleanValue();if(null==this.currentObject){if(this.isAll||null!=this.thisID)for(e=this.objects.values().iterator();e.hasNext()&&((c=e.next())||1);)if(this.isAll||J.util.Txt.isMatch(c.target.toUpperCase(),
this.thisID,!0,!0))c.hidden=d}else this.currentObject.hidden=d}else if(!J.modelset.Object2d.setProperty(a,b,this.currentObject)){if("target"===a&&(this.thisID=null,c=b.intern().toLowerCase(),!("none"===c||"all"===c))){this.isAll=!1;e=this.objects.get(c);null==e&&(e=0,d=1,"top"===c?(e=1,d=2):"middle"===c?(e=3,d=2):"bottom"===c&&(e=2),e=J.modelset.Text.newEcho(this.viewer,this.gdata,this.gdata.getFont3DFS("Serif",20),c,10,e,d,0),e.setAdjustForWindow(!0),this.objects.put(c,e),null!=this.currentFont&&
e.setFont(this.currentFont,!0),null!=this.currentColor&&e.setColixO(this.currentColor),null!=this.currentBgColor&&e.setBgColixO(this.currentBgColor),0!=this.currentTranslucentLevel&&e.setTranslucent(this.currentTranslucentLevel,!1),0!=this.currentBgTranslucentLevel&&e.setTranslucent(this.currentBgTranslucentLevel,!0));this.currentObject=e;return}this.setPropTS(a,b,null)}},"~S,~O,JU.BS");j(c$,"getPropertyData",function(a,b){if("currentTarget"===a)return null!=this.currentObject&&null!=(b[0]=this.currentObject.target);
if("checkID"===a)for(var c=b[0].toUpperCase(),e=J.util.Txt.isWild(c),d,h=this.objects.values().iterator();h.hasNext()&&((d=h.next())||1);){var f=d.target;if(f.equalsIgnoreCase(c)||e&&J.util.Txt.isMatch(f.toUpperCase(),c,!0,!0))return b[1]=f,!0}return!1},"~S,~A");j(c$,"getShapeState",function(){return this.viewer.getShapeState(this)});y(c$,"FONTFACE","Serif","FONTSIZE",20,"COLOR",10)});p("J.shape");q(["J.shape.TextShape"],"J.shape.Hover",["JU.AU","J.modelset.Text","J.util.C"],function(){c$=t(function(){this.hoverText=
null;this.atomIndex=-1;this.text=this.xy=null;this.labelFormat="%U";this.specialLabel=this.atomFormats=null;s(this,arguments)},J.shape,"Hover",J.shape.TextShape);d(c$,"initShape",function(){z(this,J.shape.Hover,"initShape",[]);this.isHover=!0;var a=this.gdata.getFont3DFSS("SansSerif","Plain",12),b=J.util.C.getColixS("#FFFFC3");this.currentObject=this.hoverText=J.modelset.Text.newLabel(this.gdata,a,null,4,b,1,0,null);this.hoverText.setAdjustForWindow(!0)});j(c$,"setProperty",function(a,b,c){if("target"===
a)this.atomIndex=null==b?-1:b.intValue();else if("text"===a)this.text=b,null!=this.text&&0==this.text.length&&(this.text=null);else if("specialLabel"===a)this.specialLabel=b;else if("atomLabel"===a){a=b;null!=a&&0==a.length&&(a=null);b=this.viewer.getAtomCount();if(null==this.atomFormats||this.atomFormats.length<b)this.atomFormats=Array(b);for(b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1))this.atomFormats[b]=a}else"xy"===a?this.xy=b:"label"===a?(this.labelFormat=b,null!=this.labelFormat&&0==this.labelFormat.length&&
(this.labelFormat=null)):"deleteModelAtoms"===a?(null!=this.atomFormats&&(this.atomFormats=JU.AU.deleteElements(this.atomFormats,b[2][1],b[2][2])),this.atomIndex=-1):this.setPropTS(a,b,null)},"~S,~O,JU.BS");j(c$,"getShapeState",function(){return this.viewer.getShapeState(this)});y(c$,"FONTFACE","SansSerif","FONTSTYLE","Plain","FONTSIZE",12)});p("J.render");q(null,"J.render.TextRenderer",["java.lang.Float","J.modelset.Text"],function(){c$=x(J.render,"TextRenderer");c$.render=d(c$,"render",function(a,
b,c,e,d,h,f,k){if(!(null==a||null==a.image&&null==a.lines)){var n=c.setColix(a.colix);if(n||!(null==a.image&&(0==a.bgcolix||!c.setColix(a.bgcolix)))){a.setPosition(b,c.getRenderWidth(),c.getRenderHeight(),e,d,h,f);if(null==a.image&&0!=a.bgcolix&&(n&&c.setColix(a.bgcolix),J.render.TextRenderer.showBox(c,a.colix,l(a.boxX),l(a.boxY)+2*a.boxYoff2,a.z+2,a.zSlab,l(a.boxWidth),l(a.boxHeight),a.fontScale,a.isLabelOrHover),!n))return;if(null==a.image)for(b=0;b<a.lines.length;b++)a.setXYA(k,b),c.drawString(a.lines[b],
a.font,l(k[0]),l(k[1]),a.z,a.zSlab,a.bgcolix);else c.drawImage(a.image,l(a.boxX),l(a.boxY),a.z,a.zSlab,a.bgcolix,l(a.boxWidth),l(a.boxHeight));J.render.TextRenderer.drawPointer(a,c)}}},"J.modelset.Text,J.viewer.Viewer,J.api.JmolRendererInterface,~N,~N,~B,~A,~A");c$.drawPointer=d(c$,"drawPointer",function(a,b){if(0!=(a.pointer&1)&&b.setColix(0!=(a.pointer&2)&&0!=a.bgcolix?a.bgcolix:a.colix)){var c=a.boxWidth,e=a.boxHeight,d=NaN,c=a.boxX+(a.boxX>a.atomX+c?0:a.boxX+c<a.atomX-c?c:d=c/2),d=!Float.isNaN(d),
e=a.boxY+(d&&a.boxY>a.atomY?0:d&&a.boxY+e<a.atomY?e:e/2);b.drawLineXYZ(a.atomX,a.atomY,a.atomZ,l(c),l(e),a.zSlab)}},"J.modelset.Text,J.api.JmolRendererInterface");c$.renderSimpleLabel=d(c$,"renderSimpleLabel",function(a,b,c,e,d,h,f,k,n,m,j,v,p,q,r){var s=b.stringWidth(c)+8;v=j+v+8;var t=l(h[0]),u=l(h[1]);J.modelset.Text.setBoxXY(s,v,n,m,h,r);m=h[0];h=h[1];0!=d&&a.setColix(d)?J.render.TextRenderer.showBox(a,e,l(m),l(h),f,k,l(s),l(v),1,!0):a.setColix(e);a.drawString(c,b,l(m+4),l(h+4+j),f-1,k,d);p&&
(a.setColix(q),0<n?a.drawLineXYZ(t,u,k,l(m),l(h+v/2),k):0>n&&a.drawLineXYZ(t,u,k,l(m+s),l(h+v/2),k))},"J.api.JmolRendererInterface,javajs.awt.Font,~S,~N,~N,~A,~N,~N,~N,~N,~N,~N,~B,~N,~B");c$.showBox=d(c$,"showBox",function(a,b,c,e,d,h,f,k,n,m){a.fillRect(c,e,d,h,f,k);a.setColix(b);m&&(2<=n?a.drawRect(c+3,e+3,d-1,h,f-6,k-6):a.drawRect(c+1,e+1,d-1,h,f-2,k-2))},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N,~N,~B")});p("J.render");q(["J.render.FontLineShapeRenderer","JU.P3","$.P3i"],"J.render.LabelsRenderer",
["J.modelset.Text","J.render.TextRenderer","J.shape.Labels","J.viewer.JC"],function(){c$=t(function(){this.minZ=null;this.sppm=this.descent=this.ascent=0;this.screen=this.xy=null;this.zCutoff=this.fidPrevious=0;this.pTemp=null;this.fid=this.labelColix=this.bgcolix=0;this.atomPt=this.atom=null;this.isExact=!1;this.pointer=this.textAlign=this.offset=0;this.zSlab=-2147483648;this.zBox=0;this.boxXY=null;this.scalePixelsPerMicron=0;s(this,arguments)},J.render,"LabelsRenderer",J.render.FontLineShapeRenderer);
w(c$,function(){this.minZ=B(1,0);this.xy=u(3,0);this.screen=new JU.P3i;this.pTemp=new JU.P3});j(c$,"render",function(){this.fidPrevious=0;this.zCutoff=this.viewer.getZShadeStart();var a=this.shape,b=a.strings,c=a.bgcolixes;this.isExport&&this.g3d.getBgColixes(c);var c=a.fids,e=a.offsets;if(null==b)return!1;var d=this.modelSet.atoms,h=this.viewer.getColixBackgroundContrast(),f=this.viewer.getBackgroundArgb();this.sppm=this.viewer.getScalePixelsPerAngstrom(!0);this.scalePixelsPerMicron=this.viewer.getBoolean(603979845)?
1E4*this.sppm:0;this.imageFontScaling=this.viewer.getImageFontScaling();var k=-1;this.minZ[0]=2147483647;for(var n=this.g3d.isAntialiased(),m=b.length;0<=--m;)if(this.atomPt=this.atom=d[m],this.atom.isVisible(this.myVisibilityFlag)){var l=b[m];if(!(null==l||0==l.length||null!=a.mads&&0>a.mads[m])){this.labelColix=a.getColix2(m,this.atom,!1);this.bgcolix=a.getColix2(m,this.atom,!0);0==this.bgcolix&&this.g3d.getColorArgbOrGray(this.labelColix)==f&&(this.labelColix=h);this.fid=null==c||m>=c.length||
0==c[m]?a.zeroFontId:c[m];var j=null==e||m>=e.length?0:e[m],p=0!=(j&32),q=0!=(j&16);this.isExact=0!=(j&128);this.offset=j>>8;this.textAlign=J.shape.Labels.getAlignment(j);this.pointer=j&3;this.zSlab=this.atom.sZ-r(this.atom.sD/2)-3;0<this.zCutoff&&this.zSlab>this.zCutoff||(1>this.zSlab&&(this.zSlab=1),this.zBox=this.zSlab,q?(j=this.atom.getGroup(),p=j.getGroupIndex(),p!=k&&(j.getMinZ(d,this.minZ),k=p),this.zBox=this.minZ[0]):p&&(this.zBox=1),1>this.zBox&&(this.zBox=1),j=a.getLabel(m),this.boxXY=!this.isExport||
this.viewer.creatingImage?a.getBox(m):u(5,0),null==this.boxXY&&a.putBox(m,this.boxXY=u(5,0)),j=this.renderLabelOrMeasure(j,l),null!=j&&a.putLabel(m,j),n&&(this.boxXY[0]/=2,this.boxXY[1]/=2),this.boxXY[4]=this.zBox)}}return!1});d(c$,"renderLabelOrMeasure",function(a,b){var c=!1;if(null!=a)null==a.font&&a.setFontFromFid(this.fid),a.atomX=this.atomPt.sX,a.atomY=this.atomPt.sY,a.atomZ=this.zSlab,null==a.pymolOffset?(a.setXYZs(this.atomPt.sX,this.atomPt.sY,this.zBox,this.zSlab),a.setColix(this.labelColix),
a.setBgColix(this.bgcolix)):(1==a.pymolOffset[0]?this.pTemp.setT(this.atomPt):this.pTemp.set(0,0,0),this.pTemp.x+=a.pymolOffset[4],this.pTemp.y+=a.pymolOffset[5],this.pTemp.z+=a.pymolOffset[6],this.viewer.transformPtScr(this.pTemp,this.screen),a.setXYZs(this.screen.x,this.screen.y,this.screen.z,this.zSlab),a.setScalePixelsPerMicron(this.sppm));else{var e=1==this.textAlign||0==this.textAlign;if(this.fid!=this.fidPrevious||0==this.ascent)this.g3d.setFontFid(this.fid),this.fidPrevious=this.fid,this.font3d=
this.g3d.getFont3DCurrent(),e&&(this.ascent=this.font3d.getAscent(),this.descent=this.font3d.getDescent());if(e&&1==this.imageFontScaling&&0==this.scalePixelsPerMicron&&0>b.indexOf("|")&&0>b.indexOf("<su")){var e=0!=(this.pointer&1),d=0!=(this.pointer&2)&&0!=this.bgcolix?this.bgcolix:this.labelColix;this.boxXY[0]=this.atomPt.sX;this.boxXY[1]=this.atomPt.sY;J.render.TextRenderer.renderSimpleLabel(this.g3d,this.font3d,b,this.labelColix,this.bgcolix,this.boxXY,this.zBox,this.zSlab,J.viewer.JC.getXOffset(this.offset),
J.viewer.JC.getYOffset(this.offset),this.ascent,this.descent,e,d,this.isExact);this.atomPt=null}else a=J.modelset.Text.newLabel(this.g3d.getGData(),this.font3d,b,this.labelColix,this.bgcolix,this.textAlign,0,null),a.atomX=this.atomPt.sX,a.atomY=this.atomPt.sY,a.atomZ=this.zSlab,a.setXYZs(this.atomPt.sX,this.atomPt.sY,this.zBox,this.zSlab),c=!0}null!=this.atomPt&&(null==a.pymolOffset&&(a.setOffset(this.offset),0!=this.textAlign&&a.setAlignment(this.textAlign)),a.setPointer(this.pointer),J.render.TextRenderer.render(a,
this.viewer,this.g3d,this.scalePixelsPerMicron,this.imageFontScaling,this.isExact,this.boxXY,this.xy));return c?a:null},"J.modelset.Text,~S")});p("J.render");q(["J.render.LabelsRenderer"],"J.render.EchoRenderer",["J.modelset.Atom","J.render.TextRenderer","J.util.C"],function(){c$=x(J.render,"EchoRenderer",J.render.LabelsRenderer);j(c$,"render",function(){if(this.viewer.isPreviewOnly())return!1;var a=this.shape,b=this.viewer.getBoolean(603979845)?1E4*this.viewer.getScalePixelsPerAngstrom(!0):0;this.imageFontScaling=
this.viewer.getImageFontScaling();for(var c=!1,e,a=a.objects.values().iterator();a.hasNext()&&((e=a.next())||1);)if(e.visible&&!e.hidden&&(!A(e.pointerPt,J.modelset.Atom)||e.pointerPt.isVisible(-1))){if(4==e.valign)this.viewer.transformPtScr(e.xyz,this.pt0i),e.setXYZs(this.pt0i.x,this.pt0i.y,this.pt0i.z,this.pt0i.z);else if(2147483647!=e.movableZPercent){var d=this.viewer.zValueFromPercent(e.movableZPercent);e.setZs(d,d)}null==e.pointerPt?e.pointer=0:(e.pointer=1,this.viewer.transformPtScr(e.pointerPt,
this.pt0i),e.atomX=this.pt0i.x,e.atomY=this.pt0i.y,e.atomZ=this.pt0i.z,-2147483648==e.zSlab&&(e.zSlab=1));J.render.TextRenderer.render(e,this.viewer,this.g3d,b,this.imageFontScaling,!1,null,this.xy);if(J.util.C.isColixTranslucent(e.bgcolix)||J.util.C.isColixTranslucent(e.colix))c=!0}if(!this.isExport&&(b=this.viewer.getFrameTitle(),null!=b&&0<b.length&&this.g3d.setColix(this.viewer.getColixBackgroundContrast()))){if(0<=b.indexOf("%{")||0<=b.indexOf("@{"))b=this.viewer.formatText(b);this.renderFrameTitle(b)}return c});
d(c$,"renderFrameTitle",function(a){var b=this.g3d.getFontFidFS("Serif",14*this.imageFontScaling);this.g3d.setFontFid(b);var b=r(Math.floor(this.viewer.getScreenHeight()*(this.g3d.isAntialiased()?2:1)-10*this.imageFontScaling)),c=r(Math.floor(5*this.imageFontScaling));this.g3d.drawStringNoSlab(a,null,c,b,0,0)},"~S")});p("J.render");q(["J.render.ShapeRenderer"],"J.render.HoverRenderer",["J.render.TextRenderer"],function(){c$=t(function(){this.tempXY=null;s(this,arguments)},J.render,"HoverRenderer",
J.render.ShapeRenderer);w(c$,function(){this.tempXY=u(3,0)});j(c$,"render",function(){if(this.viewer.isNavigating())return!1;var a=this.shape,b=this.g3d.isAntialiased(),c=a.hoverText;if(0<=a.atomIndex){var d=this.modelSet.atoms[a.atomIndex],a=null!=a.specialLabel?a.specialLabel:null!=a.atomFormats&&null!=a.atomFormats[a.atomIndex]?this.viewer.modelSet.getLabeler().formatLabel(this.viewer,d,a.atomFormats[a.atomIndex]):null!=a.labelFormat?this.viewer.modelSet.getLabeler().formatLabel(this.viewer,d,
this.fixLabel(d,a.labelFormat)):null;if(null==a)return!1;c.setText(a);c.setXYZs(d.sX,d.sY,1,-2147483648)}else if(null!=a.text)c.setText(a.text),c.setXYZs(a.xy.x,a.xy.y,1,-2147483648);else return!0;J.render.TextRenderer.render(c,this.viewer,this.g3d,0,b?2:1,!1,null,this.tempXY);return!0});d(c$,"fixLabel",function(a,b){return null==b?null:this.viewer.isJmolDataFrameForModel(a.getModelIndex())&&b.equals("%U")?"%W":b},"J.modelset.Atom,~S")})})(Clazz,Clazz.newArray,Clazz.newBooleanArray,Clazz.newByteArray,
Clazz.newCharArray,Clazz.newDoubleArray,Clazz.newFloatArray,Clazz.newIntArray,Clazz.newLongArray,Clazz.newShortArray,Clazz.prepareCallback,Clazz.decorateAsClass,Clazz.isClassDefined,Clazz.defineEnumConstant,Clazz.cloneFinals,Clazz.inheritArgs,Clazz.pu$h,Clazz.declareInterface,Clazz.declarePackage,Clazz.makeConstructor,Clazz.overrideConstructor,Clazz.load,Clazz.defineMethod,Clazz.innerTypeInstance,Clazz.instanceOf,Clazz.p0p,Clazz.makeFunction,Clazz.superConstructor,Clazz.defineStatics,Clazz.registerSerializableFields,
Clazz.declareType,Clazz.superCall,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.checkPrivateMethod,Clazz.prepareFields,Clazz.instantialize,Clazz.doubleToInt,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,
Clazz.pu$h,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,Clazz.supportsNativeObject,Clazz.extendedObjectMethods,Clazz.callingStackTraces,Clazz.clone,Clazz.doubleToShort,Clazz.innerFunctions,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAI,Clazz.isAS,
Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs);
