(function(ba,z,Ia,Ja,w,Ka,s,y,B,v,n,D,La,A,K,H,F,L,I,P,M,Q,O,V,U,S,X,x,ca,fa,Z,da,ga,Y,ia,R,ea,na,va,wa,xa,oa,ya,za,Aa,Ba,Ca,Da,Ea,pa,qa,Fa,ra,Ga,Ma,c,j,$,la){Jmol.___JmolDate="$Date: 2026-08-24 10:15:48 -0500 (Mon, 24 Aug 2026) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="16.4.23";(function(b){b._Loader.registerPackages("java",["io","lang","lang.reflect","util"]);var a=java.util;b._Loader.ignore("net.sf.j2s.ajax.HttpRequest java.util.MapEntry.Type java.net.UnknownServiceException java.lang.Runtime java.security.AccessController java.security.PrivilegedExceptionAction java.io.File java.io.FileInputStream java.io.FileWriter java.io.OutputStreamWriter java.util.concurrent.Executors".split(" "));
Math.rint=Math.round;Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});Math.signum||(Math.signum=function(a){return 0==a||isNaN(a)?a:0>a?-1:1});if(b._supportsNativeObject)for(var d=0;d<b._extendedObjectMethods.length-2;d++){var g=b._extendedObjectMethods[d];Array.prototype[g]=b._O.prototype[g];Number.prototype[g]=b._O.prototype[g]}java.lang.Number=Number;Number.__CLASS_NAME__="Number";ia(Number,java.io.Serializable);Number.equals=b._innerFunctions.equals;Number.getName=b._innerFunctions.getName;
Number.prototype.compareTo=function(a){var d=this.value;a=a.value;return d<a?-1:d==a?0:1};c(Number,"shortValue",function(){var a=Math.round(this)&65535;return 0>this&&0<a?a-65536:a});c(Number,"byteValue",function(){var a=Math.round(this)&255;return 0>this&&0<a?a-256:a});c(Number,"intValue",function(){return Math.round(this)&4294967295});c(Number,"longValue",function(){return Math.round(this)});c(Number,"floatValue",function(){return this.valueOf()});c(Number,"doubleValue",function(){return parseFloat(this.valueOf())});
j(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){v(this,arguments)};da(Integer,"Integer",Number,Comparable,null,!0);Integer.prototype.valueOf=function(){return 0};Integer.toString=Integer.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Integer?"class java.lang.Integer":""+this.valueOf()};ea(Integer,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));this.valueOf=function(){return a}});Integer.MIN_VALUE=
Integer.prototype.MIN_VALUE=-2147483648;Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=2147483647;Integer.TYPE=Integer.prototype.TYPE=Integer;Integer.compare=c(Integer,"compare",function(a,d){return a<d?-1:a>d?1:0},"Number,Number");c(Integer,"bitCount",function(a){a-=a>>>1&1431655765;a=(a&858993459)+(a>>>2&858993459);a=a+(a>>>4)&252645135;a+=a>>>8;return a+(a>>>16)&63},"Number");Integer.bitCount=Integer.prototype.bitCount;c(Integer,"numberOfLeadingZeros",function(a){if(0==a)return 32;var d=1;0==a>>>
16&&(d+=16,a<<=16);0==a>>>24&&(d+=8,a<<=8);0==a>>>28&&(d+=4,a<<=4);0==a>>>30&&(d+=2,a<<=2);return d-(a>>>31)},"Number");Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;c(Integer,"numberOfTrailingZeros",function(a){if(0==a)return 32;var d=31,g=a<<16;0!=g&&(d-=16,a=g);g=a<<8;0!=g&&(d-=8,a=g);g=a<<4;0!=g&&(d-=4,a=g);g=a<<2;0!=g&&(d-=2,a=g);return d-(a<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;c(Integer,"parseIntRadix",function(a,d){if(null==
a)throw new NumberFormatException("null");if(2>d)throw new NumberFormatException("radix "+d+" less than Character.MIN_RADIX");if(36<d)throw new NumberFormatException("radix "+d+" greater than Character.MAX_RADIX");if(10==d)for(var g=a.length;0<=--g;){var b=a.charCodeAt(g);if(!(48<=b&&57>=b)&&(0<g||43!=b&&45!=b))throw new NumberFormatException("Not a Number : "+a);}g=parseInt(a,d);if(isNaN(g))throw new NumberFormatException("Not a Number : "+a);return g},"String, Number");Integer.parseIntRadix=Integer.prototype.parseIntRadix;
c(Integer,"parseInt",function(a){return Integer.parseIntRadix(a,10)},"String");Integer.parseInt=Integer.prototype.parseInt;j(Integer,"$valueOf",function(a){return new Integer(a)});Integer.$valueOf=Integer.prototype.$valueOf;j(Integer,"equals",function(a){return null==a||!y(a,Integer)?!1:a.valueOf()==this.valueOf()},"Object");Integer.toHexString=Integer.prototype.toHexString=function(a){a.valueOf&&(a=a.valueOf());if(0>a){var d=a&16777215;return(a>>24&255)._numberToString(16)+(d="000000"+d._numberToString(16)).substring(d.length-
6)}return a._numberToString(16)};Integer.toOctalString=Integer.prototype.toOctalString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(8)};Integer.toBinaryString=Integer.prototype.toBinaryString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(2)};Integer.decodeRaw=c(Integer,"decodeRaw",function(a){0<=a.indexOf(".")&&(a="");var d=a.startsWith("-")?1:0;a=a.replace(/\#/,"0x").toLowerCase();d=a.startsWith("0x",d)?16:a.startsWith("0",d)?8:10;a=Number(a)&4294967295;return 8==
d?parseInt(a,8):a},"~S");Integer.decode=c(Integer,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||a<Integer.MIN_VALUE||a>Integer.MAX_VALUE)throw new NumberFormatException("Invalid Integer");return new Integer(a)},"~S");j(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){v(this,arguments)};da(Long,"Long",Number,Comparable,null,!0);Long.prototype.valueOf=function(){return 0};Long.toString=Long.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:
this===Long?"class java.lang.Long":""+this.valueOf()};ea(Long,function(a){null==a&&(a=0);a="number"==typeof a?Math.round(a):Integer.parseIntRadix(a,10);this.valueOf=function(){return a}});Long.TYPE=Long.prototype.TYPE=Long;c(Long,"parseLong",function(a,d){return Integer.parseInt(a,d||10)});Long.parseLong=Long.prototype.parseLong;j(Long,"$valueOf",function(a){return new Long(a)});Long.$valueOf=Long.prototype.$valueOf;j(Long,"equals",function(a){return null==a||!y(a,Long)?!1:a.valueOf()==this.valueOf()},
"Object");Long.toHexString=Long.prototype.toHexString=function(a){return a.toString(16)};Long.toOctalString=Long.prototype.toOctalString=function(a){return a.toString(8)};Long.toBinaryString=Long.prototype.toBinaryString=function(a){return a.toString(2)};Long.decode=c(Long,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a))throw new NumberFormatException("Invalid Long");return new Long(a)},"~S");java.lang.Short=Short=function(){v(this,arguments)};da(Short,"Short",Number,Comparable,null,!0);Short.prototype.valueOf=
function(){return 0};Short.toString=Short.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Short?"class java.lang.Short":""+this.valueOf()};ea(Short,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));a=a.shortValue();this.valueOf=function(){return a}});Short.MIN_VALUE=Short.prototype.MIN_VALUE=-32768;Short.MAX_VALUE=Short.prototype.MAX_VALUE=32767;Short.TYPE=Short.prototype.TYPE=Short;c(Short,"parseShortRadix",function(a,d){return Integer.parseIntRadix(a,
d).shortValue()},"String, Number");Short.parseShortRadix=Short.prototype.parseShortRadix;c(Short,"parseShort",function(a){return Short.parseShortRadix(a,10)},"String");Short.parseShort=Short.prototype.parseShort;j(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;j(Short,"equals",function(a){return null==a||!y(a,Short)?!1:a.valueOf()==this.valueOf()},"Object");Short.toHexString=Short.prototype.toHexString=function(a){return a.toString(16)};Short.toOctalString=
Short.prototype.toOctalString=function(a){return a.toString(8)};Short.toBinaryString=Short.prototype.toBinaryString=function(a){return a.toString(2)};Short.decode=c(Short,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||-32768>a||32767<a)throw new NumberFormatException("Invalid Short");return new Short(a)},"~S");java.lang.Byte=Byte=function(){v(this,arguments)};da(Byte,"Byte",Number,Comparable,null,!0);Byte.prototype.valueOf=function(){return 0};Byte.toString=Byte.prototype.toString=function(){return 0!=
arguments.length?""+arguments[0]:this===Byte?"class java.lang.Byte":""+this.valueOf()};A(Byte,function(a){"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));a=a.byteValue();this.valueOf=function(){return a}});Byte.serialVersionUID=Byte.prototype.serialVersionUID=-0x63b19f7b11af0c00;Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128;Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127;Byte.SIZE=Byte.prototype.SIZE=8;Byte.TYPE=Byte.prototype.TYPE=Byte;c(Byte,"parseByteRadix",function(a,d){return Integer.parseIntRadix(a,
d).byteValue()},"String, Number");Byte.parseByteRadix=Byte.prototype.parseByteRadix;c(Byte,"parseByte",function(a){return Byte.parseByte(a,10)},"String");Byte.parseByte=Byte.prototype.parseByte;j(Byte,"$valueOf",function(a){return new Byte(a)});Byte.$valueOf=Byte.prototype.$valueOf;j(Byte,"equals",function(a){return null==a||!y(a,Byte)?!1:a.valueOf()==this.valueOf()},"Object");Byte.toHexString=Byte.prototype.toHexString=function(a){return a.toString(16)};Byte.toOctalString=Byte.prototype.toOctalString=
function(a){return a.toString(8)};Byte.toBinaryString=Byte.prototype.toBinaryString=function(a){return a.toString(2)};Byte.decode=c(Byte,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||-128>a||127<a)throw new NumberFormatException("Invalid Byte");return new Byte(a)},"~S");b._floatToString=function(a){a=""+a;0>a.indexOf(".")&&(0>a.indexOf("e")&&"NaN"!=a)&&(a+=".0");return a};java.lang.Float=Float=function(){v(this,arguments)};da(Float,"Float",Number,Comparable,null,!0);Float.prototype.valueOf=
function(){return 0};Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?b._floatToString(arguments[0]):this===Float?"class java.lang.Float":b._floatToString(this.valueOf())};b._a32=null;Float.floatToIntBits=function(a){var d=b._a32||(b._a32=new Float32Array(1));d[0]=a;return(new Int32Array(d.buffer))[0]};ea(Float,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Number(a));this.valueOf=function(){return a}});Float.serialVersionUID=Float.prototype.serialVersionUID=-0x2512365d24c31000;
Float.MIN_VALUE=Float.prototype.MIN_VALUE=1.4E-45;Float.MAX_VALUE=Float.prototype.MAX_VALUE=3.4028235E38;Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Float.NaN=Number.NaN;Float.TYPE=Float.prototype.TYPE=Float;c(Float,"parseFloat",function(a){if(null==a)throw new NumberFormatException("null");if("number"==typeof a)return a;var d=Number(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"String");Float.parseFloat=Float.prototype.parseFloat;
j(Float,"$valueOf",function(a){return new Float(a)});Float.$valueOf=Float.prototype.$valueOf;c(Float,"isNaN",function(a){return isNaN(1==arguments.length?a:this.valueOf())},"Number");Float.isNaN=Float.prototype.isNaN;c(Float,"isInfinite",function(a){return!isFinite(1==arguments.length?a:this.valueOf())},"Number");Float.isInfinite=Float.prototype.isInfinite;j(Float,"equals",function(a){return null==a||!y(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){v(this,arguments)};
da(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?b._floatToString(arguments[0]):this===Double?"class java.lang.Double":b._floatToString(this.valueOf())};ea(Double,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Double.parseDouble(a));this.valueOf=function(){return a}});Double.serialVersionUID=Double.prototype.serialVersionUID=-0x7f4c3db5d6940400;Double.MIN_VALUE=Double.prototype.MIN_VALUE=
4.9E-324;Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157E308;Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Double.NaN=Number.NaN;Double.TYPE=Double.prototype.TYPE=Double;c(Double,"isNaN",function(a){return isNaN(1==arguments.length?a:this.valueOf())},"Number");Double.isNaN=Double.prototype.isNaN;c(Double,"isInfinite",function(a){return!isFinite(1==arguments.length?a:this.valueOf())},"Number");Double.isInfinite=Double.prototype.isInfinite;
c(Double,"parseDouble",function(a){if(null==a)throw new NumberFormatException("null");if("number"==typeof a)return a;var d=Number(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"String");Double.parseDouble=Double.prototype.parseDouble;c(Double,"$valueOf",function(a){return new Double(a)},"Number");Double.$valueOf=Double.prototype.$valueOf;j(Double,"equals",function(a){return null==a||!y(a,Double)?!1:a.valueOf()==this.valueOf()},"Object");Boolean=java.lang.Boolean=Boolean||
function(){v(this,arguments)};if(b._supportsNativeObject)for(d=0;d<b._extendedObjectMethods.length;d++)g=b._extendedObjectMethods[d],Boolean.prototype[g]=b._O.prototype[g];Boolean.__CLASS_NAME__="Boolean";ia(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=b._innerFunctions.equals;Boolean.getName=b._innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;ea(Boolean,function(a){var d=("string"==typeof a?Boolean.toBoolean(a):a)?!0:!1;
this.valueOf=function(){return d}},"~O");Boolean.parseBoolean=c(Boolean,"parseBoolean",function(a){return Boolean.toBoolean(a)},"~S");c(Boolean,"booleanValue",function(){return this.valueOf()});Boolean.$valueOf=j(Boolean,"$valueOf",function(a){return("string"==typeof a?"true".equalsIgnoreCase(a):a)?Boolean.TRUE:Boolean.FALSE});j(Boolean,"toString",function(){return this.valueOf()?"true":"false"});j(Boolean,"hashCode",function(){return this.valueOf()?1231:1237});j(Boolean,"equals",function(a){return y(a,
Boolean)?this.booleanValue()==a.booleanValue():!1},"~O");Boolean.getBoolean=c(Boolean,"getBoolean",function(a){var d=!1;try{d=Boolean.toBoolean(System.getProperty(a))}catch(g){if(!y(g,IllegalArgumentException)&&!y(g,NullPointerException))throw g;}return d},"~S");j(Boolean,"compareTo",function(a){return a.value==this.value?0:this.value?1:-1},"Boolean");Boolean.toBoolean=c(Boolean,"toBoolean",($fz=function(a){return null!=a&&a.equalsIgnoreCase("true")},$fz.isPrivate=!0,$fz),"~S");Boolean.TRUE=Boolean.prototype.TRUE=
new Boolean(!0);Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(!1);Boolean.TYPE=Boolean.prototype.TYPE=Boolean;b._Encoding={};(function(a){a.UTF8="utf-8";a.UTF16="utf-16";a.ASCII="ascii";a.guessEncoding=function(d){return 239==d.charCodeAt(0)&&187==d.charCodeAt(1)&&191==d.charCodeAt(2)?a.UTF8:255==d.charCodeAt(0)&&254==d.charCodeAt(1)?a.UTF16:a.ASCII};a.guessEncodingArray=function(d){return 239==d[0]&&187==d[1]&&191==d[2]?a.UTF8:255==d[0]&&254==d[1]?a.UTF16:a.ASCII};a.readUTF8=function(d){if("string"!=
typeof d)return a.readUTF8Array(d);var g=a.guessEncoding(d),b=0;g==a.UTF8?b=3:g==a.UTF16&&(b=2);for(g=[];b<d.length;b++){var e=d.charCodeAt(b);if(128>e)g[g.length]=d.charAt(b);else if(192<e&&224>e){e&=31;b++;var c=d.charCodeAt(b)&63,e=(e<<6)+c;g[g.length]=String.fromCharCode(e)}else if(224<=e){e&=15;b++;c=d.charCodeAt(b)&63;b++;var f=d.charCodeAt(b)&63,e=(e<<12)+(c<<6)+f;g[g.length]=String.fromCharCode(e)}}return g.join("")};a.readUTF8Array=function(d){var g=a.guessEncodingArray(d),b=0;g==a.UTF8?
b=3:g==a.UTF16&&(b=2);for(g=[];b<d.length;b++){var e=d[b];if(128>e)g[g.length]=String.fromCharCode(e);else if(192<e&&224>e){var e=e&31,c=d[++b]&63,e=(e<<6)+c;g[g.length]=String.fromCharCode(e)}else if(224<=e){var e=e&15,c=d[++b]&63,f=d[++b]&63,e=(e<<12)+(c<<6)+f;g[g.length]=String.fromCharCode(e)}}return g.join("")};a.convert2UTF8=function(d){var g=this.guessEncoding(d),b=0;if(g==a.UTF8)return d;g==a.UTF16&&(b=2);for(var g=Array(0+d.length-b),e=b;e<d.length;e++){var c=d.charCodeAt(e);if(128>c)g[0+
e-b]=d.charAt(e);else if(2047>=c){var f=192+((c&1984)>>6),h=128+(c&63);g[0+e-b]=String.fromCharCode(f)+String.fromCharCode(h)}else f=224+((c&61440)>>12),h=128+((c&4032)>>6),c=128+(c&63),g[0+e-b]=String.fromCharCode(f)+String.fromCharCode(h)+String.fromCharCode(c)}return g.join("")};a.base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");a.encodeBase64=function(d){if(null==d||0==d.length)return d;for(var g=a.base64Chars,b=d.length,e=0,c=[],f,h;e<b;)f=d.charCodeAt(e++),
c[c.length]=g[f>>2],e<b?(h=d.charCodeAt(e++),c[c.length]=g[f<<4&48|h>>4],e<b?(f=d.charCodeAt(e++),c[c.length]=g[h<<2&60|f>>6],c[c.length]=g[f&63]):(c[c.length]=g[h<<2&60],c[c.length]="=")):(c[c.length]=g[f<<4&48],c[c.length]="=",c[c.length]="=");return c.join("")};a.decodeBase64=function(d){if(null==d||0==d.length)return d;var g=a.base64Chars,b=a.xBase64Chars;if(null==a.xBase64Chars){for(var b={},e=0;e<g.length;e++)b[g[e]]=e;a.xBase64Chars=b}for(var g=d.length,e=0,c=[],f,h,j,G,N=0;e<g&&6E4>N++;)f=
b[d.charAt(e++)],h=b[d.charAt(e++)],j=b[d.charAt(e++)],G=b[d.charAt(e++)],c[c.length]=String.fromCharCode(f<<2&255|h>>4),null!=j&&(c[c.length]=String.fromCharCode(h<<4&255|j>>2),null!=G&&(c[c.length]=String.fromCharCode(j<<6&255|G)));return c.join("")};if(null==String.prototype.$replace){java.lang.String=String;b._setDeclared("String",String);if(b._supportsNativeObject)for(var d=0;d<b._extendedObjectMethods.length;d++){var g=b._extendedObjectMethods[d];"to$tring"==g||("toString"==g||"equals"==g||
"hashCode"==g)||(String.prototype[g]=b._O.prototype[g])}ia(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=b._innerFunctions.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;(function(d){d.$replace=function(a,d){if(a==d||0>this.indexOf(a))return""+this;1==a.length?0<="\\$.*+|?^{}()[]".indexOf(a)&&(a="\\"+a):a=a.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(a,d){return"\\"+d});var g=d.indexOf("$");(g=0<=g&&g<d.length-1)&&(d=d.split("$").join("\ufffd"));
var b=this.replace(RegExp(a,"gm"),d);g&&(b=b.split("\ufffd").join("$"));return b};d.$generateExpFunction=function(a){var d=[],g=[],b=0;d[0]="";for(var l=0;l<a.length;l++){var e=a.charAt(l);l!=a.length-1&&"\\"==e?(l++,e=a.charAt(l),"\\"==e&&(d[b]+="\\"),d[b]+=e):l!=a.length-1&&"$"==e?(l++,g[b]=parseInt(a.charAt(l)),b++,d[b]=""):d[b]="\r"==e?d[b]+"\\r":"\n"==e?d[b]+"\\n":"\t"==e?d[b]+"\\t":'"'==e?d[b]+'\\"':d[b]+e}a="f = function (";b=Math.max.apply({},g);for(l=0;l<=b;l++)a+="$"+l,l!=b&&(a+=", ");a+=
") { return ";for(l=0;l<d.length-1;l++)a+='"'+d[l]+'" + $'+g[l]+" + ";a+='"'+d[l]+'"; }';return eval(a)};d.replaceAll=function(a,d){return this.replace(RegExp(a,"gm"),this.$generateExpFunction(d))};d.replaceFirst=function(a,d){return this.replace(RegExp(a,"m"),this.$generateExpFunction(d))};d.matches=function(a){null!=a&&(a="^("+a+")$");a=this.match(RegExp(a,"gm"));return null!=a&&0!=a.length};d.regionMatches=function(a,d,g,b,l){if("number"==typeof a||!0!=a&&!1!=a)l=b,b=g,g=d,d=a,a=!1;if(0>b||0>d||
d>this.length-l||b>g.length-l)return!1;d=this.substring(d,d+l);g=g.substring(b,b+l);a&&(d=d.toLowerCase(),g=g.toLowerCase());return d==g};d.$plit=function(a,d){if(!d&&" "==a)return this.split(a);if(null!=d&&0<d){if(1==d)return this;var g=RegExp("("+a+")","gm"),b=1,l=this.replace(g,function(a){b++;return b==d?"@@_@@":a}),g=RegExp(a,"gm"),g=this.split(g);g.length>d&&(g[d-1]=l.substring(l.indexOf("@@_@@")+5),g.length=d);return g}g=RegExp(a,"gm");return this.split(g)};d.trim||(d.trim=function(){return this.replace(/^\s+/g,
"").replace(/\s+$/g,"")});if(!d.startsWith||!d.endsWith){var g=function(a,d,g){var b=g,l=0,e=d.length;if(0>g||g>a.length-e)return!1;for(;0<=--e;)if(a.charAt(b++)!=d.charAt(l++))return!1;return!0};d.startsWith=function(a){return 1==arguments.length?g(this,arguments[0],0):2==arguments.length?g(this,arguments[0],arguments[1]):!1};d.endsWith=function(a){return g(this,a,this.length-a.length)}}d.equals=function(a){return this.valueOf()==a};d.equalsIgnoreCase=function(a){return null==a?!1:this==a||this.toLowerCase()==
a.toLowerCase()};d.hash=0;d.hashCode=function(){var a=this.hash;if(0==a){for(var d=0,g=this.length,b=0;b<g;b++)a=31*a+this.charCodeAt(d++),a&=4294967295;this.hash=a}return a};d.getBytes=function(){if(4==arguments.length)return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);var d=this;if(1==arguments.length){for(var g=arguments[0].toString().toLowerCase(),b="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),e=!1,c=0;c<b.length;c++)if(b[c]==g){e=!0;break}if(!e)throw new java.io.UnsupportedEncodingException;
if("utf-8"==g||"utf8"==g)d=a.convert2UTF8(this)}g=Array(d.length);for(c=e=b=0;c<d.length;c++)b=d.charCodeAt(c),255<b?(g[e]=26,g[e+1]=b&255,g[e+2]=(b&65280)>>8,e+=2):g[e]=b,e++;return Q(g)};d.contains=function(a){return 0<=this.indexOf(a)};d.compareTo=function(a){return this>a?1:this<a?-1:0};d.toCharArray=function(){for(var a=Array(this.length),d=0;d<this.length;d++)a[d]=this.charAt(d);return a};String.value0f=String.valueOf;String.valueOf=function(a){if("undefined"==a)return String.value0f();if(a instanceof
Array){if(1==arguments.length)return a.join("");for(var d=arguments[1],g=arguments[2],b=Array(g),l=0;l<g;l++)b[l]=a[d+l];return b.join("")}return""+a};d.subSequence=function(a,d){return this.substring(a,d)};d.compareToIgnoreCase=function(a){if(null==a)throw new NullPointerException;var d=this.toUpperCase(),g=a.toUpperCase();if(d==g)return 0;d=this.toLowerCase();g=a.toLowerCase();return d==g?0:d>g?1:-1};d.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var d=0,g=0,
b=this.length;0!=b--;)if(this.charCodeAt(d++)!=a[g++])return!1;return!0};d.getChars=function(a,d,g,b){if(0>a)throw new StringIndexOutOfBoundsException(a);if(d>this.length)throw new StringIndexOutOfBoundsException(d);if(a>d)throw new StringIndexOutOfBoundsException(d-a);if(null==g)throw new NullPointerException;for(var l=0;l<d-a;l++)g[b+l]=this.charAt(a+l)};d.$lastIndexOf=d.lastIndexOf;d.lastIndexOf=function(a,d){return null!=d&&0>=d+this.length?-1:null!=d?this.$lastIndexOf(a,d):this.$lastIndexOf(a)};
d.intern=function(){return this.valueOf()};String.copyValueOf=d.copyValueOf=function(){return 1==arguments.length?String.instantialize(arguments[0]):String.instantialize(arguments[0],arguments[1],arguments[2])};d.codePointAt||(d.codePointAt=d.charCodeAt)})(String.prototype);var c=new TextDecoder;String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var a=arguments[0];return a.BYTES_PER_ELEMENT?0==a.length?"":"number"==typeof a[0]?c.decode(a):a.join(""):a instanceof
Array?0==a.length?"":"number"==typeof a[0]?c.decode(new Uint8Array(a)):a.join(""):"string"==typeof a||a instanceof String?new String(a):""+a;case 2:var a=arguments[0],d=arguments[1];return"string"==typeof d?String.instantialize(a,0,a.length,d):String.instantialize(a,d,0,a.length);case 3:var a=arguments[0],g=arguments[1],d=arguments[2];arguments[2]instanceof Array&&(a=arguments[2],g=arguments[0],d=arguments[1]);var b=Array(d);if(0>g||d+g>a.length)throw new IndexOutOfBoundsException;if(0<d)if(null!=
a[g].length)for(var l=0;l<d;l++)b[l]=a[g+l];else for(l=0;l<d;l++)b[l]=String.fromCharCode(a[g+l]);return b.join("");case 4:a=arguments[0];g=arguments[3];if("string"==typeof g||g instanceof String){g=arguments[1];d=arguments[2];b=new Uint8Array(d);for(l=0;l<d;l++)b[l]=a[g+l];return c.decode(b)}l=arguments[3];g=arguments[2];d=arguments[1];b=Array(l);if(0==d)for(;0<l--;)b[l]=String.fromCharCode(a[l+g]&255);else for(d<<=8;0<l--;)b[l]=String.fromCharCode(d|a[l+g]&255);return b.join("");default:a="";for(l=
0;l<arguments.length;l++)a+=arguments[l];return a}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this.valueOf()})}})(b._Encoding);d=n(function(){this.value=0;v(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);A(d,function(a){this.value=a},"~N");c(d,"charValue",function(){return this.value});j(d,"hashCode",function(){return this.value.charCodeAt(0)});j(d,"equals",function(a){return y(a,Character)?this.value.charCodeAt(0)==
a.charValue().charCodeAt(0):!1},"~O");j(d,"compareTo",function(a){return this.value.charCodeAt(0)-a.value.charCodeAt(0)},"Character");d.toLowerCase=c(d,"toLowerCase",function(a){return(""+a).toLowerCase().charAt(0)},"~N");d.toUpperCase=c(d,"toUpperCase",function(a){return(""+a).toUpperCase().charAt(0)},"~N");d.isDigit=c(d,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~N");d.isUpperCase=c(d,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~N");d.isLowerCase=c(d,"isLowerCase",
function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~N");d.isWhitespace=c(d,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a||5760==a||8192<=a&&8199!=a&&(8203>=a||8232==a||8233==a||12288==a)},"~N");d.isLetter=c(d,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~N");d.isLetterOrDigit=c(d,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~N");d.isSpaceChar=c(d,"isSpaceChar",function(a){a=a.charCodeAt(0);
return 32==a||160==a||5760==a?!0:8192>a?!1:8203>=a||8232==a||8233==a||8239==a||12288==a},"~N");d.digit=c(d,"digit",function(a,d){var g=a.charCodeAt(0);if(2<=d&&36>=d&&128>g){var b=-1;48<=g&&57>=g?b=g-48:97<=g&&122>=g?b=g-87:65<=g&&90>=g&&(b=g-55);return b<d?b:-1}return-1},"~N,~N");j(d,"toString",function(){return String.valueOf([this.value])});d.toString=j(d,"toString",function(a){return this===Character?"class java.lang.Character":String.valueOf(a)},"~N");d.TYPE=d;b._ArrayWrapper=function(a,d){return{a:a,
__CLASS_NAME__:"Array",superClazz:Array,getComponentType:function(){return d},instanceOf:function(a){return y(d,a)},getName:function(){return this.__CLASS_NAME__}}};d=I(java.lang.reflect,"Array");d.newInstance=c(d,"newInstance",function(a,d){var g=x(d);g.getClass=function(){return new b._ArrayWrapper(this,a)};return g},"Class,~N");d.getLength=function(a){return a.length};d.get=function(a,d){return a[d]};a.Date=Date;Date.TYPE="javautil.Date";Date.__CLASS_NAME__="Date";b._setDeclared("java.util.Date",
Date);b._setDeclared("Date",Date);ia(Date,[java.io.Serializable,java.lang.Comparable]);c(a.Date,"clone",function(){return new Date(this.getTime())});c(a.Date,"before",function(a){return this.getTime()<a.getTime()},"javautil.Date");c(a.Date,"after",function(a){return this.getTime()>a.getTime()},"javautil.Date");c(a.Date,"equals",function(d){return y(d,a.Date)&&this.getTime()==d.getTime()},"Object");c(a.Date,"compareTo",function(a){if(null==a)return 1;var d=this.getTime();a=a.getTime();return d<a?-1:
d==a?0:1},"Object");j(a.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});d=n(function(){this.source=null;v(this,arguments)},a,"EventObject",null,java.io.Serializable);A(d,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");c(d,"getSource",function(){return this.source});j(d,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});O(a,"EventListener");d=n(function(){this.listener=null;v(this,
arguments)},a,"EventListenerProxy",null,a.EventListener);A(d,function(a){this.listener=a},"javautil.EventListener");c(d,"getListener",function(){return this.listener});O(a,"Iterator");O(a,"ListIterator",a.Iterator);O(a,"Enumeration");O(a,"Collection",Iterable);O(a,"Set",a.Collection);O(a,"Map");O(a.Map,"Entry");O(a,"List",a.Collection);O(a,"Queue",a.Collection);O(a,"RandomAccess");d=n(function(){this.stackTrace=this.cause=this.detailMessage=null;v(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);
P(d,function(){this.cause=this});A(d,function(){this.fillInStackTrace()});A(d,function(a,d){this.fillInStackTrace();!d&&"object"==typeof a&&(d=a,a=d.toString());d&&(this.cause=d);this.detailMessage=a},"~S,Throwable");c(d,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(d,"getLocalizedMessage",function(){return this.getMessage()});c(d,"getCause",function(){return this.cause===this?null:this.cause});c(d,"initCause",function(a){if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");
if(a===this)throw new IllegalArgumentException("Self-causation not permitted");this.cause=a;return this},"Throwable");j(d,"toString",function(){var a=this.getClass().getName(),d=this.message||this.detailMessage;return d?a+": "+d:a});c(d,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+ra())});c(d,"getStackTrace",function(){for(var a=""+this+"\n",d=0;d<this.stackTrace.length;d++){var g=this.stackTrace[d],b=g.methodName.indexOf("(");if("construct"!=
g.methodName.substring(0,b).replace(/\s+/g,"")||null==g.nativeClazz||0>wa(g.nativeClazz,Throwable))a+=g+"\n"}return a});c(d,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(d,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(d,"fillInStackTrace",function(){this.stackTrace=[];for(var a=arguments.callee.caller,d=null,g=[],c=b._callingStackTraces.length-1,k=!0;-1<c||null!=a;){var m=null;if(!k||a==Fa||a==Z||null==a){if(0>c)break;k=!0;d=b._callingStackTraces[c].caller;
m=b._callingStackTraces[c].owner;c--}else d=a,null!=d.claxxOwner?m=d.claxxOwner:null!=d.exClazz&&(m=d.exClazz);a=new StackTraceElement(null!=m&&0!=m.__CLASS_NAME__.length?m.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+xa(d.arguments)+")",null,-1);a.nativeClazz=m;this.stackTrace[this.stackTrace.length]=a;for(m=0;m<g.length;m++)g[m]==d&&(a=new StackTraceElement("lost","missing",null,-3),a.nativeClazz=null,this.stackTrace[this.stackTrace.length]=a,k=!1);null!=d&&(g[g.length]=
d);a=d.arguments.callee.caller}b._initializingException=!1;return this});c(d,"setStackTrace",function(a){a=a.clone();for(var d=0;d<a.length;d++)if(null==a[d])throw new NullPointerException("stackTrace["+d+"]");this.stackTrace=a},"~A");d=n(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;v(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);A(d,function(a,d,g,b){if(null==a||null==d)throw new NullPointerException;this.declaringClass=a;this.methodName=
d;this.fileName=g;this.lineNumber=b},"~S,~S,~S,~N");j(d,"equals",function(a){if(!y(a,StackTraceElement)||(null==this.methodName||null==a.methodName)||!this.getMethodName().equals(a.getMethodName())||!this.getClassName().equals(a.getClassName()))return!1;var d=this.getFileName();if(null==d){if(null!=a.getFileName())return!1}else if(!d.equals(a.getFileName()))return!1;return this.getLineNumber()!=a.getLineNumber()?!1:!0},"~O");c(d,"getClassName",function(){return null==this.declaringClass?"<unknown class>":
this.declaringClass});c(d,"getFileName",function(){return this.fileName});c(d,"getLineNumber",function(){return this.lineNumber});c(d,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});j(d,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(d,"isNativeMethod",function(){return-2==this.lineNumber});j(d,"toString",function(){var a=this.getClassName()+"."+this.getMethodName();if(this.isNativeMethod())a+=
"(Native Method)";else{var d=this.getFileName();if(null==d)a+="(Unknown Source)";else{var g=this.getLineNumber(),a=a+"("+d;0<=g&&(a+=":",a+=g);a+=")"}}return a});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+(this.getStackTrace?this.getStackTrace():ra())});Clazz_Error=Error;Clazz_declareTypeError=function(a,d,g,b,c){return n(function(){v(this,arguments);return Clazz_Error()},a,d,g,b,c)};b._Error||(b._Error=Error);n(function(){v(this,
arguments);return b._Error()},java.lang,"Error",Throwable);d=I(java.lang,"LinkageError",Error);d=I(java.lang,"IncompatibleClassChangeError",LinkageError);d=I(java.lang,"AbstractMethodError",IncompatibleClassChangeError);d=I(java.lang,"AssertionError",Error);A(d,function(a){M(this,AssertionError,[""+a,y(a,Throwable)?a:null])},"~O");d=I(java.lang,"ClassCircularityError",LinkageError);d=I(java.lang,"ClassFormatError",LinkageError);d=n(function(){this.exception=null;v(this,arguments)},java.lang,"ExceptionInInitializerError",
LinkageError);A(d,function(){M(this,ExceptionInInitializerError);this.initCause(null)});A(d,function(a){M(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");A(d,function(a){M(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(d,"getException",function(){return this.exception});j(d,"getCause",function(){return this.exception});d=I(java.lang,"IllegalAccessError",IncompatibleClassChangeError);d=I(java.lang,"InstantiationError",IncompatibleClassChangeError);
d=I(java.lang,"VirtualMachineError",Error);d=I(java.lang,"InternalError",VirtualMachineError);d=I(java.lang,"NoClassDefFoundError",LinkageError);d=I(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);d=I(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);d=I(java.lang,"OutOfMemoryError",VirtualMachineError);d=I(java.lang,"StackOverflowError",VirtualMachineError);d=I(java.lang,"UnknownError",VirtualMachineError);d=I(java.lang,"UnsatisfiedLinkError",LinkageError);d=I(java.lang,"UnsupportedClassVersionError",
ClassFormatError);d=I(java.lang,"VerifyError",LinkageError);d=I(java.lang,"ThreadDeath",Error);A(d,function(){M(this,ThreadDeath,[])});d=I(java.lang,"Exception",Throwable);d=I(java.lang,"RuntimeException",Exception);d=I(java.lang,"ArithmeticException",RuntimeException);d=I(java.lang,"IndexOutOfBoundsException",RuntimeException);d=I(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);A(d,function(a){M(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");d=
I(java.lang,"ArrayStoreException",RuntimeException);d=I(java.lang,"ClassCastException",RuntimeException);d=n(function(){this.ex=null;v(this,arguments)},java.lang,"ClassNotFoundException",Exception);A(d,function(){M(this,ClassNotFoundException,[ca("Throwable")])});A(d,function(a){M(this,ClassNotFoundException,[a,null])},"~S");A(d,function(a,d){M(this,ClassNotFoundException,[a]);this.ex=d},"~S,Throwable");c(d,"getException",function(){return this.ex});j(d,"getCause",function(){return this.ex});d=I(java.lang,
"CloneNotSupportedException",Exception);d=I(java.lang,"IllegalAccessException",Exception);d=I(java.lang,"IllegalArgumentException",RuntimeException);A(d,function(a){M(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");d=I(java.lang,"IllegalMonitorStateException",RuntimeException);d=I(java.lang,"IllegalStateException",RuntimeException);A(d,function(a){M(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");d=I(java.lang,"IllegalThreadStateException",IllegalArgumentException);
d=I(java.lang,"InstantiationException",Exception);d=I(java.lang,"InterruptedException",Exception);d=I(java.lang,"NegativeArraySizeException",RuntimeException);d=I(java.lang,"NoSuchFieldException",Exception);d=I(java.lang,"NoSuchMethodException",Exception);d=I(java.lang,"NullPointerException",RuntimeException);d=I(java.lang,"NumberFormatException",IllegalArgumentException);d=I(java.lang,"SecurityException",RuntimeException);A(d,function(a){M(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");
d=I(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);A(d,function(a){M(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");d=I(java.lang,"UnsupportedOperationException",RuntimeException);A(d,function(){M(this,UnsupportedOperationException,[])});A(d,function(a){M(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");d=n(function(){this.target=null;v(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);A(d,
function(){M(this,java.lang.reflect.InvocationTargetException,[ca("Throwable")])});A(d,function(a){M(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");A(d,function(a,d){M(this,java.lang.reflect.InvocationTargetException,[d,a]);this.target=a},"Throwable,~S");c(d,"getTargetException",function(){return this.target});j(d,"getCause",function(){return this.target});d=n(function(){this.undeclaredThrowable=null;v(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",
RuntimeException);A(d,function(a){M(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");A(d,function(a,d){M(this,java.lang.reflect.UndeclaredThrowableException,[d]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");c(d,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});j(d,"getCause",function(){return this.undeclaredThrowable});d=I(java.io,"IOException",Exception);d=I(java.io,"CharConversionException",java.io.IOException);
d=I(java.io,"EOFException",java.io.IOException);d=I(java.io,"FileNotFoundException",java.io.IOException);d=n(function(){this.bytesTransferred=0;v(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);d=I(java.io,"SyncFailedException",java.io.IOException);d=I(java.io,"UnsupportedEncodingException",java.io.IOException);d=I(java.io,"UTFDataFormatException",java.io.IOException);c(d,"getMessage",function(){var a=Z(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?
a+"; "+this.detail.toString():a});j(d,"getCause",function(){return this.detail});d=I(a,"ConcurrentModificationException",RuntimeException);A(d,function(){M(this,a.ConcurrentModificationException,[])});d=I(a,"EmptyStackException",RuntimeException);d=n(function(){this.key=this.className=null;v(this,arguments)},a,"MissingResourceException",RuntimeException);A(d,function(d,g,b){M(this,a.MissingResourceException,[d]);this.className=g;this.key=b},"~S,~S,~S");c(d,"getClassName",function(){return this.className});
c(d,"getKey",function(){return this.key});d=I(a,"NoSuchElementException",RuntimeException);d=I(a,"TooManyListenersException",Exception);d=I(java.lang,"Void");d.TYPE=d;O(java.lang.reflect,"GenericDeclaration");O(java.lang.reflect,"AnnotatedElement");d=I(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);A(d,function(){});c(d,"isAccessible",function(){return!1});d.setAccessible=c(d,"setAccessible",function(){},"~A,~B");c(d,"setAccessible",function(){},"~B");j(d,"isAnnotationPresent",
function(){return!1},"Class");j(d,"getDeclaredAnnotations",function(){return[]});j(d,"getAnnotations",function(){return[]});j(d,"getAnnotation",function(){return null},"Class");d.marshallArguments=c(d,"marshallArguments",function(){return null},"~A,~A");c(d,"invokeV",function(){},"~O,~A");c(d,"invokeL",function(){return null},"~O,~A");c(d,"invokeI",function(){return 0},"~O,~A");c(d,"invokeJ",function(){return 0},"~O,~A");c(d,"invokeF",function(){return 0},"~O,~A");c(d,"invokeD",function(){return 0},
"~O,~A");d.emptyArgs=d.prototype.emptyArgs=[];O(java.lang.reflect,"InvocationHandler");d=O(java.lang.reflect,"Member");d=I(java.lang.reflect,"Modifier");A(d,function(){});d.isAbstract=c(d,"isAbstract",function(a){return 0!=(a&1024)},"~N");d.isFinal=c(d,"isFinal",function(a){return 0!=(a&16)},"~N");d.isInterface=c(d,"isInterface",function(a){return 0!=(a&512)},"~N");d.isNative=c(d,"isNative",function(a){return 0!=(a&256)},"~N");d.isPrivate=c(d,"isPrivate",function(a){return 0!=(a&2)},"~N");d.isProtected=
c(d,"isProtected",function(a){return 0!=(a&4)},"~N");d.isPublic=c(d,"isPublic",function(a){return 0!=(a&1)},"~N");d.isStatic=c(d,"isStatic",function(a){return 0!=(a&8)},"~N");d.isStrict=c(d,"isStrict",function(a){return 0!=(a&2048)},"~N");d.isSynchronized=c(d,"isSynchronized",function(a){return 0!=(a&32)},"~N");d.isTransient=c(d,"isTransient",function(a){return 0!=(a&128)},"~N");d.isVolatile=c(d,"isVolatile",function(a){return 0!=(a&64)},"~N");d.toString=c(d,"toString",function(a){var d=[];java.lang.reflect.Modifier.isPublic(a)&&
(d[d.length]="public");java.lang.reflect.Modifier.isProtected(a)&&(d[d.length]="protected");java.lang.reflect.Modifier.isPrivate(a)&&(d[d.length]="private");java.lang.reflect.Modifier.isAbstract(a)&&(d[d.length]="abstract");java.lang.reflect.Modifier.isStatic(a)&&(d[d.length]="static");java.lang.reflect.Modifier.isFinal(a)&&(d[d.length]="final");java.lang.reflect.Modifier.isTransient(a)&&(d[d.length]="transient");java.lang.reflect.Modifier.isVolatile(a)&&(d[d.length]="volatile");java.lang.reflect.Modifier.isSynchronized(a)&&
(d[d.length]="synchronized");java.lang.reflect.Modifier.isNative(a)&&(d[d.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(d[d.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(d[d.length]="interface");return 0<d.length?d.join(" "):""},"~N");d=n(function(){this.exceptionTypes=this.parameterTypes=this.clazz=null;this.modifiers=0;v(this,arguments)},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
A(d,function(a,d,g,b){M(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=d;this.exceptionTypes=g;this.modifiers=b},"Class,~A,~A,~N");j(d,"getTypeParameters",function(){return null});c(d,"toGenericString",function(){return null});c(d,"getGenericParameterTypes",function(){return null});c(d,"getGenericExceptionTypes",function(){return null});c(d,"getParameterAnnotations",function(){return null});c(d,"isVarArgs",function(){return!1});j(d,"isSynthetic",function(){return!1});j(d,
"equals",function(a){if(null!=a&&y(a,java.lang.reflect.Constructor)&&this.getDeclaringClass()===a.getDeclaringClass()){var d=this.parameterTypes;a=a.parameterTypes;if(d.length==a.length){for(var g=0;g<d.length;g++)if(d[g]!==a[g])return!1;return!0}}return!1},"~O");j(d,"getDeclaringClass",function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});j(d,"getModifiers",function(){return this.modifiers});j(d,"getName",function(){return this.getDeclaringClass().getName()});
c(d,"getParameterTypes",function(){return this.parameterTypes});j(d,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});c(d,"newInstance",function(a){var d=new this.clazz(Ga);v(d,a);return d},"~A");j(d,"toString",function(){return null});d=I(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);j(d,"isSynthetic",function(){return!1});c(d,"toGenericString",function(){return null});c(d,"isEnumConstant",function(){return!1});c(d,"getGenericType",
function(){return null});j(d,"equals",function(){return!1},"~O");j(d,"getDeclaringClass",function(){return null});j(d,"getName",function(){return null});c(d,"getType",function(){return null});j(d,"hashCode",function(){return 0});j(d,"toString",function(){return null});d=n(function(){this.exceptionTypes=this.parameterTypes=this.returnType=this.name=this.clazz=null;this.modifiers=0;v(this,arguments)},java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,
java.lang.reflect.Member]);A(d,function(a,d,g,b,c,m){M(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=d;this.parameterTypes=g;this.returnType=b;this.exceptionTypes=c;this.modifiers=m},"Class,~S,~A,Class,~A,~N");j(d,"getTypeParameters",function(){return null});c(d,"toGenericString",function(){return null});c(d,"getGenericParameterTypes",function(){return null});c(d,"getGenericExceptionTypes",function(){return null});c(d,"getGenericReturnType",function(){return null});c(d,"getParameterAnnotations",
function(){return null});c(d,"isVarArgs",function(){return!1});c(d,"isBridge",function(){return!1});j(d,"isSynthetic",function(){return!1});c(d,"getDefaultValue",function(){return null});j(d,"equals",function(a){if(null!=a&&y(a,java.lang.reflect.Method)&&this.getDeclaringClass()===a.getDeclaringClass()&&this.getName()===a.getName()){var d=this.parameterTypes;a=a.parameterTypes;if(d.length==a.length){for(var g=0;g<d.length;g++)if(d[g]!==a[g])return!1;return!0}}return!1},"~O");j(d,"getDeclaringClass",
function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});j(d,"getModifiers",function(){return this.modifiers});j(d,"getName",function(){return this.name});c(d,"getParameterTypes",function(){return this.parameterTypes});c(d,"getReturnType",function(){return this.returnType});j(d,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode()});c(d,"invoke",function(a,d){var g=this.clazz.prototype[this.getName()];null==g&&(g=
this.clazz[this.getName()]);null!=g&&g.apply(a,d)},"~O,~A");j(d,"toString",function(){return null})})(ba);if(!Jmol._debugCode){z=n(function(){this.$name=null;this.$ordinal=0;v(this,arguments)},java.lang,"Enum",null,[Comparable,java.io.Serializable]);A(z,function(b,a){this.$name=b;this.$ordinal=a},"~S,~N");c(z,"name",function(){return this.$name});c(z,"ordinal",function(){return this.$ordinal});j(z,"toString",function(){return this.$name});j(z,"equals",function(b){return this===b},"~O");j(z,"clone",
function(){throw new CloneNotSupportedException;});j(z,"compareTo",function(b){if(this.getClass()!==b.getClass()&&this.getDeclaringClass()!==b.getDeclaringClass())throw new ClassCastException;return this.$ordinal-b.$ordinal},"~O");c(z,"getDeclaringClass",function(){var b=this.getClass(),a=b.getSuperclass();return a===Enum?b:a});z.$valueOf=c(z,"$valueOf",function(b,a){var d=null,d=b.$clazz$[a];if(null!=d)return d;if(null==a)throw new NullPointerException("Name is null");throw new IllegalArgumentException("No enum const "+
b+"."+a);},"Class,~S");j(z,"finalize",function(){});B(null,"java.lang.Thread",["java.util.Date"],function(){var b=n(function(){this.name=this.group=this.target=null;this.priority=0;v(this,arguments)},java.lang,"Thread",null,Runnable);A(b,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");A(b,function(a,d){this.init(a,d,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");A(b,function(a){this.init(null,null,a,0)},"~S");
A(b,function(a,d){this.init(a,null,d,0)},"ThreadGroup,~S");A(b,function(a,d){this.init(null,a,d,0)},"Runnable,~S");A(b,function(a,d,g){this.init(a,d,g,0)},"ThreadGroup,Runnable,~S");A(b,function(a,d,g,b){this.init(a,d,g,b)},"ThreadGroup,Runnable,~S,~N");b.currentThread=c(b,"currentThread",function(){null==Thread.J2S_THREAD&&(Thread.J2S_THREAD=new Thread);return Thread.J2S_THREAD});b.sleep=c(b,"sleep",function(){alert("Thread.sleep is not implemented in Java2Script!")},"~N");c(b,"init",function(a,
d,g){null==a&&(a=new ThreadGroup);this.group=a;this.target=d;this.name=g;this.priority=5},"ThreadGroup,Runnable,~S,~N");c(b,"start",function(){this.startT()});c(b,"startT",function(){window.setTimeout(function(a){return function(){a.run()}}(this),0)});c(b,"run",function(){null!=this.target&&this.target.run()});c(b,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;this.priority=a},"~N");c(b,"getPriority",function(){return this.priority});c(b,"setName",function(a){this.name=
a},"~S");c(b,"getName",function(){return String.valueOf(this.name)});c(b,"getThreadGroup",function(){return this.group});j(b,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+","+this.getPriority()+",]"});b.J2S_THREAD=null});z=n(function(){this.name=this.parent=null;this.maxPriority=0;v(this,arguments)},java.lang,"ThreadGroup",null);A(z,function(){this.name="system";this.maxPriority=10});A(z,
function(b){this.construct(Thread.currentThread().getThreadGroup(),b)},"~S");A(z,function(b,a){if(null==b)throw new NullPointerException;this.name=a;this.parent=b;this.maxPriority=10},"ThreadGroup,~S");c(z,"getName",function(){return this.name});c(z,"getParent",function(){return this.parent});c(z,"getMaxPriority",function(){return this.maxPriority});B(["java.io.FilterInputStream"],"java.io.BufferedInputStream",null,function(){var b=n(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;
this.marklimit=0;v(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);A(b,function(a){M(this,java.io.BufferedInputStream,[a]);this.buf=Q(8192,0)},"java.io.InputStream");c(b,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");return a});c(b,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a});j(b,"resetStream",function(){});c(b,"fill",function(){var a=this.getBufIfOpen();if(0>
this.markpos)this.pos=0;else if(this.pos>=a.length)if(0<this.markpos){var d=this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,d);this.pos=d;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(d=2*this.pos,d>this.marklimit&&(d=this.marklimit),d=Q(d,0),System.arraycopy(a,0,d,0,this.pos),a=this.buf=d);this.count=this.pos;a=this.isRead(a,this.pos,a.length-this.pos);0<a&&(this.count=a+this.pos)});j(b,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=
this.count)?-1:this.getBufIfOpen()[this.pos++]&255});c(b,"read1",function(a,d,g){var b=this.count-this.pos;if(0>=b){if(g>=this.getBufIfOpen().length&&0>this.markpos)return this.isRead(a,d,g);this.fill();b=this.count-this.pos;if(0>=b)return-1}g=b<g?b:g;System.arraycopy(this.getBufIfOpen(),this.pos,a,d,g);this.pos+=g;return g},"~A,~N,~N");c(b,"isRead",function(a,d,g){var b=this.getInIfOpen();return b.readBAIS?b.readBAIS(a,d,g):b.read(a,d,g)},"~A,~N,~N");j(b,"read",function(a,d,g){return this.readBIS(a,
d,g)},"~A,~N,~N");c(b,"readBIS",function(a,d,g){this.getBufIfOpen();if(0>(d|g|d+g|a.length-(d+g)))throw new IndexOutOfBoundsException;if(0==g)return 0;for(var b=0;;){var e=this.read1(a,d+b,g-b);if(0>=e)return 0==b?e:b;b+=e;if(b>=g)return b;e=this.$in;if(null!=e&&0>=e.available())return b}},"~A,~N,~N");j(b,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var d=this.count-this.pos;if(0>=d){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();d=this.count-this.pos;if(0>=d)return 0}a=
d<a?d:a;this.pos+=a;return a},"~N");j(b,"available",function(){var a=this.count-this.pos,d=this.getInIfOpen().available();return a>2147483647-d?2147483647:a+d});j(b,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");j(b,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});j(b,"markSupported",function(){return!0});j(b,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()})});B(["java.io.Reader"],
"java.io.BufferedReader",null,function(){var b=n(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;v(this,arguments)},java.io,"BufferedReader",java.io.Reader);A(b,function(a){M(this,java.io.BufferedReader,[a]);this.$in=a;this.setSize(8192)},"java.io.Reader");c(b,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=Y(a,"\x00");this.nextChar=this.nChars=0},"~N");c(b,"ensureOpen",
function(){if(null==this.$in)throw new java.io.IOException("Stream closed");});c(b,"fill",function(){var a;if(-1>=this.markedChar)a=0;else{var d=this.nextChar-this.markedChar;d>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,d):(a=Y(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,d),this.cb=a),this.markedChar=0,this.nextChar=this.nChars=a=d)}do d=this.$in.read(this.cb,
a,this.cb.length-a);while(0==d);0<d&&(this.nChars=a+d,this.nextChar=a)});c(b,"read1",function(a,d,g){if(this.nextChar>=this.nChars){if(g>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,d,g);this.fill()}if(this.nextChar>=this.nChars||this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&(this.nextChar++,this.nextChar>=this.nChars&&this.fill(),this.nextChar>=this.nChars)))return-1;g=Math.min(g,this.nChars-this.nextChar);System.arraycopy(this.cb,this.nextChar,a,d,g);this.nextChar+=
g;return g},"~A,~N,~N");c(b,"read",function(a,d,g){this.ensureOpen();if(0>d||d>a.length||0>g||d+g>a.length||0>d+g)throw new IndexOutOfBoundsException;if(0==g)return 0;var b=this.read1(a,d,g);if(0>=b)return b;for(;b<g&&this.$in.ready();){var e=this.read1(a,d+b,g-b);if(0>=e)break;b+=e}return b},"~A,~N,~N");c(b,"readLine1",function(a){var d=null,g;this.ensureOpen();for(a=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)return null!=d&&0<d.length?d.toString():null;
var b=!1,e=String.fromCharCode(0),c;a&&"\n"==this.cb[this.nextChar]&&this.nextChar++;a=this.skipLF=!1;c=this.nextChar;a:for(;c<this.nChars;c++)if(e=this.cb[c],"\n"==e||"\r"==e){b=!0;break a}g=this.nextChar;this.nextChar=c;g=String.instantialize(this.cb,g,c-g);if(b)return null!=d&&(g=d+=g),this.nextChar++,"\r"==e&&(this.skipLF=!0),g;null==d&&(d="");d+=g}},"~B");c(b,"readLine",function(){return this.readLine1(!1)});j(b,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");
this.ensureOpen();for(var d=a;0<d;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)break;this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&this.nextChar++);var g=this.nChars-this.nextChar;if(d<=g){this.nextChar+=d;d=0;break}d-=g;this.nextChar=this.nChars}return a-d},"~N");c(b,"ready",function(){this.ensureOpen();this.skipLF&&(this.nextChar>=this.nChars&&this.$in.ready()&&this.fill(),this.nextChar<this.nChars&&("\n"==this.cb[this.nextChar]&&this.nextChar++,this.skipLF=
!1));return this.nextChar<this.nChars||this.$in.ready()});j(b,"markSupported",function(){return!0});j(b,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.readAheadLimit=a;this.markedChar=this.nextChar;this.markedSkipLF=this.skipLF},"~N");j(b,"reset",function(){this.ensureOpen();if(0>this.markedChar)throw new java.io.IOException(-2==this.markedChar?"Mark invalid":"Stream not marked");this.nextChar=this.markedChar;this.skipLF=this.markedSkipLF});
c(b,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)})});B(["java.io.Writer"],"java.io.BufferedWriter",null,function(){var b=n(function(){this.buf=this.out=null;this.pos=0;this.lineSeparator="\r\n";v(this,arguments)},java.io,"BufferedWriter",java.io.Writer);A(b,function(a){M(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=Y(8192,"\x00")},"java.io.Writer");A(b,function(a,d){M(this,java.io.BufferedWriter,[a]);if(0<d)this.out=a,this.buf=Y(d,"\x00");else throw new IllegalArgumentException("K0058");
},"java.io.Writer,~N");c(b,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});c(b,"flush",function(){if(this.isOpen())0<this.pos&&this.out.write(this.buf,0,this.pos),this.pos=0,this.out.flush();else throw new java.io.IOException("K005d");});c(b,"isOpen",function(){return null!=this.out});c(b,"newLine",function(){this.write("\r\n",0,2)});c(b,"write",function(a,d,g){if(!this.isOpen())throw new java.io.IOException("K005d");if(0>d||d>a.length-g||0>g)throw new IndexOutOfBoundsException;
if(0==this.pos&&g>=this.buf.length)this.out.write(a,d,g);else{var b=this.buf.length-this.pos;g<b&&(b=g);0<b&&(System.arraycopy(a,d,this.buf,this.pos,b),this.pos+=b);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,g>b&&(d+=b,b=g-b,b>=this.buf.length?this.out.write(a,d,b):(System.arraycopy(a,d,this.buf,this.pos,b),this.pos+=b)))}},"~A,~N,~N");c(b,"write",function(a){if(this.isOpen())this.pos>=this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0),
this.buf[this.pos++]=String.fromCharCode(a);else throw new java.io.IOException("K005d");},"~N");c(b,"write",function(a,d,g){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=g)){if(d>a.length-g||0>d)throw new StringIndexOutOfBoundsException;if(0==this.pos&&g>=this.buf.length){var b=Y(g,"\x00");a.getChars(d,d+g,b,0);this.out.write(b,0,g)}else{var e=this.buf.length-this.pos;g<e&&(e=g);0<e&&(a.getChars(d,d+e,this.buf,this.pos),this.pos+=e);this.pos==this.buf.length&&(this.out.write(this.buf,
0,this.buf.length),this.pos=0,g>e&&(d+=e,e=g-e,e>=this.buf.length?(b=Y(g,"\x00"),a.getChars(d,d+e,b,0),this.out.write(b,0,e)):(a.getChars(d,d+e,this.buf,this.pos),this.pos+=e)))}}},"~S,~N,~N")});B(["java.io.InputStream"],"java.io.ByteArrayInputStream",null,function(){var b=n(function(){this.buf=null;this.count=this.$mark=this.pos=0;v(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);A(b,function(a){M(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},
"~A");j(b,"readByteAsInt",function(){return this.pos<this.count?this.buf[this.pos++]&255:-1});j(b,"read",function(a,d,g){return this.readBAIS(a,d,g)},"~A,~N,~N");c(b,"readBAIS",function(a,d,g){if(null==a)throw new NullPointerException;if(0>d||0>g||g>a.length-d)throw new IndexOutOfBoundsException;if(this.pos>=this.count)return-1;var b=this.count-this.pos;g>b&&(g=b);if(0>=g)return 0;System.arraycopy(this.buf,this.pos,a,d,g);this.pos+=g;return g},"~A,~N,~N");j(b,"skip",function(a){var d=this.count-this.pos;
a<d&&(d=0>a?0:a);this.pos+=d;return d},"~N");j(b,"available",function(){return this.count-this.pos});j(b,"markSupported",function(){return!0});j(b,"mark",function(){this.$mark=this.pos},"~N");j(b,"resetStream",function(){});j(b,"reset",function(){this.pos=this.$mark});j(b,"close",function(){})});B(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",null,function(){var b=n(function(){this.buf=null;this.count=0;v(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);A(b,function(){this.construct(32)});
A(b,function(a){M(this,java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=Q(a,0)},"~N");c(b,"ensureCapacity",function(a){0<a-this.buf.length&&this.grow(a)},"~N");c(b,"grow",function(a){var d=this.buf.length<<1;0>d-a&&(d=a);if(0>d){if(0>a)throw new OutOfMemoryError;d=a}this.buf=java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,d)},"~N");b.arrayCopyByte=c(b,"arrayCopyByte",function(a,d){var g=Q(d,0);System.arraycopy(a,0,g,0,a.length<
d?a.length:d);return g},"~A,~N");j(b,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);this.buf[this.count]=a;this.count+=1},"~N");c(b,"write",function(a,d,g){if(0>d||d>a.length||0>g||0<d+g-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+g);System.arraycopy(a,d,this.buf,this.count,g);this.count+=g},"~A,~N,~N");c(b,"writeTo",function(a){a.write(this.buf,0,this.count)},"java.io.OutputStream");c(b,"reset",function(){this.count=0});c(b,"toByteArray",function(){return this.count==
this.buf.length?this.buf:java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,this.count)});c(b,"size",function(){return this.count});j(b,"toString",function(){return String.instantialize(this.buf,0,this.count)});j(b,"close",function(){})});B(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){var b=n(function(){this.$in=null;v(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);A(b,function(a){M(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");c(b,
"readByteAsInt",function(){return this.$in.readByteAsInt()});j(b,"read",function(a,d,g){return this.$in.read(a,d,g)},"~A,~N,~N");c(b,"skip",function(a){return this.$in.skip(a)},"~N");c(b,"available",function(){return this.$in.available()});c(b,"close",function(){this.$in.close()});c(b,"mark",function(a){this.$in.mark(a)},"~N");c(b,"reset",function(){this.$in.reset()});c(b,"markSupported",function(){return this.$in.markSupported()})});B(["java.io.Closeable"],"java.io.InputStream",null,function(){var b=
I(java.io,"InputStream",null,java.io.Closeable);c(b,"read",function(a,d,g){if(null==a)throw new NullPointerException;if(0>d||0>g||g>a.length-d)throw new IndexOutOfBoundsException;if(0==g)return 0;var b=this.readByteAsInt();if(-1==b)return-1;a[d]=b;var e=1;try{for(;e<g;e++){b=this.readByteAsInt();if(-1==b)break;a[d+e]=b}}catch(c){if(!H(c,"java.io.IOException"))throw c;}return e},"~A,~N,~N");c(b,"skip",function(a){var d=a,g;null==java.io.InputStream.skipBuffer&&(java.io.InputStream.skipBuffer=Q(2048,
0));var b=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<d;){g=this.read(b,0,Math.min(2048,d));if(0>g)break;d-=g}return a-d},"~N");c(b,"available",function(){return 0});j(b,"close",function(){});c(b,"mark",function(){},"~N");c(b,"reset",function(){throw new java.io.IOException("mark/reset not supported");});c(b,"markSupported",function(){return!1});c(b,"resetStream",function(){});b.skipBuffer=null});B(["java.io.Reader"],"java.io.InputStreamReader",null,function(){var b=n(function(){this.$in=
null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;v(this,arguments)},java.io,"InputStreamReader",java.io.Reader);A(b,function(a,d){M(this,java.io.InputStreamReader,[a]);this.$in=a;this.charsetName=d;if(!(this.isUTF8="UTF-8".equals(d))&&!"ISO-8859-1".equals(d))throw new NullPointerException("charsetName");},"java.io.InputStream,~S");c(b,"getEncoding",function(){return this.charsetName});j(b,"read",function(a,d,g){if(null==this.bytearr||this.bytearr.length<g)this.bytearr=
Q(g,0);var b,e,c=0,h=d,k=this.$in.read(this.bytearr,this.pos,g-this.pos),m=this.$in.available();if(0>k)return-1;for(var E=k;c<E;){g=this.bytearr[c]&255;if(this.isUTF8)switch(g>>4){case 12:case 13:if(c+1>=k){if(1<=m){E=c;continue}}else if(128==((b=this.bytearr[c+1])&192)){a[h++]=String.fromCharCode((g&31)<<6|b&63);c+=2;continue}this.isUTF8=!1;break;case 14:if(c+2>=k){if(2<=m){E=c;continue}}else if(128==((b=this.bytearr[c+1])&192)&&128==((e=this.bytearr[c+2])&192)){a[h++]=String.fromCharCode((g&15)<<
12|(b&63)<<6|e&63);c+=3;continue}this.isUTF8=!1}c++;a[h++]=String.fromCharCode(g)}this.pos=k-c;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[c++];return h-d},"~A,~N,~N");j(b,"ready",function(){return this.isOpen});j(b,"close",function(){this.$in.close();this.isOpen=!1})});B(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",null,function(){var b=I(java.io,"OutputStream",null,[java.io.Closeable,java.io.Flushable]);c(b,"write",function(a,d,g){if(null==a)throw new NullPointerException;
if(0>d||d>a.length||0>g||d+g>a.length||0>d+g)throw new IndexOutOfBoundsException;if(0!=g)for(var b=0;b<g;b++)this.writeByteAsInt(a[d+b])},"~A,~N,~N");j(b,"flush",function(){});j(b,"close",function(){})});B(["java.io.Closeable"],"java.io.Reader",null,function(){var b=n(function(){this.lock=null;this.skipBuffer=String.fromCharCode(null);v(this,arguments)},java.io,"Reader",null,java.io.Closeable);A(b,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");c(b,"skip",function(a){if(0>
a)throw new IllegalArgumentException("skip value is negative");var d=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<d)this.skipBuffer=Y(d,"\x00");for(var g=a;0<g;){var b=this.read(this.skipBuffer,0,Math.min(g,d));if(-1==b)break;g-=b}return a-g},"~N");c(b,"ready",function(){return!1});c(b,"markSupported",function(){return!1});c(b,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");c(b,"reset",function(){throw new java.io.IOException("reset() not supported");
})});B(["java.io.Reader"],"java.io.StringReader",null,function(){var b=n(function(){this.str=null;this.$mark=this.next=this.length=0;v(this,arguments)},java.io,"StringReader",java.io.Reader);A(b,function(a){M(this,java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");c(b,"ensureOpen",function(){if(null==this.str)throw new java.io.IOException("Stream closed");});j(b,"read",function(a,d,g){this.ensureOpen();if(0>d||d>a.length||0>g||d+g>a.length||0>d+g)throw new IndexOutOfBoundsException;
if(0==g)return 0;if(this.next>=this.length)return-1;g=Math.min(this.length-this.next,g);this.str.getChars(this.next,this.next+g,a,d);this.next+=g;return g},"~A,~N,~N");j(b,"skip",function(a){this.ensureOpen();if(this.next>=this.length)return 0;a=Math.min(this.length-this.next,a);a=Math.max(-this.next,a);this.next+=a;return a},"~N");j(b,"ready",function(){this.ensureOpen();return!0});j(b,"markSupported",function(){return!0});j(b,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");
this.ensureOpen();this.$mark=this.next},"~N");j(b,"reset",function(){this.ensureOpen();this.next=this.$mark});j(b,"close",function(){this.str=null})});B(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",null,function(){var b=n(function(){this.lock=null;v(this,arguments)},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);A(b,function(){this.lock=this});A(b,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");c(b,"write",function(a){this.write(a,
0,a.length)},"~A");c(b,"write",function(a){var d=Y(1,"\x00");d[0]=String.fromCharCode(a);this.write(d)},"~N");c(b,"write",function(a){var d=Y(a.length,"\x00");a.getChars(0,d.length,d,0);this.write(d)},"~S");c(b,"write",function(a,d,g){if(0<=g){var b=Y(g,"\x00");a.getChars(d,d+g,b,0);this.write(b)}else throw new StringIndexOutOfBoundsException;},"~S,~N,~N");c(b,"append",function(a){this.write(a.charCodeAt(0));return this},"~S");c(b,"append",function(a){null==a?this.write("null"):this.write(a.toString());
return this},"CharSequence");c(b,"append",function(a,d,g){null==a?this.write("null".substring(d,g)):this.write(a.subSequence(d,g).toString());return this},"CharSequence,~N,~N")});s("java.net");B(["java.io.IOException"],"java.net.MalformedURLException",null,function(){var b=I(java.net,"MalformedURLException",java.io.IOException);A(b,function(){M(this,java.net.MalformedURLException,[])})});s("java.net");B(["java.io.IOException"],"java.net.UnknownServiceException",null,function(){var b=I(java.net,"UnknownServiceException",
java.io.IOException);A(b,function(){M(this,java.net.UnknownServiceException,[])})});s("java.net");B(["java.util.Hashtable"],"java.net.URL",null,function(){var b=n(function(){this.host=this.protocol=null;this.port=-1;this.handler=this.ref=this.userInfo=this.path=this.authority=this.query=this.file=null;this.$hashCode=-1;v(this,arguments)},java.net,"URL",null);A(b,function(a,d,g){switch(arguments.length){case 1:d=a;a=g=null;break;case 2:g=null;break;case 3:if(null==a||y(a,java.net.URL))break;default:alert("java.net.URL constructor format not supported")}a&&
a.valueOf&&null==a.valueOf()&&(a=null);var b=d,e,c,h,k=0,m=null,E=!1,j=!1;try{for(c=d.length;0<c&&" ">=d.charAt(c-1);)c--;for(;k<c&&" ">=d.charAt(k);)k++;d.regionMatches(!0,k,"url:",0,4)&&(k+=4);k<d.length&&"#"==d.charAt(k)&&(E=!0);for(e=k;!E&&e<c&&47!=(h=d.charAt(e).charCodeAt(0));e++)if(58==h){var q=d.substring(k,e).toLowerCase();this.isValidProtocol(q)&&(m=q,k=e+1);break}this.protocol=m;if(null!=a&&(null==m||m.equalsIgnoreCase(a.protocol)))null==g&&(g=a.handler),null!=a.path&&a.path.startsWith("/")&&
(m=null),null==m&&(this.protocol=a.protocol,this.authority=a.authority,this.userInfo=a.userInfo,this.host=a.host,this.port=a.port,this.file=a.file,this.path=a.path,j=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+b);if(null==g&&null==(g=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+this.protocol);this.handler=g;e=d.indexOf("#",k);0<=e&&(this.ref=d.substring(e+1,c),c=e);j&&k==c&&(this.query=a.query,
null==this.ref&&(this.ref=a.ref));g.parseURL(this,d,k,c)}catch(r){if(H(r,"java.net.MalformedURLException"))throw r;if(H(r,Exception))throw b=r,e=new java.net.MalformedURLException(b.getMessage()),e.initCause(b),e;throw r;}},"java.net.URL,~S,java.net.URLStreamHandler");c(b,"isValidProtocol",function(a){var d=a.length;if(1>d)return!1;var g=a.charAt(0);if(!Character.isLetter(g))return!1;for(var b=1;b<d;b++)if(g=a.charAt(b),!Character.isLetterOrDigit(g)&&"."!=g&&"+"!=g&&"-"!=g)return!1;return!0},"~S");
c(b,"set5",function(a,d,g,b,e){this.protocol=a;this.host=d;this.authority=-1==g?d:d+":"+g;this.port=g;this.file=b;this.ref=e;this.$hashCode=-1;a=b.lastIndexOf("?");-1!=a?(this.query=b.substring(a+1),this.path=b.substring(0,a)):this.path=b},"~S,~S,~N,~S,~S");c(b,"set",function(a,d,g,b,e,c,h,k){this.protocol=a;this.host=d;this.port=g;this.file=null==h?c:c+"?"+h;this.userInfo=e;this.path=c;this.ref=k;this.$hashCode=-1;this.query=h;this.authority=b},"~S,~S,~N,~S,~S,~S,~S,~S");c(b,"getQuery",function(){return this.query});
c(b,"getPath",function(){return this.path});c(b,"getUserInfo",function(){return this.userInfo});c(b,"getAuthority",function(){return this.authority});c(b,"getPort",function(){return this.port});c(b,"getDefaultPort",function(){return this.handler.getDefaultPort()});c(b,"getProtocol",function(){return this.protocol});c(b,"getHost",function(){return this.host});c(b,"getFile",function(){return this.file});c(b,"getRef",function(){return this.ref});j(b,"equals",function(a){return!y(a,"java.net.URL")?!1:
this.handler.equals2(this,a)},"~O");j(b,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});c(b,"sameFile",function(a){return this.handler.sameFile(this,a)},"java.net.URL");j(b,"toString",function(){return this.toExternalForm()});c(b,"toExternalForm",function(){return this.handler.toExternalForm(this)});c(b,"openConnection",function(){return this.handler.openConnection(this)});c(b,"openStream",function(){return this.openConnection().getInputStream()});
c(b,"getContent",function(){return this.openConnection().getInputStream()});b.setURLStreamHandlerFactory=c(b,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");var d=System.getSecurityManager();null!=d&&d.checkSetFactory();java.net.URL.handlers.clear();java.net.URL.factory=a},"java.net.URLStreamHandlerFactory");b.getURLStreamHandler=c(b,"getURLStreamHandler",function(a){var d=java.net.URL.handlers.get(a);null==d&&null!=java.net.URL.factory&&
(d=java.net.URL.factory.createURLStreamHandler(a));return d},"~S");b.factory=null;b.handlers=new java.util.Hashtable;b.streamHandlerLock=new ba._O});s("java.net");B(null,"java.net.URLConnection",["java.util.ArrayList"],function(){var b=n(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;v(this,arguments)},java.net,"URLConnection",null);A(b,function(a){this.url=a},"java.net.URL");c(b,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");
this.doInput=a},"~B");c(b,"getDoInput",function(){return this.doInput});c(b,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");c(b,"getDoOutput",function(){return this.doOutput});c(b,"getURL",function(){return this.url});c(b,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");});c(b,"getOutputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support output");
});c(b,"setRequestProperty",function(a,d){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new java.util.ArrayList);for(var g=this.requests.size();0<=--g;)if(this.requests.get(g)[0].equals(a)){this.requests.get(g)[1]=d;return}this.requests.add(x(-1,[a,d]))},"~S,~S")});s("java.net");z=I(java.net,"URLEncoder",null);z.encode=c(z,"encode",function(b){return encodeURIComponent(b)},"~S");s("java.net");
z=I(java.net,"URLStreamHandler",null);c(z,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");c(z,"parseURL",function(b,a,d,g){var l=b.getProtocol(),e=b.getAuthority(),c=b.getUserInfo(),h=b.getHost(),k=b.getPort(),m=b.getPath(),E=b.getQuery(),j=b.getRef(),q=!1,r=!1;if(d<g){var u=a.indexOf("?"),r=u==d;-1!=u&&u<g&&(E=a.substring(u+1,g),g>u&&(g=u),a=a.substring(0,u))}var C=0;if(!(d<=g-4&&"/"==a.charAt(d)&&"/"==a.charAt(d+
1)&&"/"==a.charAt(d+2)&&"/"==a.charAt(d+3))&&d<=g-2&&"/"==a.charAt(d)&&"/"==a.charAt(d+1)){d+=2;C=a.indexOf("/",d);0>C&&(C=a.indexOf("?",d),0>C&&(C=g));h=e=a.substring(d,C);u=e.indexOf("@");-1!=u?(c=e.substring(0,u),h=e.substring(u+1)):c=null;if(null!=h){if(0<h.length&&"["==h.charAt(0))throw new IllegalArgumentException("Invalid host: "+h);u=h.indexOf(":");k=-1;0<=u&&(h.length>u+1&&(k=Integer.parseInt(h.substring(u+1))),h=h.substring(0,u))}else h="";if(-1>k)throw new IllegalArgumentException("Invalid port number :"+
k);d=C;0<e.length&&(m="")}null==h&&(h="");d<g?"/"==a.charAt(d)?m=a.substring(d,g):null!=m&&0<m.length?(q=!0,u=m.lastIndexOf("/"),r="",-1==u&&null!=e&&(r="/"),m=m.substring(0,u+1)+r+a.substring(d,g)):m=(null!=e?"/":"")+a.substring(d,g):r&&null!=m&&(u=m.lastIndexOf("/"),0>u&&(u=0),m=m.substring(0,u)+"/");null==m&&(m="");if(q){for(;0<=(C=m.indexOf("/./"));)m=m.substring(0,C)+m.substring(C+2);for(C=0;0<=(C=m.indexOf("/../",C));)0<C&&0<=(g=m.lastIndexOf("/",C-1))&&0!=m.indexOf("/../",g)?(m=m.substring(0,
g)+m.substring(C+3),C=0):C+=3;for(;m.endsWith("/..");)if(C=m.indexOf("/.."),0<=(g=m.lastIndexOf("/",C-1)))m=m.substring(0,g+1);else break;m.startsWith("./")&&2<m.length&&(m=m.substring(2));m.endsWith("/.")&&(m=m.substring(0,m.length-1))}this.setURL(b,l,h,k,e,c,m,E,j)},"java.net.URL,~S,~N,~N");c(z,"getDefaultPort",function(){return-1});c(z,"equals2",function(b,a){var d=b.getRef(),g=a.getRef();return(d===g||null!=d&&d.equals(g))&&this.sameFile(b,a)},"java.net.URL,java.net.URL");c(z,"hashCode",function(b){var a=
0,d=b.getProtocol();null!=d&&(a+=d.hashCode());a+=b.toString().hashCode();d=b.getFile();null!=d&&(a+=d.hashCode());a=-1==b.getPort()?a+this.getDefaultPort():a+b.getPort();b=b.getRef();null!=b&&(a+=b.hashCode());return a},"java.net.URL");c(z,"sameFile",function(b,a){if(!(b.getProtocol()===a.getProtocol()||null!=b.getProtocol()&&b.getProtocol().equalsIgnoreCase(a.getProtocol()))||!(b.getFile()===a.getFile()||null!=b.getFile()&&b.getFile().equals(a.getFile())))return!1;var d,g;d=-1!=b.getPort()?b.getPort():
b.handler.getDefaultPort();g=-1!=a.getPort()?a.getPort():a.handler.getDefaultPort();return d!=g||!this.hostsEqual(b,a)?!1:!0},"java.net.URL,java.net.URL");c(z,"hostsEqual",function(b,a){return null!=b.getHost()&&null!=a.getHost()?b.getHost().equalsIgnoreCase(a.getHost()):null==b.getHost()&&null==a.getHost()},"java.net.URL,java.net.URL");c(z,"toExternalForm",function(){return""},"java.net.URL");c(z,"setURL",function(b,a,d,g,l,e,c,h,k){if(this!==b.handler)throw new SecurityException("handler for url different from this handler");
b.set(b.getProtocol(),d,g,l,e,c,h,k)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(z,"setURLDeprecated",function(b,a,d,g,l,e){var c=null,h=null;if(null!=d&&0!=d.length){var c=-1==g?d:d+":"+g,k=d.lastIndexOf("@");-1!=k&&(h=d.substring(0,k),d=d.substring(k+1))}var m=null,k=null;null!=l&&(m=l.lastIndexOf("?"),-1!=m?(k=l.substring(m+1),m=l.substring(0,m)):m=l);this.setURL(b,a,d,g,c,h,m,k,e)},"java.net.URL,~S,~S,~N,~S,~S");s("java.net");O(java.net,"URLStreamHandlerFactory");s("java.text");z=n(function(){this.pattern=
null;v(this,arguments)},java.text,"MessageFormat",null);A(z,function(b){this.pattern=b},"~S");A(z,function(b){this.pattern=b},"~S,java.util.Locale");z.format=c(z,"format",function(b,a){return b.replace(/\{(\d+)\}/g,function(d,g){var b=parseInt(g);return null==a?null:a[b]})},"~S,~A");c(z,"format",function(b){return java.text.MessageFormat.format(this.pattern,x(-1,[b]))},"~O");z=n(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;v(this,arguments)},java.util,"Random",null,java.io.Serializable);
A(z,function(){var b=-2147483648;1==arguments.length&&(b=arguments[0]);-2147483648==b&&(b=System.currentTimeMillis());this.setSeed(b)});c(z,"next",function(b){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-b},"~N");c(z,"nextBoolean",function(){return 0.5<Math.random()});c(z,"nextBytes",function(b){for(var a=0,d=0,g=0;d<b.length;)0==g?(a=this.nextInt(),g=3):g--,b[d++]=a,a>>=8},"~A");c(z,"nextDouble",function(){return Math.random()});c(z,"nextFloat",function(){return Math.random()});
c(z,"nextGaussian",function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var b,a,d;do b=2*this.nextDouble()-1,a=2*this.nextDouble()-1,d=b*b+a*a;while(1<=d);d=Math.sqrt(-2*Math.log(d)/d);this.nextNextGaussian=a*d;this.haveNextNextGaussian=!0;return b*d});c(z,"nextInt",function(b){if(0==arguments.length)return 4294967296*Math.random()|0;if(0>=b)throw new IllegalArgumentException;return Math.random()*b|0},"~N");c(z,"nextLong",function(){return(this.next(32)<<
32)+this.next(32)});c(z,"setSeed",function(b){Math.seedrandom(b)},"~N");var ja=[],ha=Math,ka=52,sa=void 0,ta=void 0,Ha=function(b){var a,d,g=this,l=b.length,e=0,c=g.i=g.j=g.m=0;g.S=[];g.c=[];for(l||(b=[l++]);256>e;)g.S[e]=e++;for(e=0;256>e;e++)a=g.S[e],c=c+a+b[e%l]&255,d=g.S[c],g.S[e]=d,g.S[c]=a;g.g=function(a){var d=g.S,b=g.i+1&255,l=d[b],e=g.j+l&255,c=d[e];d[b]=c;d[e]=l;for(var f=d[l+c&255];--a;)b=b+1&255,l=d[b],e=e+l&255,c=d[e],d[b]=c,d[e]=l,f=256*f+d[l+c&255];g.i=b;g.j=e;return f};g.g(256)},ua=
function(b,a,d,g){d=[];if(a&&"object"==typeof b)for(g in b)if(5>g.indexOf("S"))try{d.push(ua(b[g],a-1))}catch(l){}return d.length?d:""+b},ma=function(b,a,d,g){b+="";for(g=d=0;g<b.length;g++){var l=a,e=g&255,c=(d^=19*a[g&255])+b.charCodeAt(g);l[e]=c&255}b="";for(g in a)b+=String.fromCharCode(a[g]);return b};ha.seedrandom=function(b,a){var d=[],g;b=ma(ua(a?[b,ja]:arguments.length?b:[(new Date).getTime(),ja,window],3),d);g=new Ha(d);ma(g.S,ja);ha.random=function(){for(var a=g.g(6),d=ta,b=0;a<ka;)a=256*
(a+b),d*=256,b=g.g(1);for(;a>=sa;)a/=2,d/=2,b>>>=1;return(a+b)/d};return b};ta=ha.pow(256,6);ka=ha.pow(2,ka);sa=2*ka;ma(ha.random(),ja);B(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.reflect.Array"],function(){var b=I(java.util,"AbstractCollection",null,java.util.Collection);j(b,"add",function(){throw new UnsupportedOperationException;},"~O");j(b,"addAll",function(a){var d=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(d=!0);return d},"java.util.Collection");j(b,"clear",
function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});j(b,"contains",function(a){var d=this.iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return!0}else for(;d.hasNext();)if(null==d.next())return!0;return!1},"~O");j(b,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection");j(b,"isEmpty",function(){return 0==this.size()});j(b,"remove",function(a){var d=this.iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return d.remove(),
!0}else for(;d.hasNext();)if(null==d.next())return d.remove(),!0;return!1},"~O");j(b,"removeAll",function(a){for(var d=!1,g=this.iterator();g.hasNext();)a.contains(g.next())&&(g.remove(),d=!0);return d},"java.util.Collection");j(b,"retainAll",function(a){for(var d=!1,g=this.iterator();g.hasNext();)a.contains(g.next())||(g.remove(),d=!0);return d},"java.util.Collection");c(b,"toArray",function(){for(var a=this.size(),d=0,g=this.iterator(),b=Array(a);d<a;)b[d++]=g.next();return b});c(b,"toArray",function(a){var d=
this.size(),g=0;d>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,d));for(var b,d=this.iterator();d.hasNext()&&((b=d.next())||1);)a[g++]=b;g<a.length&&(a[g]=null);return a},"~A");j(b,"toString",function(){if(this.isEmpty())return"[]";for(var a="[",d=this.iterator();d.hasNext();){var g=d.next(),a=g!==this?a+g:a+"(this Collection)";d.hasNext()&&(a+=", ")}return a+"]"})});B(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess"],"java.util.AbstractList",
null,function(){var b=n(function(){this.modCount=0;v(this,arguments)},java.util,"AbstractList",java.util.AbstractCollection,java.util.List);c(b,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(b,"add",function(a){this.add(this.size(),a);return!0},"~O");c(b,"addAll",function(a,d){for(var g=d.iterator();g.hasNext();)this.add(a++,g.next());return!d.isEmpty()},"~N,java.util.Collection");j(b,"clear",function(){this.removeRange(0,this.size())});j(b,"equals",function(a){if(this===a)return!0;
if(y(a,"java.util.List")){if(a.size()!=this.size())return!1;var d=this.iterator();for(a=a.iterator();d.hasNext();){var g=d.next(),b=a.next();if(!(null==g?null==b:g.equals(b)))return!1}return!0}return!1},"~O");j(b,"hashCode",function(){for(var a=1,d=this.iterator();d.hasNext();)var g=d.next(),a=31*a+(null==g?0:g.hashCode());return a});j(b,"indexOf",function(a){var d=this.listIterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return d.previousIndex()}else for(;d.hasNext();)if(null==d.next())return d.previousIndex();
return-1},"~O");j(b,"iterator",function(){return new java.util.AbstractList.SimpleListIterator(this)});j(b,"lastIndexOf",function(a){var d=this.listIterator(this.size());if(null!=a)for(;d.hasPrevious();){if(a.equals(d.previous()))return d.nextIndex()}else for(;d.hasPrevious();)if(null==d.previous())return d.nextIndex();return-1},"~O");c(b,"listIterator",function(){return this.listIterator(0)});c(b,"listIterator",function(a){return new java.util.AbstractList.FullListIterator(this,a)},"~N");c(b,"remove",
function(){throw new UnsupportedOperationException;},"~N");c(b,"removeRange",function(a,d){for(var g=this.listIterator(a),b=a;b<d;b++)g.next(),g.remove()},"~N,~N");j(b,"set",function(){throw new UnsupportedOperationException;},"~N,~O");j(b,"subList",function(a,d){if(0<=a&&d<=this.size()){if(a<=d)return y(this,"java.util.RandomAccess")?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,d):new java.util.AbstractList.SubAbstractList(this,a,d);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;
},"~N,~N");b=n(function(){this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;this.list=null;v(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);A(b,function(a){this.list=a;this.expectedModCount=a.modCount},"java.util.AbstractList");j(b,"hasNext",function(){return this.pos+1<this.list.size()});j(b,"next",function(){if(this.expectedModCount==this.list.modCount)try{var a=this.list.get(this.pos+1);this.lastPosition=++this.pos;return a}catch(d){if(H(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;
throw d;}throw new java.util.ConcurrentModificationException;});j(b,"remove",function(){if(this.expectedModCount==this.list.modCount){try{this.list.remove(this.lastPosition)}catch(a){if(H(a,"IndexOutOfBoundsException"))throw new IllegalStateException;throw a;}this.list.modCount!=this.expectedModCount&&this.expectedModCount++;this.pos==this.lastPosition&&this.pos--;this.lastPosition=-1}else throw new java.util.ConcurrentModificationException;});b=I(java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,
java.util.ListIterator);A(b,function(a,d){M(this,java.util.AbstractList.FullListIterator,[a]);if(0<=d&&d<=a.size())this.pos=d-1;else throw new IndexOutOfBoundsException;},"java.util.AbstractList,~N");j(b,"add",function(a){if(this.expectedModCount==this.list.modCount){try{this.list.add(this.pos+1,a)}catch(d){if(H(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}this.pos++;this.lastPosition=-1;this.list.modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;
},"~O");j(b,"hasPrevious",function(){return 0<=this.pos});j(b,"nextIndex",function(){return this.pos+1});j(b,"previous",function(){if(this.expectedModCount==this.list.modCount)try{var a=this.list.get(this.pos);this.lastPosition=this.pos;this.pos--;return a}catch(d){if(H(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}throw new java.util.ConcurrentModificationException;});j(b,"previousIndex",function(){return this.pos});j(b,"set",function(a){if(this.expectedModCount==
this.list.modCount)try{this.list.set(this.lastPosition,a)}catch(d){if(H(d,"IndexOutOfBoundsException"))throw new IllegalStateException;throw d;}else throw new java.util.ConcurrentModificationException;},"~O");I(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);b=n(function(){this.fullList=null;this.$size=this.offset=0;v(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);A(b,function(a,d,g){M(this,java.util.AbstractList.SubAbstractList);
this.fullList=a;this.modCount=this.fullList.modCount;this.offset=d;this.$size=g-d},"java.util.AbstractList,~N,~N");c(b,"add",function(a,d){if(this.modCount==this.fullList.modCount)if(0<=a&&a<=this.$size)this.fullList.add(a+this.offset,d),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;else throw new java.util.ConcurrentModificationException;},"~N,~O");c(b,"addAll",function(a,d){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size){var g=this.fullList.addAll(a+
this.offset,d);g&&(this.$size+=d.size(),this.modCount=this.fullList.modCount);return g}throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,java.util.Collection");c(b,"addAll",function(a){if(this.modCount==this.fullList.modCount){var d=this.fullList.addAll(this.offset+this.$size,a);d&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return d}throw new java.util.ConcurrentModificationException;},"java.util.Collection");c(b,"get",function(a){if(this.modCount==
this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.get(a+this.offset);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N");j(b,"iterator",function(){return this.listIterator(0)});c(b,"listIterator",function(a){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size)return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);throw new IndexOutOfBoundsException;
}throw new java.util.ConcurrentModificationException;},"~N");c(b,"remove",function(a){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return a=this.fullList.remove(a+this.offset),this.$size--,this.modCount=this.fullList.modCount,a;throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N");c(b,"removeRange",function(a,d){if(a!=d)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+this.offset,d+this.offset),this.$size-=d-a,this.modCount=
this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");c(b,"set",function(a,d){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+this.offset,d);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,~O");j(b,"size",function(){return this.$size});c(b,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");b=n(function(){this.iterator=this.subList=
null;this.end=this.start=0;v(this,arguments)},java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);A(b,function(a,d,g,b){this.iterator=a;this.subList=d;this.start=g;this.end=this.start+b},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");c(b,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");j(b,"hasNext",function(){return this.iterator.nextIndex()<this.end});j(b,"hasPrevious",function(){return this.iterator.previousIndex()>=
this.start});c(b,"next",function(){if(this.iterator.nextIndex()<this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});c(b,"nextIndex",function(){return this.iterator.nextIndex()-this.start});c(b,"previous",function(){if(this.iterator.previousIndex()>=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});c(b,"previousIndex",function(){var a=this.iterator.previousIndex();return a>=this.start?a-this.start:-1});c(b,"remove",function(){this.iterator.remove();
this.subList.sizeChanged(!1);this.end--});c(b,"set",function(a){this.iterator.set(a)},"~O")});B(["java.util.Map"],"java.util.AbstractMap",["java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){var b=n(function(){this.$values=this.$keySet=null;v(this,arguments)},java.util,"AbstractMap",null,java.util.Map);j(b,"clear",function(){this.entrySet().clear()});j(b,"containsKey",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next().getKey()))return!0}else for(;d.hasNext();)if(null==
d.next().getKey())return!0;return!1},"~O");j(b,"containsValue",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next().getValue()))return!0}else for(;d.hasNext();)if(null==d.next().getValue())return!0;return!1},"~O");j(b,"equals",function(a){if(this===a)return!0;if(y(a,"java.util.Map")){if(this.size()!=a.size())return!1;a=a.entrySet();for(var d=this.entrySet().iterator();d.hasNext();)if(!a.contains(d.next()))return!1;return!0}return!1},"~O");j(b,"get",function(a){var d=
this.entrySet().iterator();if(null!=a)for(;d.hasNext();){var g=d.next();if(a.equals(g.getKey()))return g.getValue()}else for(;d.hasNext();)if(g=d.next(),null==g.getKey())return g.getValue();return null},"~O");j(b,"hashCode",function(){for(var a=0,d=this.entrySet().iterator();d.hasNext();)a+=d.next().hashCode();return a});j(b,"isEmpty",function(){return 0==this.size()});j(b,"keySet",function(){null==this.$keySet&&(this.$keySet=(S("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),
U(java.util.AbstractMap$1,this,null)));return this.$keySet});j(b,"put",function(){throw new UnsupportedOperationException;},"~O,~O");j(b,"putAll",function(a){this.putAllAM(a)},"java.util.Map");c(b,"putAllAM",function(a){if(!a.isEmpty()){var d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)this.put(d.getKey(),d.getValue())}},"java.util.Map");j(b,"remove",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){var g=d.next();if(a.equals(g.getKey()))return d.remove(),
g.getValue()}else for(;d.hasNext();)if(g=d.next(),null==g.getKey())return d.remove(),g.getValue();return null},"~O");j(b,"size",function(){return this.entrySet().size()});j(b,"toString",function(){if(this.isEmpty())return"{}";for(var a="{",d=this.entrySet().iterator();d.hasNext();){var g=d.next(),b=g.getKey(),a=b!==this?a+b:a+"(this Map)",a=a+"=",g=g.getValue(),a=g!==this?a+g:a+"(this Map)";d.hasNext()&&(a+=", ")}return a+"}"});j(b,"values",function(){null==this.$values&&(this.$values=(S("java.util.AbstractMap$2")?
0:java.util.AbstractMap.$AbstractMap$2$(),U(java.util.AbstractMap$2,this,null)));return this.$values});c(b,"clone",function(){return this.cloneAM()});c(b,"cloneAM",function(){var a;a=na(this);a.$keySet=null;a.$values=null;return a});b.$AbstractMap$1$=function(){var a=$(java.util,"AbstractMap$1",java.util.AbstractSet);j(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},"~O");j(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});j(a,"iterator",function(){return S("java.util.AbstractMap$1$1")?
0:java.util.AbstractMap.$AbstractMap$1$1$(),U(java.util.AbstractMap$1$1,this,null)})};b.$AbstractMap$1$1$=function(){var a=n(function(){X(this,arguments);this.setIterator=null;v(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);P(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});j(a,"hasNext",function(){return this.setIterator.hasNext()});j(a,"next",function(){return this.setIterator.next().getKey()});j(a,"remove",function(){this.setIterator.remove()})};
b.$AbstractMap$2$=function(){var a=$(java.util,"AbstractMap$2",java.util.AbstractCollection);j(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});j(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");j(a,"iterator",function(){return S("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),U(java.util.AbstractMap$2$1,this,null)})};b.$AbstractMap$2$1$=function(){var a=n(function(){X(this,arguments);this.setIterator=null;v(this,
arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);P(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});j(a,"hasNext",function(){return this.setIterator.hasNext()});j(a,"next",function(){return this.setIterator.next().getValue()});j(a,"remove",function(){this.setIterator.remove()})}});B(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){var b=I(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);j(b,"equals",
function(a){return this===a?!0:y(a,"java.util.Set")?this.size()==a.size()&&this.containsAll(a):!1},"~O");j(b,"hashCode",function(){for(var a=0,d=this.iterator();d.hasNext();)var g=d.next(),a=a+(null==g?0:g.hashCode());return a});j(b,"removeAll",function(a){var d=!1;if(this.size()<=a.size())for(var g=this.iterator();g.hasNext();)a.contains(g.next())&&(g.remove(),d=!0);else for(g=a.iterator();g.hasNext();)d=this.remove(g.next())||d;return d},"java.util.Collection")});B(["java.util.AbstractList","$.List",
"$.RandomAccess"],"java.util.ArrayList",["java.util.Arrays"],function(){var b=n(function(){this.lastIndex=this.firstIndex=0;this.array=null;v(this,arguments)},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);A(b,function(){M(this,java.util.ArrayList,[]);this.setCapacity(0)});A(b,function(a){M(this,java.util.ArrayList,[]);this.setCapacity(a)},"~N");A(b,function(a){this.firstIndex=this.lastIndex=0;var d=-1;a?"number"==typeof a&&(d=
a):d=0;0<=d?this.setCapacity(d):(d=a.size(),this.array=this.newElementArray(d+w(d/10)),this.addAll(a))},"java.util.Collection");c(b,"setCapacity",function(a){try{this.array=this.newElementArray(a)}catch(d){if(H(d,"NegativeArraySizeException"))throw new IllegalArgumentException;throw d;}},"~N");c(b,"newElementArray",function(a){return Array(a)},"~N");c(b,"add",function(a,d){this.add2(a,d)},"~N,~O");c(b,"add2",function(a,d){var g=this.size();if(0<a&&a<g){if(0==this.firstIndex&&this.lastIndex==this.array.length)this.growForInsert(a,
1);else if(a<w(g/2)&&0<this.firstIndex||this.lastIndex==this.array.length)System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,a);else{var b=a+this.firstIndex;System.arraycopy(this.array,b,this.array,b+1,g-a);this.lastIndex++}this.array[a+this.firstIndex]=d}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=d;else if(a==g)this.lastIndex==this.array.length&&this.growAtEnd(1),this.array[this.lastIndex++]=d;else throw new IndexOutOfBoundsException;
this.modCount++},"~N,~O");c(b,"add",function(a){return this.add1(a)},"~O");c(b,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=a;this.modCount++;return!0},"~O");c(b,"addAll",function(a,d){var g=this.size();if(0>a||a>g)throw new IndexOutOfBoundsException;var b=d.size();if(0<a&&a<g)if(this.array.length-g<b)this.growForInsert(a,b);else if(a<w(g/2)&&0<this.firstIndex||this.lastIndex>this.array.length-b){var e=this.firstIndex-b;if(0>e){var c=a+this.firstIndex;
System.arraycopy(this.array,c,this.array,c-e,g-a);this.lastIndex-=e;e=0}System.arraycopy(this.array,this.firstIndex,this.array,e,a);this.firstIndex=e}else c=a+this.firstIndex,System.arraycopy(this.array,c,this.array,c+b,g-a),this.lastIndex+=b;else 0==a?(this.growAtFront(b),this.firstIndex-=b):a==g&&(this.lastIndex>this.array.length-b&&this.growAtEnd(b),this.lastIndex+=b);if(0<b){g=d.iterator();c=a+this.firstIndex;for(b=c+b;c<b;)this.array[c++]=g.next();this.modCount++;return!0}return!1},"~N,java.util.Collection");
c(b,"addAll",function(a){var d=a.size();if(0<d){this.lastIndex>this.array.length-d&&this.growAtEnd(d);a=a.iterator();for(d=this.lastIndex+d;this.lastIndex<d;)this.array[this.lastIndex++]=a.next();this.modCount++;return!0}return!1},"java.util.Collection");j(b,"clear",function(){this.firstIndex!=this.lastIndex&&(java.util.Arrays.fill(this.array,this.firstIndex,this.lastIndex,null),this.firstIndex=this.lastIndex=0,this.modCount++)});c(b,"clone",function(){try{var a=Z(this,java.util.ArrayList,"clone",
[]);a.array=this.array.clone();return a}catch(d){if(H(d,"CloneNotSupportedException"))return null;throw d;}});j(b,"contains",function(a){if(null!=a)for(var d=this.firstIndex;d<this.lastIndex;d++){if(a.equals(this.array[d]))return!0}else for(d=this.firstIndex;d<this.lastIndex;d++)if(null==this.array[d])return!0;return!1},"~O");c(b,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");j(b,"get",function(a){if(0<=
a&&a<this.size())return this.array[this.firstIndex+a];throw new IndexOutOfBoundsException;},"~N");c(b,"growAtEnd",function(a){var d=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,0<d&&(System.arraycopy(this.array,this.firstIndex,this.array,0,d),java.util.Arrays.fill(this.array,a<this.firstIndex?this.firstIndex:a,this.array.length,null)),this.firstIndex=0,this.lastIndex=a;else{var g=w(d/2);a>g&&(g=a);12>g&&(g=12);a=this.newElementArray(d+g);0<
d&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,d);this.array=a}},"~N");c(b,"growAtFront",function(a){var d=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-d,0<d&&(System.arraycopy(this.array,this.firstIndex,this.array,a,d),java.util.Arrays.fill(this.array,this.firstIndex,this.firstIndex+d>a?a:this.firstIndex+d,null)),this.firstIndex=a,this.lastIndex=this.array.length;else{var g=w(d/2);a>g&&(g=a);12>g&&(g=12);a=this.newElementArray(d+g);0<d&&System.arraycopy(this.array,
this.firstIndex,a,a.length-d,d);this.firstIndex=a.length-d;this.lastIndex=a.length;this.array=a}},"~N");c(b,"growForInsert",function(a,d){var g=this.size(),b=w(g/2);d>b&&(b=d);12>b&&(b=12);var e=this.newElementArray(g+b);if(a<w(g/2)){var c=e.length-(g+d);System.arraycopy(this.array,a,e,a+b,g-a);System.arraycopy(this.array,this.firstIndex,e,c,a);this.firstIndex=c;this.lastIndex=e.length}else System.arraycopy(this.array,this.firstIndex,e,0,a),System.arraycopy(this.array,a,e,a+d,g-a),this.firstIndex=
0,this.lastIndex+=d;this.array=e},"~N,~N");j(b,"indexOf",function(a){if(null!=a)for(var d=this.firstIndex;d<this.lastIndex;d++){if(a.equals(this.array[d]))return d-this.firstIndex}else for(d=this.firstIndex;d<this.lastIndex;d++)if(null==this.array[d])return d-this.firstIndex;return-1},"~O");j(b,"isEmpty",function(){return this.lastIndex==this.firstIndex});j(b,"lastIndexOf",function(a){if(null!=a)for(var d=this.lastIndex-1;d>=this.firstIndex;d--){if(a.equals(this.array[d]))return d-this.firstIndex}else for(d=
this.lastIndex-1;d>=this.firstIndex;d--)if(null==this.array[d])return d-this.firstIndex;return-1},"~O");c(b,"remove",function(a){return this._removeItemAt(a)},"~N");c(b,"_removeObject",function(a){a=this.indexOf(a);if(0>a)return!1;this._removeItemAt(a);return!0},"~O");c(b,"_removeItemAt",function(a){var d,g=this.size();if(0<=a&&a<g)if(a==g-1)d=this.array[--this.lastIndex],this.array[this.lastIndex]=null;else if(0==a)d=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var b=this.firstIndex+
a;d=this.array[b];a<w(g/2)?(System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,a),this.array[this.firstIndex++]=null):(System.arraycopy(this.array,b+1,this.array,b,g-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;this.modCount++;return d},"~N");j(b,"removeRange",function(a,d){if(0<=a&&a<=d&&d<=this.size()){if(a!=d){var g=this.size();d==g?(java.util.Arrays.fill(this.array,this.firstIndex+a,this.lastIndex,null),this.lastIndex=this.firstIndex+a):
0==a?(java.util.Arrays.fill(this.array,this.firstIndex,this.firstIndex+d,null),this.firstIndex+=d):(System.arraycopy(this.array,this.firstIndex+d,this.array,this.firstIndex+a,g-d),g=this.lastIndex+a-d,java.util.Arrays.fill(this.array,g,this.lastIndex,null),this.lastIndex=g);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");j(b,"set",function(a,d){if(0<=a&&a<this.size()){var g=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=d;return g}throw new IndexOutOfBoundsException;
},"~N,~O");j(b,"size",function(){return this.lastIndex-this.firstIndex});j(b,"toArray",function(a){var d=this.size();if(null==a||d>a.length)return this.array.slice(this.firstIndex,this.firstIndex+d);System.arraycopy(this.array,this.firstIndex,a,0,d);d<a.length&&(a[d]=null);return a},"~A");c(b,"trimToSize",function(){var a=this.size(),d=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,d,0,a);this.array=d;this.firstIndex=0;this.lastIndex=this.array.length})});B(["java.util.AbstractList",
"$.RandomAccess"],"java.util.Arrays",null,function(){var b=I(java.util,"Arrays",null);b.fill=c(b,"fill",function(a,g,b,e){2==arguments.length&&(e=arguments[1],g=0,b=a.length);java.util.Arrays.rangeCheck(a.length,g,b);for(var c=g;c<b;c++)a[c]=e},"~A,~N,~N,~O");b.asList=c(b,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");b.rangeCheck=c(b,"rangeCheck",function(a,g,b){if(g>b)throw new IllegalArgumentException("fromIndex("+g+") > toIndex("+b+")");if(0>g)throw new ArrayIndexOutOfBoundsException(g);
if(b>a)throw new ArrayIndexOutOfBoundsException(b);},"~N,~N,~N");b.binarySearch=c(b,"binarySearch",function(a,g){for(var b=0,e=a.length-1;b<=e;){var c=b+e>>1,h=a[c];if(h<g)b=c+1;else if(h>g)e=c-1;else return c}return-(b+1)},"~A,~N");b.binarySearch=c(b,"binarySearch",function(a,g){for(var b=0,e=a.length-1;b<=e;){var c=b+e>>1,h=a[c].compareTo(g);if(0>h)b=c+1;else if(0<h)e=c-1;else return c}return-(b+1)},"~A,~O");b.binarySearch=c(b,"binarySearch",function(a,g,b){if(null==b)return java.util.Arrays.binarySearch(a,
g);for(var e=0,c=a.length-1;e<=c;){var h=e+c>>1,k=b.compare(a[h],g);if(0>k)e=h+1;else if(0<k)c=h-1;else return h}return-(e+1)},"~A,~O,java.util.Comparator");b.equals=c(b,"equals",function(a,g){if(a===g)return!0;if(null==a||null==g)return!1;var b=a.length;if(g.length!=b)return!1;for(var e=0;e<b;e++){var c=a[e],h=g[e];if(!(null==c?null==h:null==c.equals?c==h:c.equals(h)))return!1}return!0},"~A,~A");b.sort=c(b,"sort",function(a,g,b,e){if(!(2>a.length)){var c=0,h=null,c=arguments.length,h=g,k=a,m=null;
switch(c){case 1:h=null;case 2:g=0;b=a.length;break;case 3:e=null;case 4:h=e,0==g&&b==a.length?k=a:(k=a.slice(g,b),m=a)}java.util.Arrays.rangeCheck(a.length,g,b);null==h&&(h=java.util.Arrays.comp);e=h;k.sort(function(a,d){return e.compare(a,d)});null!=m&&System.arraycopy(k,0,m,g,b)}},"~A,~N,~N,java.util.Comparator");var a=n(function(){this.a=null;v(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);A(a,function(a){M(this,java.util.Arrays.ArrayList,
[]);if(null==a)throw new NullPointerException;this.a=a},"~A");j(a,"size",function(){return this.a.length});c(a,"toArray",function(){return this.a.clone()});j(a,"get",function(a){return this.a[a]},"~N");j(a,"set",function(a,g){var b=this.a[a];this.a[a]=g;return b},"~N,~O");j(a,"indexOf",function(a){if(null==a)for(var g=0;g<this.a.length;g++){if(null==this.a[g])return g}else for(g=0;g<this.a.length;g++)if(a.equals(this.a[g]))return g;return-1},"~O");j(a,"contains",function(a){return-1!=this.indexOf(a)},
"~O");b.comp=null;b.comp={compare:function(a,g){return null==a?null==g?0:-1:null==g?1:"number"==typeof a?a-g:a.compareTo(g)}}});B("java.util.AbstractList $.AbstractMap $.AbstractSet $.Collection $.Enumeration $.Iterator $.List $.ListIterator $.Map $.RandomAccess $.Set $.SortedMap $.SortedSet java.lang.reflect.Array".split(" "),"java.util.Collections",["java.util.ArrayList","$.Arrays","java.util.Map.Entry","java.util.Random"],function(){var b=I(java.util,"Collections",null);b.emptyEnumeration=c(b,
"emptyEnumeration",function(){null==java.util.Collections.EMPTY_ENUMERATION&&(java.util.Collections.EMPTY_ENUMERATION=new java.util.Collections.EmptyEnumeration);return java.util.Collections.EMPTY_ENUMERATION});b.emptyIterator=c(b,"emptyIterator",function(){null==java.util.Collections.EMPTY_ITERATOR&&(java.util.Collections.EMPTY_ITERATOR=new java.util.Collections.EmptyIterator);return java.util.Collections.EMPTY_ITERATOR});b.binarySearch=c(b,"binarySearch",function(a,g){if(null==a)throw new NullPointerException;
if(a.isEmpty())return-1;if(!y(a,"java.util.RandomAccess")){for(var b=a.listIterator();b.hasNext();){var e;if(0>=(e=g.compareTo(b.next())))return 0==e?b.previousIndex():-b.previousIndex()-1}return-a.size()-1}var b=0,c=a.size(),h=c-1;for(e=-1;b<=h;)if(c=b+h>>1,0<(e=g.compareTo(a.get(c))))b=c+1;else{if(0==e)return c;h=c-1}return-c-(0>e?1:2)},"java.util.List,~O");b.binarySearch=c(b,"binarySearch",function(a,g,b){if(null==b)return java.util.Collections.binarySearch(a,g);if(!y(a,"java.util.RandomAccess")){for(var e=
a.listIterator();e.hasNext();){var c;if(0>=(c=b.compare(g,e.next())))return 0==c?e.previousIndex():-e.previousIndex()-1}return-a.size()-1}var e=0,h=a.size(),k=h-1;for(c=-1;e<=k;)if(h=e+k>>1,0<(c=b.compare(g,a.get(h))))e=h+1;else{if(0==c)return h;k=h-1}return-h-(0>c?1:2)},"java.util.List,~O,java.util.Comparator");b.copy=c(b,"copy",function(a,g){if(a.size()<g.size())throw new ArrayIndexOutOfBoundsException;for(var b=g.iterator(),e=a.listIterator();b.hasNext();){try{e.next()}catch(c){if(H(c,"java.util.NoSuchElementException"))throw new ArrayIndexOutOfBoundsException;
throw c;}e.set(b.next())}},"java.util.List,java.util.List");b.enumeration=c(b,"enumeration",function(a){return S("java.util.Collections$1")?0:java.util.Collections.$Collections$1$(),U(java.util.Collections$1,this,la("c",a))},"java.util.Collection");b.fill=c(b,"fill",function(a,g){for(var b=a.listIterator();b.hasNext();)b.next(),b.set(g)},"java.util.List,~O");b.max=c(b,"max",function(a){a=a.iterator();for(var g=a.next();a.hasNext();){var b=a.next();0>g.compareTo(b)&&(g=b)}return g},"java.util.Collection");
b.max=c(b,"max",function(a,g){for(var b=a.iterator(),e=b.next();b.hasNext();){var c=b.next();0>g.compare(e,c)&&(e=c)}return e},"java.util.Collection,java.util.Comparator");b.min=c(b,"min",function(a){a=a.iterator();for(var g=a.next();a.hasNext();){var b=a.next();0<g.compareTo(b)&&(g=b)}return g},"java.util.Collection");b.min=c(b,"min",function(a,g){for(var b=a.iterator(),e=b.next();b.hasNext();){var c=b.next();0<g.compare(e,c)&&(e=c)}return e},"java.util.Collection,java.util.Comparator");b.nCopies=
c(b,"nCopies",function(a,g){return new java.util.Collections.CopiesList(a,g)},"~N,~O");b.reverse=c(b,"reverse",function(a){var g=a.size(),b=a.listIterator();a=a.listIterator(g);for(var e=0;e<w(g/2);e++){var c=b.next(),h=a.previous();b.set(h);a.set(c)}},"java.util.List");b.reverseOrder=c(b,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});b.reverseOrder=c(b,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},
"java.util.Comparator");b.shuffle=c(b,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");b.shuffle=c(b,"shuffle",function(a,g){if(y(a,"java.util.RandomAccess"))for(e=a.size()-1;0<e;e--)c=g.nextInt()%(e+1),0>c&&(c=-c),a.set(c,a.set(e,a.get(c)));else{for(var b=a.toArray(),e=b.length-1;0<e;e--){var c=g.nextInt()%(e+1);0>c&&(c=-c);var h=b[e];b[e]=b[c];b[c]=h}e=0;for(c=a.listIterator();c.hasNext();)c.next(),c.set(b[e++])}},"java.util.List,java.util.Random");
b.singleton=c(b,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");b.singletonList=c(b,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");b.singletonMap=c(b,"singletonMap",function(a,g){return new java.util.Collections.SingletonMap(a,g)},"~O,~O");b.sort=c(b,"sort",function(a){var g=a.toArray();java.util.Arrays.sort(g);var b=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(g[b++])},"java.util.List");b.sort=c(b,"sort",function(a,g){var b=
a.toArray(Array(a.size()));java.util.Arrays.sort(b,g);for(var e=0,c=a.listIterator();c.hasNext();)c.next(),c.set(b[e++])},"java.util.List,java.util.Comparator");b.swap=c(b,"swap",function(a,g,b){if(null==a)throw new NullPointerException;g!=b&&a.set(b,a.set(g,a.get(b)))},"java.util.List,~N,~N");b.replaceAll=c(b,"replaceAll",function(a,g,b){for(var c,f=!1;-1<(c=a.indexOf(g));)f=!0,a.set(c,b);return f},"java.util.List,~O,~O");b.rotate=c(b,"rotate",function(a,g){var b=a.size();if(0!=b){var c;c=0<g?g%
b:b- -1*(g%b);if(!(0==c||c==b))if(y(a,"java.util.RandomAccess"))for(var f=a.get(0),h=0,k=0,m=0;m<b;m++)h=(h+c)%b,f=a.set(h,f),h==k&&(h=++k,f=a.get(k));else f=(b-c)%b,c=a.subList(0,f),b=a.subList(f,b),java.util.Collections.reverse(c),java.util.Collections.reverse(b),java.util.Collections.reverse(a)}},"java.util.List,~N");b.indexOfSubList=c(b,"indexOfSubList",function(a,g){var b=a.size(),c=g.size();if(c>b)return-1;if(0==c)return 0;var f=g.get(0),h=a.indexOf(f);if(-1==h)return-1;for(;h<b&&b-h>=c;){var k=
a.listIterator(h);if(null==f?null==k.next():f.equals(k.next())){for(var m=g.listIterator(1),E=!1;m.hasNext();){var j=m.next();if(!k.hasNext())return-1;if(null==j?null!=k.next():!j.equals(k.next())){E=!0;break}}if(!E)return h}h++}return-1},"java.util.List,java.util.List");b.lastIndexOfSubList=c(b,"lastIndexOfSubList",function(a,g){var b=g.size(),c=a.size();if(b>c)return-1;if(0==b)return c;for(var c=g.get(b-1),f=a.lastIndexOf(c);-1<f&&f+1>=b;){var h=a.listIterator(f+1);if(null==c?null==h.previous():
c.equals(h.previous())){for(var k=g.listIterator(b-1),m=!1;k.hasPrevious();){var E=k.previous();if(!h.hasPrevious())return-1;if(null==E?null!=h.previous():!E.equals(h.previous())){m=!0;break}}if(!m)return h.nextIndex()}f--}return-1},"java.util.List,java.util.List");b.list=c(b,"list",function(a){for(var g=new java.util.ArrayList;a.hasMoreElements();)g.add(a.nextElement());return g},"java.util.Enumeration");b.synchronizedCollection=c(b,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;
return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");b.synchronizedList=c(b,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return y(a,"java.util.RandomAccess")?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");b.synchronizedMap=c(b,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");
b.synchronizedSet=c(b,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");b.synchronizedSortedMap=c(b,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");b.synchronizedSortedSet=c(b,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},
"java.util.SortedSet");b.unmodifiableCollection=c(b,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");b.unmodifiableList=c(b,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return y(a,"java.util.RandomAccess")?new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");b.unmodifiableMap=c(b,"unmodifiableMap",
function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");b.unmodifiableSet=c(b,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");b.unmodifiableSortedMap=c(b,"unmodifiableSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");b.unmodifiableSortedSet=c(b,
"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");b.frequency=c(b,"frequency",function(a,g){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var b=0,c=a.iterator();c.hasNext();){var f=c.next();(null==g?null==f:g.equals(f))&&b++}return b},"java.util.Collection,~O");b.emptyList=c(b,"emptyList",function(){return java.util.Collections.EMPTY_LIST});b.emptySet=c(b,"emptySet",
function(){return java.util.Collections.EMPTY_SET});b.emptyMap=c(b,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});b.checkedCollection=c(b,"checkedCollection",function(a,g){return new java.util.Collections.CheckedCollection(a,g)},"java.util.Collection,Class");b.checkedMap=c(b,"checkedMap",function(a,g,b){return new java.util.Collections.CheckedMap(a,g,b)},"java.util.Map,Class,Class");b.checkedList=c(b,"checkedList",function(a,g){return y(a,"java.util.RandomAccess")?new java.util.Collections.CheckedRandomAccessList(a,
g):new java.util.Collections.CheckedList(a,g)},"java.util.List,Class");b.checkedSet=c(b,"checkedSet",function(a,g){return new java.util.Collections.CheckedSet(a,g)},"java.util.Set,Class");b.checkedSortedMap=c(b,"checkedSortedMap",function(a,g,b){return new java.util.Collections.CheckedSortedMap(a,g,b)},"java.util.SortedMap,Class,Class");b.checkedSortedSet=c(b,"checkedSortedSet",function(a,g){return new java.util.Collections.CheckedSortedSet(a,g)},"java.util.SortedSet,Class");b.addAll=c(b,"addAll",
function(a,g){for(var b=!1,c=0;c<g.length;c++)b=(new Boolean(b|a.add(g[c]))).valueOf();return b},"java.util.Collection,~A");b.disjoint=c(b,"disjoint",function(a,g){if(y(a,"java.util.Set")&&!y(g,"java.util.Set")||g.size()>a.size()){var b=a;a=g;g=b}for(b=a.iterator();b.hasNext();)if(g.contains(b.next()))return!1;return!0},"java.util.Collection,java.util.Collection");b.checkType=c(b,"checkType",function(a,g){if(!g.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+
g);return a},"~O,Class");b.$Collections$1$=function(){var a=n(function(){X(this,arguments);this.it=null;v(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);P(a,function(){this.it=this.f$.c.iterator()});c(a,"hasMoreElements",function(){return this.it.hasNext()});c(a,"nextElement",function(){return this.it.next()})};var a=I(java.util.Collections,"EmptyEnumeration",null,java.util.Enumeration);j(a,"hasMoreElements",function(){return!1});j(a,"nextElement",function(){throw new java.util.NoSuchElementException;
});a=I(java.util.Collections,"EmptyIterator",null,java.util.Iterator);j(a,"hasNext",function(){return!1});j(a,"next",function(){throw new java.util.NoSuchElementException;});j(a,"remove",function(){throw new IllegalStateException;});a=n(function(){this.n=0;this.element=null;v(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);A(a,function(a,g){M(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=g},
"~N,~O");j(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");j(a,"size",function(){return this.n});j(a,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;},"~N");a=I(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);j(a,"contains",function(){return!1},"~O");j(a,"size",function(){return 0});j(a,"get",function(){throw new IndexOutOfBoundsException;},"~N");a=I(java.util.Collections,"EmptySet",
java.util.AbstractSet,java.io.Serializable);j(a,"contains",function(){return!1},"~O");j(a,"size",function(){return 0});j(a,"iterator",function(){return S("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),U(java.util.Collections$EmptySet$1,this,null)});a.$Collections$EmptySet$1$=function(){var a=$(java.util,"Collections$EmptySet$1",null,java.util.Iterator);j(a,"hasNext",function(){return!1});j(a,"next",function(){throw new java.util.NoSuchElementException;
});j(a,"remove",function(){throw new UnsupportedOperationException;})};a=I(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);j(a,"containsKey",function(){return!1},"~O");j(a,"containsValue",function(){return!1},"~O");j(a,"entrySet",function(){return java.util.Collections.EMPTY_SET});j(a,"get",function(){return null},"~O");j(a,"keySet",function(){return java.util.Collections.EMPTY_SET});j(a,"values",function(){return java.util.Collections.EMPTY_LIST});a=I(java.util.Collections,
"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);j(a,"compare",function(a,g){return g.compareTo(a)},"~O,~O");a=n(function(){this.comparator=null;v(this,arguments)},java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);A(a,function(a){this.comparator=a},"java.util.Comparator");c(a,"compare",function(a,g){return this.comparator.compare(g,a)},"~O,~O");a=n(function(){this.element=null;v(this,arguments)},java.util.Collections,"SingletonSet",
java.util.AbstractSet,java.io.Serializable);A(a,function(a){M(this,java.util.Collections.SingletonSet,[]);this.element=a},"~O");j(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");j(a,"size",function(){return 1});j(a,"iterator",function(){return S("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),U(java.util.Collections$SingletonSet$1,this,null)});a.$Collections$SingletonSet$1$=function(){var a=n(function(){X(this,
arguments);this.$hasNext=!0;v(this,arguments)},java.util,"Collections$SingletonSet$1",null,java.util.Iterator);j(a,"hasNext",function(){return this.$hasNext});j(a,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});j(a,"remove",function(){throw new UnsupportedOperationException;})};a=n(function(){this.element=null;v(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,
java.io.Serializable);A(a,function(a){M(this,java.util.Collections.SingletonList,[]);this.element=a},"~O");j(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");j(a,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");j(a,"size",function(){return 1});a=n(function(){this.v=this.k=null;v(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);A(a,function(a,g){M(this,java.util.Collections.SingletonMap,
[]);this.k=a;this.v=g},"~O,~O");j(a,"containsKey",function(a){return null==this.k?null==a:this.k.equals(a)},"~O");j(a,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");j(a,"get",function(a){return this.containsKey(a)?this.v:null},"~O");j(a,"size",function(){return 1});j(a,"entrySet",function(){return S("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),U(java.util.Collections$SingletonMap$1,this,null)});a.$Collections$SingletonMap$1$=
function(){var a=$(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);j(a,"contains",function(a){return y(a,"java.util.Map.Entry")?this.b$["java.util.Collections.SingletonMap"].containsKey(a.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(a.getValue()):!1},"~O");j(a,"size",function(){return 1});j(a,"iterator",function(){return S("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),U(java.util.Collections$SingletonMap$1$1,
this,null)})};a.$Collections$SingletonMap$1$1$=function(){var a=n(function(){X(this,arguments);this.$hasNext=!0;v(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);j(a,"hasNext",function(){return this.$hasNext});j(a,"next",function(){if(this.$hasNext)return this.$hasNext=!1,S("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),U(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});j(a,"remove",function(){throw new UnsupportedOperationException;})};a.$Collections$SingletonMap$1$1$1$=function(){var a=$(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);j(a,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");j(a,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});j(a,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});j(a,"hashCode",function(){return(null==this.b$["java.util.Collections.SingletonMap"].k?
0:this.b$["java.util.Collections.SingletonMap"].k.hashCode())^(null==this.b$["java.util.Collections.SingletonMap"].v?0:this.b$["java.util.Collections.SingletonMap"].v.hashCode())});j(a,"setValue",function(){throw new UnsupportedOperationException;},"~O")};a=n(function(){this.mutex=this.c=null;v(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);A(a,function(a){this.c=a;this.mutex=this},"java.util.Collection");A(a,function(a,g){this.c=
a;this.mutex=g},"java.util.Collection,~O");c(a,"add",function(a){return this.c.add(a)},"~O");c(a,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");c(a,"clear",function(){this.c.clear()});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"iterator",function(){return this.c.iterator()});c(a,"remove",function(a){return this.c.remove(a)},
"~O");c(a,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(a,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(a,"size",function(){return this.c.size()});c(a,"toArray",function(){return this.c.toArray()});c(a,"toString",function(){return this.c.toString()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");a=I(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);j(a,"subList",
function(a,g){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,g),this.mutex)},"~N,~N");a=n(function(){this.list=null;v(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);A(a,function(a){M(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");A(a,function(a,g){M(this,java.util.Collections.SynchronizedList,[a,g]);this.list=a},"java.util.List,~O");c(a,"add",function(a,g){this.list.add(a,
g)},"~N,~O");c(a,"addAll",function(a,g){return this.list.addAll(a,g)},"~N,java.util.Collection");c(a,"equals",function(a){return this.list.equals(a)},"~O");c(a,"get",function(a){return this.list.get(a)},"~N");c(a,"hashCode",function(){return this.list.hashCode()});c(a,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(a,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return this.list.listIterator()});c(a,"listIterator",function(a){return this.list.listIterator(a)},
"~N");c(a,"remove",function(a){return this.list.remove(a)},"~N");c(a,"set",function(a,g){return this.list.set(a,g)},"~N,~O");c(a,"subList",function(a,g){return new java.util.Collections.SynchronizedList(this.list.subList(a,g),this.mutex)},"~N,~N");a=n(function(){this.mutex=this.m=null;v(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);A(a,function(a){this.m=a;this.mutex=this},"java.util.Map");A(a,function(a,g){this.m=a;this.mutex=g},"java.util.Map,~O");
c(a,"clear",function(){this.m.clear()});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(a,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex)});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"get",function(a){return this.m.get(a)},"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"keySet",
function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex)});c(a,"put",function(a,g){return this.m.put(a,g)},"~O,~O");c(a,"putAll",function(a){this.m.putAll(a)},"java.util.Map");c(a,"remove",function(a){return this.m.remove(a)},"~O");c(a,"size",function(){return this.m.size()});c(a,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex)});c(a,"toString",function(){return this.m.toString()});a=I(java.util.Collections,"SynchronizedSet",
java.util.Collections.SynchronizedCollection,java.util.Set);j(a,"equals",function(a){return this.c.equals(a)},"~O");j(a,"hashCode",function(){return this.c.hashCode()});a=n(function(){this.sm=null;v(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);A(a,function(a){M(this,java.util.Collections.SynchronizedSortedMap,[a]);this.sm=a},"java.util.SortedMap");A(a,function(a,g){M(this,java.util.Collections.SynchronizedSortedMap,[a,g]);
this.sm=a},"java.util.SortedMap,~O");c(a,"comparator",function(){return this.sm.comparator()});c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex)},"~O");c(a,"lastKey",function(){return this.sm.lastKey()});c(a,"subMap",function(a,g){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,g),this.mutex)},"~O,~O");c(a,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),
this.mutex)},"~O");a=n(function(){this.ss=null;v(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);A(a,function(a){M(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");A(a,function(a,g){M(this,java.util.Collections.SynchronizedSortedSet,[a,g]);this.ss=a},"java.util.SortedSet,~O");c(a,"comparator",function(){return this.ss.comparator()});c(a,"first",function(){return this.ss.first()});c(a,"headSet",
function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");c(a,"last",function(){return this.ss.last()});c(a,"subSet",function(a,g){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,g),this.mutex)},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex)},"~O");a=n(function(){this.c=null;v(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,
java.io.Serializable]);A(a,function(a){this.c=a},"java.util.Collection");j(a,"add",function(){throw new UnsupportedOperationException;},"~O");j(a,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");j(a,"clear",function(){throw new UnsupportedOperationException;});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"iterator",
function(){return S("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),U(java.util.Collections$UnmodifiableCollection$1,this,null)});j(a,"remove",function(){throw new UnsupportedOperationException;},"~O");j(a,"removeAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");j(a,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(a,"size",function(){return this.c.size()});
c(a,"toArray",function(){return this.c.toArray()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");c(a,"toString",function(){return this.c.toString()});a.$Collections$UnmodifiableCollection$1$=function(){var a=n(function(){X(this,arguments);this.iterator=null;v(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);P(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});c(a,"hasNext",function(){return this.iterator.hasNext()});
c(a,"next",function(){return this.iterator.next()});j(a,"remove",function(){throw new UnsupportedOperationException;})};a=I(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);j(a,"subList",function(a,g){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,g))},"~N,~N");a=n(function(){this.list=null;v(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
A(a,function(a){M(this,java.util.Collections.UnmodifiableList,[a]);this.list=a},"java.util.List");c(a,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(a,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");c(a,"equals",function(a){return this.list.equals(a)},"~O");c(a,"get",function(a){return this.list.get(a)},"~N");c(a,"hashCode",function(){return this.list.hashCode()});c(a,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(a,"lastIndexOf",
function(a){return this.list.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return this.listIterator(0)});c(a,"listIterator",function(a){return S("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),U(java.util.Collections$UnmodifiableList$1,this,la("location",a))},"~N");c(a,"remove",function(){throw new UnsupportedOperationException;},"~N");j(a,"set",function(){throw new UnsupportedOperationException;},"~N,~O");c(a,"subList",
function(a,g){return new java.util.Collections.UnmodifiableList(this.list.subList(a,g))},"~N,~N");a.$Collections$UnmodifiableList$1$=function(){var a=n(function(){X(this,arguments);this.iterator=null;v(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);P(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(this.f$.location)});j(a,"add",function(){throw new UnsupportedOperationException;},"~O");c(a,"hasNext",function(){return this.iterator.hasNext()});
c(a,"hasPrevious",function(){return this.iterator.hasPrevious()});c(a,"next",function(){return this.iterator.next()});c(a,"nextIndex",function(){return this.iterator.nextIndex()});c(a,"previous",function(){return this.iterator.previous()});c(a,"previousIndex",function(){return this.iterator.previousIndex()});j(a,"remove",function(){throw new UnsupportedOperationException;});j(a,"set",function(){throw new UnsupportedOperationException;},"~O")};a=n(function(){this.m=null;v(this,arguments)},java.util.Collections,
"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);A(a,function(a){this.m=a},"java.util.Map");j(a,"clear",function(){throw new UnsupportedOperationException;});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(a,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"get",function(a){return this.m.get(a)},
"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});j(a,"put",function(){throw new UnsupportedOperationException;},"~O,~O");j(a,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");j(a,"remove",function(){throw new UnsupportedOperationException;},"~O");c(a,"size",function(){return this.m.size()});c(a,"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});
c(a,"toString",function(){return this.m.toString()});a=I(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);j(a,"iterator",function(){return S("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),U(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});c(a,"toArray",function(){for(var a=this.c.size(),g=Array(a),
b=this.iterator();0<=--a;)g[a]=b.next();return g});c(a,"toArray",function(a){var g=this.c.size(),b=0,c=this.iterator();g>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,g));for(;b<g;)a[b++]=c.next();b<a.length&&(a[b]=null);return a},"~A");a.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){var a=n(function(){X(this,arguments);this.iterator=null;v(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
P(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});c(a,"hasNext",function(){return this.iterator.hasNext()});c(a,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});j(a,"remove",function(){throw new UnsupportedOperationException;})};a=n(function(){this.mapEntry=null;v(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",
null,java.util.Map.Entry);A(a,function(a){this.mapEntry=a},"java.util.Map.Entry");c(a,"equals",function(a){return this.mapEntry.equals(a)},"~O");c(a,"getKey",function(){return this.mapEntry.getKey()});c(a,"getValue",function(){return this.mapEntry.getValue()});c(a,"hashCode",function(){return this.mapEntry.hashCode()});j(a,"setValue",function(){throw new UnsupportedOperationException;},"~O");c(a,"toString",function(){return this.mapEntry.toString()});a=I(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,
java.util.Set);j(a,"equals",function(a){return this.c.equals(a)},"~O");j(a,"hashCode",function(){return this.c.hashCode()});a=n(function(){this.sm=null;v(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);A(a,function(a){M(this,java.util.Collections.UnmodifiableSortedMap,[a]);this.sm=a},"java.util.SortedMap");c(a,"comparator",function(){return this.sm.comparator()});c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"headMap",
function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");c(a,"lastKey",function(){return this.sm.lastKey()});c(a,"subMap",function(a,g){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,g))},"~O,~O");c(a,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},"~O");a=n(function(){this.ss=null;v(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
A(a,function(a){M(this,java.util.Collections.UnmodifiableSortedSet,[a]);this.ss=a},"java.util.SortedSet");c(a,"comparator",function(){return this.ss.comparator()});c(a,"first",function(){return this.ss.first()});c(a,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},"~O");c(a,"last",function(){return this.ss.last()});c(a,"subSet",function(a,g){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,g))},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},
"~O");a=n(function(){this.type=this.c=null;v(this,arguments)},java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);A(a,function(a,g){if(null==a||null==g)throw new NullPointerException;this.c=a;this.type=g},"java.util.Collection,Class");c(a,"size",function(){return this.c.size()});c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"iterator",function(){var a=this.c.iterator();y(a,"java.util.ListIterator")&&
(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});c(a,"toArray",function(){return this.c.toArray()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");c(a,"add",function(a){return this.c.add(java.util.Collections.checkType(a,this.type))},"~O");c(a,"remove",function(a){return this.c.remove(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");j(a,"addAll",function(a){var g=a.size();if(0==g)return!1;var b=Array(g),c=a.iterator();
for(a=0;a<g;a++)b[a]=java.util.Collections.checkType(c.next(),this.type);c=!1;for(a=0;a<g;a++)c=(new Boolean(c|this.c.add(b[a]))).valueOf();return c},"java.util.Collection");c(a,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(a,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(a,"clear",function(){this.c.clear()});c(a,"toString",function(){return this.c.toString()});a=n(function(){this.type=this.i=null;v(this,arguments)},java.util.Collections,
"CheckedListIterator",null,java.util.ListIterator);A(a,function(a,g){this.i=a;this.type=g},"java.util.ListIterator,Class");c(a,"hasNext",function(){return this.i.hasNext()});c(a,"next",function(){return this.i.next()});c(a,"remove",function(){this.i.remove()});c(a,"hasPrevious",function(){return this.i.hasPrevious()});c(a,"previous",function(){return this.i.previous()});c(a,"nextIndex",function(){return this.i.nextIndex()});c(a,"previousIndex",function(){return this.i.previousIndex()});c(a,"set",
function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");c(a,"add",function(a){this.i.add(java.util.Collections.checkType(a,this.type))},"~O");a=n(function(){this.l=null;v(this,arguments)},java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);A(a,function(a,g){M(this,java.util.Collections.CheckedList,[a,g]);this.l=a},"java.util.List,Class");c(a,"addAll",function(a,g){var b=g.size();if(0==b)return!1;for(var c=Array(b),f=g.iterator(),h=0;h<b;h++)c[h]=
java.util.Collections.checkType(f.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(c))},"~N,java.util.Collection");c(a,"get",function(a){return this.l.get(a)},"~N");c(a,"set",function(a,g){return this.l.set(a,java.util.Collections.checkType(g,this.type))},"~N,~O");c(a,"add",function(a,g){this.l.add(a,java.util.Collections.checkType(g,this.type))},"~N,~O");c(a,"remove",function(a){return this.l.remove(a)},"~N");c(a,"indexOf",function(a){return this.l.indexOf(a)},"~O");c(a,"lastIndexOf",
function(a){return this.l.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type)});c(a,"listIterator",function(a){return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type)},"~N");c(a,"subList",function(a,g){return java.util.Collections.checkedList(this.l.subList(a,g),this.type)},"~N,~N");c(a,"equals",function(a){return this.l.equals(a)},"~O");c(a,"hashCode",function(){return this.l.hashCode()});
I(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);a=I(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);j(a,"equals",function(a){return this.c.equals(a)},"~O");j(a,"hashCode",function(){return this.c.hashCode()});a=n(function(){this.valueType=this.keyType=this.m=null;v(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);A(a,function(a,g,b){if(null==a||null==
g||null==b)throw new NullPointerException;this.m=a;this.keyType=g;this.valueType=b},"java.util.Map,Class,Class");c(a,"size",function(){return this.m.size()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(a,"get",function(a){return this.m.get(a)},"~O");c(a,"put",function(a,g){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(g,
this.valueType))},"~O,~O");c(a,"remove",function(a){return this.m.remove(a)},"~O");j(a,"putAll",function(a){var g=a.size();if(0!=g){var b=Array(g);a=a.entrySet().iterator();for(var c=0;c<g;c++){var f=a.next();java.util.Collections.checkType(f.getKey(),this.keyType);java.util.Collections.checkType(f.getValue(),this.valueType);b[c]=f}for(c=0;c<g;c++)this.m.put(b[c].getKey(),b[c].getValue())}},"java.util.Map");c(a,"clear",function(){this.m.clear()});c(a,"keySet",function(){return this.m.keySet()});c(a,
"values",function(){return this.m.values()});c(a,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"toString",function(){return this.m.toString()});a=n(function(){this.valueType=this.e=null;v(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);A(a,function(a,g){if(null==a)throw new NullPointerException;
this.e=a;this.valueType=g},"java.util.Map.Entry,Class");c(a,"getKey",function(){return this.e.getKey()});c(a,"getValue",function(){return this.e.getValue()});c(a,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");c(a,"equals",function(a){return this.e.equals(a)},"~O");c(a,"hashCode",function(){return this.e.hashCode()});a=n(function(){this.valueType=this.s=null;v(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
A(a,function(a,g){this.s=a;this.valueType=g},"java.util.Set,Class");c(a,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType)});c(a,"toArray",function(){for(var a=this.size(),g=Array(a),b=this.iterator(),c=0;c<a;c++)g[c]=b.next();return g});c(a,"toArray",function(a){var g=this.size();a.length<g&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,g));for(var b=this.iterator(),c=0;c<g;c++)a[c]=
b.next();g<a.length&&(a[g]=null);return a},"~A");c(a,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");c(a,"removeAll",function(a){return this.s.removeAll(a)},"java.util.Collection");c(a,"containsAll",function(a){return this.s.containsAll(a)},"java.util.Collection");j(a,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(a,"remove",function(a){return this.s.remove(a)},"~O");c(a,"contains",function(a){return this.s.contains(a)},"~O");j(a,
"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");c(a,"isEmpty",function(){return this.s.isEmpty()});c(a,"clear",function(){this.s.clear()});c(a,"size",function(){return this.s.size()});c(a,"hashCode",function(){return this.s.hashCode()});c(a,"equals",function(a){return this.s.equals(a)},"~O");a=n(function(){this.valueType=this.i=null;v(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);A(a,function(a,g){this.i=
a;this.valueType=g},"java.util.Iterator,Class");c(a,"hasNext",function(){return this.i.hasNext()});c(a,"remove",function(){this.i.remove()});c(a,"next",function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType)});a=n(function(){this.ss=null;v(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);A(a,function(a,g){M(this,java.util.Collections.CheckedSortedSet,[a,g]);this.ss=a},"java.util.SortedSet,Class");
c(a,"comparator",function(){return this.ss.comparator()});c(a,"subSet",function(a,g){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,g),this.type)},"~O,~O");c(a,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type)},"~O");c(a,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type)},"~O");c(a,"first",function(){return this.ss.first()});c(a,"last",function(){return this.ss.last()});a=n(function(){this.sm=
null;v(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);A(a,function(a,g,b){M(this,java.util.Collections.CheckedSortedMap,[a,g,b]);this.sm=a},"java.util.SortedMap,Class,Class");c(a,"comparator",function(){return this.sm.comparator()});c(a,"subMap",function(a,g){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,g),this.keyType,this.valueType)},"~O,~O");c(a,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),
this.keyType,this.valueType)},"~O");c(a,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType)},"~O");c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"lastKey",function(){return this.sm.lastKey()});b.EMPTY_ENUMERATION=null;b.EMPTY_ITERATOR=null;b.EMPTY_LIST=new java.util.Collections.EmptyList;b.EMPTY_SET=new java.util.Collections.EmptySet;b.EMPTY_MAP=new java.util.Collections.EmptyMap});I(java.util,"Dictionary",null);B("java.util.AbstractCollection $.AbstractSet $.Dictionary $.Enumeration $.Iterator $.Map".split(" "),
"java.util.Hashtable",["java.util.Collections"],function(){var b=n(function(){this.table=null;this.modCount=this.loadFactor=this.threshold=this.count=0;this.__m=this.$values=this.$entrySet=this.$keySet=null;this.__allowJS=!1;v(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable]);A(b,function(){this.initHT()});c(b,"initHT",function(a,g){var b=null,c=11,f=0.75,c=a,f=g;"object"==typeof c?(b=c,c=Math.max(2*t.size(),11),this.__allowJS=b.__allowJS):this.__allowJS=!0;c=
c||11;f=f||0.75;if(0>c)throw new IllegalArgumentException("Illegal Capacity: "+c);if(0>=f||Float.isNaN(f))throw new IllegalArgumentException("Illegal Load: "+f);0==c&&(c=1);this.loadFactor=f;this.table=Array(c);this.threshold=D(Math.min(c*f,2147483640));this.__setJS();null!=b&&this.putAll(b)});j(b,"size",function(){var a=this.count;return a=this.__m&&this.__m.size||a});j(b,"isEmpty",function(){return 0==this.size()});j(b,"keys",function(){return this.getEnumeration(0)});j(b,"elements",function(){return this.getEnumeration(1)});
c(b,"contains",function(a){if(null==a)throw new NullPointerException;if(0==this.size())return!1;if(java.util.Hashtable.__isSimple(this))for(var g=this.__m.values(),b=g.next();!b.done;b=g.next()){if(b.value==a||b.value.equals(a))return!0}else{g=this.table;for(b=g.length;0<b--;)for(var c=g[b];null!=c;c=c.next_)if(c.value.equals(a))return!0}return!1},"~O");j(b,"containsValue",function(a){return this.contains(a)},"~O");j(b,"containsKey",function(a){switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);
break;case 2:return!1;case 3:return!0}for(var g=this.table,b=a.hashCode(),g=g[(b&2147483647)%g.length];null!=g;g=g.next_)if(g.hash==b&&g.key.equals(a))return!0;return!1},"~O");j(b,"get",function(a){if(null==a)return null;switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return null;case 3:var g=null;return g=this.__m.get(a)}for(var b=this.table,g=a.hashCode(),b=b[(g&2147483647)%b.length];null!=b;b=b.next_)if(b.hash==g&&b.key.equals(a))return b.value;
return null},"~O");c(b,"rehash",function(){var a=this.table.length,g=this.table,b=(a<<1)+1;if(0<b-2147483639){if(2147483639==a)return;b=2147483639}var c=Array(b);this.modCount++;this.threshold=D(Math.min(b*this.loadFactor,2147483640));for(this.table=c;0<a--;)for(var f=g[a];null!=f;){var h=f,f=f.next_,k=(h.hash&2147483647)%b;h.next_=c[k];c[k]=h}});c(b,"addEntry",function(a,g,b,c){this.modCount++;var f=this.table;this.count>=this.threshold&&(this.rehash(),f=this.table,a=g.hashCode(),c=(a&2147483647)%
f.length);f[c]=new java.util.Hashtable.Entry(a,g,b,f[c]);this.count++},"~N,~O,~O,~N");j(b,"put",function(a,g){if(null==g)throw new NullPointerException;switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return this.__m.set(a,g),++this.modCount,null;case 3:var b=null,b=this.__m.get(a);this.__m.set(a,g);++this.modCount;return b}for(var c=this.table,b=a.hashCode(),f=(b&2147483647)%c.length,c=c[f];null!=c;c=c.next_)if(c.hash==b&&c.key.equals(a))return b=
c.value,c.value=g,b;this.addEntry(b,a,g,f);return null},"~O,~O");j(b,"remove",function(a){if(null==a)throw new NullPointerException("Hashtable key may not be null");switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return null;case 3:var g=null,g=this.__m.get(a);this.__m["delete"](a);++this.modCount;return g}for(var b=this.table,c=a.hashCode(),f=(c&2147483647)%b.length,g=b[f],h=null;null!=g;h=g,g=g.next_)if(g.hash==c&&g.key.equals(a))return this.modCount++,
null!=h?h.next_=g.next_:b[f]=g.next_,this.count--,a=g.value,g.value=null,a;return null},"~O");j(b,"putAll",function(a){if(java.util.Hashtable.__isSimple(a)){var g=this;a.__m.forEach(function(a,d){g.put(d,a)})}else{var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())}},"java.util.Map");j(b,"clear",function(){var a=this.table;this.modCount++;java.util.Hashtable.__isSimple(this)&&this.__m.clear();this.__setJS();for(var g=a.length;0<=--g;)a[g]=null;this.count=
0});c(b,"clone",function(){try{var a=Z(this,java.util.Hashtable,"clone",[]);a.table=Array(this.table.length);for(var g=this.table.length;0<g--;)a.table[g]=null!=this.table[g]?this.table[g].clone():null;a.$keySet=null;a.$entrySet=null;a.$values=null;a.modCount=0;java.util.Hashtable.__isSimple(this)?(a.__setJS(),this.__m.forEach(function(g,b){a.__m.set(b,g);a.modCount++})):a.__m=null;return a}catch(b){if(H(b,"CloneNotSupportedException"))throw new InternalError(b);throw b;}});j(b,"toString",function(){var a=
this.size()-1;if(-1==a)return"{}";for(var g=this.entrySet().iterator(),b="{",c=0;;c++){var f=g.next(),h=f.getKey(),f=f.getValue(),b=b+(h===this?"(this Map)":h.toString()),b=b+"=",b=b+(f===this?"(this Map)":f.toString());if(c==a)return b+"}";b+=", "}});j(b,"equals",function(a){if(a===this)return!0;if(!y(a,"java.util.Map")||a.size()!=this.size())return!1;try{for(var g=this.entrySet().iterator();g.hasNext();){var b=g.next(),c=b.getKey(),f=b.getValue();if(null==f){if(!(null==a.get(c)&&a.containsKey(c)))return!1}else if(!f.equals(a.get(c)))return!1}}catch(h){if(H(h,
"ClassCastException")||H(h,NullPointerException))return!1;throw h;}return!0},"~O");j(b,"hashCode",function(){var a=0;if(0==this.count||0>this.loadFactor)return a;this.loadFactor=-this.loadFactor;for(var g,b=0,c=this.table;b<c.length&&((g=c[b])||1);b++)for(;null!=g;)a+=g.hashCode(),g=g.next_;this.loadFactor=-this.loadFactor;return a});c(b,"getEnumeration",function(a){return 0==this.size()?java.util.Collections.emptyEnumeration():new java.util.Hashtable.Enumerator(this,a,!1)},"~N");c(b,"getIterator",
function(a){return 0==this.size()?java.util.Collections.emptyIterator():new java.util.Hashtable.Enumerator(this,a,!0)},"~N");j(b,"keySet",function(){null==this.$keySet&&(this.$keySet=new java.util.Hashtable.KeySet(this));return this.$keySet});j(b,"entrySet",function(){null==this.$entrySet&&(this.$entrySet=new java.util.Hashtable.EntrySet(this));return this.$entrySet});j(b,"values",function(){null==this.$values&&(this.$values=new java.util.Hashtable.ValueCollection(this));return this.$values});c(b,
"__setJS",function(){if(this.__allowJS&&java.util.Hashtable.USE_SIMPLE){var a=null;this.__m=a=new Map}else this.__m=null});b.__get=c(b,"__get",function(a,g){return a.__m.get(null==g?null:g+"")},"~O,~O");b.__set=c(b,"__set",function(a,g,b){a.__m.set(null==g?null:g+"",b)},"java.util.Map,~O,~O");b.__hasKey=c(b,"__hasKey",function(a,g){return!a.__m?0:null!=g&&"string"!=typeof g?1:a.__m.has(g)?3:2},"java.util.Map,~O");b.__isSimple=c(b,"__isSimple",function(a){return!!a.__m},"java.util.Map");b.__ensureJavaMap=
c(b,"__ensureJavaMap",function(a){if(a.__m){var g=a.__m;a.__m=null;g.forEach(function(g,b){a.put(b,g)});g.clear()}},"java.util.Map");var a=n(function(){this.hash=0;this.next_=this.value=this.key=null;v(this,arguments)},java.util.Hashtable,"Entry",null,java.util.Map.Entry);A(a,function(a,g,b,c){this.hash=a;this.key=g;this.value=b;this.next_=c},"~N,~O,~O,java.util.Hashtable.Entry");j(a,"clone",function(){return new java.util.Hashtable.Entry(this.hash,this.key,this.value,null==this.next_?null:this.next_.clone())});
j(a,"getKey",function(){return this.key});j(a,"getValue",function(){return this.value});j(a,"setValue",function(a){if(null==a)throw new NullPointerException;var g=this.value;this.value=a;return g},"~O");j(a,"equals",function(a){return!y(a,"java.util.Map.Entry")?!1:(null==this.key?null==a.getKey():this.key.equals(a.getKey()))&&(null==this.value?null==a.getValue():this.value.equals(a.getValue()))},"~O");j(a,"hashCode",function(){return this.hash^(null==this.value?0:this.value.hashCode())});c(a,"toString",
function(){return this.key.toString()+"="+this.value.toString()});a=n(function(){this.ht=null;v(this,arguments)},java.util.Hashtable,"KeySet",java.util.AbstractSet);A(a,function(a){M(this,java.util.Hashtable.KeySet,[]);this.ht=a},"java.util.Hashtable");j(a,"iterator",function(){return this.ht.getIterator(0)});j(a,"size",function(){return this.ht.size()});j(a,"contains",function(a){return this.ht.containsKey(a)},"~O");j(a,"remove",function(a){return null!=this.ht.remove(a)},"~O");j(a,"clear",function(){this.ht.clear()});
a=n(function(){this.ht=null;v(this,arguments)},java.util.Hashtable,"EntrySet",java.util.AbstractSet);A(a,function(a){M(this,java.util.Hashtable.EntrySet,[]);this.ht=a},"java.util.Hashtable");j(a,"iterator",function(){return this.ht.getIterator(2)});j(a,"contains",function(a){if(!y(a,"java.util.Map.Entry"))return!1;var g=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,g)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();var b=this.ht.get(g);return a===b||null!=
a&&a.equals(g);case 2:return!1}b=this.ht.table;g=g.hashCode();for(b=b[(g&2147483647)%b.length];null!=b;b=b.next_)if(b.hash==g&&b.equals(a))return!0;return!1},"~O");j(a,"remove",function(a){if(!y(a,"java.util.Map.Entry"))return!1;var g=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,g)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();if(null==a)return!1;var b=this.ht.get(g);return b===a||b.equals(a)?(this.ht.remove(g),!0):!1;case 2:return!1}for(var b=this.ht.table,
g=g.hashCode(),c=(g&2147483647)%b.length,f=b[c],h=null;null!=f;h=f,f=f.next_)if(f.hash==g&&f.equals(a))return this.ht.modCount++,null!=h?h.next_=f.next_:b[c]=f.next_,this.ht.count--,f.value=null,!0;return!1},"~O");j(a,"size",function(){return this.ht.size()});j(a,"clear",function(){this.ht.clear()});a=n(function(){this.ht=null;v(this,arguments)},java.util.Hashtable,"ValueCollection",java.util.AbstractCollection);A(a,function(a){M(this,java.util.Hashtable.ValueCollection,[]);this.ht=a},"java.util.Hashtable");
j(a,"iterator",function(){return this.ht.getIterator(1)});j(a,"size",function(){return this.ht.size()});j(a,"contains",function(a){return this.ht.containsValue(a)},"~O");j(a,"clear",function(){this.ht.clear()});a=n(function(){this.table=null;this.index=0;this.current=this.next_=null;this.type=0;this.ht=this.jsMapIterator=null;this.isIterator=!1;this.expectedModCount=0;v(this,arguments)},java.util.Hashtable,"Enumerator",null,[java.util.Enumeration,java.util.Iterator]);A(a,function(a,g,b){this.ht=a;
this.table=a.table;this.index=a.table.length;this.type=g;this.isIterator=b;this.expectedModCount=a.modCount;java.util.Hashtable.__isSimple(a)&&(this.jsMapIterator=a.__m.entries(),this.next_=this.jsMapIterator.next())},"java.util.Hashtable,~N,~B");j(a,"hasMoreElements",function(){if(java.util.Hashtable.__isSimple(this.ht)){var a=!1;return a=this.next_&&!this.next_.done}for(var a=this.next_,g=this.index,b=this.table;null==a&&0<g;)a=b[--g];this.next_=a;this.index=g;return null!=a});j(a,"nextElement",
function(){var a=this.next_;if(java.util.Hashtable.__isSimple(this.ht)){var g=this.type;this.current=a;var b=null;this.next_=b=this.jsMapIterator.next()||null;if(null!=a){var c=b=null,f=!1,f=a.done;if(!f){if(2>g)return a.value[g];b=a.value[0];c=a.value[1]}if(!f)return S("java.util.Hashtable$Enumerator$1")?0:java.util.Hashtable.Enumerator.$Hashtable$Enumerator$1$(),U(java.util.Hashtable$Enumerator$1,this,null,0,b,c,null)}}else{b=this.index;for(g=this.table;null==a&&0<b;)a=g[--b];this.next_=a;this.index=
b;if(null!=a)return a=this.current=this.next_,this.next_=a.next_,0==this.type?a.key:1==this.type?a.value:a}throw new java.util.NoSuchElementException("Hashtable Enumerator");});j(a,"hasNext",function(){return this.hasMoreElements()});j(a,"next",function(){if(this.ht.modCount!=this.expectedModCount)throw new java.util.ConcurrentModificationException;return this.nextElement()});j(a,"remove",function(){if(!this.isIterator)throw new UnsupportedOperationException;var a=this.current;if(null==a)throw new IllegalStateException("Hashtable Enumerator");
if(this.ht.modCount!=this.expectedModCount)throw new java.util.ConcurrentModificationException;if(java.util.Hashtable.__isSimple(this.ht)){var g=null,g=a.value[0];this.ht.remove(g);this.expectedModCount++}else{for(var a=this.ht.table,g=(this.current.hash&2147483647)%a.length,b=a[g],c=null;null!=b;c=b,b=b.next_)if(b===this.current){this.ht.modCount++;this.expectedModCount++;null==c?a[g]=b.next_:c.next_=b.next_;this.ht.count--;this.current=null;return}throw new java.util.ConcurrentModificationException;
}});a.$Hashtable$Enumerator$1$=function(){var a=$(java.util,"Hashtable$Enumerator$1",java.util.Hashtable.Entry);j(a,"setValue",function(a){var d=this.b$["java.util.Hashtable.Enumerator"].ht.modCount;a=this.b$["java.util.Hashtable.Enumerator"].ht.put(this.getKey(),a);this.b$["java.util.Hashtable.Enumerator"].ht.modCount=d;return a},"~O")};b.USE_SIMPLE=!0});B(["java.util.Map"],"java.util.MapEntry",null,function(){var b=n(function(){this.value=this.key=null;v(this,arguments)},java.util,"MapEntry",null,
[java.util.Map.Entry,Cloneable]);A(b,function(a){this.key=a},"~O");A(b,function(a,d){this.key=a;this.value=d},"~O,~O");c(b,"clone",function(){try{return Z(this,java.util.MapEntry,"clone",[])}catch(a){if(H(a,"CloneNotSupportedException"))return null;throw a;}});j(b,"equals",function(a){return this===a?!0:y(a,"java.util.Map.Entry")?(null==this.key?null==a.getKey():this.key.equals(a.getKey()))&&(null==this.value?null==a.getValue():this.value.equals(a.getValue())):!1},"~O");j(b,"getKey",function(){return this.key});
j(b,"getValue",function(){return this.value});j(b,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});j(b,"setValue",function(a){var d=this.value;this.value=a;return d},"~O");j(b,"toString",function(){return this.key+"="+this.value});O(java.util.MapEntry,"Type")});B(["java.util.Hashtable"],"java.util.Properties",null,function(){var b=n(function(){this.defaults=this.builder=null;v(this,arguments)},java.util,"Properties",java.util.Hashtable);
A(b,function(){M(this,java.util.Properties,[])});A(b,function(a){this.initHT();this.defaults=null==a?null:a},"java.util.Properties");c(b,"dumpString",function(a,d,g){var b=0;!g&&(b<d.length&&" "==d.charAt(b))&&(a+="\\ ",b++);for(;b<d.length;b++){var c=d.charAt(b);switch(c.charCodeAt(0)){case 9:a+="\\t";break;case 10:a+="\\n";break;case 12:a+="\\f";break;case 13:a+="\\r";break;default:if(0<="\\#!=:".indexOf(c)||g&&" "==c)a+="\\";if(!(" "<=c&&"~">=c)){c=Integer.toHexString(c.charCodeAt(0));a+="\\u";
for(var f=0;f<4-c.length;f++)a+="0"}a+=c}}return a},"~S,~S,~B");c(b,"getProperty",function(a){var d=this.get(a),d="string"==typeof d?d:null;null==d&&null!=this.defaults&&(d=this.defaults.getProperty(a));return d},"~S");c(b,"getProperty",function(a,d){var g=this.get(a),g="string"==typeof g?g:null;null==g&&null!=this.defaults&&(g=this.defaults.getProperty(a));return null==g?d:g},"~S,~S");c(b,"list",function(a){if(null==a)throw new NullPointerException;for(var d="",g=this.propertyNames();g.hasMoreElements();){for(var b=
g.nextElement(),d=d+b,d=d+"=",c=this.get(b),f=this.defaults;null==c;)c=f.get(b),f=f.defaults;40<c.length?(d+=c.substring(0,37),d+="..."):d+=c;a.println(d.toString());d=""}},"java.io.PrintStream");c(b,"list",function(a){if(null==a)throw new NullPointerException;for(var d="",g=this.propertyNames();g.hasMoreElements();){for(var b=g.nextElement(),d=d+b,d=d+"=",c=this.get(b),f=this.defaults;null==c;)c=f.get(b),f=f.defaults;40<c.length?(d+=c.substring(0,37),d+="..."):d+=c;a.println(d.toString());d=""}},
"java.io.PrintWriter");c(b,"load",function(){},"java.io.InputStream");c(b,"propertyNames",function(){if(null==this.defaults)return this.keys();for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),d=this.defaults.propertyNames();d.hasMoreElements();)a.put(d.nextElement(),a);for(d=this.keys();d.hasMoreElements();)a.put(d.nextElement(),a);return a.keys()});c(b,"save",function(a,d){try{this.store(a,d)}catch(g){if(!H(g,"java.io.IOException"))throw g;}},"java.io.OutputStream,~S");c(b,"setProperty",
function(a,d){return this.put(a,d)},"~S,~S");c(b,"store",function(){},"java.io.OutputStream,~S");c(b,"loadFromXML",function(){},"java.io.InputStream");c(b,"storeToXML",function(){},"java.io.OutputStream,~S");c(b,"storeToXML",function(){},"java.io.OutputStream,~S,~S");c(b,"substitutePredefinedEntries",function(a){return a.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},"~S");b.lineSeparator=null});O(java.util,"SortedMap",java.util.Map);
O(java.util,"SortedSet",java.util.Set);B(["java.util.Enumeration"],"java.util.StringTokenizer",null,function(){var b=n(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;v(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration);A(b,function(a,d,g){switch(arguments.length){case 1:d=" \t\n\r\f";case 2:g=!1}if(null==a)throw new NullPointerException;this.string=a;this.delimiters=d;this.returnDelimiters=g;this.position=0},"~S,~S,~B");c(b,"countTokens",
function(){for(var a=0,d=!1,g=this.position,b=this.string.length;g<b;g++)0<=this.delimiters.indexOf(this.string.charAt(g),0)?(this.returnDelimiters&&a++,d&&(a++,d=!1)):d=!0;d&&a++;return a});j(b,"hasMoreElements",function(){return this.hasMoreTokens()});c(b,"hasMoreTokens",function(){var a=this.string.length;if(this.position<a){if(this.returnDelimiters)return!0;for(var d=this.position;d<a;d++)if(-1==this.delimiters.indexOf(this.string.charAt(d),0))return!0}return!1});j(b,"nextElement",function(){return this.nextToken()});
c(b,"nextToken",function(){1==arguments.length&&(this.delimiters=arguments[0]);var a=this.position,d=this.string.length;if(a<d){if(this.returnDelimiters){if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return String.valueOf(this.string.charAt(this.position++));for(this.position++;this.position<d;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);return this.string.substring(a)}for(;a<d&&0<=this.delimiters.indexOf(this.string.charAt(a),
0);)a++;this.position=a;if(a<d){for(this.position++;this.position<d;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);return this.string.substring(a)}}throw new java.util.NoSuchElementException;})});s("javajs.api");O(javajs.api,"BytePoster");s("javajs.api");O(javajs.api,"GenericColor");s("J.api");O(J.api,"GenericFileInterface");s("javajs.api");O(javajs.api,"GenericOutputChannel");s("javajs.api");O(javajs.api,"JSInterface");
s("javajs.api");O(javajs.api,"JSONEncodable");s("javajs.api");O(javajs.api,"ZInputStream");s("javajs.api.js");O(javajs.api.js,"J2SObjectInterface");s("J.api");O(J.api,"GenericMouseInterface");s("J.api");B(["J.api.FontManager"],"J.api.GenericPlatform",null,function(){O(J.api,"GenericPlatform",J.api.FontManager)});s("J.api");O(J.api,"PlatformViewer");s("J.api");O(J.api,"EventManager");s("J.api");O(J.api,"FontManager");s("JU");B(null,"JU.Font",["JU.AU"],function(){var b=n(function(){this.fid=0;this.fontStyle=
this.fontFace=null;this.fontSize=this.idFontStyle=this.idFontFace=this.fontSizeNominal=0;this.manager=this.fontMetrics=this.font=null;this.descent=this.ascent=0;this.isItalic=this.isBold=!1;this.fontSizeAngstroms=0;v(this,arguments)},JU,"Font",null);A(b,function(a,d,g,b,c,f,h,k){this.manager=a;this.fid=d;this.fontFace=JU.Font.fontFaces[g];this.fontStyle=JU.Font.fontStyles[b];this.idFontFace=g;this.idFontStyle=b;this.fontSize=c;this.fontSizeAngstroms=h;this.isBold=1==(b&1);this.isItalic=2==(b&2);this.fontSizeNominal=
f;this.font=a.newFont(JU.Font.fontFaces[g],this.isBold,this.isItalic,c);this.fontMetrics=a.getFontMetrics(this,k);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},"J.api.FontManager,~N,~N,~N,~N,~N,~N,~O");b.getFont3D=c(b,"getFont3D",function(a){return JU.Font.font3ds[a]},"~N");b.createFont3D=c(b,"createFont3D",function(a,d,g,b,c,f,h){255<g&&(g=255);0>g&&(c=-g,b=g=10);for(var k=D(g)<<4,k=a&3|(d&3)<<2|k<<4,m=JU.Font.fontkeyCount;0<--m;)if(k==JU.Font.fontkeys[m]&&
JU.Font.font3ds[m].fontSizeNominal==b)return JU.Font.font3ds[m];m=JU.Font.fontkeyCount++;m==JU.Font.fontkeys.length&&(JU.Font.fontkeys=JU.AU.arrayCopyI(JU.Font.fontkeys,m+8),JU.Font.font3ds=JU.AU.arrayCopyObject(JU.Font.font3ds,m+8));a=new JU.Font(f,m,a,d,g,b,c,h);JU.Font.font3ds[m]=a;JU.Font.fontkeys[m]=k;return a},"~N,~N,~N,~N,~N,J.api.FontManager,~O");b.getFontFaceID=c(b,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");b.getFontStyleID=
c(b,"getFontStyleID",function(a){for(var d=4;0<=--d;)if(JU.Font.fontStyles[d].equalsIgnoreCase(a))return d;return-1},"~S");c(b,"getAscent",function(){return this.ascent});c(b,"getDescent",function(){return this.descent});c(b,"getHeight",function(){return this.getAscent()+this.getDescent()});c(b,"getFontMetrics",function(){return this.fontMetrics});c(b,"stringWidth",function(a){return this.manager.fontStringWidth(this,a)},"~S");c(b,"getInfo",function(){return(0<this.fontSizeAngstroms?-this.fontSizeAngstroms:
this.fontSizeNominal)+" "+this.fontFace+" "+this.fontStyle});j(b,"toString",function(){return"["+this.getInfo()+"]"});b.fontkeyCount=1;b.fontkeys=F(8,0);b.font3ds=Array(8);b.fontFaces=x(-1,["SansSerif","Serif","Monospaced",""]);b.fontStyles=x(-1,["Plain","Bold","Italic","BoldItalic"])});s("JS");B(["javajs.api.GenericColor"],"JS.Color",null,function(){var b=n(function(){this.argb=0;v(this,arguments)},JS,"Color",null,javajs.api.GenericColor);j(b,"addAlpha",function(a){if(255!=this.getOpacity255())return this;
var d=new JS.Color;d.argb=this.argb&16777215|a<<24;return d},"~N");j(b,"getRGB",function(){return this.argb&16777215});j(b,"getOpacity255",function(){return this.argb>>24&255});b.get1=c(b,"get1",function(a){var d=new JS.Color;d.argb=a|4278190080;return d},"~N");b.get3=c(b,"get3",function(a,d,g){return(new JS.Color).set4(a,d,g,255)},"~N,~N,~N");b.get4=c(b,"get4",function(a,d,g,b){return(new JS.Color).set4(a,d,g,b)},"~N,~N,~N,~N");c(b,"set4",function(a,d,g,b){this.argb=(b<<24|a<<16|d<<8|g)&4294967295;
return this},"~N,~N,~N,~N");j(b,"toString",function(){var a="00000000"+Integer.toHexString(this.argb);return"[0x"+a.substring(a.length-8,a.length)+"]"})});s("JS");z=n(function(){this.height=this.width=0;v(this,arguments)},JS,"Dimension",null);A(z,function(b,a){this.set(b,a)},"~N,~N");c(z,"set",function(b,a){this.width=b;this.height=a;return this},"~N,~N");s("J.awtjs");I(J.awtjs,"Event",null);s("J.api");O(J.api,"GenericMenuInterface");s("JU");B(["JU.P3"],"JU.A4",["JU.T3"],function(){var b=n(function(){this.angle=
0;v(this,arguments)},JU,"A4",JU.P3);A(b,function(){M(this,JU.A4,[]);this.z=1});b.new4=c(b,"new4",function(a,d,g,b){var c=new JU.A4;c.set4(a,d,g,b);return c},"~N,~N,~N,~N");b.newAA=c(b,"newAA",function(a){var d=new JU.A4;d.set4(a.x,a.y,a.z,a.angle);return d},"JU.A4");b.newVA=c(b,"newVA",function(a,d){var g=new JU.A4;g.setVA(a,d);return g},"JU.V3,~N");c(b,"setVA",function(a,d){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=d},"JU.V3,~N");c(b,"set4",function(a,d,g,b){this.x=a;this.y=d;this.z=g;this.angle=
b},"~N,~N,~N,~N");c(b,"setAA",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"JU.A4");c(b,"setM",function(a){this.setFromMat(a.m00,a.m01,a.m02,a.m10,a.m11,a.m12,a.m20,a.m21,a.m22)},"JU.M3");c(b,"setFromMat",function(a,d,g,b,c,f,h,k,m){a=0.5*(a+c+m-1);this.x=k-f;this.y=g-h;this.z=b-d;d=0.5*Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);0==d&&1==a?(this.x=this.y=0,this.z=1,this.angle=0):this.angle=Math.atan2(d,a)},"~N,~N,~N,~N,~N,~N,~N,~N,~N");j(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^
JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.angle)});j(b,"equals",function(a){return!y(a,"JU.A4")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.angle==a.angle},"~O");j(b,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.angle+")"});j(b,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+","+180*this.angle/3.141592653589793+"]"})});s("JU");B(["java.net.URLConnection"],"JU.AjaxURLConnection",["JU.AU","$.Rdr"],function(){var b=n(function(){this.bytesOut=
null;this.postOut="";v(this,arguments)},JU,"AjaxURLConnection",java.net.URLConnection);c(b,"doAjax",function(){var a=null,a=Jmol;return a.doAjax(this.url,this.postOut,this.bytesOut,!1)});j(b,"connect",function(){});c(b,"outputBytes",function(a){this.bytesOut=a},"~A");c(b,"outputString",function(a){this.postOut=a},"~S");j(b,"getInputStream",function(){var a=null,d=this.doAjax();JU.AU.isAB(d)?a=JU.Rdr.getBIS(d):y(d,"JU.SB")?a=JU.Rdr.getBIS(JU.Rdr.getBytesFromSB(d)):"string"==typeof d&&(a=JU.Rdr.getBIS(d.getBytes()));
return a});c(b,"getContents",function(){return this.doAjax()})});s("JU");B(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){var b=n(function(){this.protocol=null;v(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);A(b,function(a){M(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");c(b,"openConnection",function(a){return new JU.AjaxURLConnection(a)},"java.net.URL");j(b,"toExternalForm",function(a){var d=new JU.SB;d.append(a.getProtocol());
d.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(d.append("//"),d.append(a.getAuthority()));null!=a.getPath()&&d.append(a.getPath());null!=a.getQuery()&&(d.append("?"),d.append(a.getQuery()));null!=a.getRef()&&(d.append("#"),d.append(a.getRef()));return d.toString()},"java.net.URL")});s("JU");B(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){var b=n(function(){this.htFactories=null;v(this,arguments)},
JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);P(b,function(){this.htFactories=new java.util.Hashtable});j(b,"createURLStreamHandler",function(a){var d=this.htFactories.get(a);null==d&&this.htFactories.put(a,d=new JU.AjaxURLStreamHandler(a));return null==d.protocol?null:d},"~S")});s("JU");B(null,"JU.AU",["java.lang.reflect.Array","java.util.Arrays","JU.Lst"],function(){var b=I(JU,"AU",null);b.ensureLength=c(b,"ensureLength",function(a,d){return null!=a&&JU.AU.getLength(a)>=
d?a:JU.AU.arrayCopyObject(a,d)},"~O,~N");b.ensureLengthS=c(b,"ensureLengthS",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyS(a,d)},"~A,~N");b.ensureLengthA=c(b,"ensureLengthA",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyF(a,d)},"~A,~N");b.ensureLengthI=c(b,"ensureLengthI",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyI(a,d)},"~A,~N");b.ensureLengthShort=c(b,"ensureLengthShort",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyShort(a,d)},"~A,~N");
b.ensureLengthByte=c(b,"ensureLengthByte",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyByte(a,d)},"~A,~N");b.doubleLength=c(b,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,null==a?16:2*JU.AU.getLength(a))},"~O");b.doubleLengthS=c(b,"doubleLengthS",function(a){return JU.AU.arrayCopyS(a,null==a?16:2*a.length)},"~A");b.doubleLengthF=c(b,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,null==a?16:2*a.length)},"~A");b.doubleLengthI=c(b,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,
null==a?16:2*a.length)},"~A");b.doubleLengthShort=c(b,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");b.doubleLengthByte=c(b,"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,null==a?16:2*a.length)},"~A");b.doubleLengthBool=c(b,"doubleLengthBool",function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");b.deleteElements=c(b,"deleteElements",function(a,d,g){if(0==g||null==a)return a;var b=JU.AU.getLength(a);if(d>=b)return a;b-=d+g;
0>b&&(b=0);var c=JU.AU.newInstanceO(a,d+b);0<d&&System.arraycopy(a,0,c,0,d);0<b&&System.arraycopy(a,d+g,c,d,b);return c},"~O,~N,~N");b.arrayCopyObject=c(b,"arrayCopyObject",function(a,d){var g=null==a?-1:JU.AU.getLength(a);0>d&&(d=g);if(d==g)return a;if(d<g)return x(-1,a,0,d);var b=JU.AU.newInstanceO(a,d);0<g&&System.arraycopy(a,0,b,0,g<d?g:d);return b},"~O,~N");b.newInstanceO=c(b,"newInstanceO",function(a,d){return JU.AU.isAI(a)?F(d,0):!a.getClass||!a.getClass().getComponentType?Array(d):java.lang.reflect.Array.newInstance(a.getClass().getComponentType(),
d)},"~O,~N");b.getLength=c(b,"getLength",function(a){return a.length},"~O");b.arrayCopyS=c(b,"arrayCopyS",function(a,d){var g=null==a?-1:a.length;0>d&&(d=g);if(d<g)return x(-1,a,0,d);var b=Array(d);null!=a&&System.arraycopy(a,0,b,0,g<d?g:d);return b},"~A,~N");b.arrayCopyII=c(b,"arrayCopyII",function(a,d){var g=JU.AU.newInt2(d);if(null!=a){var b=a.length;System.arraycopy(a,0,g,0,b<d?b:d)}return g},"~A,~N");b.arrayCopyPt=c(b,"arrayCopyPt",function(a,d){0>d&&(d=a.length);var g=Array(d);if(null!=a){var b=
a.length;System.arraycopy(a,0,g,0,b<d?b:d)}return g},"~A,~N");b.arrayCopyF=c(b,"arrayCopyF",function(a,d){var g=null==a?-1:a.length;0>d&&(d=g);if(d<g)return x(-1,a,0,d);var b=L(d,0);null!=a&&System.arraycopy(a,0,b,0,g<d?g:d);return b},"~A,~N");b.arrayCopyI=c(b,"arrayCopyI",function(a,d){var g=null==a?-1:a.length;0>d&&(d=g);if(d<g)return x(-1,a,0,d);var b=F(d,0);null!=a&&System.arraycopy(a,0,b,0,g<d?g:d);return b},"~A,~N");b.arrayCopyRangeI=c(b,"arrayCopyRangeI",function(a,d,g){if(null==a)return null;
var b=a.length;-1==g&&(g=b);-2==g&&(g=w(b/2));return x(-1,a,d,g)},"~A,~N,~N");b.arrayCopyRangeRevI=c(b,"arrayCopyRangeRevI",function(a,d,g){return null==a?null:x(-1,a,d,g).reverse()},"~A,~N,~N");b.arrayCopyShort=c(b,"arrayCopyShort",function(a,d){var g=null==a?-1:a.length;0>d&&(d=g);if(d<g)return x(-1,a,0,d);var b=V(d,0);null!=a&&System.arraycopy(a,0,b,0,g<d?g:d);return b},"~A,~N");b.arrayCopyByte=c(b,"arrayCopyByte",function(a,d){var g=null==a?-1:a.length;0>d&&(d=g);if(d<g)return x(-1,a,0,d);var b=
Q(d,0);null!=a&&System.arraycopy(a,0,b,0,g<d?g:d);return b},"~A,~N");b.arrayCopyBool=c(b,"arrayCopyBool",function(a,d){var g=null==a?-1:a.length;0>d&&(d=g);if(d<g)return x(-1,a,0,d);var b=ga(d,!1);null!=a&&System.arraycopy(a,0,b,0,g<d?g:d);return b},"~A,~N");b.swapInt=c(b,"swapInt",function(a,d,g){var b=a[d];a[d]=a[g];a[g]=b},"~A,~N,~N");b.dumpArray=c(b,"dumpArray",function(a,d,g,b,c,f){a="dumpArray: "+a+"\n";for(var h=g;h<=b;h++)a+="\t*"+h+"*";for(;f>=c;f--){a+="\n*"+f+"*";for(h=g;h<=b;h++)a+="\t"+
(h<d.length&&f<d[h].length?d[h][f]:NaN)}return a},"~S,~A,~N,~N,~N,~N");b.dumpIntArray=c(b,"dumpIntArray",function(a,d){for(var g="",b=0;b<d;b++)g+=" "+a[b];return g},"~A,~N");b.sortedItem=c(b,"sortedItem",function(a,d){if(0==a.size())return null;if(1==a.size())return a.get(0);var g=a.toArray(Array(a.size()));java.util.Arrays.sort(g);return g[d%g.length]},"JU.Lst,~N");b.createArrayOfArrayList=c(b,"createArrayOfArrayList",function(a){return Array(a)},"~N");b.createArrayOfHashtable=c(b,"createArrayOfHashtable",
function(a){return Array(a)},"~N");b.swap=c(b,"swap",function(a,d,g){var b=a[d];a[d]=a[g];a[g]=b},"~A,~N,~N");b.newFloat2=c(b,"newFloat2",function(a){return x(a,null)},"~N");b.newInt2=c(b,"newInt2",function(a){return x(a,null)},"~N");b.newInt3=c(b,"newInt3",function(a){return x(a,null)},"~N,~N");b.newFloat3=c(b,"newFloat3",function(a){return x(a,null)},"~N,~N");b.newInt4=c(b,"newInt4",function(a){return x(a,null)},"~N");b.newShort2=c(b,"newShort2",function(a){return x(a,null)},"~N");b.newByte2=c(b,
"newByte2",function(a){return x(a,null)},"~N");b.newDouble2=c(b,"newDouble2",function(a){return x(a,null)},"~N");b.newDouble3n=c(b,"newDouble3n",function(a){return R(a,0)},"~N");b.removeMapKeys=c(b,"removeMapKeys",function(a,d){for(var g=new JU.Lst,b,c=a.keySet().iterator();c.hasNext()&&((b=c.next())||1);)b.startsWith(d)&&g.addLast(b);for(b=g.size();0<=--b;)a.remove(g.get(b));return g.size()},"java.util.Map,~S");b.isAS=c(b,"isAS",function(a){return Aa(a)},"~O");b.isASS=c(b,"isASS",function(a){return Ba(a)},
"~O");b.isAP=c(b,"isAP",function(a){return Ca(a)},"~O");b.isAF=c(b,"isAF",function(a){return oa(a)},"~O");b.isAFloat=c(b,"isAFloat",function(a){return Da(a)},"~O");b.isAD=c(b,"isAD",function(a){return oa(a)},"~O");b.isADD=c(b,"isADD",function(a){return pa(a)},"~O");b.isADDD=c(b,"isADDD",function(a){return qa(a)},"~O");b.isAB=c(b,"isAB",function(a){return ya(a)},"~O");b.isAI=c(b,"isAI",function(a){return za(a)},"~O");b.isAII=c(b,"isAII",function(a){return Ea(a)},"~O");b.isAFF=c(b,"isAFF",function(a){return pa(a)},
"~O");b.isAFFF=c(b,"isAFFF",function(a){return qa(a)},"~O");b.ensureSignedBytes=c(b,"ensureSignedBytes",function(a){if(null!=a)for(var d=a.length;0<=--d;){var g=a[d]&255;128<=g&&(g-=256);a[d]=g}return a},"~A")});s("JU");B(null,"JU.Base64",["JU.SB"],function(){var b=I(JU,"Base64",null);b.getBytes64=c(b,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0,-1)},"~A");b.getBase64=c(b,"getBase64",function(a){var d=a.length,g=new JU.SB;if(0==d)return g;for(var b=0,c=0;b<d&&0==c;){0==b%75&&0!=
b&&g.append("\r\n");var c=b+2==d?1:b+1==d?2:0,f=a[b++]<<16&16711680|(2==c?0:a[b++]<<8)&65280|(1<=c?0:a[b++])&255;g.appendC(JU.Base64.base64.charAt(f>>18&63));g.appendC(JU.Base64.base64.charAt(f>>12&63));g.appendC(2==c?"=":JU.Base64.base64.charAt(f>>6&63));g.appendC(1<=c?"=":JU.Base64.base64.charAt(f&63))}return g},"~A");b.decodeBase64=c(b,"decodeBase64",function(a){var d=0,g,b=a.indexOf(";base64,")+1;0<b&&(b+=7);a=a.toCharArray();var c=a.length;if(0==c)return Q(0,0);for(var f=c;--f>=b;)d+=65==(g=
a[f].charCodeAt(0)&127)||0<JU.Base64.decode64[g]?3:0;for(var d=d>>2,h=Q(d,0),k=18,f=b,m=b=0;f<c;f++)if(0<JU.Base64.decode64[g=a[f].charCodeAt(0)&127]||65==g||61==g)m|=JU.Base64.decode64[g]<<k,k-=6,0>k&&(h[b++]=(m&16711680)>>16,b<d&&(h[b++]=(m&65280)>>8),b<d&&(h[b++]=m&255),k=18,m=0);return h},"~S");b.base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.decode64=F(-1,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,62,0,63,52,53,54,
55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,63,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,0,0,0,0,0])});s("JU");B(["javajs.api.JSONEncodable"],"JU.BS",["JU.PT","$.SB"],function(){var b=n(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=!1;v(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);A(b,function(){this.initWords(32);this.sizeIsSticky=!1});b.wordIndex=c(b,"wordIndex",
function(a){return a>>5},"~N");c(b,"recalculateWordsInUse",function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=a+1});b.newN=c(b,"newN",function(a){var d=new JU.BS;d.init(a);return d},"~N");c(b,"init",function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+a);this.initWords(a);this.sizeIsSticky=!0},"~N");c(b,"initWords",function(a){this.words=F(JU.BS.wordIndex(a-1)+1,0)},"~N");c(b,"ensureCapacity",function(a){this.words.length<a&&(a=Math.max(2*this.words.length,
a),this.setLength(a),this.sizeIsSticky=!1)},"~N");c(b,"expandTo",function(a){a+=1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},"~N");c(b,"set",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);this.expandTo(d);this.words[d]|=1<<a},"~N");c(b,"setBitTo",function(a,d){d?this.set(a):this.clear(a)},"~N,~B");c(b,"setBits",function(a,d){if(a!=d){var g=JU.BS.wordIndex(a),b=JU.BS.wordIndex(d-1);this.expandTo(b);var c=-1<<a,f=-1>>>-d;if(g==
b)this.words[g]|=c&f;else{this.words[g]|=c;for(g+=1;g<b;g++)this.words[g]=-1;this.words[b]|=f}}},"~N,~N");c(b,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);d>=this.wordsInUse||(this.words[d]&=~(1<<a),this.recalculateWordsInUse())},"~N");c(b,"clearBits",function(a,d){if(a!=d){var g=JU.BS.wordIndex(a);if(!(g>=this.wordsInUse)){var b=JU.BS.wordIndex(d-1);b>=this.wordsInUse&&(d=this.length(),b=this.wordsInUse-1);var c=-1<<a,f=-1>>>-d;if(g==
b)this.words[g]&=~(c&f);else{this.words[g]&=~c;for(g+=1;g<b;g++)this.words[g]=0;this.words[b]&=~f}this.recalculateWordsInUse()}}},"~N,~N");c(b,"clearAll",function(){for(;0<this.wordsInUse;)this.words[--this.wordsInUse]=0});c(b,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);return d<this.wordsInUse&&0!=(this.words[d]&1<<a)},"~N");c(b,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var d=JU.BS.wordIndex(a);
if(d>=this.wordsInUse)return-1;for(a=this.words[d]&-1<<a;;){if(0!=a)return 32*d+Integer.numberOfTrailingZeros(a);if(++d==this.wordsInUse)return-1;a=this.words[d]}},"~N");c(b,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var d=JU.BS.wordIndex(a);if(d>=this.wordsInUse)return a;for(a=~this.words[d]&-1<<a;;){if(0!=a)return 32*d+Integer.numberOfTrailingZeros(a);if(++d==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[d]}},"~N");c(b,"length",function(){return 0==
this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-1]))});c(b,"isEmpty",function(){return 0==this.wordsInUse});c(b,"intersects",function(a){for(var d=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=d;d--)if(0!=(this.words[d]&a.words[d]))return!0;return!1},"JU.BS");c(b,"cardinality",function(){for(var a=0,d=0;d<this.wordsInUse;d++)a+=Integer.bitCount(this.words[d]);return a});c(b,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=
0;for(var d=0;d<this.wordsInUse;d++)this.words[d]&=a.words[d];this.recalculateWordsInUse()}},"JU.BS");c(b,"or",function(a){if(this!==a){var d=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var g=0;g<d;g++)this.words[g]|=a.words[g];d<a.wordsInUse&&System.arraycopy(a.words,d,this.words,d,this.wordsInUse-d)}},"JU.BS");c(b,"xor",function(a){var d=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&
(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var g=0;g<d;g++)this.words[g]^=a.words[g];d<a.wordsInUse&&System.arraycopy(a.words,d,this.words,d,a.wordsInUse-d);this.recalculateWordsInUse()},"JU.BS");c(b,"andNot",function(a){for(var d=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=d;d--)this.words[d]&=~a.words[d];this.recalculateWordsInUse()},"JU.BS");j(b,"hashCode",function(){for(var a=1234,d=this.wordsInUse;0<=--d;)a^=this.words[d]*(d+1);return a>>32^a});c(b,"size",function(){return 32*
this.words.length});j(b,"equals",function(a){if(!y(a,"JU.BS"))return!1;if(this===a)return!0;if(this.wordsInUse!=a.wordsInUse)return!1;for(var d=0;d<this.wordsInUse;d++)if(this.words[d]!=a.words[d])return!1;return!0},"~O");j(b,"clone",function(){!this.sizeIsSticky&&this.wordsInUse!=this.words.length&&this.setLength(this.wordsInUse);return JU.BS.copy(this)});c(b,"setLength",function(a){a!=this.words.length&&(a==this.wordsInUse?this.words=x(-1,this.words,0,a):(a=F(a,0),System.arraycopy(this.words,0,
a,0,this.wordsInUse),this.words=a))},"~N");j(b,"toString",function(){return JU.BS.escape(this,"(",")")});b.copy=c(b,"copy",function(a){var d;d=na(a);var g=a.wordsInUse;d.words=0==g?JU.BS.emptyBitmap:x(-1,a.words,0,d.wordsInUse=g);return d},"JU.BS");c(b,"cardinalityN",function(a){for(var d=this.cardinality(),g=this.length();--g>=a;)this.get(g)&&d--;return d},"~N");j(b,"toJSON",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=JU.SB.newN(6*a+2);a.appendC("[");var d=this.nextSetBit(0);
if(-1!=d){a.appendI(d);for(d=this.nextSetBit(d+1);0<=d;d=this.nextSetBit(d+1)){var g=this.nextClearBit(d);do a.append(", ").appendI(d);while(++d<g)}}a.appendC("]");return a.toString()});b.escape=c(b,"escape",function(a,d,g){if(null==a)return d+"{}"+g;var b=new JU.SB;b.append(d+"{");d=a.length();for(var c=-1,f=-2,h=-1;++h<=d;){var k=a.get(h);if(h==d||0<=c&&!k){0<=c&&f!=c&&b.append((f==c-1?" ":":")+c);if(h==d)break;c=-1}a.get(h)&&(0>c&&(b.append((-2==f?"":" ")+h),f=h),c=h)}b.append("}").appendC(g);
return b.toString()},"JU.BS,~S,~S");b.unescape=c(b,"unescape",function(a){var d,g;if(null==a||4>(g=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(d=a.charAt(0))&&"["!=d||a.charAt(g-1)!=("("==d?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=g-2)return null;for(var b=g-=2;2<=--b;)if(!JU.PT.isDigit(d=a.charAt(b))&&" "!=d&&"\t"!=d&&":"!=d)return null;for(var c=g;JU.PT.isDigit(a.charAt(--c)););if(++c==g)c=0;else try{c=Integer.parseInt(a.substring(c,g))}catch(f){if(H(f,"NumberFormatException"))return null;
throw f;}for(var h=JU.BS.newN(c),k=c=-1,m=-2,b=2;b<=g;b++)switch((d=a.charAt(b)).charCodeAt(0)){case 9:case 32:case 125:if(0>m)break;if(m<c)return null;c=m;0>k&&(k=m);h.setBits(k,m+1);k=-1;m=-2;break;case 58:k=c=m;m=-2;break;default:JU.PT.isDigit(d)&&(0>m&&(m=0),m=10*m+(d.charCodeAt(0)-48))}return 0<=k?null:h},"~S");b.emptyBitmap=F(0,0)});s("JU");B(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){var b=I(JU,"CU",null);b.toRGBHexString=c(b,"toRGBHexString",function(a){var d=a.getRGB();if(0==
d)return"000000";a="00"+Integer.toHexString(d>>16&255);a=a.substring(a.length-2);var g="00"+Integer.toHexString(d>>8&255),g=g.substring(g.length-2),d="00"+Integer.toHexString(d&255),d=d.substring(d.length-2);return a+g+d},"javajs.api.GenericColor");b.toCSSString=c(b,"toCSSString",function(a){var d=a.getOpacity255();if(255==d)return"#"+JU.CU.toRGBHexString(a);a=a.getRGB();return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+d/255+")"},"javajs.api.GenericColor");b.getArgbFromString=c(b,"getArgbFromString",
function(a){var d=0;if(null==a||0==(d=a.length))return 0;a=a.toLowerCase();if("["==a.charAt(0)&&"]"==a.charAt(d-1)){var g;if(0<=a.indexOf(",")){g=JU.PT.split(a.substring(1,a.length-1),",");if(3!=g.length)return 0;a=JU.PT.parseFloat(g[0]);d=JU.PT.parseFloat(g[1]);g=JU.PT.parseFloat(g[2]);return JU.CU.colorTriadToFFRGB(a,d,g)}switch(d){case 9:g="x";break;case 10:g="0x";break;default:return 0}if(1!=a.indexOf(g))return 0;a="#"+a.substring(d-7,d-1);d=7}if(7==d&&"#"==a.charAt(0))try{return JU.PT.parseIntRadix(a.substring(1,
7),16)|4278190080}catch(b){if(H(b,Exception))return 0;throw b;}a=JU.CU.mapJavaScriptColors.get(a);return null==a?0:a.intValue()},"~S");b.colorTriadToFFRGB=c(b,"colorTriadToFFRGB",function(a,d,g){1>=a&&(1>=d&&1>=g)&&(0<a&&(a=256*a-1),0<d&&(d=256*d-1),0<g&&(g=256*g-1));return JU.CU.rgb(D(a),D(d),D(g))},"~N,~N,~N");b.rgb=c(b,"rgb",function(a,d,g){return 4278190080|a<<16|d<<8|g},"~N,~N,~N");b.colorPtFromString=c(b,"colorPtFromString",function(a){return JU.CU.colorPtFromInt(JU.CU.getArgbFromString(a),
null)},"~S");b.colorPtFromInt=c(b,"colorPtFromInt",function(a,d){null==d&&(d=new JU.P3);d.set(a>>16&255,a>>8&255,a&255);return d},"~N,JU.P3");b.colorPtToFFRGB=c(b,"colorPtToFFRGB",function(a){return JU.CU.colorTriadToFFRGB(a.x,a.y,a.z)},"JU.T3");b.toRGB3f=c(b,"toRGB3f",function(a,d){d[0]=(a>>16&255)/255;d[1]=(a>>8&255)/255;d[2]=(a&255)/255},"~N,~A");b.toFFGGGfromRGB=c(b,"toFFGGGfromRGB",function(a){a=w((2989*(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return JU.CU.rgb(a,a,a)},"~N");
b.rgbToHSL=c(b,"rgbToHSL",function(a,d){var g=a.x/255,b=a.y/255,c=a.z/255,f=Math.min(g,Math.min(b,c)),h=Math.max(g,Math.max(b,c)),k=h+f,f=h-f,g=60*(0==f?0:h==g?(b-c)/f+6:h==b?(c-g)/f+2:(g-b)/f+4)%360,b=f/(0==f?1:1>=k?k:2-k);return d?JU.P3.new3(Math.round(10*g)/10,Math.round(1E3*b)/10,Math.round(500*k)/10):JU.P3.new3(g,100*b,50*k)},"JU.P3,~B");b.hslToRGB=c(b,"hslToRGB",function(a){var d=Math.max(0,Math.min(360,a.x))/60,g=Math.max(0,Math.min(100,a.y))/100;a=Math.max(0,Math.min(100,a.z))/100;var g=a-
(0.5>a?a:1-a)*g,b=2*(a-g);a=JU.CU.toRGB(g,b,d+2);var c=JU.CU.toRGB(g,b,d),d=JU.CU.toRGB(g,b,d-2);return JU.P3.new3(Math.round(255*a),Math.round(255*c),Math.round(255*d))},"JU.P3");b.toRGB=c(b,"toRGB",function(a,d,g){return 1>(g+=0>g?6:6<g?-6:0)?a+d*g:3>g?a+d:4>g?a+d*(4-g):a},"~N,~N,~N");b.colorNames=x(-1,"contrast black pewhite pecyan pepurple pegreen peblue peviolet pebrown pepink peyellow pedarkgreen peorange pelightblue pedarkcyan pedarkgray aliceblue antiquewhite aqua aquamarine azure beige bisque 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 lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightgray lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue 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 bluetint greenblue greentint grey gray pinktint redorange yellowtint".split(" "));
b.colorArgbs=F(-1,[4294892730,4278190080,4294967295,4278255615,4291830015,4278255360,4284506367,4294934720,4288946216,4294957272,4294967040,4278239232,4294946816,4289769727,4278231200,4284506208,4293982463,4294634455,4278255615,4286578644,4293984255,4294309340,4294960324,4294962125,4278190335,4287245282,4289014314,4292786311,4284456608,4286578432,4291979550,4294934352,4284782061,4294965468,4292613180,4278255615,4278190219,4278225803,4290283019,4289309097,4278215680,4290623339,4287299723,4283788079,
4294937600,4288230092,4287299584,4293498490,4287609999,4282924427,4281290575,4278243025,4287889619,4294907027,4278239231,4285098345,4280193279,4289864226,4294966E3,4280453922,4294902015,4292664540,4294506751,4294956800,4292519200,4286611584,4278222848,4289593135,4293984240,4294928820,4291648604,4283105410,4294967280,4293977740,4293322490,4294963445,4286381056,4294965965,4289583334,4293951616,4292935679,4294638290,4287688336,4292072403,4292072403,4294948545,4294942842,4280332970,4287090426,4286023833,
4289774814,4294967264,4278255360,4281519410,4294635750,4294902015,4286578688,4284927402,4278190285,4290401747,4287852763,4282168177,4286277870,4278254234,4282962380,4291237253,4279834992,4294311930,4294960353,4294960309,4294958765,4278190208,4294833638,4286611456,4285238819,4294944E3,4294919424,4292505814,4293847210,4288215960,4289720046,4292571283,4294963157,4294957753,4291659071,4294951115,4292714717,4289781990,4286578816,4294901760,4290547599,4282477025,4287317267,4294606962,4294222944,4281240407,
4294964718,4288696877,4290822336,4287090411,4285160141,4285563024,4294966010,4278255487,4282811060,4291998860,4278222976,4292394968,4294927175,4282441936,4293821166,4294303411,4294967295,4294309365,4294967040,4288335154,4289714175,4281240407,4288217011,4286611584,4286611584,4294945723,4294919424,4294375029]);b.mapJavaScriptColors=new java.util.Hashtable;for(b=JU.CU.colorNames.length;0<=--b;)JU.CU.mapJavaScriptColors.put(JU.CU.colorNames[b],Integer.$valueOf(JU.CU.colorArgbs[b]))});s("JU");B(null,"JU.DF",
["JU.PT","$.SB"],function(){var b=I(JU,"DF",null);b.setUseNumberLocalization=c(b,"setUseNumberLocalization",function(a){JU.DF.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");b.formatDecimalDbl=c(b,"formatDecimalDbl",function(a,d){return 2147483647==d||-Infinity==a||Infinity==a||Double.isNaN(a)?""+a:JU.DF.formatDecimal(a,d)},"~N,~N");b.formatDecimal=c(b,"formatDecimal",function(a,d){if(-Infinity==a||(Infinity==a||Double.isNaN(a))||2147483647==d)return""+a;var g=0>a;g&&(a=-a);var b;if(0>
d){d=-d;d>JU.DF.formattingStrings.length&&(d=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[d-1]+"E+0";var c;1>Math.abs(a)?(b=100,c=1E-100*a):(b=-100,c=1E100*a);c=(""+c).toUpperCase();var f=c.indexOf("E");0>f?c=""+a:(b=JU.PT.parseInt(c.substring(f+(c.indexOf("E+")==f?2:1)))+b,c=JU.PT.parseFloat(c.substring(0,f)),c=JU.DF.formatDecimal(c,d-1),c.startsWith("10.")&&(c=JU.DF.formatDecimal(1,d-1),b++));return(g?"-":"")+c+"E"+(0<=b?"+":"")+b}d>=JU.DF.formattingStrings.length&&(d=
JU.DF.formattingStrings.length-1);c=(""+a).toUpperCase();b=c.indexOf(".");if(0>b)return(g?"-":"")+c+JU.DF.formattingStrings[d].substring(1);f=c.indexOf("E-");0<f&&(b=JU.PT.parseInt(c.substring(f+1)),c="0."+"0000000000000000000000000000000000000000".substring(0,-b-1)+c.substring(0,1)+c.substring(2,f),b=1);f=c.indexOf("E");0<f&&(b=JU.PT.parseInt(c.substring(f+1)),c=c.substring(0,1)+c.substring(2,f)+"0000000000000000000000000000000000000000",c=c.substring(0,b+1)+"."+c.substring(b+1),b=c.indexOf("."));
var f=c.length,h=d+b+1;if(h<f&&"5"<=c.charAt(h))return JU.DF.formatDecimal((g?-1:1)*(a+JU.DF.formatAdds[d]),d);var k=c.substring(0,0==d?b:++b),h=JU.SB.newS(k);g&&(k.equals("0.")&&d+2<=f&&c.substring(2,2+d).equals("0000000000000000000000000000000000000000".substring(0,d)))&&(g=!1);for(k=0;k<d;k++,b++)b<f?h.appendC(c.charAt(b)):h.appendC("0");c=(g?"-":"")+h;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?c:c.$replace(",",".")},"~N,~N");b.formatDecimalTrimmed=c(b,"formatDecimalTrimmed",function(a,
d){for(var g=JU.DF.formatDecimalDbl(a,d),b=g.length-1;0<=b&&"0"==g.charAt(b);)b--;return g.substring(0,b+1)},"~N,~N");b.formatDecimalTrimmed0=c(b,"formatDecimalTrimmed0",function(a,d){for(var g=JU.DF.formatDecimalDbl(a,d),b=g.length-1,c=g.indexOf(".")+1;b>c&&"0"==g.charAt(b);)b--;return g.substring(0,b+1)},"~N,~N");b.formattingStrings=x(-1,"0 0.0 0.00 0.000 0.0000 0.00000 0.000000 0.0000000 0.00000000 0.000000000 0.0000000000 0.00000000000 0.000000000000".split(" "));b.formatAdds=R(-1,[0.5,0.05,0.005,
5E-4,5E-5,5E-6,5E-7,5E-8,5E-9,5E-10,5E-11,5E-12,5E-13]);b.useNumberLocalization=x(-1,[Boolean.TRUE])});s("JU");B(["java.lang.Enum"],"JU.Encoding",null,function(){var b=I(JU,"Encoding",Enum);K(b,"NONE",0,[]);K(b,"UTF8",1,[]);K(b,"UTF_16BE",2,[]);K(b,"UTF_16LE",3,[]);K(b,"UTF_32BE",4,[]);K(b,"UTF_32LE",5,[])});s("JU");B(["java.util.ArrayList"],"JU.Lst",null,function(){var b=I(JU,"Lst",java.util.ArrayList);c(b,"addLast",function(a){return this.add1(a)},"~O");j(b,"add",function(a,d){return this.add2(a,
d)},"~N,~O");c(b,"removeItemAt",function(a){return this._removeItemAt(a)},"~N");c(b,"removeObj",function(a){return this._removeObject(a)},"~O")});s("JU");z=n(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;v(this,arguments)},JU,"M34",null);c(z,"setAA33",function(b){var a=b.x,d=b.y,g=b.z;b=b.angle;var l=Math.sqrt(a*a+d*d+g*g),l=1/l,a=a*l,d=d*l,g=g*l,c=Math.cos(b);b=Math.sin(b);l=1-c;this.m00=c+a*a*l;this.m11=c+d*d*l;this.m22=c+g*g*l;var c=a*d*l,f=g*b;this.m01=
c-f;this.m10=c+f;c=a*g*l;f=d*b;this.m02=c+f;this.m20=c-f;c=d*g*l;f=a*b;this.m12=c-f;this.m21=c+f},"JU.A4");c(z,"rotate",function(b){this.rotate2(b,b)},"JU.T3");c(z,"rotate2",function(b,a){a.set(this.m00*b.x+this.m01*b.y+this.m02*b.z,this.m10*b.x+this.m11*b.y+this.m12*b.z,this.m20*b.x+this.m21*b.y+this.m22*b.z)},"JU.T3,JU.T3");c(z,"setM33",function(b){this.m00=b.m00;this.m01=b.m01;this.m02=b.m02;this.m10=b.m10;this.m11=b.m11;this.m12=b.m12;this.m20=b.m20;this.m21=b.m21;this.m22=b.m22},"JU.M34");c(z,
"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(z,"set33",function(b,a,d){switch(b){case 0:switch(a){case 0:this.m00=d;return;case 1:this.m01=d;return;case 2:this.m02=d;return}break;case 1:switch(a){case 0:this.m10=d;return;case 1:this.m11=d;return;case 2:this.m12=d;return}break;case 2:switch(a){case 0:this.m20=d;return;case 1:this.m21=d;return;case 2:this.m22=d;return}}this.err()},"~N,~N,~N");c(z,"get33",function(b,a){switch(b){case 0:switch(a){case 0:return this.m00;
case 1:return this.m01;case 2:return this.m02}break;case 1:switch(a){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12}break;case 2:switch(a){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}this.err();return 0},"~N,~N");c(z,"setRow33",function(b,a){switch(b){case 0:this.m00=a[0];this.m01=a[1];this.m02=a[2];break;case 1:this.m10=a[0];this.m11=a[1];this.m12=a[2];break;case 2:this.m20=a[0];this.m21=a[1];this.m22=a[2];break;default:this.err()}},"~N,~A");c(z,"getRow33",
function(b,a){switch(b){case 0:a[0]=this.m00;a[1]=this.m01;a[2]=this.m02;return;case 1:a[0]=this.m10;a[1]=this.m11;a[2]=this.m12;return;case 2:a[0]=this.m20;a[1]=this.m21;a[2]=this.m22;return}this.err()},"~N,~A");c(z,"setColumn33",function(b,a){switch(b){case 0:this.m00=a[0];this.m10=a[1];this.m20=a[2];break;case 1:this.m01=a[0];this.m11=a[1];this.m21=a[2];break;case 2:this.m02=a[0];this.m12=a[1];this.m22=a[2];break;default:this.err()}},"~N,~A");c(z,"getColumn33",function(b,a){switch(b){case 0:a[0]=
this.m00;a[1]=this.m10;a[2]=this.m20;break;case 1:a[0]=this.m01;a[1]=this.m11;a[2]=this.m21;break;case 2:a[0]=this.m02;a[1]=this.m12;a[2]=this.m22;break;default:this.err()}},"~N,~A");c(z,"add33",function(b){this.m00+=b.m00;this.m01+=b.m01;this.m02+=b.m02;this.m10+=b.m10;this.m11+=b.m11;this.m12+=b.m12;this.m20+=b.m20;this.m21+=b.m21;this.m22+=b.m22},"JU.M34");c(z,"sub33",function(b){this.m00-=b.m00;this.m01-=b.m01;this.m02-=b.m02;this.m10-=b.m10;this.m11-=b.m11;this.m12-=b.m12;this.m20-=b.m20;this.m21-=
b.m21;this.m22-=b.m22},"JU.M34");c(z,"mul33",function(b){this.m00*=b;this.m01*=b;this.m02*=b;this.m10*=b;this.m11*=b;this.m12*=b;this.m20*=b;this.m21*=b;this.m22*=b},"~N");c(z,"transpose33",function(){var b=this.m01;this.m01=this.m10;this.m10=b;b=this.m02;this.m02=this.m20;this.m20=b;b=this.m12;this.m12=this.m21;this.m21=b});c(z,"setXRot",function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=a;this.m12=-b;this.m20=0;this.m21=b;this.m22=a},"~N");c(z,"setYRot",
function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=a;this.m01=0;this.m02=b;this.m10=0;this.m11=1;this.m12=0;this.m20=-b;this.m21=0;this.m22=a},"~N");c(z,"setZRot",function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=a;this.m01=-b;this.m02=0;this.m10=b;this.m11=a;this.m21=this.m20=this.m12=0;this.m22=1},"~N");c(z,"determinant3",function(){return this.m00*(this.m11*this.m22-this.m21*this.m12)-this.m01*(this.m10*this.m22-this.m20*this.m12)+this.m02*(this.m10*this.m21-this.m20*this.m11)});c(z,"err",
function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");});s("JU");B(["JU.M34"],"JU.M3",["JU.T3"],function(){var b=I(JU,"M3",JU.M34,java.io.Serializable);b.newA9=c(b,"newA9",function(a){var d=new JU.M3;d.setA(a);return d},"~A");b.newM3=c(b,"newM3",function(a){var d=new JU.M3;if(null==a)return d.setScale(1),d;d.m00=a.m00;d.m01=a.m01;d.m02=a.m02;d.m10=a.m10;d.m11=a.m11;d.m12=a.m12;d.m20=a.m20;d.m21=a.m21;d.m22=a.m22;return d},"JU.M3");c(b,"setScale",function(a){this.clear33();
this.m00=this.m11=this.m22=a},"~N");c(b,"setM3",function(a){this.setM33(a)},"JU.M34");c(b,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m10=a[3];this.m11=a[4];this.m12=a[5];this.m20=a[6];this.m21=a[7];this.m22=a[8]},"~A");c(b,"setElement",function(a,d,g){this.set33(a,d,g)},"~N,~N,~N");c(b,"getElement",function(a,d){return this.get33(a,d)},"~N,~N");c(b,"setRow",function(a,d,g,b){switch(a){case 0:this.m00=d;this.m01=g;this.m02=b;break;case 1:this.m10=d;this.m11=g;this.m12=b;break;
case 2:this.m20=d;this.m21=g;this.m22=b;break;default:this.err()}},"~N,~N,~N,~N");c(b,"setRowV",function(a,d){switch(a){case 0:this.m00=d.x;this.m01=d.y;this.m02=d.z;break;case 1:this.m10=d.x;this.m11=d.y;this.m12=d.z;break;case 2:this.m20=d.x;this.m21=d.y;this.m22=d.z;break;default:this.err()}},"~N,JU.T3");c(b,"setRowA",function(a,d){this.setRow33(a,d)},"~N,~A");j(b,"getRow",function(a,d){this.getRow33(a,d)},"~N,~A");c(b,"setColumn3",function(a,d,g,b){switch(a){case 0:this.m00=d;this.m10=g;this.m20=
b;break;case 1:this.m01=d;this.m11=g;this.m21=b;break;case 2:this.m02=d;this.m12=g;this.m22=b;break;default:this.err()}},"~N,~N,~N,~N");c(b,"setColumnV",function(a,d){switch(a){case 0:this.m00=d.x;this.m10=d.y;this.m20=d.z;break;case 1:this.m01=d.x;this.m11=d.y;this.m21=d.z;break;case 2:this.m02=d.x;this.m12=d.y;this.m22=d.z;break;default:this.err()}},"~N,JU.T3");c(b,"getColumnV",function(a,d){switch(a){case 0:d.x=this.m00;d.y=this.m10;d.z=this.m20;break;case 1:d.x=this.m01;d.y=this.m11;d.z=this.m21;
break;case 2:d.x=this.m02;d.y=this.m12;d.z=this.m22;break;default:this.err()}},"~N,JU.T3");c(b,"setColumnA",function(a,d){this.setColumn33(a,d)},"~N,~A");c(b,"getColumn",function(a,d){this.getColumn33(a,d)},"~N,~A");c(b,"add",function(a){this.add33(a)},"JU.M3");c(b,"sub",function(a){this.sub33(a)},"JU.M3");c(b,"transpose",function(){this.transpose33()});c(b,"transposeM",function(a){this.setM33(a);this.transpose33()},"JU.M3");c(b,"invertM",function(a){this.setM33(a);this.invert()},"JU.M3");c(b,"invert",
function(){var a=this.determinant3();0!=a&&(a=1/a,this.set9(this.m11*this.m22-this.m12*this.m21,this.m02*this.m21-this.m01*this.m22,this.m01*this.m12-this.m02*this.m11,this.m12*this.m20-this.m10*this.m22,this.m00*this.m22-this.m02*this.m20,this.m02*this.m10-this.m00*this.m12,this.m10*this.m21-this.m11*this.m20,this.m01*this.m20-this.m00*this.m21,this.m00*this.m11-this.m01*this.m10),this.scale(a))});c(b,"setAsXRotation",function(a){this.setXRot(a);return this},"~N");c(b,"setAsYRotation",function(a){this.setYRot(a);
return this},"~N");c(b,"setAsZRotation",function(a){this.setZRot(a);return this},"~N");c(b,"scale",function(a){this.mul33(a)},"~N");c(b,"mul",function(a){this.mul2(this,a)},"JU.M3");c(b,"mul2",function(a,d){this.set9(a.m00*d.m00+a.m01*d.m10+a.m02*d.m20,a.m00*d.m01+a.m01*d.m11+a.m02*d.m21,a.m00*d.m02+a.m01*d.m12+a.m02*d.m22,a.m10*d.m00+a.m11*d.m10+a.m12*d.m20,a.m10*d.m01+a.m11*d.m11+a.m12*d.m21,a.m10*d.m02+a.m11*d.m12+a.m12*d.m22,a.m20*d.m00+a.m21*d.m10+a.m22*d.m20,a.m20*d.m01+a.m21*d.m11+a.m22*d.m21,
a.m20*d.m02+a.m21*d.m12+a.m22*d.m22)},"JU.M3,JU.M3");j(b,"equals",function(a){return!y(a,"JU.M3")?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m10==a.m10&&this.m11==a.m11&&this.m12==a.m12&&this.m20==a.m20&&this.m21==a.m21&&this.m22==a.m22},"~O");j(b,"hashCode",function(){return JU.T3.floatToIntBits(this.m00)^JU.T3.floatToIntBits(this.m01)^JU.T3.floatToIntBits(this.m02)^JU.T3.floatToIntBits(this.m10)^JU.T3.floatToIntBits(this.m11)^JU.T3.floatToIntBits(this.m12)^JU.T3.floatToIntBits(this.m20)^
JU.T3.floatToIntBits(this.m21)^JU.T3.floatToIntBits(this.m22)});c(b,"setZero",function(){this.clear33()});c(b,"set9",function(a,d,g,b,c,f,h,k,m){this.m00=a;this.m01=d;this.m02=g;this.m10=b;this.m11=c;this.m12=f;this.m20=h;this.m21=k;this.m22=m},"~N,~N,~N,~N,~N,~N,~N,~N,~N");j(b,"toString",function(){return"[["+this.m00+"\t"+this.m01+"\t"+this.m02+"]\n  ["+this.m10+"\t"+this.m11+"\t"+this.m12+"]\n  ["+this.m20+"\t"+this.m21+"\t"+this.m22+"]]"});c(b,"setAA",function(a){this.setAA33(a);return this},
"JU.A4");c(b,"setAsBallRotation",function(a,d,g){var b=Math.sqrt(d*d+g*g),c=b*a;if(0==c)return this.setScale(1),!1;a=Math.cos(c);c=Math.sin(c);g=-g/b;d/=b;b=a-1;this.m00=1+b*g*g;this.m01=this.m10=b*g*d;this.m20=-(this.m02=c*g);this.m11=1+b*d*d;this.m21=-(this.m12=c*d);this.m22=a;return!0},"~N,~N,~N");c(b,"isRotation",function(){return 0.001>Math.abs(this.determinant3()-1)})});s("JU");B(["JU.M34"],"JU.M4",["JU.T3"],function(){var b=n(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=
this.m03=0;v(this,arguments)},JU,"M4",JU.M34);b.newA16=c(b,"newA16",function(a){var d=new JU.M4;d.m00=a[0];d.m01=a[1];d.m02=a[2];d.m03=a[3];d.m10=a[4];d.m11=a[5];d.m12=a[6];d.m13=a[7];d.m20=a[8];d.m21=a[9];d.m22=a[10];d.m23=a[11];d.m30=a[12];d.m31=a[13];d.m32=a[14];d.m33=a[15];return d},"~A");b.newM4=c(b,"newM4",function(a){var d=new JU.M4;if(null==a)return d.setIdentity(),d;d.setToM3(a);d.m03=a.m03;d.m13=a.m13;d.m23=a.m23;d.m30=a.m30;d.m31=a.m31;d.m32=a.m32;d.m33=a.m33;return d},"JU.M4");b.newMV=
c(b,"newMV",function(a,d){var g=new JU.M4;g.setMV(a,d);return g},"JU.M3,JU.T3");c(b,"setZero",function(){this.clear33();this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=this.m33=0});c(b,"setIdentity",function(){this.setZero();this.m00=this.m11=this.m22=this.m33=1});c(b,"setM4",function(a){this.setM33(a);this.m03=a.m03;this.m13=a.m13;this.m23=a.m23;this.m30=a.m30;this.m31=a.m31;this.m32=a.m32;this.m33=a.m33;return this},"JU.M4");c(b,"setMV",function(a,d){this.setM33(a);this.setTranslation(d);
this.m33=1},"JU.M3,JU.T3");c(b,"setToM3",function(a){this.setM33(a);this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=0;this.m33=1},"JU.M34");c(b,"setToAA",function(a){this.setIdentity();this.setAA33(a)},"JU.A4");c(b,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m03=a[3];this.m10=a[4];this.m11=a[5];this.m12=a[6];this.m13=a[7];this.m20=a[8];this.m21=a[9];this.m22=a[10];this.m23=a[11];this.m30=a[12];this.m31=a[13];this.m32=a[14];this.m33=a[15]},"~A");c(b,"setTranslation",function(a){this.m03=
a.x;this.m13=a.y;this.m23=a.z},"JU.T3");c(b,"setElement",function(a,d,g){if(3>a&&3>d)this.set33(a,d,g);else{(3<a||3<d)&&this.err();switch(a){case 0:this.m03=g;return;case 1:this.m13=g;return;case 2:this.m23=g;return}switch(d){case 0:this.m30=g;break;case 1:this.m31=g;break;case 2:this.m32=g;break;case 3:this.m33=g}}},"~N,~N,~N");c(b,"getElement",function(a,d){if(3>a&&3>d)return this.get33(a,d);if(3<a||3<d)return this.err(),0;switch(a){case 0:return this.m03;case 1:return this.m13;case 2:return this.m23;
default:switch(d){case 0:return this.m30;case 1:return this.m31;case 2:return this.m32;default:return this.m33}}},"~N,~N");c(b,"getTranslation",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"JU.T3");c(b,"getRotationScale",function(a){a.m00=this.m00;a.m01=this.m01;a.m02=this.m02;a.m10=this.m10;a.m11=this.m11;a.m12=this.m12;a.m20=this.m20;a.m21=this.m21;a.m22=this.m22},"JU.M3");c(b,"setRotationScale",function(a){this.m00=a.m00;this.m01=a.m01;this.m02=a.m02;this.m10=a.m10;this.m11=a.m11;this.m12=
a.m12;this.m20=a.m20;this.m21=a.m21;this.m22=a.m22},"JU.M3");c(b,"setRowA",function(a,d){3>a&&this.setRow33(a,d);switch(a){case 0:this.m03=d[3];return;case 1:this.m13=d[3];return;case 2:this.m23=d[3];return;case 3:this.m30=d[0];this.m31=d[1];this.m32=d[2];this.m33=d[3];return}this.err()},"~N,~A");j(b,"getRow",function(a,d){3>a&&this.getRow33(a,d);switch(a){case 0:d[3]=this.m03;return;case 1:d[3]=this.m13;return;case 2:d[3]=this.m23;return;case 3:d[0]=this.m30;d[1]=this.m31;d[2]=this.m32;d[3]=this.m33;
return}this.err()},"~N,~A");c(b,"setColumn4",function(a,d,g,b,c){0==a?(this.m00=d,this.m10=g,this.m20=b,this.m30=c):1==a?(this.m01=d,this.m11=g,this.m21=b,this.m31=c):2==a?(this.m02=d,this.m12=g,this.m22=b,this.m32=c):3==a?(this.m03=d,this.m13=g,this.m23=b,this.m33=c):this.err()},"~N,~N,~N,~N,~N");c(b,"setColumnA",function(a,d){3>a&&this.setColumn33(a,d);switch(a){case 0:this.m30=d[3];break;case 1:this.m31=d[3];break;case 2:this.m32=d[3];break;case 3:this.m03=d[0];this.m13=d[1];this.m23=d[2];this.m33=
d[3];break;default:this.err()}},"~N,~A");c(b,"getColumn",function(a,d){3>a&&this.getColumn33(a,d);switch(a){case 0:d[3]=this.m30;break;case 1:d[3]=this.m31;break;case 2:d[3]=this.m32;break;case 3:d[0]=this.m03;d[1]=this.m13;d[2]=this.m23;d[3]=this.m33;break;default:this.err()}},"~N,~A");c(b,"sub",function(a){this.sub33(a);this.m03-=a.m03;this.m13-=a.m13;this.m23-=a.m23;this.m30-=a.m30;this.m31-=a.m31;this.m32-=a.m32;this.m33-=a.m33},"JU.M4");c(b,"add",function(a){this.m03+=a.x;this.m13+=a.y;this.m23+=
a.z},"JU.T3");c(b,"transpose",function(){this.transpose33();var a=this.m03;this.m03=this.m30;this.m30=a;a=this.m13;this.m13=this.m31;this.m31=a;a=this.m23;this.m23=this.m32;this.m32=a});c(b,"invert",function(){var a=this.determinant4();if(0==a)return this;a=1/a;this.set(this.m11*(this.m22*this.m33-this.m23*this.m32)+this.m12*(this.m23*this.m31-this.m21*this.m33)+this.m13*(this.m21*this.m32-this.m22*this.m31),this.m21*(this.m02*this.m33-this.m03*this.m32)+this.m22*(this.m03*this.m31-this.m01*this.m33)+
this.m23*(this.m01*this.m32-this.m02*this.m31),this.m31*(this.m02*this.m13-this.m03*this.m12)+this.m32*(this.m03*this.m11-this.m01*this.m13)+this.m33*(this.m01*this.m12-this.m02*this.m11),this.m01*(this.m13*this.m22-this.m12*this.m23)+this.m02*(this.m11*this.m23-this.m13*this.m21)+this.m03*(this.m12*this.m21-this.m11*this.m22),this.m12*(this.m20*this.m33-this.m23*this.m30)+this.m13*(this.m22*this.m30-this.m20*this.m32)+this.m10*(this.m23*this.m32-this.m22*this.m33),this.m22*(this.m00*this.m33-this.m03*
this.m30)+this.m23*(this.m02*this.m30-this.m00*this.m32)+this.m20*(this.m03*this.m32-this.m02*this.m33),this.m32*(this.m00*this.m13-this.m03*this.m10)+this.m33*(this.m02*this.m10-this.m00*this.m12)+this.m30*(this.m03*this.m12-this.m02*this.m13),this.m02*(this.m13*this.m20-this.m10*this.m23)+this.m03*(this.m10*this.m22-this.m12*this.m20)+this.m00*(this.m12*this.m23-this.m13*this.m22),this.m13*(this.m20*this.m31-this.m21*this.m30)+this.m10*(this.m21*this.m33-this.m23*this.m31)+this.m11*(this.m23*this.m30-
this.m20*this.m33),this.m23*(this.m00*this.m31-this.m01*this.m30)+this.m20*(this.m01*this.m33-this.m03*this.m31)+this.m21*(this.m03*this.m30-this.m00*this.m33),this.m33*(this.m00*this.m11-this.m01*this.m10)+this.m30*(this.m01*this.m13-this.m03*this.m11)+this.m31*(this.m03*this.m10-this.m00*this.m13),this.m03*(this.m11*this.m20-this.m10*this.m21)+this.m00*(this.m13*this.m21-this.m11*this.m23)+this.m01*(this.m10*this.m23-this.m13*this.m20),this.m10*(this.m22*this.m31-this.m21*this.m32)+this.m11*(this.m20*
this.m32-this.m22*this.m30)+this.m12*(this.m21*this.m30-this.m20*this.m31),this.m20*(this.m02*this.m31-this.m01*this.m32)+this.m21*(this.m00*this.m32-this.m02*this.m30)+this.m22*(this.m01*this.m30-this.m00*this.m31),this.m30*(this.m02*this.m11-this.m01*this.m12)+this.m31*(this.m00*this.m12-this.m02*this.m10)+this.m32*(this.m01*this.m10-this.m00*this.m11),this.m00*(this.m11*this.m22-this.m12*this.m21)+this.m01*(this.m12*this.m20-this.m10*this.m22)+this.m02*(this.m10*this.m21-this.m11*this.m20));this.scale(a);
return this});c(b,"set",function(a,d,g,b,c,f,h,k,m,E,j,q,r,u,C,G){this.m00=a;this.m01=d;this.m02=g;this.m03=b;this.m10=c;this.m11=f;this.m12=h;this.m13=k;this.m20=m;this.m21=E;this.m22=j;this.m23=q;this.m30=r;this.m31=u;this.m32=C;this.m33=G},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"determinant4",function(){return(this.m00*this.m11-this.m01*this.m10)*(this.m22*this.m33-this.m23*this.m32)-(this.m00*this.m12-this.m02*this.m10)*(this.m21*this.m33-this.m23*this.m31)+(this.m00*this.m13-
this.m03*this.m10)*(this.m21*this.m32-this.m22*this.m31)+(this.m01*this.m12-this.m02*this.m11)*(this.m20*this.m33-this.m23*this.m30)-(this.m01*this.m13-this.m03*this.m11)*(this.m20*this.m32-this.m22*this.m30)+(this.m02*this.m13-this.m03*this.m12)*(this.m20*this.m31-this.m21*this.m30)});c(b,"scale",function(a){this.mul33(a);this.m03*=a;this.m13*=a;this.m23*=a;this.m30*=a;this.m31*=a;this.m32*=a;this.m33*=a},"~N");c(b,"mul",function(a){this.mul2(this,a)},"JU.M4");c(b,"mul2",function(a,d){this.set(a.m00*
d.m00+a.m01*d.m10+a.m02*d.m20+a.m03*d.m30,a.m00*d.m01+a.m01*d.m11+a.m02*d.m21+a.m03*d.m31,a.m00*d.m02+a.m01*d.m12+a.m02*d.m22+a.m03*d.m32,a.m00*d.m03+a.m01*d.m13+a.m02*d.m23+a.m03*d.m33,a.m10*d.m00+a.m11*d.m10+a.m12*d.m20+a.m13*d.m30,a.m10*d.m01+a.m11*d.m11+a.m12*d.m21+a.m13*d.m31,a.m10*d.m02+a.m11*d.m12+a.m12*d.m22+a.m13*d.m32,a.m10*d.m03+a.m11*d.m13+a.m12*d.m23+a.m13*d.m33,a.m20*d.m00+a.m21*d.m10+a.m22*d.m20+a.m23*d.m30,a.m20*d.m01+a.m21*d.m11+a.m22*d.m21+a.m23*d.m31,a.m20*d.m02+a.m21*d.m12+a.m22*
d.m22+a.m23*d.m32,a.m20*d.m03+a.m21*d.m13+a.m22*d.m23+a.m23*d.m33,a.m30*d.m00+a.m31*d.m10+a.m32*d.m20+a.m33*d.m30,a.m30*d.m01+a.m31*d.m11+a.m32*d.m21+a.m33*d.m31,a.m30*d.m02+a.m31*d.m12+a.m32*d.m22+a.m33*d.m32,a.m30*d.m03+a.m31*d.m13+a.m32*d.m23+a.m33*d.m33)},"JU.M4,JU.M4");c(b,"transform",function(a){this.transform2(a,a)},"JU.T4");c(b,"transform2",function(a,d){d.set4(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03*a.w,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13*a.w,this.m20*a.x+this.m21*a.y+
this.m22*a.z+this.m23*a.w,this.m30*a.x+this.m31*a.y+this.m32*a.z+this.m33*a.w)},"JU.T4,JU.T4");c(b,"rotTrans",function(a){this.rotTrans2(a,a)},"JU.T3");c(b,"rotTrans2",function(a,d){d.set(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13,this.m20*a.x+this.m21*a.y+this.m22*a.z+this.m23);return d},"JU.T3,JU.T3");c(b,"setAsXYRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m22=d;this.m23=-a;this.m32=a;this.m33=d;return this},
"~N");c(b,"setAsYZRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m00=d;this.m03=-a;this.m30=a;this.m33=d;return this},"~N");c(b,"setAsXZRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m11=d;this.m13=-a;this.m31=a;this.m33=d;return this},"~N");j(b,"equals",function(a){return!y(a,"JU.M4")?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m03==a.m03&&this.m10==a.m10&&this.m11==a.m11&&this.m12==a.m12&&this.m13==a.m13&&this.m20==a.m20&&
this.m21==a.m21&&this.m22==a.m22&&this.m23==a.m23&&this.m30==a.m30&&this.m31==a.m31&&this.m32==a.m32&&this.m33==a.m33},"~O");j(b,"hashCode",function(){return JU.T3.floatToIntBits(this.m00)^JU.T3.floatToIntBits(this.m01)^JU.T3.floatToIntBits(this.m02)^JU.T3.floatToIntBits(this.m03)^JU.T3.floatToIntBits(this.m10)^JU.T3.floatToIntBits(this.m11)^JU.T3.floatToIntBits(this.m12)^JU.T3.floatToIntBits(this.m13)^JU.T3.floatToIntBits(this.m20)^JU.T3.floatToIntBits(this.m21)^JU.T3.floatToIntBits(this.m22)^JU.T3.floatToIntBits(this.m23)^
JU.T3.floatToIntBits(this.m30)^JU.T3.floatToIntBits(this.m31)^JU.T3.floatToIntBits(this.m32)^JU.T3.floatToIntBits(this.m33)});j(b,"toString",function(){return"[["+this.m00+"\t"+this.m01+"\t"+this.m02+"\t"+this.m03+"]\n  ["+this.m10+"\t"+this.m11+"\t"+this.m12+"\t"+this.m13+"]\n  ["+this.m20+"\t"+this.m21+"\t"+this.m22+"\t"+this.m23+"]\n  ["+this.m30+"\t"+this.m31+"\t"+this.m32+"\t"+this.m33+"]]"});c(b,"round",function(a){this.m00=this.rnd(this.m00,a);this.m01=this.rnd(this.m01,a);this.m02=this.rnd(this.m02,
a);this.m03=this.rnd(this.m03,a);this.m10=this.rnd(this.m10,a);this.m11=this.rnd(this.m11,a);this.m12=this.rnd(this.m12,a);this.m13=this.rnd(this.m13,a);this.m20=this.rnd(this.m20,a);this.m21=this.rnd(this.m21,a);this.m22=this.rnd(this.m22,a);this.m23=this.rnd(this.m23,a);this.m30=this.rnd(this.m30,a);this.m31=this.rnd(this.m31,a);this.m32=this.rnd(this.m32,a);this.m33=this.rnd(this.m33,a);return this},"~N");c(b,"rnd",function(a,d){return Math.abs(a)<d?0:a},"~N,~N")});s("JU");B(["java.io.OutputStream",
"javajs.api.GenericOutputChannel"],"JU.OC",["java.io.BufferedWriter","$.ByteArrayOutputStream","$.OutputStreamWriter","JU.Base64","$.SB"],function(){var b=n(function(){this.bw=this.fileName=this.bytePoster=null;this.isLocalFile=!1;this.byteCount=0;this.closed=this.isCanceled=!1;this.type=this.sb=this.os=null;this.$isBase64=!1;this.bytes=this.os0=null;this.bigEndian=!0;v(this,arguments)},JU,"OC",java.io.OutputStream,javajs.api.GenericOutputChannel);A(b,function(){M(this,JU.OC,[])});A(b,function(a){M(this,
JU.OC,[]);this.setParams(null,a,!1,null)},"~S");c(b,"setParams",function(a,d,g,b){this.bytePoster=a;if(this.$isBase64=";base64,".equals(d))d=null,this.os0=b,b=null;this.fileName=d;this.os=b;this.isLocalFile=null!=d&&!JU.OC.isRemote(d);g&&(!this.$isBase64&&null!=b)&&(this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(b)));return this},"javajs.api.BytePoster,~S,~B,java.io.OutputStream");j(b,"isBigEndian",function(){return this.bigEndian});c(b,"setBigEndian",function(a){this.bigEndian=
a},"~B");c(b,"setBytes",function(a){this.bytes=a;return this},"~A");c(b,"getFileName",function(){return this.fileName});c(b,"getName",function(){return null==this.fileName?null:this.fileName.substring(this.fileName.lastIndexOf("/")+1)});c(b,"getByteCount",function(){return this.byteCount});c(b,"setType",function(a){this.type=a},"~S");c(b,"getType",function(){return this.type});c(b,"append",function(a){try{if(null!=this.bw)this.bw.write(a);else if(null==this.os)null==this.sb&&(this.sb=new JU.SB),this.sb.append(a);
else{var d=a.getBytes();this.os.write(d,0,d.length);this.byteCount+=d.length;return this}}catch(g){if(!H(g,"java.io.IOException"))throw g;}this.byteCount+=a.length;return this},"~S");j(b,"reset",function(){this.sb=null;this.initOS()});c(b,"initOS",function(){if(null!=this.sb){var a=this.sb.toString();this.reset();this.append(a)}else{try{this.os=null,null==this.os&&(this.os=new java.io.ByteArrayOutputStream),null!=this.bw&&(this.bw.close(),this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(this.os)))}catch(d){if(H(d,
Exception))System.out.println(d.toString());else throw d;}this.byteCount=0}});j(b,"writeByteAsInt",function(a){null==this.os&&this.initOS();this.os.writeByteAsInt(a);this.byteCount++},"~N");j(b,"write",function(a,d,g){null==this.os&&this.initOS();0>g&&(g=a.length-d);try{this.os.write(a,d,g)}catch(b){if(!H(b,"java.io.IOException"))throw b;}this.byteCount+=g},"~A,~N,~N");j(b,"writeShort",function(a){this.isBigEndian()?(this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):(this.writeByteAsInt(a),this.writeByteAsInt(a>>
8))},"~N");j(b,"writeLong",function(a){this.isBigEndian()?(this.writeInt(a>>32&4294967295),this.writeInt(a&4294967295)):(this.writeByteAsInt(a>>56),this.writeByteAsInt(a>>48),this.writeByteAsInt(a>>40),this.writeByteAsInt(a>>32),this.writeByteAsInt(a>>24),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>8),this.writeByteAsInt(a))},"~N");c(b,"write",function(a){this.write(a,0,a.length)},"~A");c(b,"cancel",function(){this.isCanceled=!0;this.closeChannel()});j(b,"closeChannel",function(){if(this.closed)return null;
try{null!=this.bw?(this.bw.flush(),this.bw.close()):null!=this.os&&(this.os.flush(),this.os.close()),null!=this.os0&&this.isCanceled&&(this.os0.flush(),this.os0.close())}catch(a){if(!H(a,Exception))throw a;}if(this.isCanceled)return this.closed=!0,null;if(null==this.fileName){if(this.$isBase64){var d=this.getBase64();null!=this.os0&&(this.os=this.os0,this.append(d));this.sb=new JU.SB;this.sb.append(d);this.$isBase64=!1;return this.closeChannel()}return null==this.sb?null:this.sb.toString()}this.closed=
!0;if(!this.isLocalFile){d=this.postByteArray();if(null==d||d.startsWith("java.net"))this.byteCount=-1;return d}var g=d=null,d=self.J2S||Jmol,g="function"==typeof this.fileName?this.fileName:null;if(null!=d){var b=null==this.sb?this.toByteArray():this.sb.toString();null==g?d.doAjax(this.fileName,null,b,null==this.sb):d.applyFunc(this.fileName,b)}return null});c(b,"isBase64",function(){return this.$isBase64});c(b,"getBase64",function(){return JU.Base64.getBase64(this.toByteArray()).toString()});c(b,
"toByteArray",function(){return null!=this.bytes?this.bytes:y(this.os,"java.io.ByteArrayOutputStream")?this.os.toByteArray():null});c(b,"close",function(){this.closeChannel()});j(b,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!H(a,"java.io.IOException"))throw a;}return null!=this.sb?this.closeChannel():this.byteCount+" bytes"});c(b,"postByteArray",function(){var a=null==this.sb?this.toByteArray():this.sb.toString().getBytes();return this.bytePoster.postByteArray(this.fileName,
a)});b.isRemote=c(b,"isRemote",function(a){if(null==a)return!1;a=JU.OC.urlTypeIndex(a);return 0<=a&&4>a},"~S");b.isLocal=c(b,"isLocal",function(a){return null!=a&&!JU.OC.isRemote(a)},"~S");b.urlTypeIndex=c(b,"urlTypeIndex",function(a){if(null==a)return-2;for(var d=0;d<JU.OC.urlPrefixes.length;++d)if(a.startsWith(JU.OC.urlPrefixes[d]))return d;return-1},"~S");j(b,"writeInt",function(a){this.bigEndian?(this.writeByteAsInt(a>>24),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):
(this.writeByteAsInt(a),this.writeByteAsInt(a>>8),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>24))},"~N");c(b,"writeFloat",function(a){this.writeInt(0==a?0:Float.floatToIntBits(a))},"~N");b.urlPrefixes=x(-1,"http: https: sftp: ftp: file: cache:".split(" "))});s("JU");B(["JU.T3"],"JU.P3",null,function(){var b=I(JU,"P3",JU.T3);b.newP=c(b,"newP",function(a){var d=new JU.P3;d.x=a.x;d.y=a.y;d.z=a.z;return d},"JU.T3");b.getUnlikely=c(b,"getUnlikely",function(){return null==JU.P3.unlikely?JU.P3.unlikely=
JU.P3.new3(3.141592653589793,2.718281828459045,8.539734222673566):JU.P3.unlikely});b.new3=c(b,"new3",function(a,d,g){var b=new JU.P3;b.x=a;b.y=d;b.z=g;return b},"~N,~N,~N");b.newA=c(b,"newA",function(a){return JU.P3.new3(a[0],a[1],a[2])},"~A");b.unlikely=null});s("JU");B(["JU.T3i"],"JU.P3i",null,function(){var b=I(JU,"P3i",JU.T3i);b.new3=c(b,"new3",function(a,d,g){var b=new JU.P3i;b.x=a;b.y=d;b.z=g;return b},"~N,~N,~N")});s("JU");B(["JU.T4"],"JU.P4",null,function(){var b=I(JU,"P4",JU.T4);b.new4=c(b,
"new4",function(a,d,g,b){var c=new JU.P4;c.set4(a,d,g,b);return c},"~N,~N,~N,~N");b.newPt=c(b,"newPt",function(a){var d=new JU.P4;d.set4(a.x,a.y,a.z,a.w);return d},"JU.P4");c(b,"distance4",function(a){var d=this.x-a.x,g=this.y-a.y,b=this.z-a.z;a=this.w-a.w;return Math.sqrt(d*d+g*g+b*b+a*a)},"JU.P4")});s("JU");B(null,"JU.PT",["java.util.Arrays","JU.AU","$.DF","$.SB"],function(){var b=I(JU,"PT",null);b.parseInt=c(b,"parseInt",function(a){return JU.PT.parseIntNext(a,F(-1,[0]))},"~S");b.parseIntNext=
c(b,"parseIntNext",function(a,d){var g=a.length;return 0>d[0]||d[0]>=g?-2147483648:JU.PT.parseIntChecked(a,g,d)},"~S,~A");b.parseIntChecked=c(b,"parseIntChecked",function(a,d,g){var b=!1,c=0,f=g[0];if(0>f)return-2147483648;for(var h;f<d&&JU.PT.isWhiteSpace(a,f);)++f;var k=!1;f<d&&45==a.charAt(f).charCodeAt(0)&&(k=!0,++f);for(;f<d&&48<=(h=a.charAt(f).charCodeAt(0))&&57>=h;)c=10*c+(h-48),b=!0,++f;b?k&&(c=-c):c=-2147483648;g[0]=f;return c},"~S,~N,~A");b.isWhiteSpace=c(b,"isWhiteSpace",function(a,d){var g;
return 0<=d&&(" "==(g=a.charAt(d))||"\t"==g||"\n"==g)},"~S,~N");b.parseFloatChecked=c(b,"parseFloatChecked",function(a,d,g,b){var c=!1,f=g[0];if(b&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;f<d&&JU.PT.isWhiteSpace(a,f);)++f;var h=!1;f<d&&"-"==a.charAt(f)&&(++f,h=!0);for(var k=0,m=0,E=0;f<d&&48<=(k=a.charAt(f).charCodeAt(0))&&57>=k;)m=10*m+1*(k-48),++f,c=!0;var j=!1,q=0,r=0==m?-1:0;if(46==k)for(j=!0;++f<d&&48<=(k=a.charAt(f).charCodeAt(0))&&57>=k;){c=!0;if(0>r){if(48==k){r--;continue}r=
-r}q<JU.PT.decimalScale.length&&(E=10*E+1*(k-48),q++)}c?0<E?(c=E*JU.PT.decimalScale[q-1],c=1<r?r-2<JU.PT.decimalScale.length?c*JU.PT.decimalScale[r-2]:c*Math.pow(10,1-r):c+m):c=m:c=NaN;m=!1;if(f<d&&(69==k||101==k||68==k)){m=!0;if(++f>=d)return NaN;k=a.charAt(f).charCodeAt(0);if(43==k&&++f>=d)return NaN;g[0]=f;f=JU.PT.parseIntChecked(a,d,g);if(-2147483648==f)return NaN;0<f&&f<=JU.PT.tensScale.length?c*=JU.PT.tensScale[f-1]:0>f&&-f<=JU.PT.decimalScale.length?c*=JU.PT.decimalScale[-f-1]:0!=f&&(c*=Math.pow(10,
f))}else g[0]=f;h&&(c=-c);Infinity==c&&(c=3.4028235E38);return!b||(!m||j)&&JU.PT.checkTrailingText(a,g[0],d)?c:NaN},"~S,~N,~A,~B");b.checkTrailingText=c(b,"checkTrailingText",function(a,d,g){for(var b;d<g&&(JU.PT.isWhitespace(b=a.charAt(d))||";"==b);)++d;return d==g},"~S,~N,~N");b.parseFloatArray=c(b,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,F(1,0),null,null,null)},"~S");b.parseFloatArrayInfested=c(b,"parseFloatArrayInfested",function(a,d){for(var g=d.length,b=a.length,c=0,
f=0,h=0;0<=h&&h<g&&c<b;h++){for(var k;Float.isNaN(k=JU.PT.parseFloat(a[c++]))&&c<b;);Float.isNaN(k)||(d[f=h]=k);if(c==b)break}return f+1},"~A,~A");b.parseFloatArrayNext=c(b,"parseFloatArrayNext",function(a,d,g,b,c){var f=0,h=d[0];0<=h&&(null!=b&&(f=a.indexOf(b,h),0<=f&&(d[0]=f+b.length)),a=a.substring(d[0]),h=null==c?-1:a.indexOf(c),0>h?h=a.length:a=a.substring(0,h),d[0]+=h+1,a=JU.PT.getTokens(a),null==g&&(g=L(a.length,0)),f=JU.PT.parseFloatArrayInfested(a,g));if(null==g)return L(0,0);for(a=f;a<g.length;a++)g[a]=
NaN;return g},"~S,~A,~A,~S,~S");b.parseFloatRange=c(b,"parseFloatRange",function(a,d,g){var b=a.length;d>b&&(d=b);return 0>g[0]||g[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,g,!1)},"~S,~N,~A");b.parseFloatNext=c(b,"parseFloatNext",function(a,d){var g=null==a?-1:a.length;return 0>d[0]||d[0]>=g?NaN:JU.PT.parseFloatChecked(a,g,d,!1)},"~S,~A");b.parseFloatStrict=c(b,"parseFloatStrict",function(a){var d=a.length;return 0==d?NaN:JU.PT.parseFloatChecked(a,d,F(-1,[0]),!0)},"~S");b.parseFloat=c(b,"parseFloat",
function(a){return JU.PT.parseFloatNext(a,F(-1,[0]))},"~S");b.parseIntRadix=c(b,"parseIntRadix",function(a,d){return Integer.parseIntRadix(a,d)},"~S,~N");b.getTokens=c(b,"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");b.parseToken=c(b,"parseToken",function(a){return JU.PT.parseTokenNext(a,F(-1,[0]))},"~S");b.parseTrimmed=c(b,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a,0,a.length)},"~S");b.parseTrimmedAt=c(b,"parseTrimmedAt",function(a,d){return JU.PT.parseTrimmedRange(a,
d,a.length)},"~S,~N");b.parseTrimmedRange=c(b,"parseTrimmedRange",function(a,d,g){var b=a.length;g<b&&(b=g);return b<d?"":JU.PT.parseTrimmedChecked(a,d,b)},"~S,~N,~N");b.getTokensAt=c(b,"getTokensAt",function(a,d){if(null==a)return null;var g=a.length;if(0>d||d>g)return null;var b=JU.PT.countTokens(a,d),c=Array(b),f=F(1,0);f[0]=d;for(var h=0;h<b;++h)c[h]=JU.PT.parseTokenChecked(a,g,f);return c},"~S,~N");b.countChar=c(b,"countChar",function(a,d){for(var g=0,b=a.lastIndexOf(d)+1;0<=--b;)a.charAt(b)==
d&&g++;return g},"~S,~S");b.countTokens=c(b,"countTokens",function(a,d){var g=0;if(null!=a)for(var b=a.length;;){for(;d<b&&JU.PT.isWhiteSpace(a,d);)++d;if(d==b)break;++g;do++d;while(d<b&&!JU.PT.isWhiteSpace(a,d))}return g},"~S,~N");b.parseTokenNext=c(b,"parseTokenNext",function(a,d){var g=a.length;return 0>d[0]||d[0]>=g?null:JU.PT.parseTokenChecked(a,g,d)},"~S,~A");b.parseTokenRange=c(b,"parseTokenRange",function(a,d,g){var b=a.length;d>b&&(d=b);return 0>g[0]||g[0]>=d?null:JU.PT.parseTokenChecked(a,
d,g)},"~S,~N,~A");b.parseTokenChecked=c(b,"parseTokenChecked",function(a,d,g){for(var b=g[0];b<d&&JU.PT.isWhiteSpace(a,b);)++b;for(var c=b;b<d&&!JU.PT.isWhiteSpace(a,b);)++b;g[0]=b;return c==b?null:a.substring(c,b)},"~S,~N,~A");b.parseTrimmedChecked=c(b,"parseTrimmedChecked",function(a,d,g){for(;d<g&&JU.PT.isWhiteSpace(a,d);)++d;for(g-=1;g>=d&&JU.PT.isWhiteSpace(a,g);)--g;return g<d?"":a.substring(d,g+1)},"~S,~N,~N");b.dVal=c(b,"dVal",function(a){if(null==a)throw new NumberFormatException("null");
var d=parseFloat(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"~S");b.fVal=c(b,"fVal",function(a){return this.dVal(a)},"~S");b.parseIntRange=c(b,"parseIntRange",function(a,d,g){var b=a.length;d>b&&(d=b);return 0>g[0]||g[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,g)},"~S,~N,~A");b.parseFloatArrayData=c(b,"parseFloatArrayData",function(a,d){JU.PT.parseFloatArrayDataN(a,d,d.length)},"~A,~A");b.parseFloatArrayDataN=c(b,"parseFloatArrayDataN",function(a,d,g){for(;0<=--g;)d[g]=
g>=a.length?NaN:JU.PT.parseFloat(a[g])},"~A,~A,~N");b.split=c(b,"split",function(a,d){if(0==a.length)return[];var g=1,b=a.indexOf(d),c,f=d.length;if(0>b||0==f)return c=Array(1),c[0]=a,c;for(var h=a.length-f;0<=b&&b<h;g++)b=a.indexOf(d,b+f);c=Array(g);for(var k=b=0,m=0;0<=(k=a.indexOf(d,b))&&m+1<g;)c[m++]=a.substring(b,k),b=k+f;a.indexOf(d,h)!=h&&(h+=f);c[m]=a.substring(b,h);return c},"~S,~S");b.getQuotedStringAt=c(b,"getQuotedStringAt",function(a,d){var g=F(-1,[d]);return JU.PT.getQuotedStringNext(a,
g)},"~S,~N");b.getQuotedStringNext=c(b,"getQuotedStringNext",function(a,d){var g=d[0];if(0>g||0>(g=a.indexOf('"',g)))return"";for(var b=g+1,c=a.length;++g<c&&'"'!=a.charAt(g);)"\\"==a.charAt(g)&&g++;d[0]=g+1;return a.substring(b,g)},"~S,~A");b.getQuotedOrUnquotedAttribute=c(b,"getQuotedOrUnquotedAttribute",function(a,d){if(null==a||null==d)return null;var g=a.toLowerCase().indexOf(d.toLowerCase()+"=");if(0>g||(g=g+d.length+1)>=a.length)return"";var b=a.charAt(g);switch(b.charCodeAt(0)){case 39:case 34:g++;
break;default:b=" ",a+=" "}b=a.indexOf(b,g);return 0>b?null:a.substring(g,b)},"~S,~S");b.getCSVString=c(b,"getCSVString",function(a,d){var g=d[1];if(0>g||0>(g=a.indexOf('"',g)))return null;for(var b=d[0]=g,c=a.length,f=!1,h=!1;++g<c&&('"'!=a.charAt(g)||(f=g+1<c&&'"'==a.charAt(g+1)));)f&&(f=!1,h=!0,g++);if(g>=c)return d[1]=-1,null;d[1]=g+1;g=a.substring(b+1,g);return h?JU.PT.rep(JU.PT.rep(g,'""',"\x00"),"\x00",'"'):g},"~S,~A");b.isOneOf=c(b,"isOneOf",function(a,d){if(0==d.length||0<=a.indexOf(";"))return!1;
";"!=d.charAt(0)&&(d=";"+d+";");return 0<=d.indexOf(";"+a+";")},"~S,~S");b.getQuotedAttribute=c(b,"getQuotedAttribute",function(a,d){var g=a.indexOf(d+"=");return 0>g?null:JU.PT.getQuotedStringAt(a,g)},"~S,~S");b.approx=c(b,"approx",function(a,d){return Math.round(a*d)/d},"~N,~N");b.rep=c(b,"rep",function(a,d,g){if(null==a||0==d.length||0>a.indexOf(d))return a;var b=0<=g.indexOf(d);do a=a.$replace(d,g);while(!b&&0<=a.indexOf(d));return a},"~S,~S,~S");b.formatF=c(b,"formatF",function(a,d,g,b,c){return JU.PT.formatS(JU.DF.formatDecimal(a,
g),d,0,b,c)},"~N,~N,~N,~B,~B");b.formatD=c(b,"formatD",function(a,d,g,b,c){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-g),d,0,b,c)},"~N,~N,~N,~B,~B");b.formatS=c(b,"formatS",function(a,d,g,b,c){if(null==a)return"";var f=a.length;2147483647!=g&&0<g&&g<f?a=a.substring(0,g):0>g&&0<=f+g&&(a=a.substring(f+g+1));g=d-a.length;if(0>=g)return a;d=c&&!b&&"-"==a.charAt(0);c=c?"0":" ";var h=d?"-":c,f=new JU.SB;b&&f.append(a);for(f.appendC(h);0<--g;)f.appendC(c);b||f.append(d?c+a.substring(1):a);return f.toString()},
"~S,~N,~N,~B,~B");b.replaceWithCharacter=c(b,"replaceWithCharacter",function(a,d,g){if(null==a)return null;for(var b=d.length;0<=--b;)a=a.$replace(d.charAt(b),g);return a},"~S,~S,~S");b.replaceAllCharacters=c(b,"replaceAllCharacters",function(a,d,g){for(var b=d.length;0<=--b;){var c=d.substring(b,b+1);a=JU.PT.rep(a,c,g)}return a},"~S,~S,~S");b.trim=c(b,"trim",function(a,d){if(null==a||0==a.length)return a;if(0==d.length)return a.trim();for(var g=a.length,b=0;b<g&&0<=d.indexOf(a.charAt(b));)b++;for(g=
a.length-1;g>b&&0<=d.indexOf(a.charAt(g));)g--;return a.substring(b,g+1)},"~S,~S");b.trimQuotes=c(b,"trimQuotes",function(a){return null!=a&&1<a.length&&a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a},"~S");b.isNonStringPrimitive=c(b,"isNonStringPrimitive",function(a){return"number"==typeof a||"boolean"==typeof a?!0:y(a,Number)||y(a,Boolean)},"~O");b.toJSON=c(b,"toJSON",function(a,d){if(null==d)return JU.PT.packageJSON(a,null);if(JU.PT.isNonStringPrimitive(d))return JU.PT.packageJSON(a,
d.toString());for(var g=null,b=null;;){if("string"==typeof d){g=d;"undefined"==typeof g&&(g="null");0!=g.indexOf('{"')&&(g=JU.PT.esc(g));break}if(y(d,"javajs.api.JSONEncodable")){if(null==(g=d.toJSON()))g="null";break}b=new JU.SB;if(y(d,"java.util.Map")){b.append("{ ");var c="",f=d.keySet(),h=f.toArray(Array(f.size()));java.util.Arrays.sort(h);for(var f=0,k=h.length;f<k;f++){var m=h[f];null==m&&(m="null");b.append(c).append(JU.PT.packageJSON(m,JU.PT.toJSON(null,d.get(m))));c=","}b.append(" }");break}if(y(d,
"JU.Lst")){b.append("[ ");k=d.size();for(f=0;f<k;f++)0<f&&b.appendC(","),b.append(JU.PT.toJSON(null,d.get(f)));b.append(" ]");break}if(y(d,"JU.M34")){c=y(d,"JU.M4")?4:3;k=L(c,0);h=d;b.appendC("[");for(f=0;f<c;f++)0<f&&b.appendC(","),h.getRow(f,k),b.append(JU.PT.toJSON(null,k));b.appendC("]");break}g=JU.PT.nonArrayString(d);if(null==g){b.append("[");k=JU.AU.getLength(d);f=null;f=d[0];"number"!=typeof f&&(f=null);if(null!=f)b.appendO(d);else for(f=0;f<k;f++)0<f&&b.appendC(","),b.append(JU.PT.toJSON(null,
JU.PT.arrayGet(d,f)));b.append("]");break}d=d.toString()}return JU.PT.packageJSON(a,null==g?b.toString():g)},"~S,~O");b.arrayGet=c(b,"arrayGet",function(a,d){return a[d]},"~O,~N");b.nonArrayString=c(b,"nonArrayString",function(a){return a.constructor==Array||a.BYTES_PER_ELEMENT?null:a.toString()},"~O");b.byteArrayToJSON=c(b,"byteArrayToJSON",function(a){var d=new JU.SB;d.append("[");for(var g=a.length,b=0;b<g;b++)0<b&&d.appendC(","),d.appendI(a[b]&255);d.append("]");return d.toString()},"~A");b.packageJSON=
c(b,"packageJSON",function(a,d){return null==a?d:'"'+a+'": '+d},"~S,~S");b.escapeUrl=c(b,"escapeUrl",function(a){a=JU.PT.rep(a,"\n","");a=JU.PT.rep(a,"%","%25");a=JU.PT.rep(a,"#","%23");a=JU.PT.rep(a,"[","%5B");a=JU.PT.rep(a,"\\","%5C");a=JU.PT.rep(a,"]","%5D");return a=JU.PT.rep(a," ","%20")},"~S");b.esc=c(b,"esc",function(a){if(null==a||0==a.length)return'""';for(var d=!1,g=0;10>g;g+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(g))){d=!0;break}if(d)for(;10>g;){for(var d=-1,b='\\\\\tt\rr\nn""'.charAt(g++),
c='\\\\\tt\rr\nn""'.charAt(g++),f=new JU.SB,h=0;0<=(d=a.indexOf(b,d+1));)f.append(a.substring(h,d)).appendC("\\").appendC(c),h=d+1;f.append(a.substring(h,a.length));a=f.toString()}return'"'+JU.PT.escUnicode(a)+'"'},"~S");b.escUnicode=c(b,"escUnicode",function(a){for(var d=a.length;0<=--d;)if(127<a.charAt(d).charCodeAt(0)){var g="0000"+Integer.toHexString(a.charAt(d).charCodeAt(0));a=a.substring(0,d)+"\\u"+g.substring(g.length-4)+a.substring(d+1)}return a},"~S");b.escF=c(b,"escF",function(a){a=""+
a;0>a.indexOf(".")&&(0>a.indexOf("e")&&0>a.indexOf("N")&&0>a.indexOf("n"))&&(a+=".0");return a},"~N");b.join=c(b,"join",function(a,d,g){if(a.length<g)return null;var b=new JU.SB;for(b.append(a[g++]);g<a.length;g++)b.appendC(d).append(a[g]);return b.toString()},"~A,~S,~N");b.isLike=c(b,"isLike",function(a,d){var g=a.equals(d);if(g)return!0;var b=d.startsWith("*"),c=d.endsWith("*");return!b&&!c?g:b&&c?1==d.length||a.contains(d.substring(1,d.length-1)):b?a.endsWith(d.substring(1)):a.startsWith(d.substring(0,
d.length-1))},"~S,~S");b.getMapValueNoCase=c(b,"getMapValueNoCase",function(a,d){if("this".equals(d))return a;var g=a.get(d);if(null==g)for(var b,c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)if(b.getKey().equalsIgnoreCase(d))return b.getValue();return g},"java.util.Map,~S");b.clean=c(b,"clean",function(a){return JU.PT.rep(JU.PT.replaceAllCharacters(a," \t\n\r"," "),"  "," ").trim()},"~S");b.fdup=c(b,"fdup",function(a,d,g){for(var b,c=0,f=d;1<=--f;)if(!JU.PT.isDigit(b=a.charAt(f)))switch(b.charCodeAt(0)){case 46:if(0!=
c++)return a;continue;case 45:if(1!=f&&"."!=a.charAt(f-1))return a;continue;default:return a}b=a.substring(0,d+1);c=new JU.SB;for(f=0;f<g;f++)c.append(b);c.append(a.substring(d+1));return c.toString()},"~S,~N,~N");b.formatString=c(b,"formatString",function(a,d,g,b,c,f){if(null==a)return null;if("".equals(a))return"";var h=d.length;if(0>a.indexOf("%")||0==h||0>a.indexOf(d))return a;var k="",m,E,j;for(m=0;0<=(E=a.indexOf("%",m))&&0<=(j=a.indexOf(d,E+1));)if(m!=E&&(k+=a.substring(m,E)),m=E+1,j>E+6)k+=
"%";else try{var q=!1;"-"==a.charAt(m)&&(q=!0,++m);var r=!1;"0"==a.charAt(m)&&(r=!0,++m);for(var u,C=0;"0"<=(u=a.charAt(m))&&"9">=u;)C=10*C+(u.charCodeAt(0)-48),++m;var G=2147483647,N=!1;if("."==a.charAt(m)){++m;if("-"==(u=a.charAt(m)))N=!0,++m;if("0"<=(u=a.charAt(m))&&"9">=u)if(G=u.charCodeAt(0)-48,++m,"0"<=(u=a.charAt(m))&&"9">=u)G=10*G+(u.charCodeAt(0)-48),++m;N&&(G=-G)}if(a.substring(m,m+h).equals(d)){if(m+=h,Float.isNaN(b)?null!=g?k+=JU.PT.formatS(g,C,0>G?G-1:G,q,r):Double.isNaN(c)||(k+=JU.PT.formatD(c,
C,G-1,q,r)):k+=JU.PT.formatF(b,C,G,q,r),f)break}else m=E+1,k+="%"}catch(w){if(H(w,"IndexOutOfBoundsException")){m=E;break}else throw w;}return k+=a.substring(m)},"~S,~S,~S,~N,~N,~B");b.formatStringS=c(b,"formatStringS",function(a,d,g){return JU.PT.formatString(a,d,g,NaN,NaN,!1)},"~S,~S,~S");b.formatStringF=c(b,"formatStringF",function(a,d,g){return JU.PT.formatString(a,d,null,g,NaN,!1)},"~S,~S,~N");b.formatStringI=c(b,"formatStringI",function(a,d,g){return JU.PT.formatString(a,d,""+g,NaN,NaN,!1)},
"~S,~S,~N");b.sprintf=c(b,"sprintf",function(a,d,g){if(null==g)return a;var b=d.length;if(b==g.length)try{for(var c=0;c<b;c++)if(null!=g[c])switch(d.charAt(c).charCodeAt(0)){case 115:a=JU.PT.formatString(a,"s",g[c],NaN,NaN,!0);break;case 102:a=JU.PT.formatString(a,"f",null,g[c].floatValue(),NaN,!0);break;case 105:a=JU.PT.formatString(a,"d",""+g[c],NaN,NaN,!0);a=JU.PT.formatString(a,"i",""+g[c],NaN,NaN,!0);break;case 100:a=JU.PT.formatString(a,"e",null,NaN,g[c].doubleValue(),!0);break;case 112:var f=
g[c];a=JU.PT.formatString(a,"p",null,f.x,NaN,!0);a=JU.PT.formatString(a,"p",null,f.y,NaN,!0);a=JU.PT.formatString(a,"p",null,f.z,NaN,!0);break;case 113:var h=g[c];a=JU.PT.formatString(a,"q",null,h.x,NaN,!0);a=JU.PT.formatString(a,"q",null,h.y,NaN,!0);a=JU.PT.formatString(a,"q",null,h.z,NaN,!0);a=JU.PT.formatString(a,"q",null,h.w,NaN,!0);break;case 83:for(var k=g[c],m=0;m<k.length;m++)a=JU.PT.formatString(a,"s",k[m],NaN,NaN,!0);break;case 70:for(var E=g[c],m=0;m<E.length;m++)a=JU.PT.formatString(a,
"f",null,E[m],NaN,!0);break;case 73:for(var j=g[c],m=0;m<j.length;m++)a=JU.PT.formatString(a,"d",""+j[m],NaN,NaN,!0);for(m=0;m<j.length;m++)a=JU.PT.formatString(a,"i",""+j[m],NaN,NaN,!0);break;case 68:for(var q=g[c],m=0;m<q.length;m++)a=JU.PT.formatString(a,"e",null,NaN,q[m],!0)}return JU.PT.rep(a,"%%","%")}catch(r){if(!H(r,Exception))throw r;}System.out.println("TextFormat.sprintf error "+d+" "+a);return JU.PT.rep(a,"%","?")},"~S,~S,~A");b.formatCheck=c(b,"formatCheck",function(a){if(null==a||0>
a.indexOf("p")&&0>a.indexOf("q"))return a;a=JU.PT.rep(a,"%%","\u0001");a=JU.PT.rep(a,"%p","%6.2p");a=JU.PT.rep(a,"%q","%6.2q");a=JU.PT.split(a,"%");var d=new JU.SB;d.append(a[0]);for(var g=1;g<a.length;g++){var b="%"+a[g],c;if(3<=b.length){if(0<=(c=b.indexOf("p")))b=JU.PT.fdup(b,c,3);if(0<=(c=b.indexOf("q")))b=JU.PT.fdup(b,c,4)}d.append(b)}return d.toString().$replace("\u0001","%")},"~S");b.leftJustify=c(b,"leftJustify",function(a,d,g){a.append(g);g=d.length-g.length;0<g&&a.append(d.substring(0,g))},
"JU.SB,~S,~S");b.rightJustify=c(b,"rightJustify",function(a,d,g){var b=d.length-g.length;0<b&&a.append(d.substring(0,b));a.append(g)},"JU.SB,~S,~S");b.safeTruncate=c(b,"safeTruncate",function(a,d){-0.001<a&&0.001>a&&(a=0);return(a+"         ").substring(0,d)},"~N,~N");b.isWild=c(b,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");b.isMatch=c(b,"isMatch",function(a,d,g,b){if(a.equals(d))return!0;var c=d.length;if(0==c)return!1;var f=g&&b?"*"==d.charAt(0):!1;if(1==c&&
f)return!0;var h=g&&d.endsWith("*");if(!(0<=d.indexOf("?"))){if(f)return h?3>c||0<=a.indexOf(d.substring(1,c-1)):a.endsWith(d.substring(1));if(h)return a.startsWith(d.substring(0,c-1))}for(var k=a.length,m="????",E=4;E<k;)m+=m,E*=2;g&&(f&&(d=m+d.substring(1),c+=E-1),h&&(d=d.substring(0,c-1)+m,c+=E-1));if(c<k)return!1;for(g=0;c>k;){if(b&&"?"==d.charAt(g))++g;else if("?"!=d.charAt(g+c-1))return!1;--c}for(b=k;0<=--b;)if(c=d.charAt(g+b),"?"!=c&&(k=a.charAt(b),c!=k&&("\u0001"!=c||"?"!=k)))return!1;return!0},
"~S,~S,~B,~B");b.replaceQuotedStrings=c(b,"replaceQuotedStrings",function(a,d,g){for(var b=d.size(),c=0;c<b;c++){var f=d.get(c),h=g.get(c);h.equals(f)||(a=JU.PT.rep(a,'"'+f+'"','"'+h+'"'))}return a},"~S,JU.Lst,JU.Lst");b.replaceStrings=c(b,"replaceStrings",function(a,d,g){for(var b=d.size(),c=0;c<b;c++){var f=d.get(c),h=g.get(c);h.equals(f)||(a=JU.PT.rep(a,f,h))}return a},"~S,JU.Lst,JU.Lst");b.isDigit=c(b,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~S");b.isUpperCase=c(b,"isUpperCase",
function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~S");b.isLowerCase=c(b,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~S");b.isLetter=c(b,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~S");b.isLetterOrDigit=c(b,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~S");b.isWhitespace=c(b,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a},"~S");b.fixPtFloats=c(b,"fixPtFloats",
function(a,d){a.x=Math.round(a.x*d)/d;a.y=Math.round(a.y*d)/d;a.z=Math.round(a.z*d)/d},"JU.T3,~N");b.fixFloat=c(b,"fixFloat",function(a,d){return Math.round(a*d)/d},"~N,~N");b.fixDouble=c(b,"fixDouble",function(a,d){return Math.round(a*d)/d},"~N,~N");b.parseFloatFraction=c(b,"parseFloatFraction",function(a){var d=a.indexOf("/");return 0>d?JU.PT.parseFloat(a):JU.PT.parseFloat(a.substring(0,d))/JU.PT.parseFloat(a.substring(d+1))},"~S");b.tensScale=L(-1,[10,100,1E3,1E4,1E5,1E6]);b.decimalScale=L(-1,
[0.1,0.01,0.001,1E-4,1E-5,1E-6,1E-7,1E-8,1E-9,1E-10,1E-11,1E-12,1E-13,1E-14,1E-15])});s("JU");z=n(function(){this.s=this.sb=null;v(this,arguments)},JU,"SB",null);A(z,function(){this.s=""});z.newN=c(z,"newN",function(){return new JU.SB},"~N");z.newS=c(z,"newS",function(b){var a=new JU.SB;a.s=b;return a},"~S");c(z,"append",function(b){this.s+=b;return this},"~S");c(z,"appendC",function(b){this.s+=b;return this},"~S");c(z,"appendI",function(b){this.s+=b;return this},"~N");c(z,"appendB",function(b){this.s+=
b;return this},"~B");c(z,"appendF",function(b){b=""+b;0>b.indexOf(".")&&0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(z,"appendD",function(b){b=""+b;0>b.indexOf(".")&&0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(z,"appendSB",function(b){this.s+=b.s;return this},"JU.SB");c(z,"appendO",function(b){null!=b&&(this.s+=b.toString());return this},"~O");c(z,"appendCB",function(b,a,d){this.s+=b.slice(a,a+d).join("")},"~A,~N,~N");j(z,"toString",function(){return this.s});c(z,"length",
function(){return this.s.length});c(z,"indexOf",function(b){return this.s.indexOf(b)},"~S");c(z,"charAt",function(b){return this.s.charAt(b)},"~N");c(z,"charCodeAt",function(b){return this.s.charCodeAt(b)},"~N");c(z,"setLength",function(b){this.s=this.s.substring(0,b)},"~N");c(z,"lastIndexOf",function(b){return this.s.lastIndexOf(b)},"~S");c(z,"indexOf2",function(b,a){return this.s.indexOf(b,a)},"~S,~N");c(z,"substring",function(b){return this.s.substring(b)},"~N");c(z,"substring2",function(b,a){return this.s.substring(b,
a)},"~N,~N");c(z,"toBytes",function(b,a){return 0==a?Q(0,0):(0<a?this.substring2(b,b+a):0==b?this.toString():this.substring2(b,this.length()-b)).getBytes("UTF-8")},"~N,~N");c(z,"replace",function(b,a,d){this.s=this.s.substring(0,b)+d+this.s.substring(a)},"~N,~N,~S");c(z,"insert",function(b,a){this.replace(b,b,a)},"~N,~S");s("JU");B(["javajs.api.JSONEncodable"],"JU.T3",null,function(){var b=n(function(){this.z=this.y=this.x=0;v(this,arguments)},JU,"T3",null,[javajs.api.JSONEncodable,java.io.Serializable]);
c(b,"set",function(a,d,g){this.x=a;this.y=d;this.z=g},"~N,~N,~N");c(b,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");c(b,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");c(b,"add2",function(a,d){this.x=a.x+d.x;this.y=a.y+d.y;this.z=a.z+d.z},"JU.T3,JU.T3");c(b,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3");c(b,"distanceSquared",function(a){var d=this.x-a.x,g=this.y-a.y;a=this.z-a.z;return d*d+g*g+a*a},"JU.T3");c(b,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},
"JU.T3");c(b,"sub2",function(a,d){this.x=a.x-d.x;this.y=a.y-d.y;this.z=a.z-d.z},"JU.T3,JU.T3");c(b,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");c(b,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(b,"add3",function(a,d,g){this.x+=a;this.y+=d;this.z+=g},"~N,~N,~N");c(b,"scaleT",function(a){this.x*=a.x;this.y*=a.y;this.z*=a.z},"JU.T3");c(b,"scaleAdd2",function(a,d,g){this.x=a*d.x+g.x;this.y=a*d.y+g.y;this.z=a*d.z+g.z},"~N,JU.T3,JU.T3");c(b,"ave",function(a,d){this.x=(a.x+
d.x)/2;this.y=(a.y+d.y)/2;this.z=(a.z+d.z)/2},"JU.T3,JU.T3");c(b,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");c(b,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(b,"length",function(){return Math.sqrt(this.lengthSquared())});c(b,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(b,"cross",function(a,d){this.set(a.y*d.z-a.z*d.y,a.z*d.x-a.x*d.z,a.x*d.y-a.y*d.x)},"JU.T3,JU.T3");j(b,"hashCode",function(){var a;a=31+JU.T3.floatToIntBits(this.x);
a=31*a+JU.T3.floatToIntBits(this.y);a=31*a+JU.T3.floatToIntBits(this.z);return a^a>>32});b.floatToIntBits=c(b,"floatToIntBits",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");j(b,"equals",function(a){return!y(a,"JU.T3")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");j(b,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});j(b,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+"]"});c(b,"setP",function(a){this.set(a.x,a.y,a.z);return this},"JU.T3");c(b,"putP",function(a){a.set(this.x,
this.y,this.z);return a},"JU.T3")});s("JU");z=n(function(){this.z=this.y=this.x=0;v(this,arguments)},JU,"T3i",null,java.io.Serializable);c(z,"set",function(b,a,d){this.x=b;this.y=a;this.z=d},"~N,~N,~N");c(z,"setT",function(b){this.x=b.x;this.y=b.y;this.z=b.z},"JU.T3i");c(z,"add",function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z},"JU.T3i");c(z,"scaleAdd",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3i,JU.T3i");j(z,"hashCode",function(){return this.x^this.y^this.z});j(z,
"equals",function(b){return!y(b,"JU.T3i")?!1:this.x==b.x&&this.y==b.y&&this.z==b.z},"~O");c(z,"asString",function(){return"("+this.x+", "+this.y+", "+this.z+")"});j(z,"toString",function(){return this.asString()});s("JU");B(["JU.T3"],"JU.T4",null,function(){var b=n(function(){this.w=0;v(this,arguments)},JU,"T4",JU.T3);c(b,"set4",function(a,d,g,b){this.x=a;this.y=d;this.z=g;this.w=b},"~N,~N,~N,~N");c(b,"scale4",function(a){this.scale(a);this.w*=a},"~N");j(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^
JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.w)});j(b,"equals",function(a){return!y(a,"JU.T4")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.w==a.w},"~O");j(b,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+", "+this.w+"}"});j(b,"toJSON",function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"})});s("JU");B(["JU.T3"],"JU.V3",null,function(){var b=I(JU,"V3",JU.T3);b.newV=c(b,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");
b.newVsub=c(b,"newVsub",function(a,d){return JU.V3.new3(a.x-d.x,a.y-d.y,a.z-d.z)},"JU.T3,JU.T3");b.new3=c(b,"new3",function(a,d,g){var b=new JU.V3;b.x=a;b.y=d;b.z=g;return b},"~N,~N,~N");c(b,"angle",function(a){var d=this.y*a.z-this.z*a.y,g=this.z*a.x-this.x*a.z,b=this.x*a.y-this.y*a.x,d=Math.sqrt(d*d+g*g+b*b);return Math.abs(Math.atan2(d,this.dot(a)))},"JU.V3")});s("javajs.api");O(javajs.api,"GenericBinaryDocument",javajs.api.GenericBinaryDocumentReader);s("javajs.api");O(javajs.api,"GenericBinaryDocumentReader");
s("javajs.api");O(javajs.api,"GenericZipTools");s("javajs.api");O(javajs.api,"GenericLineReader");s("javajs.api");O(javajs.api,"GenericCifDataParser");s("javajs.api");z=I(javajs.api,"Interface",null);z.getInterface=c(z,"getInterface",function(b){try{var a=ba._4Name(b);return null==a?null:a.newInstance()}catch(d){if(H(d,Exception))return System.out.println("Interface.java Error creating instance for "+b+": \n"+d),null;throw d;}},"~S");z.getInstanceWithParams=c(z,"getInstanceWithParams",function(b,
a,d){try{return ba._4Name(b).getConstructor(a).newInstance(d)}catch(g){if(H(g,Exception))return System.out.println("Interface.getInterfaceWithParams Error creating instance for "+b+": \n"+g),null;throw g;}},"~S,~A,~A");s("JU");z=n(function(){this.data=null;v(this,arguments)},JU,"BArray",null);A(z,function(b){this.data=b},"~A");j(z,"equals",function(b){if(y(b,"JU.BArray")&&(b=b.data,b.length==this.data.length)){for(var a=0;a<b.length;a++)if(b[a]!=this.data[a])return!1;return!0}return!1},"~O");c(z,
"hashCode",function(){return this.data.hashCode()});j(z,"toString",function(){return String.instantialize(this.data)});s("JU");z=n(function(){this.buf=null;this.ichCurrent=this.cchBuf=0;v(this,arguments)},JU,"LimitedLineReader",null);A(z,function(b,a){b.mark(a+1);this.buf=Y(a,"\x00");this.cchBuf=Math.max(b.read(this.buf,0,a),0);this.ichCurrent=0;b.reset()},"java.io.BufferedReader,~N");c(z,"getHeader",function(b){return 0==b?String.instantialize(this.buf):String.instantialize(this.buf,0,Math.min(this.cchBuf,
b))},"~N");c(z,"readLineWithNewline",function(){for(;this.ichCurrent<this.cchBuf;){for(var b=this.ichCurrent,a=String.fromCharCode(0);this.ichCurrent<this.cchBuf&&"\r"!=(a=this.buf[this.ichCurrent++])&&"\n"!=a;);"\r"==a&&(this.ichCurrent<this.cchBuf&&"\n"==this.buf[this.ichCurrent])&&++this.ichCurrent;a=this.ichCurrent-b;if("#"!=this.buf[b])return String.instantialize(this.buf,b,a)}return""});s("JU");z=n(function(){this.a=null;this.n=this.m=0;S("JU.Matrix.LUDecomp")||JU.Matrix.$Matrix$LUDecomp$();
v(this,arguments)},JU,"Matrix",null,Cloneable);A(z,function(b,a,d){this.a=null==b?R(a,d,0):b;this.m=a;this.n=d},"~A,~N,~N");c(z,"getRowDimension",function(){return this.m});c(z,"getColumnDimension",function(){return this.n});c(z,"getArray",function(){return this.a});c(z,"getArrayCopy",function(){for(var b=R(this.m,this.n,0),a=this.m;0<=--a;)for(var d=this.n;0<=--d;)b[a][d]=this.a[a][d];return b});c(z,"copy",function(){for(var b=new JU.Matrix(null,this.m,this.n),a=b.a,d=this.m;0<=--d;)for(var g=this.n;0<=
--g;)a[d][g]=this.a[d][g];return b});j(z,"clone",function(){return this.copy()});c(z,"getSubmatrix",function(b,a,d,g){for(var l=new JU.Matrix(null,d,g),c=l.a;0<=--d;)for(var f=g;0<=--f;)c[d][f]=this.a[b+d][a+f];return l},"~N,~N,~N,~N");c(z,"getMatrixSelected",function(b,a){for(var d=new JU.Matrix(null,b.length,a),g=d.a,l=b.length;0<=--l;)for(var c=this.a[b[l]],f=a;0<=--f;)g[l][f]=c[f];return d},"~A,~N");c(z,"transpose",function(){for(var b=new JU.Matrix(null,this.n,this.m),a=b.a,d=this.m;0<=--d;)for(var g=
this.n;0<=--g;)a[g][d]=this.a[d][g];return b});c(z,"add",function(b){return this.scaleAdd(b,1)},"JU.Matrix");c(z,"sub",function(b){return this.scaleAdd(b,-1)},"JU.Matrix");c(z,"scaleAdd",function(b,a){for(var d=new JU.Matrix(null,this.m,this.n),g=d.a,l=b.a,c=this.m;0<=--c;)for(var f=this.n;0<=--f;)g[c][f]=l[c][f]*a+this.a[c][f];return d},"JU.Matrix,~N");c(z,"mul",function(b){if(b.m!=this.n)return null;var a=new JU.Matrix(null,this.m,b.n),d=a.a,g=b.a;for(b=b.n;0<=--b;)for(var l=this.m;0<=--l;){for(var c=
this.a[l],f=0,h=this.n;0<=--h;)f+=c[h]*g[h][b];d[l][b]=f}return a},"JU.Matrix");c(z,"inverse",function(){return U(JU.Matrix.LUDecomp,this,null,this.m,this.n).solve(JU.Matrix.identity(this.m,this.m),this.n)});c(z,"trace",function(){for(var b=0,a=Math.min(this.m,this.n);0<=--a;)b+=this.a[a][a];return b});z.identity=c(z,"identity",function(b,a){for(var d=new JU.Matrix(null,b,a),g=d.a,l=Math.min(b,a);0<=--l;)g[l][l]=1;return d},"~N,~N");c(z,"getRotation",function(){return this.getSubmatrix(0,0,this.m-
1,this.n-1)});c(z,"getTranslation",function(){return this.getSubmatrix(0,this.n-1,this.m-1,1)});z.newT=c(z,"newT",function(b,a){return a?new JU.Matrix(x(-1,[R(-1,[b.x]),R(-1,[b.y]),R(-1,[b.z])]),3,1):new JU.Matrix(x(-1,[R(-1,[b.x,b.y,b.z])]),1,3)},"JU.T3,~B");j(z,"toString",function(){for(var b="[\n",a=0;a<this.m;a++){for(var b=b+"  [",d=0;d<this.n;d++)b+=" "+this.a[a][d];b+="]\n"}return b+"]"});z.$Matrix$LUDecomp$=function(){var b=n(function(){X(this,arguments);this.piv=this.LU=null;this.pivsign=
0;v(this,arguments)},JU.Matrix,"LUDecomp",null);A(b,function(a,d){this.LU=this.b$["JU.Matrix"].getArrayCopy();this.piv=F(a,0);for(var g=a;0<=--g;)this.piv[g]=g;this.pivsign=1;for(var b,c=R(a,0),f=0;f<d;f++){for(g=a;0<=--g;)c[g]=this.LU[g][f];for(g=a;0<=--g;){b=this.LU[g];for(var h=0,k=Math.min(g,f);0<=--k;)h+=b[k]*c[k];b[f]=c[g]-=h}b=f;for(g=a;--g>f;)Math.abs(c[g])>Math.abs(c[b])&&(b=g);if(b!=f){for(k=d;0<=--k;)g=this.LU[b][k],this.LU[b][k]=this.LU[f][k],this.LU[f][k]=g;k=this.piv[b];this.piv[b]=
this.piv[f];this.piv[f]=k;this.pivsign=-this.pivsign}if((new Boolean(f<a&0!=this.LU[f][f])).valueOf())for(g=a;--g>f;)this.LU[g][f]/=this.LU[f][f]}},"~N,~N");c(b,"solve",function(a,d){for(var g=0;g<d;g++)if(0==this.LU[g][g])return null;for(var b=a.n,c=a.getMatrixSelected(this.piv,b),f=c.a,h=0;h<d;h++)for(var k=h+1;k<d;k++)for(g=0;g<b;g++)f[k][g]-=f[h][g]*this.LU[k][h];for(h=d;0<=--h;){for(g=b;0<=--g;)f[h][g]/=this.LU[h][h];for(k=h;0<=--k;)for(g=b;0<=--g;)f[k][g]-=f[h][g]*this.LU[k][h]}return c},"JU.Matrix,~N")};
s("JU");B(["JU.P4"],"JU.Quat",["JU.A4","$.M3","$.V3"],function(){var b=n(function(){this.q3=this.q2=this.q1=this.q0=0;this.mat=null;v(this,arguments)},JU,"Quat",null);A(b,function(){this.q0=1});b.newQ=c(b,"newQ",function(a){var d=new JU.Quat;d.set(a);return d},"JU.Quat");b.newVA=c(b,"newVA",function(a,d){var g=new JU.Quat;g.setTA(a,d);return g},"JU.T3,~N");b.newM=c(b,"newM",function(a){var d=new JU.Quat;d.setM(JU.M3.newM3(a));return d},"JU.M3");b.newAA=c(b,"newAA",function(a){var d=new JU.Quat;d.setAA(a);
return d},"JU.A4");b.newP4=c(b,"newP4",function(a){var d=new JU.Quat;d.setP4(a);return d},"JU.P4");b.new4=c(b,"new4",function(a,d,g,b){var c=new JU.Quat;if(-1>b)return c.q0=-1,c;if(1<b)return c.q0=1,c;c.q0=b;c.q1=a;c.q2=d;c.q3=g;return c},"~N,~N,~N,~N");c(b,"set",function(a){this.q0=a.q0;this.q1=a.q1;this.q2=a.q2;this.q3=a.q3},"JU.Quat");c(b,"setP4",function(a){var d=null==a?0:a.distance4(JU.Quat.qZero);0==d?this.q0=1:(this.q0=a.w/d,this.q1=a.x/d,this.q2=a.y/d,this.q3=a.z/d)},"JU.P4");c(b,"setTA",
function(a,d){if(0==a.x&&0==a.y&&0==a.z)this.q0=1;else{var g=Math.sin(0.017453292519943295*(d/2))/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);this.q0=Math.cos(0.017453292519943295*(d/2));this.q1=a.x*g;this.q2=a.y*g;this.q3=a.z*g}},"JU.T3,~N");c(b,"setAA",function(a){a=JU.A4.newAA(a);0==a.angle&&(a.y=1);this.setM((new JU.M3).setAA(a))},"JU.A4");c(b,"setM",function(a){this.mat=a;var d=a.m00+a.m11+a.m22,g,b,c;0.5<=d?(d=Math.sqrt(1+d),g=(a.m21-a.m12)/d,b=(a.m02-a.m20)/d,c=(a.m10-a.m01)/d):0.5<=(g=a.m00+a.m00-
d)?(g=Math.sqrt(1+g),d=(a.m21-a.m12)/g,b=(a.m10+a.m01)/g,c=(a.m20+a.m02)/g):0.5<=(g=a.m11+a.m11-d)||a.m11>a.m22?(b=Math.sqrt(1+g),d=(a.m02-a.m20)/b,g=(a.m10+a.m01)/b,c=(a.m21+a.m12)/b):(c=Math.sqrt(1+a.m22+a.m22-d),d=(a.m10-a.m01)/c,g=(a.m20+a.m02)/c,b=(a.m21+a.m12)/c);this.q0=0.5*d;this.q1=0.5*g;this.q2=0.5*b;this.q3=0.5*c},"JU.M3");c(b,"setRef",function(a){null==a?this.mul(this.getFixFactor()):0<=this.dot(a)||(this.q0*=-1,this.q1*=-1,this.q2*=-1,this.q3*=-1)},"JU.Quat");b.getQuaternionFrame=c(b,
"getQuaternionFrame",function(a,d,g){d=JU.V3.newV(d);g=JU.V3.newV(g);null!=a&&(d.sub(a),g.sub(a));return JU.Quat.getQuaternionFrameV(d,g,null,!1)},"JU.P3,JU.T3,JU.T3");b.getQuaternionFrameV=c(b,"getQuaternionFrameV",function(a,d,g,b){null==g&&(g=new JU.V3,g.cross(a,d),b&&a.cross(d,g));d=new JU.V3;d.cross(g,a);a.normalize();d.normalize();g.normalize();b=new JU.M3;b.setColumnV(0,a);b.setColumnV(1,d);b.setColumnV(2,g);return JU.Quat.newM(b)},"JU.V3,JU.V3,JU.V3,~B");c(b,"getMatrix",function(){null==this.mat&&
this.setMatrix();return this.mat});c(b,"setMatrix",function(){this.mat=new JU.M3;this.mat.m00=this.q0*this.q0+this.q1*this.q1-this.q2*this.q2-this.q3*this.q3;this.mat.m01=2*this.q1*this.q2-2*this.q0*this.q3;this.mat.m02=2*this.q1*this.q3+2*this.q0*this.q2;this.mat.m10=2*this.q1*this.q2+2*this.q0*this.q3;this.mat.m11=this.q0*this.q0-this.q1*this.q1+this.q2*this.q2-this.q3*this.q3;this.mat.m12=2*this.q2*this.q3-2*this.q0*this.q1;this.mat.m20=2*this.q1*this.q3-2*this.q0*this.q2;this.mat.m21=2*this.q2*
this.q3+2*this.q0*this.q1;this.mat.m22=this.q0*this.q0-this.q1*this.q1-this.q2*this.q2+this.q3*this.q3});c(b,"add",function(a){return JU.Quat.newVA(this.getNormal(),this.getTheta()+a)},"~N");c(b,"mul",function(a){return 1==a?JU.Quat.new4(this.q1,this.q2,this.q3,this.q0):JU.Quat.newVA(this.getNormal(),this.getTheta()*a)},"~N");c(b,"mulQ",function(a){return JU.Quat.new4(this.q0*a.q1+this.q1*a.q0+this.q2*a.q3-this.q3*a.q2,this.q0*a.q2+this.q2*a.q0+this.q3*a.q1-this.q1*a.q3,this.q0*a.q3+this.q3*a.q0+
this.q1*a.q2-this.q2*a.q1,this.q0*a.q0-this.q1*a.q1-this.q2*a.q2-this.q3*a.q3)},"JU.Quat");c(b,"divLeft",function(a){return this.inv().mulQ(a)},"JU.Quat");c(b,"dot",function(a){return this.q0*a.q0+this.q1*a.q1+this.q2*a.q2+this.q3*a.q3},"JU.Quat");c(b,"inv",function(){return JU.Quat.new4(-this.q1,-this.q2,-this.q3,this.q0)});c(b,"negate",function(){return JU.Quat.new4(-this.q1,-this.q2,-this.q3,-this.q0)});c(b,"getFixFactor",function(){return 0>this.q0||0==this.q0&&(0>this.q1||0==this.q1&&(0>this.q2||
0==this.q2&&0>this.q3))?-1:1});c(b,"getVector",function(a){return this.getVectorScaled(a,1)},"~N");c(b,"getVectorScaled",function(a,d){if(-1==a)return d*=this.getFixFactor(),JU.V3.new3(this.q1*d,this.q2*d,this.q3*d);null==this.mat&&this.setMatrix();var g=new JU.V3;this.mat.getColumnV(a,g);1!=d&&g.scale(d);return g},"~N,~N");c(b,"getNormal",function(){var a=JU.Quat.getRawNormal(this);a.scale(this.getFixFactor());return a});b.getRawNormal=c(b,"getRawNormal",function(a){a=JU.V3.new3(a.q1,a.q2,a.q3);
if(0==a.length())return JU.V3.new3(0,0,1);a.normalize();return a},"JU.Quat");c(b,"getTheta",function(){return 360*Math.acos(Math.abs(this.q0))/3.141592653589793});c(b,"getThetaRadians",function(){return 2*Math.acos(Math.abs(this.q0))});c(b,"getNormalDirected",function(a){var d=this.getNormal();0>d.x*a.x+d.y*a.y+d.z*a.z&&d.scale(-1);return d},"JU.V3");c(b,"get3dProjection",function(a){a.set(this.q1,this.q2,this.q3);return a},"JU.V3");c(b,"getThetaDirected",function(a){var d=this.getTheta(),g=this.getNormal();
0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(g.scale(-1),d=-d);a.set4(g.x,g.y,g.z,d);return a},"JU.P4");c(b,"getThetaDirectedV",function(a){var d=this.getTheta(),g=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(g.scale(-1),d=-d);return d},"JU.V3");c(b,"toPoint4f",function(){return JU.P4.new4(this.q1,this.q2,this.q3,this.q0)});c(b,"toAxisAngle4f",function(){var a=2*Math.acos(Math.abs(this.q0)),d=Math.sin(a/2),g=this.getNormal();0>d&&(g.scale(-1),a=3.141592653589793-a);return JU.A4.newVA(g,a)});
c(b,"transform2",function(a,d){null==this.mat&&this.setMatrix();this.mat.rotate2(a,d);return d},"JU.T3,JU.T3");c(b,"leftDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.inv().mulQ(a)},"JU.Quat");c(b,"rightDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.mulQ(a.inv())},"JU.Quat");j(b,"toString",function(){return"{"+this.q1+" "+this.q2+" "+this.q3+" "+this.q0+"}"});c(b,"div",function(a){return this.mulQ(a.inv())},"JU.Quat");b.arrayDiv=c(b,"arrayDiv",function(a,d,g,b){var c;
if(null==a||null==d||0==(c=Math.min(a.length,d.length)))return null;0<g&&c>g&&(c=g);g=Array(c);for(var f=0;f<c;f++){if(null==a[f]||null==d[f])return null;g[f]=b?a[f].divLeft(d[f]):a[f].div(d[f])}return g},"~A,~A,~N,~B");b.sphereMean=c(b,"sphereMean",function(a,d,g){if(null==a||0==a.length)return new JU.Quat;null==d&&(d=L(1,0));if(1==a.length)return d[0]=0,JU.Quat.newQ(a[0]);for(var b=3.4028235E38,c=3.4028235E38,f=JU.Quat.simpleAverage(a);b>g&&0!=c;)f=JU.Quat.newMean(a,f),d[0]=JU.Quat.stdDev(a,f),
b=Math.abs(d[0]-c),c=d[0];return f},"~A,~A,~N");b.simpleAverage=c(b,"simpleAverage",function(a){var d=JU.V3.new3(0,0,1),g=a[0].getNormal();d.add(g);for(var b=a.length;0<=--b;)d.add(a[b].getNormalDirected(d));d.sub(g);d.normalize();for(var c=0,b=a.length;0<=--b;)c+=Math.abs(a[b].get3dProjection(g).dot(d));0!=c&&d.scale(c/a.length);c=Math.sqrt(1-d.lengthSquared());Float.isNaN(c)&&(c=0);return JU.Quat.newP4(JU.P4.new4(d.x,d.y,d.z,c))},"~A");b.newMean=c(b,"newMean",function(a,d){for(var g=new JU.V3,b,
c,f=a.length;0<=--f;)b=a[f],c=b.div(d),b=c.getNormal(),b.scale(c.getTheta()),g.add(b);g.scale(1/a.length);return JU.Quat.newVA(g,g.length()).mulQ(d)},"~A,JU.Quat");b.stdDev=c(b,"stdDev",function(a,d){for(var g=0,b=a.length,c=b;0<=--c;)var f=a[c].div(d).getTheta(),g=g+f*f;return Math.sqrt(g/b)},"~A,JU.Quat");c(b,"getEulerZYZ",function(){var a,d,g;if(0==this.q1&&0==this.q2)return a=this.getTheta(),L(-1,[0>this.q3?-a:a,0,0]);a=Math.atan2(2*(this.q2*this.q3+this.q0*this.q1),2*(-this.q1*this.q3+this.q0*
this.q2));d=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);g=Math.atan2(2*(this.q2*this.q3-this.q0*this.q1),2*(this.q0*this.q2+this.q1*this.q3));return L(-1,[a/0.017453292519943295,d/0.017453292519943295,g/0.017453292519943295])});c(b,"getEulerZXZ",function(){var a,d,g;if(0==this.q1&&0==this.q2)return a=this.getTheta(),L(-1,[0>this.q3?-a:a,0,0]);a=Math.atan2(2*(this.q1*this.q3-this.q0*this.q2),2*(this.q0*this.q1+this.q2*this.q3));d=Math.acos(this.q3*this.q3-this.q2*this.q2-
this.q1*this.q1+this.q0*this.q0);g=Math.atan2(2*(this.q1*this.q3+this.q0*this.q2),2*(-this.q2*this.q3+this.q0*this.q1));return L(-1,[a/0.017453292519943295,d/0.017453292519943295,g/0.017453292519943295])});b.qZero=new JU.P4});s("JU");B(["java.io.BufferedReader","javajs.api.GenericLineReader"],"JU.Rdr","java.io.BufferedInputStream $.ByteArrayInputStream $.InputStreamReader $.StringReader JU.AU $.Base64 $.Encoding $.SB".split(" "),function(){var b=n(function(){this.reader=null;v(this,arguments)},JU,
"Rdr",null,javajs.api.GenericLineReader);A(b,function(a){this.reader=a},"java.io.BufferedReader");j(b,"readNextLine",function(){return this.reader.readLine()});b.readCifData=c(b,"readCifData",function(a,g,b){a.set(null,g,!1);return null==b?a.getAllCifData():a.getAllCifDataType(b)},"javajs.api.GenericCifDataParser,java.io.BufferedReader,~A");b.fixUTF=c(b,"fixUTF",function(a){var g=JU.Rdr.getUTFEncoding(a);if(g!==JU.Encoding.NONE)try{var b=String.instantialize(a,g.name().$replace("_","-"));switch(g){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:b=
b.substring(1)}return b}catch(c){if(H(c,"java.io.UnsupportedEncodingException"))System.out.println(c);else throw c;}return String.instantialize(a)},"~A");b.getUTFEncoding=c(b,"getUTFEncoding",function(a){return 3<=a.length&&239==(a[0]&255)&&187==(a[1]&255)&&191==(a[2]&255)?JU.Encoding.UTF8:4<=a.length&&0==(a[0]&255)&&0==(a[1]&255)&&254==(a[2]&255)&&255==(a[3]&255)?JU.Encoding.UTF_32BE:4<=a.length&&255==(a[0]&255)&&254==(a[1]&255)&&0==(a[2]&255)&&0==(a[3]&255)?JU.Encoding.UTF_32LE:2<=a.length&&255==
(a[0]&255)&&254==(a[1]&255)?JU.Encoding.UTF_16LE:2<=a.length&&254==(a[0]&255)&&255==(a[1]&255)?JU.Encoding.UTF_16BE:JU.Encoding.NONE},"~A");b.getUTFEncodingForStream=c(b,"getUTFEncodingForStream",function(a){a.resetStream();var g=Q(4,0);g[3]=1;try{a.mark(5)}catch(b){if(H(b,Exception))return JU.Encoding.NONE;throw b;}a.read(g,0,4);a.reset();return JU.Rdr.getUTFEncoding(g)},"java.io.BufferedInputStream");b.isBase64=c(b,"isBase64",function(a){return 0==a.indexOf(";base64,")},"JU.SB");b.isCompoundDocumentS=
c(b,"isCompoundDocumentS",function(a){return JU.Rdr.isCompoundDocumentB(JU.Rdr.getMagic(a,8))},"java.io.InputStream");b.isCompoundDocumentB=c(b,"isCompoundDocumentB",function(a){return 8<=a.length&&208==(a[0]&255)&&207==(a[1]&255)&&17==(a[2]&255)&&224==(a[3]&255)&&161==(a[4]&255)&&177==(a[5]&255)&&26==(a[6]&255)&&225==(a[7]&255)},"~A");b.isBZip2S=c(b,"isBZip2S",function(a){return JU.Rdr.isBZip2B(JU.Rdr.getMagic(a,3))},"java.io.InputStream");b.isGzipS=c(b,"isGzipS",function(a){return JU.Rdr.isGzipB(JU.Rdr.getMagic(a,
2))},"java.io.InputStream");b.isBZip2B=c(b,"isBZip2B",function(a){return null!=a&&3<=a.length&&66==(a[0]&255)&&90==(a[1]&255)&&104==(a[2]&255)},"~A");b.isGzipB=c(b,"isGzipB",function(a){return null!=a&&2<=a.length&&31==(a[0]&255)&&139==(a[1]&255)},"~A");b.isPickleS=c(b,"isPickleS",function(a){return JU.Rdr.isPickleB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");b.isPickleB=c(b,"isPickleB",function(a){return null!=a&&2<=a.length&&125==(a[0]&255)&&113==(a[1]&255)},"~A");b.isMessagePackS=c(b,"isMessagePackS",
function(a){return JU.Rdr.isMessagePackB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");b.isMessagePackB=c(b,"isMessagePackB",function(a){var g;return null!=a&&1<=a.length&&(222==(g=a[0]&255)||128==(g&224)&&80!=a[1])},"~A");b.isPngZipStream=c(b,"isPngZipStream",function(a){return JU.Rdr.isPngZipB(JU.Rdr.getMagic(a,55))},"java.io.InputStream");b.isPngZipB=c(b,"isPngZipB",function(a){return 0==a[50]&&80==a[51]&&78==a[52]&&71==a[53]&&74==a[54]},"~A");b.isZipS=c(b,"isZipS",function(a){return JU.Rdr.isZipB(JU.Rdr.getMagic(a,
4))},"java.io.InputStream");b.isZipB=c(b,"isZipB",function(a){return 4<=a.length&&80==a[0]&&75==a[1]&&3==a[2]&&4==a[3]},"~A");b.getMagic=c(b,"getMagic",function(a,g){var b=264<g?Q(g,0):null==JU.Rdr.b264?JU.Rdr.b264=Q(265,0):JU.Rdr.b264;a.resetStream();try{b[264]=-1,a.mark(g+1),a.read(b,0,g)<g&&(b[0]=b[264]=0)}catch(c){if(!H(c,"java.io.IOException"))throw c;}try{a.reset()}catch(f){if(!H(f,"java.io.IOException"))throw f;}return b},"java.io.InputStream,~N");b.guessMimeTypeForBytes=c(b,"guessMimeTypeForBytes",
function(a){switch(2>a.length?-1:a[1]){case 0:return"image/jpg";case 73:return"image/gif";case 77:return"image/BMP";case 80:return"image/png";default:return"image/unknown"}},"~A");b.getBIS=c(b,"getBIS",function(a){return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(a))},"~A");b.getBR=c(b,"getBR",function(a){return new java.io.BufferedReader(new java.io.StringReader(a))},"~S");b.getUnzippedInputStream=c(b,"getUnzippedInputStream",function(a,g){for(;JU.Rdr.isGzipS(g);)g=new java.io.BufferedInputStream(a.newGZIPInputStream(g));
return g},"javajs.api.GenericZipTools,java.io.BufferedInputStream");b.getUnzippedInputStreamBZip2=c(b,"getUnzippedInputStreamBZip2",function(a,g){for(;JU.Rdr.isBZip2S(g);)g=new java.io.BufferedInputStream(a.newBZip2InputStream(g));return g},"javajs.api.GenericZipTools,java.io.BufferedInputStream");b.getBytesFromSB=c(b,"getBytesFromSB",function(a){return JU.Rdr.isBase64(a)?JU.Base64.decodeBase64(a.substring(8)):a.toBytes(0,-1)},"JU.SB");b.getStreamAsBytes=c(b,"getStreamAsBytes",function(a,g){for(var b=
Q(1024,0),c=null==g?Q(4096,0):null,f=0,h=0;0<(f=a.read(b,0,1024));)h+=f,null==g?(h>=c.length&&(c=JU.AU.ensureLengthByte(c,2*h)),System.arraycopy(b,0,c,h-f,f)):g.write(b,0,f);a.close();return null==g?JU.AU.arrayCopyByte(c,h):h+" bytes"},"java.io.BufferedInputStream,JU.OC");b.getBufferedReader=c(b,"getBufferedReader",function(a,g){if(JU.Rdr.getUTFEncodingForStream(a)===JU.Encoding.NONE)return new JU.Rdr.StreamReader(a,g);var b=JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return JU.Rdr.getBR(null==g?
JU.Rdr.fixUTF(b):String.instantialize(b,g))},"java.io.BufferedInputStream,~S");b.getLimitedStreamBytes=c(b,"getLimitedStreamBytes",function(a,g){var b=0<g&&1024>g?g:1024,c=Q(b,0),f=Q(0>g?4096:g,0),h=0,k=0;for(0>g&&(g=2147483647);k<g&&0<(h=a.read(c,0,b));)k+=h,k>f.length&&(f=JU.AU.ensureLengthByte(f,2*k)),System.arraycopy(c,0,f,k-h,h),2147483647!=g&&k+b>f.length&&(b=f.length-k);if(k==f.length)return f;c=Q(k,0);System.arraycopy(f,0,c,0,k);return c},"java.io.InputStream,~N");b.streamToUTF8String=c(b,
"streamToUTF8String",function(a){var g=Array(1);try{JU.Rdr.readAllAsString(JU.Rdr.getBufferedReader(a,"UTF-8"),-1,!0,g,0)}catch(b){if(!H(b,"java.io.IOException"))throw b;}return g[0]},"java.io.BufferedInputStream");b.readAllAsString=c(b,"readAllAsString",function(a,g,b,c,f){try{var h=JU.SB.newN(8192),k;if(0>g){if(k=a.readLine(),b||null!=k&&0>k.indexOf("\x00")&&(4!=k.length||65533!=k.charAt(0).charCodeAt(0)||1!=k.indexOf("PNG")))for(h.append(k).appendC("\n");null!=(k=a.readLine());)h.append(k).appendC("\n")}else{b=
0;for(var m;b<g&&null!=(k=a.readLine());){if(g-b<(m=k.length)+1)k=k.substring(0,g-b-1);h.append(k).appendC("\n");b+=m+1}}a.close();c[f]=h.toString();return!0}catch(E){if(H(E,Exception))return c[f]=E.toString(),!1;throw E;}},"java.io.BufferedReader,~N,~B,~A,~N");b.getPngZipPointAndCount=c(b,"getPngZipPointAndCount",function(a,g){a.mark(75);try{var b=JU.Rdr.getLimitedStreamBytes(a,74);a.reset();for(var c=0,f=64,h=1;54<--f;h*=10)c+=(b[f]-48)*h;for(var k=0,f=74,h=1;64<--f;h*=10)k+=(b[f]-48)*h;g[0]=c;
g[1]=k}catch(m){g[1]=0}},"java.io.BufferedInputStream,~A");b.getPngZipStream=c(b,"getPngZipStream",function(a,g){if(!JU.Rdr.isPngZipStream(a))return a;var b=Q(0,0);a.mark(75);try{var c=F(2,0);JU.Rdr.getPngZipPointAndCount(a,c);if(0!=c[1]){for(var f=c[0];0<f;)f-=a.skip(f);if(!g)return a;b=JU.Rdr.getLimitedStreamBytes(a,c[1])}}catch(h){}finally{try{g&&a.close()}catch(k){if(!H(k,Exception))throw k;}}return JU.Rdr.getBIS(b)},"java.io.BufferedInputStream,~B");b.getZipRoot=c(b,"getZipRoot",function(a){var g=
a.indexOf("|");return 0>g?a:a.substring(0,g)},"~S");b.isTar=c(b,"isTar",function(a){a=JU.Rdr.getMagic(a,264);return-1==a[264]&&117==(a[257]&255)&&115==(a[258]&255)&&116==(a[259]&255)&&97==(a[260]&255)&&114==(a[261]&255)},"java.io.BufferedInputStream");b.streamToBytes=c(b,"streamToBytes",function(a){var g=JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return g},"java.io.InputStream");b.streamToString=c(b,"streamToString",function(a){return String.instantialize(JU.Rdr.streamToBytes(a))},"java.io.InputStream");
b.isBinary=c(b,"isBinary",function(a,g){var b=JU.Rdr.getMagic(a,g);if(-1==JU.Rdr.b264[264])for(var c=0;c<g;c++)if(9>b[c])return!0;return!1},"java.io.BufferedInputStream,~N");var a=n(function(){this.stream=null;v(this,arguments)},JU.Rdr,"StreamReader",java.io.BufferedReader);A(a,function(a,g){M(this,JU.Rdr.StreamReader,[new java.io.InputStreamReader(a,null==g?"UTF-8":g)]);this.stream=a},"java.io.BufferedInputStream,~S");c(a,"getStream",function(){try{this.stream.reset()}catch(a){if(!H(a,"java.io.IOException"))throw a;
}return this.stream});b.b264=null});s("JU");z=n(function(){this.z=this.y=this.x=0;v(this,arguments)},JU,"T3d",null,java.io.Serializable);c(z,"set",function(b,a,d){this.x=b;this.y=a;this.z=d},"~N,~N,~N");c(z,"setA",function(b){this.x=b[0];this.y=b[1];this.z=b[2]},"~A");c(z,"setT",function(b){this.x=b.x;this.y=b.y;this.z=b.z},"JU.T3d");c(z,"add2",function(b,a){this.x=b.x+a.x;this.y=b.y+a.y;this.z=b.z+a.z},"JU.T3d,JU.T3d");c(z,"add",function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z},"JU.T3d");c(z,"sub2",
function(b,a){this.x=b.x-a.x;this.y=b.y-a.y;this.z=b.z-a.z},"JU.T3d,JU.T3d");c(z,"sub",function(b){this.x-=b.x;this.y-=b.y;this.z-=b.z},"JU.T3d");c(z,"scale",function(b){this.x*=b;this.y*=b;this.z*=b},"~N");c(z,"scaleAdd",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3d,JU.T3d");c(z,"scaleAdd2",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3d,JU.T3d");j(z,"hashCode",function(){var b=JU.T3d.doubleToLongBits0(this.x),a=JU.T3d.doubleToLongBits0(this.y),
d=JU.T3d.doubleToLongBits0(this.z);return b^b>>32^a^a>>32^d^d>>32});z.doubleToLongBits0=c(z,"doubleToLongBits0",function(b){return 0==b?0:Double.doubleToLongBits(b)},"~N");j(z,"equals",function(b){return!y(b,"JU.T3d")?!1:this.x==b.x&&this.y==b.y&&this.z==b.z},"~O");j(z,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});s("JU");B(["JU.T3d"],"JU.V3d",null,function(){var b=I(JU,"V3d",JU.T3d);c(b,"cross",function(a,d){this.set(a.y*d.z-a.z*d.y,a.z*d.x-a.x*d.z,a.x*d.y-a.y*d.x)},"JU.V3d,JU.V3d");
c(b,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(b,"angle",function(a){var d=this.y*a.z-this.z*a.y,g=this.z*a.x-this.x*a.z,b=this.x*a.y-this.y*a.x,d=Math.sqrt(d*d+g*g+b*b);return Math.abs(Math.atan2(d,this.dot(a)))},"JU.V3d");c(b,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.V3d");c(b,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(b,"length",function(){return Math.sqrt(this.lengthSquared())})});s("J.adapter.readers.molxyz");
B(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.MolReader","java.util.Hashtable JU.BS $.Lst $.PT J.adapter.smarter.Atom J.api.JmolAdapter JU.Logger".split(" "),function(){var b=n(function(){this.haveAtomSerials=!1;this.allow2D=!0;this.iatom0=0;this.vr=null;this.atomCount=0;this.bsDeleted=this.atomData=null;this.is3D=this.fixN=this.haveNonzeroZ=!1;this.nC=this.nH=this.nDouble=0;v(this,arguments)},J.adapter.readers.molxyz,"MolReader",J.adapter.smarter.AtomSetCollectionReader);
j(b,"initializeReader",function(){this.fixN=this.checkFilterKey("FIXN")});j(b,"checkLine",function(){var a=this.line.startsWith("$MDL");if(a){if(this.discardLinesUntilStartsWith("$HDR"),this.rd(),null==this.line)return JU.Logger.warn("$HDR not found in MDL RG file"),this.continuing=!1}else if(this.line.equals("M  END"))return!0;if(this.doGetModel(++this.modelNumber,null)&&(this.iatom0=this.asc.ac,this.processMolSdHeader(),this.processCtab(a),this.vr=null,this.isLastModel(this.modelNumber)))return this.continuing=
!1;null!=this.line&&0>this.line.indexOf("$$$$")&&this.discardLinesUntilStartsWith("$$$$");return!0});j(b,"finalizeSubclassReader",function(){this.finalizeReaderMR()});c(b,"finalizeReaderMR",function(){this.fixN&&this.addJmolScript("{search('[Nv4+0,nv4+0]')}.formalCharge=1;{search('{[Ov1-0]}[Nv4+1,nv4+1]')}.formalCharge=-1;");this.check2D3D();null!=this.bsDeleted&&this.asc.getBSAtoms(-1).andNot(this.bsDeleted);this.isTrajectory=!1;this.finalizeReaderASCR()});c(b,"check2D3D",function(){this.haveNonzeroZ?
this.is2D&&(this.is2D=this.optimize2D=!1):!this.is2D&&!this.is3D&&(0<this.nC&&0==this.nH&&0!=this.nDouble)&&(this.is2D=!0);if(this.is2D){if(!this.allow2D)throw new Exception("File is 2D, not 3D");this.set2D()}});c(b,"processMolSdHeader",function(){var a=this.line.trim();this.asc.setCollectionName(a);var d=this.line+"\n";this.rd();if(null!=this.line){var d=d+(this.line+"\n"),g=22<=this.line.length?this.line.substring(20,22):null;this.is3D="3D".equals(g);this.is2D=!this.is3D&&("2D".equals(g)||this.line.startsWith("JME "));
this.rd();null!=this.line&&(this.line=this.line.trim(),d+=this.line+"\n",JU.Logger.info(d),this.checkCurrentLineForScript(),this.asc.setInfo("fileHeader",d),this.newAtomSet(a))}});c(b,"processCtab",function(a){a&&this.discardLinesUntilStartsWith("$CTAB");null!=this.rd()&&(0<=this.line.indexOf("V3000")?(this.optimize2D=this.is2D&&!this.noHydrogens,this.vr=this.getInterface("J.adapter.readers.molxyz.V3000Rdr").set(this),this.discardLinesUntilContains("COUNTS"),this.vr.readAtomsAndBonds(this.getTokens())):
this.readAtomsAndBonds(this.parseIntRange(this.line,0,3),this.parseIntRange(this.line,3,6)),this.applySymmetryAndSetTrajectory())},"~B");c(b,"readAtomsAndBonds",function(a,d){this.atomCount=a;for(var g=0;g<a;++g){this.rd();var b=this.line.length,c,f,h,k,m=0,E=0,j=-2147483648;f=this.parseFloatRange(this.line,0,10);h=this.parseFloatRange(this.line,10,20);k=this.parseFloatRange(this.line,20,30);34>b?c=this.line.substring(31).trim():(c=this.line.substring(31,34).trim(),c.equals("H1")&&(c="H",E=1),39<=
b&&(b=this.parseIntRange(this.line,36,39),1<=b&&7>=b&&(m=4-b),b=this.parseIntRange(this.line,34,36),0!=b&&(-3<=b&&4>=b)&&(E=J.api.JmolAdapter.getNaturalIsotope(J.api.JmolAdapter.getElementNumber(c))+b),-2147483648==j&&this.haveAtomSerials&&(j=g+1)));this.addMolAtom(j,E,c,m,f,h,k)}this.asc.setModelInfoForSet("dimension",this.is2D?"2D":"3D",this.asc.iSet);this.rd();this.line.startsWith("V  ")&&this.readAtomValues();0==d&&this.asc.setNoAutoBond();for(g=0;g<d;++g)0<g&&this.rd(),h=0,c=this.line.substring(0,
3).trim(),f=this.line.substring(3,6).trim(),k=this.parseIntRange(this.line,6,9),1==k&&12<=this.line.length&&(h=this.parseIntRange(this.line,9,12)),0!=h&&!this.is3D&&(this.is2D=!0),k=this.fixOrder(k,h),this.haveAtomSerials?this.asc.addNewBondFromNames(c,f,k):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(c)-1,this.iatom0+this.parseIntStr(f)-1,k);g=new java.util.Hashtable;c=new JU.Lst;for(this.rd();null!=this.line&&0!=this.line.indexOf("$$$$");)0==this.line.indexOf(">")?this.readMolData(g,
c):this.line.startsWith("M  ISO")?this.readIsotopes():this.line.startsWith("M  CHG")?this.readCharges():this.rd();null!=this.atomData&&(f=g.get("atom_value_name"),g.put(null==f?"atom_values":f.toString(),this.atomData));g.isEmpty()||(this.asc.setCurrentModelInfo("molDataKeys",c),this.asc.setCurrentModelInfo("molData",g))},"~N,~N");c(b,"readAtomValues",function(){this.atomData=Array(this.atomCount);for(var a=this.atomData.length;0<=--a;)this.atomData[a]="";for(;0==this.line.indexOf("V  ");){a=this.parseIntAt(this.line,
3);if(1>a||a>this.atomCount){JU.Logger.error("V  nnn does not evalute to a valid atom number: "+a);break}var d=this.line.substring(6).trim();this.atomData[a-1]=d;this.rd()}});c(b,"readIsotopes",function(){try{for(var a=this.parseIntAt(this.line,6),d=this.asc.getLastAtomSetAtomIndex(),g=0,b=9;g<a;g++){var c=this.parseIntAt(this.line,b),f=this.asc.atoms[c+d-1],h=this.parseIntAt(this.line,b+4),b=b+8,k=JU.PT.replaceAllCharacters(f.elementSymbol,"0123456789","");17==h&&k.equals("C")?f.elementSymbol="N":
5==h&&k.equals("H")?this.deleteAtom(f):f.elementSymbol=""+h+k}}catch(m){}this.rd()});c(b,"readCharges",function(){try{for(var a=this.parseIntAt(this.line,6),d=this.asc.getLastAtomSetAtomIndex(),g=this.asc.ac;--g>=d;)this.asc.atoms[g].formalCharge=0;for(var g=0,b=9;g<a;g++,b+=8)this.asc.atoms[this.parseIntAt(this.line,b)+d-1].formalCharge=this.parseIntAt(this.line,b+4)}catch(c){}this.rd()});c(b,"deleteAtom",function(a){null==this.bsDeleted&&(this.bsDeleted=new JU.BS);this.bsDeleted.set(a.index)},"J.adapter.smarter.Atom");
c(b,"readMolData",function(a,d){for(var g=this.asc.atoms,b=JU.PT.trim(this.line,"> <").toLowerCase(),c="",f=null;null!=this.rd()&&!this.line.equals("$$$$")&&0<this.line.length;)c+=81==this.line.length&&"+"==this.line.charAt(80)?this.line.substring(0,80):this.line+"\n";c=JU.PT.trim(c,"\n");JU.Logger.info(b+":"+JU.PT.esc(c));a.put(b,c);d.addLast(b);var h=0;if(b.toUpperCase().contains("_PARTIAL_CHARGES")){try{for(var f=JU.PT.parseFloatArray(c),k=this.asc.getLastAtomSetAtomIndex(),m=this.asc.ac;k<m;k++)g[k].partialCharge=
0;for(var E=0,k=D(f[E++]);0<=--k;){var j=D(f[E++])+this.iatom0-1,q=f[E++];g[j].partialCharge=q;h++}}catch(r){k=this.asc.getLastAtomSetAtomIndex();for(m=this.asc.ac;k<m;k++)g[k].partialCharge=0;JU.Logger.error("error reading "+b+" field -- partial charges cleared")}JU.Logger.info(h+" partial charges read")}else if(b.toUpperCase().contains("ATOM_NAMES")){h=0;try{for(var u=JU.PT.getTokens(c),E=0,k=this.parseIntStr(u[E++]);0<=--k;){for(var C;-2147483648==(C=this.parseIntStr(u[E++])););var j=C+this.iatom0-
1,G=u[E++];G.equals(".")||(g[j].atomName=G);h++}}catch(N){JU.Logger.error("error reading "+b+" field")}JU.Logger.info(h+" atom names read")}},"java.util.Map,JU.Lst");c(b,"addMolAtom",function(a,d,g,b,c,f,h){"H".equals(g)?this.nH++:"C".equals(g)&&this.nC++;this.haveNonzeroZ=(new Boolean(this.haveNonzeroZ|0.001<Math.abs(h))).valueOf();switch(d){case 0:break;case 1:g="1H";break;case 2:g="2H";break;case 3:g="3H";break;default:g=d+g}d=new J.adapter.smarter.Atom;d.elementSymbol=g;d.formalCharge=b;this.setAtomCoordXYZ(d,
c,f,h);-2147483648==a?this.asc.addAtom(d):(this.haveAtomSerials=!0,d.atomSerial=a,this.asc.addAtomWithMappedSerialNumber(d));return d},"~N,~N,~S,~N,~N,~N,~N");c(b,"fixOrder",function(a,d){switch(a){default:case 0:case -10:return 1;case 1:switch(d){case 1:return this.is2D=!0,1025;case 3:case 6:return this.is2D=!0,1041;case 2:case 4:return this.is2D=!0,1057}break;case 2:case 3:this.nDouble++;break;case 4:return 515;case 5:return 66;case 6:return 513;case 7:return 514;case 8:case 9:return 33;case 14:return 4;
case 15:return 5;case 16:return 6}return a},"~N,~N");c(b,"addMolBond",function(a,d,g,b){g=this.fixOrder(g,b);return this.haveAtomSerials?this.asc.addNewBondFromNames(a,d,g):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(a)-1,this.iatom0+this.parseIntStr(d)-1,g)},"~S,~S,~N,~N")});s("J.adapter.readers.molxyz");B(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.XyzReader",["JU.Logger"],function(){var b=I(J.adapter.readers.molxyz,"XyzReader",J.adapter.smarter.AtomSetCollectionReader);
j(b,"checkLine",function(){var a=this.parseIntStr(this.line);if(-2147483648==a)return this.continuing=!1;this.vibrationNumber=++this.modelNumber;if(0>=this.desiredVibrationNumber?this.doGetModel(this.modelNumber,null):this.doGetVibration(this.vibrationNumber)){this.rd();this.checkCurrentLineForScript();this.asc.newAtomSet();var d=this.line.trim();this.readAtoms(a);this.applySymmetryAndSetTrajectory();this.asc.setAtomSetName(d);if(this.isLastModel(this.modelNumber))return this.continuing=!1}else this.skipAtomSet(a);
this.discardLinesUntilNonBlank();return!1});j(b,"finalizeSubclassReader",function(){this.isTrajectory=!1;this.finalizeReaderASCR()});c(b,"skipAtomSet",function(a){for(this.rd();0<=--a;)this.rd()},"~N");c(b,"readAtoms",function(a){for(var d=0;d<a;++d){this.rd();var g=this.getTokens();if(4>g.length)JU.Logger.warn("line cannot be read for XYZ atom data: "+this.line);else{var b=this.addAtomXYZSymName(g,1,null,null);this.setElementAndIsotope(b,g[0]);var c=4;switch(g.length){case 4:continue;case 5:case 6:case 8:case 9:if(0<=
g[4].indexOf("."))b.partialCharge=this.parseFloatStr(g[4]);else{var f=this.parseIntStr(g[4]);-2147483648!=f&&(b.formalCharge=f)}switch(g.length){case 5:continue;case 6:b.radius=this.parseFloatStr(g[5]);continue;case 9:b.atomSerial=this.parseIntStr(g[8])}c++;default:var f=this.parseFloatStr(g[c++]),h=this.parseFloatStr(g[c++]),g=this.parseFloatStr(g[c++]);if(Float.isNaN(f)||Float.isNaN(h)||Float.isNaN(g))continue;this.asc.addVibrationVector(b.index,f,h,g)}}}},"~N")});s("J.adapter.smarter");B(["JU.P3"],
"J.adapter.smarter.Atom",["JU.AU","$.Lst","$.V3"],function(){var b=n(function(){this.index=this.atomSetIndex=0;this.bsSymmetry=null;this.atomSite=0;this.elementSymbol=null;this.elementNumber=-1;this.atomName=null;this.formalCharge=-2147483648;this.partialCharge=NaN;this.vib=null;this.bfactor=NaN;this.foccupancy=1;this.radius=NaN;this.isHetero=!1;this.atomSerial=-2147483648;this.seqIdOrWyckoffCode=this.chainID=0;this.bondingRadius=NaN;this.altLoc="\x00";this.group3=null;this.sequenceNumber=-2147483648;
this.insertionCode="\x00";this.typeSymbol=this.tensors=this.anisoBorU=null;this.part=0;v(this,arguments)},J.adapter.smarter,"Atom",JU.P3,Cloneable);A(b,function(){M(this,J.adapter.smarter.Atom,[]);this.set(NaN,NaN,NaN)});c(b,"addTensor",function(a,d,g){if(null==a)return null;if(g||null==this.tensors)this.tensors=new JU.Lst;this.tensors.addLast(a);null!=d&&a.setType(d);return a},"JU.Tensor,~S,~B");c(b,"getClone",function(){var a;try{a=this.clone()}catch(d){if(H(d,"CloneNotSupportedException"))return null;
throw d;}null!=this.vib&&(a.vib=y(this.vib,"JU.Vibration")?this.vib.clone():JU.V3.newV(a.vib));null!=this.anisoBorU&&(a.anisoBorU=JU.AU.arrayCopyF(this.anisoBorU,-1));if(null!=this.tensors){a.tensors=new JU.Lst;for(var g=this.tensors.size();0<=--g;)a.tensors.addLast(this.tensors.get(g).copyTensor())}return a});c(b,"getElementSymbol",function(){if(null==this.elementSymbol&&null!=this.atomName){for(var a=this.atomName.length,d=0,g=String.fromCharCode(0);d<a&&!J.adapter.smarter.Atom.isValidSymChar1(g=
this.atomName.charAt(d));)++d;switch(a-d){case 0:break;default:if(a=this.atomName.charAt(d+1),J.adapter.smarter.Atom.isValidSymNoCase(g,a)){this.elementSymbol=""+g+a;break}case 1:J.adapter.smarter.Atom.isValidSym1(g)&&(this.elementSymbol=""+g)}}return this.elementSymbol});b.isValidSym1=c(b,"isValidSym1",function(a){return"A"<=a&&"Z">=a&&0>J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");b.isValidSym2=c(b,"isValidSym2",function(a,d){return"A"<=a&&"Z">=a&&"a"<=d&&"z">=d&&0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-
65]>>d.charCodeAt(0)-97&1)},"~S,~S");b.isValidSymNoCase=c(b,"isValidSymNoCase",function(a,d){return J.adapter.smarter.Atom.isValidSym2(a,"a">d?String.fromCharCode(d.charCodeAt(0)+32):d)},"~S,~S");b.isValidSymChar1=c(b,"isValidSymChar1",function(a){return"A"<=a&&"Z">=a&&0!=J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c(b,"copyTo",function(a,d){var g=d.newCloneAtom(this);g.setT(a);return g},"JU.P3,J.adapter.smarter.AtomSetCollection");c(b,"getMult",function(){return this.seqIdOrWyckoffCode>>
16&61439});b.elementCharMasks=F(-1,[1972292,-2147351151,-2146019271,-2130706430,1441792,-2147348464,25,-2147205008,-2147344384,0,-2147352576,1179905,548936,-2147434213,-2147221504,-2145759221,0,1056947,-2147339946,-2147477097,-2147483648,-2147483648,-2147483648,8388624,-2147483646,139264])});s("J.adapter.smarter");B(["J.api.JmolAdapterAtomIterator"],"J.adapter.smarter.AtomIterator",["J.api.JmolAdapter"],function(){var b=n(function(){this.iatom=0;this.atom=null;this.ac=0;this.bsAtoms=this.atoms=null;
v(this,arguments)},J.adapter.smarter,"AtomIterator",null,J.api.JmolAdapterAtomIterator);A(b,function(a){this.ac=a.ac;this.atoms=a.atoms;this.bsAtoms=a.bsAtoms;this.iatom=0},"J.adapter.smarter.AtomSetCollection");j(b,"hasNext",function(){if(this.iatom==this.ac)return!1;for(;null==(this.atom=this.atoms[this.iatom++])||null!=this.bsAtoms&&!this.bsAtoms.get(this.atom.index);)if(this.iatom==this.ac)return!1;this.atoms[this.iatom-1]=null;return!0});j(b,"getAtomSetIndex",function(){return this.atom.atomSetIndex});
j(b,"getSymmetry",function(){return this.atom.bsSymmetry});j(b,"getAtomSite",function(){return this.atom.atomSite+1});j(b,"getUniqueID",function(){return Integer.$valueOf(this.atom.index)});j(b,"getElementNumber",function(){return 0<this.atom.elementNumber?this.atom.elementNumber:J.api.JmolAdapter.getElementNumber(this.atom.getElementSymbol())});j(b,"getAtomName",function(){return this.atom.atomName});j(b,"getFormalCharge",function(){return-2147483648==this.atom.formalCharge?0:this.atom.formalCharge});
j(b,"getPartialCharge",function(){return this.atom.partialCharge});j(b,"getTensors",function(){return this.atom.tensors});j(b,"getRadius",function(){return this.atom.radius});j(b,"getBondRadius",function(){return this.atom.bondingRadius});j(b,"getVib",function(){return null==this.atom.vib||Float.isNaN(this.atom.vib.z)?null:this.atom.vib});j(b,"getSeqID",function(){return-2147483648==(this.atom.seqIdOrWyckoffCode&-2147483648)?this.atom.seqIdOrWyckoffCode&2147483647:0});j(b,"getBfactor",function(){return this.atom.bfactor});
j(b,"getOccupancy",function(){return 100*this.atom.foccupancy});j(b,"getIsHetero",function(){return this.atom.isHetero});j(b,"getSerial",function(){return this.atom.atomSerial});j(b,"getChainID",function(){return this.atom.chainID});j(b,"getAltLoc",function(){return J.api.JmolAdapter.canonizeAlternateLocationID(this.atom.altLoc)});j(b,"getGroup3",function(){return this.atom.group3});j(b,"getSequenceNumber",function(){return this.atom.sequenceNumber});j(b,"getInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.atom.insertionCode)});
j(b,"getXYZ",function(){return this.atom});j(b,"getElement",function(){return this.getElementNumber()&127});j(b,"getIsotope",function(){return this.getElementNumber()>>7});j(b,"getPart",function(){return this.atom.part})});s("J.adapter.smarter");B(["java.util.Hashtable"],"J.adapter.smarter.AtomSetCollection","java.util.Collections $.Properties JU.AU $.BS $.Lst $.P3 $.V3 J.adapter.smarter.Atom $.Bond $.SmarterJmolAdapter J.api.Interface JU.BSUtil $.Logger JV.JC".split(" "),function(){var b=n(function(){this.atoms=
this.atomSetInfo=this.collectionName=this.fileTypeName=this.bsAtoms=this.reader=null;this.ac=0;this.bonds=null;this.bondCount=0;this.structures=null;this.atomSetCount=this.structureCount=0;this.iSet=-1;this.errorMessage=this.atomSetAuxiliaryInfo=this.atomSetBondCounts=this.atomSetAtomCounts=this.atomSetAtomIndexes=this.atomSetNumbers=null;this.isTrajectory=this.coordinatesAreFractional=!1;this.trajectoryStepCount=0;this.trajectoryNames=this.vibrationSteps=this.trajectorySteps=null;this.allowMultiple=
this.doFixPeriodic=!1;this.readerList=null;this.atomMapAnyCase=!1;this.fixedSite=0;this.bsStructuredModels=null;this.haveAnisou=!1;this.baseSymmetryAtomCount=0;this.crystalReaderLatticeOpsOnly=!1;this.xtalSymmetry=null;this.bondIndex0=0;this.atomSymbolicMap=null;this.haveUnitCell=!1;this.vibScale=0;this.firstAtomToBond=-1;this.isConSurf=null;v(this,arguments)},J.adapter.smarter,"AtomSetCollection",null);P(b,function(){this.atomSetInfo=new java.util.Hashtable;this.atoms=Array(256);this.bonds=Array(256);
this.structures=Array(16);this.atomSetNumbers=F(16,0);this.atomSetAtomIndexes=F(16,0);this.atomSetAtomCounts=F(16,0);this.atomSetBondCounts=F(16,0);this.atomSetAuxiliaryInfo=Array(16);this.atomSymbolicMap=new java.util.Hashtable});A(b,function(a,d,g,b){this.fileTypeName=a;this.reader=d;this.allowMultiple=null==d||0>d.desiredVibrationNumber;a=new java.util.Properties;a.put("PATH_KEY",".PATH");a.put("PATH_SEPARATOR",J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR);this.setInfo("properties",a);null!=
d&&(a=d.htParams.get("appendToModelIndex"),null!=a&&this.setInfo("appendToModelIndex",a),a=d.htParams.get("fixedSite"),null!=a&&(this.fixedSite=a.intValue()));if(null!=g){d=0;this.readerList=new JU.Lst;for(b=0;b<g.length;b++)null!=g[b]&&(0<g[b].ac||null!=g[b].reader&&g[b].reader.mustFinalizeModelSet)&&this.appendAtomSetCollection(d++,g[b]);1<d&&this.setInfo("isMultiFile",Boolean.TRUE)}else null!=b&&(this.setInfo("isMultiFile",Boolean.TRUE),this.appendAtomSetCollectionList(b))},"~S,J.adapter.smarter.AtomSetCollectionReader,~A,JU.Lst");
c(b,"setCollectionName",function(a){if(null!=a&&0<(a=a.trim()).length)this.collectionName=a},"~S");c(b,"clearGlobalBoolean",function(a){this.atomSetInfo.remove(JV.JC.getBoolName(a))},"~N");c(b,"setGlobalBoolean",function(a){this.setInfo(JV.JC.getBoolName(a),Boolean.TRUE)},"~N");c(b,"getGlobalBoolean",function(a){return this.atomSetInfo.get(JV.JC.getBoolName(a))===Boolean.TRUE},"~N");c(b,"appendAtomSetCollectionList",function(a){var d=a.size();if(0==d)this.errorMessage="No file found!";else for(var g=
0;g<d;g++){var b=a.get(g);y(b,"JU.Lst")?this.appendAtomSetCollectionList(b):this.appendAtomSetCollection(g,b)}},"JU.Lst");c(b,"setTrajectory",function(){this.isTrajectory||(this.trajectorySteps=new JU.Lst);this.isTrajectory=!0;var a=null==this.bsAtoms?this.ac:this.bsAtoms.cardinality();if(!(1>=a)){for(var d=Array(a),g=0<a&&null!=this.atoms[0].vib&&!Float.isNaN(this.atoms[0].vib.z),a=g?Array(a):null,b=0==this.trajectoryStepCount?null:this.trajectorySteps.get(this.trajectoryStepCount-1),c=0,f=0;c<this.ac;c++)if(null==
this.bsAtoms||this.bsAtoms.get(c)){var h=JU.P3.newP(this.atoms[c]);this.doFixPeriodic&&null!=b&&(h=J.adapter.smarter.AtomSetCollection.fixPeriodic(h,b[c]));d[f]=h;g&&(a[f]=this.atoms[c].vib);f++}if(g){if(null==this.vibrationSteps){this.vibrationSteps=new JU.Lst;for(c=0;c<this.trajectoryStepCount;c++)this.vibrationSteps.addLast(null)}this.vibrationSteps.addLast(a)}this.trajectorySteps.addLast(d);this.trajectoryStepCount++}});c(b,"appendAtomSetCollection",function(a,d){null!=d.reader&&d.reader.mustFinalizeModelSet&&
this.readerList.addLast(d.reader);var g=this.ac;this.setInfo("loadState",d.atomSetInfo.get("loadState"));if(null!=d.bsAtoms){this.getBSAtoms(0);for(var b=d.bsAtoms.nextSetBit(0);0<=b;b=d.bsAtoms.nextSetBit(b+1))this.bsAtoms.set(g+b)}for(var b=0,c=this.atomSetCount,f=0;f<d.atomSetCount;f++){this.newAtomSet();var h=(this.atomSetAuxiliaryInfo[this.iSet]=d.atomSetAuxiliaryInfo[f]).get("PDB_CONECT_firstAtom_count_max");null!=h&&(h[0]+=g);this.setCurrentModelInfo("title",d.collectionName);this.setAtomSetName(d.getAtomSetName(f));
for(h=0;h<d.atomSetAtomCounts[f];h++)null!=this.bsAtoms&&this.bsAtoms.set(this.ac),this.newCloneAtom(d.atoms[b]),b++;this.atomSetNumbers[this.iSet]=0>a?this.iSet+1:1E6*(a+1)+d.atomSetNumbers[f]}for(b=0;b<d.bondCount;b++)f=d.bonds[b],this.addNewBondWithOrder(f.atomIndex1+g,f.atomIndex2+g,f.order);for(b=JV.JC.globalBooleans.length;0<=--b;)d.getGlobalBoolean(b)&&this.setGlobalBoolean(b);for(b=0;b<d.structureCount;b++)g=d.structures[b],this.addStructure(g),g.modelStartEnd[0]+=c,g.modelStartEnd[1]+=c},
"~N,J.adapter.smarter.AtomSetCollection");c(b,"setNoAutoBond",function(){this.setInfo("noAutoBond",Boolean.TRUE)});c(b,"freeze",function(a){1==this.atomSetCount&&null==this.collectionName&&(this.collectionName=this.getAtomSetAuxiliaryInfoValue(0,"name"));a&&this.reverseAtomSets();1<this.trajectoryStepCount&&this.finalizeTrajectory();this.getList(!0);this.getList(!1);for(a=0;a<this.atomSetCount;a++)this.setModelInfoForSet("initialAtomCount",Integer.$valueOf(this.atomSetAtomCounts[a]),a),this.setModelInfoForSet("initialBondCount",
Integer.$valueOf(this.atomSetBondCounts[a]),a)},"~B");c(b,"reverseAtomSets",function(){this.reverseArray(this.atomSetAtomIndexes);this.reverseArray(this.atomSetNumbers);this.reverseArray(this.atomSetAtomCounts);this.reverseArray(this.atomSetBondCounts);J.adapter.smarter.AtomSetCollection.reverseList(this.trajectorySteps);J.adapter.smarter.AtomSetCollection.reverseList(this.trajectoryNames);J.adapter.smarter.AtomSetCollection.reverseList(this.vibrationSteps);this.reverseObject(this.atomSetAuxiliaryInfo);
for(var a=0;a<this.ac;a++)this.atoms[a].atomSetIndex=this.atomSetCount-1-this.atoms[a].atomSetIndex;for(a=0;a<this.structureCount;a++){var d=this.structures[a].modelStartEnd[0];0<=d&&(this.structures[a].modelStartEnd[0]=this.atomSetCount-1-this.structures[a].modelStartEnd[1],this.structures[a].modelStartEnd[1]=this.atomSetCount-1-d)}for(a=0;a<this.bondCount;a++)this.bonds[a].atomSetIndex=this.atomSetCount-1-this.atoms[this.bonds[a].atomIndex1].atomSetIndex;this.reverseSets(this.bonds,this.bondCount);
for(var g=JU.AU.createArrayOfArrayList(this.atomSetCount),a=0;a<this.atomSetCount;a++)g[a]=new JU.Lst;for(a=0;a<this.ac;a++)g[this.atoms[a].atomSetIndex].addLast(this.atoms[a]);for(var d=F(this.ac,0),b=this.ac,a=this.atomSetCount;0<=--a;)for(var c=g[a].size();0<=--c;){var f=this.atoms[--b]=g[a].get(c);d[f.index]=b;f.index=b}for(a=0;a<this.bondCount;a++)this.bonds[a].atomIndex1=d[this.bonds[a].atomIndex1],this.bonds[a].atomIndex2=d[this.bonds[a].atomIndex2];for(a=0;a<this.atomSetCount;a++)g=this.getAtomSetAuxiliaryInfoValue(a,
"PDB_CONECT_firstAtom_count_max"),null!=g&&(g[0]=d[g[0]],g[1]=this.atomSetAtomCounts[a])});c(b,"reverseSets",function(a,d){for(var g=JU.AU.createArrayOfArrayList(this.atomSetCount),b=0;b<this.atomSetCount;b++)g[b]=new JU.Lst;for(b=0;b<d;b++){if(0>a[b].atomSetIndex)return;g[a[b].atomSetIndex].addLast(a[b])}for(b=this.atomSetCount;0<=--b;)for(var c=g[b].size();0<=--c;)a[--d]=g[b].get(c)},"~A,~N");c(b,"reverseObject",function(a){for(var d=this.atomSetCount,g=w(d/2);0<=--g;)JU.AU.swap(a,g,d-1-g)},"~A");
b.reverseList=c(b,"reverseList",function(a){null!=a&&java.util.Collections.reverse(a)},"JU.Lst");c(b,"reverseArray",function(a){for(var d=this.atomSetCount,g=w(d/2);0<=--g;)JU.AU.swapInt(a,g,d-1-g)},"~A");c(b,"getList",function(a){var d;for(d=this.ac;0<=--d&&!(null!=this.atoms[d]&&"\x00"!=(a?this.atoms[d].altLoc:this.atoms[d].insertionCode)););if(!(0>d)){var g=Array(this.atomSetCount);for(d=0;d<this.atomSetCount;d++)g[d]="";var b;for(d=0;d<this.ac;d++)if(null!=this.atoms[d]){var c=a?this.atoms[d].altLoc:
this.atoms[d].insertionCode;if("\x00"!=c&&0>g[b=this.atoms[d].atomSetIndex].indexOf(c))g[b]+=c}a=a?"altLocs":"insertionCodes";for(d=0;d<this.atomSetCount;d++)0<g[d].length&&this.setModelInfoForSet(a,g[d],d)}},"~B");c(b,"finish",function(){if(null!=this.reader)this.reader.finalizeModelSet();else if(null!=this.readerList)for(var a=0;a<this.readerList.size();a++)this.readerList.get(a).finalizeModelSet();this.atoms=null;this.atomSetAtomCounts=F(16,0);this.atomSetAuxiliaryInfo=Array(16);this.atomSetInfo=
new java.util.Hashtable;this.atomSetCount=0;this.atomSetNumbers=F(16,0);this.atomSymbolicMap=new java.util.Hashtable;this.bonds=null;this.iSet=-1;this.xtalSymmetry=this.readerList=null;this.structures=Array(16);this.structureCount=0;this.vibrationSteps=this.trajectorySteps=null});c(b,"discardPreviousAtoms",function(){for(var a=this.ac;0<=--a;)this.atoms[a]=null;this.ac=0;this.clearMap();this.atomSetCount=0;this.iSet=-1;for(a=this.atomSetAuxiliaryInfo.length;0<=--a;)this.atomSetAtomCounts[a]=0,this.atomSetBondCounts[a]=
0,this.atomSetAuxiliaryInfo[a]=null});c(b,"removeCurrentAtomSet",function(){if(!(0>this.iSet)){var a=this.atomSetAtomIndexes[this.iSet];null!=this.bsAtoms&&this.bsAtoms.clearBits(a,this.ac);this.ac=a;this.atomSetAtomCounts[this.iSet]=0;this.iSet--;this.atomSetCount--;this.reader.doCheckUnitCell=!1}});c(b,"getHydrogenAtomCount",function(){for(var a=0,d=0;d<this.ac;d++)(1==this.atoms[d].elementNumber||this.atoms[d].elementSymbol.equals("H"))&&a++;return a});c(b,"newCloneAtom",function(a){a=a.getClone();
this.addAtom(a);return a},"J.adapter.smarter.Atom");c(b,"cloneFirstAtomSet",function(a){if(!this.allowMultiple)return 0;this.newAtomSet();0==a&&(a=this.atomSetAtomCounts[0]);for(var d=0;d<a;++d)this.newCloneAtom(this.atoms[d]);return this.ac},"~N");c(b,"cloneAtomSetWithBonds",function(a){var d=this.atomSetBondCounts[a?this.iSet:0];a=a?this.cloneLastAtomSet():this.cloneFirstAtomSet(0);if(0<a)for(var g=0;g<d;g++){var b=this.bonds[this.bondCount-d];this.addNewBondWithOrder(b.atomIndex1+a,b.atomIndex2+
a,b.order)}},"~B");c(b,"cloneLastAtomSet",function(){return this.cloneLastAtomSetFromPoints(0,null)});c(b,"cloneLastAtomSetFromPoints",function(a,d){if(!this.allowMultiple)return 0;var g=0<a?a:this.getLastAtomSetAtomCount(),b=this.getLastAtomSetAtomIndex();this.newAtomSet();for(var c=0;c<g;++c){var f=this.newCloneAtom(this.atoms[b++]);null!=d&&f.setT(d[c])}return g},"~N,~A");c(b,"getLastAtomSetAtomCount",function(){return this.atomSetAtomCounts[this.iSet]});c(b,"getLastAtomSetAtomIndex",function(){return this.ac-
this.atomSetAtomCounts[this.iSet]});c(b,"addNewAtom",function(){return this.addAtom(new J.adapter.smarter.Atom)});c(b,"addAtom",function(a){this.ac==this.atoms.length&&(this.atoms=2E5<this.ac?JU.AU.ensureLength(this.atoms,this.ac+5E4):JU.AU.doubleLength(this.atoms));0==this.atomSetCount&&this.newAtomSet();a.index=this.ac;this.atoms[this.ac++]=a;a.atomSetIndex=this.iSet;a.atomSite=0<this.fixedSite?this.fixedSite-1:this.atomSetAtomCounts[this.iSet]++;return a},"J.adapter.smarter.Atom");c(b,"addAtomWithMappedName",
function(a){var d=this.addAtom(a).atomName;null!=d&&this.atomSymbolicMap.put(d,a)},"J.adapter.smarter.Atom");c(b,"addAtomWithMappedSerialNumber",function(a){var d=this.addAtom(a).atomSerial;-2147483648!=d&&this.atomSymbolicMap.put(""+d,a)},"J.adapter.smarter.Atom");c(b,"getAtomFromName",function(a){return this.atomSymbolicMap.get(a)},"~S");c(b,"setAtomMapAnyCase",function(){this.atomMapAnyCase=!0;var a=new java.util.Hashtable;a.putAll(this.atomSymbolicMap);for(var d,g=this.atomSymbolicMap.entrySet().iterator();g.hasNext()&&
((d=g.next())||1);){var b=d.getKey(),c=b.toUpperCase();c.equals(b)||a.put(c,d.getValue())}this.atomSymbolicMap=a});c(b,"getAtomIndex",function(a){var d=this.atomSymbolicMap.get(a);null==d&&this.atomMapAnyCase&&(d=this.atomSymbolicMap.get(a.toUpperCase()));return null==d?-1:d.index},"~S");c(b,"addNewBondWithOrder",function(a,d,g){var b=null;0<=a&&(a<this.ac&&0<=d&&d<this.ac&&a!=d)&&(b=new J.adapter.smarter.Bond(a,d,g),this.addBond(b));return b},"~N,~N,~N");c(b,"addNewBondFromNames",function(a,d,g){return this.addNewBondWithOrderA(this.getAtomFromName(a),
this.getAtomFromName(d),g)},"~S,~S,~N");c(b,"addNewBondWithOrderA",function(a,d,g){return null!=a&&null!=d?this.addNewBondWithOrder(a.index,d.index,g):null},"J.adapter.smarter.Atom,J.adapter.smarter.Atom,~N");c(b,"addBond",function(a){0<this.trajectoryStepCount||(0>a.atomIndex1||0>a.atomIndex2||0>a.order||a.atomIndex1==a.atomIndex2||this.atoms[a.atomIndex1].atomSetIndex!=this.atoms[a.atomIndex2].atomSetIndex?JU.Logger.debugging&&JU.Logger.debug(">>>>>>BAD BOND:"+a.atomIndex1+"-"+a.atomIndex2+" order="+
a.order):this.addBondNoCheck(a))},"J.adapter.smarter.Bond");c(b,"addBondNoCheck",function(a){this.bondCount==this.bonds.length&&(this.bonds=JU.AU.arrayCopyObject(this.bonds,this.bondCount+1024));this.bonds[this.bondCount++]=a;this.atomSetBondCounts[this.iSet]++},"J.adapter.smarter.Bond");c(b,"finalizeStructures",function(){if(0!=this.structureCount){this.bsStructuredModels=new JU.BS;for(var a=new java.util.Hashtable,d=0;d<this.structureCount;d++){var g=this.structures[d];-1==g.modelStartEnd[0]&&(g.modelStartEnd[0]=
0,g.modelStartEnd[1]=this.atomSetCount-1);this.bsStructuredModels.setBits(g.modelStartEnd[0],g.modelStartEnd[1]+1);if(0!=g.strandCount){var g=g.structureID+" "+g.modelStartEnd[0],b=a.get(g),b=(null==b?0:b.intValue())+1;a.put(g,Integer.$valueOf(b))}}for(d=0;d<this.structureCount;d++)g=this.structures[d],1==g.strandCount&&(g.strandCount=a.get(g.structureID+" "+g.modelStartEnd[0]).intValue())}});c(b,"addStructure",function(a){this.structureCount==this.structures.length&&(this.structures=JU.AU.arrayCopyObject(this.structures,
this.structureCount+32));this.structures[this.structureCount++]=a},"J.adapter.smarter.Structure");c(b,"addVibrationVectorWithSymmetry",function(a,d,g,b,c){if(c){c=this.atoms[a].atomSite;for(var f=this.atoms[a].atomSetIndex;a<this.ac&&this.atoms[a].atomSetIndex==f;a++)this.atoms[a].atomSite==c&&this.addVibrationVector(a,d,g,b)}else this.addVibrationVector(a,d,g,b)},"~N,~N,~N,~N,~B");c(b,"addVibrationVector",function(a,d,g,b){this.allowMultiple||(a%=this.ac);return this.atoms[a].vib=JU.V3.new3(d,g,
b)},"~N,~N,~N,~N");c(b,"setCoordinatesAreFractional",function(a){this.coordinatesAreFractional=a;this.setCurrentModelInfo("coordinatesAreFractional",Boolean.$valueOf(a));a&&this.setGlobalBoolean(0)},"~B");c(b,"setAnisoBorU",function(a,d,g){this.haveAnisou=!0;a.anisoBorU=d;d[6]=g},"J.adapter.smarter.Atom,~A,~N");c(b,"setU",function(a,d,g){var b=a.anisoBorU;null==b&&this.setAnisoBorU(a,b=L(8,0),8);b[d]=g},"J.adapter.smarter.Atom,~N,~N");c(b,"getXSymmetry",function(){null==this.xtalSymmetry&&(this.xtalSymmetry=
J.api.Interface.getOption("adapter.smarter.XtalSymmetry",this.reader.vwr,"file").set(this.reader));return this.xtalSymmetry});c(b,"getSymmetry",function(){return this.getXSymmetry().getFileSymmetry()});c(b,"setSymmetryFromAuditBlock",function(a){return null==a?null:this.getXSymmetry().setSymmetryFromAuditBlock(a)},"J.adapter.smarter.XtalSymmetry.FileSymmetry");c(b,"newFileSymmetry",function(){return this.getXSymmetry().newFileSymmetry()});c(b,"setTensors",function(){this.haveAnisou&&this.getXSymmetry().setTensors(this.isConSurf!==
Boolean.TRUE)});c(b,"setInfo",function(a,d){null==d?this.atomSetInfo.remove(a):this.atomSetInfo.put(a,d)},"~S,~O");c(b,"setAtomSetCollectionPartialCharges",function(a){if(!this.atomSetInfo.containsKey(a))return!1;for(var d=this.atomSetInfo.get(a),g=d.size(),b=this.ac;0<=--b;)this.atoms[b].partialCharge=d.get(b%g).floatValue();JU.Logger.info("Setting partial charges type "+a);return!0},"~S");c(b,"mapPartialCharge",function(a,d){this.getAtomFromName(a).partialCharge=d},"~S,~N");b.fixPeriodic=c(b,"fixPeriodic",
function(a,d){a.x=J.adapter.smarter.AtomSetCollection.fixPoint(a.x,d.x);a.y=J.adapter.smarter.AtomSetCollection.fixPoint(a.y,d.y);a.z=J.adapter.smarter.AtomSetCollection.fixPoint(a.z,d.z);return a},"JU.P3,JU.P3");b.fixPoint=c(b,"fixPoint",function(a,d){for(;0.9<a-d;)a-=1;for(;-0.9>a-d;)a+=1;return a},"~N,~N");c(b,"finalizeTrajectoryAs",function(a,d){this.trajectorySteps=a;this.vibrationSteps=d;this.trajectoryStepCount=a.size();this.finalizeTrajectory()},"JU.Lst,JU.Lst");c(b,"finalizeTrajectory",function(){if(0!=
this.trajectoryStepCount){var a=this.trajectorySteps.get(0),d=null==this.vibrationSteps?null:this.vibrationSteps.get(0),g=null==this.bsAtoms?this.ac:this.bsAtoms.cardinality();if(null!=this.vibrationSteps&&null!=d&&d.length<g||a.length<g)this.errorMessage="File cannot be loaded as a trajectory";else{for(var g=new JU.V3,b=0,c=0;b<this.ac;b++)if(null==this.bsAtoms||this.bsAtoms.get(b))null!=this.vibrationSteps&&(this.atoms[b].vib=null==d?g:d[c]),null!=a[c]&&this.atoms[b].setT(a[c]),c++;this.setInfo("trajectorySteps",
this.trajectorySteps);null!=this.vibrationSteps&&this.setInfo("vibrationSteps",this.vibrationSteps);0==this.ac&&(this.ac=a.length)}}});c(b,"newAtomSet",function(){this.newAtomSetClear(!0)});c(b,"newAtomSetClear",function(a){!this.allowMultiple&&0<=this.iSet&&this.reader.discardPreviousAtoms();this.bondIndex0=this.bondCount;this.isTrajectory&&this.reader.discardPreviousAtoms();this.iSet=this.atomSetCount++;this.atomSetCount>this.atomSetNumbers.length&&(this.atomSetAtomIndexes=JU.AU.doubleLengthI(this.atomSetAtomIndexes),
this.atomSetAtomCounts=JU.AU.doubleLengthI(this.atomSetAtomCounts),this.atomSetBondCounts=JU.AU.doubleLengthI(this.atomSetBondCounts),this.atomSetAuxiliaryInfo=JU.AU.doubleLength(this.atomSetAuxiliaryInfo));this.atomSetAtomIndexes[this.iSet]=this.ac;this.atomSetCount+this.trajectoryStepCount>this.atomSetNumbers.length&&(this.atomSetNumbers=JU.AU.doubleLengthI(this.atomSetNumbers));this.isTrajectory?this.atomSetNumbers[this.iSet+this.trajectoryStepCount]=this.atomSetCount+this.trajectoryStepCount:
this.atomSetNumbers[this.iSet]=this.atomSetCount;a&&this.clearMap();this.setCurrentModelInfo("title",this.collectionName)},"~B");c(b,"clearMap",function(){this.atomSymbolicMap.clear();this.atomMapAnyCase=!1});c(b,"getAtomSetAtomIndex",function(a){return this.atomSetAtomIndexes[a]},"~N");c(b,"getAtomSetAtomCount",function(a){return this.atomSetAtomCounts[a]},"~N");c(b,"getAtomSetBondCount",function(a){return this.atomSetBondCounts[a]},"~N");c(b,"setAtomSetName",function(a){if(null!=a)if(this.isTrajectory)this.setTrajectoryName(a);
else{var d=0>this.iSet?null:this.getAtomSetName(this.iSet);this.setModelInfoForSet("name",a,this.iSet);null!=this.reader&&(0<a.length&&!a.equals(d))&&this.reader.appendLoadNote(a);this.allowMultiple||this.setCollectionName(a)}},"~S");c(b,"setTrajectoryName",function(a){if(0!=this.trajectoryStepCount){null==this.trajectoryNames&&(this.trajectoryNames=new JU.Lst);for(var d=this.trajectoryNames.size();d<this.trajectoryStepCount;d++)this.trajectoryNames.addLast(null);this.trajectoryNames.set(this.trajectoryStepCount-
1,a)}},"~S");c(b,"setCurrentAtomSetNumber",function(a){this.setAtomSetNumber(this.iSet+(this.isTrajectory?this.trajectoryStepCount:0),a)},"~N");c(b,"setAtomSetNumber",function(a,d){this.atomSetNumbers[a]=d},"~N,~N");c(b,"setAtomSetModelProperty",function(a,d){this.setAtomSetModelPropertyForSet(a,d,this.iSet)},"~S,~S");c(b,"setAtomSetModelPropertyForSet",function(a,d,g){var b=this.getAtomSetAuxiliaryInfoValue(g,"modelProperties");null==b&&this.setModelInfoForSet("modelProperties",b=new java.util.Properties,
g);b.put(a,d);a.startsWith(".")&&b.put(a.substring(1),d)},"~S,~S,~N");c(b,"setAtomProperties",function(a,d,g){"string"==typeof d&&!d.endsWith("\n")&&(d+="\n");0>g&&(g=this.iSet);var b=this.getAtomSetAuxiliaryInfoValue(g,"atomProperties");null==b&&this.setModelInfoForSet("atomProperties",b=new java.util.Hashtable,g);b.put(a,d)},"~S,~O,~N,~B");c(b,"setAtomSetPartialCharges",function(a){if(!this.atomSetAuxiliaryInfo[this.iSet].containsKey(a))return!1;a=this.getAtomSetAuxiliaryInfoValue(this.iSet,a);
for(var d=a.size();0<=--d;)this.atoms[d].partialCharge=a.get(d).floatValue();return!0},"~S");c(b,"getAtomSetAuxiliaryInfoValue",function(a,d){return this.atomSetAuxiliaryInfo[0<=a?a:this.iSet].get(d)},"~N,~S");c(b,"setCurrentModelInfo",function(a,d){this.setModelInfoForSet(a,d,this.iSet)},"~S,~O");c(b,"setModelInfoForSet",function(a,d,g){0>g||(null==this.atomSetAuxiliaryInfo[g]&&(this.atomSetAuxiliaryInfo[g]=new java.util.Hashtable),null==d?this.atomSetAuxiliaryInfo[g].remove(a):this.atomSetAuxiliaryInfo[g].put(a,
d))},"~S,~O,~N");c(b,"getAtomSetNumber",function(a){return this.atomSetNumbers[a>=this.atomSetCount?0:a]},"~N");c(b,"getAtomSetName",function(a){if(null!=this.trajectoryNames&&a<this.trajectoryNames.size())return this.trajectoryNames.get(a);a>=this.atomSetCount&&(a=this.atomSetCount-1);return this.getAtomSetAuxiliaryInfoValue(a,"name")},"~N");c(b,"getAtomSetAuxiliaryInfo",function(a){a=a>=this.atomSetCount?this.atomSetCount-1:a;return 0>a?null:this.atomSetAuxiliaryInfo[a]},"~N");c(b,"setAtomSetEnergy",
function(a,d){0>this.iSet||(JU.Logger.info("Energy for model "+(this.iSet+1)+" = "+a),this.setCurrentModelInfo("EnergyString",a),this.setCurrentModelInfo("Energy",Float.$valueOf(d)),this.setAtomSetModelProperty("Energy",""+d))},"~S,~N");c(b,"setAtomSetFrequency",function(a,d,g,b,c){this.setAtomSetModelProperty("FreqValue",b);b+=" "+(null==c?"cm^-1":c);c=(null==g?"":g+" ")+b;this.setAtomSetName(c);this.setAtomSetModelProperty("Frequency",b);this.setAtomSetModelProperty("Mode",""+a);this.setModelInfoForSet("vibrationalMode",
Integer.$valueOf(a),this.iSet);null!=g&&this.setAtomSetModelProperty("FrequencyLabel",g);this.setAtomSetModelProperty(".PATH",(null==d?"":d+J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR+"Frequencies")+"Frequencies");return c},"~N,~S,~S,~S,~S");c(b,"getBondList",function(){for(var a=Array(this.bondCount),d=0;d<this.bondCount;d++)a[d]=x(-1,[this.atoms[this.bonds[d].atomIndex1].atomName,this.atoms[this.bonds[d].atomIndex2].atomName,""+this.bonds[d].order]);return a});c(b,"centralize",function(){for(var a=
new JU.P3,d=0;d<this.atomSetCount;d++){var g=this.atomSetAtomCounts[d],b=this.atomSetAtomIndexes[d];a.set(0,0,0);for(var c=b+g;--c>=b;)a.add(this.atoms[c]);a.scale(1/g);for(c=b+g;--c>=b;)this.atoms[c].sub(a)}});c(b,"mergeTrajectories",function(a){if(this.isTrajectory&&a.isTrajectory&&null==this.vibrationSteps){for(var d=0;d<a.trajectoryStepCount;d++)this.trajectorySteps.add(this.trajectoryStepCount++,a.trajectorySteps.get(d));this.setInfo("trajectorySteps",this.trajectorySteps);this.setInfo("ignoreUnitCell",
a.atomSetInfo.get("ignoreUnitCell"))}},"J.adapter.smarter.AtomSetCollection");c(b,"removeAtomSet",function(a){null==this.bsAtoms&&(this.bsAtoms=JU.BSUtil.newBitSet2(0,this.ac));var d=this.atomSetAtomIndexes[a],g=d+this.atomSetAtomCounts[a];this.bsAtoms.clearBits(d,g);for(d=g;d<this.ac;d++)this.atoms[d].atomSetIndex--;for(d=a+1;d<this.atomSetCount;d++)this.atomSetAuxiliaryInfo[d-1]=this.atomSetAuxiliaryInfo[d],this.atomSetAtomIndexes[d-1]=this.atomSetAtomIndexes[d],this.atomSetBondCounts[d-1]=this.atomSetBondCounts[d],
this.atomSetAtomCounts[d-1]=this.atomSetAtomCounts[d],this.atomSetNumbers[d-1]=this.atomSetNumbers[d];for(d=0;d<this.bondCount;d++)this.bonds[d].atomSetIndex=this.atoms[this.bonds[d].atomIndex1].atomSetIndex;this.atomSetAuxiliaryInfo[--this.atomSetCount]=null;for(d=g=0;d<this.structureCount;d++){var b=this.structures[d];b.modelStartEnd[0]==a&&b.modelStartEnd[1]==a&&(this.structures[d]=null,g++)}if(0<g){a=Array(this.structureCount-g);for(g=d=0;d<this.structureCount;d++)null!=this.structures[d]&&(a[g++]=
this.structures[d]);this.structures=a}},"~N");c(b,"removeLastUnselectedAtoms",function(){for(var a=this.ac,d=0,g=this.getLastAtomSetAtomIndex(),b=0,c=g;c<a;c++)this.bsAtoms.get(c)?(0<d&&(this.atoms[this.atoms[c].index=c-d]=this.atoms[c],this.atoms[c]=null),b++):(d++,this.ac--,this.atoms[c]=null);this.atomSetAtomCounts[this.iSet]=b;0==b?(this.iSet--,this.atomSetCount--):this.bsAtoms.setBits(g,g+b)});c(b,"checkNoEmptyModel",function(){for(;0<this.atomSetCount&&0==this.atomSetAtomCounts[this.atomSetCount-
1];)this.atomSetCount--});c(b,"getBSAtoms",function(a){null==this.bsAtoms&&(this.bsAtoms=new JU.BS,0!=a&&this.bsAtoms.setBits(0,0>a?this.ac:a));return this.bsAtoms},"~N");c(b,"setBSAtomsForSet",function(a){if(null!=this.bsAtoms){0>a&&(a=this.iSet);var d=this.atomSetAtomIndexes[a];0>this.bsAtoms.nextSetBit(d)&&this.bsAtoms.setBits(d,d+this.atomSetAtomCounts[a])}},"~N");c(b,"fix2Stereo",function(){this.getBSAtoms(-1);for(var a=this.bondCount;0<=--a;){var d=this.bonds[a];this.atoms[d.atomIndex2].elementSymbol.equals("H")&&
1025!=d.order&&1041!=d.order&&this.atoms[d.atomIndex1].elementSymbol.equals("C")?this.bsAtoms.clear(d.atomIndex2):this.atoms[d.atomIndex1].elementSymbol.equals("H")&&this.atoms[d.atomIndex2].elementSymbol.equals("C")&&this.bsAtoms.clear(d.atomIndex1)}})});s("J.adapter.smarter");B(["javajs.api.GenericLineReader","JU.SB","JV.Viewer"],"J.adapter.smarter.AtomSetCollectionReader","JU.BS $.Lst $.M3 $.P3 $.PT $.Quat $.V3 J.adapter.smarter.Atom $.AtomSetCollection J.api.Interface $.JmolAdapter JU.BSUtil $.Logger $.SimpleUnitCell JV.FileManager $.JC".split(" "),
function(){var b=n(function(){this.requiresBSFilter=this.debugging=this.isBinary=!1;this.dssr=this.validation=this.domains=this.trajectorySteps=this.htParams=this.readerName=this.binaryDoc=this.reader=this.asc=this.primitiveToCrystal=null;this.isConcatenated=this.openVarna=!1;this.lstNCS=this.thisBiomolecule=this.addedDataKey=this.addedData=null;this.floatifyJavaDouble=!0;this.next=this.prevline=this.line=null;this.ptLine=0;this.checkNearAtoms=!0;this.fillRange=this.latticeCells=this.latticeType=
null;this.iHaveSymmetryOperators=this.iHaveUnitCell=this.doProcessLines=!1;this.continuing=!0;this.vwr=null;this.isMolecular=this.is2D=this.noMinimize=this.noHydrogens=this.optimize2D=this.isSequential=this.getHeader=this.doCheckUnitCell=this.applySymmetryToBonds=this.isTrajectory=this.ignoreFileSymmetryOperators=this.doApplySymmetry=!1;this.vibrationNumber=this.modelNumber=this.templateAtomCount=0;this.desiredVibrationNumber=-2147483648;this.bsModels=null;this.havePartialChargeFilter=this.useFileModelNumbers=
!1;this.calculationType="?";this.sgName=null;this.ignoreFileSpaceGroupName=this.ignoreFileUnitCell=!1;this.unitCellParams=null;this.desiredModelNumber=-2147483648;this.out=this.symmetry=null;this.doPackUnitCell=this.iHaveFractionalCoordinates=!1;this.ptSupercell=null;this.forcePacked=this.mustFinalizeModelSet=!1;this.packingRange=null;this.cellSlop=1E-4;this.isPrimitive=this.rotateHexCell=!1;this.modDim=0;this.highprecision0=this.lowPrecision=!1;this.loadNote=null;this.merging=this.fileCoordinatesAreFractional=
this.doConvertToFractional=!1;this.symmetryRange=0;this.firstLastStep=null;this.lastModelNumber=2147483647;this.desiredSpaceGroupIndex=-1;this.latticeScaling=NaN;this.unitCellOffset=null;this.unitCellOffsetFractional=!1;this.paramsLattice=this.moreUnitCellInfo=null;this.paramsPacked=this.paramsCentroid=!1;this.fileName=this.filePath=this.fileOffsetFractional=this.fileOffset=this.fileScaling=null;this.baseBondIndex=this.baseAtomIndex=0;this.stateScriptVersionInt=2147483647;this.isSUPERCELL=this.noPack=
this.isFinalized=!1;this.precision=0;this.haveModel=!1;this.previousUnitCell=this.previousSpaceGroup=null;this.nMatrixElements=0;this.filterCased=this.filter=this.bsFilter=this.matUnitCellOrientation=this.ucItems=null;this.filterAtomType=this.filterAtomName=this.filterChain=this.filterGroup3=this.filterAltLoc=this.haveAtomFilter=!1;this.filterAtomTypeStr=null;this.filterAtomNameTerminator=";";this.filterEveryNth=this.filterAllHetero=this.filterHetero=this.filterElement=!1;this.filterSymop=null;this.nFiltered=
this.filterN=0;this.reverseModels=this.doReadMolecularOrbitals=this.allowPDBFilter=this.isDSSP1=this.ignoreStructure=this.useAltNames=this.addVibrations=this.doCentralize=this.doSetOrientation=!1;this.modelNameRequired=null;this.centroidPacked=this.doCentroidUnitCell=!1;this.strSupercell=null;this.filteredPrecision=this.polymerX=this.slabXY=this.allow_a_len_1=!1;this.ms=this.matRot=this.filter2Cased=this.filter1Cased=this.filter2=this.filter1=null;this.vibsFractional=!1;this.siteScript=this.previousScript=
null;v(this,arguments)},J.adapter.smarter,"AtomSetCollectionReader",null,javajs.api.GenericLineReader);P(b,function(){this.next=F(1,0);this.highprecision0=JV.Viewer.isHighPrecision;this.loadNote=new JU.SB});c(b,"getPackingRangeValue",function(a){return null!=this.packingRange?this.packingRange.floatValue():0!=a?a:0.02},"~N");c(b,"setup",function(a,d,g){this.setupASCR(a,d,g)},"~S,java.util.Map,~O");c(b,"setupASCR",function(a,d,g){null!=a&&(this.debugging=JU.Logger.debugging,this.htParams=d,this.filePath=
JV.FileManager.stripTypePrefix(""+d.get("fullPathName")),a=this.filePath.lastIndexOf("/"),this.fileName=this.filePath.substring(a+1),y(g,"java.io.BufferedReader")?this.reader=g:y(g,"javajs.api.GenericBinaryDocument")&&(this.binaryDoc=g))},"~S,java.util.Map,~O");c(b,"readData",function(){this.initialize();this.asc=new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);try{this.initializeReader();if(null==this.binaryDoc)for(null==this.line&&this.continuing&&this.rd();null!=this.line&&
this.continuing;)this.checkLine()&&this.rd();else this.binaryDoc.setOutputChannel(this.out),this.processBinaryDocument();this.finalizeSubclassReader();this.isFinalized||this.finalizeReaderASCR()}catch(a){JU.Logger.info("Reader error: "+a),a.printStackTrace(),this.setError(a)}null!=this.reader&&this.reader.close();null!=this.binaryDoc&&this.binaryDoc.close();return this.finish()});c(b,"fixBaseIndices",function(){try{var a=this.htParams.get("baseModelIndex");if(null!=a){var d=a.intValue();this.baseAtomIndex+=
this.asc.ac;this.baseBondIndex+=this.asc.bondCount;d+=this.asc.atomSetCount;this.htParams.put("baseAtomIndex",Integer.$valueOf(this.baseAtomIndex));this.htParams.put("baseBondIndex",Integer.$valueOf(this.baseBondIndex));this.htParams.put("baseModelIndex",Integer.$valueOf(d))}}catch(g){if(!H(g,Exception))throw g;}});c(b,"readDataObject",function(a){this.initialize();this.asc=new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);this.initializeReader();this.processDOM(a);return this.finish()},
"~O");c(b,"processDOM",function(){},"~O");c(b,"processBinaryDocument",function(){});c(b,"initializeReader",function(){});c(b,"checkLine",function(){return!0});c(b,"checkLastModel",function(){if(this.isLastModel(this.modelNumber)&&this.doProcessLines)return this.continuing=this.doProcessLines=!1;this.doProcessLines=!1;return!0});c(b,"isLastModel",function(a){return 0<this.desiredModelNumber||a>=this.lastModelNumber},"~N");c(b,"appendLoadNote",function(a){null==a?this.loadNote=new JU.SB:(this.loadNote.append(a).append("\n"),
JU.Logger.info(a))},"~S");c(b,"initializeTrajectoryFile",function(){this.asc.addAtom(new J.adapter.smarter.Atom);this.trajectorySteps=this.htParams.get("trajectorySteps");null==this.trajectorySteps&&this.htParams.put("trajectorySteps",this.trajectorySteps=new JU.Lst)});c(b,"finalizeSubclassReader",function(){});c(b,"finalizeReaderASCR",function(){this.isFinalized=!0;if(0<this.asc.atomSetCount){1==this.asc.atomSetCount&&(this.asc.setCurrentModelInfo("dbName",this.htParams.get("dbName")),this.asc.setCurrentModelInfo("auxFiles",
this.htParams.get("auxFiles")));this.applySymmetryAndSetTrajectory();this.asc.finalizeStructures();this.doCentralize&&this.asc.centralize();null!=this.fillRange&&this.asc.setInfo("boundbox",this.fillRange);var a=this.asc.getAtomSetAuxiliaryInfo(0);if(null!=a){if(null!=this.domains){this.asc.setGlobalBoolean(5);var d=this.domains.getMapKeys(2,!0),g=d.indexOf("{ ",2);0<=g&&(d=d.substring(g+2));g=d.indexOf("_metadata");0>g&&(g=d.indexOf("metadata"));0<=g&&(d=d.substring(0,g));d=JU.PT.rep(JU.PT.replaceAllCharacters(d,
"{}","").trim(),"\n","\n  ")+"\n\nUse SHOW DOMAINS for details.";this.appendLoadNote("\nDomains loaded:\n   "+d);for(d=this.asc.atomSetCount;0<=--d;)a=this.asc.getAtomSetAuxiliaryInfo(d),a.put("domains",this.domains)}if(null!=this.validation)for(d=this.asc.atomSetCount;0<=--d;)a=this.asc.getAtomSetAuxiliaryInfo(d),a.put("validation",this.validation);null!=this.dssr?(a.put("dssrJSON",Boolean.TRUE),a.put("dssr",this.dssr),this.openVarna&&this.vwr.plugin("VARNA","show","dssr"),this.addJmolScript("set cartoonblocks;cartoons only;color structure")):
this.openVarna&&this.addJmolScript("calculate structure dssr;set cartoonblocks;cartoons only;color structure")}}this.floatifyJavaDouble||this.asc.setInfo("highPrecision",Boolean.TRUE);this.setLoadNote()});c(b,"setLoadNote",function(){var a=this.loadNote.toString();0<this.loadNote.length()&&this.asc.setInfo("modelLoadNote",a);return a});c(b,"setIsPDB",function(){this.asc.setGlobalBoolean(4);null!=this.htParams.get("pdbNoHydrogens")&&this.asc.setInfo("pdbNoHydrogens",this.htParams.get("pdbNoHydrogens"));
this.checkFilterKey("ADDHYDROGENS")&&this.asc.setInfo("pdbAddHydrogens",Boolean.TRUE)});c(b,"setModelPDB",function(a){a?this.asc.setGlobalBoolean(4):this.asc.clearGlobalBoolean(4);this.asc.setCurrentModelInfo(JV.JC.getBoolName(4),a?Boolean.TRUE:null)},"~B");c(b,"finish",function(){!1!=this.highprecision0&&this.vwr.setBooleanPropertyTok("doubleprecision",603979831,this.highprecision0);var a=this.htParams.get("loadState");this.asc.setInfo("loadState",null==a?"":a);a=this.htParams.get("smilesString");
null!=a&&this.asc.setInfo("smilesString",a);this.htParams.containsKey("templateAtomCount")||this.htParams.put("templateAtomCount",Integer.$valueOf(this.asc.ac));null!=this.bsFilter&&(this.htParams.put("filteredAtomCount",Integer.$valueOf(JU.BSUtil.cardinalityOf(this.bsFilter))),this.htParams.put("bsFilter",this.bsFilter));this.calculationType.equals("?")||this.asc.setInfo("calculationType",this.calculationType);var d=a=this.asc.fileTypeName;0<=d.indexOf("(")&&(d=d.substring(0,d.indexOf("(")));for(var g=
this.asc.atomSetCount;0<=--g;)this.asc.setModelInfoForSet("fileName",this.filePath,g),this.asc.setModelInfoForSet("fileType",d,g);this.asc.freeze(this.reverseModels);if(null!=this.asc.errorMessage)return this.asc.errorMessage+"\nfor file "+this.filePath+"\ntype "+a;if(!this.merging&&(null==this.asc.bsAtoms?0==this.asc.ac:0>this.asc.bsAtoms.nextSetBit(0))&&0>d.indexOf("DataOnly")&&null==this.asc.atomSetInfo.get("dataOnly"))return"No atoms found\nfor file "+this.filePath+"\ntype "+a;this.fixBaseIndices();
return this.asc});c(b,"setError",function(a){var d=a.getMessage();this.asc.errorMessage=null==this.line?"Error reading file at end of file \n"+d:"Error reading file at line "+this.ptLine+":\n"+this.line+"\n"+d;a.printStackTrace()},"Throwable");c(b,"initialize",function(){this.htParams.containsKey("baseAtomIndex")&&(this.baseAtomIndex=this.htParams.get("baseAtomIndex").intValue());this.htParams.containsKey("baseBondIndex")&&(this.baseBondIndex=this.htParams.get("baseBondIndex").intValue());this.initializeSymmetry();
this.vwr=this.htParams.remove("vwr");this.htParams.containsKey("stateScriptVersionInt")&&(this.stateScriptVersionInt=this.htParams.get("stateScriptVersionInt").intValue());this.packingRange=this.htParams.get("packingRange");var a=null!=this.htParams.get("highPrecision");null==this.packingRange&&a&&(this.floatifyJavaDouble=!1,this.packingRange=Float.$valueOf(1E-4));this.merging=this.htParams.containsKey("merging");this.getHeader=this.htParams.containsKey("getHeader");this.isSequential=this.htParams.containsKey("isSequential");
this.readerName=this.htParams.get("readerName");this.htParams.containsKey("outputChannel")&&(this.out=this.htParams.get("outputChannel"));this.htParams.containsKey("vibrationNumber")?this.desiredVibrationNumber=this.htParams.get("vibrationNumber").intValue():this.htParams.containsKey("modelNumber")&&(this.desiredModelNumber=this.htParams.get("modelNumber").intValue());this.applySymmetryToBonds=this.htParams.containsKey("applySymmetryToBonds");this.bsFilter=this.requiresBSFilter?this.htParams.get("bsFilter"):
null;this.setFilter(null);this.fillRange=this.htParams.get("fillRange");this.paramsLattice=this.htParams.get("lattice");a=this.htParams.get("supercell");null!=this.strSupercell&&!this.noPack&&(this.forcePacked=!0);y(a,"JU.P3")?(a=this.ptSupercell=a,1!=a.length()&&(this.strSupercell=D(a.x)+"a,"+D(a.y)+"b,"+D(a.z)+"c",this.isSUPERCELL=!0)):"string"==typeof a&&(this.strSupercell=a,this.isSUPERCELL=!0);a=this.htParams.containsKey("ptFile")?this.htParams.get("ptFile").intValue():-1;this.isTrajectory=this.htParams.containsKey("isTrajectory");
0<a&&this.htParams.containsKey("firstLastSteps")?(a=this.htParams.get("firstLastSteps").get(a-1),y(a,"JU.BS")?this.bsModels=a:this.firstLastStep=a):this.htParams.containsKey("firstLastStep")?this.firstLastStep=this.htParams.get("firstLastStep"):this.htParams.containsKey("bsModels")&&(this.bsModels=this.htParams.get("bsModels"));this.useFileModelNumbers=this.htParams.containsKey("useFileModelNumbers")||this.checkFilterKey("USEFILEMODELNUMBERS");this.htParams.containsKey("templateAtomCount")&&(this.templateAtomCount=
this.htParams.get("templateAtomCount").intValue());if(null!=this.bsModels||null!=this.firstLastStep)this.desiredModelNumber=-2147483648;if(null==this.bsModels&&null!=this.firstLastStep){0>this.firstLastStep[0]&&(this.firstLastStep[0]=0);if(0==this.firstLastStep[2]||this.firstLastStep[1]<this.firstLastStep[0])this.firstLastStep[1]=-1;1>this.firstLastStep[2]&&(this.firstLastStep[2]=1);this.bsModels=JU.BSUtil.newAndSetBit(this.firstLastStep[0]);if(this.firstLastStep[1]>this.firstLastStep[0])for(a=this.firstLastStep[0];a<=
this.firstLastStep[1];a+=this.firstLastStep[2])this.bsModels.set(a)}if(null!=this.bsModels&&(null==this.firstLastStep||-1!=this.firstLastStep[1]))this.lastModelNumber=this.bsModels.length();this.symmetryRange=this.htParams.containsKey("symmetryRange")?this.htParams.get("symmetryRange").floatValue():0;this.paramsCentroid=this.htParams.containsKey("centroid");this.paramsPacked=this.htParams.containsKey("packed");this.initializeSymmetryOptions();this.htParams.containsKey("spaceGroupIndex")&&(this.desiredSpaceGroupIndex=
this.htParams.get("spaceGroupIndex").intValue(),-2==this.desiredSpaceGroupIndex&&(this.sgName=this.htParams.get("spaceGroupName")),this.ignoreFileSpaceGroupName=-2==this.desiredSpaceGroupIndex||0<=this.desiredSpaceGroupIndex,this.ignoreFileSymmetryOperators=-1!=this.desiredSpaceGroupIndex);this.htParams.containsKey("unitCellOffset")&&(this.fileScaling=JU.P3.new3(1,1,1),this.fileOffset=this.htParams.get("unitCellOffset"),this.fileOffsetFractional=JU.P3.newP(this.fileOffset),this.unitCellOffsetFractional=
this.htParams.containsKey("unitCellOffsetFractional"));this.htParams.containsKey("unitcell")&&(a=this.htParams.get("unitcell"),this.merging&&this.setFractionalCoordinates(!0),9==a.length?(this.addExplicitLatticeVector(0,a,0),this.addExplicitLatticeVector(1,a,3),this.addExplicitLatticeVector(2,a,6)):this.setUnitCell(a[0],a[1],a[2],a[3],a[4],a[5]),this.ignoreFileUnitCell=this.iHaveUnitCell,this.merging&&!this.iHaveUnitCell&&this.setFractionalCoordinates(!1));this.domains=this.htParams.get("domains");
this.validation=this.htParams.get("validation");this.dssr=this.htParams.get("dssr");this.isConcatenated=this.htParams.containsKey("concatenate")});c(b,"parsePrecision",function(a){if(!this.filteredPrecision){var d=a.indexOf(".")+1;if(0<=d){var g=a.indexOf("(");0>g?this.precision=Math.max(this.precision,a.length-1-d):(0==this.precision&&(this.precision=g),this.precision=Math.min(this.precision,g-1-d))}}return this.parseFloatStr(a)},"~S");c(b,"setLowPrecision",function(){this.lowPrecision=!0;this.cellSlop=
1E-4;null==this.packingRange&&(this.packingRange=Double.$valueOf(1E-4))});c(b,"setPrecision",function(){var a;if(this.lowPrecision)a=!1,this.precision=4;else if(this.precision=1E3<this.precision?this.precision-1E3:Math.min(12,Math.max(4,this.precision)),a=7<=this.precision)this.vwr.setBooleanProperty("doubleprecision",!0),JV.Viewer.isHighPrecision?(this.cellSlop=1E-12,this.paramsPacked||(this.packingRange=Double.$valueOf(this.cellSlop)),this.asc.setInfo("highPrecision",Boolean.TRUE)):(a=!1,this.precision=
6,this.appendLoadNote("Structure read has high precision but this version of Jmol uses float precision.\nUse JmolD.jar or JavaScript for full precision."));!a&&10>this.precision&&(this.cellSlop=Math.pow(10,-this.precision));this.symmetry.setPrecision(this.cellSlop);this.unitCellParams[26]=this.cellSlop;if(this.fileCoordinatesAreFractional){a=this.asc.ac;for(var d=this.asc.getLastAtomSetAtomIndex();--a>=d;)this.symmetry.twelfthify(this.asc.atoms[a])}this.appendLoadNote("Precision set to "+this.precision+
"; packing set to "+(null==this.packingRange?0.02:this.packingRange.floatValue()))});c(b,"initializeSymmetryOptions",function(){this.latticeCells=F(4,0);this.doApplySymmetry=!1;var a=this.paramsLattice;if(null==a||0==a.length()){if(!this.forcePacked&&null==this.strSupercell)return;a=JU.P3.new3(1,1,1)}this.latticeCells[0]=D(a.x);this.latticeCells[1]=D(a.y);this.latticeCells[2]=D(a.z);y(a,"JU.T4")&&(this.latticeCells[3]=D(a.w));if((this.doCentroidUnitCell=this.paramsCentroid)&&(-1==this.latticeCells[2]||
0==this.latticeCells[2]))this.latticeCells[2]=1;a=this.forcePacked||this.paramsPacked;this.centroidPacked=this.doCentroidUnitCell&&a;this.doPackUnitCell=!this.doCentroidUnitCell&&(a||0>this.latticeCells[2]);this.doApplySymmetry=0<this.latticeCells[0]&&0<this.latticeCells[1];this.doApplySymmetry||(this.latticeCells=F(3,0))});c(b,"doGetModel",function(a,d){if(null!=d&&null!=this.modelNameRequired&&0<this.modelNameRequired.length&&0>d.toUpperCase().indexOf(this.modelNameRequired))return!1;var g=null==
this.bsModels?1>this.desiredModelNumber||a==this.desiredModelNumber:a>this.lastModelNumber?!1:0<a&&this.bsModels.get(a-1)||this.haveModel&&null!=this.firstLastStep&&0>this.firstLastStep[1]&&(2>this.firstLastStep[2]||0==(a-1-this.firstLastStep[0])%this.firstLastStep[2]);g&&0==this.desiredModelNumber&&this.discardPreviousAtoms();this.haveModel=(new Boolean(this.haveModel|g)).valueOf();g&&(this.doProcessLines=!0);return g},"~N,~S");c(b,"discardPreviousAtoms",function(){this.asc.discardPreviousAtoms()});
c(b,"initializeSymmetry",function(){this.previousSpaceGroup=this.sgName;this.previousUnitCell=this.unitCellParams;this.iHaveUnitCell=this.ignoreFileUnitCell;if(!this.ignoreFileUnitCell){this.unitCellParams=L(27,0);for(var a=27;0<=--a;)this.unitCellParams[a]=NaN;this.unitCellParams[25]=this.latticeScaling;this.unitCellParams[26]=this.cellSlop;this.symmetry=null}this.ignoreFileSpaceGroupName||(this.sgName="unspecified!");this.doCheckUnitCell=!1});c(b,"newAtomSet",function(a){0<=this.asc.iSet?(this.asc.newAtomSet(),
this.asc.setCollectionName("<collection of "+(this.asc.iSet+1)+" models>")):this.asc.setCollectionName(a);this.asc.setModelInfoForSet("name",a,Math.max(0,this.asc.iSet));this.asc.setAtomSetName(a)},"~S");c(b,"cloneLastAtomSet",function(a,d){var g=this.asc.getLastAtomSetAtomCount();this.asc.cloneLastAtomSetFromPoints(a,d);this.asc.haveUnitCell&&(this.doCheckUnitCell=this.iHaveUnitCell=!0,this.sgName=this.previousSpaceGroup,this.unitCellParams=this.previousUnitCell);return g},"~N,~A");c(b,"setSpaceGroupName",
function(a){this.ignoreFileSpaceGroupName||null==a||(a=a.trim(),0==a.length||(a.equals("HM:")||a.equals(this.sgName))||(a.equals("P1")||JU.Logger.info("Setting space group name to "+a),this.sgName=a))},"~S");c(b,"setSymmetryOperator",function(a){if(this.ignoreFileSymmetryOperators)return-1;var d=this.asc.getXSymmetry().addSpaceGroupOperation(a,!0);0>d&&this.warnSkippingOperation(a);this.iHaveSymmetryOperators=!0;return d},"~S");c(b,"warnSkippingOperation",function(a){JU.Logger.warn("Skipping symmetry operation "+
a)},"~S");c(b,"initializeCartesianToFractional",function(){for(var a=0;16>a;a++)if(!Float.isNaN(this.unitCellParams[6+a]))return;for(a=0;16>a;a++)this.unitCellParams[6+a]=0==a%5?1:0;this.nMatrixElements=0});c(b,"clearUnitCell",function(){if(!this.ignoreFileUnitCell){for(var a=6;22>a;a++)this.unitCellParams[a]=NaN;this.checkUnitCell(6)}});c(b,"setUnitCellItem",function(a,d){this.ignoreFileUnitCell||(0==a&&1==d&&!this.allow_a_len_1||3==a&&0==d?(null==this.ucItems&&(this.ucItems=L(6,0)),this.ucItems[a]=
d):(null!=this.ucItems&&6>a&&(this.ucItems[a]=d),!Float.isNaN(d)&&(6<=a&&Float.isNaN(this.unitCellParams[6]))&&this.initializeCartesianToFractional(),this.unitCellParams[a]=d,this.debugging&&JU.Logger.debug("setunitcellitem "+a+" "+d),6>a||Float.isNaN(d)?this.iHaveUnitCell=this.checkUnitCell(6):12==++this.nMatrixElements&&(this.iHaveUnitCell=this.checkUnitCell(22))))},"~N,~N");c(b,"setUnitCell",function(a,d,g,b,c,f){this.ignoreFileUnitCell||(this.clearUnitCell(),this.unitCellParams[0]=a,this.unitCellParams[1]=
d,this.unitCellParams[2]=g,0!=b&&(this.unitCellParams[3]=b),0!=c&&(this.unitCellParams[4]=c),0!=f&&(this.unitCellParams[5]=f),this.iHaveUnitCell=this.checkUnitCell(6))},"~N,~N,~N,~N,~N,~N");c(b,"addExplicitLatticeVector",function(a,d,g){if(!this.ignoreFileUnitCell){if(0==a)for(var b=0;6>b;b++)this.unitCellParams[b]=0;a=6+3*a;this.unitCellParams[a++]=d[g++];this.unitCellParams[a++]=d[g++];this.unitCellParams[a]=d[g];if(Float.isNaN(this.unitCellParams[0]))for(a=0;6>a;a++)this.unitCellParams[a]=-1;if(this.iHaveUnitCell=
this.checkUnitCell(15)){if(this.slabXY||this.polymerX)this.unitCellParams[2]=-1;this.polymerX&&(this.unitCellParams[1]=-1)}}},"~N,~A,~N");c(b,"checkUnitCell",function(a){for(var d=0;d<a;d++)if(Float.isNaN(this.unitCellParams[d]))return!1;this.fixFloatA(this.unitCellParams);if(22==a&&1==this.unitCellParams[0]&&1==this.unitCellParams[1]&&1==this.unitCellParams[2]&&1==this.unitCellParams[6]&&1==this.unitCellParams[11]&&1==this.unitCellParams[16])return!1;6==a&&Float.isNaN(this.unitCellParams[6])&&(this.slabXY&&
0<this.unitCellParams[2]?(JU.SimpleUnitCell.addVectors(this.unitCellParams),this.unitCellParams[2]=-1):this.polymerX&&0<this.unitCellParams[1]&&(JU.SimpleUnitCell.addVectors(this.unitCellParams),this.unitCellParams[1]=this.unitCellParams[2]=-1));this.doApplySymmetry&&(this.getSymmetry(),this.doConvertToFractional=!this.fileCoordinatesAreFractional);return!0},"~N");c(b,"getSymmetry",function(){if(!this.iHaveUnitCell)return null;null==this.symmetry&&((this.symmetry=this.asc.newFileSymmetry()).setUnitCellFromParams(this.unitCellParams,
!1,this.cellSlop),this.checkUnitCellOffset());null==this.symmetry?this.iHaveUnitCell=!1:this.symmetry.setSpaceGroupName(this.sgName);return this.symmetry});c(b,"checkUnitCellOffset",function(){null==this.fileOffsetFractional||null==this.symmetry||(this.fileOffset.setT(this.fileOffsetFractional),this.unitCellOffsetFractional!=this.fileCoordinatesAreFractional&&(this.unitCellOffsetFractional?this.symmetry.toCartesian(this.fileOffset,!1):this.symmetry.toFractional(this.fileOffset,!1)))});c(b,"fractionalizeCoordinates",
function(a){if(null!=this.getSymmetry()){var d=this.asc.atoms;if(a)for(var g=this.asc.ac;0<=--g;)this.symmetry.toFractional(d[g],!1);else for(g=this.asc.ac;0<=--g;)this.symmetry.toCartesian(d[g],!1);this.setFractionalCoordinates(a)}},"~B");c(b,"setFractionalCoordinates",function(a){this.iHaveFractionalCoordinates=this.fileCoordinatesAreFractional=a;this.checkUnitCellOffset()},"~B");c(b,"setFilterAtomTypeStr",function(a){this.filterAtomTypeStr=a;this.filterAtomNameTerminator="\x00"},"~S");c(b,"setFilter",
function(a){null==a?a=this.htParams.get("filter"):this.filterCased=this.bsFilter=null;null==this.filterCased&&(this.filterCased=null==a?null:a+";");null!=a&&(a=a.toUpperCase());this.filter=a;null!=this.filter&&(this.checkFilterKeys(),this.filterSymmetry(),this.filterModelName(),this.filterAtoms(),a=this.getFilter("FILESCALING="),null!=a&&(a=this.parseFloatStr(a),this.fileScaling=JU.P3.new3(a,a,a),this.fileOffset=new JU.P3))},"~S");c(b,"filterAtoms",function(){this.checkFilterKey("HETATM")&&(this.filterHetero=
!0,this.filter=JU.PT.rep(this.filter,"HETATM","HETATM-Y"),this.filterCased=JU.PT.rep(this.filterCased,"HETATM","HETATM-Y"));this.checkFilterKey("ATOM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"ATOM","HETATM-N"),this.filterCased=JU.PT.rep(this.filterCased,"ATOM","HETATM-N"));this.filterAtomName=this.checkFilterKey("*.")||this.checkFilterKey("!.");if(this.filter.startsWith("_")||this.filter.startsWith("!_")||0<=this.filter.indexOf(";_")||0<=this.filter.indexOf(";!_"))this.filterElement=
this.checkFilterKey("_");this.filterGroup3=this.checkFilterKey("[");this.filterChain=this.checkFilterKey(":");this.filterAltLoc=this.checkFilterKey("%");this.filterEveryNth=this.checkFilterKey("/=");this.filterAllHetero=this.checkFilterKey("ALLHET");if(this.filterEveryNth)this.filterN=this.parseIntAt(this.filter,this.filter.indexOf("/=")+2);else if(this.filter.startsWith("=")||0<=this.filter.indexOf(";="))this.filterAtomType=this.checkFilterKey("=");-2147483648==this.filterN&&(this.filterEveryNth=
!1);this.haveAtomFilter=this.filterAtomName||this.filterAtomType||this.filterElement||this.filterGroup3||this.filterChain||this.filterAltLoc||this.filterHetero||this.filterEveryNth||this.checkFilterKey("/=");if(null==this.bsFilter&&(this.bsFilter=new JU.BS,this.htParams.put("bsFilter",this.bsFilter),this.haveAtomFilter)){var a;this.filter1Cased=this.filterCased;this.filter2Cased="";if(0<=(a=this.filter.indexOf("|")))this.filter1Cased=this.filter.substring(0,a).trim()+";",this.filter2Cased=";"+this.filter.substring(a).trim();
this.filter1=this.filter1Cased.toUpperCase();this.filter2=0==this.filter2Cased.length?null:this.filter2Cased.toUpperCase()}});c(b,"filterModelName",function(){this.modelNameRequired=JU.PT.getQuotedAttribute(this.filter,"NAME");null!=this.modelNameRequired&&(0==this.modelNameRequired.length&&(this.modelNameRequired=this.getFilter("NAME="),this.modelNameRequired.startsWith("'")&&(this.modelNameRequired=JU.PT.split(this.modelNameRequired,"'")[1])),this.filter=JU.PT.rep(this.filter,this.modelNameRequired,
""),this.filter=JU.PT.rep(this.filter,"NAME=",""),this.filter=JU.PT.rep(this.filter,'""',""),this.filter=JU.PT.rep(this.filter,"''",""))});c(b,"filterSymmetry",function(){this.checkFilterKey("CELL=")&&(this.strSupercell=this.filter.substring(this.filter.indexOf("CELL=")+5).toLowerCase());this.filter=";"+this.filter+";";JU.Logger.info("filtering with "+this.filter);var a=this.getFilter("SYMOP=");null!=a&&(this.filterSymop=" "+a.$replace(","," ")+" ");this.filter=this.filter.$replace(",",";");a=this.getFilter("PRECISION=");
null!=a&&(a=JU.PT.parseInt(a),0<a&&16>=a&&(this.precision=1E3+a,this.filteredPrecision=!0));a=this.getFilter("LATTICESCALING=");null!=a&&25<this.unitCellParams.length&&(this.unitCellParams[25]=this.latticeScaling=this.parseFloatStr(a))});c(b,"checkFilterKeys",function(){this.doSetOrientation=!this.checkFilterKey("NOORIENT");this.doCentralize=!this.checkFilterKey("NOCENTER")&&this.checkFilterKey("CENTER");this.addVibrations=!this.checkFilterKey("NOVIB");this.ignoreStructure=this.checkFilterKey("DSSP");
this.isDSSP1=this.checkFilterKey("DSSP1");this.doReadMolecularOrbitals=!this.checkFilterKey("NOMO");this.useAltNames=this.checkFilterKey("ALTNAME");this.reverseModels=this.checkFilterKey("REVERSEMODELS");this.allow_a_len_1=this.checkFilterKey("TOPOS");this.slabXY=this.checkFilterKey("SLABXY");this.polymerX=!this.slabXY&&this.checkFilterKey("POLYMERX");this.noHydrogens=this.checkFilterKey("NOH");this.noMinimize=this.checkFilterKey("NOMIN");this.optimize2D=this.checkFilterKey("2D")&&!this.noHydrogens&&
!this.noMinimize;this.noPack=this.checkFilterKey("NOPACK");this.openVarna=this.checkFilterKey("VARNA");this.checkFilterKey("LOWPRECISION")&&this.setLowPrecision();this.checkFilterKey("HETATM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"HETATM","HETATM-Y"),this.filterCased=JU.PT.rep(this.filterCased,"HETATM","HETATM-Y"));this.checkFilterKey("ATOM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"ATOM","HETATM-N"),this.filterCased=JU.PT.rep(this.filterCased,"ATOM","HETATM-N"))});
c(b,"getFilterWithCase",function(a){var d=null==this.filterCased?-1:this.filterCased.toUpperCase().indexOf(a.toUpperCase());return 0>d?null:this.filterCased.substring(d+a.length,this.filterCased.indexOf(";",d))},"~S");c(b,"getFilter",function(a){var d=null==this.filter?-1:this.filter.indexOf(a);return 0>d?null:this.filter.substring(d+a.length,this.filter.indexOf(";",d))},"~S");c(b,"checkFilterKey",function(a){return null!=this.filter&&0<=this.filter.indexOf(a)},"~S");c(b,"checkAndRemoveFilterKey",
function(a){if(!this.checkFilterKey(a))return!1;this.filter=JU.PT.rep(this.filter,a,"");3>this.filter.length&&(this.filter=null);return!0},"~S");c(b,"filterAtom",function(a,d){if(!this.haveAtomFilter)return!0;var g=this.checkFilter(a,this.filter1,this.filter1Cased);null!=this.filter2&&(g=(new Boolean(g|this.checkFilter(a,this.filter2,this.filter2Cased))).valueOf());if(g&&this.filterEveryNth&&(!a.isHetero||!this.filterAllHetero))g=0==this.nFiltered++%this.filterN;this.bsFilter.setBitTo(0<=d?d:this.asc.ac,
g);return g},"J.adapter.smarter.Atom,~N");c(b,"checkFilter",function(a,d,g){return a.isHetero&&this.filterAllHetero?!0:(!this.filterGroup3||null==a.group3||!this.filterReject(d,"[",a.group3.toUpperCase()+"]"))&&(!this.filterAtomName||this.allowAtomName(a.atomName,d))&&(null==this.filterAtomTypeStr||null==a.atomName||0<=a.atomName.toUpperCase().indexOf("\x00"+this.filterAtomTypeStr))&&(!this.filterElement||null==a.elementSymbol||!this.filterReject(d,"_",a.elementSymbol.toUpperCase()+";"))&&(!this.filterChain||
0==a.chainID||!this.filterReject(g,":",""+this.vwr.getChainIDStr(a.chainID)))&&(!this.filterAltLoc||"\x00"==a.altLoc||!this.filterReject(d,"%",""+a.altLoc))&&(!this.filterHetero||!this.allowPDBFilter||!this.filterReject(d,"HETATM",a.isHetero?"-Y":"-N"))},"J.adapter.smarter.Atom,~S,~S");c(b,"rejectAtomName",function(a){return this.filterAtomName&&!this.allowAtomName(a,this.filter)},"~S");c(b,"allowAtomName",function(a,d){return null==a||!this.filterReject(d,".",a.toUpperCase()+this.filterAtomNameTerminator)},
"~S,~S");c(b,"filterReject",function(a,d,g){return 0<=a.indexOf(d)&&0<=a.indexOf("!"+d)==0<=a.indexOf(d+g)},"~S,~S,~S");c(b,"set2D",function(){this.asc.setInfo("is2D",Boolean.TRUE);this.asc.getBSAtoms(-1);this.noHydrogens&&(this.asc.setInfo("noHydrogen",Boolean.TRUE),this.optimize2D=!1);this.optimize2D?(this.asc.fix2Stereo(),this.asc.setInfo("doMinimize",Boolean.TRUE),this.appendLoadNote("This model is 2D. Its 3D structure was generated.")):(this.appendLoadNote('This model is 2D. Its 3D structure has not been generated; use LOAD "" FILTER "2D" to optimize 3D.'),
this.addJmolScript("select thismodel;wireframe only"))});c(b,"doGetVibration",function(a){return this.addVibrations&&(0>=this.desiredVibrationNumber||a==this.desiredVibrationNumber)},"~N");c(b,"setTransform",function(a,d,g,b,c,f,h,k,m){null==this.matRot&&this.doSetOrientation&&(this.matRot=new JU.M3,a=JU.V3.new3(a,d,g),a.normalize(),this.matRot.setColumnV(0,a),a.set(b,c,f),a.normalize(),this.matRot.setColumnV(1,a),a.set(h,k,m),a.normalize(),this.matRot.setColumnV(2,a),this.asc.setInfo("defaultOrientationMatrix",
JU.M3.newM3(this.matRot)),b=JU.Quat.newM(this.matRot),this.asc.setInfo("defaultOrientationQuaternion",b),JU.Logger.info("defaultOrientationMatrix = "+this.matRot))},"~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"setAtomCoordXYZ",function(a,d,g,b){a.set(d,g,b);this.setAtomCoord(a)},"J.adapter.smarter.Atom,~N,~N,~N");c(b,"setAtomCoordScaled",function(a,d,g,b){null==a&&(a=this.asc.addNewAtom());this.setAtomCoordXYZ(a,this.parsePrecision(d[g])*b,this.parsePrecision(d[g+1])*b,this.parsePrecision(d[g+2])*b);return a},
"J.adapter.smarter.Atom,~A,~N,~N");c(b,"setAtomCoordTokens",function(a,d,g){this.setAtomCoordXYZ(a,this.parsePrecision(d[g]),this.parsePrecision(d[g+1]),this.parsePrecision(d[g+2]))},"J.adapter.smarter.Atom,~A,~N");c(b,"addAtomXYZSymName",function(a,d,g,b){var c=this.asc.addNewAtom();null!=g&&(c.elementSymbol=g);null!=b&&(c.atomName=b);this.setAtomCoordTokens(c,a,d);return c},"~A,~N,~S,~S");c(b,"setAtomCoord",function(a){var d=this.doConvertToFractional&&!this.fileCoordinatesAreFractional&&null!=
this.getSymmetry();null!=this.fileScaling&&(a.x=a.x*this.fileScaling.x+this.fileOffset.x,a.y=a.y*this.fileScaling.y+this.fileOffset.y,a.z=a.z*this.fileScaling.z+this.fileOffset.z);d&&(this.symmetry.haveUnitCell()||this.symmetry.setUnitCellFromParams(this.unitCellParams,!1,NaN),this.symmetry.toFractional(a,!1),this.iHaveFractionalCoordinates=!0);this.floatifyJavaDouble&&this.fileCoordinatesAreFractional&&this.fixFloatPt(a,1E5);this.doCheckUnitCell=!0},"J.adapter.smarter.Atom");c(b,"addSites",function(a){this.asc.setCurrentModelInfo("pdbSites",
a);var d="",g;for(a=a.entrySet().iterator();a.hasNext()&&((g=a.next())||1);){for(var b=g.getKey(),c=g.getValue(),f,h=b.length;0<=--h;)if(!JU.PT.isLetterOrDigit(f=b.charAt(h))&&"'"!=f)b=b.substring(0,h)+"_"+b.substring(h+1);c=c.get("groups");0!=c.length&&(this.addSiteScript("@site_"+b+" "+c),this.addSiteScript("site_"+b+' = ["'+JU.PT.rep(c,",",'","')+'"]'),d+=',"site_'+b+'"')}0<d.length&&this.addSiteScript("site_list = ["+d.substring(1)+"]")},"java.util.Map");c(b,"applySymmetryAndSetTrajectory",function(){this.applySymTrajASCR()});
c(b,"applySymTrajASCR",function(){this.forcePacked&&this.initializeSymmetryOptions();var a=null;this.iHaveUnitCell&&this.doCheckUnitCell?(a=this.getSymmetry(),this.setPrecision(),a=this.asc.getXSymmetry().applySymmetryFromReader(a)):this.asc.setTensors();this.isTrajectory&&this.asc.setTrajectory();null!=this.moreUnitCellInfo&&(this.setMoreInfo(),this.moreUnitCellInfo=null);this.finalizeSubclassSymmetry(null!=a);this.merging&&(null!=a&&this.iHaveFractionalCoordinates&&this.iHaveUnitCell&&this.iHaveSymmetryOperators)&&
(this.fractionalizeCoordinates(!1),this.addJmolScript("modelkit spacegroup P1"));this.initializeSymmetry();return a});c(b,"setMoreInfo",function(){this.asc.setCurrentModelInfo("moreUnitCellInfo",this.moreUnitCellInfo);for(var a=this.moreUnitCellInfo.size();0<=--a;){var d=this.moreUnitCellInfo.get(a).$plit("=");this.asc.setCurrentModelInfo(d[0],d[1])}});c(b,"finalizeSubclassSymmetry",function(){},"~B");c(b,"doPreSymmetry",function(){},"~B");c(b,"finalizeMOData",function(a){this.asc.setCurrentModelInfo("moData",
a);null!=a&&(a=a.get("mos"),null!=a&&JU.Logger.info(a.size()+" molecular orbitals read in model "+this.asc.atomSetCount))},"java.util.Map");b.getElementSymbol=c(b,"getElementSymbol",function(a){return J.api.JmolAdapter.getElementSymbol(a)},"~N");c(b,"fillDataBlock",function(a,d){for(var g=a.length,b=0;b<g;b++)a[b]=JU.PT.getTokens(this.discardLinesUntilNonBlank()),a[b].length<d&&--b},"~A,~N");c(b,"fill3x3",function(a,d){for(var g=R(3,3,0),b=null==a,c=d,f=0;3>f;f++){if(b||d>=a.length){for(;3>(a=JU.PT.getTokens(this.rd())).length;);
d=0>c?a.length+c:c}for(var h=0;3>h;h++)g[f][h]=Double.$valueOf(a[d++]).doubleValue()}return g},"~A,~N");c(b,"fillFloatArray",function(a,d,g){for(var b=[],c=0,f=0;f<g.length;f++){for(;null!=b&&c>=b.length;){null==a&&(a=this.rd());if(0==d)b=JU.PT.getTokens(a);else{b=Array(w(a.length/d));for(c=0;c<b.length;c++)b[c]=a.substring(c*d,(c+1)*d)}a=null;c=0}if(null==b)break;g[f]=this.parseFloatStr(b[c++])}return g},"~S,~N,~A");c(b,"fillFrequencyData",function(a,d,g,b,c,f,h,k,m,E){var j=0!=d&&g!=d&&null==E;
0==d&&null!=k&&(d=k.length);d=c?d:3*d;var q=b.length;if(null==E)E=Array(d),this.fillDataBlockFixed(E,f,h,m);else if(!c){this.fillDataBlockFixed(E,f,h,-m);if(null==E[0])return;a+=this.parseIntAt(this.line,m-5)-1}for(h=f=0;f<d;f++,h++){m=E[f];for(var r=c?null:E[++f],u=c?null:E[++f],C=m.length-(c?3*q:q)-1,G=0,N=0;N<q;N++){++C;var w=m[C];")"==w.charAt(0)&&(w=w.substring(1));var w=this.parseFloatStr(w),v=this.parseFloatStr(c?m[++C]:r[C]),s=this.parseFloatStr(c?m[++C]:u[C]);if(!b[N]){var n=null==k?h:k[h];
0>n||(n+=a+g*G++,this.debugging&&JU.Logger.debug("atom "+n+" vib"+G+": "+w+" "+v+" "+s),this.asc.addVibrationVectorWithSymmetry(n,w,v,s,j))}}}},"~N,~N,~N,~A,~B,~N,~N,~A,~N,~A");c(b,"fillDataBlockFixed",function(a,d,g,b){if(0==g)this.fillDataBlock(a,b);else for(var c=a.length,f=0;f<c;f++){this.discardLinesUntilNonBlank();if(0>b&&" "==this.line.charAt(-b)){a[0]=null;break}var h=w((this.line.length-d+1)/g);a[f]=Array(h);for(var k=0,m=d;k<h;k++,m+=g)a[f][k]=this.line.substring(m,Math.min(this.line.length,
m+g))}},"~A,~N,~N,~N");c(b,"readLines",function(a){for(;0<=--a;)this.rd();return this.line},"~N");c(b,"discardLinesUntilStartsWith",function(a){for(;null!=this.rd()&&!this.line.startsWith(a););return this.line},"~S");c(b,"discardLinesUntilContains",function(a){for(;null!=this.rd()&&0>this.line.indexOf(a););return this.line},"~S");c(b,"discardLinesUntilContains2",function(a,d){for(;null!=this.rd()&&0>this.line.indexOf(a)&&0>this.line.indexOf(d););return this.line},"~S,~S");c(b,"discardLinesUntilBlank",
function(){for(;null!=this.rd()&&0!=this.line.trim().length;);return this.line});c(b,"discardLinesUntilNonBlank",function(){for(;null!=this.rd()&&0==this.line.trim().length;);return this.line});c(b,"checkLineForScript",function(a){this.line=a;this.checkCurrentLineForScript()},"~S");c(b,"checkCurrentLineForScript",function(){this.line.endsWith("#noautobond")&&(this.line=this.line.substring(0,this.line.lastIndexOf("#")).trim(),this.asc.setNoAutoBond());var a=this.line.indexOf("jmolscript:");if(0<=a){var d=
this.line.substring(a+11,this.line.length);0<=d.indexOf("#")&&(d=d.substring(0,d.indexOf("#")));this.addJmolScript(d);this.line=this.line.substring(0,a).trim()}});c(b,"addJmolScript",function(a){JU.Logger.info("#jmolScript: "+a);null==this.previousScript?this.previousScript="":this.previousScript.endsWith(";")||(this.previousScript+=";");this.previousScript+=a;this.asc.setInfo("jmolscript",this.previousScript)},"~S");c(b,"addSiteScript",function(a){null==this.siteScript?this.siteScript="":this.siteScript.endsWith(";")||
(this.siteScript+=";");this.siteScript+=a;this.asc.setInfo("sitescript",this.siteScript)},"~S");c(b,"rd",function(){return this.RL()});c(b,"RL",function(){this.prevline=this.line;this.line=this.reader.readLine();null!=this.out&&null!=this.line&&this.out.append(this.line).append("\n");this.ptLine++;this.debugging&&null!=this.line&&JU.Logger.info(this.line);return this.line});b.getStrings=c(b,"getStrings",function(a,d,g){for(var b=Array(d),c=0,f=0;c<d;c++,f+=g)b[c]=a.substring(f,f+g);return b},"~S,~N,~N");
c(b,"getTokens",function(){return JU.PT.getTokens(this.line)});b.getTokensFloat=c(b,"getTokensFloat",function(a,d,g){null==d&&(d=L(g,0));JU.PT.parseFloatArrayDataN(JU.PT.getTokens(a),d,g);return d},"~S,~A,~N");c(b,"parseFloat",function(){return JU.PT.parseFloatNext(this.line,this.next)});c(b,"parseFloatStr",function(a){this.next[0]=0;return JU.PT.parseFloatNext(a,this.next)},"~S");c(b,"parseFloatRange",function(a,d,g){this.next[0]=d;return JU.PT.parseFloatRange(a,g,this.next)},"~S,~N,~N");c(b,"parseInt",
function(){return JU.PT.parseIntNext(this.line,this.next)});c(b,"parseIntStr",function(a){this.next[0]=0;return JU.PT.parseIntNext(a,this.next)},"~S");c(b,"parseIntAt",function(a,d){this.next[0]=d;return JU.PT.parseIntNext(a,this.next)},"~S,~N");c(b,"parseIntRange",function(a,d,g){this.next[0]=d;return JU.PT.parseIntRange(a,g,this.next)},"~S,~N,~N");c(b,"parseToken",function(){return JU.PT.parseTokenNext(this.line,this.next)});c(b,"parseTokenStr",function(a){this.next[0]=0;return JU.PT.parseTokenNext(a,
this.next)},"~S");c(b,"parseTokenNext",function(a){return JU.PT.parseTokenNext(a,this.next)},"~S");c(b,"parseTokenRange",function(a,d,g){this.next[0]=d;return JU.PT.parseTokenRange(a,g,this.next)},"~S,~N,~N");b.getFortranFormatLengths=c(b,"getFortranFormatLengths",function(a){var d=new JU.Lst,g=0,b=0,c=1,f=!1,h=!0;a+=",";for(var k=0;k<a.length;k++){var m=a.charAt(k);switch(m.charCodeAt(0)){case 46:f=!1;continue;case 44:for(f=0;f<b;f++)d.addLast(Integer.$valueOf(g*c));f=!1;h=!0;b=0;continue;case 88:g=
b;b=1;c=-1;continue}JU.PT.isDigit(m)?f?g=10*g+m.charCodeAt(0)-48:h&&(b=10*b+m.charCodeAt(0)-48):JU.PT.isLetter(m)?(g=0,f=!0,h=!1,c=1):f=!1}return d},"~S");c(b,"read3Vectors",function(a){for(var d=Array(3),g=L(3,0),b=0;3>b;b++){if(0<b||Float.isNaN(this.parseFloatStr(this.line)))if(this.rd(),0==b&&null!=this.line){b=-1;continue}this.fillFloatArray(this.line,0,g);d[b]=new JU.V3;d[b].setA(g);a&&d[b].scale(0.5291772)}return d},"~B");c(b,"setElementAndIsotope",function(a,d){var g=this.parseIntStr(d);-2147483648==
g?a.elementSymbol=d:(d=d.substring((""+g).length),a.elementNumber=0==d.length?g:(g<<7)+J.api.JmolAdapter.getElementNumber(d))},"J.adapter.smarter.Atom,~S");c(b,"finalizeModelSet",function(){});c(b,"setChainID",function(a,d){a.chainID=this.vwr.getChainID(d,!0)},"J.adapter.smarter.Atom,~S");j(b,"readNextLine",function(){null!=this.rd()&&0<=this.line.indexOf("#jmolscript:")&&this.checkCurrentLineForScript();return this.line});c(b,"addMoreUnitCellInfo",function(a){null==this.moreUnitCellInfo&&(this.moreUnitCellInfo=
new JU.Lst);this.moreUnitCellInfo.addLast(a)},"~S");c(b,"getInterface",function(a){a=J.api.Interface.getInterface(a,this.vwr,"file");if(null==a)throw new NullPointerException("Interface");return a},"~S");c(b,"forceSymmetry",function(a){a&&(this.doPackUnitCell=a);this.doApplySymmetry||(this.doApplySymmetry=!0,this.latticeCells[0]=this.latticeCells[1]=this.latticeCells[2]=1)},"~B");c(b,"fixFloatA",function(a){if(this.floatifyJavaDouble)for(var d=a.length;0<=--d;)Float.isNaN(a[d])||(a[d]=JU.PT.fixFloat(a[d],
1E5))},"~A");c(b,"fixDoubleA",function(a){if(this.floatifyJavaDouble)for(var d=a.length;0<=--d;)Double.isNaN(a[d])||(a[d]=JU.PT.fixDouble(a[d],1E5))},"~A");c(b,"fixFloatPt",function(a,d){this.floatifyJavaDouble&&JU.PT.fixPtFloats(a,d)},"JU.P3,~N")});s("J.adapter.smarter");n(function(){this.atomSetIndex=0;v(this,arguments)},J.adapter.smarter,"AtomSetObject",null);s("J.adapter.smarter");B(["J.adapter.smarter.AtomSetObject"],"J.adapter.smarter.Bond",null,function(){var b=n(function(){this.order=this.atomIndex2=
this.atomIndex1=0;this.uniqueID=this.colix=this.pymolRadius=-1;this.distance=0;v(this,arguments)},J.adapter.smarter,"Bond",J.adapter.smarter.AtomSetObject);A(b,function(a,d,g){M(this,J.adapter.smarter.Bond,[]);this.atomIndex1=a;this.atomIndex2=d;this.order=g},"~N,~N,~N");j(b,"toString",function(){return"[Bond "+this.atomIndex1+" "+this.atomIndex2+" "+this.order+"]"})});s("J.adapter.smarter");B(["J.api.JmolAdapterBondIterator"],"J.adapter.smarter.BondIterator",null,function(){var b=n(function(){this.bonds=
this.bsAtoms=null;this.ibond=0;this.bond=null;this.bondCount=0;v(this,arguments)},J.adapter.smarter,"BondIterator",J.api.JmolAdapterBondIterator);A(b,function(a){M(this,J.adapter.smarter.BondIterator,[]);this.bsAtoms=a.bsAtoms;this.bonds=a.bonds;this.bondCount=a.bondCount;this.ibond=0},"J.adapter.smarter.AtomSetCollection");j(b,"hasNext",function(){if(this.ibond==this.bondCount)return!1;for(;null==(this.bond=this.bonds[this.ibond++])||null!=this.bsAtoms&&(!this.bsAtoms.get(this.bond.atomIndex1)||
!this.bsAtoms.get(this.bond.atomIndex2));)if(this.ibond==this.bondCount)return!1;return!0});j(b,"getAtomUniqueID1",function(){return Integer.$valueOf(this.bond.atomIndex1)});j(b,"getAtomUniqueID2",function(){return Integer.$valueOf(this.bond.atomIndex2)});j(b,"getEncodedOrder",function(){return this.bond.order});j(b,"getPymolRadius",function(){return this.bond.pymolRadius});j(b,"getColix",function(){return this.bond.colix})});s("J.adapter.smarter");B(null,"J.adapter.smarter.Resolver","java.io.BufferedInputStream java.util.StringTokenizer JU.LimitedLineReader $.PT $.Rdr J.adapter.smarter.AtomSetCollectionReader $.SmarterJmolAdapter J.api.Interface JU.Logger".split(" "),
function(){var b=I(J.adapter.smarter,"Resolver",null);b.getReaderClassBase=c(b,"getReaderClassBase",function(a){var d=a+"Reader";if(a.startsWith("Xml"))return"J.adapter.readers.xml."+d;a=";"+a+";";for(var g=1;g<J.adapter.smarter.Resolver.readerSets.length;g+=2)if(0<=J.adapter.smarter.Resolver.readerSets[g].indexOf(a))return"J.adapter.readers."+J.adapter.smarter.Resolver.readerSets[g-1]+d;return"J.adapter.readers.???."+d},"~S");b.getFileType=c(b,"getFileType",function(a){try{return J.adapter.smarter.Resolver.determineAtomSetCollectionReader(a,
null)}catch(d){if(H(d,Exception))return null;throw d;}},"java.io.BufferedReader");b.getAtomCollectionReader=c(b,"getAtomCollectionReader",function(a,d,g,b,c){var f;a=J.adapter.smarter.Resolver.fixDOSName(a);var h=null;null==d&&(d=J.adapter.smarter.Resolver.getFileTypefromFilter(b.get("filter")));null!=d?(f=J.adapter.smarter.Resolver.getReaderFromType(d),null==f&&(f=J.adapter.smarter.Resolver.getReaderFromType("Xml"+d)),null==f?h="unrecognized file format type "+d+" file="+a:JU.Logger.info("The Resolver assumes "+
f+" file="+a)):(f=J.adapter.smarter.Resolver.determineAtomSetCollectionReader(g,b),"\n"==f.charAt(0)?h="unrecognized file format for file\n"+a+"\n"+J.adapter.smarter.Resolver.split(f,50):f.equals("spt")?h="NOTE: file recognized as a script file: "+a+"\n":a.equals("ligand")||JU.Logger.info("The Resolver thinks "+f));if(null!=h)return J.adapter.smarter.SmarterJmolAdapter.close(g),JU.Logger.error(h),h;b.put("ptFile",Integer.$valueOf(c));0>=c&&b.put("readerName",f);return J.adapter.smarter.Resolver.getReader(f,
b)},"~S,~S,~O,java.util.Map,~N");b.getReader=c(b,"getReader",function(a){var d=null,g=null,d=null,g=J.adapter.smarter.Resolver.getReaderClassBase(a);if(null==(d=J.api.Interface.getInterface(g,null,"reader")))d="File reader was not found:"+g,JU.Logger.error(d);return d},"~S,java.util.Map");b.getReaderFromType=c(b,"getReaderFromType",function(a){if(null!=a){a.endsWith("(XML)")&&(a="Xml"+a.substring(0,a.length-5));a=";"+a.toLowerCase()+";";if(0<=";zmatrix;cfi;c;vfi;v;mnd;jag;gms;g;gau;mp;nw;orc;pqs;qc;".indexOf(a))return"Input";
for(var d,g,b=J.adapter.smarter.Resolver.readerSets.length;0<=--b;)if(0<=(g=(d=J.adapter.smarter.Resolver.readerSets[b--]).toLowerCase().indexOf(a)))return d.substring(g+1,d.indexOf(";",g+2))}return null},"~S");b.split=c(b,"split",function(a,d){for(var g="",b=a.length,c=0,f=0;c<b;c=f)g+=a.substring(c,f=Math.min(c+d,b))+"\n";return g},"~S,~N");b.DOMResolve=c(b,"DOMResolve",function(a){var d=J.adapter.smarter.Resolver.getXmlType(a.get("nameSpaceInfo"));JU.Logger.debugging&&JU.Logger.debug("The Resolver thinks "+
d);a.put("readerName",d);return J.adapter.smarter.Resolver.getReader("XmlReader",a)},"java.util.Map");b.determineAtomSetCollectionReader=c(b,"determineAtomSetCollectionReader",function(a,d){var g;if(y(a,"javajs.api.GenericBinaryDocument"))return g=J.adapter.smarter.Resolver.getBinaryType(a.getInputStream()),null==g?"binary file type not recognized":g;if(y(a,"java.io.InputStream")){g=J.adapter.smarter.Resolver.getBinaryType(a);if(null!=g)return g;a=JU.Rdr.getBufferedReader(new java.io.BufferedInputStream(a),
null)}var b=a,c=new JU.LimitedLineReader(b,16384),f=c.getHeader(64);if(0==f.length)throw new java.io.EOFException("File contains no data.");var f=f.trim(),h=!1;if(0<f.length){if(1==f.indexOf("PNG")&&0<=f.indexOf("PNGJ"))return"pngj";if(1==f.indexOf("PNG")||1==f.indexOf("JPG")||6==f.indexOf("JFIF"))return"spt";if(0<=f.indexOf('"num_pairs"'))return"dssr";if(0<=f.indexOf("output.31\n"))return"GenNBO|output.31";if(null!=(g=J.adapter.smarter.Resolver.checkFileStart(f)))return g.equals("Xml")?J.adapter.smarter.Resolver.getXmlType(c.getHeader(0)):
g;if((h="{"==f.charAt(0))&&null!=(g=J.adapter.smarter.Resolver.checkJsonHeader(f)))return g}for(var k=Array(16),m=g=0;m<k.length;++m)k[m]=c.readLineWithNewline(),0<k[m].length&&g++;if(null!=(g=J.adapter.smarter.Resolver.checkSpecial1(g,k,f))||null!=(g=J.adapter.smarter.Resolver.checkLineStarts(k))||null!=(g=J.adapter.smarter.Resolver.checkHeaderContains(c.getHeader(0)))||null!=(g=J.adapter.smarter.Resolver.checkSpecial2(k)))return g;if(h){b=b.readLine();if(null!=(g=J.adapter.smarter.Resolver.checkJSONContains(b)))return null!=
d&&d.put("fileData",b),g;b=null==d?null:b.substring(0,Math.min(100,b.length))}else if(null==d)b=null;else{if(null!=(g=J.adapter.smarter.Resolver.getReaderFromType(d.get("defaultType"))))return g;b="\n"+k[0]+"\n"+k[1]+"\n"+k[2]+"\n"}return b},"~O,java.util.Map");b.checkJsonHeader=c(b,"checkJsonHeader",function(a){return a.startsWith('{"SSG_international_symbol')?"FSGOutput":null},"~S");b.getBinaryType=c(b,"getBinaryType",function(a){a=JU.Rdr.getMagic(a,100);var d=a[0]&255;return JU.Rdr.isPickleB(a)?
"PyMOL":222==d?J.adapter.smarter.Resolver.bytesMatch(a,4,J.adapter.smarter.Resolver.mmtfMagic)?"MMTF":null:131==d?J.adapter.smarter.Resolver.checkBCIF(a,!0)?"BCIF":null:J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cdxMagic)?"CDX":J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cmdfMagic)?"Cmdf":J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cmdxMagic)?"Cmdx":null},"java.io.InputStream");b.checkBCIF=c(b,"checkBCIF",function(a,d){return J.adapter.smarter.Resolver.bytesMatch(a,
10,J.adapter.smarter.Resolver.bcifMolstarMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifModelMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifModelMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifCoordMagic)?d:J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifDensityMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifVolumeMagic)?!d:0>J.adapter.smarter.Resolver.findBytes(a,
J.adapter.smarter.Resolver.bcifServerMagic)==d},"~A,~B");b.findBytes=c(b,"findBytes",function(a,d){var g=a.length-d.length;a:for(;0<=--g;){for(var b=d.length;0<=--b;)if(a[g+b]!=d[b])continue a;return g}return-1},"~A,~A");b.bytesMatch=c(b,"bytesMatch",function(a,d,g){if(g.length>a.length-d)return!1;for(var b=g.length;0<=--b;)if(a[d+b]!=g[b])return!1;return!0},"~A,~N,~A");b.checkFileStart=c(b,"checkFileStart",function(a){for(var d=0;d<J.adapter.smarter.Resolver.fileStartsWithRecords.length;++d)for(var g=
J.adapter.smarter.Resolver.fileStartsWithRecords[d],b=1;b<g.length;++b)if(a.startsWith(g[b]))return g[0];return null},"~S");b.checkSpecial1=c(b,"checkSpecial1",function(a,d,g){if(1==a&&0<d[0].length&&JU.PT.isDigit(d[0].charAt(0)))return"Jme";if(J.adapter.smarter.Resolver.checkMopacGraphf(d))return"MopacGraphf";if(J.adapter.smarter.Resolver.checkOdyssey(d))return"Odyssey";switch(J.adapter.smarter.Resolver.checkMol(d)){case 1:case 3:case 2E3:case 3E3:return"Mol"}switch(J.adapter.smarter.Resolver.checkXyz(d)){case 1:return"Xyz";
case 2:return"Bilbao";case 3:return"PWmat"}return J.adapter.smarter.Resolver.checkAlchemy(d[0])?"Alchemy":J.adapter.smarter.Resolver.checkFoldingXyz(d)?"FoldingXyz":J.adapter.smarter.Resolver.checkXSF(d)?"Xcrysden":J.adapter.smarter.Resolver.checkCube(d)?"Cube":J.adapter.smarter.Resolver.checkWien2k(d)?"Wien2k":J.adapter.smarter.Resolver.checkAims(d)?"Aims":J.adapter.smarter.Resolver.checkGenNBO(d,g)?"GenNBO":null},"~N,~A,~S");b.checkXSF=c(b,"checkXSF",function(a){for(var d=0;0==a[d].length;)d++;
return a[d].startsWith("ANIMSTEPS ")||a[d].equals("ATOMS\n")&&0<JU.PT.parseInt(a[d+1])},"~A");b.checkAims=c(b,"checkAims",function(a){for(var d=0;d<a.length&&!a[d].startsWith("mol 1");d++){var g=JU.PT.getTokens(a[d]);if(0!=g.length&&(g[0].startsWith("atom")&&4<g.length&&Float.isNaN(JU.PT.parseFloat(g[4]))||g[0].startsWith("multipole")&&6<=g.length||g[0].startsWith("lattice_vector")&&4<=g.length))return!0}return!1},"~A");b.checkAlchemy=c(b,"checkAlchemy",function(a){var d;return 0<(d=a.indexOf("ATOMS"))&&
a.indexOf("BONDS")>d?0<JU.PT.parseInt(a.substring(0,d).trim()):!1},"~S");b.isInt=c(b,"isInt",function(a){J.adapter.smarter.Resolver.n[0]=0;a=a.trim();return 0<a.length&&-2147483648!=JU.PT.parseIntNext(a,J.adapter.smarter.Resolver.n)&&J.adapter.smarter.Resolver.n[0]==a.length},"~S");b.isFloat=c(b,"isFloat",function(a){return!Float.isNaN(JU.PT.parseFloat(a))},"~S");b.checkCube=c(b,"checkCube",function(a){for(var d=2;5>=d;d++){var g=new java.util.StringTokenizer(a[d]),b=g.countTokens();if(!(4==b||2==
d&&5==b)||!J.adapter.smarter.Resolver.isInt(g.nextToken()))return!1;for(var c=3;0<=--c;)if(!J.adapter.smarter.Resolver.isFloat(g.nextToken()))return!1;if(5==b&&!J.adapter.smarter.Resolver.isInt(g.nextToken()))return!1}return!0},"~A");b.checkFoldingXyz=c(b,"checkFoldingXyz",function(a){var d=new java.util.StringTokenizer(a[0].trim()," \t");if(2>d.countTokens()||!J.adapter.smarter.Resolver.isInt(d.nextToken().trim()))return!1;d=a[1].trim();0==d.length&&(d=a[2].trim());d=new java.util.StringTokenizer(d,
" \t");return 0<d.countTokens()&&J.adapter.smarter.Resolver.isInt(d.nextToken().trim())},"~A");b.checkGenNBO=c(b,"checkGenNBO",function(a,d){return 0<=d.indexOf("$GENNBO")||a[1].startsWith(" Basis set information needed for plotting orbitals")||0<=a[1].indexOf("s in the AO basis:")||0<=a[1].indexOf("***** NBO ")||0<=a[2].indexOf(" N A T U R A L   A T O M I C   O R B I T A L")},"~A,~S");b.checkMol=c(b,"checkMol",function(a){var d=("X"+a[3]).trim().toUpperCase();if(7>d.length||0<=d.indexOf(".")||a[0].startsWith("data_"))return 0;
if(d.endsWith("V2000"))return 2E3;if(d.endsWith("V3000"))return 3E3;var d=JU.PT.parseInt(a[3].substring(0,3).trim()),g=JU.PT.parseInt(a[3].substring(3,6).trim());return 0<d&&0<=g&&0!=a[0].indexOf("@<TRIPOS>")&&0!=a[1].indexOf("@<TRIPOS>")&&0!=a[2].indexOf("@<TRIPOS>")?3:0},"~A");b.checkMopacGraphf=c(b,"checkMopacGraphf",function(a){return 2<a[0].indexOf("MOPAC-Graphical data")},"~A");b.checkOdyssey=c(b,"checkOdyssey",function(a){var d;for(d=0;d<a.length&&(a[d].startsWith("C ")||0==a[d].length);d++);
if(d>=a.length||" "!=a[d].charAt(0)||(d+=2)+1>=a.length)return!1;var g=a[d];if(3>g.length)return!1;var b=JU.PT.parseInt(g.substring(2).trim()),c=JU.PT.parseInt(g.substring(0,2).trim());if(2>(g=a[d+1]).length)return!1;a=JU.PT.parseInt(g.substring(0,2).trim());if(0>b||5<b||0>=a||-2147483648==c||5<c)return!1;g=J.adapter.smarter.AtomSetCollectionReader.getTokensFloat(g,null,5);return!Float.isNaN(g[1])&&!Float.isNaN(g[2])&&!Float.isNaN(g[3])&&Float.isNaN(g[4])},"~A");b.checkWien2k=c(b,"checkWien2k",function(a){return a[2].startsWith("MODE OF CALC=")||
a[2].startsWith("             RELA")||a[2].startsWith("             NREL")},"~A");b.checkXyz=c(b,"checkXyz",function(a){var d=!1,g=JU.PT.parseInt(a[0]);if(0<=g&&a[0].trim().equals(""+g)){if(J.adapter.smarter.Resolver.isInt(a[2]))return 2;d=!0}if(0<=a[0].indexOf("Bilbao Crys"))return 2;var b;return(d||5<a.length&&0<g)&&((b=a[1].trim().toUpperCase()).startsWith("LATTICE VECTOR")||b.equals("LATTICE"))?3:d?1:0},"~A");b.checkLineStarts=c(b,"checkLineStarts",function(a){for(var d=0;d<J.adapter.smarter.Resolver.lineStartsWithRecords.length;++d)for(var g=
J.adapter.smarter.Resolver.lineStartsWithRecords[d],b=1;b<g.length;++b)for(var c=g[b],f=0;f<a.length;f++)if(a[f].startsWith(c))return g[0];return null},"~A");b.checkHeaderContains=c(b,"checkHeaderContains",function(a){for(var d=0;d<J.adapter.smarter.Resolver.headerContainsRecords.length;++d){var g=J.adapter.smarter.Resolver.checkHeaderRecords(a,J.adapter.smarter.Resolver.headerContainsRecords[d]);if(null!=g)return g}return null},"~S");b.checkJSONContains=c(b,"checkJSONContains",function(a){for(var d=
0;d<J.adapter.smarter.Resolver.jsonContainsRecords.length;++d){var g=J.adapter.smarter.Resolver.checkHeaderRecords(a,J.adapter.smarter.Resolver.jsonContainsRecords[d]);if(null!=g)return g}return null},"~S");b.checkHeaderRecords=c(b,"checkHeaderRecords",function(a,d){for(var g=1;g<d.length;++g)if(!(0>a.indexOf(d[g])))return g=d[0],!g.equals("Xml")?g:0<=a.indexOf("/AFLOWDATA/")||0<=a.indexOf("-- Structure PRE --")?"AFLOW":0>a.indexOf("<!DOCTYPE HTML PUBLIC")&&0>a.indexOf("XHTML")&&(0>a.indexOf("xhtml")||
0<=a.indexOf("<cml"))?J.adapter.smarter.Resolver.getXmlType(a):null;return null},"~S,~A");b.getXmlType=c(b,"getXmlType",function(a){return 0<=a.indexOf("http://www.molpro.net/")?"XmlMolpro":0<=a.indexOf("odyssey")?"XmlOdyssey":0<=a.indexOf("C3XML")?"XmlChem3d":0<=a.indexOf("CDXML")?"XmlCdx":0<=a.indexOf("arguslab")?"XmlArgus":0<=a.indexOf("jvxl")||0<=a.indexOf("http://www.xml-cml.org/schema")||0<=a.indexOf("cml:")||0<=a.indexOf("<cml>")?"XmlCml":0<=a.indexOf("<nmrML")?"XmlNmrml":0<=a.indexOf("XSD")?
"XmlXsd":0<=a.indexOf(">vasp")?"XmlVasp":0<=a.indexOf("<GEOMETRY_INFO>")?"XmlQE":"XmlCml(unidentified)"},"~S");b.checkSpecial2=c(b,"checkSpecial2",function(a){if(J.adapter.smarter.Resolver.checkGromacs(a))return"Gromacs";if(J.adapter.smarter.Resolver.checkCrystal(a))return"Crystal";if(J.adapter.smarter.Resolver.checkFAH(a))return"FAH";a=J.adapter.smarter.Resolver.checkCastepVaspSiesta(a);return null!=a?a:null},"~A");b.checkFAH=c(b,"checkFAH",function(a){return(a[0].trim()+a[2].trim()).equals('{"atoms": [')},
"~A");b.checkCrystal=c(b,"checkCrystal",function(a){var d=a[1].trim();if(d.equals("SLAB")||d.equals("MOLECULE")||d.equals("CRYSTAL")||d.equals("POLYMER")||(d=a[3]).equals("SLAB")||d.equals("MOLECULE")||d.equals("POLYMER"))return!0;for(d=0;d<a.length;d++)if(a[d].trim().equals("OPTGEOM")||a[d].trim().equals("FREQCALC")||a[d].contains("DOVESI")||a[d].contains("TORINO")||a[d].contains("http://www.crystal.unito.it")||a[d].contains("Pcrystal")||a[d].contains("MPPcrystal")||a[d].contains("crystal executable"))return!0;
return!1},"~A");b.checkGromacs=c(b,"checkGromacs",function(a){if(-2147483648==JU.PT.parseInt(a[1]))return!1;for(var d=-1,g=2;16>g&&0!=d;g++)if(69!=(d=a[g].length)&&45!=d&&0!=d)return!1;return!0},"~A");b.checkCastepVaspSiesta=c(b,"checkCastepVaspSiesta",function(a){for(var d=0;d<a.length;d++){var g=a[d].toUpperCase();if(1==g.indexOf("FREQUENCIES IN         CM-1")||g.contains("CASTEP")||g.startsWith("%BLOCK LATTICE_ABC")||g.startsWith("%BLOCK LATTICE_CART")||g.startsWith("%BLOCK POSITIONS_FRAC")||g.startsWith("%BLOCK POSITIONS_ABS")||
g.contains("<-- E"))return"Castep";if(g.contains("%BLOCK"))return"Siesta";if(6<=d&&10>d&&(g.startsWith("DIRECT")||g.startsWith("CARTESIAN")))return"VaspPoscar"}return null},"~A");b.getFileTypefromFilter=c(b,"getFileTypefromFilter",function(a){var d=null==a?-1:a.toLowerCase().indexOf("filetype");return 0>d?null:a.substring(d+8,(a+";").indexOf(";",d)).$replace("="," ").trim()},"~S");b.fixDOSName=c(b,"fixDOSName",function(a){return 0<=a.indexOf(":\\")?a.$replace("\\","/"):a},"~S");b.setDefaultType=c(b,
"setDefaultType",function(a,d){d.put("defaultType",a)},"~S,java.util.Map");b.readerSets=x(-1,"cif. ;Cif;Cif2;MMCif;MMTF;MagCif;BCIF; molxyz. ;Mol3D;Mol;Xyz; more. ;AFLOW;BinaryDcd;CDX;Gromacs;Jcampdx;MdCrd;MdTop;Mol2;TlsDataOnly; quantum. ;Adf;Csf;Dgrid;GamessUK;GamessUS;Gaussian;GaussianFchk;GaussianWfn;Jaguar;Molden;MopacGraphf;GenNBO;NWChem;Psi;Qchem;QCJSON;WebMO;Orca;MO;Ams; pdb. ;Pdb;Pqr;P2n;JmolData; pymol. ;PyMOL; simple. ;Alchemy;Ampac;Cube;FoldingXyz;GhemicalMM;HyperChem;Jme;JSON;Mopac;MopacArchive;Tinker;Input;FAH; spartan. ;Spartan;SpartanSmol;Odyssey; xtal. ;Abinit;Aims;Bilbao;Castep;Cgd;Crystal;Dmol;Espresso;Gulp;Jana;Magres;Shelx;Siesta;VaspOutcar;VaspPoscar;Wien2k;Xcrysden;PWmat;Optimade;Cmdf;Cmdx;FSGOutput; xml. ;XmlCdx;XmlArgus;XmlCml;XmlChem3d;XmlMolpro;XmlNmrml;XmlOdyssey;XmlXsd;XmlVasp;XmlQE;".split(" "));
b.cdxMagic=Q(-1,[86,106,67,68]);b.cmdfMagic=Q(-1,[67,77,68,70]);b.cmdxMagic=Q(-1,[67,77,68,88]);b.mmtfMagic=Q(-1,[109,109,116,102]);b.bcifMolstarMagic=Q(-1,[109,111,108,42]);b.bcifDensityMagic=Q(-1,[68,101,110,115]);b.bcifVolumeMagic=Q(-1,[86,111,108,117]);b.bcifModelMagic=Q(-1,[77,111,100,101]);b.bcifCoordMagic=Q(-1,[67,111,111,114,100]);b.bcifServerMagic=Q(-1,[83,69,82,86,69,82]);b.sptRecords=x(-1,["spt","# Jmol state","# Jmol script","JmolManifest"]);b.m3dStartRecords=x(-1,["Alchemy","STRUCTURE  1.00     1"]);
b.cubeFileStartRecords=x(-1,["Cube","JVXL","#JVXL"]);b.mol2Records=x(-1,["Mol2","mol2","@<TRIPOS>"]);b.webmoFileStartRecords=x(-1,["WebMO","[HEADER]"]);b.moldenFileStartRecords=x(-1,["Molden","[Molden","MOLDEN","[MOLDEN"]);b.dcdFileStartRecords=x(-1,["BinaryDcd","T\x00\x00\x00CORD","\x00\x00\x00TCORD"]);b.tlsDataOnlyFileStartRecords=x(-1,["TlsDataOnly","REFMAC\n\nTL","REFMAC\r\n\r\n","REFMAC\r\rTL"]);b.inputFileStartRecords=x(-1,["Input","#ZMATRIX","%mem=","AM1","$rungauss"]);b.magresFileStartRecords=
x(-1,["Magres","#$magres","# magres"]);b.pymolStartRecords=x(-1,["PyMOL","}q"]);b.janaStartRecords=x(-1,["Jana","Version Jana"]);b.jsonStartRecords=x(-1,["JSON",'{"mol":']);b.jcampdxStartRecords=x(-1,["Jcampdx","##TITLE"]);b.jmoldataStartRecords=x(-1,["JmolData","REMARK   6 Jmol"]);b.pqrStartRecords=x(-1,["Pqr","REMARK   1 PQR","REMARK    The B-factors"]);b.p2nStartRecords=x(-1,["P2n","REMARK   1 P2N"]);b.cif2StartRecords=x(-1,["Cif2","#\\#CIF_2","\u00ef\u00bb\u00bf#\\#CIF_2"]);b.xmlStartRecords=
x(-1,["Xml","<?xml"]);b.cfiStartRecords=x(-1,["Input","$CFI"]);b.fileStartsWithRecords=x(-1,[J.adapter.smarter.Resolver.xmlStartRecords,J.adapter.smarter.Resolver.sptRecords,J.adapter.smarter.Resolver.m3dStartRecords,J.adapter.smarter.Resolver.cubeFileStartRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.webmoFileStartRecords,J.adapter.smarter.Resolver.moldenFileStartRecords,J.adapter.smarter.Resolver.dcdFileStartRecords,J.adapter.smarter.Resolver.tlsDataOnlyFileStartRecords,
J.adapter.smarter.Resolver.inputFileStartRecords,J.adapter.smarter.Resolver.magresFileStartRecords,J.adapter.smarter.Resolver.pymolStartRecords,J.adapter.smarter.Resolver.janaStartRecords,J.adapter.smarter.Resolver.jsonStartRecords,J.adapter.smarter.Resolver.jcampdxStartRecords,J.adapter.smarter.Resolver.jmoldataStartRecords,J.adapter.smarter.Resolver.pqrStartRecords,J.adapter.smarter.Resolver.p2nStartRecords,J.adapter.smarter.Resolver.cif2StartRecords,J.adapter.smarter.Resolver.cfiStartRecords]);
b.n=F(1,0);b.mmcifLineStartRecords=x(-1,"MMCif _entry.id _database_PDB_ _pdbx_ _chem_comp.pdbx_type _audit_author.name _atom_site.".split(" "));b.cifLineStartRecords=x(-1,["Cif","data_","_publ"]);b.pdbLineStartRecords=x(-1,"Pdb;HEADER;OBSLTE;TITLE ;CAVEAT;COMPND;SOURCE;KEYWDS;EXPDTA;AUTHOR;REVDAT;SPRSDE;JRNL  ;REMARK ;DBREF ;SEQADV;SEQRES;MODRES;HELIX ;SHEET ;TURN  ;CRYST1;ORIGX1;ORIGX2;ORIGX3;SCALE1;SCALE2;SCALE3;ATOM  ;HETATM;MODEL ;LINK  ;USER  MOD ".split(";"));b.cgdLineStartRecords=x(-1,["Cgd",
"EDGE ","edge "]);b.shelxLineStartRecords=x(-1,"Shelx;TITL ;ZERR ;LATT ;SYMM ;CELL ;TITL\t".split(";"));b.ghemicalMMLineStartRecords=x(-1,["GhemicalMM","!Header mm1gp","!Header gpr"]);b.jaguarLineStartRecords=x(-1,["Jaguar","  |  Jaguar version"]);b.mdlLineStartRecords=x(-1,["Mol","$MDL "]);b.spartanSmolLineStartRecords=x(-1,["SpartanSmol","INPUT="]);b.csfLineStartRecords=x(-1,["Csf","local_transform"]);b.mdTopLineStartRecords=x(-1,["MdTop","%FLAG TITLE"]);b.hyperChemLineStartRecords=x(-1,["HyperChem",
"mol 1"]);b.vaspOutcarLineStartRecords=x(-1,["VaspOutcar"," vasp."," INCAR:"]);b.orcaInputLineStartRecords=x(-1,["Orca","* xyz","*xyz"]);b.lineStartsWithRecords=x(-1,[J.adapter.smarter.Resolver.mmcifLineStartRecords,J.adapter.smarter.Resolver.cifLineStartRecords,J.adapter.smarter.Resolver.pdbLineStartRecords,J.adapter.smarter.Resolver.cgdLineStartRecords,J.adapter.smarter.Resolver.shelxLineStartRecords,J.adapter.smarter.Resolver.ghemicalMMLineStartRecords,J.adapter.smarter.Resolver.jaguarLineStartRecords,
J.adapter.smarter.Resolver.mdlLineStartRecords,J.adapter.smarter.Resolver.spartanSmolLineStartRecords,J.adapter.smarter.Resolver.csfLineStartRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.mdTopLineStartRecords,J.adapter.smarter.Resolver.hyperChemLineStartRecords,J.adapter.smarter.Resolver.vaspOutcarLineStartRecords,J.adapter.smarter.Resolver.orcaInputLineStartRecords]);b.bilbaoContainsRecords=x(-1,["Bilbao",">Bilbao Crystallographic Server<"]);b.xmlContainsRecords=x(-1,
'Xml <?xml <atom <molecule <reaction <cml <bond .dtd" <list> <entry <identifier http://www.xml-cml.org/schema/cml2/core'.split(" "));b.gaussianContainsRecords=x(-1,["Gaussian","Entering Gaussian System","Entering Link 1","1998 Gaussian, Inc."]);b.ampacContainsRecords=x(-1,["Ampac","AMPAC Version"]);b.mopacContainsRecords=x(-1,"Mopac;MOPAC 93 (c) Fujitsu;MOPAC FOR LINUX (PUBLIC DOMAIN VERSION);MOPAC:  VERSION  6;MOPAC   7;MOPAC2;MOPAC (PUBLIC;MOPAC v".split(";"));b.qchemContainsRecords=x(-1,["Qchem",
"Welcome to Q-Chem","A Quantum Leap Into The Future Of Chemistry"]);b.gamessUKContainsRecords=x(-1,["GamessUK","GAMESS-UK","G A M E S S - U K"]);b.gamessUSContainsRecords=x(-1,["GamessUS","GAMESS","$CONTRL"]);b.spartanBinaryContainsRecords=x(-1,["SpartanSmol","|PropertyArchive","_spartan","spardir","BEGIN Directory Entry Molecule"]);b.spartanContainsRecords=x(-1,["Spartan","Spartan","converted archive file"]);b.adfContainsRecords=x(-1,["Adf","Amsterdam Density Functional"]);b.amsContainsRecords=x(-1,
["Ams","Amsterdam Modeling Suite"]);b.psiContainsRecords=x(-1,["Psi","    PSI  3","PSI3:"]);b.nwchemContainsRecords=x(-1,["NWChem"," argument  1 = "]);b.uicrcifContainsRecords=x(-1,["Cif","Crystallographic Information File"]);b.dgridContainsRecords=x(-1,["Dgrid","BASISFILE   created by DGrid"]);b.crystalContainsRecords=x(-1,["Crystal","*                                CRYSTAL","TORINO","DOVESI"]);b.dmolContainsRecords=x(-1,["Dmol","DMol^3"]);b.gulpContainsRecords=x(-1,["Gulp","GENERAL UTILITY LATTICE PROGRAM"]);
b.espressoContainsRecords=x(-1,["Espresso","Program PWSCF","Program PHONON"]);b.siestaContainsRecords=x(-1,["Siesta","MD.TypeOfRun","SolutionMethod","MeshCutoff","WELCOME TO SIESTA"]);b.xcrysDenContainsRecords=x(-1,["Xcrysden","PRIMVEC","CONVVEC","PRIMCOORD","ANIMSTEP"]);b.mopacArchiveContainsRecords=x(-1,["MopacArchive","SUMMARY OF PM"]);b.abinitContainsRecords=x(-1,["Abinit","http://www.abinit.org","Catholique","Louvain"]);b.qcJsonContainsRecords=x(-1,["QCJSON",'"QCJSON']);b.optimadeContainsRecords=
x(-1,["Optimade",'"cartesian_site_positions":','"api_version":',"optimade"]);b.jsonArrayContainsRecords=x(-1,["JSON",'"atomArray":[','"atomArray" : [']);b.orcaContainsRecords=x(-1,["Orca","* O   R   C   A *"]);b.gaussianFchkContainsRecords=x(-1,["GaussianFchk","Number of point charges in /Mol/"]);b.inputContainsRecords=x(-1,"Input; ATOMS cartesian;$molecule;&zmat;geometry={;$DATA;%coords;GEOM=PQS;geometry units angstroms".split(";"));b.aflowContainsRecords=x(-1,["AFLOW","/AFLOWDATA/"]);b.magCifContainsRecords=
x(-1,["MagCif","_space_group_magn"]);b.headerContainsRecords=x(-1,[J.adapter.smarter.Resolver.sptRecords,J.adapter.smarter.Resolver.bilbaoContainsRecords,J.adapter.smarter.Resolver.xmlContainsRecords,J.adapter.smarter.Resolver.gaussianContainsRecords,J.adapter.smarter.Resolver.ampacContainsRecords,J.adapter.smarter.Resolver.mopacContainsRecords,J.adapter.smarter.Resolver.gamessUKContainsRecords,J.adapter.smarter.Resolver.gamessUSContainsRecords,J.adapter.smarter.Resolver.qchemContainsRecords,J.adapter.smarter.Resolver.spartanBinaryContainsRecords,
J.adapter.smarter.Resolver.spartanContainsRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.adfContainsRecords,J.adapter.smarter.Resolver.psiContainsRecords,J.adapter.smarter.Resolver.nwchemContainsRecords,J.adapter.smarter.Resolver.uicrcifContainsRecords,J.adapter.smarter.Resolver.dgridContainsRecords,J.adapter.smarter.Resolver.crystalContainsRecords,J.adapter.smarter.Resolver.dmolContainsRecords,J.adapter.smarter.Resolver.gulpContainsRecords,J.adapter.smarter.Resolver.espressoContainsRecords,
J.adapter.smarter.Resolver.siestaContainsRecords,J.adapter.smarter.Resolver.xcrysDenContainsRecords,J.adapter.smarter.Resolver.mopacArchiveContainsRecords,J.adapter.smarter.Resolver.abinitContainsRecords,J.adapter.smarter.Resolver.gaussianFchkContainsRecords,J.adapter.smarter.Resolver.inputContainsRecords,J.adapter.smarter.Resolver.aflowContainsRecords,J.adapter.smarter.Resolver.magCifContainsRecords,J.adapter.smarter.Resolver.qcJsonContainsRecords,J.adapter.smarter.Resolver.optimadeContainsRecords,
J.adapter.smarter.Resolver.orcaContainsRecords,J.adapter.smarter.Resolver.jsonArrayContainsRecords,J.adapter.smarter.Resolver.amsContainsRecords]);b.jsonContainsRecords=x(-1,[J.adapter.smarter.Resolver.optimadeContainsRecords])});s("J.adapter.smarter");B(["J.api.JmolAdapter"],"J.adapter.smarter.SmarterJmolAdapter","java.io.BufferedReader $.StringReader java.util.Hashtable JU.PT $.Rdr J.adapter.smarter.AtomIterator $.AtomSetCollection $.BondIterator $.Resolver $.StructureIterator J.api.Interface JS.SV JU.BSUtil $.Logger".split(" "),
function(){var b=I(J.adapter.smarter,"SmarterJmolAdapter",J.api.JmolAdapter);A(b,function(){M(this,J.adapter.smarter.SmarterJmolAdapter,[])});j(b,"getFileTypeName",function(a){if("string"==typeof a)return J.adapter.smarter.Resolver.getFileTypefromFilter(a);if(y(a,"J.adapter.smarter.AtomSetCollection"))return a.fileTypeName;if(y(a,"java.io.BufferedReader"))return J.adapter.smarter.Resolver.getFileType(a);if(y(a,"java.io.BufferedInputStream")){var d=J.adapter.smarter.Resolver.getBinaryType(a);if(null==
d)try{d=J.adapter.smarter.Resolver.getFileType(JU.Rdr.getBufferedReader(a,null))}catch(g){if(!H(g,Exception))throw g;}return d}return null},"~O");j(b,"getAtomSetCollectionReader",function(a,d,g,b){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollectionReader(a,d,g,b)},"~S,~S,~O,java.util.Map");b.staticGetAtomSetCollectionReader=c(b,"staticGetAtomSetCollectionReader",function(a,d,g,b){null==b&&(b=new java.util.Hashtable);try{var c=J.adapter.smarter.Resolver.getAtomCollectionReader(a,
d,g,b,-1);if("string"==typeof c)try{J.adapter.smarter.SmarterJmolAdapter.close(g)}catch(f){if(!H(f,Exception))throw f;}else c.setup(a,b,g);return c}catch(h){try{J.adapter.smarter.SmarterJmolAdapter.close(g)}catch(k){if(!H(k,Exception))throw k;}JU.Logger.error(""+h);return""+h}},"~S,~S,~O,java.util.Map");j(b,"getAtomSetCollectionFromReader",function(a,d,g){var b=J.adapter.smarter.Resolver.getAtomCollectionReader(a,null,d,g,-1);return y(b,"J.adapter.smarter.AtomSetCollectionReader")?(y(d,"java.io.BufferedInputStream")&&
(d=null!=J.adapter.smarter.Resolver.getBinaryType(d)?J.api.Interface.getInterface("JU.BinaryDocument",null,"JmolAdapter").setStream(d,!1):JU.Rdr.getBufferedReader(d,null)),b.setup(a,g,d),b.readData()):""+b},"~S,~O,java.util.Map");j(b,"getAtomSetCollection",function(a){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollection(a)},"~O");b.staticGetAtomSetCollection=c(b,"staticGetAtomSetCollection",function(a){var d=null;try{var d=a.reader,g=a.readData();return!y(g,"J.adapter.smarter.AtomSetCollection")?
g:null!=g.errorMessage?g.errorMessage:g}catch(b){try{JU.Logger.info(b.toString())}catch(c){if(H(c,Exception))JU.Logger.error(b.toString());else throw c;}try{d.close()}catch(f){if(!H(f,Exception))throw f;}JU.Logger.error(""+b);return""+b}},"J.adapter.smarter.AtomSetCollectionReader");j(b,"getAtomSetCollectionReaders",function(a,d,g,b,c){var f=b.get("vwr"),h=d.length,k=null;if(b.containsKey("concatenate")){for(var k="",m=0;m<h;m++){var E=d[m],j=f.getFileAsString3(E,!1,null);if(0<m&&3>=h&&j.startsWith("{"))E=
j.contains('version":"DSSR')?"dssr":j.contains("/outliers/")?"validation":"domains",j=f.parseJSONMap(j),null!=j&&b.put(E,E.equals("dssr")?j:JS.SV.getVariableMap(j));else{j.startsWith("java.net.")&&System.err.println(j+" reading "+E);0<=E.indexOf("|")&&(E=JU.PT.rep(E,"_","/"));if(1==m){if(0<=E.indexOf("/rna3dhub/")){k+="\n_rna3d \n;"+j+"\n;\n";continue}if(0<=E.indexOf("/dssr/")){k+="\n_dssr \n;"+j+"\n;\n";continue}}k+=j;k.endsWith("\n")||(k+="\n")}}h=1;k=JU.Rdr.getBR(k)}for(var j=c?Array(h):null,E=
c?null:Array(h),q=null,m=0;m<h;m++)try{b.put("vwr",f);null==k&&(k=a.getBufferedReaderOrBinaryDocument(m,!1));if(!y(k,"java.io.BufferedReader")&&!y(k,"javajs.api.GenericBinaryDocument"))return k;b.put("fullPathName",d[m]);var r=J.adapter.smarter.Resolver.getAtomCollectionReader(d[m],null==g?null:g[m],k,b,m);if(!y(r,"J.adapter.smarter.AtomSetCollectionReader"))return r;q=r;q.setup(null,null,null);q.isBinary?q.setup(d[m],b,a.getBufferedReaderOrBinaryDocument(m,!0)):q.setup(d[m],b,k);k=null;if(c)j[m]=
q;else{r=q.readData();if(!y(r,"J.adapter.smarter.AtomSetCollection"))return r;E[m]=r;if(null!=E[m].errorMessage)return E[m].errorMessage}}catch(u){return JU.Logger.error(""+u),u.printStackTrace(),""+u}return c?j:this.getAtomSetCollectionFromSet(j,E,b)},"J.api.JmolFilesReaderInterface,~A,~A,java.util.Map,~B");j(b,"getAtomSetCollectionFromSet",function(a,d,g){var b=null==d?Array(a.length):d;if(null==d)for(d=0;d<a.length;d++)if(null!=a[d])try{var c=a[d].readData();if(!y(c,"J.adapter.smarter.AtomSetCollection"))return c;
b[d]=c;if(null!=b[d].errorMessage)return b[d].errorMessage}catch(f){return JU.Logger.error(""+f),""+f}if(g.containsKey("trajectorySteps")){a=b[0];try{1<b.length&&b[0].setInfo("ignoreUnitCell",b[1].atomSetInfo.get("ignoreUnitCell")),a.finalizeTrajectoryAs(g.get("trajectorySteps"),g.get("vibrationSteps"))}catch(h){if(H(h,Exception))null==a.errorMessage&&(a.errorMessage=""+h);else throw h;}}else if(b[0].isTrajectory){a=b[0];for(d=1;d<b.length;d++)b[0].mergeTrajectories(b[d])}else a=1==b.length?b[0]:
new J.adapter.smarter.AtomSetCollection("Array",null,b,null);return null==a.errorMessage?a:a.errorMessage},"~O,~O,java.util.Map");j(b,"getAtomSetCollectionFromDOM",function(){throw new UnsupportedOperationException;},"~O,java.util.Map");j(b,"finish",function(a){a.finish()},"~O");j(b,"getAtomSetCollectionName",function(a){return a.collectionName},"~O");j(b,"getAtomSetCollectionAuxiliaryInfo",function(a){return a.atomSetInfo},"~O");j(b,"getAtomSetCount",function(a){return a.atomSetCount},"~O");j(b,
"getAtomSetNumber",function(a,d){return a.getAtomSetNumber(d)},"~O,~N");j(b,"getAtomSetName",function(a,d){return a.getAtomSetName(d)},"~O,~N");j(b,"getAtomSetAuxiliaryInfo",function(a,d){return a.getAtomSetAuxiliaryInfo(d)},"~O,~N");j(b,"getHydrogenAtomCount",function(a){return a.getHydrogenAtomCount()},"~O");j(b,"getBondList",function(a){return a.getBondList()},"~O");j(b,"getAtomCount",function(a,d){if(0>d)return null==a.bsAtoms?a.ac:a.bsAtoms.cardinality();if(null==a.bsAtoms)return a.getAtomSetAtomCount(d);
var g=JU.BSUtil.copy(a.bsAtoms),b=a.getAtomSetAtomIndex(d);g.and(JU.BSUtil.newBitSet2(b,b+a.getAtomSetAtomCount(d)));return g.cardinality()},"~O,~N");j(b,"coordinatesAreFractional",function(a){return a.coordinatesAreFractional},"~O");j(b,"getAtomIterator",function(a){return new J.adapter.smarter.AtomIterator(a)},"~O");j(b,"getBondIterator",function(a){return 0==a.bondCount?null:new J.adapter.smarter.BondIterator(a)},"~O");j(b,"getStructureIterator",function(a){return 0==a.structureCount?null:new J.adapter.smarter.StructureIterator(a)},
"~O");b.close=c(b,"close",function(a){y(a,"java.io.BufferedReader");a.close()},"~O");j(b,"getAtomSetCollectionInline",function(a){var d=null;try{if("string"==typeof a)d=new java.io.BufferedReader(new java.io.StringReader(a));else if(y(a,"java.io.InputStream"))d=a;else return null;var g=this.getAtomSetCollectionReader("String",null,d,null);return"string"==typeof g?g:this.getAtomSetCollection(g)}finally{try{y(d,"java.io.BufferedReader"),d.close()}catch(b){if(!H(b,"java.io.IOException"))throw b;}}},
"~O,java.util.Map");b.PATH_SEPARATOR=System.getProperty("path.separator","/")});s("J.adapter.smarter");B(["J.api.JmolAdapterStructureIterator"],"J.adapter.smarter.StructureIterator",["J.api.JmolAdapter"],function(){var b=n(function(){this.structureCount=0;this.structure=this.structures=null;this.istructure=0;this.bsModelsDefined=null;v(this,arguments)},J.adapter.smarter,"StructureIterator",J.api.JmolAdapterStructureIterator);A(b,function(a){M(this,J.adapter.smarter.StructureIterator,[]);this.structureCount=
a.structureCount;this.structures=a.structures;this.istructure=0;this.bsModelsDefined=a.bsStructuredModels},"J.adapter.smarter.AtomSetCollection");j(b,"hasNext",function(){if(this.istructure==this.structureCount)return!1;this.structure=this.structures[this.istructure++];return!0});j(b,"getStructureType",function(){return this.structure.structureType});j(b,"getSubstructureType",function(){return this.structure.substructureType});j(b,"getStructureID",function(){return this.structure.structureID});j(b,
"getStrandID",function(){return this.structure.strandID});j(b,"getStartChainID",function(){return this.structure.startChainID});j(b,"getStartSequenceNumber",function(){return this.structure.startSequenceNumber});j(b,"getStartInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.structure.startInsertionCode)});j(b,"getEndChainID",function(){return this.structure.endChainID});j(b,"getEndSequenceNumber",function(){return this.structure.endSequenceNumber});j(b,"getEndInsertionCode",
function(){return this.structure.endInsertionCode});j(b,"getStrandCount",function(){return this.structure.strandCount});j(b,"getStructuredModels",function(){return this.bsModelsDefined});j(b,"getAtomIndices",function(){return this.structure.atomStartEnd});j(b,"getModelIndices",function(){return this.structure.modelStartEnd});j(b,"getBSAll",function(){return this.structure.bsAll})});s("J.api");O(J.api,"AtomIndexIterator");s("J.api");B(null,"J.api.Interface",["JU.Logger"],function(){var b=I(J.api,"Interface",
null);b.getInstance=c(b,"getInstance",function(a){return J.api.Interface.getInterface(a,null,"")},"~S,~B");b.getInterface=c(b,"getInterface",function(a){try{var d=ba._4Name(a);return null==d?null:d.newInstance()}catch(g){if(H(g,Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+g),null;throw g;}},"~S,JV.Viewer,~S");b.getOption=c(b,"getOption",function(a,d,g){return J.api.Interface.getInterface("J."+a,d,g)},"~S,JV.Viewer,~S");b.getUtil=c(b,"getUtil",function(a,
d,g){return J.api.Interface.getInterface("JU."+a,d,g)},"~S,JV.Viewer,~S");b.getSymmetry=c(b,"getSymmetry",function(a,d){return J.api.Interface.getInterface("JS.Symmetry",a,d).setViewer(a,d)},"JV.Viewer,~S")});s("J.api");B(null,"J.api.JmolAdapter",["JU.PT","J.api.JmolViewer","JU.Elements"],function(){var b=I(J.api,"JmolAdapter",null);b.getElementSymbol=c(b,"getElementSymbol",function(a){return JU.Elements.elementSymbolFromNumber(a)},"~N");b.getElementNumber=c(b,"getElementNumber",function(a){return JU.Elements.elementNumberFromSymbol(a,
!1)},"~S");b.getNaturalIsotope=c(b,"getNaturalIsotope",function(a){return JU.Elements.getNaturalIsotope(a)},"~N");b.getBondingRadius=c(b,"getBondingRadius",function(a,d){return JU.Elements.getBondingRadius(a,d)},"~N,~N");c(b,"getAtomSetCollectionFromReaderType",function(a,d,g,b){a=this.getAtomSetCollectionReader(a,d,g,J.api.JmolViewer.allocateViewer(null,this).setLoadParameters(b,!1));return"string"==typeof a?a:this.getAtomSetCollection(a)},"~S,~S,~O,java.util.Map");c(b,"openBufferedReader",function(a,
d){return this.getAtomSetCollectionFromReaderType(a,null,d,null)},"~S,java.io.BufferedReader");c(b,"openBufferedReader",function(a,d,g){return this.getAtomSetCollectionFromReaderType(a,null,d,g)},"~S,java.io.BufferedReader,java.util.Map");c(b,"openBufferedReader",function(a,d,g){return this.getAtomSetCollectionFromReaderType(a,d,g,null)},"~S,~S,java.io.BufferedReader");b.canonizeAlphaDigit=c(b,"canonizeAlphaDigit",function(a){return JU.PT.isLetterOrDigit(a)?a:"\x00"},"~S");b.canonizeInsertionCode=
c(b,"canonizeInsertionCode",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");b.canonizeAlternateLocationID=c(b,"canonizeAlternateLocationID",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");b.cellParamNames=x(-1,"_cell_length_a _cell_length_b _cell_length_c _cell_angle_alpha _cell_angle_beta _cell_angle_gamma".split(" "))});s("J.api");O(J.api,"JmolAdapterAtomIterator");s("J.api");I(J.api,"JmolAdapterBondIterator",null);s("J.api");I(J.api,"JmolAdapterStructureIterator",
null);s("J.api");O(J.api,"JmolAppConsoleInterface");s("J.api");O(J.api,"JmolAppletInterface",J.api.JmolSyncInterface);s("J.api");O(J.api,"JmolCallbackListener");s("J.api");O(J.api,"JmolAnnotationParser");s("J.api");O(J.api,"JmolGraphicsInterface");s("J.api");O(J.api,"JmolMeasurementClient");s("J.api");O(J.api,"JmolModulationSet");s("J.api");O(J.api,"JmolNavigatorInterface",Runnable);s("J.api");O(J.api,"JmolRendererInterface",J.api.JmolGraphicsInterface);s("J.api");O(J.api,"JmolRepaintManager");s("J.api");
O(J.api,"JmolStatusListener",J.api.JmolCallbackListener);s("J.api");O(J.api,"JmolSyncInterface");s("J.api");B(null,"J.api.JmolViewer",["java.util.Hashtable","JV.JC"],function(){var b=n(function(){this.apiPlatform=this.menuStructure=null;v(this,arguments)},J.api,"JmolViewer",null);b.allocateViewer=c(b,"allocateViewer",function(a,d,g,b,c,f,h,k){var m=new java.util.Hashtable;null!=a&&m.put("display",a);null!=d&&m.put("adapter",d);null!=h&&m.put("statuslistener",h);null!=k&&m.put("platform",k);null!=
f&&m.put("options",f);null!=g&&m.put("fullname",g);null!=b&&m.put("documentbase",b);null!=c&&m.put("codebase",c);m.put("isApp",Boolean.TRUE);return new JV.Viewer(m)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.GenericPlatform");b.allocateViewer=c(b,"allocateViewer",function(a,d){return J.api.JmolViewer.allocateViewer(a,d,null,null,null,null,null,null)},"~O,J.api.JmolAdapter");b.allocateViewer=c(b,"allocateViewer",function(a,d,g,b,c,f,h){return J.api.JmolViewer.allocateViewer(a,
d,g,b,c,f,h,null)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener");c(b,"setConsole",function(a){this.getProperty("DATA_API","getAppConsole",a)},"J.api.JmolAppConsoleInterface");b.getJmolVersion=c(b,"getJmolVersion",function(){return JV.Viewer.getJmolVersion()});b.getJmolVersionNoDate=c(b,"getJmolVersionNoDate",function(){return JV.JC.version});c(b,"openReader",function(a,d){return this.openReader(null==a?"String":a,null,d)},"~S,~O");c(b,"openFileAsync",function(a){this.openFileAsyncSpecial(a,
0)},"~S");c(b,"renderScreenImage",function(a,d){this.apiPlatform.renderScreenImage(a,d)},"~O,~O,~O");c(b,"runScriptCautiously",function(){return null},"~S");c(b,"dispose",function(){})});s("J.api");O(J.api,"SymmetryInterface");s("J.api");O(J.api,"Translator");s("J.appletjs");B(["JU.GenericApplet"],"J.appletjs.Jmol",["java.util.Hashtable"],function(){var b=I(J.appletjs,"Jmol",JU.GenericApplet);A(b,function(a){M(this,J.appletjs.Jmol,[]);this.htParams=new java.util.Hashtable;null==a&&(a=new java.util.Hashtable);
this.vwrOptions=a;for(var d,g=a.entrySet().iterator();g.hasNext()&&((d=g.next())||1);)this.htParams.put(d.getKey().toLowerCase(),d.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath");JU.GenericApplet.isJS=!0;this.init(this)},"java.util.Map")});s("J.atomdata");B(null,"J.atomdata.AtomData",["JU.P3","JU.BSUtil"],function(){var b=n(function(){this.modelName=this.fileName=this.programInfo=null;this.modelIndex=0;this.radiusData=this.bsMolecules=this.bsIgnored=this.bsSelected=
null;this.hAtomRadius=this.lastModelIndex=this.firstModelIndex=this.firstAtomIndex=0;this.hAtoms=this.atomMolecule=this.atomicNumber=this.atomRadius=this.xyz=this.atoms=this.atomIndex=null;this.adpMode=this.hydrogenAtomCount=this.ac=0;v(this,arguments)},J.atomdata,"AtomData",null);c(b,"transformXYZ",function(a,d){var g=Array(this.xyz.length);null==d&&(d=JU.BSUtil.newBitSet2(0,this.xyz.length));for(var b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))null!=this.xyz[b]&&(g[b]=JU.P3.newP(this.xyz[b]),a.rotTrans(g[b]));
this.xyz=g},"JU.M4,JU.BS")});s("J.atomdata");O(J.atomdata,"AtomDataServer");s("J.atomdata");B(["java.lang.Enum","J.c.VDW"],"J.atomdata.RadiusData",["JU.SB"],function(){var b=n(function(){this.vdwType=this.factorType=this.info=null;this.value=NaN;this.valueExtended=0;this.values=null;v(this,arguments)},J.atomdata,"RadiusData",null);P(b,function(){this.factorType=J.atomdata.RadiusData.EnumType.ABSOLUTE;this.vdwType=J.c.VDW.AUTO});A(b,function(a,d,g,b){null!=a?(this.values=a,this.value=2147483647):null!=
g&&(this.factorType=g,this.value=d,null!=b&&(this.vdwType=b))},"~A,~N,J.atomdata.RadiusData.EnumType,J.c.VDW");j(b,"toString",function(){if(Float.isNaN(this.value))return"";var a=new JU.SB;switch(this.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:a.appendF(this.value);break;case J.atomdata.RadiusData.EnumType.OFFSET:a.append(0<this.value?"+":"").appendF(this.value);break;case J.atomdata.RadiusData.EnumType.FACTOR:a.appendI(D(100*this.value)).append("%");this.vdwType!==J.c.VDW.AUTO&&a.append(this.vdwType.getVdwLabel());
break;case J.atomdata.RadiusData.EnumType.SCREEN:a.appendI(D(this.value))}return a.toString()});b=I(J.atomdata.RadiusData,"EnumType",Enum);K(b,"ABSOLUTE",0,[]);K(b,"OFFSET",1,[]);K(b,"FACTOR",2,[]);K(b,"SCREEN",3,[])});s("J.awtjs");B(["J.awtjs2d.Platform"],"J.awtjs.Platform",null,function(){var b=I(J.awtjs,"Platform",J.awtjs2d.Platform);j(b,"drawImage",function(){},"~O,~O,~N,~N,~N,~N,~B");j(b,"getTextPixels",function(){return null},"~S,JU.Font,~O,~O,~N,~N,~N");j(b,"getGraphics",function(){return null},
"~O");j(b,"getStaticGraphics",function(){return null},"~O,~B");j(b,"newBufferedImage",function(){return null},"~O,~N,~N");j(b,"newOffScreenImage",function(){return null},"~N,~N")});s("J.awtjs2d");B(null,"J.awtjs2d.Display",["JU.PT"],function(){var b=I(J.awtjs2d,"Display",null);b.getFullScreenDimensions=c(b,"getFullScreenDimensions",function(a,d){d[0]=a.width;d[1]=a.height},"~O,~A");b.hasFocus=c(b,"hasFocus",function(){return!0},"~O");b.requestFocusInWindow=c(b,"requestFocusInWindow",function(){},
"~O");b.renderScreenImage=c(b,"renderScreenImage",function(){},"J.api.PlatformViewer,~O,~O");b.prompt=c(b,"prompt",function(a,d,g,b,c){if(!c)return""+(null==g?alert(d):prompt(d,g));null!=g&&(b=JU.PT.split(g,"|"));a=a.eval.promptAsync(d,b);if(null!=a){if(null==g)for(d=0;d<b.length;d++)if(b[d].equals(g))return""+d;return a}return"null"},"J.api.PlatformViewer,~S,~S,~A,~B");b.convertPointFromScreen=c(b,"convertPointFromScreen",function(){},"~O,JU.P3");b.drawImage=c(b,"drawImage",function(a,d,g,b,c,f,
h){b=d.buf8;f=d.buf32;var k=d.width*d.height,m=1;if(h){var E=c%2;c=Math.floor(c/2);m=Math.floor(d.width/c)}h=4*(d.width-c||g);var j=0,q=0;for(g*=4;j<k;)b[g++]=f[j]>>16&255,b[g++]=f[j]>>8&255,b[g++]=f[j]&255,b[g++]=255,j+=m,0==++q%c&&(E&&(j+=1,b[g]=0,b[g+1]=0,b[g+2]=0,b[g+3]=0),g+=h);a.putImageData(d.imgdata,0,0)},"~O,~O,~N,~N,~N,~N,~B")});s("J.awtjs2d");B(null,"J.awtjs2d.Image",["J.awtjs2d.Platform"],function(){var b=I(J.awtjs2d,"Image",null);b.getWidth=c(b,"getWidth",function(a){return a.imageWidth?
a.imageWidth:a.width},"~O");b.getHeight=c(b,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");b.grabPixels=c(b,"grabPixels",function(a,d,g){var b=null,b=a.getImageData(0,0,d,g).data;return J.awtjs2d.Image.toIntARGB(b)},"~O,~N,~N");b.toIntARGB=c(b,"toIntARGB",function(a){for(var d=w(a.length/4),g=F(d,0),b=0,c=0;b<d;)g[b++]=a[c++]<<16|a[c++]<<8|a[c++]|a[c++]<<24;return g},"~A");b.getTextPixels=c(b,"getTextPixels",function(a,d,g,b,c,f){g.fillStyle="#000000";g.fillRect(0,0,b,
c);g.fillStyle="#FFFFFF";g.font=d.font;g.fillText(a,0,f);return J.awtjs2d.Image.grabPixels(g,b,c)},"~S,JU.Font,~O,~N,~N,~N");b.allocateRgbImage=c(b,"allocateRgbImage",function(a,d,g,b,c,f){null==f&&(f={width:a,height:d});f.buf32=g;return f},"~N,~N,~A,~N,~B,~O");b.getImageDialog=c(b,"getImageDialog",function(a,d,g){return J.awtjs2d.Platform.Jmol().consoleGetImageDialog(a,d,g)},"JV.Viewer,~S,java.util.Map")});s("J.awtjs2d");B(["J.api.GenericFileInterface"],"J.awtjs2d.JSFile",["JU.OC","$.PT","JV.Viewer"],
function(){var b=n(function(){this.fullName=this.name=null;v(this,arguments)},J.awtjs2d,"JSFile",null,J.api.GenericFileInterface);A(b,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>JU.OC.urlTypeIndex(a)&&(this.fullName=JV.Viewer.jsDocumentBase+"/"+this.fullName);this.fullName=JU.PT.rep(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");b.newFile=c(b,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");j(b,"getParentAsFile",function(){var a=
this.fullName.lastIndexOf("/");return 0>a?null:new J.awtjs2d.JSFile(this.fullName.substring(0,a))});j(b,"getFullPath",function(){return this.fullName});j(b,"getName",function(){return this.name});j(b,"isDirectory",function(){return this.fullName.endsWith("/")});j(b,"length",function(){return 0});b.getURLContents=c(b,"getURLContents",function(a,d,g){try{var b=a.openConnection();null!=d?b.outputBytes(d):null!=g&&b.outputString(g);return b.getContents()}catch(c){if(H(c,Exception))return c.toString();
throw c;}},"java.net.URL,~A,~S");j(b,"toString",function(){return this.fullName})});s("J.awtjs2d");z=I(J.awtjs2d,"JSFont",null);z.newFont=c(z,"newFont",function(b,a,d,g,c){b=b.equals("Monospaced")?"Courier":b.startsWith("Sans")?"Helvetica Neue, Sans-serif":"Serif";return(a?"bold ":"")+(d?"italic ":"")+g+c+" "+b},"~S,~B,~B,~N,~S");z.getFontMetrics=c(z,"getFontMetrics",function(b,a){a.font!=b.font&&(a.font=b.font,b.font=a.font,a._fontAscent=Math.ceil(b.fontSize),a._fontDescent=Math.ceil(0.25*b.fontSize));
return a},"JU.Font,~O");z.getAscent=c(z,"getAscent",function(b){return Math.ceil(b._fontAscent)},"~O");z.getDescent=c(z,"getDescent",function(b){return Math.ceil(b._fontDescent)},"~O");z.stringWidth=c(z,"stringWidth",function(b,a,d){a.font=b.font;return Math.ceil(a.measureText(d).width)},"JU.Font,~O,~S");s("J.awtjs2d");B(["J.api.GenericMouseInterface"],"J.awtjs2d.Mouse",["JU.PT","$.V3","JU.Logger"],function(){var b=n(function(){this.manager=this.vwr=null;this.keyBuffer="";this.wheeling=this.isMouseDown=
!1;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=this.modifiersDown=0;v(this,arguments)},J.awtjs2d,"Mouse",null,J.api.GenericMouseInterface);A(b,function(a,d){this.vwr=d;this.manager=this.vwr.acm},"~N,JV.Viewer,~O");j(b,"clear",function(){});j(b,"dispose",function(){});j(b,"processEvent",function(a,d,g,b,c){507!=a&&(b=J.awtjs2d.Mouse.applyLeftMouse(b));switch(a){case 507:this.wheeled(c,d,b);break;case 501:this.xWhenPressed=d;this.yWhenPressed=g;this.modifiersWhenPressed10=b;this.pressed(c,
d,g,b,!1);break;case 506:this.dragged(c,d,g);break;case 504:this.entry(c,d,g,!1);break;case 505:this.entry(c,d,g,!0);break;case 503:this.moved(c,d,g,b);break;case 502:this.released(c,d,g,b);d==this.xWhenPressed&&(g==this.yWhenPressed&&b==this.modifiersWhenPressed10)&&this.clicked(c,d,g,b,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");j(b,"processTwoPointGesture",function(a){if(!(2>a[0].length)){var d=a[0],g=a[1],b=d[0],c=d[g.length-1];a=b[0];var f=c[0],b=b[1],c=c[1],h=JU.V3.new3(f-a,c-b,0),
k=h.length(),m=g[0],E=g[g.length-1],g=m[0],j=E[0],m=m[1],E=E[1],q=JU.V3.new3(j-g,E-m,0),r=q.length();1>k||1>r||(h.normalize(),q.normalize(),h=h.dot(q),0.8<h?(a=D(f-d[d.length-2][0]),d=D(c-d[d.length-2][1]),this.vwr.translateXYBy(a,d)):-0.8>h&&(h=JU.V3.new3(g-a,m-b,0),q=JU.V3.new3(j-f,E-c,0),d=q.length()-h.length(),this.wheeled(System.currentTimeMillis(),0>d?-1:1,32)))}},"~A");c(b,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");
c(b,"mouseEntered",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!1)},"java.awt.event.MouseEvent");c(b,"mouseExited",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!0)},"java.awt.event.MouseEvent");c(b,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(b,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseDragged",function(a){a.getModifiers();
this.dragged(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(b,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers())},"java.awt.event.MouseWheelEvent");c(b,"keyTyped",function(a){a.consume();if(this.vwr.menuEnabled()){var d=a.getKeyChar(),g=a.getModifiers();JU.Logger.debuggingHigh&&JU.Logger.debug("MouseManager keyTyped: "+
d+" "+(0+d.charCodeAt(0))+" "+g);if(0!=g&&1!=g)switch(d.charCodeAt(0)){case String.fromCharCode(11):case 107:a=!this.vwr.getBooleanProperty("allowKeyStrokes");switch(g){case 2:this.vwr.setBooleanProperty("allowKeyStrokes",a);this.vwr.setBooleanProperty("showKeyStrokes",!0);break;case 10:case 1:this.vwr.setBooleanProperty("allowKeyStrokes",a),this.vwr.setBooleanProperty("showKeyStrokes",!1)}this.clearKeyBuffer();this.vwr.refresh(3,"showkey");break;case 26:case 122:switch(g){case 2:this.vwr.undoMoveAction(4165,
1);break;case 3:this.vwr.undoMoveAction(4140,1)}break;case 25:case 121:switch(g){case 2:this.vwr.undoMoveAction(4140,1)}}else this.vwr.getBooleanProperty("allowKeyStrokes")&&this.addKeyBuffer(1==a.getModifiers()?Character.toUpperCase(d):d)}},"java.awt.event.KeyEvent");c(b,"keyPressed",function(a){this.vwr.isApplet&&a.consume();this.manager.keyPressed(a.getKeyCode(),a.getModifiers())},"java.awt.event.KeyEvent");c(b,"keyReleased",function(a){a.consume();this.manager.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");
c(b,"clearKeyBuffer",function(){0!=this.keyBuffer.length&&(this.keyBuffer="",this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync('!set echo _KEYSTROKES; set echo bottom left;echo ""',!0,!0))});c(b,"addKeyBuffer",function(a){10==a.charCodeAt(0)?this.sendKeyBuffer():(8==a.charCodeAt(0)?0<this.keyBuffer.length&&(this.keyBuffer=this.keyBuffer.substring(0,this.keyBuffer.length-1)):this.keyBuffer+=a,this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+
JU.PT.esc("\u0001"+this.keyBuffer),!0,!0))},"~S");c(b,"sendKeyBuffer",function(){var a=this.keyBuffer;this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+JU.PT.esc(this.keyBuffer),!0,!0);this.clearKeyBuffer();this.vwr.evalStringQuietSync(a,!1,!0)});c(b,"entry",function(a,d,g,b){this.isMouseDown=this.wheeling=!1;this.modifiersDown=0;this.manager.mouseEnterExit(a,d,g,b)},"~N,~N,~N,~B");c(b,"clicked",function(a,d,g,b){this.clearKeyBuffer();
this.manager.mouseAction(2,a,d,g,1,b)},"~N,~N,~N,~N,~N");c(b,"moved",function(a,d,g,b){this.clearKeyBuffer();this.isMouseDown?this.manager.mouseAction(1,a,d,g,0,this.modifiersDown):this.manager.mouseAction(0,a,d,g,0,b)},"~N,~N,~N,~N");c(b,"wheeled",function(a,d,g){this.clearKeyBuffer();this.wheeling=!0;this.manager.mouseAction(3,a,0,d,0,g&-29|32)},"~N,~N,~N");c(b,"pressed",function(a,d,g,b){this.clearKeyBuffer();this.isMouseDown=!0;this.modifiersDown=b;this.wheeling=!1;this.manager.mouseAction(4,
a,d,g,0,b)},"~N,~N,~N,~N,~B");c(b,"released",function(a,d,g,b){this.isMouseDown=!1;this.modifiersDown=0;this.wheeling=!1;this.manager.mouseAction(5,a,d,g,0,b)},"~N,~N,~N,~N");c(b,"dragged",function(a,d,g){this.wheeling||(20==(this.modifiersDown&20)&&(this.modifiersDown=this.modifiersDown&-5|2),this.manager.mouseAction(1,a,d,g,0,this.modifiersDown))},"~N,~N,~N");b.applyLeftMouse=c(b,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");j(b,"processKeyEvent",function(a){switch(a.getID()){case 401:this.keyPressed(a);
break;case 402:this.keyReleased(a);break;case 400:this.keyTyped(a)}},"~O")});s("J.awtjs2d");B(["J.api.GenericPlatform"],"J.awtjs2d.Platform","java.net.URL java.util.Date JU.AjaxURLStreamHandlerFactory $.Rdr J.api.Interface J.awtjs2d.Display $.Image $.JSFile $.JSFont $.Mouse".split(" "),function(){var b=n(function(){this.context=this.vwr=this.canvas=null;v(this,arguments)},J.awtjs2d,"Platform",null,J.api.GenericPlatform);j(b,"setViewer",function(a,d){this.vwr=a;null==d?(d=document.createElement("canvas"),
this.context=d.getContext("2d")):(this.context=d.getContext("2d"),d.imgdata=this.context.getImageData(0,0,d.width,d.height),d.buf8=d.imgdata.data);this.canvas=d;try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(g){}},"J.api.PlatformViewer,~O");j(b,"isSingleThreaded",function(){return!0});j(b,"getJsObjectInfo",function(a,d,g){return null==d?null:"localName"==d?a[0].nodeName:null==g?a[0][d]:a[0][d](g[0])},"~A,~S,~A");j(b,"isHeadless",function(){return!1});j(b,"getMouseManager",
function(a,d){return new J.awtjs2d.Mouse(a,this.vwr,d)},"~N,~O");j(b,"convertPointFromScreen",function(a,d){J.awtjs2d.Display.convertPointFromScreen(a,d)},"~O,JU.P3");j(b,"getFullScreenDimensions",function(a,d){J.awtjs2d.Display.getFullScreenDimensions(a,d)},"~O,~A");j(b,"getMenuPopup",function(a,d){var g="j"==d?"awtjs2d.JSJmolPopup":"awtjs2d.JSModelKitPopup",b=J.api.Interface.getOption(g,this.vwr,"popup");try{null!=b&&b.jpiInitialize(this.vwr,a)}catch(c){if(H(c,Exception))return System.out.println("Exception creating "+
g+":"+c),null;throw c;}return b},"~S,~S");j(b,"hasFocus",function(a){return J.awtjs2d.Display.hasFocus(a)},"~O");j(b,"prompt",function(a,d,g,b){return J.awtjs2d.Display.prompt(this.vwr,a,d,g,b)},"~S,~S,~A,~B");j(b,"renderScreenImage",function(a,d){J.awtjs2d.Display.renderScreenImage(this.vwr,a,d)},"~O,~O");j(b,"drawImage",function(a,d,g,b,c,f,h){J.awtjs2d.Display.drawImage(a,d,g,b,c,f,h)},"~O,~O,~N,~N,~N,~N,~B");j(b,"requestFocusInWindow",function(a){J.awtjs2d.Display.requestFocusInWindow(a)},"~O");
j(b,"repaint",function(){var a=null,a=self.Jmol&&Jmol.repaint?Jmol:null;null!=a&&a.repaint(this.vwr.html5Applet,!0)},"~O");j(b,"setTransparentCursor",function(){},"~O");j(b,"setCursor",function(a){J.awtjs2d.Platform.Jmol().setCursor(this.vwr.html5Applet,a)},"~N,~O");j(b,"allocateRgbImage",function(a,d,g,b,c,f){null==g&&(g=this.grabPixels(null,0,0,null),a=this.canvas.width,d=this.canvas.height);return J.awtjs2d.Image.allocateRgbImage(a,d,g,b,c,f?null:this.canvas)},"~N,~N,~A,~N,~B,~B");j(b,"notifyEndOfRendering",
function(){});j(b,"disposeGraphics",function(){},"~O");j(b,"grabPixels",function(a,d,g){var b=null,c=null==a;c&&(this.canvas=a=Jmol.loadImage(this,"webgl",""+System.currentTimeMillis(),this.vwr.html5Applet._canvas.toDataURL(),null,null),d=a.imageWidth,g=a.imageHeight,a.imageWidth=0);a.image&&(d!=a.width||g!=a.height)&&Jmol.setCanvasImage(a,d,g);if(a.buf32)return a.buf32;b=a.getContext("2d");d=J.awtjs2d.Image.grabPixels(b,d,g);a.buf32=d;if(c)for(a=d.length;0<=--a;)0==d[a]&&(d[a]=-1);return d},"~O,~N,~N,~A");
j(b,"drawImageToBuffer",function(a,d,g,b,c){return this.grabPixels(g,b,c,null)},"~O,~O,~O,~N,~N,~N");j(b,"getTextPixels",function(a,d,g,b,c,f,h){return J.awtjs2d.Image.getTextPixels(a,d,g,c,f,h)},"~S,JU.Font,~O,~O,~N,~N,~N");j(b,"flushImage",function(){},"~O");j(b,"getGraphics",function(a){return null==a?this.context:a.getContext("2d")},"~O");j(b,"getImageHeight",function(a){return null==a?-1:J.awtjs2d.Image.getHeight(a)},"~O");j(b,"getImageWidth",function(a){return null==a?-1:J.awtjs2d.Image.getWidth(a)},
"~O");j(b,"getStaticGraphics",function(a){return this.getGraphics(a)},"~O,~B");j(b,"newBufferedImage",function(a,d,g){return J.awtjs2d.Platform.Jmol().getHiddenCanvas(this.vwr.html5Applet,"stereoImage",d,g)},"~O,~N,~N");j(b,"newOffScreenImage",function(a,d){return J.awtjs2d.Platform.Jmol().getHiddenCanvas(this.vwr.html5Applet,"textImage",a,d)},"~N,~N");j(b,"waitForDisplay",function(){return!1},"~O,~O");j(b,"createImage",function(a){var d=a[0],g=a[1];a=a[2];var b=this.vwr,c=null==a?b.getEvalContextAndHoldQueue(b.eval):
null,f=null,f=function(a,g){b.loadImageData(a,g,d,c)};return J.awtjs2d.Platform.Jmol().loadImage(this,d,g,a,f)},"~O");j(b,"fontStringWidth",function(a,d){return J.awtjs2d.JSFont.stringWidth(a,this.context,d)},"JU.Font,~S");j(b,"getFontAscent",function(a){return J.awtjs2d.JSFont.getAscent(a)},"~O");j(b,"getFontDescent",function(a){return J.awtjs2d.JSFont.getDescent(a)},"~O");j(b,"getFontMetrics",function(a,d){return J.awtjs2d.JSFont.getFontMetrics(a,null==d?this.context:d)},"JU.Font,~O");j(b,"newFont",
function(a,d,g,b){return J.awtjs2d.JSFont.newFont(a,d,g,b,"px")},"~S,~B,~B,~N");j(b,"getDateFormat",function(a){if(null!=a&&a.contains("32000"))return"D:"+this.getDateFormat("8224")+"'00'";var d=new java.util.Date;if(null!=a){if(0<=a.indexOf("8601")){a=d.toString().split(" ");if(1==a.length)return a;var g="0"+(1+d.getMonth()),g=g.substring(g.length-2),d="0"+d.getDate(),d=d.substring(d.length-2);return a[3]+"-"+g+"-"+d+"T"+a[4]}if(0<=a.indexOf("8824"))return a=d.toString().split(" "),g="0"+(1+d.getMonth()),
g=g.substring(g.length-2),d="0"+d.getDate(),d=d.substring(d.length-2),a[3]+g+d+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}return d.toUTCString()},"~S");j(b,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");j(b,"getBufferedFileInputStream",function(){return null},"~S");j(b,"getURLContents",function(a,d,g,b){return J.awtjs2d.Platform.getURLContentsStatic(a,d,g,b)},"java.net.URL,~A,~S,~B");b.getURLContentsStatic=c(b,"getURLContentsStatic",function(a,d,g,b){a=J.awtjs2d.JSFile.getURLContents(a,
d,g);try{return!b?a:"string"==typeof a?a:y(a,"JU.SB")?a.toString():y(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(c){if(H(c,Exception))return""+c;throw c;}},"java.net.URL,~A,~S,~B");j(b,"getLocalUrl",function(){return null},"~S");j(b,"getImageDialog",function(a,d){return J.awtjs2d.Image.getImageDialog(this.vwr,a,d)},"~S,java.util.Map");b.Jmol=c(b,"Jmol",function(){return Jmol});j(b,"forceAsyncLoad",function(a){return J.awtjs2d.Platform.Jmol().isBinaryUrl(a)},
"~S");j(b,"getInChI",function(){return null==J.awtjs2d.Platform.inchi?J.awtjs2d.Platform.inchi=J.api.Interface.getInterface("J.inchi.InChIJS",this.vwr,"platform"):J.awtjs2d.Platform.inchi});j(b,"confirm",function(a,d){var g=!1;null!=d&&(g=!1);return g?1:2},"~S,~S");b.inchi=null});s("J.bspt");B(null,"J.bspt.Bspf",["JU.AU","J.bspt.Bspt"],function(){var b=n(function(){this.dimMax=0;this.bspts=null;this.isValid=!1;this.cubeIterators=this.bsptsValid=null;v(this,arguments)},J.bspt,"Bspf",null);A(b,function(a){this.dimMax=
a;this.bspts=Array(1);this.bsptsValid=ga(1,!1);this.cubeIterators=[]},"~N");c(b,"validateModel",function(a,d){this.bsptsValid[a]=d},"~N,~B");c(b,"isInitializedIndex",function(a){return this.bspts.length>a&&null!=this.bspts[a]&&this.bsptsValid[a]},"~N");c(b,"addTuple",function(a,d){a>=this.bspts.length&&(this.bspts=JU.AU.arrayCopyObject(this.bspts,a+1),this.bsptsValid=JU.AU.arrayCopyBool(this.bsptsValid,a+1));var g=this.bspts[a];null==g&&(g=this.bspts[a]=new J.bspt.Bspt(this.dimMax,a));g.addTuple(d)},
"~N,JU.P3");c(b,"stats",function(){for(var a=0;a<this.bspts.length;++a)null!=this.bspts[a]&&this.bspts[a].stats()});c(b,"getCubeIterator",function(a){if(0>a)return this.getNewCubeIterator(-1-a);a>=this.cubeIterators.length&&(this.cubeIterators=JU.AU.arrayCopyObject(this.cubeIterators,a+1));null==this.cubeIterators[a]&&null!=this.bspts[a]&&(this.cubeIterators[a]=this.getNewCubeIterator(a));this.cubeIterators[a].set(this.bspts[a]);return this.cubeIterators[a]},"~N");c(b,"getNewCubeIterator",function(a){return this.bspts[a].allocateCubeIterator()},
"~N");c(b,"initialize",function(a,d,g){null!=this.bspts[a]&&this.bspts[a].reset();for(var b=g.nextSetBit(0);0<=b;b=g.nextSetBit(b+1))this.addTuple(a,d[b]);this.bsptsValid[a]=!0},"~N,~A,JU.BS")});s("J.bspt");B(null,"J.bspt.Bspt",["J.bspt.CubeIterator","$.Leaf"],function(){var b=n(function(){this.index=this.dimMax=this.treeDepth=0;this.eleRoot=null;v(this,arguments)},J.bspt,"Bspt",null);A(b,function(a,d){this.dimMax=a;this.index=d;this.reset()},"~N,~N");c(b,"reset",function(){this.eleRoot=new J.bspt.Leaf(this,
null,0);this.treeDepth=1});c(b,"addTuple",function(a){this.eleRoot=this.eleRoot.addTuple(0,a)},"JU.T3");c(b,"stats",function(){});c(b,"allocateCubeIterator",function(){return new J.bspt.CubeIterator(this)})});s("J.bspt");z=n(function(){this.stack=this.bspt=null;this.leafIndex=this.sp=0;this.leaf=null;this.dz=this.dy=this.dx=this.cz=this.cy=this.cx=this.radius=0;this.tHemisphere=!1;v(this,arguments)},J.bspt,"CubeIterator",null);A(z,function(b){this.set(b)},"J.bspt.Bspt");c(z,"set",function(b){this.bspt=
b;this.stack=Array(b.treeDepth)},"J.bspt.Bspt");c(z,"initialize",function(b,a,d){this.radius=a;this.tHemisphere=!1;this.cx=b.x;this.cy=b.y;this.cz=b.z;this.leaf=null;this.stack.length<this.bspt.treeDepth&&this.set(this.bspt);this.stack[0]=this.bspt.eleRoot;this.sp=1;this.findLeftLeaf();this.tHemisphere=d},"JU.T3,~N,~B");c(z,"release",function(){this.set(this.bspt)});c(z,"hasMoreElements",function(){for(;null!=this.leaf;){for(;this.leafIndex<this.leaf.count;++this.leafIndex)if(this.isWithinRadius(this.leaf.tuples[this.leafIndex]))return!0;
this.findLeftLeaf()}return!1});c(z,"nextElement",function(){return this.leaf.tuples[this.leafIndex++]});c(z,"foundDistance2",function(){return this.dx*this.dx+this.dy*this.dy+this.dz*this.dz});c(z,"findLeftLeaf",function(){this.leaf=null;if(0!=this.sp){for(var b=this.stack[--this.sp];y(b,"J.bspt.Node");){var a;switch(b.dim){case 0:a=this.cx;break;case 1:a=this.cy;break;default:a=this.cz}var d=a+this.radius;if(!this.tHemisphere||0!=b.dim)a-=this.radius;if(a<=b.maxLeft&&d>=b.minLeft)d>=b.minRight&&
a<=b.maxRight&&(this.stack[this.sp++]=b.eleRight),b=b.eleLeft;else if(d>=b.minRight&&a<=b.maxRight)b=b.eleRight;else{if(0==this.sp)return;b=this.stack[--this.sp]}}this.leaf=b;this.leafIndex=0}});c(z,"isWithinRadius",function(b){this.dx=b.x-this.cx;return(!this.tHemisphere||0<=this.dx)&&(this.dx=Math.abs(this.dx))<=this.radius&&(this.dy=Math.abs(b.y-this.cy))<=this.radius&&(this.dz=Math.abs(b.z-this.cz))<=this.radius},"JU.T3");s("J.bspt");n(function(){this.bspt=null;this.count=0;v(this,arguments)},
J.bspt,"Element",null);s("J.bspt");B(["J.bspt.Element"],"J.bspt.Leaf",["J.bspt.Node"],function(){var b=n(function(){this.tuples=null;v(this,arguments)},J.bspt,"Leaf",J.bspt.Element);A(b,function(a,d,g){this.bspt=a;this.count=0;this.tuples=Array(2);if(null!=d){for(a=g;2>a;++a)this.tuples[this.count++]=d.tuples[a],d.tuples[a]=null;d.count=g}},"J.bspt.Bspt,J.bspt.Leaf,~N");c(b,"sort",function(a){for(var d=this.count;0<--d;)for(var g=this.tuples[d],b=J.bspt.Node.getDimensionValue(g,a),c=d;0<=--c;){var f=
this.tuples[c],h=J.bspt.Node.getDimensionValue(f,a);h>b&&(this.tuples[d]=f,this.tuples[c]=g,g=f,b=h)}},"~N");j(b,"addTuple",function(a,d){return 2>this.count?(this.tuples[this.count++]=d,this):(new J.bspt.Node(this.bspt,a,this)).addTuple(a,d)},"~N,JU.T3")});s("J.bspt");B(["J.bspt.Element"],"J.bspt.Node",["J.bspt.Leaf"],function(){var b=n(function(){this.maxLeft=this.minLeft=this.dim=0;this.eleLeft=null;this.maxRight=this.minRight=0;this.eleRight=null;v(this,arguments)},J.bspt,"Node",J.bspt.Element);
A(b,function(a,d,g){this.bspt=a;d==a.treeDepth&&(a.treeDepth=d+1);if(2!=g.count)throw new NullPointerException;this.dim=d%a.dimMax;g.sort(this.dim);a=new J.bspt.Leaf(a,g,1);this.minLeft=J.bspt.Node.getDimensionValue(g.tuples[0],this.dim);this.maxLeft=J.bspt.Node.getDimensionValue(g.tuples[g.count-1],this.dim);this.minRight=J.bspt.Node.getDimensionValue(a.tuples[0],this.dim);this.maxRight=J.bspt.Node.getDimensionValue(a.tuples[a.count-1],this.dim);this.eleLeft=g;this.eleRight=a;this.count=2},"J.bspt.Bspt,~N,J.bspt.Leaf");
c(b,"addTuple",function(a,d){var g=J.bspt.Node.getDimensionValue(d,this.dim);++this.count;g<this.maxLeft||(g>this.minRight?0:g==this.maxLeft?g==this.minRight?this.eleLeft.count<this.eleRight.count:1:g==this.minRight?0:this.eleLeft.count<this.eleRight.count)?(g<this.minLeft?this.minLeft=g:g>this.maxLeft&&(this.maxLeft=g),this.eleLeft=this.eleLeft.addTuple(a+1,d)):(g<this.minRight?this.minRight=g:g>this.maxRight&&(this.maxRight=g),this.eleRight=this.eleRight.addTuple(a+1,d));return this},"~N,JU.T3");
b.getDimensionValue=c(b,"getDimensionValue",function(a,d){null==a&&System.out.println("bspt.Node ???");switch(d){case 0:return a.x;case 1:return a.y;default:return a.z}},"JU.T3,~N")});s("J.c");B(["java.lang.Enum"],"J.c.CBK",["JU.SB"],function(){var b=I(J.c,"CBK",Enum);b.getCallback=c(b,"getCallback",function(a){a=a.toUpperCase();var d=a.indexOf("CALLBACK");0<d&&(a=a.substring(0,d));for(var g,d=0,b=J.c.CBK.values();d<b.length&&((g=b[d])||1);d++)if(g.name().equalsIgnoreCase(a))return g;return null},
"~S");b.getNameList=c(b,"getNameList",function(){if(null==J.c.CBK.nameList){for(var a=new JU.SB,d,g=0,b=J.c.CBK.values();g<b.length&&((d=b[g])||1);g++)a.append(d.name().toLowerCase()).append("Callback;");J.c.CBK.nameList=a.toString()}return J.c.CBK.nameList});b.nameList=null;K(b,"ANIMFRAME",0,[]);K(b,"APPLETREADY",1,[]);K(b,"ATOMMOVED",2,[]);K(b,"AUDIO",3,[]);K(b,"CALCULATION",4,[]);K(b,"CLICK",5,[]);K(b,"DRAGDROP",6,[]);K(b,"ECHO",7,[]);K(b,"ERROR",8,[]);K(b,"EVAL",9,[]);K(b,"HOVER",10,[]);K(b,"IMAGE",
11,[]);K(b,"LOADSTRUCT",12,[]);K(b,"MEASURE",13,[]);K(b,"MESSAGE",14,[]);K(b,"MINIMIZATION",15,[]);K(b,"MODELKIT",16,[]);K(b,"PICK",17,[]);K(b,"RESIZE",18,[]);K(b,"SCRIPT",19,[]);K(b,"SELECT",20,[]);K(b,"SERVICE",21,[]);K(b,"STRUCTUREMODIFIED",22,[]);K(b,"SYNC",23,[])});s("J.c");B(["java.lang.Enum"],"J.c.FIL",null,function(){var b=n(function(){this.code=0;v(this,arguments)},J.c,"FIL",Enum);c(b,"getCode",function(){return this.code});A(b,function(a){this.code=a},"~N");K(b,"DELETED",0,[5]);K(b,"CREATED",
1,[3]);K(b,"CREATING_MODELSET",2,[2]);K(b,"ZAPPED",3,[0]);K(b,"NOT_LOADED",4,[-1])});s("J.c");B(["java.lang.Enum"],"J.c.PAL",null,function(){var b=n(function(){this.$$name=null;this.id=0;v(this,arguments)},J.c,"PAL",Enum);A(b,function(a,d){this.$$name=a;this.id=d},"~S,~N");b.pidOf=c(b,"pidOf",function(a){return y(a,"J.c.PAL")?a.id:y(a,Byte)?a.byteValue():J.c.PAL.UNKNOWN.id},"~O");b.isPaletteVariable=c(b,"isPaletteVariable",function(a){return 0!=(a&64)},"~N");b.getPalette=c(b,"getPalette",function(a){if(0>
a.indexOf("_"))for(var d,g=0,b=J.c.PAL.values();g<b.length&&((d=b[g])||1);g++)if(a.equalsIgnoreCase(d.$$name))return d;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY:J.c.PAL.UNKNOWN},"~S");b.getPaletteID=c(b,"getPaletteID",function(a){if(0>a.indexOf("_"))for(var d,g=0,b=J.c.PAL.values();g<b.length&&((d=b[g])||1);g++)if(a.equalsIgnoreCase(d.$$name))return d.id;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY.id:J.c.PAL.UNKNOWN.id},"~S");b.getPaletteName=c(b,"getPaletteName",function(a){for(var d,
g=0,b=J.c.PAL.values();g<b.length&&((d=b[g])||1);g++)if(d.id==a)return d.$$name;return null},"~N");b.PALETTE_VOLATILE=64;b.PALETTE_NONE=0;b.PALETTE_CPK=1;b.PALETTE_PARTIAL_CHARGE=2;b.PALETTE_FORMAL_CHARGE=3;b.PALETTE_TEMP=68;b.PALETTE_FIXEDTEMP=5;b.PALETTE_SURFACE=70;b.PALETTE_STRUCTURE=7;b.PALETTE_DSSR_BASEPAIR=8;b.PALETTE_AMINO=9;b.PALETTE_SHAPELY=10;b.PALETTE_CHAIN=11;b.PALETTE_GROUP=76;b.PALETTE_MONOMER=77;b.PALETTE_MOLECULE=78;b.PALETTE_ALTLOC=15;b.PALETTE_INSERTION=16;b.PALETTE_JMOL=17;b.PALETTE_RASMOL=
18;b.PALETTE_TYPE=19;b.PALETTE_ENERGY=20;b.PALETTE_PROPERTY=85;b.PALETTE_VARIABLE=86;b.PALETTE_STRAIGHTNESS=87;b.PALETTE_POLYMER=88;b.PALETTE_NUCLEIC=25;b.argbsCpkRasmol=F(-1,[16716947,33554431,50315467,62005794,83951360,113821896,126849023,149946368,165324064,184549631,203590434,226525328,249210144,268412160,285198386,285277952,343965840,377520272,411074704,427851920,452961536,480586282,497363498,514140714,598026794,796950672,899686640,956278016,1339729184]);b.argbsCpk=F(-1,[4294907027,4294967295,
4292476927,4291592447,4290969344,4294948277,4287664272,4281356536,4294905101,4287684688,4289979381,4289420530,4287299328,4290750118,4293970080,4294934528,4294967088,4280283167,4286632419,4287578324,4282253056,4293322470,4290757319,4289111723,4287273415,4288445127,4292896307,4293955744,4283486288,4291330099,4286415024,4290940815,4284911503,4290609379,4294942976,4289079593,4284266705,4285542064,4278255360,4287954943,4287946976,4285776585,4283741621,4282097310,4280586127,4278877580,4278217093,4290822336,
4294957455,4289099123,4284907648,4288570293,4292114944,4287889556,4282556080,4283897743,4278241536,4285584639,4294967239,4292476871,4291297223,4288937927,4287627207,4284612551,4282777543,4281401287,4280287175,4278255516,4278249077,4278244434,4278239032,4278233892,4283286271,4283279103,4280390870,4280712619,4280706710,4279719047,4291875040,4294955299,4290296016,4289090637,4283914593,4288565173,4289420288,4285878085,4282548886,4282515558,4278222080,4285574138,4278237951,4278231551,4278226943,4278223103,
4278217727,4283718898,4286078179,4287254499,4288755412,4289929172,4289929146,4289924518,4290579847,4291231846,4291559513,4291887183,4292411461,4292870200,4293263406,4293591078]);K(b,"UNKNOWN",0,[null,255]);K(b,"NONE",1,["none",0]);K(b,"CPK",2,["cpk",1]);K(b,"PARTIAL_CHARGE",3,["partialcharge",2]);K(b,"FORMAL_CHARGE",4,["formalcharge",3]);K(b,"TEMP",5,["temperature",68]);K(b,"FIXEDTEMP",6,["fixedtemperature",5]);K(b,"SURFACE",7,["surfacedistance",70]);K(b,"STRUCTURE",8,["structure",7]);K(b,"DSSR_BASEPAIR",
9,["basepairtype",8]);K(b,"AMINO",10,["amino",9]);K(b,"SHAPELY",11,["shapely",10]);K(b,"CHAIN",12,["chain",11]);K(b,"GROUP",13,["group",76]);K(b,"MONOMER",14,["monomer",77]);K(b,"MOLECULE",15,["molecule",78]);K(b,"ALTLOC",16,["altloc",15]);K(b,"INSERTION",17,["insertion",16]);K(b,"JMOL",18,["jmol",17]);K(b,"RASMOL",19,["rasmol",18]);K(b,"TYPE",20,["type",19]);K(b,"ENERGY",21,["energy",20]);K(b,"PROPERTY",22,["property",85]);K(b,"VARIABLE",23,["variable",86]);K(b,"STRAIGHTNESS",24,["straightness",
87]);K(b,"POLYMER",25,["polymer",88]);K(b,"NUCLEIC",26,["nucleic",25])});s("J.c");B(["java.lang.Enum"],"J.c.STER",null,function(){var b=n(function(){this.$$name=null;this.$isBiColor=!1;v(this,arguments)},J.c,"STER",Enum);A(b,function(a,d){this.$$name=a;this.$isBiColor=d},"~S,~B");c(b,"getName",function(){return this.$$name});c(b,"isBiColor",function(){return this.$isBiColor});b.getStereoMode=c(b,"getStereoMode",function(a){for(var d,g=0,b=J.c.STER.values();g<b.length&&((d=b[g])||1);g++)if(d.$$name.equalsIgnoreCase(a))return d;
return null},"~S");K(b,"NONE",0,["OFF",!1]);K(b,"DOUBLE",1,["",!1]);K(b,"REDCYAN",2,["REDCYAN",!0]);K(b,"REDBLUE",3,["REDBLUE",!0]);K(b,"REDGREEN",4,["REDGREEN",!0]);K(b,"DTI",5,["DTI",!1]);K(b,"CUSTOM",6,["",!0])});s("J.c");B(["java.lang.Enum"],"J.c.STR",null,function(){var b=n(function(){this.color=this.id=0;v(this,arguments)},J.c,"STR",Enum);A(b,function(a,d){this.id=a;this.color=d},"~N,~N");c(b,"getId",function(){return this.id});c(b,"getColor",function(){return this.color});b.getProteinStructureType=
c(b,"getProteinStructureType",function(a){for(var d,g=0,b=J.c.STR.values();g<b.length&&((d=b[g])||1);g++)if(a.equalsIgnoreCase(d.name()))return d.isProtein()?d:J.c.STR.NOT;return J.c.STR.NOT},"~S");c(b,"getBioStructureTypeName",function(a){return 0>this.id?"":a&&this.isProtein()?"protein":this.name()},"~B");c(b,"isProtein",function(){return 0<=this.id&&3>=this.id||7<=this.id});K(b,"NOT",0,[-1,4286611584]);K(b,"NONE",1,[0,4294967295]);K(b,"TURN",2,[1,4284514559]);K(b,"SHEET",3,[2,4294952960]);K(b,
"HELIX",4,[3,4294901888]);K(b,"DNA",5,[4,4289593598]);K(b,"RNA",6,[5,4294771042]);K(b,"CARBOHYDRATE",7,[6,4289111802]);K(b,"HELIX310",8,[7,4288675968]);K(b,"HELIXALPHA",9,[8,4294901888]);K(b,"HELIXPI",10,[9,4284481664]);K(b,"DSSRINTERNALLOOP",11,[10,13676784]);K(b,"DSSRHAIRPINLOOP",12,[11,41200]);K(b,"DSSRBULGELOOP",13,[12,61680]);K(b,"DSSRJUNCTIONLOOP",14,[13,10526960]);K(b,"DSSRSTEM",15,[14,16776960]);K(b,"ANNOTATION",16,[-2,0])});s("J.c");B(["java.lang.Enum"],"J.c.VDW",null,function(){var b=n(function(){this.pt=
0;this.type2=this.type=null;v(this,arguments)},J.c,"VDW",Enum);A(b,function(a,d,g){this.pt=a;this.type=d;this.type2=g},"~N,~S,~S");c(b,"getVdwLabel",function(){return null==this.type?this.type2:this.type});b.getVdwType=c(b,"getVdwType",function(a){if(null!=a)for(var d,g=0,b=J.c.VDW.values();g<b.length&&((d=b[g])||1);g++)if(a.equalsIgnoreCase(d.type))return d;return null},"~S");b.getVdwType2=c(b,"getVdwType2",function(a){if(null!=a)for(var d,g=0,b=J.c.VDW.values();g<b.length&&((d=b[g])||1);g++)if(a.equalsIgnoreCase(d.type2))return d;
return null},"~S");K(b,"JMOL",0,[0,"Jmol",null]);K(b,"BABEL",1,[1,"Babel",null]);K(b,"RASMOL",2,[2,"RasMol",null]);K(b,"BABEL21",3,[3,"Babel21",null]);K(b,"AUTO_JMOL",4,[0,null,"Jmol"]);K(b,"AUTO_BABEL",5,[1,null,"Babel"]);K(b,"AUTO_RASMOL",6,[2,null,"RasMol"]);K(b,"AUTO",7,[0,"Auto",null]);K(b,"USER",8,[-1,"User",null]);K(b,"ADPMAX",9,[-1,null,"adpmax"]);K(b,"ADPMIN",10,[-1,null,"adpmin"]);K(b,"HYDRO",11,[-1,null,"hydrophobic"]);K(b,"BONDING",12,[-1,null,"bondingradius"]);K(b,"TEMP",13,[-1,null,
"temperature"]);K(b,"NOJMOL",14,[-1,null,null]);K(b,"NADA",15,[-1,null,null])});s("J.g3d");B(["JU.P3i"],"J.g3d.CylinderRenderer",["JU.AU","$.P3"],function(){var b=n(function(){this.shader=this.line3d=this.g3d=null;this.colixB=this.colixA=0;this.shadesB=this.shadesA=null;this.dzBf=this.dyBf=this.dxBf=this.zAf=this.yAf=this.xAf=this.dzB=this.dyB=this.dxB=this.zAend=this.yAend=this.xAend=this.zA=this.yA=this.xA=0;this.tEvenDiameter=!1;this.endcaps=this.diameter=0;this.endCapHidden=!1;this.sinPhi=this.cosPhi=
this.cosTheta=this.radius2=this.radius=this.endcapShadeIndex=this.colixEndcap=this.argbEndcap=this.zEndcap=this.yEndcap=this.xEndcap=0;this.clipped=!1;this.rasterCount=0;this.ptB0i=this.ptA0i=this.ptB0=this.ptA0=this.xyzfRaster=this.xyztRaster=null;this.zTip=this.yTip=this.xTip=0;v(this,arguments)},J.g3d,"CylinderRenderer",null);P(b,function(){this.xyztRaster=x(-1,[L(32,0),L(32,0),L(32,0),L(32,0)]);this.xyzfRaster=x(-1,[F(32,0),F(32,0),F(32,0),F(32,0)]);this.ptA0i=new JU.P3i;this.ptB0i=new JU.P3i});
A(b,function(a){this.g3d=a;this.line3d=a.line3d;this.shader=a.shader},"J.g3d.Graphics3D");c(b,"renderOld",function(a,d,g,b,c,f,h,k,m,E,j){var q=w(c/2)+1,r=this.g3d,u=r.clipCode3(f-q,h-q,k-q),C=r.clipCode3(f+q,h+q,k+q),G=r.clipCode3(m-q,E-q,j-q),q=r.clipCode3(m+q,E+q,j+q),N=u|C|G|q;this.clipped=0!=N;if(!(-1==N||0!=(u&q&C&G)))if(this.dxB=m-f,this.dyB=E-h,this.dzB=j-k,1>=c)this.line3d.plotLineDeltaOld(r.getColorArgbOrGray(a),r.getColorArgbOrGray(d),f,h,k,this.dxB,this.dyB,this.dzB,this.clipped);else{m=
0==g&&(this.clipped||2==b||0==b);this.diameter=c;this.xA=f;this.yA=h;this.zA=k;this.endcaps=b;this.shadesA=r.getShades(this.colixA=a);this.shadesB=r.getShades(this.colixB=d);this.calcArgbEndcap(!0,!1);this.calcCosSin(this.dxB,this.dyB,this.dzB);this.calcPoints(3,!1);this.interpolate(0,1,this.xyzfRaster,this.xyztRaster);this.interpolate(1,2,this.xyzfRaster,this.xyztRaster);k=this.xyzfRaster;2==b&&this.renderFlatEndcap(!0,!1,k);r.setZMargin(5);a=r.width;d=r.zbuf;c=k[0];f=k[1];h=k[2];k=k[3];E=r.pixel;
for(j=this.rasterCount;0<=--j;)u=k[j]>>8,C=u>>1,G=c[j],q=f[j],N=h[j],this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(r.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+G,this.yEndcap+q,this.zEndcap-N-1,a,d,E),r.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-G,this.yEndcap-q,this.zEndcap+N-1,a,d,E)):(r.plotPixelUnclipped(this.argbEndcap,this.xEndcap+G,this.yEndcap+q,this.zEndcap-N-1,a,d,E),r.plotPixelUnclipped(this.argbEndcap,this.xEndcap-G,this.yEndcap-q,this.zEndcap+N-1,a,d,E))),this.line3d.plotLineDeltaAOld(this.shadesA,
this.shadesB,g,u,this.xA+G,this.yA+q,this.zA-N,this.dxB,this.dyB,this.dzB,this.clipped),m&&this.line3d.plotLineDeltaOld(this.shadesA[C],this.shadesB[C],this.xA-G,this.yA-q,this.zA+N,this.dxB,this.dyB,this.dzB,this.clipped);r.setZMargin(0);3==b&&this.renderSphericalEndcaps()}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"renderBitsFloat",function(a,d,g,b,c,f,h){var k=this.g3d;null==this.ptA0&&(this.ptA0=new JU.P3,this.ptB0=new JU.P3);this.ptA0.setT(f);var m=w(c/2)+1,E=Math.round(f.x),j=Math.round(f.y),
q=Math.round(f.z),r=Math.round(h.x),u=Math.round(h.y),C=Math.round(h.z),G=k.clipCode3(E-m,j-m,q-m),E=k.clipCode3(E+m,j+m,q+m),j=k.clipCode3(r-m,u-m,C-m),m=k.clipCode3(r+m,u+m,C+m),r=G|E|j|m;this.clipped=0!=r;if(!(-1==r||0!=(G&m&E&j))){this.dxBf=h.x-f.x;this.dyBf=h.y-f.y;this.dzBf=h.z-f.z;0<c&&(this.diameter=c,this.xAf=f.x,this.yAf=f.y,this.zAf=f.z);f=0==g&&(this.clipped||2==b||0==b);this.xA=D(this.xAf);this.yA=D(this.yAf);this.zA=D(this.zAf);this.dxB=D(this.dxBf);this.dyB=D(this.dyBf);this.dzB=D(this.dzBf);
this.shadesA=k.getShades(this.colixA=a);this.shadesB=k.getShades(this.colixB=d);this.endcaps=b;this.calcArgbEndcap(!0,!0);r=this.xyzfRaster;0<c&&this.generateBaseEllipsePrecisely(!1);2==b&&this.renderFlatEndcap(!0,!0,r);this.line3d.setLineBits(this.dxBf,this.dyBf);k.setZMargin(5);c=k.pixel;a=k.width;d=k.zbuf;h=r[0];G=r[1];m=r[2];r=r[3];for(u=this.rasterCount;0<=--u;){var C=r[u]>>8,E=C>>1,j=h[u],q=G[u],N=m[u];this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(k.plotPixelClippedArgb(this.argbEndcap,
this.xEndcap+j,this.yEndcap+q,this.zEndcap-N-1,a,d,c),k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-j,this.yEndcap-q,this.zEndcap+N-1,a,d,c)):(k.plotPixelUnclipped(this.argbEndcap,this.xEndcap+j,this.yEndcap+q,this.zEndcap-N-1,a,d,c),k.plotPixelUnclipped(this.argbEndcap,this.xEndcap-j,this.yEndcap-q,this.zEndcap+N-1,a,d,c)));this.ptA0.set(this.xA+j,this.yA+q,this.zA-N);this.ptB0.setT(this.ptA0);this.ptB0.x+=this.dxB;this.ptB0.y+=this.dyB;this.ptB0.z+=this.dzB;this.line3d.plotLineDeltaABitsFloat(this.shadesA,
this.shadesB,C,this.ptA0,this.ptB0,g,this.clipped);f&&(this.ptA0.set(this.xA-j,this.yA-q,this.zA+N),this.ptB0.setT(this.ptA0),this.ptB0.x+=this.dxB,this.ptB0.y+=this.dyB,this.ptB0.z+=this.dzB,this.line3d.plotLineDeltaABitsFloat(this.shadesA,this.shadesB,E,this.ptA0,this.ptB0,g,this.clipped))}k.setZMargin(0);3==b&&this.renderSphericalEndcaps();this.xAf+=this.dxBf;this.yAf+=this.dyBf;this.zAf+=this.dzBf}},"~N,~N,~N,~N,~N,JU.P3,JU.P3");c(b,"renderBits",function(a,d,g,b,c,f,h){var k=this.g3d;if(0==c||
1==c)this.line3d.plotLineBits(k.getColorArgbOrGray(a),k.getColorArgbOrGray(d),f,h,0,0,!1);else{this.ptA0i.setT(f);var m=w(c/2)+1,E=f.x,j=f.y,q=f.z,r=h.x,u=h.y,C=h.z,G=k.clipCode3(E-m,j-m,q-m),E=k.clipCode3(E+m,j+m,q+m),j=k.clipCode3(r-m,u-m,C-m),m=k.clipCode3(r+m,u+m,C+m),r=G|E|j|m;this.clipped=0!=r;if(!(-1==r||0!=(G&m&E&j))){this.dxBf=h.x-f.x;this.dyBf=h.y-f.y;this.dzBf=h.z-f.z;0<c&&(this.diameter=c,this.xAf=f.x,this.yAf=f.y,this.zAf=f.z);f=0==g&&(this.clipped||2==b||0==b);this.xA=D(this.xAf);this.yA=
D(this.yAf);this.zA=D(this.zAf);this.dxB=D(this.dxBf);this.dyB=D(this.dyBf);this.dzB=D(this.dzBf);this.shadesA=k.getShades(this.colixA=a);this.shadesB=k.getShades(this.colixB=d);this.endcaps=b;this.calcArgbEndcap(!0,!0);r=this.xyzfRaster;0<c&&this.generateBaseEllipsePrecisely(!1);2==b&&this.renderFlatEndcap(!0,!0,r);this.line3d.setLineBits(this.dxBf,this.dyBf);k.setZMargin(5);c=k.pixel;a=k.width;d=k.zbuf;h=r[0];G=r[1];m=r[2];r=r[3];for(u=this.rasterCount;0<=--u;){var C=r[u]>>8,E=C>>1,j=h[u],q=G[u],
N=m[u];this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+j,this.yEndcap+q,this.zEndcap-N-1,a,d,c),k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-j,this.yEndcap-q,this.zEndcap+N-1,a,d,c)):(k.plotPixelUnclipped(this.argbEndcap,this.xEndcap+j,this.yEndcap+q,this.zEndcap-N-1,a,d,c),k.plotPixelUnclipped(this.argbEndcap,this.xEndcap-j,this.yEndcap-q,this.zEndcap+N-1,a,d,c)));this.ptA0i.set(this.xA+j,this.yA+q,this.zA-N);this.ptB0i.setT(this.ptA0i);
this.ptB0i.x+=this.dxB;this.ptB0i.y+=this.dyB;this.ptB0i.z+=this.dzB;this.line3d.plotLineDeltaABitsInt(this.shadesA,this.shadesB,C,this.ptA0i,this.ptB0i,g,this.clipped);f&&(this.ptA0i.set(this.xA-j,this.yA-q,this.zA+N),this.ptB0i.setT(this.ptA0i),this.ptB0i.x+=this.dxB,this.ptB0i.y+=this.dyB,this.ptB0i.z+=this.dzB,this.line3d.plotLineDeltaABitsInt(this.shadesA,this.shadesB,E,this.ptA0i,this.ptB0i,g,this.clipped))}k.setZMargin(0);3==b&&this.renderSphericalEndcaps();this.xAf+=this.dxBf;this.yAf+=this.dyBf;
this.zAf+=this.dzBf}}},"~N,~N,~N,~N,~N,JU.P3i,JU.P3i");c(b,"renderConeOld",function(a,d,g,b,c,f,h,k,m,E,j){this.dxBf=h-(this.xAf=b);this.dyBf=k-(this.yAf=c);this.dzBf=m-(this.zAf=f);this.xA=w(Math.floor(this.xAf));this.yA=w(Math.floor(this.yAf));this.zA=w(Math.floor(this.zAf));this.dxB=w(Math.floor(this.dxBf));this.dyB=w(Math.floor(this.dyBf));this.dzB=w(Math.floor(this.dzBf));this.xTip=h;this.yTip=k;this.zTip=m;this.shadesA=this.g3d.getShades(this.colixA=a);var q=this.shader.getShadeIndex(this.dxB,
this.dyB,-this.dzB);a=this.g3d;b=a.pixel;c=a.width;f=a.zbuf;a.plotPixelClippedArgb(this.shadesA[q],D(h),D(k),D(m),c,f,b);this.diameter=g;if(1>=g)1==g&&this.line3d.plotLineDeltaOld(this.colixA,this.colixA,this.xA,this.yA,this.zA,this.dxB,this.dyB,this.dzB,this.clipped);else{this.endcaps=d;this.calcArgbEndcap(!1,!0);this.generateBaseEllipsePrecisely(j);!j&&2==this.endcaps&&this.renderFlatEndcap(!1,!0,this.xyzfRaster);a.setZMargin(5);d=this.xyztRaster[0];g=this.xyztRaster[1];h=this.xyztRaster[2];k=this.xyzfRaster[3];
m=this.shadesA;for(var q=this.endCapHidden&&0!=this.argbEndcap,r=this.rasterCount;0<=--r;){var u=d[r],C=g[r],G=h[r],N=k[r]>>8,v=this.xAf+u,s=this.yAf+C,n=this.zAf-G,u=this.xAf-u,C=this.yAf-C,G=this.zAf+G,z=m[0];q&&(a.plotPixelClippedArgb(this.argbEndcap,D(v),D(s),D(n),c,f,b),a.plotPixelClippedArgb(this.argbEndcap,D(u),D(C),D(G),c,f,b));0!=z&&(this.line3d.plotLineDeltaAOld(m,m,0,N,D(v),D(s),D(n),w(Math.ceil(this.xTip-v)),w(Math.ceil(this.yTip-s)),w(Math.ceil(this.zTip-n)),!0),E&&(this.line3d.plotLineDeltaAOld(m,
m,0,N,D(v),D(s)+1,D(n),w(Math.ceil(this.xTip-v)),w(Math.ceil(this.yTip-s))+1,w(Math.ceil(this.zTip-n)),!0),this.line3d.plotLineDeltaAOld(m,m,0,N,D(v)+1,D(s),D(n),w(Math.ceil(this.xTip-v))+1,w(Math.ceil(this.yTip-s)),w(Math.ceil(this.zTip-n)),!0)),!j&&!(2!=this.endcaps&&0<this.dzB)&&this.line3d.plotLineDeltaOld(z,z,D(u),D(C),D(G),w(Math.ceil(this.xTip-u)),w(Math.ceil(this.yTip-C)),w(Math.ceil(this.zTip-G)),!0))}a.setZMargin(0)}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B,~B");c(b,"generateBaseEllipsePrecisely",
function(a){this.calcCosSin(this.dxBf,this.dyBf,this.dzBf);this.calcPoints(a?2:3,!0);this.interpolatePrecisely(0,1,this.xyzfRaster,this.xyztRaster);a||this.interpolatePrecisely(1,2,this.xyzfRaster,this.xyztRaster);for(a=3;0<=--a;)for(var d=this.rasterCount;0<=--d;)this.xyzfRaster[a][d]=w(Math.floor(this.xyztRaster[a][d]))},"~B");c(b,"calcPoints",function(a,d){this.calcRotatedPoint(0,0,d,this.xyzfRaster,this.xyztRaster);this.calcRotatedPoint(0.5,1,d,this.xyzfRaster,this.xyztRaster);3==(this.rasterCount=
a)&&this.calcRotatedPoint(1,2,d,this.xyzfRaster,this.xyztRaster)},"~N,~B");c(b,"calcCosSin",function(a,d,g){var b=a*a+d*d;if(0==b)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var c=Math.sqrt(b),b=Math.sqrt(b+g*g);this.cosTheta=g/b;this.cosPhi=a/c;this.sinPhi=d/c}},"~N,~N,~N");c(b,"calcRotatedPoint",function(a,d,g,b,c){c[3][d]=a;a*=3.141592653589793;var f=Math.sin(a)*this.cosTheta,h=Math.cos(a);a=this.radius*(f*this.cosPhi-h*this.sinPhi);f=this.radius*(f*this.sinPhi+h*this.cosPhi);h=this.radius2-
(a*a+f*f);h=0<h?Math.sqrt(h):0;g?(c[0][d]=a,c[1][d]=f,c[2][d]=h):(this.tEvenDiameter?(b[0][d]=w(a-0.5),b[1][d]=w(f-0.5)):(b[0][d]=w(a),b[1][d]=w(f)),b[2][d]=w(h+0.5));b[3][d]=this.shader.getShadeFp8(a,f,h)},"~N,~N,~B,~A,~A");c(b,"allocRaster",function(a,d,g){if(this.rasterCount>=d[0].length)for(;this.rasterCount>=d[0].length;){for(var b=4;0<=--b;)d[b]=JU.AU.doubleLengthI(d[b]);g[3]=JU.AU.doubleLengthF(g[3])}if(a)for(;this.rasterCount>=g[0].length;)for(b=3;0<=--b;)g[b]=JU.AU.doubleLengthF(g[b]);return this.rasterCount++},
"~B,~A,~A");c(b,"interpolate",function(a,d,g,b){var c=g[0],f=g[1],c=c[d]-c[a];0>c&&(c=-c);f=f[d]-f[a];0>f&&(f=-f);if(!(1>=c+f)){for(var h=this.allocRaster(!1,g,b),c=g[0],f=g[1],k=g[3],m=b[3][a],E=b[3][d],j=4;0<=--j;){var q=(m+E)/2;this.calcRotatedPoint(q,h,!1,g,b);if(c[h]==c[a]&&f[h]==f[a])k[a]=k[a]+k[h]>>>1,m=q;else if(c[h]==c[d]&&f[h]==f[d])k[d]=k[d]+k[h]>>>1,E=q;else{this.interpolate(a,h,g,b);this.interpolate(h,d,g,b);return}}c[h]=c[a];f[h]=f[d]}},"~N,~N,~A,~A");c(b,"interpolatePrecisely",function(a,
d,g,b){var c=b[0],f=b[1],h=w(Math.floor(c[d]))-w(Math.floor(c[a]));0>h&&(h=-h);f=w(Math.floor(f[d]))-w(Math.floor(f[a]));0>f&&(f=-f);if(!(1>=h+f)){for(var f=b[3],h=f[a],k=f[d],m=this.allocRaster(!0,g,b),c=b[0],f=b[1],E=g[3],j=4;0<=--j;){var q=(h+k)/2;this.calcRotatedPoint(q,m,!0,g,b);if(w(Math.floor(c[m]))==w(Math.floor(c[a]))&&w(Math.floor(f[m]))==w(Math.floor(f[a])))E[a]=E[a]+E[m]>>>1,h=q;else if(w(Math.floor(c[m]))==w(Math.floor(c[d]))&&w(Math.floor(f[m]))==w(Math.floor(f[d])))E[d]=E[d]+E[m]>>>
1,k=q;else{this.interpolatePrecisely(a,m,g,b);this.interpolatePrecisely(m,d,g,b);return}}c[m]=c[a];f[m]=f[d]}},"~N,~N,~A,~A");c(b,"renderFlatEndcap",function(a,d,g){var b,c;if(d){if(0==this.dzBf||0==this.colixEndcap||!this.g3d.setC(this.colixEndcap))return;d=this.xAf;b=this.yAf;c=this.zAf;a&&0>this.dzBf&&(d+=this.dxBf,b+=this.dyBf,c+=this.dzBf);d=D(d);b=D(b);c=D(c)}else{if(0==this.dzB||0==this.colixEndcap||!this.g3d.setC(this.colixEndcap))return;d=this.xAend;b=this.yAend;c=this.zAend;a&&0>this.dzB&&
(d+=this.dxB,b+=this.dyB,c+=this.dzB)}var f=g[1][0];a=g[1][0];var h=0,k=0,m=g[0],E=g[1];g=g[2];for(var j=this.rasterCount;0<--j;){var q=E[j];q<f?f=q:q>a?a=q:(q=-q,q<f?f=q:q>a&&(a=q))}for(q=f;q<=a;++q){for(var f=2147483647,r=-2147483648,j=this.rasterCount;0<=--j;){if(E[j]==q){var u=m[j];u<f&&(f=u,h=g[j]);u>r&&(r=u,k=g[j])}E[j]==-q&&(u=-m[j],u<f&&(f=u,h=-g[j]),u>r&&(r=u,k=-g[j]))}j=r-f+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(j,d+f,b+q,c-h-1,c-k-1,null,null)}},
"~B,~B,~A");c(b,"renderSphericalEndcaps",function(){0!=this.colixA&&this.g3d.setC(this.colixA)&&this.g3d.fillSphereXYZ(this.diameter,this.xA,this.yA,this.zA+1);0!=this.colixB&&this.g3d.setC(this.colixB)&&this.g3d.fillSphereXYZ(this.diameter,this.xA+this.dxB,this.yA+this.dyB,this.zA+this.dzB+1)});c(b,"calcArgbEndcap",function(a,d){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;this.endCapHidden=!1;var g=d?this.dzBf:this.dzB;if(!(3==this.endcaps||
0==g)){this.xEndcap=this.xAend=this.xA;this.yEndcap=this.yAend=this.yA;this.zEndcap=this.zAend=this.zA;var b=d?this.dxBf:this.dxB,c=d?this.dyBf:this.dyB;0<=g||!a?(this.endcapShadeIndex=this.shader.getShadeIndex(-b,-c,g),0==this.colixA?(this.xAend+=w(this.dxB/2),this.yAend+=w(this.dyB/2),this.zAend+=w(this.dzB/2),this.colixEndcap=this.colixB):this.colixEndcap=this.colixA):(this.endcapShadeIndex=this.shader.getShadeIndex(b,c,-g),0==this.colixB?(this.colixEndcap=this.colixA,this.xAend-=w(this.dxB/2),
this.yAend-=w(this.dyB/2),this.zAend-=w(this.dzB/2)):(this.colixEndcap=this.colixB,this.xEndcap+=this.dxB,this.yEndcap+=this.dyB,this.zEndcap+=this.dzB));g=this.colixEndcap==this.colixA?this.shadesA:this.shadesB;56<this.endcapShadeIndex&&(this.endcapShadeIndex=56);this.argbEndcap=g[this.endcapShadeIndex];this.endCapHidden=1==this.endcaps}},"~B,~B")});s("J.g3d");O(J.g3d,"G3DRenderer");s("J.g3d");B(["J.api.JmolRendererInterface","JU.GData","JU.P3i","$.V3"],"J.g3d.Graphics3D","java.util.Arrays JU.AU J.api.Interface J.c.STER J.g3d.CylinderRenderer $.LineRenderer $.Pixelator $.PixelatorScreened $.PixelatorShaded $.PixelatorT $.Platform3D $.SphereRenderer $.TextRenderer $.TextString JU.C $.Normix".split(" "),
function(){var b=n(function(){this.hermite3d=this.circle3d=this.triangle3d=this.cylinder3d=this.sphere3d=this.line3d=this.platform=null;this.antialias2=this.isFullSceneAntialiasingEnabled=!1;this.strings=null;this.stringCount=0;this.anaglyphChannelBytes=null;this.$haveTranslucentObjects=this.twoPass=!1;this.zbufT=this.zbuf=this.pbufT=this.pbuf=null;this.translucencyMask=0;this.renderLow=!1;this.shadesCurrent=null;this.anaglyphLength=0;this.pixelShaded=this.pixelScreened=this.pixelT0=this.pixel0=this.pixel=
null;this.zMargin=0;this.aobuf=null;this.translucencyLog=this.lastRawColor=this.currentShadeIndex=0;this.wasScreened=!1;this.saveDiffuse=this.saveAmbient=0;this.shadeIndexes2Sided=this.shadeIndexes=this.vectorNormal=this.vectorAC=this.vectorAB=this.sC=this.sB=this.sA=null;this.pass2Flag01=0;v(this,arguments)},J.g3d,"Graphics3D",JU.GData,J.api.JmolRendererInterface);P(b,function(){this.sA=new JU.P3i;this.sB=new JU.P3i;this.sC=new JU.P3i;this.vectorAB=new JU.V3;this.vectorAC=new JU.V3;this.vectorNormal=
new JU.V3;this.shadeIndexes=Q(JU.GData.normixCount,0);this.shadeIndexes2Sided=Q(JU.GData.normixCount,0)});A(b,function(){M(this,J.g3d.Graphics3D,[]);for(var a=JU.GData.normixCount;0<=--a;)this.transformedVectors[a]=new JU.V3});j(b,"isWebGL",function(){return!1});j(b,"clear",function(){this.stringCount=0;this.strings=null;J.g3d.TextRenderer.clearFontCache()});j(b,"destroy",function(){this.releaseBuffers();this.graphicsForMetrics=this.pixelScreened=this.pixelT0=this.pixel=this.pixel0=this.pixelShaded=
this.platform=null});c(b,"setZMargin",function(a){this.zMargin=a},"~N");j(b,"initialize",function(a,d){this.vwr=a;this.apiPlatform=d;this.platform=new J.g3d.Platform3D(d);this.pixel=this.pixel0=new J.g3d.Pixelator(this);this.graphicsForMetrics=this.platform.getGraphicsForMetrics();this.line3d=new J.g3d.LineRenderer(this);this.sphere3d=new J.g3d.SphereRenderer(this);this.cylinder3d=new J.g3d.CylinderRenderer(this)},"JV.Viewer,J.api.GenericPlatform");j(b,"addRenderer",function(a){switch(a){case 1073741880:null==
this.circle3d&&(this.circle3d=this.getRenderer("Circle"));break;case 553648143:null==this.hermite3d&&(this.hermite3d=this.getRenderer("Hermite"));case 1073742182:null==this.triangle3d&&(this.triangle3d=this.getRenderer("Triangle"),this.triangle3d.isOrthographic=!this.vwr.tm.perspectiveDepth)}},"~N");c(b,"getRenderer",function(a){a=J.api.Interface.getOption("g3d."+a+"Renderer",this.vwr,"render");if(null==a)throw new NullPointerException("Interface");a.set(this,this);return a},"~S");j(b,"setWindowParameters",
function(a,d,g){this.setWinParams(a,d,g);this.currentlyRendering&&this.endRendering()},"~N,~N,~B");j(b,"checkTranslucent",function(a){a&&(this.$haveTranslucentObjects=!0);return!this.twoPass||this.twoPass&&this.isPass2==a},"~B");j(b,"beginRendering",function(a,d,g,b){this.currentlyRendering&&this.endRendering();this.renderLow=b;if(this.windowWidth!=this.newWindowWidth||this.windowHeight!=this.newWindowHeight||this.newAntialiasing!=this.isFullSceneAntialiasingEnabled)this.windowWidth=this.newWindowWidth,
this.windowHeight=this.newWindowHeight,this.isFullSceneAntialiasingEnabled=this.newAntialiasing,this.releaseBuffers();this.setRotationMatrix(a);this.line3d.isOrthographic=!this.vwr.tm.perspectiveDepth;null!=this.triangle3d&&(this.triangle3d.isOrthographic=!this.vwr.tm.perspectiveDepth);this.antialiasEnabled=this.antialiasThisFrame=this.newAntialiasing;this.currentlyRendering=!0;if(null!=this.strings)for(a=Math.min(this.strings.length,this.stringCount);0<=--a;)this.strings[a]=null;this.stringCount=
0;this.twoPass=!0;this.isPass2=!1;this.colixCurrent=this.pass2Flag01=0;this.$haveTranslucentObjects=this.wasScreened=!1;this.pixel=this.pixel0;this.pixel.bgcolor=this.bgcolor;this.contrastColix=JU.C.getBgContrast(this.bgcolor);this.translucentCoverOnly=!d;null==this.pbuf&&(this.platform.allocateBuffers(this.windowWidth,this.windowHeight,this.antialiasThisFrame,g),this.pbuf=this.platform.pBuffer,this.zbuf=this.platform.zBuffer,this.aobuf=null,this.pixel0.setBuf(),null!=this.pixelT0&&this.pixelT0.setBuf(),
null!=this.pixelShaded&&this.pixelShaded.setBuf());this.setWidthHeight(this.antialiasThisFrame);null!=this.pixelScreened&&(this.pixelScreened.width=this.width);this.platform.clearBuffer();null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,null,0,0,0);this.textY=0},"JU.M3,~B,~B,~B");j(b,"setBackgroundTransparent",function(a){null!=this.platform&&this.platform.setBackgroundTransparent(a)},"~B");c(b,"releaseBuffers",function(){this.aobuf=this.zbufT=this.pbufT=this.zbuf=
this.pbuf=null;this.platform.releaseBuffers();this.line3d.clearLineCache()});j(b,"setPass2",function(a){if(!this.$haveTranslucentObjects||!this.currentlyRendering)return!1;this.isPass2=!0;this.pass2Flag01=1;this.colixCurrent=0;if(null==this.pbufT||this.antialias2!=a)this.platform.allocateTBuffers(a),this.pbufT=this.platform.pBufferT,this.zbufT=this.platform.zBufferT;this.antialias2=a;this.antialiasThisFrame&&!this.antialias2&&this.downsampleFullSceneAntialiasing(!0);this.platform.clearTBuffer();null==
this.pixelT0&&(this.pixelT0=new J.g3d.PixelatorT(this));null==this.pixel.p0?this.pixel=this.pixelT0:this.pixel.p0=this.pixelT0;return!0},"~B");j(b,"endRendering",function(){if(this.currentlyRendering){if(null!=this.pbuf){if(this.isPass2&&null!=this.pbufT)for(var a=this.pbufT.length;0<=--a;)this.pbuf[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pbuf[a],this.pbufT[a],this.bgcolor);this.pixel===this.pixelShaded&&0==this.pixelShaded.zShadePower&&this.pixelShaded.showZBuffer();this.antialiasThisFrame&&this.downsampleFullSceneAntialiasing(!1)}this.platform.setBackgroundColor(this.bgcolor);
this.platform.notifyEndOfRendering();this.currentlyRendering=this.isPass2=!1}});b.mergeBufferPixel=c(b,"mergeBufferPixel",function(a,d,g){if(0==d||a==d)return a;0==a&&(a=g);g=a&16711935;a&=65280;var b=d&16711935,c=d&65280;switch(d>>24&15){case 0:g=b;a=c;break;case 1:g=(b<<2)+(b<<1)+b+g>>3&16711935;a=(c<<2)+ +(c<<1)+c+a>>3&65280;break;case 2:g=(b<<1)+b+g>>2&16711935;a=(c<<1)+c+a>>2&65280;break;case 3:g=(b<<2)+b+(g<<1)+g>>3&16711935;a=(c<<2)+c+(a<<1)+a>>3&65280;break;case 4:g=g+b>>1&16711935;a=a+c>>
1&65280;break;case 5:g=(b<<1)+b+(g<<2)+g>>3&16711935;a=(c<<1)+c+(a<<2)+a>>3&65280;break;case 6:g=(g<<1)+g+b>>2&16711935;a=(a<<1)+a+c>>2&65280;break;case 7:g=(g<<2)+(g<<1)+g+b>>3&16711935,a=(a<<2)+(a<<1)+a+c>>3&65280}return 4278190080|g|a},"~N,~N,~N");j(b,"getScreenImage",function(a){var d=this.platform.bufferedImage;a&&this.releaseBuffers();return d},"~B");j(b,"applyAnaglygh",function(a,d){switch(a){case J.c.STER.REDCYAN:for(var g=this.anaglyphLength;0<=--g;){var b=this.anaglyphChannelBytes[g]&255;
this.pbuf[g]=this.pbuf[g]&4294901760|b<<8|b}break;case J.c.STER.CUSTOM:for(var b=d[0],c=d[1]&16777215,g=this.anaglyphLength;0<=--g;){var f=this.anaglyphChannelBytes[g]&255,f=(f|(f|f<<8)<<8)&c;this.pbuf[g]=this.pbuf[g]&b|f}break;case J.c.STER.REDBLUE:for(g=this.anaglyphLength;0<=--g;)b=this.anaglyphChannelBytes[g]&255,this.pbuf[g]=this.pbuf[g]&4294901760|b;break;case J.c.STER.REDGREEN:for(g=this.anaglyphLength;0<=--g;)this.pbuf[g]=this.pbuf[g]&4294901760|(this.anaglyphChannelBytes[g]&255)<<8}},"J.c.STER,~A");
j(b,"snapshotAnaglyphChannelBytes",function(){if(this.currentlyRendering)throw new NullPointerException;this.anaglyphLength=this.windowWidth*this.windowHeight;if(null==this.anaglyphChannelBytes||this.anaglyphChannelBytes.length!=this.anaglyphLength)this.anaglyphChannelBytes=Q(this.anaglyphLength,0);for(var a=this.anaglyphLength;0<=--a;)this.anaglyphChannelBytes[a]=this.pbuf[a]});j(b,"releaseScreenImage",function(){this.platform.clearScreenBufferThreaded()});j(b,"haveTranslucentObjects",function(){return this.$haveTranslucentObjects});
j(b,"setSlabAndZShade",function(a,d,g,b,c){this.setSlab(a);this.setDepth(d);g<b?(null==this.pixelShaded&&(this.pixelShaded=new J.g3d.PixelatorShaded(this)),this.pixel=this.pixelShaded.set(g,b,c)):this.pixel=this.pixel0},"~N,~N,~N,~N,~N");c(b,"downsampleFullSceneAntialiasing",function(a){var d=this.bgcolor;a&&(d+=255==(d&255)?-1:1);J.g3d.Graphics3D.downsample2d(this.pbuf,this.windowWidth,this.windowHeight,d);a&&(J.g3d.Graphics3D.downsample2dZ(this.pbuf,this.zbuf,this.windowWidth,this.windowHeight,
d),this.antialiasThisFrame=!1,this.setWidthHeight(!1))},"~B");b.downsample2d=c(b,"downsample2d",function(a,d,g,b){var c=d<<1;if(0!=b){b&=16777215;for(var f=a.length;0<=--f;)0==a[f]&&(a[f]=b)}for(var h=(b>>2&1061109567)<<2,h=h+((h&3233857728)>>6),k=0,m=0,f=g;0<=--f;m+=c)for(g=d;0<=--g;++k){var j=(a[m]>>2&1061109567)+(a[m++ +c]>>2&1061109567)+(a[m]>>2&1061109567)+(a[m++ +c]>>2&1061109567),j=j+((j&3233857728)>>6);j==h&&(j=b);a[k]=j&16777215|4278190080}},"~A,~N,~N,~N");b.downsample2dZ=c(b,"downsample2dZ",
function(a,d,g,b,c){for(var f=g<<1,h=0,k=0;0<=--b;k+=f)for(var m=g;0<=--m;++h,++k){var j=Math.min(d[k],d[k+f]),j=Math.min(j,d[++k]),j=Math.min(j,d[k+f]);2147483647!=j&&(j>>=1);d[h]=a[h]==c?2147483647:j}},"~A,~A,~N,~N,~N");c(b,"hasContent",function(){return this.platform.hasContent()});j(b,"setC",function(a){var d=JU.C.isColixLastAvailable(a);if(!d&&a==this.colixCurrent&&-1==this.currentShadeIndex)return!0;var g=a&30720;if(16384==g)return!1;this.renderLow&&(g=0);var b=0!=g,c=b&&30720==g;this.setScreened(c);
if(!this.checkTranslucent(b&&!c))return!1;this.isPass2?(this.translucencyMask=g<<13|16777215,this.translucencyLog=g>>11):this.translucencyLog=0;this.colixCurrent=a;d&&this.argbCurrent!=this.lastRawColor&&(0==this.argbCurrent&&(this.argbCurrent=4294967295),this.lastRawColor=this.argbCurrent,this.shader.setLastColix(this.argbCurrent,this.inGreyscaleMode));this.shadesCurrent=this.getShades(a);this.currentShadeIndex=-1;this.setColor(this.getColorArgbOrGray(a));return!0},"~N");c(b,"setScreened",function(a){this.wasScreened!=
a&&((this.wasScreened=a)?(null==this.pixelScreened&&(this.pixelScreened=new J.g3d.PixelatorScreened(this,this.pixel0)),null==this.pixel.p0?this.pixel=this.pixelScreened:this.pixel.p0=this.pixelScreened):null==this.pixel.p0||this.pixel===this.pixelScreened?this.pixel=this.isPass2?this.pixelT0:this.pixel0:this.pixel.p0=this.isPass2?this.pixelT0:this.pixel0);return this.pixel},"~B");j(b,"drawFilledCircle",function(a,d,g,b,c,f){if(!this.isClippedZ(f)){var h=w((g+1)/2),h=b<h||b+h>=this.width||c<h||c+h>=
this.height;if(!h||!this.isClippedXY(g,b,c))0!=a&&this.setC(a)&&(h?this.isClippedXY(g,b,c)||this.circle3d.plotCircleCenteredClipped(b,c,f,g):this.circle3d.plotCircleCenteredUnclipped(b,c,f,g)),0!=d&&this.setC(d)&&(h?this.circle3d.plotFilledCircleCenteredClipped(b,c,f,g):this.circle3d.plotFilledCircleCenteredUnclipped(b,c,f,g))}},"~N,~N,~N,~N,~N,~N");j(b,"volumeRender4",function(a,d,g,b){if(1==a)this.plotPixelClippedArgb(this.argbCurrent,d,g,b,this.width,this.zbuf,this.pixel);else if(!this.isClippedZ(b)){var c=
w((a+1)/2),c=d<c||d+c>=this.width||g<c||g+c>=this.height;if(!c||!this.isClippedXY(a,d,g))c?this.circle3d.plotFilledCircleCenteredClipped(d,g,b,a):this.circle3d.plotFilledCircleCenteredUnclipped(d,g,b,a)}},"~N,~N,~N,~N");j(b,"fillSphereXYZ",function(a,d,g,b){switch(a){case 1:this.plotPixelClippedArgb(this.argbCurrent,d,g,b,this.width,this.zbuf,this.pixel);return;case 0:return}a<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,a,d,g,b,null,null,null,-1,null)},"~N,~N,~N,~N");
j(b,"volumeRender",function(a){a?(this.saveAmbient=this.getAmbientPercent(),this.saveDiffuse=this.getDiffusePercent(),this.setAmbientPercent(100),this.setDiffusePercent(0),this.addRenderer(1073741880)):(this.setAmbientPercent(this.saveAmbient),this.setDiffusePercent(this.saveDiffuse))},"~B");j(b,"fillSphereI",function(a,d){this.fillSphereXYZ(a,d.x,d.y,d.z)},"~N,JU.P3i");j(b,"fillSphereBits",function(a,d){this.fillSphereXYZ(a,Math.round(d.x),Math.round(d.y),Math.round(d.z))},"~N,JU.P3");j(b,"fillEllipsoid",
function(a,d,g,b,c,f,h,k,m,j,p){switch(f){case 1:this.plotPixelClippedArgb(this.argbCurrent,g,b,c,this.width,this.zbuf,this.pixel);return;case 0:return}f<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,f,g,b,c,h,k,m,j,p)},"JU.P3,~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");j(b,"drawRect",function(a,d,g,b,c,f){if(!(0!=b&&this.isClippedZ(b))){b=c-1;f-=1;c=a+b;var h=d+f;0<=d&&d<this.height&&this.drawHLine(a,d,g,b);0<=h&&h<this.height&&this.drawHLine(a,h,g,b);0<=a&&a<this.width&&
this.drawVLine(a,d,g,f);0<=c&&c<this.width&&this.drawVLine(c,d,g,f)}},"~N,~N,~N,~N,~N,~N");c(b,"drawHLine",function(a,d,g,b){0>b&&(a+=b,b=-b);0>a&&(b+=a,a=0);a+b>=this.width&&(b=this.width-1-a);var c=this.pixel,f=this.argbCurrent;a+=this.width*d;for(d=0;d<=b;d++)g<this.zbuf[a]&&c.addPixel(a,g,f),a++},"~N,~N,~N,~N");c(b,"drawVLine",function(a,d,g,b){0>b&&(d+=b,b=-b);0>d&&(b+=d,d=0);d+b>=this.height&&(b=this.height-1-d);a+=this.width*d;d=this.pixel;for(var c=this.argbCurrent,f=0;f<=b;f++)g<this.zbuf[a]&&
d.addPixel(a,g,c),a+=this.width},"~N,~N,~N,~N");j(b,"fillTextRect",function(a,d,g,b,c,f){if(!this.isClippedZ(b)){b=this.width;if(0>a){c+=a;if(0>=c)return;a=0}if(a+c>b&&(c=b-a,0>=c))return;if(0>d){f+=d;if(0>=f)return;d=0}d+f>this.height&&(f=this.height-d);var h=this.argbCurrent;this.isAntialiased()&&(h=J.g3d.Graphics3D.fixTextImageRGB(h));for(var k=this.zbuf,m=this.pixel;0<=--f;)this.plotPixelsUnclippedCount(h,c,a,d++,g,b,k,m)}},"~N,~N,~N,~N,~N,~N");j(b,"drawString",function(a,d,g,b,c,f,h){this.currentShadeIndex=
0;null!=a&&(this.isClippedZ(f)||this.drawStringNoSlab(a,d,g,b,c,h))},"~S,JU.Font,~N,~N,~N,~N,~N");j(b,"drawStringNoSlab",function(a,d,g,b,c,f){if(null!=a){null==this.strings&&(this.strings=Array(10));this.stringCount==this.strings.length&&(this.strings=JU.AU.doubleLength(this.strings));var h=new J.g3d.TextString;h.setText(a,null==d?this.currentFont:this.currentFont=d,this.argbCurrent,JU.C.isColixTranslucent(f)?this.getColorArgbOrGray(f)&16777215|(f&30720)<<13:0,g,b,c);this.strings[this.stringCount++]=
h}},"~S,JU.Font,~N,~N,~N,~N");j(b,"renderAllStrings",function(a){if(null!=this.strings){2<=this.stringCount&&(null==J.g3d.Graphics3D.sort&&(J.g3d.Graphics3D.sort=new J.g3d.TextString),java.util.Arrays.sort(this.strings,J.g3d.Graphics3D.sort));for(var d=0;d<this.stringCount;d++){var g=this.strings[d];this.plotText(g.x,g.y,g.z,g.argb,g.bgargb,g.text,g.font,a)}this.strings=null;this.stringCount=0}},"~O");j(b,"plotText",function(a,d,g,b,c,f,h,k){J.g3d.TextRenderer.plot(a,d,g,b,c,f,h,this,k,this.antialiasThisFrame)},
"~N,~N,~N,~N,~N,~S,JU.Font,J.api.JmolRendererInterface");j(b,"drawImage",function(a,d,g,b,c,f,h,k){null!=a&&(0<h&&0<k&&!this.isClippedZ(c))&&this.plotImage(d,g,b,a,null,f,h,k)},"~O,~N,~N,~N,~N,~N,~N,~N");j(b,"plotImage",function(a,d,g,b,c,f,h,k){this.setC(f);this.isPass2||(this.translucencyMask=-1);0==f&&(this.argbCurrent=0);var m=-2147483648==a;f=m?this.bgcolor:this.argbCurrent;m&&(a=0,g=2147483646,h=this.width,k=this.height);if(!(0>=a+h||a>=this.width||0>=d+k||d>=this.height))if(b=this.apiPlatform.drawImageToBuffer(null,
this.platform.offscreenImage,b,h,k,m?f:0),null!=b){var m=this.zbuf,j=this.width,p=this.pixel,q=this.height,r=this.translucencyLog;if(null==c&&0<=a&&a+h<=j&&0<=d&&d+k<=q){var u=0,C=0;for(a=d*j+a;u<k;u++,a+=j-h)for(var G=0;G<h;G++,C++,a++)if(g<m[a]){var N=b[C];-16777216==(N&4278190080)&&p.addPixel(a,g,N)}}else{null==c&&(c=this);for(C=u=0;u<k;u++)for(G=0;G<h;G++)N=b[C++],-16777216==(N&4278190080)&&c.plotImagePixel(N,a+G,d+u,g,8,f,j,q,m,p,r)}}},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");j(b,
"setFont",function(a){this.currentFont=a},"JU.Font");j(b,"drawPixel",function(a,d,g){this.plotPixelClippedArgb(this.argbCurrent,a,d,g,this.width,this.zbuf,this.pixel)},"~N,~N,~N");j(b,"drawPoints",function(a,d,g){if(1<g)for(var b=0.8*g*g,c=-g;c<g;c++)for(var f=-g;f<g;f++)c*c+f*f>b||(this.plotPoints(a,d,c,f),this.plotPoints(a,d,c,f));else this.plotPoints(a,d,0,0)},"~N,~A,~N");j(b,"drawDashedLineBits",function(a,d,g,b){this.isAntialiased()&&(a+=a,d+=d);this.setScreeni(g,this.sA);this.setScreeni(b,this.sB);
this.drawLineABBits(a,d,!0)},"~N,~N,JU.P3,JU.P3");c(b,"drawLineABBits",function(a,d,g){this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,a,d,g);Math.abs(this.sA.x-this.sB.x)<Math.abs(this.sA.y-this.sB.y)?(this.sA.x+=1,this.sB.x+=1):(this.sA.y+=1,this.sB.y+=1);this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,a,d,g)},"~N,~N,~B");c(b,"setScreeni",function(a,d){d.x=Math.round(a.x);d.y=Math.round(a.y);d.z=Math.round(a.z)},"JU.P3,JU.P3i");j(b,"drawLineXYZ",
function(a,d,g,b,c,f){this.line3d.plotLineInt(this.argbCurrent,this.argbCurrent,a,d,g,b,c,f)},"~N,~N,~N,~N,~N,~N");j(b,"drawLine",function(a,d,g,b,c,f,h,k){this.setC(a)||(a=0);var m=this.argbCurrent;this.setC(d)||(d=0);(0!=a||0!=d)&&this.line3d.plotLineInt(m,this.argbCurrent,g,b,c,f,h,k)},"~N,~N,~N,~N,~N,~N,~N,~N");j(b,"drawLineBits",function(a,d,g,b){this.setC(a)||(a=0);var c=this.argbCurrent;this.setC(d)||(d=0);if(0!=a||0!=d)this.setScreeni(g,this.sA),this.setScreeni(b,this.sB),this.line3d.plotLineBits(c,
this.argbCurrent,this.sA,this.sB,0,0,!1)},"~N,~N,JU.P3,JU.P3");j(b,"drawLinePixels",function(a,d,g,b){this.sA.setT(a);this.sB.setT(d);this.sA.z=this.sB.z=g;a=this.slab;-2147483648==b&&(this.slab=0);this.drawLineABBits(0,0,!1);this.slab=a},"JU.P3i,JU.P3i,~N,~N");j(b,"drawLineAB",function(a,d){this.setScreeni(a,this.sA);this.setScreeni(d,this.sB);this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,0,0,!1)},"JU.P3,JU.P3");j(b,"fillCylinderXYZ",function(a,d,g,b,c,f,h,k,m,j){if(!(b>
this.ht3)){var p=0;this.currentShadeIndex=0;this.setC(d)||(d=0);this.wasScreened&&(p=2);this.setC(a)||(a=0);this.wasScreened&&(p+=1);0==a&&0==d||this.cylinder3d.renderOld(a,d,p,g,b,c,f,h,k,m,j)}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");j(b,"fillCylinderScreen3I",function(a,d,g,b){d<=this.ht3&&this.cylinder3d.renderOld(this.colixCurrent,this.colixCurrent,0,a,d,D(g.x),D(g.y),D(g.z),D(b.x),D(b.y),D(b.z))},"~N,~N,JU.P3,JU.P3,JU.P3,JU.P3,~N");j(b,"fillCylinder",function(a,d,g,b){d<=this.ht3&&this.cylinder3d.renderOld(this.colixCurrent,
this.colixCurrent,0,a,d,g.x,g.y,g.z,b.x,b.y,b.z)},"~N,~N,JU.P3i,JU.P3i");j(b,"fillCylinderBits",function(a,d,g,b){d<=this.ht3&&(1!=g.z&&1!=b.z)&&(0==d||1==d?(this.setScreeni(g,this.sA),this.setScreeni(b,this.sB),this.line3d.plotLineBits(this.getColorArgbOrGray(this.colixCurrent),this.getColorArgbOrGray(this.colixCurrent),this.sA,this.sB,0,0,!1)):this.cylinder3d.renderBitsFloat(this.colixCurrent,this.colixCurrent,0,a,d,g,b))},"~N,~N,JU.P3,JU.P3");j(b,"fillCylinderBits2",function(a,d,g,b,c,f){if(!(b>
this.ht3)){var h=0;this.currentShadeIndex=0;this.setC(d)||(d=0);this.wasScreened&&(h=2);this.setC(a)||(a=0);this.wasScreened&&(h+=1);0==a&&0==d||(this.setScreeni(c,this.sA),this.setScreeni(f,this.sB),this.cylinder3d.renderBits(a,d,h,g,b,this.sA,this.sB))}},"~N,~N,~N,~N,JU.P3,JU.P3");j(b,"fillConeScreen3f",function(a,d,g,b,c){d<=this.ht3&&this.cylinder3d.renderConeOld(this.colixCurrent,a,d,g.x,g.y,g.z,b.x,b.y,b.z,!0,c)},"~N,~N,JU.P3,JU.P3,~B");j(b,"drawHermite4",function(a,d,g,b,c){this.hermite3d.renderHermiteRope(!1,
a,0,0,0,d,g,b,c)},"~N,JU.P3,JU.P3,JU.P3,JU.P3");j(b,"drawHermite7",function(a,d,g,b,c,f,h,k,m,j,p,q,r){if(0==r)this.hermite3d.renderHermiteRibbon(a,d,g,b,c,f,h,k,m,j,p,q,0);else{this.hermite3d.renderHermiteRibbon(a,d,g,b,c,f,h,k,m,j,p,q,1);var u=this.colixCurrent;this.setC(r);this.hermite3d.renderHermiteRibbon(a,d,g,b,c,f,h,k,m,j,p,q,-1);this.setC(u)}},"~B,~B,~N,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,~N,~N");j(b,"fillHermite",function(a,d,g,b,c,f,h,k){this.hermite3d.renderHermiteRope(!0,
a,d,g,b,c,f,h,k)},"~N,~N,~N,~N,JU.P3,JU.P3,JU.P3,JU.P3");j(b,"drawTriangle3C",function(a,d,g,b,c,f,h){1==(h&1)&&this.drawLine(d,b,a.x,a.y,a.z,g.x,g.y,g.z);2==(h&2)&&this.drawLine(b,f,g.x,g.y,g.z,c.x,c.y,c.z);4==(h&4)&&this.drawLine(d,f,a.x,a.y,a.z,c.x,c.y,c.z)},"JU.P3i,~N,JU.P3i,~N,JU.P3i,~N,~N");j(b,"fillTriangleTwoSided",function(a,d,g,b){this.setColorNoisy(this.getShadeIndex(a));this.fillTriangleP3f(d,g,b,!1)},"~N,JU.P3,JU.P3,JU.P3");c(b,"fillTriangleP3f",function(a,d,g,b){this.setScreeni(a,this.sA);
this.setScreeni(d,this.sB);this.setScreeni(g,this.sC);this.triangle3d.fillTriangle(this.sA,this.sB,this.sC,b)},"JU.P3,JU.P3,JU.P3,~B");j(b,"fillTriangle3f",function(a,d,g,b){var c=this.getShadeIndexP3(a,d,g,b);0>c||(b?this.setColorNoisy(c):this.setColor(this.shadesCurrent[c]),this.fillTriangleP3f(a,d,g,!1))},"JU.P3,JU.P3,JU.P3,~B");j(b,"fillTriangle3i",function(a,d,g,b,c,f,h){h&&(b=this.vectorAB,b.set(d.x-a.x,d.y-a.y,d.z-a.z),null==g?b=this.shader.getShadeIndex(-b.x,-b.y,b.z):(this.vectorAC.set(g.x-
a.x,g.y-a.y,g.z-a.z),b.cross(b,this.vectorAC),b=0<=b.z?this.shader.getShadeIndex(-b.x,-b.y,b.z):this.shader.getShadeIndex(b.x,b.y,-b.z)),56<b&&(b=56),this.setColorNoisy(b));this.fillTriangleP3f(a,d,g,!1)},"JU.P3,JU.P3,JU.P3,JU.T3,JU.T3,JU.T3,~B");j(b,"fillTriangle3CN",function(a,d,g,b,c,f,h,k,m){this.triangle3d.fillTriangle(a,b,h,this.checkGouraud(d,c,k,g,f,m))},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N");j(b,"fillTriangle3CNBits",function(a,d,g,b,c,f,h,k,m){this.fillTriangleP3f(a,b,h,this.checkGouraud(d,
c,k,g,f,m))},"JU.P3,~N,~N,JU.P3,~N,~N,JU.P3,~N,~N,~B");c(b,"checkGouraud",function(a,d,g,b,c,f){if(!this.isPass2&&b==c&&b==f&&a==d&&a==g){d=this.getShadeIndex(b);if(a!=this.colixCurrent||this.currentShadeIndex!=d)this.currentShadeIndex=-1,this.setC(a),this.setColorNoisy(d);return!1}this.setTriangleTranslucency(a,d,g);this.triangle3d.setGouraud(this.getShades(a)[this.getShadeIndex(b)],this.getShades(d)[this.getShadeIndex(c)],this.getShades(g)[this.getShadeIndex(f)]);return!0},"~N,~N,~N,~N,~N,~N");
c(b,"getShadeIndex",function(a){return-1E4==a||9999==a?J.g3d.Graphics3D.nullShadeIndex:0>a?this.shadeIndexes2Sided[~a]:this.shadeIndexes[a]},"~N");c(b,"setTriangleTranslucency",function(a,d,g){this.isPass2&&(a&=14336,d&=14336,g&=14336,this.translucencyMask=(JU.GData.roundInt(w((a+d+g)/3))&30720)<<13|16777215)},"~N,~N,~N");j(b,"fillQuadrilateral",function(a,d,g,b,c){c=this.getShadeIndexP3(a,d,g,c);0>c||(this.setColorNoisy(c),this.fillTriangleP3f(a,d,g,!1),this.fillTriangleP3f(a,g,b,!1))},"JU.P3,JU.P3,JU.P3,JU.P3,~B");
j(b,"drawSurface",function(){},"JU.MeshSurface,~N");j(b,"plotPixelClippedP3i",function(a){this.plotPixelClippedArgb(this.argbCurrent,a.x,a.y,a.z,this.width,this.zbuf,this.pixel)},"JU.P3i");c(b,"plotPixelClippedArgb",function(a,d,g,b,c,f,h){this.isClipped3(d,g,b)||(d=g*c+d,b<f[d]&&h.addPixel(d,b,a))},"~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotPixelUnclipped",function(a,d,g,b,c,f,h){d=g*c+d;b<f[d]&&h.addPixel(d,b,a)},"~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotImagePixel",function(a,d,g,b,c,f,
h,k,m,j,p){0>d||(d>=h||0>g||g>=k)||j.addImagePixel(c,p,g*h+d,b,a,f)},"~N,~N,~N,~N,~N,~N,~N,~N,~A,~O,~N");c(b,"plotPixelsClippedRaster",function(a,d,g,b,c,f,h){var k,m;if(!(0>=a||0>g||g>=this.height||d>=this.width||b<(m=this.slab)&&c<m||b>(k=this.depth)&&c>k)){var j=this.zbuf,p=(d<<16)+(g<<1)^858993459,q=(b<<10)+512;b=c-b;c=w(a/2);b=JU.GData.roundInt(w(((b<<10)+(0<=b?c:-c))/a));if(0>d){d=-d;q+=b*d;a-=d;if(0>=a)return;d=0}a+d>this.width&&(a=this.width-d);d=g*this.width+d;g=this.pixel;if(null==f){f=
this.argbNoisyDn;c=this.argbNoisyUp;for(var r=this.argbCurrent;0<=--a;){h=q>>10;if(h>=m&&h<=k&&h<j[d]){var p=(p<<16)+(p<<1)+p&2147483647,u=p>>16&7;g.addPixel(d,h,0==u?f:1==u?c:r)}++d;q+=b}}else{p=f.r<<8;c=w((h.r-f.r<<8)/a);r=f.g;u=w((h.g-r)/a);f=f.b;for(var C=w((h.b-f)/a);0<=--a;)h=q>>10,h>=m&&(h<=k&&h<j[d])&&g.addPixel(d,h,4278190080|p&16711680|r&65280|f>>8&255),++d,q+=b,p+=c,r+=u,f+=C}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");c(b,"plotPixelsUnclippedRaster",function(a,d,g,b,c,f,h){if(!(0>=a)){var k=
((d<<16)+(g<<1)^858993459)&2147483647,m=(b<<10)+512;b=c-b;c=w(a/2);b=JU.GData.roundInt(w(((b<<10)+(0<=b?c:-c))/a));d=g*this.width+d;g=this.zbuf;c=this.pixel;if(null==f){f=this.argbNoisyDn;for(var j=this.argbNoisyUp,p=this.argbCurrent;0<=--a;){h=m>>10;if(h<g[d]){var k=(k<<16)+(k<<1)+k&2147483647,q=k>>16&7;c.addPixel(d,h,0==q?f:1==q?j:p)}++d;m+=b}}else{k=f.r<<8;j=JU.GData.roundInt(w((h.r-f.r<<8)/a));p=f.g;q=JU.GData.roundInt(w((h.g-p)/a));f=f.b;for(var r=JU.GData.roundInt(w((h.b-f)/a));0<=--a;)h=m>>
10,h<g[d]&&c.addPixel(d,h,4278190080|k&16711680|p&65280|f>>8&255),++d,m+=b,k+=j,p+=q,f+=r}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");c(b,"plotPixelsClippedRasterBits",function(a,d,g,b,c,f,h,k,m){var j,p;if(!(0>=a||0>g||g>=this.height||d>=this.width||b<(p=this.slab)&&c<p||b>(j=this.depth)&&c>j)){b=this.zbuf;var q=(d<<16)+(g<<1)^858993459;if(0>d){a-=-d;if(0>=a)return;d=0}a+d>this.width&&(a=this.width-d);g=g*this.width+d;c=this.pixel;if(null==f){f=this.argbNoisyDn;for(var r=this.argbNoisyUp,u=this.argbCurrent;0<=
--a;){h=this.line3d.getZCurrent(k,m,d++);if(h>=p&&h<=j&&h<b[g]){var q=(q<<16)+(q<<1)+q&2147483647,C=q>>16&7;c.addPixel(g,h,2>C?f:6>C?r:u)}++g}}else{q=f.r<<8;r=w((h.r-f.r<<8)/a);u=f.g;C=w((h.g-u)/a);f=f.b;for(var G=w((h.b-f)/a);0<=--a;)h=this.line3d.getZCurrent(k,m,d++),h>=p&&(h<=j&&h<b[g])&&c.addPixel(g,h,4278190080|q&16711680|u&65280|f>>8&255),++g,q+=r,u+=C,f+=G}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16,~N,~N");c(b,"plotPixelsUnclippedRasterBits",function(a,d,g,b,c,f,h){if(!(0>=a)){var k=((d<<16)+(g<<
1)^858993459)&2147483647;g=g*this.width+d;var m=this.zbuf,j=this.pixel;if(null==b)for(var p=this.argbNoisyDn,q=this.argbNoisyUp,r=this.argbCurrent;0<=--a;)c=this.line3d.getZCurrent(f,h,d++),c<m[g]&&(k=(k<<16)+(k<<1)+k&2147483647,b=k>>16&7,j.addPixel(g,c,0==b?p:1==b?q:r)),++g;else{k=b.r<<8;p=JU.GData.roundInt(w((c.r-b.r<<8)/a));q=b.g;r=JU.GData.roundInt(w((c.g-q)/a));b=b.b;for(var u=JU.GData.roundInt(w((c.b-b)/a));0<=--a;)c=this.line3d.getZCurrent(f,h,d++),c<m[g]&&j.addPixel(g,c,4278190080|k&16711680|
q&65280|b>>8&255),++g,k+=p,q+=r,b+=u}}},"~N,~N,~N,JU.Rgb16,JU.Rgb16,~N,~N");c(b,"plotPixelsUnclippedCount",function(a,d,g,b,c,f,h,k){for(g=b*f+g;0<=--d;)c<h[g]&&k.addPixel(g,c,a),++g},"~N,~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotPoints",function(a,d,g,b){var c=this.pixel,f=this.argbCurrent,h=this.zbuf,k=this.width,m=this.antialiasThisFrame;for(a*=3;0<a;){var j=d[--a],p=d[--a]+b,q=d[--a]+g;if(!this.isClipped3(q,p,j)){var r=p*k+q++;j<h[r]&&c.addPixel(r,j,f);m&&(r=p*k+q,!this.isClipped3(q,p,j)&&
j<h[r]&&c.addPixel(r,j,f),r=++p*k+q,!this.isClipped3(q,p,j)&&j<h[r]&&c.addPixel(r,j,f),r=p*k+--q,!this.isClipped3(q,p,j)&&j<h[r]&&c.addPixel(r,j,f))}}},"~N,~A,~N,~N");c(b,"setColorNoisy",function(a){this.currentShadeIndex=a;this.argbCurrent=this.shadesCurrent[a];this.argbNoisyUp=this.shadesCurrent[63>a?a+1:63];this.argbNoisyDn=this.shadesCurrent[0<a?a-1:0]},"~N");c(b,"getShadeIndexP3",function(a,d,g,b){this.vectorAB.sub2(d,a);this.vectorAC.sub2(g,a);a=this.vectorNormal;a.cross(this.vectorAB,this.vectorAC);
return 0>a.z?this.shader.getShadeIndex(a.x,a.y,-a.z):b?-1:this.shader.getShadeIndex(-a.x,-a.y,a.z)},"JU.P3,JU.P3,JU.P3,~B");j(b,"renderBackground",function(a){null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,a,0,0,0)},"J.api.JmolRendererInterface");j(b,"drawAtom",function(a){this.fillSphereXYZ(a.sD,a.sX,a.sY,a.sZ)},"JM.Atom,~N");j(b,"getExportType",function(){return 0});j(b,"getExportName",function(){return null});c(b,"canDoTriangles",function(){return!0});
c(b,"isCartesianExport",function(){return!1});j(b,"initializeExporter",function(){return null},"JV.Viewer,~N,JU.GData,java.util.Map");j(b,"finalizeOutput",function(){return null});j(b,"drawBond",function(){},"JU.P3,JU.P3,~N,~N,~N,~N,~N");j(b,"drawEllipse",function(){return!1},"JU.P3,JU.P3,JU.P3,~B,~B");c(b,"getPrivateKey",function(){return 0});j(b,"clearFontCache",function(){J.g3d.TextRenderer.clearFontCache()});c(b,"setRotationMatrix",function(a){for(var d=JU.Normix.getVertexVectors(),g=JU.GData.normixCount;0<=
--g;){var b=this.transformedVectors[g];a.rotate2(d[g],b);this.shadeIndexes[g]=this.shader.getShadeB(b.x,-b.y,b.z);this.shadeIndexes2Sided[g]=0<=b.z?this.shadeIndexes[g]:this.shader.getShadeB(-b.x,b.y,-b.z)}},"JU.M3");j(b,"renderCrossHairs",function(a,d,g,b,c){d=this.isAntialiased();this.setC(0>c?10:100<c?11:23);c=Math.max(Math.min(this.width,Math.round(b.x)),0);g=Math.max(Math.min(this.height,Math.round(b.y)),0);var f=Math.round(b.z)+1,h=d?8:4,k=d?20:10;d=d?2:1;this.drawRect(c-h,g,f,0,k,d);this.drawRect(c,
g-h,f,0,d,k);this.drawRect(c-h,g-h,f,0,k,k);h=k;k>>=1;this.setC(a[1]<b.x?21:11);this.drawRect(c-h,g,f,0,k,d);this.setC(a[0]>b.x?21:11);this.drawRect(c+k,g,f,0,k,d);this.setC(a[3]<b.y?21:11);this.drawRect(c,g-h,f,0,d,k);this.setC(a[2]>b.y?21:11);this.drawRect(c,g+k,f,0,d,k)},"~A,~N,~N,JU.P3,~N");j(b,"initializeOutput",function(){return!1},"JV.Viewer,~N,java.util.Map");b.fixTextImageRGB=c(b,"fixTextImageRGB",function(a){return 0==(a&12632256)?a|263172:a},"~N");b.sort=null;b.nullShadeIndex=50});s("J.g3d");
B(["J.g3d.PrecisionRenderer","java.util.Hashtable","JU.BS"],"J.g3d.LineRenderer",null,function(){var b=n(function(){this.lineBits=this.shader=this.g3d=null;this.lineTypeX=!1;this.nBits=0;this.lineCache=null;this.z2t=this.y2t=this.x2t=this.z1t=this.y1t=this.x1t=0;v(this,arguments)},J.g3d,"LineRenderer",J.g3d.PrecisionRenderer);P(b,function(){this.lineBits=new JU.BS;this.lineCache=new java.util.Hashtable});A(b,function(a){M(this,J.g3d.LineRenderer,[]);this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");
c(b,"setLineBits",function(a,d){var g=Math.abs(a),b=Math.abs(d),c;if(1>g&&0>b)this.lineBits=J.g3d.LineRenderer.lbNone;else{0==g?c=0<=d?3.4028235E38:-3.4028235E38:(c=d/a,1E5<c?c=3.4028235E38:-1E5>c&&(c=-3.4028235E38));this.nBits=(this.lineTypeX=1>=c&&-1<=c)?this.g3d.width:this.g3d.height;c=Integer.$valueOf(Math.round(1E4*c));var f=this.lineCache.get(c);if(null==f){1E4<this.lineCache.size()&&this.lineCache.clear();f=JU.BS.newN(this.nBits);if(b>g)var h=g,g=b,b=h;for(var h=0,k=g+g,b=b+b,m=0;m<this.nBits;m++)h+=
b,h>g&&(f.set(m),h-=k);this.lineCache.put(c,f)}this.lineBits=f}},"~N,~N");c(b,"clearLineCache",function(){this.lineCache.clear()});c(b,"plotLineInt",function(a,d,g,b,c,f,h,k){this.x1t=g;this.x2t=f;this.y1t=b;this.y2t=h;this.z1t=c;this.z2t=k;var m=!0;switch(this.getTrimmedLineImpl()){case 0:m=!1;break;case 2:return}this.plotLineClippedOld(a,d,g,b,c,f-g,h-b,k-c,m,0,0)},"~N,~N,~N,~N,~N,~N,~N,~N");c(b,"plotLineDeltaOld",function(a,d,g,b,c,f,h,k,m){this.x1t=g;this.x2t=g+f;this.y1t=b;this.y2t=b+h;this.z1t=
c;this.z2t=c+k;if(m)switch(this.getTrimmedLineImpl()){case 2:return;case 0:m=!1}this.plotLineClippedOld(a,d,g,b,c,f,h,k,m,0,0)},"~N,~N,~N,~N,~N,~N,~N,~N,~B");c(b,"plotLineDeltaAOld",function(a,d,g,b,c,f,h,k,m,j,p){this.x1t=c;this.x2t=c+k;this.y1t=f;this.y2t=f+m;this.z1t=h;this.z2t=h+j;if(p)switch(this.getTrimmedLineImpl()){case 2:return;case 0:p=!1}var q=this.g3d.zbuf,r=this.g3d.width,u=0,C=f*r+c,G=this.g3d.bufferSize,N=63>b?b+1:b,v=0<b?b-1:b,s=a[N],n=a[v],z=d[b],N=d[N];d=d[v];a=a[b];b=this.g3d.pixel;
0!=g&&(b=this.g3d.setScreened(1==(g&1)),this.g3d.currentShadeIndex=0);0!=a&&(!p&&0<=C&&C<G&&h<q[C])&&b.addPixel(C,h,a);if(!(0==k&&0==m)){p=1;v=r;c+=k;var y=f+m;0>k&&(k=-k,p=-1);0>m&&(m=-m,v=-r);r=k+k;f=m+m;h<<=10;if(m<=k){var x=k-1;0>j&&(x=-x);j=w(((j<<10)+x)/k);m=0;x=Math.abs(c-this.x2t)-1;c=Math.abs(c-this.x1t)-1;for(var y=k-1,A=w(y/2);--y>=x;){if(y==A){a=z;if(0==a)break;s=N;n=d;0!=g%3&&(b=this.g3d.setScreened(2==(g&2)),this.g3d.currentShadeIndex=0)}C+=p;h+=j;m+=f;m>k&&(C+=v,m-=r);if(0!=a&&y<c&&
0<=C&&C<G&&2147483647>u){var B=h>>10;if(B<q[C]){var D=this.shader.nextRandom8Bit();b.addPixel(C,B,85>D?n:170<D?s:a)}}u=(u+1)%1}}else{x=m-1;0>j&&(x=-x);j=w(((j<<10)+x)/m);k=0;x=Math.abs(y-this.y2t)-1;c=Math.abs(y-this.y1t)-1;y=m-1;for(A=w(y/2);--y>=x;){if(y==A){a=z;if(0==a)break;s=N;n=d;0!=g%3&&(b=this.g3d.setScreened(2==(g&2)),this.g3d.currentShadeIndex=0)}C+=v;h+=j;k+=r;k>m&&(C+=p,k-=f);0!=a&&(y<c&&0<=C&&C<G&&2147483647>u)&&(B=h>>10,B<q[C]&&(D=this.g3d.shader.nextRandom8Bit(),b.addPixel(C,B,85>D?
n:170<D?s:a)));u=(u+1)%1}}}},"~A,~A,~N,~N,~N,~N,~N,~N,~N,~N,~B");c(b,"plotLineDeltaABitsFloat",function(a,d,g,b,c,f,h){var k=Math.round(b.x),m=Math.round(b.y),j=Math.round(b.z),p=Math.round(c.x),q=Math.round(c.y),r=Math.round(c.z),u=p-k,C=q-m;this.x1t=k;this.x2t=p;this.y1t=m;this.y2t=q;this.z1t=j;this.z2t=r;if(!(h&&2==this.getTrimmedLineImpl())){h=this.g3d.zbuf;var G=this.g3d.width,p=0,r=63>g?g+1:g,q=0<g?g-1:g,N=a[g],v=a[r],s=a[q];g=d[g];a=d[r];d=d[q];var q=m*G+k,r=this.g3d.bufferSize,n,y,z,x;this.lineTypeX?
(n=k,y=this.x1t,z=this.x2t,k+=w(u/2),x=m=0<=u?1:-1,u=0<=C?G:-G,this.setRastABFloat(b.x,b.z,c.x,c.z)):(n=m,y=this.y1t,z=this.y2t,k=m+w(C/2),m=0<=C?1:-1,x=0<=C?G:-G,u=0<=u?1:-1,this.setRastABFloat(b.y,b.z,c.y,c.z));b=j;c=N;j=v;C=s;v=!1;s=this.g3d.pixel;0!=f&&(s=this.g3d.setScreened(1==(f&1)),this.g3d.currentShadeIndex=0);for(N=n;;N+=m,n+=m){N==y&&(v=!0);if(N==k){c=g;if(0==c)break;j=a;C=d;0!=f%3&&(s=this.g3d.setScreened(2==(f&2)),this.g3d.currentShadeIndex=0)}0!=c&&(v&&0<=q&&q<r&&2147483647>p)&&(b=this.getZCurrent(this.a,
this.b,N),b<h[q]&&(G=this.shader.nextRandom8Bit(),s.addPixel(q,D(b),85>G?C:170<G?j:c)));if(N==z)break;p=(p+1)%1;for(q+=x;0>n;)n+=this.nBits;this.lineBits.get(n%this.nBits)&&(q+=u)}}},"~A,~A,~N,JU.P3,JU.P3,~N,~B");c(b,"plotLineDeltaABitsInt",function(a,d,g,b,c,f,h){var k=b.x,m=b.y,j=b.z,p=c.x,q=c.y,r=c.z,u=p-k,C=q-m;this.x1t=k;this.x2t=p;this.y1t=m;this.y2t=q;this.z1t=j;this.z2t=r;if(!(h&&2==this.getTrimmedLineImpl())){h=this.g3d.zbuf;var G=this.g3d.width,p=0,r=63>g?g+1:g,q=0<g?g-1:g,N=a[g],v=a[r],
s=a[q];g=d[g];a=d[r];d=d[q];var q=m*G+k,r=this.g3d.bufferSize,n,y,z,x;this.lineTypeX?(n=k,y=this.x1t,z=this.x2t,k+=w(u/2),x=m=0<=u?1:-1,u=0<=C?G:-G,this.setRastAB(b.x,b.z,c.x,c.z)):(n=m,y=this.y1t,z=this.y2t,k=m+w(C/2),m=0<=C?1:-1,x=0<=C?G:-G,u=0<=u?1:-1,this.setRastAB(b.y,b.z,c.y,c.z));b=j;c=N;j=v;C=s;v=!1;s=this.g3d.pixel;0!=f&&(s=this.g3d.setScreened(1==(f&1)),this.g3d.currentShadeIndex=0);for(N=n;;N+=m,n+=m){N==y&&(v=!0);if(N==k){c=g;if(0==c)break;j=a;C=d;0!=f%3&&(s=this.g3d.setScreened(2==(f&
2)),this.g3d.currentShadeIndex=0)}0!=c&&(v&&0<=q&&q<r&&2147483647>p)&&(b=this.getZCurrent(this.a,this.b,N),b<h[q]&&(G=this.shader.nextRandom8Bit(),s.addPixel(q,D(b),85>G?C:170<G?j:c)));if(N==z)break;p=(p+1)%1;for(q+=x;0>n;)n+=this.nBits;this.lineBits.get(n%this.nBits)&&(q+=u)}}},"~A,~A,~N,JU.P3i,JU.P3i,~N,~B");c(b,"plotLineBits",function(a,d,g,b,c,f,h){if(!(1>=g.z||1>=b.z)){var k=!0;this.x1t=g.x;this.y1t=g.y;this.z1t=g.z;this.x2t=b.x;this.y2t=b.y;this.z2t=b.z;switch(this.getTrimmedLineImpl()){case 2:return;
case 0:k=!1;break;default:h&&(g.set(this.x1t,this.y1t,this.z1t),b.set(this.x2t,this.y2t,this.z2t))}h=this.g3d.zbuf;var m=this.g3d.width,j=0;0==c&&(f=2147483647,c=1);var p=g.x,q=g.y,r=g.z,u=b.x-p,C=p+u,G=b.y-q,N=q+G,n=q*m+p,v=this.g3d.bufferSize,s=this.g3d.pixel;0!=a&&(!k&&0<=n&&n<v&&r<h[n])&&s.addPixel(n,r,a);if(!(0==u&&0==G)){var y=k=1,r=m;0>u&&(u=-u,k=-1);0>G&&(G=-G,r=-m,y=-1);var m=u+u,z=G+G;if(G<=u){this.setRastAB(g.x,g.z,b.x,b.z);q=0;g=Math.abs(C-this.x2t)-1;C=Math.abs(C-this.x1t)-1;N=u-1;for(b=
w(N/2);--N>=g&&!(N==b&&(a=d,0==a));){n+=k;p+=k;q+=z;q>u&&(n+=r,q-=m);if(0!=a&&N<C&&0<=n&&n<v&&j<f){var x=this.getZCurrent(this.a,this.b,p);x<h[n]&&s.addPixel(n,x,a)}j=(j+1)%c}}else{this.setRastAB(g.y,g.z,b.y,b.z);p=0;g=Math.abs(N-this.y2t)-1;C=Math.abs(N-this.y1t)-1;N=G-1;for(b=w(N/2);--N>=g&&!(N==b&&(a=d,0==a));)n+=r,q+=y,p+=m,p>G&&(n+=k,p-=z),0!=a&&(N<C&&0<=n&&n<v&&j<f)&&(x=this.getZCurrent(this.a,this.b,q),x<h[n]&&s.addPixel(n,x,a)),j=(j+1)%c}}}},"~N,~N,JU.P3i,JU.P3i,~N,~N,~B");c(b,"getTrimmedLineImpl",
function(){var a=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t),d=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t);if(0==(a|d))return 0;if(-1==(a|d))return 2;var g=this.g3d.xLast,b=this.g3d.yLast,c=this.g3d.slab,f=this.g3d.depth;do{if(0!=(a&d))return 2;var h=this.x2t-this.x1t,k=this.y2t-this.y1t,m=this.z2t-this.z1t;0!=a?(0!=(a&8)?(this.y1t+=D(-this.x1t*k/h),this.z1t+=D(-this.x1t*m/h),this.x1t=0):0!=(a&4)?(this.y1t+=D((g-this.x1t)*k/h),this.z1t+=D((g-this.x1t)*m/h),this.x1t=g):0!=(a&2)?(this.x1t+=D(-this.y1t*
h/k),this.z1t+=D(-this.y1t*m/k),this.y1t=0):0!=(a&1)?(this.x1t+=D((b-this.y1t)*h/k),this.z1t+=D((b-this.y1t)*m/k),this.y1t=b):0!=(a&32)?(this.x1t+=D((c-this.z1t)*h/m),this.y1t+=D((c-this.z1t)*k/m),this.z1t=c):(this.x1t+=D((f-this.z1t)*h/m),this.y1t+=D((f-this.z1t)*k/m),this.z1t=f),a=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t)):(0!=(d&8)?(this.y2t+=D(-this.x2t*k/h),this.z2t+=D(-this.x2t*m/h),this.x2t=0):0!=(d&4)?(this.y2t+=D((g-this.x2t)*k/h),this.z2t+=D((g-this.x2t)*m/h),this.x2t=g):0!=(d&2)?(this.x2t+=
D(-this.y2t*h/k),this.z2t+=D(-this.y2t*m/k),this.y2t=0):0!=(d&1)?(this.x2t+=D((b-this.y2t)*h/k),this.z2t+=D((b-this.y2t)*m/k),this.y2t=b):0!=(d&32)?(this.x2t+=D((c-this.z2t)*h/m),this.y2t+=D((c-this.z2t)*k/m),this.z2t=c):(this.x2t+=D((f-this.z2t)*h/m),this.y2t+=D((f-this.z2t)*k/m),this.z2t=f),d=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t))}while(0!=(a|d));return 1});c(b,"plotLineClippedOld",function(a,d,g,b,c,f,h,k,m,j,p){var q=this.g3d.zbuf,r=this.g3d.width,u=0;0==j&&(p=2147483647,j=1);var C=b*
r+g,G=this.g3d.bufferSize,N=this.g3d.pixel;0!=a&&(!m&&0<=C&&C<G&&c<q[C])&&N.addPixel(C,c,a);if(!(0==f&&0==h)){m=1;var n=r;g+=f;var v=b+h;0>f&&(f=-f,m=-1);0>h&&(h=-h,n=-r);r=f+f;b=h+h;c<<=10;if(h<=f){var s=f-1;0>k&&(s=-s);k=w(((k<<10)+s)/f);h=0;s=Math.abs(g-this.x2t)-1;g=Math.abs(g-this.x1t)-1;for(var v=f-1,x=w(v/2);--v>=s&&!(v==x&&(a=d,0==a));){C+=m;c+=k;h+=b;h>f&&(C+=n,h-=r);if(0!=a&&v<g&&0<=C&&C<G&&u<p){var y=c>>10;y<q[C]&&N.addPixel(C,y,a)}u=(u+1)%j}}else{s=h-1;0>k&&(s=-s);k=w(((k<<10)+s)/h);f=
0;s=Math.abs(v-this.y2t)-1;g=Math.abs(v-this.y1t)-1;v=h-1;for(x=w(v/2);--v>=s&&!(v==x&&(a=d,0==a));)C+=n,c+=k,f+=r,f>h&&(C+=m,f-=b),0!=a&&(v<g&&0<=C&&C<G&&u<p)&&(y=c>>10,y<q[C]&&N.addPixel(C,y,a)),u=(u+1)%j}}},"~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N");b.lbNone=new JU.BS});s("J.g3d");B(null,"J.g3d.Pixelator",["J.g3d.Graphics3D"],function(){var b=n(function(){this.pb=this.zb=this.p0=this.g=null;this.bgcolor=this.width=0;v(this,arguments)},J.g3d,"Pixelator",null);A(b,function(a){this.g=a;this.bgcolor=this.g.bgcolor;
this.setBuf()},"J.g3d.Graphics3D");c(b,"setBuf",function(){this.zb=this.g.zbuf;this.pb=this.g.pbuf});c(b,"clearPixel",function(a,d){this.zb[a]>d&&(this.zb[a]=2147483647)},"~N,~N");c(b,"addPixel",function(a,d,g){this.zb[a]=d;this.pb[a]=g},"~N,~N,~N");c(b,"addImagePixel",function(a,d,g,b,c,f){if(b<this.zb[g])switch(a){case 0:break;case 8:this.addPixel(g,b,c);break;default:a+=d,7>=a&&(d=this.pb[g],0!=f&&(d=J.g3d.Graphics3D.mergeBufferPixel(d,f,f)),d=J.g3d.Graphics3D.mergeBufferPixel(d,c&16777215|a<<
24,this.bgcolor),this.addPixel(g,b,d))}},"~N,~N,~N,~N,~N,~N")});s("J.g3d");B(["J.g3d.Pixelator"],"J.g3d.PixelatorT",["J.g3d.Graphics3D"],function(){var b=I(J.g3d,"PixelatorT",J.g3d.Pixelator);j(b,"clearPixel",function(){},"~N,~N");j(b,"addPixel",function(a,d,g){var b=this.g.zbufT[a];if(d<b){var c=this.g.pbufT[a];!this.g.translucentCoverOnly&&(0!=c&&b-d>this.g.zMargin)&&(this.pb[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pb[a],c,this.g.bgcolor));this.g.zbufT[a]=d;this.g.pbufT[a]=g&this.g.translucencyMask}else d!=
b&&!this.g.translucentCoverOnly&&d-b>this.g.zMargin&&(this.pb[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pb[a],g&this.g.translucencyMask,this.g.bgcolor))},"~N,~N,~N")});s("J.g3d");B(["J.g3d.Pixelator"],"J.g3d.PixelatorShaded",null,function(){var b=n(function(){this.tmp=this.bgRGB=null;this.zShadePower=this.zDepth=this.zSlab=0;v(this,arguments)},J.g3d,"PixelatorShaded",J.g3d.Pixelator);A(b,function(a){M(this,J.g3d.PixelatorShaded,[a]);this.tmp=F(3,0)},"J.g3d.Graphics3D");c(b,"set",function(a,d,g){this.bgcolor=
this.g.bgcolor;this.bgRGB=F(-1,[this.bgcolor&255,this.bgcolor>>8&255,this.g.bgcolor>>16&255]);this.zSlab=0>a?0:a;this.zDepth=0>d?0:d;this.zShadePower=g;this.p0=this.g.pixel0;return this},"~N,~N,~N");j(b,"addPixel",function(a,d,g){if(!(d>this.zDepth)){if(d>=this.zSlab&&0<this.zShadePower){var b=this.tmp,c=this.bgRGB;b[0]=g;b[1]=g>>8;b[2]=g>>16;var f=(this.zDepth-d)/(this.zDepth-this.zSlab);if(1<this.zShadePower)for(var h=0;h<this.zShadePower;h++)f*=f;for(h=0;3>h;h++)b[h]=c[h]+D(f*((b[h]&255)-c[h]));
g=b[2]<<16|b[1]<<8|b[0]|g&4278190080}this.p0.addPixel(a,d,g)}},"~N,~N,~N");c(b,"showZBuffer",function(){for(var a=this.p0.zb.length;0<=--a;)if(0!=this.p0.pb[a]){var d=D(Math.min(255,Math.max(0,255*(this.zDepth-this.p0.zb[a])/(this.zDepth-this.zSlab))));this.p0.pb[a]=4278190080|d|d<<8|d<<16}})});s("J.g3d");B(["J.g3d.Pixelator"],"J.g3d.PixelatorScreened",null,function(){var b=I(J.g3d,"PixelatorScreened",J.g3d.Pixelator);A(b,function(a,d){M(this,J.g3d.PixelatorScreened,[a]);this.width=a.width;this.p0=
d},"J.g3d.Graphics3D,J.g3d.Pixelator");j(b,"addPixel",function(a,d,b){a%this.width%2==w(a/this.width)%2&&this.p0.addPixel(a,d,b)},"~N,~N,~N")});s("J.g3d");z=n(function(){this.bufferSizeT=this.bufferSize=this.bufferHeight=this.bufferWidth=this.windowSize=this.windowHeight=this.windowWidth=0;this.zBufferT=this.zBuffer=this.pBufferT=this.pBuffer=this.bufferedImage=null;this.heightOffscreen=this.widthOffscreen=0;this.apiPlatform=this.graphicsForTextOrImage=this.offscreenImage=null;v(this,arguments)},
J.g3d,"Platform3D",null);A(z,function(b){this.apiPlatform=b},"J.api.GenericPlatform");c(z,"getGraphicsForMetrics",function(){return this.apiPlatform.getGraphics(this.allocateOffscreenImage(1,1))});c(z,"allocateTBuffers",function(b){this.bufferSizeT=b?this.bufferSize:this.windowSize;this.zBufferT=F(this.bufferSizeT,0);this.pBufferT=F(this.bufferSizeT,0)},"~B");c(z,"allocateBuffers",function(b,a,d,g){this.windowWidth=b;this.windowHeight=a;this.windowSize=b*a;d&&(b*=2,a*=2);this.bufferWidth=b;this.bufferHeight=
a;this.bufferSize=this.bufferWidth*this.bufferHeight;this.zBuffer=F(this.bufferSize,0);this.pBuffer=F(this.bufferSize,0);this.bufferedImage=this.apiPlatform.allocateRgbImage(this.windowWidth,this.windowHeight,this.pBuffer,this.windowSize,J.g3d.Platform3D.backgroundTransparent,g)},"~N,~N,~B,~B");c(z,"releaseBuffers",function(){this.windowWidth=this.windowHeight=this.bufferWidth=this.bufferHeight=this.bufferSize=-1;null!=this.bufferedImage&&(this.apiPlatform.flushImage(this.bufferedImage),this.bufferedImage=
null);this.zBufferT=this.pBufferT=this.zBuffer=this.pBuffer=null});c(z,"hasContent",function(){for(var b=this.bufferSize;0<=--b;)if(2147483647!=this.zBuffer[b])return!0;return!1});c(z,"clearScreenBuffer",function(){for(var b=this.bufferSize;0<=--b;)this.zBuffer[b]=2147483647,this.pBuffer[b]=0});c(z,"setBackgroundColor",function(b){if(null!=this.pBuffer)for(var a=this.bufferSize;0<=--a;)0==this.pBuffer[a]&&(this.pBuffer[a]=b)},"~N");c(z,"clearTBuffer",function(){for(var b=this.bufferSizeT;0<=--b;)this.zBufferT[b]=
2147483647,this.pBufferT[b]=0});c(z,"clearBuffer",function(){this.clearScreenBuffer()});c(z,"clearScreenBufferThreaded",function(){});c(z,"notifyEndOfRendering",function(){this.apiPlatform.notifyEndOfRendering()});c(z,"getGraphicsForTextOrImage",function(b,a){if(b>this.widthOffscreen||a>this.heightOffscreen)null!=this.offscreenImage&&(this.apiPlatform.disposeGraphics(this.graphicsForTextOrImage),this.apiPlatform.flushImage(this.offscreenImage)),b>this.widthOffscreen&&(this.widthOffscreen=b),a>this.heightOffscreen&&
(this.heightOffscreen=a),this.offscreenImage=this.allocateOffscreenImage(this.widthOffscreen,this.heightOffscreen),this.graphicsForTextOrImage=this.apiPlatform.getStaticGraphics(this.offscreenImage,J.g3d.Platform3D.backgroundTransparent);return this.graphicsForTextOrImage},"~N,~N");c(z,"allocateOffscreenImage",function(b,a){return this.apiPlatform.newOffScreenImage(b,a)},"~N,~N");c(z,"setBackgroundTransparent",function(b){J.g3d.Platform3D.backgroundTransparent=b},"~B");z.backgroundTransparent=!1;
s("J.g3d");z=n(function(){this.b=this.a=0;this.isOrthographic=!1;v(this,arguments)},J.g3d,"PrecisionRenderer",null);c(z,"getZCurrent",function(b,a,d){return Math.round(1.4E-45==b?a:this.isOrthographic?b*d+a:b/(a-d))},"~N,~N,~N");c(z,"setRastABFloat",function(b,a,d,g){var c=g-a,e=d-b;0==c||0==e?(this.a=1.4E-45,this.b=a):this.isOrthographic?(this.a=c/e,this.b=a-this.a*b):(this.a=e*a*(g/c),this.b=(d*g-b*a)/c)},"~N,~N,~N,~N");c(z,"setRastAB",function(b,a,d,g){var c=g-a,e=d-b;1.4E-45==b||0==c||0==e?(this.a=
1.4E-45,this.b=g):this.isOrthographic?(this.a=c/e,this.b=a-this.a*b):(this.a=e*a*(g/c),this.b=(d*g-b*a)/c)},"~N,~N,~N,~N");s("J.g3d");B(["JU.P3"],"J.g3d.SphereRenderer",null,function(){var b=n(function(){this.mDeriv=this.coef=this.mat=this.zroot=this.shader=this.g3d=null;this.planeShade=this.selectedOctant=0;this.zbuf=null;this.offsetPbufBeginLine=this.slab=this.depth=this.height=this.width=0;this.dxyz=this.planeShades=this.ptTemp=null;v(this,arguments)},J.g3d,"SphereRenderer",null);P(b,function(){this.zroot=
R(2,0);this.ptTemp=new JU.P3;this.planeShades=F(3,0);this.dxyz=L(3,3,0)});A(b,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");c(b,"render",function(a,d,b,c,e,f,h,k,m,j){if(1!=e&&(49<d&&(d&=-2),!this.g3d.isClippedXY(d,b,c))){this.slab=this.g3d.slab;this.depth=this.g3d.depth;var p=d+1>>1,q=e-p;if(!(e+p<this.slab||q>this.depth)){var r=b-p,u=b+p,C=c-p,G=c+p;this.shader.nOut=this.shader.nIn=0;this.zbuf=this.g3d.zbuf;this.height=this.g3d.height;this.width=this.g3d.width;this.offsetPbufBeginLine=
this.width*c+b;var N=this.shader;this.mat=f;if(null!=f&&(this.coef=h,this.mDeriv=k,this.selectedOctant=m,null==N.ellipsoidShades&&N.createEllipsoidShades(),null!=j)){this.planeShade=-1;for(h=0;3>h;h++)if(p=this.dxyz[h][0]=j[h].x-b,k=this.dxyz[h][1]=j[h].y-c,m=this.dxyz[h][2]=j[h].z-e,this.planeShades[h]=N.getShadeIndex(p,k,-m),0==p&&0==k){this.planeShade=this.planeShades[h];break}}if(null!=f||128<d)this.renderQuadrant(-1,-1,b,c,e,d,a),this.renderQuadrant(-1,1,b,c,e,d,a),this.renderQuadrant(1,-1,b,
c,e,d,a),this.renderQuadrant(1,1,b,c,e,d,a),null!=f&&(this.mDeriv=this.coef=this.mat=null);else{var n=N.sphereShapeCache[d-1];if(null==n){n=0;f=0!=(d&1);j=d/2;k=j*j;p=w((d+1)/2);m=f?0:0.5;for(h=0;h<p;++h,++m)for(var v=m*m,s=f?0:0.5,y=0;y<p;++y,++s){var x=s*s,x=k-v-x;0<=x&&++n}var n=F(n,0),z=0;m=f?0:0.5;for(h=0;h<p;++h,++m){v=m*m;s=f?0:0.5;for(y=0;y<p;++y,++s)if(x=s*s,x=k-v-x,0<=x){var A=Math.sqrt(x),x=D(A),B=N.getShadeN(s,m,A,j),H=N.getShadeN(-s,m,A,j),I=N.getShadeN(s,-m,A,j),A=N.getShadeN(-s,-m,
A,j),x=x|B<<7|H<<13|I<<19|A<<25;n[z++]=x}n[z-1]|=2147483648}N.sphereShapeCache[d-1]=n}0>r||u>=this.width||0>C||G>=this.height||q<this.slab||e>this.depth?this.renderSphereClipped(n,b,c,e,d,a):this.renderSphereUnclipped(n,e,d,a)}this.zbuf=null}}},"~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");c(b,"renderSphereUnclipped",function(a,d,b,c){var e=0,f=1-(b&1),h=this.offsetPbufBeginLine,k=h-f*this.width;b=w((b+1)/2);var m=this.zbuf,j=this.width,p=this.g3d.pixel;do{var q=h,r=h-f,u=k,C=k-f,G;do{G=a[e++];var n=d-(G&
127);n<m[q]&&p.addPixel(q,n,c[G>>7&63]);n<m[r]&&p.addPixel(r,n,c[G>>13&63]);n<m[u]&&p.addPixel(u,n,c[G>>19&63]);n<m[C]&&p.addPixel(C,n,c[G>>25&63]);++q;--r;++u;--C}while(0<=G);h+=j;k-=j}while(0<--b)},"~A,~N,~N,~A");c(b,"renderSphereClipped",function(a,d,b,c,e,f){var h=this.width,k=this.height,m=0,j=1-(e&1),p=this.offsetPbufBeginLine,q=p-j*h;e=w((e+1)/2);var r=b,u=b-j;b=(d<<16)+(b<<1)^858993459;var C=this.zbuf,G=this.g3d.pixel,n=this.slab,s=this.depth;do{var v=0<=r&&r<k,x=0<=u&&u<k,y=p,z=p-j,A=q,B=
q-j,D,F=d,H=d-j;do{var I=0<=H&&H<h,K=0<=F&&F<h;D=a[m++];var M;M=D&127;var L;c<n?(L=c+M,M=L>=n):(L=c-M,M=L<n);M&&(L=n);if(L>=n&&L<=s){if(v){if(K&&L<C[y]){var O=M?44+(b>>7&7):D>>7&63;G.addPixel(y,L,f[O])}I&&L<C[z]&&(O=M?44+(b>>13&7):D>>13&63,G.addPixel(z,L,f[O]))}x&&(K&&L<C[A]&&(O=M?44+(b>>19&7):D>>19&63,G.addPixel(A,L,f[O])),I&&L<C[B]&&(O=M?44+(b>>25&7):D>>25&63,G.addPixel(B,L,f[O])))}++y;--z;++A;--B;++F;--H;M&&(b=(b<<16)+(b<<1)+b&2147483647)}while(0<=D);p+=h;q-=h;++r;--u}while(0<--e)},"~A,~N,~N,~N,~N,~A");
c(b,"renderQuadrant",function(a,d,b,c,e,f,h){f=w(f/2);var k=b+f*a,m=(0>b?-1:b<this.width?0:1)+(0>k?-2:k<this.width?0:2);-3==m||3==m||(k=c+f*d,k=(0>c?-1:c<this.height?0:1)+(0>k?-2:k<this.height?0:2),-3==k||3==k||(null==this.mat&&0==m&&0==k&&e-f>=this.slab&&e<=this.depth?this.renderQuadrantUnclipped(f,a,d,e,h):this.renderQuadrantClipped(f,a,d,b,c,e,h)))},"~N,~N,~N,~N,~N,~N,~A");c(b,"renderQuadrantUnclipped",function(a,d,b,c,e){for(var f=a*a,h=2*a+1,k=0>b?-this.width:this.width,m=this.offsetPbufBeginLine,
j=this.zbuf,p=this.g3d.pixel,q=this.shader.sphereShadeIndexes,r=0,u=0;u<=f;u+=r+ ++r,m+=k)for(var C=m,G=f-u,n=c-a,s=w((r*b+a<<8)/h),v=0,x=0;x<=G;x+=v+ ++v,C+=d)if(!(j[C]<=n)&&(n=w(Math.sqrt(G-x)),n=c-n,!(j[C]<=n))){var y=w((v*d+a<<8)/h);p.addPixel(C,n,e[q[(s<<8)+y]])}},"~N,~N,~N,~N,~A");c(b,"renderQuadrantClipped",function(a,d,b,c,e,f,h){for(var k=null!=this.mat,m=0<=this.selectedOctant,j=a*a,p=2*a+1,q=0>b?-this.width:this.width,r=this.offsetPbufBeginLine,u=(c<<16)+(e<<1)^858993459,C=0,G=0,n=this.g3d.pixel,
s=0,v=this.height,x=this.width,y=this.zbuf,z=this.dxyz,A=this.slab,D=this.depth,B=this.ptTemp,F=this.coef,H=this.zroot,I=this.selectedOctant,K=this.shader,L=this.planeShades,M=K.sphereShadeIndexes,O=this.planeShade,P=this.mat,Q=0,U=0,S=e;U<=j;U+=Q+ ++Q,r+=q,S+=b)if(0>S){if(0>b)break}else if(S>=v){if(0<b)break}else{var V=j-(k?0:U);k||(C=w((Q*b+a<<8)/p));for(var u=(u<<16)+(u<<1)+u&2147483647,R=c,Y=0,X=0,Z=-1,aa=1,$=r;X<=V;X+=Y+ ++Y,$+=d,R+=d)if(0>R){if(0>d)break}else if(R>=x){if(0<d)break}else{var T;
if(k){T=(F[4]*R+F[5]*S+F[8])/F[2]/2;var W=T*T-(F[0]*R*R+F[1]*S*S+F[3]*R*S+F[6]*R+F[7]*S-1)/F[2];if(0>W){if(0<=Z)break;continue}W=Math.sqrt(W);H[0]=-T-W;H[1]=-T+W;Z=f<A?1:0;if(0==(T=w(H[Z])))T=f;aa=2;s=T;if(m){B.set(R-c,S-e,T-f);P.rotate(B);W=0;0>B.x&&(W|=1);0>B.y&&(W|=2);0>B.z&&(W|=4);if(W==I){if(0<=O)G=O;else{aa=3;G=3.4028235E38;for(T=0;3>T;T++)if(0!=(W=z[T][2]))W=f+(-z[T][0]*(R-c)-z[T][1]*(S-e))/W,W<G&&(G=W,aa=T);3==aa&&(aa=0,G=f);H[0]=G;G=L[aa]}T=w(H[0]);aa=3}if(W=f<A?T>=A:T<A)s=T=A,aa=0}if(T<
A||T>D||y[$]<=s)continue}else{T=w(Math.sqrt(V-X));T=f+(f<A?T:-T);if(W=f<A?T>=A:T<A)T=A,aa=0;if(T<A||T>D||y[$]<=T)continue}switch(aa){case 0:G=44+(u>>8&7);u=(u<<16)+(u<<1)+u&2147483647;aa=1;break;case 2:G=K.getEllipsoidShade(R,S,H[Z],a,this.mDeriv);break;case 3:n.clearPixel($,s);break;default:G=w((Y*d+a<<8)/p),G=M[(C<<8)+G]}n.addPixel($,T,h[G])}u=(u+R+S|1)&2147483647}},"~N,~N,~N,~N,~N,~N,~A")});s("J.g3d");B(["java.util.Hashtable"],"J.g3d.TextRenderer",["JU.CU","J.g3d.Graphics3D"],function(){var b=
n(function(){this.size=this.mapWidth=this.width=this.ascent=this.height=0;this.tmap=null;this.isInvalid=!1;v(this,arguments)},J.g3d,"TextRenderer",null);A(b,function(a,d){this.ascent=d.getAscent();this.height=d.getHeight();this.width=d.stringWidth(a);0!=this.width&&(this.mapWidth=this.width,this.size=this.mapWidth*this.height)},"~S,JU.Font");b.clearFontCache=c(b,"clearFontCache",function(){J.g3d.TextRenderer.working||(J.g3d.TextRenderer.htFont3d.clear(),J.g3d.TextRenderer.htFont3dAntialias.clear())});
b.plot=c(b,"plot",function(a,d,b,c,e,f,h,k,m,j){if(0==f.length)return 0;if(0<=f.indexOf("<su")||0<=f.indexOf("<color"))return J.g3d.TextRenderer.plotByCharacter(a,d,b,c,e,f,h,k,m,j);var p=h.getAscent();d-=p;f=J.g3d.TextRenderer.getPlotText3D(a,d,k,f,h,j);if(f.isInvalid)return f.width;j&&(c=J.g3d.Graphics3D.fixTextImageRGB(c));j=f.height;h=f.width;var p=f.tmap,q=k.width,r=k.height,u=k.zbuf,C=k.pixel,G=k.translucencyLog;if(null!=m||(0>a||a+f.width>q||0>d||d+f.height>r)&&null!=(m=k))for(var n=k=0;n<
j;n++)for(var s=0;s<h;s++){var v=p[k++];0!=v&&m.plotImagePixel(c,a+s,d+n,b,v,e,q,r,u,C,G)}else{k=n=0;for(a=d*q+a;n<j;n++,a+=q-h)for(s=0;s<h;s++)C.addImagePixel(p[k++],G,a++,b,c,e)}return f.width},"~N,~N,~N,~N,~N,~S,JU.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");b.plotByCharacter=c(b,"plotByCharacter",function(a,d,b,c,e,f,h,k,m,j){for(var p=0,q=f.length,r=Math.round(0.25*h.getHeight()),u=-Math.round(0.3*h.getHeight()),C=0,G=0;G<q;G++){if("<"==f.charAt(G)){if(G+5<q&&f.substring(G,G+6).equals("<color")){var C=
c,n=f.indexOf(">",G);if(0>n)continue;c=JU.CU.getArgbFromString(f.substring(G+7,n).trim());G=n;continue}if(G+7<q&&f.substring(G,G+8).equals("</color>")){G+=7;c=C;continue}if(G+4<q&&f.substring(G,G+5).equals("<sub>")){G+=4;d+=r;continue}if(G+4<q&&f.substring(G,G+5).equals("<sup>")){G+=4;d+=u;continue}if(G+5<q&&f.substring(G,G+6).equals("</sub>")){G+=5;d-=r;continue}if(G+5<q&&f.substring(G,G+6).equals("</sup>")){G+=5;d-=u;continue}}n=J.g3d.TextRenderer.plot(a+p,d,b,c,e,f.substring(G,G+1),h,k,m,j);p+=
n}return p},"~N,~N,~N,~N,~N,~S,JU.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");b.getPlotText3D=c(b,"getPlotText3D",function(a,d,b,c,e,f){J.g3d.TextRenderer.working=!0;f=f?J.g3d.TextRenderer.htFont3dAntialias:J.g3d.TextRenderer.htFont3d;var h=f.get(e),k=null,m=!1,j=!1;null!=h?k=h.get(c):(h=new java.util.Hashtable,m=!0);null==k&&(k=new J.g3d.TextRenderer(c,e),j=!0);k.isInvalid=0==k.width||0>=a+k.width||a>=b.width||0>=d+k.height||d>=b.height;if(k.isInvalid)return k;m&&f.put(e,h);j&&(k.setTranslucency(c,
e,b),h.put(c,k));J.g3d.TextRenderer.working=!1;return k},"~N,~N,J.g3d.Graphics3D,~S,JU.Font,~B");c(b,"setTranslucency",function(a,d,b){a=b.apiPlatform.getTextPixels(a,d,b.platform.getGraphicsForTextOrImage(this.mapWidth,this.height),b.platform.offscreenImage,this.mapWidth,this.height,this.ascent);if(null!=a){this.tmap=Q(this.size,0);for(d=a.length;0<=--d;)b=a[d]&255,0!=b&&(this.tmap[d]=J.g3d.TextRenderer.translucency[b>>5])}},"~S,JU.Font,J.g3d.Graphics3D");b.translucency=Q(-1,[7,6,5,4,3,2,1,8]);b.working=
!1;b.htFont3d=new java.util.Hashtable;b.htFont3dAntialias=new java.util.Hashtable});s("J.g3d");B(["JU.P3i"],"J.g3d.TextString",null,function(){var b=n(function(){this.font=this.text=null;this.bgargb=this.argb=0;v(this,arguments)},J.g3d,"TextString",JU.P3i,java.util.Comparator);c(b,"setText",function(a,d,b,c,e,f,h){this.text=a;this.font=d;this.argb=b;this.bgargb=c;this.x=e;this.y=f;this.z=h},"~S,JU.Font,~N,~N,~N,~N,~N");j(b,"compare",function(a,d){return null==a||null==d?0:a.z>d.z?-1:a.z<d.z?1:0},
"J.g3d.TextString,J.g3d.TextString");j(b,"toString",function(){return this.asString()+" "+this.text})});s("J.g3d");B(["J.g3d.G3DRenderer","$.PrecisionRenderer","JU.Rgb16"],"J.g3d.TriangleRenderer",["JU.GData"],function(){var b=n(function(){this.rgb16t2=this.rgb16t1=this.rgb16sGouraud=this.rgb16sE=this.rgb16sW=this.azE=this.axE=this.azW=this.axW=this.bb=this.aa=this.az=this.ay=this.ax=this.g3d=null;v(this,arguments)},J.g3d,"TriangleRenderer",J.g3d.PrecisionRenderer,J.g3d.G3DRenderer);P(b,function(){this.ax=
F(3,0);this.ay=F(3,0);this.az=F(3,0);this.aa=L(64,0);this.bb=L(64,0);this.axW=F(64,0);this.azW=F(64,0);this.axE=F(64,0);this.azE=F(64,0);this.rgb16t1=new JU.Rgb16;this.rgb16t2=new JU.Rgb16});A(b,function(){M(this,J.g3d.TriangleRenderer,[])});j(b,"set",function(a){try{this.rgb16sW=Array(64);this.rgb16sE=Array(64);for(var d=64;0<=--d;)this.rgb16sW[d]=new JU.Rgb16,this.rgb16sE[d]=new JU.Rgb16;this.g3d=a;this.rgb16sGouraud=Array(3);for(d=3;0<=--d;)this.rgb16sGouraud[d]=new JU.Rgb16}catch(b){if(!H(b,Exception))throw b;
}return this},"J.api.JmolRendererInterface,JU.GData");c(b,"reallocRgb16s",function(a,d){var b=Array(d);System.arraycopy(a,0,b,0,a.length);for(var c=a.length;c<d;++c)b[c]=new JU.Rgb16;return b},"~A,~N");c(b,"setGouraud",function(a,d,b){this.rgb16sGouraud[0].setInt(a);this.rgb16sGouraud[1].setInt(d);this.rgb16sGouraud[2].setInt(b)},"~N,~N,~N");c(b,"fillTriangle",function(a,d,b,c){this.ax[0]=a.x;this.ax[1]=d.x;this.ax[2]=b.x;this.ay[0]=a.y;this.ay[1]=d.y;this.ay[2]=b.y;this.az[0]=a.z;this.az[1]=d.z;
this.az[2]=b.z;if(!(1>=this.az[0]||1>=this.az[1]||1>=this.az[2])){d=this.g3d.clipCode3(this.ax[0],this.ay[0],this.az[0]);b=this.g3d.clipCode3(this.ax[1],this.ay[1],this.az[1]);var e=this.g3d.clipCode3(this.ax[2],this.ay[2],this.az[2]),f=d|b|e;a=0!=f;if(!a||!(-1==f||0!=(d&b&e))){e=0;this.ay[1]<this.ay[e]&&(e=1);this.ay[2]<this.ay[e]&&(e=2);var f=(e+1)%3,h=(e+2)%3;if(this.ay[f]>this.ay[h])var k=f,f=h,h=k;d=this.ay[e];var m=this.ay[f],j=this.ay[h];b=j-d+1;if(!(b>3*this.g3d.height)){if(b>this.axW.length){var p=
b+31&-32;this.axW=F(p,0);this.azW=F(p,0);this.axE=F(p,0);this.azE=F(p,0);this.aa=L(p,0);this.bb=L(p,0);this.rgb16sW=this.reallocRgb16s(this.rgb16sW,p);this.rgb16sE=this.reallocRgb16s(this.rgb16sE,p)}var q;c?(p=this.rgb16sW,q=this.rgb16sE):p=q=null;k=m-d;0==k?(this.ax[f]<this.ax[e]&&(k=f,f=e,e=k),this.generateRaster(b,e,h,this.axW,this.azW,0,p),this.generateRaster(b,f,h,this.axE,this.azE,0,q)):m==j?(this.ax[h]<this.ax[f]&&(k=f,f=h,h=k),this.generateRaster(b,e,f,this.axW,this.azW,0,p),this.generateRaster(b,
e,h,this.axE,this.azE,0,q)):(m=this.ax[h]-this.ax[e],j=JU.GData.roundInt(w(b/2)),0>m&&(j=-j),this.ax[e]+w((m*k+j)/b)<this.ax[f]?(this.generateRaster(b,e,h,this.axW,this.azW,0,p),this.generateRaster(k+1,e,f,this.axE,this.azE,0,q),this.generateRaster(b-k,f,h,this.axE,this.azE,k,q)):(this.generateRaster(k+1,e,f,this.axW,this.azW,0,p),this.generateRaster(b-k,f,h,this.axW,this.azW,k,p),this.generateRaster(b,e,h,this.axE,this.azE,0,q)));this.g3d.setZMargin(5);e=this.g3d.pass2Flag01;f=1-e;h=0;0>d&&(b+=d,
h-=d,d=0);d+b>this.g3d.height&&(b=this.g3d.height-d);if(c)if(a)for(;--b>=e;++d,++h)a=this.axE[h]-(c=this.axW[h])+f,0<a&&this.g3d.plotPixelsClippedRaster(a,c,d,this.azW[h],this.azE[h],this.rgb16sW[h],this.rgb16sE[h]);else for(;--b>=e;++d,++h)a=this.axE[h]-(c=this.axW[h])+f,1==e&&0>a&&(a=1,c--),0<a&&this.g3d.plotPixelsUnclippedRaster(a,c,d,this.azW[h],this.azE[h],this.rgb16sW[h],this.rgb16sE[h]);else if(a)for(;--b>=e;++d,++h)a=this.axE[h]-(c=this.axW[h])+f,0<a&&this.g3d.plotPixelsClippedRasterBits(a,
c,d,this.azW[h],this.azE[h],null,null,this.aa[h],this.bb[h]);else for(;--b>=e;++d,++h)a=this.axE[h]-(c=this.axW[h])+f,1==e&&0>a&&(a=1,c--),0<a&&this.g3d.plotPixelsUnclippedRasterBits(a,c,d,null,null,this.aa[h],this.bb[h]);this.g3d.setZMargin(0)}}}},"JU.P3i,JU.P3i,JU.P3i,~B");c(b,"generateRaster",function(a,d,b,c,e,f,h){var k=this.ax[d],m=this.ax[b]-k,j,p,q;0<=m?(j=1,p=m,q=0):(j=-1,p=-m,q=1-a);var r;p<=a?r=0:(r=JU.GData.roundInt(w(m/a)),p%=a);this.setRastAB(this.ay[d],this.az[d],this.ay[b],this.az[b]);
for(var u=this.a,C=this.b,G=c===this.axE,n=0,s=this.ay[d],v=a-1,m=f;n<=v;++m,++n,++s){if(0==m||m>f)c[m]=n==v?this.ax[b]:k,e[m]=this.getZCurrent(u,C,s),G&&(this.setRastAB(this.axW[m],this.azW[m],c[m],e[m]),this.aa[m]=this.a,this.bb[m]=this.b);k+=r;q+=p;0<q&&(k+=j,q-=a)}if(null!=h){c=this.rgb16t1;c.setRgb(this.rgb16sGouraud[d]);d=this.rgb16t2;d.diffDiv(this.rgb16sGouraud[b],c,a);m=f;for(a=f+a;m<a;++m)h[m].setAndIncrement(c,d)}},"~N,~N,~N,~A,~A,~N,~A")});s("J.i18n");B("J.api.Translator java.text.MessageFormat java.util.Hashtable JU.PT J.i18n.Language $.Resource".split(" "),
"J.i18n.GT",["JU.Logger"],function(){var b=n(function(){this.resources=null;this.resourceCount=0;this.doTranslate=!0;this.language=null;v(this,arguments)},J.i18n,"GT",null,J.api.Translator);A(b,function(a,d){this.resources=null;this.resourceCount=0;J.i18n.GT.$getTextWrapper=this;null!=d&&0==d.length&&(d="none");null!=d&&(this.language=d);"none".equals(this.language)&&(this.language=null);null==this.language&&(this.language=J.i18n.Resource.getLanguage());null==this.language&&(this.language="en");var b=
this.language,c=null,e=null,f=this.language.indexOf("_");if(0<=f&&(b=b.substring(0,f),c=this.language,0<=(f=c.indexOf("_",++f))))c=c.substring(0,f),e=this.language;if(null==(this.language=this.getSupported(e))&&null==(this.language=this.getSupported(c))&&null==(this.language=this.getSupported(b)))this.language="en",System.out.println(this.language+" not supported -- using en");else{c=e=null;switch(this.language.length){default:e=this.language;c=this.language.substring(0,5);b=this.language.substring(0,
2);break;case 5:c=this.language;b=this.language.substring(0,2);break;case 2:b=this.language}c=this.getSupported(c);b=this.getSupported(b);if(b===c||"en_US".equals(b))b=null;c===e&&(c=null);"en_US".equals(c)||(J.i18n.GT.allowDebug&&JU.Logger.debugging&&JU.Logger.debug("Instantiating gettext wrapper for "+this.language+" using files for language:"+b+" country:"+c+" variant:"+e),J.i18n.GT.$ignoreApplicationBundle||this.addBundles(a,"Jmol",e,null,null),this.addBundles(a,"JmolApplet",e,null,null),J.i18n.GT.$ignoreApplicationBundle||
this.addBundles(a,"Jmol",null,c,null),this.addBundles(a,"JmolApplet",null,c,null),J.i18n.GT.$ignoreApplicationBundle||this.addBundles(a,"Jmol",null,null,b),this.addBundles(a,"JmolApplet",null,null,b))}},"JV.Viewer,~S");j(b,"translate",function(a){return J.i18n.GT.$(a)},"~S");b.getLanguageList=c(b,"getLanguageList",function(a){null==J.i18n.GT.languageList&&(null==a&&(a=J.i18n.GT.getTextWrapper()),a.createLanguageList());return J.i18n.GT.languageList},"J.i18n.GT");b.getLanguage=c(b,"getLanguage",function(){return J.i18n.GT.getTextWrapper().language});
b.ignoreApplicationBundle=c(b,"ignoreApplicationBundle",function(){J.i18n.GT.$ignoreApplicationBundle=!0});b.setDoTranslate=c(b,"setDoTranslate",function(a){var d=J.i18n.GT.getDoTranslate();J.i18n.GT.getTextWrapper().doTranslate=a;return d},"~B");b.getDoTranslate=c(b,"getDoTranslate",function(){return J.i18n.GT.getTextWrapper().doTranslate});b.$=c(b,"$",function(a){return J.i18n.GT.getTextWrapper().getString(a)},"~S");b.o=c(b,"o",function(a,d){if(y(d,Array)){if(1!=d.length)return java.text.MessageFormat.format(a,
d);d=d[0]}return JU.PT.rep(a,"{0}",d.toString())},"~S,~O");b.i=c(b,"i",function(a,d){return JU.PT.rep(a,"{0}",""+d)},"~S,~N");b.escapeHTML=c(b,"escapeHTML",function(a){for(var d,b=a.length;0<=--b;)if(127<(d=a.charAt(b)).charCodeAt(0))a=a.substring(0,b)+"&#"+d.charCodeAt(0)+";"+a.substring(b+1);return a},"~S");b.getTextWrapper=c(b,"getTextWrapper",function(){return null==J.i18n.GT.$getTextWrapper?J.i18n.GT.$getTextWrapper=new J.i18n.GT(null,null):J.i18n.GT.$getTextWrapper});c(b,"createLanguageList",
function(){var a=this.doTranslate;this.doTranslate=!1;J.i18n.GT.languageList=J.i18n.Language.getLanguageList();this.doTranslate=a});c(b,"getSupported",function(a){if(null==a)return null;var d=J.i18n.GT.htLanguages.get(a);if(null!=d)return 0==d.length?null:d;d=J.i18n.Language.getSupported(J.i18n.GT.getLanguageList(this),a);J.i18n.GT.htLanguages.put(a,null==d?"":d);return d},"~S");c(b,"addBundles",function(a,d,b,c,e){try{d="J.translation."+d+".",null!=b&&this.addBundle(a,d,b),null!=c&&this.addBundle(a,
d,c),null!=e&&this.addBundle(a,d,e)}catch(f){if(H(f,Exception))J.i18n.GT.allowDebug&&JU.Logger.errorEx("Some exception occurred!",f),this.resources=null,this.resourceCount=0;else throw f;}},"JV.Viewer,~S,~S,~S,~S");c(b,"addBundle",function(a,d,b){a=J.i18n.Resource.getResource(a,d,b);null!=a&&(null==this.resources&&(this.resources=Array(8),this.resourceCount=0),this.resources[this.resourceCount]=a,this.resourceCount++,J.i18n.GT.allowDebug&&JU.Logger.debug("GT adding "+d))},"JV.Viewer,~S,~S");c(b,"getString",
function(a){var d=null;if(this.doTranslate){for(var b=0;b<this.resourceCount;b++)if(d=this.resources[b].getString(a),null!=d){a=d;break}0<this.resourceCount&&(null==d&&J.i18n.GT.allowDebug&&JU.Logger.debugging)&&JU.Logger.debug("No trans, using default: "+a)}null==d&&(a.startsWith("[")?a=a.substring(a.indexOf("]")+1):a.endsWith("]")&&(a=a.substring(0,a.indexOf("["))));return a},"~S");b.$ignoreApplicationBundle=!1;b.$getTextWrapper=null;b.languageList=null;b.allowDebug=!1;b.vwr=null;b.htLanguages=
new java.util.Hashtable});s("J.i18n");B(null,"J.i18n.Language",["J.i18n.GT"],function(){var b=n(function(){this.nativeLanguage=this.language=this.code=null;this.display=!1;v(this,arguments)},J.i18n,"Language",null);A(b,function(a,d,b,c){this.code=a;this.language=d;this.nativeLanguage=b;this.display=c},"~S,~S,~S,~B");b.getLanguageList=c(b,"getLanguageList",function(){return x(-1,[new J.i18n.Language("ar",J.i18n.GT.$("Arabic"),"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",!1),new J.i18n.Language("ast",
J.i18n.GT.$("Asturian"),"Asturian",!1),new J.i18n.Language("az",J.i18n.GT.$("Azerbaijani"),"az\u0259rbaycan dili",!1),new J.i18n.Language("bs",J.i18n.GT.$("Bosnian"),"bosanski jezik",!1),new J.i18n.Language("ca",J.i18n.GT.$("Catalan"),"Catal\u00e0",!0),new J.i18n.Language("cs",J.i18n.GT.$("Czech"),"\u010ce\u0161tina",!0),new J.i18n.Language("da",J.i18n.GT.$("Danish"),"Dansk",!0),new J.i18n.Language("de",J.i18n.GT.$("German"),"Deutsch",!0),new J.i18n.Language("el",J.i18n.GT.$("Greek"),"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
!1),new J.i18n.Language("en_AU",J.i18n.GT.$("Australian English"),"Australian English",!1),new J.i18n.Language("en_GB",J.i18n.GT.$("British English"),"British English",!0),new J.i18n.Language("en_US",J.i18n.GT.$("American English"),"American English",!0),new J.i18n.Language("es",J.i18n.GT.$("Spanish"),"Espa\u00f1ol",!0),new J.i18n.Language("et",J.i18n.GT.$("Estonian"),"Eesti",!1),new J.i18n.Language("eu",J.i18n.GT.$("Basque"),"Euskara",!0),new J.i18n.Language("fi",J.i18n.GT.$("Finnish"),"Suomi",!0),
new J.i18n.Language("fo",J.i18n.GT.$("Faroese"),"F\u00f8royskt",!1),new J.i18n.Language("fr",J.i18n.GT.$("French"),"Fran\u00e7ais",!0),new J.i18n.Language("fy",J.i18n.GT.$("Frisian"),"Frysk",!1),new J.i18n.Language("gl",J.i18n.GT.$("Galician"),"Galego",!1),new J.i18n.Language("hr",J.i18n.GT.$("Croatian"),"Hrvatski",!1),new J.i18n.Language("hu",J.i18n.GT.$("Hungarian"),"Magyar",!0),new J.i18n.Language("hy",J.i18n.GT.$("Armenian"),"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",!1),new J.i18n.Language("id",
J.i18n.GT.$("Indonesian"),"Indonesia",!0),new J.i18n.Language("it",J.i18n.GT.$("Italian"),"Italiano",!0),new J.i18n.Language("ja",J.i18n.GT.$("Japanese"),"\u65e5\u672c\u8a9e",!0),new J.i18n.Language("jv",J.i18n.GT.$("Javanese"),"Basa Jawa",!1),new J.i18n.Language("ko",J.i18n.GT.$("Korean"),"\ud55c\uad6d\uc5b4",!0),new J.i18n.Language("ms",J.i18n.GT.$("Malay"),"Bahasa Melayu",!0),new J.i18n.Language("nb",J.i18n.GT.$("Norwegian Bokmal"),"Norsk Bokm\u00e5l",!1),new J.i18n.Language("nl",J.i18n.GT.$("Dutch"),
"Nederlands",!0),new J.i18n.Language("oc",J.i18n.GT.$("Occitan"),"Occitan",!1),new J.i18n.Language("pl",J.i18n.GT.$("Polish"),"Polski",!1),new J.i18n.Language("pt",J.i18n.GT.$("Portuguese"),"Portugu\u00eas",!1),new J.i18n.Language("pt_BR",J.i18n.GT.$("Brazilian Portuguese"),"Portugu\u00eas brasileiro",!0),new J.i18n.Language("ru",J.i18n.GT.$("Russian"),"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",!0),new J.i18n.Language("sl",J.i18n.GT.$("Slovenian"),"Sloven\u0161\u010dina",!1),new J.i18n.Language("sr",
J.i18n.GT.$("Serbian"),"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",!1),new J.i18n.Language("sv",J.i18n.GT.$("Swedish"),"Svenska",!0),new J.i18n.Language("ta",J.i18n.GT.$("Tamil"),"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",!1),new J.i18n.Language("te",J.i18n.GT.$("Telugu"),"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",!1),new J.i18n.Language("tr",J.i18n.GT.$("Turkish"),"T\u00fcrk\u00e7e",!0),new J.i18n.Language("ug",J.i18n.GT.$("Uyghur"),"Uy\u01a3urq\u0259",!1),new J.i18n.Language("uk",J.i18n.GT.$("Ukrainian"),
"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",!0),new J.i18n.Language("uz",J.i18n.GT.$("Uzbek"),"O'zbek",!1),new J.i18n.Language("zh_CN",J.i18n.GT.$("Simplified Chinese"),"\u7b80\u4f53\u4e2d\u6587",!0),new J.i18n.Language("zh_TW",J.i18n.GT.$("Traditional Chinese"),"\u7e41\u9ad4\u4e2d\u6587",!0)])});b.getSupported=c(b,"getSupported",function(a,d){for(var b=a.length;0<=--b;)if(a[b].code.equalsIgnoreCase(d))return a[b].code;for(b=a.length;0<=--b;)if(a[b].code.startsWith(d))return a[b].code;
return null},"~A,~S")});s("J.i18n");B(null,"J.i18n.Resource","java.util.Hashtable JU.PT $.Rdr J.translation.PO JU.Logger JV.FileManager".split(" "),function(){var b=n(function(){this.resourceMap=this.resource=null;v(this,arguments)},J.i18n,"Resource",null);A(b,function(a,d){null==d?this.resourceMap=a:this.resource=a},"~O,~S");b.getResource=c(b,"getResource",function(a,d,b){try{var c=JV.FileManager.getBufferedReaderForResource(a,J.translation.PO,"J/translation/",(0<=d.indexOf("Applet")?"JmolApplet/":
"Jmol/")+b+".po"),e=Array(1);JU.Rdr.readAllAsString(c,2147483647,!1,e,0);return J.i18n.Resource.getResourceFromPO(e[0])}catch(f){if(H(f,"java.io.IOException"))return null;throw f;}},"JV.Viewer,~S,~S");c(b,"getString",function(a){try{return null==this.resource?this.resourceMap.get(a):this.resource.getString(a)}catch(d){if(H(d,Exception))return null;throw d;}},"~S");b.getLanguage=c(b,"getLanguage",function(){var a=null;return a=Jmol.featureDetection.getDefaultLanguage().replace(/-/g,"_")});b.getResourceFromPO=
c(b,"getResourceFromPO",function(a){if(null==a||0==a.length)return null;var d=new java.util.Hashtable;try{var b=JU.PT.split(a,"\n");a=0;for(var c="",e="",f=0;f<b.length;f++){var h=b[f];2>=h.length?(2==a&&(0!=c.length&&0!=e.length)&&d.put(e,c),a=0):0==h.indexOf("msgid")?(a=1,e=J.i18n.Resource.fix(h)):0==h.indexOf("msgstr")?(a=2,c=J.i18n.Resource.fix(h)):1==a?e+=J.i18n.Resource.fix(h):2==a&&(c+=J.i18n.Resource.fix(h))}}catch(k){if(!H(k,Exception))throw k;}JU.Logger.info(d.size()+" translations loaded");
return 0==d.size()?null:new J.i18n.Resource(d,null)},"~S");b.fix=c(b,"fix",function(a){0<=a.indexOf('\\"')&&(a=JU.PT.rep(a,'\\"','"'));return JU.PT.rep(a.substring(a.indexOf('"')+1,a.lastIndexOf('"')),"\\n","\n")},"~S")});s("J.io");B(null,"J.io.FileReader","java.io.BufferedReader JU.AU $.PT $.Rdr J.api.Interface JU.Logger".split(" "),function(){var b=n(function(){this.htParams=this.readerOrDocument=this.atomSetCollection=this.fileTypeIn=this.nameAsGivenIn=this.fullPathNameIn=this.fileNameIn=this.vwr=
null;this.isAppend=!1;this.bytesOrStream=null;v(this,arguments)},J.io,"FileReader",null);A(b,function(a,d,b,c,e,f,h,k){this.vwr=a;this.fileNameIn=null==d?b:d;this.fullPathNameIn=null==b?this.fileNameIn:b;this.nameAsGivenIn=null==c?this.fileNameIn:c;this.fileTypeIn=e;null!=f&&(JU.AU.isAB(f)||y(f,"java.io.BufferedInputStream")?(this.bytesOrStream=f,f=null):y(f,"java.io.Reader")&&!y(f,"java.io.BufferedReader")&&(f=new java.io.BufferedReader(f)));this.readerOrDocument=f;this.htParams=h;this.isAppend=
k},"JV.Viewer,~S,~S,~S,~S,~O,java.util.Map,~B");c(b,"run",function(){!this.isAppend&&this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1);var a=null,d=null;this.fullPathNameIn.contains("#_DOCACHE_")&&(this.readerOrDocument=J.io.FileReader.getChangeableReader(this.vwr,this.nameAsGivenIn,this.fullPathNameIn));if(null==this.readerOrDocument){d=this.vwr.fm.getUnzippedReaderOrStreamFromName(this.fullPathNameIn,this.bytesOrStream,!0,!1,!1,!0,this.htParams);if(null==d||"string"==typeof d){a=null==d?"error opening:"+
this.nameAsGivenIn:d;a.startsWith("NOTE:")||JU.Logger.error("file ERROR: "+this.fullPathNameIn+"\n"+a);this.atomSetCollection=a;return}if(y(d,"java.io.BufferedReader"))this.readerOrDocument=d;else if(y(d,"javajs.api.ZInputStream")){var a=this.fullPathNameIn,b=null,a=a.$replace("\\","/");0<=a.indexOf("|")&&!a.endsWith(".zip")&&(b=JU.PT.split(a,"|"),a=b[0]);null!=b&&this.htParams.put("subFileList",b);b=d;d=this.vwr.fm.getZipDirectory(a,!0,!0);this.atomSetCollection=d=this.vwr.fm.getJzu().getAtomSetCollectionOrBufferedReaderFromZip(this.vwr,
b,a,d,this.htParams,1,!1);try{b.close()}catch(c){if(!H(c,Exception))throw c;}}}y(d,"java.io.BufferedInputStream")&&(this.readerOrDocument=J.api.Interface.getInterface("JU.BinaryDocument",this.vwr,"file").setStream(d,!this.htParams.containsKey("isLittleEndian")));if(null!=this.readerOrDocument){this.atomSetCollection=this.vwr.getModelAdapter().getAtomSetCollectionReader(this.fullPathNameIn,this.fileTypeIn,this.readerOrDocument,this.htParams);"string"!=typeof this.atomSetCollection&&(this.atomSetCollection=
this.vwr.getModelAdapter().getAtomSetCollection(this.atomSetCollection));try{y(this.readerOrDocument,"java.io.BufferedReader")?this.readerOrDocument.close():y(this.readerOrDocument,"javajs.api.GenericBinaryDocument")&&this.readerOrDocument.close()}catch(e){if(!H(e,"java.io.IOException"))throw e;}}"string"!=typeof this.atomSetCollection&&(!this.isAppend&&!this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1),this.vwr.fm.setFileInfo(x(-1,[this.fullPathNameIn,this.fileNameIn,this.nameAsGivenIn])))});b.getChangeableReader=
c(b,"getChangeableReader",function(a,d,b){return JU.Rdr.getBR(a.getLigandModel(d,b,"_file",null))},"JV.Viewer,~S,~S");c(b,"getAtomSetCollection",function(){return this.atomSetCollection})});s("J.render");B(["J.render.CageRenderer","JU.P3"],"J.render.AxesRenderer",["JV.JC"],function(){var b=n(function(){this.pt000=this.colixes=this.originScreen=null;this.modelIndex=0;this.isDataSpin=!1;this.ptTemp=null;v(this,arguments)},J.render,"AxesRenderer",J.render.CageRenderer);P(b,function(){this.originScreen=
new JU.P3;this.colixes=V(3,0);this.ptTemp=new JU.P3});j(b,"initRenderer",function(){this.endcap=2;this.draw000=!1});j(b,"render",function(){if(this.vwr.ms!==this.ms)return!1;var a=this.shape,d=this.vwr.getObjectMad10(1),b=0!=a.axisXY.z;if(0==d||!this.g3d.checkTranslucent(!1)||(b?1==this.exportType:this.tm.isNavigating()&&this.vwr.getBoolean(603979890)))return!1;this.modelIndex=this.vwr.am.cmi;var c=null;this.isDataSpin=!1;var e=603979808==this.vwr.g.axesMode;if(this.ms.isJmolDataFrame(this.modelIndex))switch(this.ms.getJmolFrameTypeInt(this.modelIndex)){case 1095241729:c=
this.ms.am[this.modelIndex];this.isDataSpin=null!=c.uvw;e=!0;break;case 134221834:break;default:return!1}var f=e?this.vwr.getCurrentUnitCell():null;if(!this.isDataSpin&&e&&(null==f||0>this.modelIndex))return!1;this.imageFontScaling=this.vwr.imageFontScaling;!this.isDataSpin&&this.vwr.areAxesTainted()&&a.reinitShape();this.font3d=this.vwr.gdata.getFont3DScaled(a.font3d,this.imageFontScaling);var h=(e=e&&null!=f)?a.axisType:null,k=b&&e&&null!=a.axes2;this.isPolymer=e&&f.isPolymer();this.isSlab=e&&f.isSlab();
this.nDims=e?f.getDimensionality():3;this.periodicity=e?f.getPeriodicity():7;this.setShifts();f=a.scale;k?("xyzabc".equals(a.axes2)&&this.render1(a,d,!1,h,e,2,null,null),"abc".equals(a.axes2)||this.vwr.setBooleanProperty("axesmolecular",!0),a.reinitShape(),this.render1(a,d,!0,null,!1,f,a.axes2,null),this.vwr.setBooleanProperty("axesunitcell",!0)):this.isDataSpin?(this.pt0.set(0,0,0),this.render1(null,25E3,!1,null,!0,1,null,c.uvw)):this.render1(a,d,b,h,e,f,null,null);return!0});c(b,"render1",function(a,
d,b,c,e,f,h,k){var m=this.vwr.isJmolDataFrame();this.pt000=m?this.pt0:a.originPoint;var j=6,p=0;e?(j=3,p=this.isDataSpin?21:6):b?(j=3,p=9):603979809==this.vwr.g.axesMode&&(j=6,p=this.vwr.getBoolean(603979806)?15:9);null!=a&&null!=a.labels&&(3!=j&&(j=6>a.labels.length?3:6),p=-1);var q=this.vwr.gdata.slab,r=d,u=!1;this.ptTemp.setT(this.originScreen);var C=null==h&&null!=c&&(b||0!=this.vwr.getFloat(570425345)||null!=a.fixedOrigin);if(b){20<=d&&(r=500<d?3:w(d/200),0==r&&(r=2));this.g3d.isAntialiased()&&
(r+=r);this.g3d.setSlab(0);this.ptTemp.setT(a.axisXY);this.pt0i.setT(this.tm.transformPt2D(this.ptTemp));if(0>this.ptTemp.x){k=D(this.ptTemp.x);var G=D(this.ptTemp.x);this.pointT.setT(this.pt000);for(d=0;3>d;d++)this.pointT.add(a.getAxisPoint(d,!1,this.ptTemp));this.pt0i.setT(this.tm.transformPt(this.pt000));this.pt2i.scaleAdd(-1,this.pt0i,this.tm.transformPt(this.pointT));0>this.pt2i.x&&(k=-k);0>this.pt2i.y&&(G=-G);this.pt0i.x+=k;this.pt0i.y+=G}this.ptTemp.set(this.pt0i.x,this.pt0i.y,this.pt0i.z);
k=this.vwr.getScreenDim()/10*f;this.g3d.isAntialiased()&&(k*=2);if((e||"abc".equals(a.axes2))&&b)k/=2;for(d=0;3>d;d++)G=this.p3Screens[d],this.tm.rotatePoint(a.getAxisPoint(d,!1,this.pointT),G),G.z*=-1,G.scaleAdd2(k,G,this.ptTemp)}else{if(u=null!=a&&null!=a.tickInfos)this.checkTickTemps(),this.tickA.setT(this.pt000);this.tm.transformPtNoClip(this.pt000,this.ptTemp);r=this.getDiameter(D(this.ptTemp.z),d);for(d=j;0<=--d;){var n=null==k?a.getAxisPoint(d,!m,this.pointT):k[d];this.tm.transformPtNoClip(n,
this.p3Screens[d])}this.shifting&&(null==this.vvert&&(this.vvert=x(-1,[new JU.P3,new JU.P3,new JU.P3,new JU.P3,new JU.P3,new JU.P3])),this.shiftA&&this.setVVert(a,0),this.shiftB&&this.setVVert(a,1),this.shiftC&&this.setVVert(a,2))}k=this.ptTemp.x;G=this.ptTemp.y;this.colixes[0]=this.vwr.getObjectColix(1);this.colixes[1]=this.vwr.getObjectColix(2);this.colixes[2]=this.vwr.getObjectColix(3);f=3==this.nDims&&!b&&3==j&&(2==f||e&&!this.isDataSpin);2==this.nDims&&(j=2);for(d=j;0<=--d;)if(!(null!=h&&d>=
h.length||C&&!c.contains(JV.JC.axesTypes[d])||1!=this.exportType&&2>=Math.abs(k-this.p3Screens[d].x)+Math.abs(G-this.p3Screens[d].y)&&!(f=!1))){this.colix=this.colixes[d%3];this.g3d.setC(this.colix);j=null!=h?h.substring(d,d+1):null==a||null==a.labels?JV.JC.axisLabels[d+p]:d<a.labels.length?a.labels[d]:null;null!=j&&0<j.length&&(n=0==d&&this.shiftA?this.vvert[1]:1==d&&this.shiftB?this.vvert[3]:2==d&&this.shiftC?this.vvert[5]:this.p3Screens[d],this.renderLabel(j,n.x,n.y,n.z,k,G));u&&(this.tickInfo=
a.tickInfos[d%3+1],null==this.tickInfo&&(this.tickInfo=a.tickInfos[0]),null!=this.tickInfo&&(this.tickB.setT(a.getAxisPoint(d,m||e,this.pointT)),this.tickInfo.first=0,this.tickInfo.signFactor=3<=d%6?-1:1));var j=this.isSlab&&2==d||this.isPolymer&&0<d?-4:r,n=this.ptTemp,s=this.p3Screens[d];2==d&&this.shiftC?(n=this.vvert[4],s=this.vvert[5]):1==d&&this.shiftB?(n=this.vvert[2],s=this.vvert[3]):0==d&&this.shiftA&&(n=this.vvert[0],s=this.vvert[1]);this.renderLine(n,s,j,u&&null!=this.tickInfo)}f&&(a=null==
a.labels||3==a.labels.length||null==a.labels[3]?"0":a.labels[3],null!=a&&0!=a.length&&(this.colix=this.vwr.cm.colixBackgroundContrast,this.g3d.setC(this.colix),this.renderLabel(a,k,G,this.ptTemp.z,k,G)));b&&this.g3d.setSlab(q)},"J.shape.Axes,~N,~B,~S,~B,~N,~S,~A");c(b,"setVVert",function(a,d){var b=2*d;this.vvert[b].setT(a.originPoint);a.getAxisPoint(d,!1,this.pt);this.vvert[b].sub(this.pt);this.pt.add(a.originPoint);this.tm.transformPtNoClip(this.vvert[b],this.vvert[b]);this.tm.transformPtNoClip(this.pt,
this.vvert[b+1])},"J.shape.Axes,~N");c(b,"renderLabel",function(a,d,b,c,e,f){var h=this.font3d.getAscent(),k=this.font3d.stringWidth(a);e=d-e;f=b-f;if(0!=e||0!=f){var m=Math.sqrt(e*e+f*f);d+=0.75*k*e/m;b+=0.75*h*f/m}b=Math.floor(b+h/2);this.g3d.drawString(a,this.font3d,w(Math.floor(d-k/2)),w(b),D(c),D(c),0)},"~S,~N,~N,~N,~N,~N")});s("J.render");B(["J.render.ShapeRenderer"],"J.render.BallsRenderer",["J.shape.Shape"],function(){var b=I(J.render,"BallsRenderer",J.render.ShapeRenderer);j(b,"render",function(){var a=
!1;if(this.isExport||this.vwr.checkMotionRendering(1153433601))for(var d=this.ms.at,b=this.shape.colixes,c=this.vwr.shm.bsRenderableAtoms,e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1)){var f=d[e];0<f.sD&&0!=(f.shapeVisibilityFlags&this.myVisibilityFlag)&&(this.g3d.setC(null==b?f.colixAtom:J.shape.Shape.getColix(b,e,f))?this.g3d.drawAtom(f,0):a=!0)}return a})});s("J.render");B(["J.render.FontLineShapeRenderer","JU.P3"],"J.render.CageRenderer",["JU.BS","$.Measure","JU.BoxInfo"],function(){var b=n(function(){this.tickEdges=
this.p3Screens=null;this.isPolymer=this.isSlab=!1;this.periodicity=7;this.nDims=3;this.vvert=this.pt=this.bsPeriod=null;this.shifting=this.shiftC=this.shiftB=this.shiftA=!1;v(this,arguments)},J.render,"CageRenderer",J.render.FontLineShapeRenderer);P(b,function(){this.p3Screens=Array(8);for(var a=8;0<=--a;)this.p3Screens[a]=new JU.P3;this.pt=new JU.P3});c(b,"setPeriodicity",function(){},"~A,~N");c(b,"renderCage",function(a,d,b,c,e,f,h,k){this.g3d.setC(this.colix);var m=this.shape,j=null!=b;this.imageFontScaling=
this.vwr.imageFontScaling;this.font3d=this.vwr.gdata.getFont3DScaled(m.font3d,this.imageFontScaling);for(var p=0,q=8;0<=--q;)this.pt.setT(d[q]),1!=k&&(this.pt.sub(d[0]),this.pt.scaleAdd2(k,this.pt,d[0])),this.tm.transformPtNoClip(this.pt,this.p3Screens[q]),p+=this.p3Screens[q].z;this.setPeriodicity(d,k);k=null;if(j){k=new JU.BS;for(q=12;0<=--q;){var r=b[q];JU.Measure.getNormalThroughPoints(this.p3Screens[r[0]],this.p3Screens[r[1]],this.p3Screens[r[2]],this.pt1,this.pt);0>=this.pt1.z&&(k.set(r[0]),
k.set(r[1]),k.set(r[2]))}}a=this.getDiameter(w(Math.floor(p/8)),a);b=2;p=String.fromCharCode(0);f&=this.isPolymer?1:this.isSlab?85:255;h&=this.isPolymer?16:this.isSlab?85:255;this.setBSPeriod();for(q=2*e;24>q;q+=2)if(null==this.bsPeriod||this.bsPeriod.get(q)){e=a;var r=JU.BoxInfo.edges[q],u=JU.BoxInfo.edges[q+1];if(j&&(!k.get(r)||!k.get(u)))e=-Math.abs(a);null!=c&&0==r&&this.tm.transformPtNoClip(c[b--],this.p3Screens[0]);if(!(0==(f&1<<r)||0==(h&1<<u))){var C=null!=m.tickInfos&&0!=(p=this.tickEdges[q>>
1]).charCodeAt(0);if(C){this.checkTickTemps();this.tickA.setT(d[r]);this.tickB.setT(d[u]);var n=0;if(y(this.shape,"J.shape.Bbcage"))switch(p.charCodeAt(0)){case 120:n=this.tickA.x;break;case 121:n=this.tickA.y;break;case 122:n=this.tickA.z}this.tickInfo=m.tickInfos["xyz".indexOf(p)+1];null==this.tickInfo&&(this.tickInfo=m.tickInfos[0]);null==this.tickInfo?C=!1:this.tickInfo.first=n}this.renderCageLine(q,r,u,e,C)}}},"~N,~A,~A,~A,~N,~N,~N,~N");c(b,"renderCageLine",function(a,d,b,c,e){this.renderLine(this.p3Screens[d],
this.p3Screens[b],c,e)},"~N,~N,~N,~N,~B");c(b,"setBSPeriod",function(){});c(b,"setShifts",function(){this.shiftA=0==(this.periodicity&1);this.shiftB=0==(this.periodicity&2);this.shiftC=0==(this.periodicity&4);this.shifting=this.shiftA||this.shiftB||this.shiftC})});s("J.render");B(["J.render.ShapeRenderer","JU.P3","$.P3i","$.V3"],"J.render.FontLineShapeRenderer",["JU.PT"],function(){var b=n(function(){this.colixB=this.colixA=0;this.dotsOrDashes=!1;this.dashDots=null;this.asLineOnly=!1;this.imageFontScaling=
0;this.tickInfo=this.vectorT3=this.vectorT2=this.vectorT=this.pointT3=this.pointT2=this.pointT=this.s2=this.s1=this.pt2i=this.pt0i=this.font3d=this.tickBs=this.tickAs=this.tickB=this.tickA=null;this.draw000=!0;this.width=0;this.endcap=3;this.pt1=this.pt0=null;v(this,arguments)},J.render,"FontLineShapeRenderer",J.render.ShapeRenderer);P(b,function(){this.pt0i=new JU.P3i;this.pt2i=new JU.P3i;this.s1=new JU.P3i;this.s2=new JU.P3i;this.pointT=new JU.P3;this.pointT2=new JU.P3;this.pointT3=new JU.P3;this.vectorT=
new JU.V3;this.vectorT2=new JU.V3;this.vectorT3=new JU.V3;this.pt0=new JU.P3;this.pt1=new JU.P3});c(b,"getDiameter",function(a,d){var b;b=20<d;switch(this.exportType){case 1:b=b?d:w(Math.floor(1E3*this.vwr.tm.unscaleToScreen(a,2*d/10)));break;default:b?b=D(this.vwr.tm.scaleToScreen(a,w(d/10))):(this.g3d.isAntialiased()&&(d+=d),b=d)}return b},"~N,~N");c(b,"renderLine",function(a,d,b,c){0>b?this.g3d.drawDashedLineBits(8,4,a,d):this.g3d.fillCylinderBits(this.endcap,1==this.exportType?-b:b,a,d);c&&null!=
this.tickInfo&&(this.checkTickTemps(),this.tickAs.setT(a),this.tickBs.setT(d),this.drawTicks(b,!0))},"JU.P3,JU.P3,~N,~B");c(b,"checkTickTemps",function(){null==this.tickA&&(this.tickA=new JU.P3,this.tickB=new JU.P3,this.tickAs=new JU.P3,this.tickBs=new JU.P3)});c(b,"drawTicks",function(a,d){Float.isNaN(this.tickInfo.first)&&(this.tickInfo.first=0);this.drawTicks2(this.tickInfo.ticks.x,8,a,!d?null:null==this.tickInfo.tickLabelFormats?x(-1,["%0.2f"]):this.tickInfo.tickLabelFormats);this.drawTicks2(this.tickInfo.ticks.y,
4,a,null);this.drawTicks2(this.tickInfo.ticks.z,2,a,null)},"~N,~B");c(b,"drawTicks2",function(a,d,b,c){if(0!=a&&(this.g3d.isAntialiased()&&(d*=2),this.vectorT2.set(this.tickBs.x,this.tickBs.y,0),this.vectorT.set(this.tickAs.x,this.tickAs.y,0),this.vectorT2.sub(this.vectorT),!(50>this.vectorT2.length()))){var e=this.tickInfo.signFactor;this.vectorT.sub2(this.tickB,this.tickA);var f=this.vectorT.length();if(null!=this.tickInfo.scale)if(Float.isNaN(this.tickInfo.scale.x)){var h=this.vwr.getUnitCellInfo(0);
Float.isNaN(h)||this.vectorT.set(this.vectorT.x/h,this.vectorT.y/this.vwr.getUnitCellInfo(1),this.vectorT.z/this.vwr.getUnitCellInfo(2))}else this.vectorT.set(this.vectorT.x*this.tickInfo.scale.x,this.vectorT.y*this.tickInfo.scale.y,this.vectorT.z*this.tickInfo.scale.z);h=this.vectorT.length()+1E-4*a;if(!(h<a)){this.vectorT.scale(a/h*f/h);var f=(this.tickBs.z-this.tickAs.z)/(h/a),h=h+this.tickInfo.first,k=w(Math.floor(this.tickInfo.first/a))*a-this.tickInfo.first;this.pointT.scaleAdd2(k/a,this.vectorT,
this.tickA);var k=k+this.tickInfo.first,m=this.tickAs.z;0>b&&(b=1);this.vectorT2.set(-this.vectorT2.y,this.vectorT2.x,0);this.vectorT2.scale(d/this.vectorT2.length());d=this.tickInfo.reference;null==d?(this.pointT3.setT(this.vwr.getBoundBoxCenter()),603979809==this.vwr.g.axesMode&&this.pointT3.add3(1,1,1)):this.pointT3.setT(d);this.tm.transformPtScr(this.pointT3,this.pt2i);d=0.2>Math.abs(this.vectorT2.x/this.vectorT2.y);for(var j=!d,p=!d&&0>this.vectorT2.x,q=null!=c&&0<c.length,r,u,C=Array(1),n=this.draw000?
0:-1;k<h;){if(k>=this.tickInfo.first&&(this.pointT2.setT(this.pointT),this.tm.transformPt3f(this.pointT2,this.pointT2),this.drawLine(w(Math.floor(this.pointT2.x)),w(Math.floor(this.pointT2.y)),D(m),r=w(Math.floor(this.pointT2.x+this.vectorT2.x)),u=w(Math.floor(this.pointT2.y+this.vectorT2.y)),D(m),b),q&&(this.draw000||0!=k))){C[0]=Float.$valueOf(0==k?0:k*e);var s=JU.PT.sprintf(c[n%c.length],"f",C);this.drawString(r,u,D(m),4,p,d,j,w(Math.floor(this.pointT2.y)),s)}this.pointT.add(this.vectorT);k+=a;
m+=f;n++}}}},"~N,~N,~N,~A");c(b,"drawLine",function(a,d,b,c,e,f,h){return this.drawLine2(this.g3d,a,d,b,c,e,f,h)},"~N,~N,~N,~N,~N,~N,~N");c(b,"drawLine2",function(a,d,b,c,e,f,h,k){this.pt0.set(d,b,c);this.pt1.set(e,f,h);if(this.dotsOrDashes)null!=this.dashDots&&J.render.FontLineShapeRenderer.drawDashedCylinder(a,d,b,c,e,f,h,this.dashDots,this.width,this.colixA,this.colixB,!this.isExport||1==this.mad?this.width:this.mad,this.asLineOnly,this.s1);else{if(0>k)return a.drawDashedLineBits(8,4,this.pt0,
this.pt1),1;a.fillCylinderBits(2,k,this.pt0,this.pt1)}return w((k+1)/2)},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N");c(b,"drawString",function(a,d,b,c,e,f,h,k,m){if(null!=m){var j=this.font3d.stringWidth(m),p=this.font3d.getAscent();a=e?a-(w(c/2)+2+j):f?a-(w(c/2)+2+w(j/2)):a+(w(c/2)+2);e=d;e=h?e+w(p/2):0==k||k<d?e+p:e-w(c/2);d=b-c-2;1>d&&(d=1);this.g3d.drawString(m,this.font3d,a,e,d,d,0)}},"~N,~N,~N,~N,~B,~B,~B,~N,~S");b.drawDashedCylinder=c(b,"drawDashedCylinder",function(a,d,b,c,e,f,h,k,
m,j,p,q,r,u){if(!(null==k||0>m)){var C=k[0];e-=d;f-=b;h-=c;var n=0,s=k===J.render.FontLineShapeRenderer.ndots,v=s||k===J.render.FontLineShapeRenderer.sixdots;if(v){null==u&&(u=new JU.P3i);var x=(e*e+f*f)/(m*m);s?(C=Math.sqrt(x)/1.5,n=D(C)+2):8>x?k=J.render.FontLineShapeRenderer.twodots:32>x&&(k=J.render.FontLineShapeRenderer.fourdots)}var x=k[1],y=k[2],z=j,A=0==y?p:j;0==n&&(n=k.length);for(var B=0,F=3;F<n;F++){var B=s?B+1:k[F],H=w(Math.floor(d+e*B/C)),I=w(Math.floor(b+f*B/C)),K=w(Math.floor(c+h*B/
C));if(v)u.set(H,I,K),F==x?a.setC(j):F==y&&a.setC(p),a.fillSphereI(m,u);else{F==x&&(z=p);B=k[++F];F==y&&(A=p);var L=w(Math.floor(d+e*B/C)),M=w(Math.floor(b+f*B/C)),O=w(Math.floor(c+h*B/C));J.render.FontLineShapeRenderer.fillCylinder(a,z,A,2,H,I,K,L,M,O,q,r)}}}},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~A,~N,~N,~N,~N,~B,JU.P3i");b.fillCylinder=c(b,"fillCylinder",function(a,d,b,c,e,f,h,k,m,j,p,q){q?a.drawLine(d,b,e,f,h,k,m,j):a.fillCylinderXYZ(d,b,c,p,e,f,h,k,m,j)},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");
b.dashes=F(-1,[12,0,0,2,5,7,10]);b.hDashes=F(-1,[10,7,6,1,3,4,6,7,9]);b.pymoldashes=F(-1,[30,0,0,2,4,7,9,12,14,17,19,22,24,27,30]);b.ndots=F(-1,[0,3,1E3]);b.sixdots=F(-1,[12,3,6,1,3,5,7,9,11]);b.fourdots=F(-1,[13,3,5,2,5,8,11]);b.twodots=F(-1,[12,3,4,3,9])});s("J.render");B(["J.render.ShapeRenderer"],"J.render.FrankRenderer",["J.shape.Frank","JV.Viewer"],function(){var b=I(J.render,"FrankRenderer",J.render.ShapeRenderer);j(b,"render",function(){if(this.isExport||!this.vwr.getShowFrank()||!this.g3d.setC(this.colix)||
this.vwr.frankOn&&!this.vwr.noFrankEcho||0==this.vwr.tm.splitFrameCurrentlyRendering)return!1;var a=this.shape,d=this.vwr.getBooleanProperty("allowKeyStrokes"),b=this.vwr.getBoolean(603983903);this.colix=b&&!this.vwr.getModelkit(!1).isHidden()?20:this.vwr.isSignedApplet?d||(JV.Viewer.isJS||JV.Viewer.isSwingJS)&&!this.vwr.isWebGL?5:10:d?7:12;this.colix==this.vwr.getObjectColix(0)&&(this.colix=4);this.vwr.noFrankEcho=!0;d=this.vwr.imageFontScaling;a.getFont(d);d=D(a.frankWidth+4*d);this.g3d.drawStringNoSlab(J.shape.Frank.frankString,
a.font3d,this.vwr.gdata.width-d,this.vwr.gdata.height-a.frankDescent,0,0);a=b?this.vwr.getModelkit(!1):null;b&&!a.isHidden()&&(this.g3d.setC(12),this.g3d.fillTextRect(0,0,1,0,10,104),b=a.getActiveMenu(),null!=b&&("atomMenu".equals(b)?(this.g3d.setC(21),this.g3d.fillTextRect(0,0,0,0,10,26)):"bondMenu".equals(b)?(this.g3d.setC(7),this.g3d.fillTextRect(0,26,0,0,10,26)):"xtalMenu".equals(b)&&(this.g3d.setC(8),this.g3d.fillTextRect(0,52,0,0,10,26))));return!1})});s("J.render");B(["J.api.JmolRepaintManager",
"JU.BS"],"J.render.RepaintManager",["J.api.Interface","JU.Logger","JV.JC","$.Viewer"],function(){var b=n(function(){this.bsTranslucent=this.renderers=this.shapeManager=this.vwr=null;this.holdRepaint=0;this.repaintPending=!1;v(this,arguments)},J.render,"RepaintManager",null,J.api.JmolRepaintManager);P(b,function(){this.bsTranslucent=JU.BS.newN(37)});A(b,function(){});j(b,"set",function(a,d){this.vwr=a;this.shapeManager=d},"JV.Viewer,JV.ShapeManager");j(b,"isRepaintPending",function(){return this.repaintPending});
j(b,"pushHoldRepaint",function(){++this.holdRepaint},"~S");j(b,"popHoldRepaint",function(a,d){null!=d&&d.startsWith("CLEAR HOLD")&&(this.holdRepaint=0);--this.holdRepaint;0>=this.holdRepaint&&(this.holdRepaint=0,a&&(this.repaintPending=!0,this.repaintNow(d)))},"~B,~S");j(b,"requestRepaintAndWait",function(a){var d=null;JV.Viewer.isJS&&!JV.Viewer.isSwingJS&&(d=self.Jmol&&Jmol.repaint?Jmol:null);if(null==d)try{this.repaintNow(a),JV.Viewer.isJS||this.wait(this.vwr.g.repaintWaitMs),this.repaintPending&&
(JU.Logger.error("repaintManager requestRepaintAndWait timeout"),this.repaintDone())}catch(b){if(H(b,"InterruptedException"))System.out.println("repaintManager requestRepaintAndWait interrupted thread="+Thread.currentThread().getName());else throw b;}else d.repaint(this.vwr.html5Applet,!1),this.repaintDone()},"~S");j(b,"repaintIfReady",function(a){if(this.repaintPending)return!1;this.repaintPending=!0;0==this.holdRepaint&&this.repaintNow(a);return!0},"~S");c(b,"repaintNow",function(){this.vwr.haveDisplay&&
this.vwr.apiPlatform.repaint(this.vwr.display)},"~S");j(b,"repaintDone",function(){this.repaintPending=!1});j(b,"clear",function(a){if(null!=this.renderers)if(0<=a)this.renderers[a]=null;else for(a=0;37>a;++a)this.renderers[a]=null},"~N");c(b,"getRenderer",function(a){if(null!=this.renderers[a])return this.renderers[a];var d=JV.JC.getShapeClassName(a,!0)+"Renderer";if(null==(d=J.api.Interface.getInterface(d,this.vwr,"render")))return null;d.setViewerG3dShapeID(this.vwr,a);return this.renderers[a]=
d},"~N");j(b,"render",function(a,d,b,c){null==this.renderers&&(this.renderers=Array(37));this.getAllRenderers();try{var e=this.vwr.getBoolean(603979934);a.renderBackground(null);if(b){this.bsTranslucent.clearAll();null!=c&&a.renderCrossHairs(c,this.vwr.getScreenWidth(),this.vwr.getScreenHeight(),this.vwr.tm.getNavigationOffset(),this.vwr.tm.navigationDepthPercent);var f=this.vwr.getRubberBandSelection();null!=f&&a.setC(this.vwr.cm.colixRubberband)&&a.drawRect(f.x,f.y,0,0,f.width,f.height);this.vwr.noFrankEcho=
!0}c=null;var h=this.shapeManager.getShape(1);h.haveStrutPoints=!1;for(f=0;37>f&&a.currentlyRendering;++f){var k=this.shapeManager.getShape(f);null!=k&&(e&&(c="rendering "+JV.JC.getShapeClassName(f,!1),JU.Logger.startTimer(c)),(b||this.bsTranslucent.get(f))&&this.getRenderer(f).renderShape(a,d,k,0)&&this.bsTranslucent.set(f),e&&JU.Logger.checkTimer(c,!1))}h.haveStrutPoints&&this.getRenderer(1).renderShape(a,d,h,1);a.renderAllStrings(null)}catch(m){if(H(m,Exception)){m.printStackTrace();if(this.vwr.async&&
"Interface".equals(m.getMessage()))throw new NullPointerException;JU.Logger.error("rendering error? "+m)}else throw m;}},"JU.GData,JM.ModelSet,~B,~A");c(b,"getAllRenderers",function(){for(var a=!0,d=0;37>d;++d)null==this.shapeManager.getShape(d)||null!=this.getRenderer(d)||(a=this.repaintPending=!this.vwr.async);if(!a)throw new NullPointerException;});j(b,"renderExport",function(a,d,b){this.shapeManager.finalizeAtoms(null,!0);a=this.vwr.initializeExporter(b);if(null==a)return JU.Logger.error("Cannot export "+
b.get("type")),null;null==this.renderers&&(this.renderers=Array(37));this.getAllRenderers();b=null;try{var c=this.vwr.getBoolean(603979934);a.renderBackground(a);var e=this.shapeManager.getShape(1);e.haveStrutPoints=!1;for(var f=0;37>f;++f){var h=this.shapeManager.getShape(f);null!=h&&(c&&(b="rendering "+JV.JC.getShapeClassName(f,!1),JU.Logger.startTimer(b)),this.getRenderer(f).renderShape(a,d,h,0),c&&JU.Logger.checkTimer(b,!1))}e.haveStrutPoints&&this.getRenderer(1).renderShape(a,d,e,1);a.renderAllStrings(a);
b=a.finalizeOutput()}catch(k){if(H(k,Exception))k.printStackTrace(),JU.Logger.error("rendering error? "+k);else throw k;}return b},"JU.GData,JM.ModelSet,java.util.Map")});s("J.render");B(null,"J.render.ShapeRenderer",["JV.JC"],function(){var b=n(function(){this.shape=this.ms=this.g3d=this.tm=this.vwr=null;this.exportType=this.mad=this.colix=this.shapeID=this.myVisibilityFlag=0;this.isExport=!1;this.flags=0;v(this,arguments)},J.render,"ShapeRenderer",null);c(b,"initRenderer",function(){});c(b,"setViewerG3dShapeID",
function(a,d){this.vwr=a;this.tm=a.tm;this.shapeID=d;this.myVisibilityFlag=JV.JC.getShapeVisibilityFlag(d);this.initRenderer()},"JV.Viewer,~N");c(b,"renderShape",function(a,d,b,c){this.setup(a,d,b);this.flags=c;a=this.render();this.exportType=0;this.isExport=!1;return a},"J.api.JmolRendererInterface,JM.ModelSet,J.shape.Shape,~N");c(b,"setup",function(a,d,b){this.g3d=a;this.ms=d;this.shape=b;this.exportType=a.getExportType();this.isExport=0!=this.exportType},"J.api.JmolRendererInterface,JM.ModelSet,J.shape.Shape");
c(b,"isVisibleForMe",function(a){return null!=a&&a.isVisible(this.myVisibilityFlag|9)},"JM.Atom")});s("J.render");B(["J.render.FontLineShapeRenderer","JU.BS","$.P3","$.V3"],"J.render.SticksRenderer",["JU.A4","$.M3","J.c.PAL","JU.C","$.Edge"],function(){var b=n(function(){this.showMultipleBonds=!1;this.multipleBondRadiusFactor=this.multipleBondSpacing=0;this.useBananas=this.bondsPerp=!1;this.modeMultipleBond=0;this.isCartesian=!1;this.endcaps=0;this.hbondsSolid=this.bondsBackbone=this.hbondsBackbone=
this.ssbondsBackbone=!1;this.bond=this.pb=this.pa=this.b=this.a=null;this.bondOrder=this.mag2d=this.dy=this.dx=this.zB=this.yB=this.xB=this.zA=this.yA=this.xA=0;this.slabByAtom=this.slabbing=this.isAntialiased=this.wireframeOnly=!1;this.bsForPass2=this.p2=this.p1=this.z=this.y=this.x=null;this.strutsOnly=this.isPymol=this.isPass2=!1;this.dyStep=this.dxStep=this.yAxis2=this.xAxis2=this.yAxis1=this.xAxis1=0;this.a4=this.rot=null;v(this,arguments)},J.render,"SticksRenderer",J.render.FontLineShapeRenderer);
P(b,function(){this.x=new JU.V3;this.y=new JU.V3;this.z=new JU.V3;this.p1=new JU.P3;this.p2=new JU.P3;this.bsForPass2=JU.BS.newN(64)});j(b,"render",function(){var a=this.ms.bo;if(null==a)return!1;(this.isPass2=this.vwr.gdata.isPass2)||this.bsForPass2.clearAll();this.slabbing=this.tm.slabEnabled;this.slabByAtom=this.vwr.getBoolean(603979939);this.endcaps=3;this.dashDots=this.vwr.getBoolean(603979893)?J.render.FontLineShapeRenderer.sixdots:J.render.FontLineShapeRenderer.dashes;this.isCartesian=1==this.exportType;
this.getMultipleBondSettings(0);this.wireframeOnly=!this.vwr.checkMotionRendering(1677721602);this.ssbondsBackbone=this.vwr.getBoolean(603979952);this.hbondsBackbone=this.vwr.getBoolean(603979852);this.bondsBackbone=(new Boolean(this.hbondsBackbone|this.ssbondsBackbone)).valueOf();this.hbondsSolid=this.vwr.getBoolean(603979854);this.isAntialiased=this.g3d.isAntialiased();this.strutsOnly=0!=(this.flags&1);var d=!1;if(this.isPass2)for(var b=this.bsForPass2.nextSetBit(0);0<=b;b=this.bsForPass2.nextSetBit(b+
1))this.bond=a[b],null!=this.bond&&this.renderBond(b);else for(b=this.ms.bondCount;0<=--b;)this.bond=a[b],null!=this.bond&&(0!=(this.bond.shapeVisibilityFlags&this.myVisibilityFlag)&&this.renderBond(b))&&(d=!0,this.bsForPass2.set(b));return d});c(b,"renderBond",function(){var a,d;this.a=a=this.bond.atom1;this.b=d=this.bond.atom2;var b=this.bond.order&131071;this.bondsBackbone&&(this.ssbondsBackbone&&0!=(b&256)?(this.a=this.a.group.getLeadAtomOr(this.a),this.b=this.b.group.getLeadAtomOr(this.b)):this.hbondsBackbone&&
JU.Edge.isOrderH(b)&&(this.a=this.a.group.getLeadAtomOr(this.a),this.b=this.b.group.getLeadAtomOr(this.b)));if(!this.isPass2&&(!this.a.isVisible(9)||!this.b.isVisible(9)||!this.g3d.isInDisplayRange(this.a.sX,this.a.sY)||!this.g3d.isInDisplayRange(this.b.sX,this.b.sY)))return!1;if(this.slabbing){var c=this.vwr.gdata.isClippedZ(this.a.sZ);if(c&&this.vwr.gdata.isClippedZ(this.b.sZ)||this.slabByAtom&&(c||this.vwr.gdata.isClippedZ(this.b.sZ)))return!1}this.zA=this.a.sZ;this.zB=this.b.sZ;if(1==this.zA||
1==this.zB)return!1;this.colixA=a.colixAtom;this.colixB=d.colixAtom;2==((this.colix=this.bond.colix)&-30721)?(this.colix&=30720,this.colixA=JU.C.getColixInherited(this.colix|this.vwr.cm.getColixAtomPalette(a,J.c.PAL.CPK.id),this.colixA),this.colixB=JU.C.getColixInherited(this.colix|this.vwr.cm.getColixAtomPalette(d,J.c.PAL.CPK.id),this.colixB)):(this.colixA=JU.C.getColixInherited(this.colix,this.colixA),this.colixB=JU.C.getColixInherited(this.colix,this.colixB));d=a=!1;this.bondOrder=b&131071;c=32768==
this.bondOrder;this.strutsOnly!=c&&(c&&(this.shape.haveStrutPoints=!0,this.isPass2||(this.a.group.unsetStrutPoint(),this.b.group.unsetStrutPoint())),d=!0);if(!this.isExport&&!this.isPass2){var e=!JU.C.renderPass2(this.colixA),f=!JU.C.renderPass2(this.colixB);if(!e||!f){if(c||!e&&!f)d=!0;this.g3d.setC(!e?this.colixB:this.colixA);a=!0}}if(d)return a;e=this.bond.isPartial();if(!e&&(0!=(this.bondOrder&256)&&(this.bondOrder&=-257),0!=(this.bondOrder&1023)&&(!this.showMultipleBonds||2==this.modeMultipleBond&&
1E3<this.mad||65536==(this.bondOrder&98304))))this.bondOrder=1;this.pa=this.a;this.pb=this.b;d=0;switch(this.bondOrder){case 1025:case 1041:case 1057:this.bondOrder=1;case 1:case 2:case 3:case 4:case 5:case 6:break;case 17:case 513:this.bondOrder=1;d=513==b?0:1;break;case 515:case 514:this.bondOrder=2;d=515==b?this.getAromaticDottedBondMask():0;break;default:98304==(this.bondOrder&98304)?(this.getMultipleBondSettings(this.bondOrder),this.bondOrder&=3,d=-2):e?(this.bondOrder=JU.Edge.getPartialBondOrder(b),
d=JU.Edge.getPartialBondDotted(b)):JU.Edge.isOrderH(this.bondOrder)?(this.bondOrder=1,this.hbondsSolid||(d=-1)):c&&(this.bondOrder=1,b=this.b.group.strutPoint,this.pa=this.setStrutPoint(this.a.group.strutPoint,this.pa),this.pb=this.setStrutPoint(b,this.pb),this.zA=this.pa.sZ,this.zB=this.pb.sZ)}this.xA=this.pa.sX;this.yA=this.pa.sY;this.xB=this.pb.sX;this.yB=this.pb.sY;this.mad=this.bond.mad;0<this.multipleBondRadiusFactor&&1<this.bondOrder&&(this.mad*=this.multipleBondRadiusFactor);this.dx=this.xB-
this.xA;this.dy=this.yB-this.yA;this.width=D(this.vwr.tm.scaleToScreen(w((this.zA+this.zB)/2),this.mad));this.wireframeOnly&&0<this.width&&(this.width=1);if(!this.isCartesian&&(this.asLineOnly=1>=this.width)&&this.isAntialiased)this.width=3,this.asLineOnly=!1;b=!this.isExport||1==this.mad?this.width:this.mad;switch(d){case -2:this.drawBond(0);this.getMultipleBondSettings(0);break;case -1:J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,J.render.FontLineShapeRenderer.hDashes,
this.width,this.colixA,this.colixB,b,this.asLineOnly,this.s1);break;default:switch(this.bondOrder){case 4:this.bondOrder=2;b=this.multipleBondRadiusFactor;0==b&&1<this.width&&(this.width=w(0.5*this.width));b=this.multipleBondSpacing;0>b&&(this.multipleBondSpacing=0.3);this.drawBond(d);this.bondsPerp=!this.bondsPerp;this.bondOrder=2;this.drawBond(d>>2);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=b;this.isPymol=!1;break;case 5:this.bondOrder=3;b=this.multipleBondRadiusFactor;0==b&&1<this.width&&
(this.width=w(0.5*this.width));b=this.multipleBondSpacing;0>b&&(this.multipleBondSpacing=0.2);this.drawBond(d);this.bondsPerp=!this.bondsPerp;this.bondOrder=2;this.multipleBondSpacing*=1.5;this.drawBond(d>>3);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=b;this.isPymol=!1;break;case 6:this.bondOrder=4;b=this.multipleBondRadiusFactor;0==b&&1<this.width&&(this.width=w(0.5*this.width));b=this.multipleBondSpacing;0>b&&(this.multipleBondSpacing=0.15);this.drawBond(d);this.bondsPerp=!this.bondsPerp;
this.bondOrder=2;this.multipleBondSpacing*=1.5;this.drawBond(d>>4);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=b;this.isPymol=!1;break;default:this.drawBond(d)}}return a},"~N");c(b,"setStrutPoint",function(a,d){if(-2147483648==a.sX)return d;var b=this.vwr.tm.transformPt(a);a.sX=b.x;a.sY=b.y;a.sZ=b.z;return a},"JU.Point3fi,JU.Point3fi");c(b,"getMultipleBondSettings",function(a){if(this.isPymol=0!=a){this.bondsPerp=!1;var d=(a>>2&63)/50;this.showMultipleBonds=0!=d;this.multipleBondRadiusFactor=
2*d/(3*(a&3)-1);this.multipleBondSpacing=3*this.multipleBondRadiusFactor/2*w(this.bond.mad/1E3)}else this.useBananas=this.vwr.getBoolean(603979886)&&!this.isPymol,this.multipleBondSpacing=this.vwr.getFloat(570425370),this.multipleBondRadiusFactor=this.vwr.getFloat(570425369),this.bondsPerp=this.useBananas||0<this.multipleBondSpacing&&0>this.multipleBondRadiusFactor,this.useBananas&&(this.multipleBondSpacing=0>this.multipleBondSpacing?0.4*-this.multipleBondSpacing:this.multipleBondSpacing),this.multipleBondRadiusFactor=
Math.abs(this.multipleBondRadiusFactor),0==this.multipleBondSpacing&&this.isCartesian&&(this.multipleBondSpacing=0.2);this.modeMultipleBond=this.vwr.g.modeMultipleBond;this.showMultipleBonds=0!=this.multipleBondSpacing&&0!=this.modeMultipleBond&&this.vwr.getBoolean(603979928)},"~N");c(b,"drawBond",function(a){var d=0!=(a&1),b=16384==(this.colixA&30720)||16384==(this.colixB&30720)?2:this.endcaps;if(this.isCartesian&&1==this.bondOrder&&!d)this.g3d.drawBond(this.pa,this.pb,this.colixA,this.colixB,b,
this.mad,-1);else{var c=0==this.dx&&0==this.dy;if(!c||!this.asLineOnly||this.isCartesian){var e=!this.isExport||1==this.mad?this.width:this.mad,f=1<this.bondOrder&&(this.isPymol||0<this.multipleBondSpacing),h=f&&(null!=this.vwr.getHybridizationAndAxes(this.a.i,this.z,this.x,"pz")||null!=this.vwr.getHybridizationAndAxes(this.b.i,this.z,this.x,"pz"))&&!Float.isNaN(this.x.x);if(c&&!f){a=w(this.width/8)+3;a=this.width+a;d=this.yA-w((this.bondOrder-1)*a/2);do J.render.FontLineShapeRenderer.fillCylinder(this.g3d,
this.colixA,this.colixB,b,this.xA,d,this.zA,this.xB,d,this.zB,e,this.asLineOnly),d+=a;while(0<--this.bondOrder)}else if(1==this.bondOrder)d?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,this.dashDots,this.width,this.colixA,this.colixB,e,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,e,this.asLineOnly);else if(f)if(h||this.z.setT(JU.P3.getUnlikely()),
this.x.sub2(this.b,this.a),this.y.cross(this.x,this.z),this.y.normalize(),Float.isNaN(this.y.x)&&(this.z.setT(JU.P3.getUnlikely()),this.y.cross(this.x,this.z),this.y.cross(this.y,this.x),this.y.normalize()),this.bondsPerp&&this.y.cross(this.y,this.x),this.y.scale(this.multipleBondSpacing),this.x.setT(this.y),this.x.scale((this.bondOrder-1)/2),this.useBananas)switch(this.drawBanana(this.a,this.b,this.x,0),this.bondOrder){case 4:this.drawBanana(this.a,this.b,this.x,90),this.drawBanana(this.a,this.b,
this.x,-90);default:this.drawBanana(this.a,this.b,this.x,180);break;case 3:this.drawBanana(this.a,this.b,this.x,120),this.drawBanana(this.a,this.b,this.x,-120)}else{this.p1.sub2(this.a,this.x);for(this.p2.sub2(this.b,this.x);;){this.isCartesian?this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,b,this.mad,-2):(this.tm.transformPtScr(this.p1,this.s1),this.tm.transformPtScr(this.p2,this.s2),d?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,
this.s2.z,this.dashDots,this.width,this.colixA,this.colixB,e,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z,e,this.asLineOnly));a>>=1;d=0!=(a&1);if(0>=--this.bondOrder)break;this.p1.add(this.y);this.p2.add(this.y);this.stepAxisCoordinates()}}else if(this.mag2d=Math.round(Math.sqrt(this.dx*this.dx+this.dy*this.dy)),this.resetAxisCoordinates(),this.isCartesian&&3==this.bondOrder)J.render.FontLineShapeRenderer.fillCylinder(this.g3d,
this.colixA,this.colixB,b,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,e,this.asLineOnly),this.stepAxisCoordinates(),this.x.sub2(this.b,this.a),this.x.scale(0.05),this.p1.sub2(this.a,this.x),this.p2.add2(this.b,this.x),this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,b,this.mad,-2),this.stepAxisCoordinates(),J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,e,this.asLineOnly);else for(;;){0!=
(a&1)?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,this.dashDots,this.width,this.colixA,this.colixB,e,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,b,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,e,this.asLineOnly);a>>=1;if(0>=--this.bondOrder)break;this.stepAxisCoordinates()}}}},"~N");c(b,"resetAxisCoordinates",function(){var a=this.mag2d>>3;-1!=
this.multipleBondSpacing&&0>this.multipleBondSpacing&&(a*=-this.multipleBondSpacing);a=this.width+a;this.dxStep=w(a*this.dy/this.mag2d);this.dyStep=w(a*-this.dx/this.mag2d);this.xAxis1=this.xA;this.yAxis1=this.yA;this.xAxis2=this.xB;this.yAxis2=this.yB;a=this.bondOrder-1;this.xAxis1-=w(this.dxStep*a/2);this.yAxis1-=w(this.dyStep*a/2);this.xAxis2-=w(this.dxStep*a/2);this.yAxis2-=w(this.dyStep*a/2)});c(b,"stepAxisCoordinates",function(){this.xAxis1+=this.dxStep;this.yAxis1+=this.dyStep;this.xAxis2+=
this.dxStep;this.yAxis2+=this.dyStep});c(b,"getAromaticDottedBondMask",function(){var a=this.b.findAromaticNeighbor(this.a.i);return null==a?1:0>this.dx*(a.sY-this.yA)-this.dy*(a.sX-this.xA)?2:1});c(b,"drawBanana",function(a,d,b,c){this.g3d.addRenderer(553648143);this.vectorT.sub2(d,a);null==this.rot&&(this.rot=new JU.M3,this.a4=new JU.A4);this.a4.setVA(this.vectorT,3.141592653589793*c/180);this.rot.setAA(this.a4);this.pointT.setT(a);this.pointT3.setT(d);this.pointT2.ave(a,d);this.rot.rotate2(b,this.vectorT);
this.pointT2.add(this.vectorT);this.tm.transformPtScrT3(a,this.pointT);this.tm.transformPtScrT3(this.pointT2,this.pointT2);this.tm.transformPtScrT3(d,this.pointT3);a=Math.max(this.width,1);this.g3d.setC(this.colixA);this.g3d.fillHermite(5,a,a,a,this.pointT,this.pointT,this.pointT2,this.pointT3);this.g3d.setC(this.colixB);this.g3d.fillHermite(5,a,a,a,this.pointT,this.pointT2,this.pointT3,this.pointT3)},"JM.Atom,JM.Atom,JU.V3,~N")});s("J.render");B(["J.render.CageRenderer","JU.P3"],"J.render.UccageRenderer",
"JU.BS $.DF JU.BSUtil $.BoxInfo $.C $.SimpleUnitCell".split(" "),function(){var b=n(function(){this.unitcell=this.offsetT=this.offset=this.cellRange=this.vvertA=this.verticesT=null;this.ypos=this.xpos=this.lineheight=0;this.isPlanarGroup=!1;this.bsVerticals=null;v(this,arguments)},J.render,"UccageRenderer",J.render.CageRenderer);P(b,function(){this.verticesT=Array(8);this.cellRange=x(-1,[new JU.P3,new JU.P3]);this.offset=new JU.P3;this.offsetT=new JU.P3});j(b,"initRenderer",function(){for(var a=8;0<=
--a;)this.verticesT[a]=new JU.P3;this.tickEdges=JU.BoxInfo.uccageTickEdges;this.draw000=!1});j(b,"setPeriodicity",function(a,d){this.setShifts();var b;if(this.shifting){if(null==this.vvert){this.vvert=Array(8);for(var c=8;0<=--c;)this.vvert[c]=new JU.P3}if(this.shiftC&&1==this.periodicity){if(null==this.vvertA){this.vvertA=Array(8);for(c=8;0<=--c;)this.vvertA[c]=new JU.P3}b=JU.P3.newP(a[1]);b.sub(a[0]);b.scale(0.5);for(c=8;0<=--c;)this.pt.setT(a[c]),this.pt.sub(a[0]),this.pt.scaleAdd2(d,this.pt,a[0]),
this.pt.sub(b),this.tm.transformPtNoClip(this.pt,this.vvertA[c])}else if(this.shiftA){if(null==this.vvertA){this.vvertA=Array(8);for(c=8;0<=--c;)this.vvertA[c]=new JU.P3}b=JU.P3.newP(a[4]);b.sub(a[0]);b.scale(0.5);for(c=8;0<=--c;)this.pt.setT(a[c]),this.pt.sub(a[0]),this.pt.scaleAdd2(d,this.pt,a[0]),this.pt.sub(b),this.tm.transformPtNoClip(this.pt,this.vvertA[c])}else this.vvertA=null;b=JU.P3.newP(a[this.shiftB?2:1]);b.sub(a[0]);b.scale(0.5);for(c=8;0<=--c;)this.pt.setT(a[c]),this.pt.sub(a[0]),this.pt.scaleAdd2(d,
this.pt,a[0]),this.pt.sub(b),this.tm.transformPtNoClip(this.pt,this.vvert[c])}},"~A,~N");j(b,"render",function(){this.imageFontScaling=this.vwr.imageFontScaling;this.font3d=this.vwr.gdata.getFont3DScaled(this.shape.font3d,this.imageFontScaling);var a=this.vwr.getObjectMad10(5);if(0==a||this.vwr.isJmolDataFrame()||this.tm.isNavigating()&&this.vwr.getBoolean(603979890))return!1;this.colix=this.vwr.getObjectColix(5);var d=JU.C.renderPass2(this.colix);if(!this.isExport&&d!=this.vwr.gdata.isPass2)return d;
this.render1(a);return!1});c(b,"render1",function(a){this.g3d.setC(this.colix);this.unitcell=this.vwr.getCurrentUnitCell();if(null!=this.unitcell){this.isPolymer=this.unitcell.isPolymer();this.isSlab=this.unitcell.isSlab();this.periodicity=this.unitcell.getPeriodicity();this.nDims=this.unitcell.getDimensionality();this.isPlanarGroup=3==this.periodicity&&2==this.nDims;var d=this.unitcell.getUnitCellVerticesNoOffset();this.offset.setT(this.unitcell.getCartesianOffset());this.offsetT.setT(this.unitcell.getFractionalOrigin());
this.unitcell.toCartesian(this.offsetT,!0);this.offset.sub(this.offsetT);var b=this.vwr.getBoolean(603979856),c=this.unitcell.getUnitCellMultiplier(),e=null!=c&&!c.equals(J.render.UccageRenderer.fset0);e||(c=J.render.UccageRenderer.fset0);JU.SimpleUnitCell.getCellRange(c,this.cellRange);var f,h,k=Math.abs(c.z),m=this.vwr.shm.getShape(34);null!=m&&this.vwr.areAxesTainted()&&m.reinitShape();var j=null==m||0==this.vwr.getObjectMad10(1)||0!=m.axisXY.z&&(null==m.axes2||3==m.axes2.length)||null!=m.fixedOrigin||
0<m.fixedOriginUC.lengthSquared()?null:m.axisPoints,p=this.isExport||0==this.vwr.getObjectMad10(1)||2>this.vwr.getFloat(570425346)||null==j,m=j,b=b?JU.BoxInfo.facePoints:null;if(0==c.z){this.offsetT.setT(this.cellRange[0]);this.unitcell.toCartesian(this.offsetT,!0);this.offsetT.add(this.offset);m=0==this.cellRange[0].x&&0==this.cellRange[0].y&&0==this.cellRange[0].z?j:null;c=0;h=f=255;for(var d=JU.BoxInfo.unitCubePoints,q=8;0<=--q;)e=JU.P3.new3(d[q].x*(this.cellRange[1].x-this.cellRange[0].x),d[q].y*
(this.cellRange[1].y-this.cellRange[0].y),d[q].z*(this.cellRange[1].z-this.cellRange[0].z)),this.unitcell.toCartesian(e,!0),this.verticesT[q].add2(e,this.offsetT);this.renderCage(a,this.verticesT,b,m,c,f,h,1)}else for(var r=D(this.cellRange[0].x);r<this.cellRange[1].x;r++)for(var u=D(this.cellRange[0].y);u<this.cellRange[1].y;u++)for(var C=D(this.cellRange[0].z);C<this.cellRange[1].z;C++){e?(this.offsetT.set(r,u,C),this.offsetT.scale(k),this.unitcell.toCartesian(this.offsetT,!0),this.offsetT.add(this.offset),
m=0==r&&0==u&&0==C?j:null,c=p||null==m?0:3):(this.offsetT.setT(this.offset),c=p?0:3);h=f=255;for(q=8;0<=--q;)this.verticesT[q].add2(d[q],this.offsetT);this.renderCage(a,this.verticesT,b,m,c,f,h,k)}this.renderInfo()}},"~N");j(b,"renderCageLine",function(a,d,b,c,e){null!=this.bsVerticals&&this.bsVerticals.get(a)?null!=this.vvertA&&(4==a||8==a||12==a||16==a||0==a&&2!=this.periodicity)?(a=this.vvertA[d],b=this.vvertA[b]):(a=this.vvert[d],b=this.vvert[b]):(a=this.p3Screens[d],b=this.p3Screens[b]);this.renderLine(a,
b,c,e)},"~N,~N,~N,~N,~B");j(b,"setBSPeriod",function(){var a;null!=this.bsVerticals&&this.bsVerticals.clearAll();null!=this.bsPeriod&&this.bsPeriod.clearAll();switch(this.periodicity){case 3:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod;3==this.nDims&&(a.set(0),a.set(10),a.set(16),a.set(22),null==this.bsVerticals&&(this.bsVerticals=new JU.BS),JU.BSUtil.copy2(a,this.bsVerticals));a.set(2);a.set(4);a.set(12);a.set(18);break;case 4:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod;
a.set(2);a.set(6);a.set(4);a.set(8);null==this.bsVerticals&&(this.bsVerticals=new JU.BS);JU.BSUtil.copy2(a,this.bsVerticals);a.set(0);break;case 1:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod;a.set(2);a.set(18);3==this.nDims&&(a.set(0),a.set(16));null==this.bsVerticals&&(this.bsVerticals=new JU.BS);JU.BSUtil.copy2(a,this.bsVerticals);a.set(4);break;case 2:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod,a.set(0),a.set(4),a.set(12),a.set(10),null==this.bsVerticals&&(this.bsVerticals=
new JU.BS),JU.BSUtil.copy2(a,this.bsVerticals),a.set(2)}});c(b,"renderInfo",function(){var a=this.vwr.getBoolean(603979937);if(!this.isExport&&this.vwr.getBoolean(603979828)&&!this.vwr.isPreviewOnly&&this.vwr.gdata.setC(this.vwr.cm.colixBackgroundContrast)&&0==this.vwr.gdata.getTextPosition()){this.vwr.gdata.setFontBold("Monospaced",14*this.imageFontScaling);this.xpos=w(Math.floor(10*this.imageFontScaling));this.ypos=this.lineheight=w(Math.floor(15*this.imageFontScaling));if(!this.unitcell.isSimple()){var d=
this.unitcell.getUnitCellDisplayName();null!=d&&this.drawInfo(d,0,null);d=this.unitcell.getMoreInfo();if(null!=d)for(var b=0;b<d.size();b++)this.drawInfo(d.get(b),0,null);if(!a)return}this.drawInfo("a=",0,"\u00c5");this.isPolymer||this.drawInfo("b=",1,"\u00c5");!this.isPolymer&&(!this.isSlab&&!this.isPlanarGroup)&&this.drawInfo("c=",2,"\u00c5");this.isPolymer||(!this.isSlab&&!this.isPlanarGroup&&(this.drawInfo("\u03b1=",3,"\u00b0"),this.drawInfo("\u03b2=",4,"\u00b0")),this.drawInfo("\u03b3=",5,"\u00b0"))}});
c(b,"drawInfo",function(a,d,b){this.ypos+=this.lineheight;null!=b&&(a+=JU.DF.formatDecimal(this.unitcell.getUnitCellInfoType(d),3)+b);this.g3d.drawStringNoSlab(a,null,this.xpos,this.ypos,0,0)},"~S,~N,~S");b.fset0=JU.P3.new3(555,555,1)});s("JS");B(["JS.T"],"JS.ContextToken",["java.util.Hashtable","JS.SV"],function(){var b=n(function(){this.name0=this.forVars=this.contextVariables=null;v(this,arguments)},JS,"ContextToken",JS.T);b.newContext=c(b,"newContext",function(a){a=a?JS.ContextToken.newCmd(1275335685,
"{"):JS.ContextToken.newCmd(1275334681,"}");a.intValue=0;return a},"~B");b.newCmd=c(b,"newCmd",function(a,d){var b=new JS.ContextToken;b.tok=a;b.value=d;return b},"~N,~O");c(b,"addName",function(a){null==this.contextVariables&&(this.contextVariables=new java.util.Hashtable);this.contextVariables.put(a,JS.SV.newS("").setName(a))},"~S")});s("JS");B(null,"JS.ScriptContext",["java.util.Hashtable","JS.SV"],function(){var b=n(function(){this.aatoken=null;this.chk=this.allowJSThreads=!1;this.contextPath=
" >> ";this.vars=null;this.displayLoadErrorsSave=!1;this.errorType=this.errorMessageUntranslated=this.errorMessage=null;this.isEditorScript=this.isEditor=this.executionStepping=this.executionPaused=!1;this.functionName=null;this.iCommandError=-1;this.id=0;this.isComplete=!0;this.isTryCatch=this.isStateScript=this.isJSThread=this.isFunction=!1;this.forVars=null;this.iToken=0;this.lineEnd=2147483647;this.lineNumbers=this.lineIndices=null;this.mustResumeEval=!1;this.parentContext=this.parallelProcessor=
this.outputBuffer=null;this.pc0=this.pc=0;this.pcEnd=2147483647;this.scriptFileName=this.scriptExtensions=this.script=null;this.scriptLevel=0;this.htFileCache=this.statement=null;this.statementLength=0;this.token=null;this.tryPt=0;this.theToken=null;this.theTok=0;this.privateFuncs=this.why=this.pointers=null;v(this,arguments)},JS,"ScriptContext",null);A(b,function(){this.id=++JS.ScriptContext.contextCount});c(b,"setMustResume",function(){for(var a=this;null!=a;)a.mustResumeEval=!0,a.pc=a.pc0,a=a.parentContext});
c(b,"getVariable",function(a){for(var d=this,b;null!=d&&!d.isFunction;){if(null!=d.vars&&null!=(b=d.vars.get(a)))return b;d=d.parentContext}return null},"~S");c(b,"getFullMap",function(){var a=new java.util.Hashtable,d=this;for(null!=this.contextPath&&a.put("_path",JS.SV.newS(this.contextPath));null!=d&&!d.isFunction;){if(null!=d.vars)for(var b,c=d.vars.keySet().iterator();c.hasNext()&&((b=c.next())||1);)if(!a.containsKey(b)){var e=d.vars.get(b);(2!=e.tok||2147483647!=e.intValue)&&a.put(b,e)}d=d.parentContext}return a});
c(b,"saveTokens",function(a){this.aatoken=a;if(null==a)this.pointers=null;else{this.pointers=F(a.length,0);for(var d=this.pointers.length;0<=--d;)this.pointers[d]=null==a[d]?-1:a[d][0].intValue}},"~A");c(b,"restoreTokens",function(){if(null!=this.pointers)for(var a=this.pointers.length;0<=--a;)null!=this.aatoken[a]&&(this.aatoken[a][0].intValue=this.pointers[a]);return this.aatoken});c(b,"getTokenCount",function(){return null==this.aatoken?-1:this.aatoken.length});c(b,"getToken",function(a){return this.aatoken[a]},
"~N");b.contextCount=0});s("JS");B(["java.lang.Exception"],"JS.ScriptException",null,function(){var b=n(function(){this.untranslated=this.message=this.eval=null;this.isError=!1;v(this,arguments)},JS,"ScriptException",Exception);A(b,function(a,d,b,c){this.eval=a;this.message=d;(this.isError=c)&&this.eval.setException(this,d,b)},"JS.ScriptError,~S,~S,~B");c(b,"getErrorMessageUntranslated",function(){return this.untranslated});j(b,"getMessage",function(){return this.message});j(b,"toString",function(){return this.message})});
s("JS");B(["javajs.api.JSONEncodable","JS.T","JU.P3"],"JS.SV","java.util.Arrays $.Collections $.Hashtable JU.AU $.BArray $.BS $.Base64 $.Lst $.Measure $.PT $.SB J.api.Interface JM.BondSet JU.BSUtil $.Escape JV.Viewer".split(" "),function(){var b=n(function(){this.index=2147483647;this.myName=null;S("JS.SV.Sort")||JS.SV.$SV$Sort$();v(this,arguments)},JS,"SV",JS.T,javajs.api.JSONEncodable);b.newV=c(b,"newV",function(a,d){var b=new JS.SV;b.tok=a;b.value=d;return b},"~N,~O");b.newI=c(b,"newI",function(a){var d=
new JS.SV;d.tok=2;d.intValue=a;return d},"~N");b.newF=c(b,"newF",function(a){if(a!=a)return JS.SV.vNaN;var d=new JS.SV;d.tok=3;d.value=Float.$valueOf(a);return d},"~N");b.newS=c(b,"newS",function(a){return JS.SV.newV(4,a)},"~S");b.newT=c(b,"newT",function(a){return JS.SV.newSV(a.tok,a.intValue,a.value)},"JS.T");b.newSV=c(b,"newSV",function(a,d,b){a=JS.SV.newV(a,b);a.intValue=d;return a},"~N,~N,~O");c(b,"setv",function(a){this.index=a.index;this.intValue=a.intValue;this.tok=a.tok;this.value=a.value;
return this},"JS.SV");b.copySafely=c(b,"copySafely",function(a){return null==a.myName?a:(new JS.SV).setv(a)},"JS.SV");b.sizeOf=c(b,"sizeOf",function(a){switch(null==a?0:a.tok){case 10:return JS.SV.bsSelectToken(a).cardinality();case 15:return a.value.data.length;case 4:return a.value.length;case 7:return 2147483647==a.intValue?a.getList().size():JS.SV.sizeOf(JS.SV.selectItemTok(a,-2147483648));case 6:return a.value.size();case 14:return a.value.getFullMap().size();case 1073742335:case 1073742334:return-1;
case 2:return-2;case 3:return-4;case 8:return-8;case 9:return-16;case 11:return-32;case 12:return-64;default:return 0}},"JS.T");b.isVariableType=c(b,"isVariableType",function(a){return y(a,"JS.SV")||y(a,Boolean)||y(a,Integer)||y(a,Float)||"string"==typeof a||y(a,"JU.T3")||y(a,"JU.BS")||y(a,"JU.P4")||y(a,"JU.Quat")||y(a,"JU.M34")||y(a,"java.util.Map")||y(a,"JU.Lst")||y(a,"JU.BArray")||y(a,"JS.ScriptContext")||JS.SV.isArray(a)},"~O");b.isArray=c(b,"isArray",function(a){return y(a,Array)},"~O");b.getVariable=
c(b,"getVariable",function(a){return null==a?JS.SV.newS(""):y(a,"JS.SV")?a:y(a,Boolean)?JS.SV.getBoolean(a.booleanValue()):y(a,Integer)?JS.SV.newI(a.intValue()):y(a,Float)?JS.SV.newV(3,a):"string"==typeof a?(a=JS.SV.unescapePointOrBitsetAsVariable(a),y(a,"JS.SV")?a:JS.SV.newV(4,a)):y(a,"JU.P3")?JS.SV.newV(8,a):y(a,"JU.V3")?JS.SV.newV(8,JU.P3.newP(a)):y(a,"JU.BS")?JS.SV.newV(10,a):y(a,"JU.P4")?JS.SV.newV(9,a):y(a,"JU.Quat")?JS.SV.newV(9,a.toPoint4f()):y(a,"JU.M34")?JS.SV.newV(y(a,"JU.M4")?12:11,a):
y(a,"java.util.Map")?JS.SV.getVariableMap(a):y(a,"JU.Lst")?JS.SV.getVariableList(a):y(a,"JU.BArray")?JS.SV.newV(15,a):y(a,"JS.ScriptContext")?JS.SV.newV(14,a):JS.SV.isASV(a)?JS.SV.getVariableAV(a):JU.AU.isAI(a)?JS.SV.getVariableAI(a):JU.AU.isAB(a)?JS.SV.getVariableAB(a):JU.AU.isAF(a)?JS.SV.getVariableAF(a):JU.AU.isAD(a)?JS.SV.getVariableAD(a):JU.AU.isAS(a)?JS.SV.getVariableAS(a):JU.AU.isAP(a)?JS.SV.getVariableAP(a):JU.AU.isAII(a)?JS.SV.getVariableAII(a):JU.AU.isAFF(a)?JS.SV.getVariableAFF(a):JU.AU.isASS(a)?
JS.SV.getVariableASS(a):JU.AU.isADD(a)?JS.SV.getVariableADD(a):JU.AU.isAFloat(a)?JS.SV.newV(13,a):JS.SV.newJSVar(a)},"~O");b.isASV=c(b,"isASV",function(a){return!JV.Viewer.isSwingJS?a&&a[0]&&"JS.SV"==a[0].__CLASS_NAME__:y(a,Array)},"~O");b.newJSVar=c(b,"newJSVar",function(a){var d,b,c,e,f;switch(a.BYTES_PER_ELEMENT?Array:a.constructor){case Boolean:d=0;b=a;break;case Number:d=1;c=a;break;case Array:d=2;e=a;break;case Object:d=3,e=a,f=Object.keys(a)}switch(d){case 0:return b?JS.SV.vT:JS.SV.vF;case 1:return 2147483647<
c||c!=Math.floor(c)?JS.SV.newF(c):JS.SV.newI(D(c));case 2:f=new JU.Lst;a=0;for(d=e.length;a<d;a++)f.addLast(JS.SV.newJSVar(e[a]));return JS.SV.getVariableList(f);case 3:d=new java.util.Hashtable;for(a=f.length;0<=--a;)b=null,b=e[f[a]],d.put(f[a],JS.SV.newJSVar(b));return JS.SV.getVariableMap(d)}return JS.SV.newS(a.toString())},"~O");b.getVariableMap=c(b,"getVariableMap",function(a){for(var d=a,b=null,c,e=d.values().iterator();e.hasNext()&&((c=e.next())||1);){b=c;break}if(!y(b,"JS.SV")){a=new java.util.Hashtable;
for(var f,d=d.entrySet().iterator();d.hasNext()&&((f=d.next())||1);)a.put(f.getKey(),JS.SV.getVariable(f.getValue()))}return JS.SV.newV(6,a)},"java.util.Map");b.getVariableList=c(b,"getVariableList",function(a){var d=a.size();if(0<d&&y(a.get(0),"JS.SV"))return JS.SV.newV(7,a);for(var b=new JU.Lst,c=0;c<d;c++)b.addLast(JS.SV.getVariable(a.get(c)));return JS.SV.newV(7,b)},"JU.Lst");b.getVariableAV=c(b,"getVariableAV",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(a[b]);return JS.SV.newV(7,
d)},"~A");b.getVariableAD=c(b,"getVariableAD",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(3,Float.$valueOf(a[b])));return JS.SV.newV(7,d)},"~A");b.getVariableAO=c(b,"getVariableAO",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariable(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAS=c(b,"getVariableAS",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(4,a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAP=c(b,"getVariableAP",
function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(8,a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAFF=c(b,"getVariableAFF",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariableAF(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableADD=c(b,"getVariableADD",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariableAD(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableASS=c(b,"getVariableASS",function(a){for(var d=new JU.Lst,b=0;b<
a.length;b++)d.addLast(JS.SV.getVariableAS(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAII=c(b,"getVariableAII",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.getVariableAI(a[b]));return JS.SV.newV(7,d)},"~A");b.getVariableAF=c(b,"getVariableAF",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newV(3,Float.$valueOf(a[b])));return JS.SV.newV(7,d)},"~A");b.getVariableAI=c(b,"getVariableAI",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newI(a[b]));
return JS.SV.newV(7,d)},"~A");b.getVariableAB=c(b,"getVariableAB",function(a){for(var d=new JU.Lst,b=0;b<a.length;b++)d.addLast(JS.SV.newI(a[b]));return JS.SV.newV(7,d)},"~A");c(b,"setName",function(a){this.myName=a;return this},"~S");c(b,"increment",function(a){switch(this.tok){case 2:return this.intValue+=a,!0;case 3:return this.value=Float.$valueOf(this.value.floatValue()+a),!0;default:return!1}},"~N");c(b,"asBoolean",function(){return JS.SV.bValue(this)});c(b,"asInt",function(){return JS.SV.iValue(this)});
c(b,"asFloat",function(){return JS.SV.fValue(this)});c(b,"asString",function(){return JS.SV.sValue(this)});b.oValue=c(b,"oValue",function(a){if(!y(a,"JS.SV"))return a;switch(a.tok){case 1073742335:return Boolean.TRUE;case 0:case 1073742334:return Boolean.FALSE;case 2:return Integer.$valueOf(a.intValue);case 10:case 1275068418:return JS.SV.selectItemVar(a).value;default:return a.value}},"~O");b.nValue=c(b,"nValue",function(a){switch(null==a?0:a.tok){case 3:return a.value;case 2:a=a.intValue;break;
case 4:if(0<=a.value.indexOf("."))return Float.$valueOf(JS.SV.toFloat(a.value));a=D(JS.SV.toFloat(a.value));break;case 8:return Float.$valueOf(a.value.length());default:a=0}return Integer.$valueOf(a)},"JS.T");b.bValue=c(b,"bValue",function(a){switch(null==a?0:a.tok){case 1073742335:case 14:return!0;case 1073742334:return!1;case 2:return 0!=a.intValue;case 3:case 4:case 7:return 0!=JS.SV.fValue(a);case 10:case 15:return 0!=JS.SV.iValue(a);case 8:case 9:case 11:case 12:return 1E-4<Math.abs(JS.SV.fValue(a));
case 6:return!a.getMap().isEmpty();default:return!1}},"JS.T");b.iValue=c(b,"iValue",function(a){switch(null==a?0:a.tok){case 1073742335:return 1;case 1073742334:return 0;case 2:return a.intValue;case 3:case 7:case 4:case 8:case 9:case 11:case 12:case 134221850:return D(JS.SV.fValue(a));case 10:return JS.SV.bsSelectToken(a).cardinality();case 15:return a.value.data.length;default:return 0}},"JS.T");b.fValue=c(b,"fValue",function(a){switch(null==a?0:a.tok){case 1073742335:return 1;case 1073742334:return 0;
case 2:return a.intValue;case 3:return a.value.floatValue();case 7:if(2147483647==a.intValue)return a.getList().size();case 4:return JS.SV.toFloat(JS.SV.sValue(a));case 10:case 15:return JS.SV.iValue(a);case 8:return a.value.length();case 9:return JU.Measure.distanceToPlane(a.value,JS.SV.pt0);case 11:var d=new JU.P3;a.value.rotate(d);return d.length();case 12:return d=new JU.P3,a.value.rotTrans(d),d.length();default:return 0}},"JS.T");b.sValue=c(b,"sValue",function(a){if(null==a)return"";var d;switch(a.tok){case 1073742335:return"true";
case 1073742334:return"false";case 2:return""+a.intValue;case 10:return d=JS.SV.bsSelectToken(a),y(a.value,"JM.BondSet")?JU.Escape.eBond(d):JU.Escape.eBS(d);case 7:var b=a.getList();d=a.intValue;0>=d&&(d=b.size()-d);if(2147483647!=d)return 1>d||d>b.size()?"":JS.SV.sValue(b.get(d-1));case 6:case 14:if("string"==typeof a.value)return a.value;d=new JU.SB;JS.SV.sValueArray(d,a,"","",!1,!0,!0,2147483647,!1);return JU.PT.rep(d.toString(),"\n\x00"," ");case 4:return b=a.value,d=a.intValue,0>=d&&(d=b.length-
d),2147483647==d?b:1>d||d>b.length?"":""+b.charAt(d-1);case 8:return JU.Escape.eP(a.value);case 9:return JU.Escape.eP4(a.value);case 11:case 12:return JU.Escape.e(a.value);default:return a.value.toString()}},"JS.T");b.sValueArray=c(b,"sValueArray",function(a,d,b,c,e,f,h,k,m){switch(d.tok){case 6:case 14:case 7:var j=";"+d.hashCode()+";";if(0<=b.indexOf(j)){a.append(e?7==d.tok?"[ ]":"{ }":(7==d.tok?"":"\x00")+'"<'+(null==d.myName?"circular reference":d.myName)+'>"');break}b+=j;if(7==d.tok){if(!h)break;
f||a.append(e?"[ ":c+"[\n");d=d.getList();for(j=0;j<d.size();j++){e&&0<j&&a.append(",");var p=d.get(j);JS.SV.sValueArray(a,p,b,c+"  ",e,0==c.length&&!e&&JS.SV.isRawType(p.tok),h,k,m);e||a.append("\n")}f||a.append(e?" ]":c+"]")}else 0<=--k&&(f=14==d.tok?d.value.getFullMap():d.getMap(),JS.SV.sValueAddKeys(a,b,f,c,e,h,k,m));break;default:if(!h)break;!f&&!e&&a.append(c);a.append(e?d.escape():JS.SV.sValue(d))}},"JU.SB,JS.SV,~S,~S,~B,~B,~B,~N,~B");b.sValueAddKeys=c(b,"sValueAddKeys",function(a,d,b,c,e,
f,h,k){if(!(0>h)){var m=b.keySet(),m=b.keySet().toArray(Array(m.size()));java.util.Arrays.sort(m);if(e){a.append("{ ");for(var j="",p=0;p<m.length;p++){e=m[p];var q=b.get(e);if(!k||!(7==q.tok&&0==q.getList().size()||6==q.tok&&q.getMap().isEmpty()))f?a.append(j).append(JU.PT.esc(e)).append(":"):a.appendC(" ").append(e),JS.SV.sValueArray(a,q,d,c+"  ",!0,!1,f,h,k),j=","}a.append(" }");f||a.append("\n")}else{a.append(c).append("{\n");c+="  ";for(p=0;p<m.length;p++)a.append(c),e=m[p],a.append(JU.PT.esc(e)).append("  :"),
j=new JU.SB,y(b.get(e),"JS.SV")||b.put(e,JS.SV.getVariable(b.get(e))),q=b.get(e),e=JS.SV.isRawType(q.tok),JS.SV.sValueArray(j,q,d,c,e,!1,f,h,k),j=j.toString(),e&&f?a.append("  "):a.append("\n"),a.append(j).append("\n");a.append(c.substring(1)).append("}")}}},"JU.SB,~S,java.util.Map,~S,~B,~B,~N,~B");b.isRawType=c(b,"isRawType",function(a){switch(a){case 4:case 3:case 2:case 8:case 9:case 10:case 15:case 1073742335:case 1073742334:return!0}return!1},"~N");b.ptValue=c(b,"ptValue",function(a){switch(a.tok){case 8:return a.value;
case 4:if(a=JU.Escape.uP(a.value),y(a,"JU.P3"))return a}return null},"JS.SV");b.pt4Value=c(b,"pt4Value",function(a){switch(a.tok){case 9:return a.value;case 4:a=JU.Escape.uP(a.value);if(!y(a,"JU.P4"))break;return a}return null},"JS.SV");b.toFloat=c(b,"toFloat",function(a){return a.equalsIgnoreCase("true")?1:0==a.length||a.equalsIgnoreCase("false")?0:JU.PT.parseFloatStrict(JU.PT.trim(a," \t\n"))},"~S");b.concatList=c(b,"concatList",function(a,d,b){var c=a.getList(),e=d.getList();if(!b){if(null==e)c.addLast(JS.SV.newT(d));
else for(b=0;b<e.size();b++)c.addLast(e.get(b));return a}var f=new JU.Lst;if(null==c)f.addLast(a);else for(b=0;b<c.size();b++)f.addLast(c.get(b));if(null==e)f.addLast(d);else for(b=0;b<e.size();b++)f.addLast(e.get(b));return JS.SV.getVariableList(f)},"JS.SV,JS.SV,~B");b.bsSelectToken=c(b,"bsSelectToken",function(a){return JS.SV.selectItemTok(a,-2147483648).value},"JS.T");b.bsSelectRange=c(b,"bsSelectRange",function(a,d){a=JS.SV.selectItemTok(a,-2147483648);a=JS.SV.selectItemTok(a,0>=d?d:1);a=JS.SV.selectItemTok(a,
0>=d?2147483646:d);return a.value},"JS.T,~N");b.selectItemVar=c(b,"selectItemVar",function(a){return 2147483647!=a.index||(7==a.tok||15==a.tok)&&2147483647==a.intValue?a:JS.SV.selectItemTok(a,-2147483648)},"JS.SV");b.selectItemTok=c(b,"selectItemTok",function(a,d){switch(a.tok){case 11:case 12:case 10:case 7:case 15:case 4:break;default:return y(a,"JS.SV")&&null!=a.myName?JS.SV.copySafely(a):a}var b=null,c=null,e=a.intValue,f=-2147483648==d;if(2147483647==e)return f&&4==a.tok?a:JS.SV.newSV(a.tok,
f?e:d,a.value);var h=0,k=y(a,"JS.SV")&&2147483647!=a.index,m=JS.SV.newSV(a.tok,2147483647,null);switch(a.tok){case 10:y(a.value,"JM.BondSet")?(b=JM.BondSet.newBS(a.value),h=b.cardinality()):(b=JU.BSUtil.copy(a.value),h=k?1:b.cardinality());break;case 15:h=a.value.data.length;break;case 7:h=a.getList().size();break;case 4:c=a.value;h=c.length;break;case 11:h=-3;break;case 12:h=-4}if(0>h){h=-h;if(0<e&&Math.abs(e)>h)return m=e%10,e=w((e-m)/10),0<m&&m<=h&&e<=h?JS.SV.newV(3,Float.$valueOf(a.value.getElement(e-
1,m-1))):JS.SV.newV(4,"");if(Math.abs(e)>h)return JS.SV.newV(4,"");b=L(h,0);0>e?a.value.getColumn(-1-e,b):a.value.getRow(e-1,b);return f?JS.SV.getVariableAF(b):1>d||d>h?JS.SV.newV(4,""):JS.SV.newV(3,Float.$valueOf(b[d-1]))}0>=e&&(e=h+e);f||(1>e&&(e=1),0==d?d=h:0>d&&(d=h+d),d<e&&(d=e));switch(a.tok){case 10:m.value=b;if(k){1<e&&b.clearAll();break}if(f){e==h?d=b.length()-1:1==e&&(d=b.nextSetBit(0));if(-1<=d){b.clearAll();0<=d&&b.set(d);break}d=e}h=0;for(f=b.nextSetBit(0);0<=f;f=b.nextSetBit(f+1))(++h<
e||h>d)&&b.clear(f);break;case 4:m.value=0>--e||e>=h?"":f?c.substring(e,e+1):c.substring(e,Math.min(d,h));break;case 7:if(0>--e||e>=h)return JS.SV.newV(4,"");if(f)return a.getList().get(e);b=new JU.Lst;f=a.getList();c=Math.min(d,h)-e;for(h=0;h<c;h++)b.addLast(JS.SV.newT(f.get(h+e)));m.value=b;break;case 15:if(0>--e||e>=h)return JS.SV.newV(4,"");b=a.value.data;if(f)return JS.SV.newI(b[e]);f=Q(Math.min(d,h)-e,0);for(h=f.length;0<=--h;)f[h]=b[e+h];m.value=new JU.BArray(f)}return m},"JS.T,~N");c(b,"setSelectedValue",
function(a,d,b){if(2147483647!=a){var c;switch(this.tok){case 11:case 12:c=11==this.tok?3:4;if(2147483647!=d){var e=a;if(0<d&&d<=c&&e<=c){this.value.setElement(e-1,d-1,JS.SV.fValue(b));break}}if(0!=a&&Math.abs(a)<=c&&(11==this.tok&&8==b.tok||12==this.tok&&9==b.tok||7==b.tok)){switch(b.tok){default:case 7:e=b.getList();if(e.size()!=c)return;b=L(c,0);for(d=0;d<c;d++)b[d]=JS.SV.fValue(e.get(d));break;case 8:b=b.value;b=L(-1,[b.x,b.y,b.z]);break;case 9:b=b.value,b=L(-1,[b.x,b.y,b.z,b.w])}0<a?this.value.setRowA(a-
1,b):this.value.setColumnA(-1-a,b);break}break;case 4:c=this.value;e=c.length;0>=a&&(a=e+a);for(0>--a&&(a=0);a>=c.length;)c+=" ";if(2147483647==d)d=a;else for(0>--d&&(d=e+d);d>=c.length;)c+=" ";d>=a&&(this.value=c.substring(0,a)+JS.SV.sValue(b)+c.substring(++d));this.intValue=this.index=2147483647;break;case 7:e=this.value;c=e.size();0>=a&&(a=c+a);0>--a&&(a=0);if(c<=a)for(d=c;d<=a;d++)e.addLast(JS.SV.newV(4,""));e.set(a,b)}}},"~N,~N,JS.SV");c(b,"escape",function(){switch(this.tok){case 4:return JU.PT.esc(this.value);
case 11:case 12:return JU.PT.toJSON(null,this.value);case 7:case 6:case 14:var a=new JU.SB;JS.SV.sValueArray(a,this,"","",!0,!1,!0,2147483647,!1);return a.toString();default:return JS.SV.sValue(this)}});b.getJvxlCoder=c(b,"getJvxlCoder",function(){return null==JS.SV.jvxlCoder?JS.SV.jvxlCoder=J.api.Interface.getInterface("J.jvxl.data.JvxlCoder",null,"script"):JS.SV.jvxlCoder});b.encodeBitSet90_35=c(b,"encodeBitSet90_35",function(a){return JS.SV.getJvxlCoder().jvxlEncodeBitSet90_35(a)},"JU.BS");b.decodeBase90_35=
c(b,"decodeBase90_35",function(a){return JS.SV.getJvxlCoder().jvxlDecodeBitSet90_35(a)},"~S");b.unescapePointOrBitsetAsVariable=c(b,"unescapePointOrBitsetAsVariable",function(a){if(null==a)return a;var d=null,b=null;if(y(a,"JS.SV"))switch(a.tok){case 8:case 9:case 11:case 12:case 10:d=a.value;break;case 4:b=a.value;break;default:b=JS.SV.sValue(a)}else"string"==typeof a&&(b=a);if(null!=b){if(0==b.length)return b;if(b.startsWith(";base90+35,"))return JS.SV.decodeBase90_35(b)}null==d&&(d=JU.Escape.uABsM(b));
return y(d,"JU.P3")?JS.SV.newV(8,d):y(d,"JU.P4")?JS.SV.newV(9,d):y(d,"JU.BS")?(null!=b&&0==b.indexOf("[{")&&(d=JM.BondSet.newBS(d)),JS.SV.newV(10,d)):y(d,"JU.M34")?JS.SV.newV(y(d,"JU.M3")?11:12,d):a},"~O");b.getBoolean=c(b,"getBoolean",function(a){return JS.SV.newT(a?JS.SV.vT:JS.SV.vF)},"~B");b.sprintf=c(b,"sprintf",function(a,d){if(null==d)return a;var b=7==d.tok,c=0<=a.indexOf("d")||0<=a.indexOf("i")?F(1,0):null,e=0<=a.indexOf("f")?L(1,0):null,f=0<=a.indexOf("e")?R(1,0):null,h=0<=a.indexOf("s"),
k=0<=a.indexOf("p")&&(b||8==d.tok),m=0<=a.indexOf("q")&&(b||9==d.tok),j=x(-1,[c,e,f,null,null,null]);if(!b)return JS.SV.sprintf(a,d,j,c,e,f,h,k,m);for(var b=d.getList(),p=Array(b.size()),q=0;q<p.length;q++)p[q]=JS.SV.sprintf(a,b.get(q),j,c,e,f,h,k,m);return p},"~S,JS.SV");b.sprintf=c(b,"sprintf",function(a,d,b,c,e,f,h,k,m){if(6==d.tok){var j=a.indexOf("[");if(0<=j){var p;d=d.getMap().get(a.substring(j+1,p=a.indexOf("]")));a=a.substring(0,j)+a.substring(p+1)}}null!=c&&(c[0]=JS.SV.iValue(d));null!=
e&&(e[0]=JS.SV.fValue(d));null!=f&&(f[0]=JS.SV.fValue(d));h&&(b[3]=JS.SV.sValue(d));k&&(b[4]=d.value);m&&(b[5]=d.value);return JU.PT.sprintf(a,"IFDspq",b)},"~S,JS.SV,~A,~A,~A,~A,~B,~B,~B");b.getFormatType=c(b,"getFormatType",function(a){return 0<=a.indexOf(";")?-1:";json;base64;base90+35;bytearray;array;string;bitset;xyz;abc;uvw;rxyz;".indexOf(";"+a.toLowerCase()+";")},"~S");b.format=c(b,"format",function(a,d){switch(a.length){case 0:return"";case 1:return JS.SV.sValue(a[0]);case 2:if(2147483647==
d&&(d=JS.SV.getFormatType(a[0].asString())),0<=d)return JS.SV.getFormat(a[1],d)}var b=JU.PT.split(JU.PT.rep(JS.SV.sValue(a[0]),"%%","\u0001"),"%");if(0==b.length)return"";var c=new JU.SB;c.append(b[0]);for(var e=1;e<b.length;e++){var f=JS.SV.sprintf(JU.PT.formatCheck("%"+b[e]),6==a[1].tok?a[1]:7==a[1].tok?a[1].getList().get(e-1):e<a.length?a[e]:null);if(JU.AU.isAS(f))for(var h=0;h<f.length;h++)c.append(f[h]).append("\n");else c.append(f)}return c.toString()},"~A,~N");b.getFormat=c(b,"getFormat",function(a,
d){switch(d){case 0:var b=a.myName;a.myName=null;var c=a.toJSON();a.myName=b;return c;case 5:case 22:case 32:case 38:var e;switch(a.tok){case 15:e=JU.AU.arrayCopyByte(a.value.data,-1);break;case 7:b=a.getList();if(32==d){e=new JU.Lst;for(c=b.size();0<=--c;)e.addLast(b.get(c));return e}e=Q(b.size(),0);for(c=e.length;0<=--c;)e[c]=b.get(c).asInt();break;default:if(b=a.asString(),b.startsWith(";base64,")){if(5==d)return b;e=JU.Base64.decodeBase64(b)}else{if(38<=d)return b;e=b.getBytes()}}return JS.SV.fromBytes(e,
d)}return null},"JS.SV,~N");b.fromBytes=c(b,"fromBytes",function(a,d){switch(d){case 22:return new JU.BArray(a);case 5:return";base64,"+JU.Base64.getBase64(a).toString();case 32:return JS.SV.getVariable(a);case 38:return String.instantialize(a)}return null},"~A,~N");b.getBitSet=c(b,"getBitSet",function(a,d){switch(a.tok){case 10:return(2147483647==a.index?JS.SV.selectItemTok(a,-2147483648):a).value;case 7:return JS.SV.unEscapeBitSetArray(a.getList(),d);default:return d?null:new JU.BS}},"JS.SV,~B");
b.unEscapeBitSetArray=c(b,"unEscapeBitSetArray",function(a,d){for(var b=new JU.BS,c=0;c<a.size();c++){var e=a.get(c);if(2==e.tok&&0<=e.intValue)b.set(e.intValue);else if(7==e.tok){e=JS.SV.unEscapeBitSetArray(e.getList(),!0);if(null==e)return d?null:new JU.BS;b.or(e)}else if(!JS.SV.unEscapeBitSet(e,b))return d?null:new JU.BS}return b},"JU.Lst,~B");b.areEqual=c(b,"areEqual",function(a,d){if(null==a||null==d)return!1;if(null!=a.value&&a.value===d.value)return!0;if(a.tok==d.tok)switch(a.tok){case 2:if(2==
d.tok)return a.intValue==d.intValue;break;case 4:return a.value.equalsIgnoreCase(d.value);case 10:case 15:case 6:case 7:case 14:return a.equals(d);case 8:return 1E-6>a.value.distance(d.value);case 9:return 1E-6>a.value.distance4(d.value);case 11:return a.value.equals(d.value);case 12:return a.value.equals(d.value)}else if(10==a.tok&&4==d.tok&&d.value.startsWith(";base90+35,"))return a.value.equals(JS.SV.decodeBase90_35(d.value));return a.isNaN()?d.isNaN():1E-6>Math.abs(JS.SV.fValue(a)-JS.SV.fValue(d))},
"JS.SV,JS.SV");b.isLike=c(b,"isLike",function(a,d){return null!=a&&null!=d&&4==a.tok&&4==d.tok&&JU.PT.isLike(a.value,d.value)},"JS.SV,JS.SV");b.contains=c(b,"contains",function(a,d){return null!=a&&null!=d&&4==a.tok&&4==d.tok&&a.value.contains(d.value)},"JS.SV,JS.SV");c(b,"sortOrReverse",function(a){var d=this.getList();if(null!=d&&1<d.size())if(-2147483648==a){a=d.size();for(var b=0;b<a;b++){var c=d.get(b);d.set(b,d.get(--a));d.set(a,c)}}else java.util.Collections.sort(this.getList(),U(JS.SV.Sort,
this,null,--a,null));return this},"~N");c(b,"pushPop",function(a,d){if(null==a){if(4==this.tok){if(null==d){var b=this.value,c=b.length-1;if(0>c)return JS.SV.newS("");var e=b.substring(c);this.value=b.substring(0,c);return JS.SV.newS(e)}this.value+=JS.SV.sValue(d);return this}c=this.getMap();if(null==c){b=this.getList();if(null==d||null==b)return null==b||0==b.size()?JS.SV.newS(""):b.removeItemAt(b.size()-1);b.addLast(JS.SV.copySafely(d))}else null==d?c.clear():(b=d.getMap(),null!=b&&c.putAll(b))}else{c=
this.getMap();if(null==d){b=null;if(null==c){var c=this.getList(),e=c.size(),f=JS.SV.iValue(a)-1;0>f&&(f+=e);0<=f&&f<e&&(b=c.removeItemAt(f))}else b=c.remove(a.asString());return null==b?JS.SV.newS(""):b}null!=c&&this.addToMap(c,a,d)}return this},"JS.SV,JS.SV");c(b,"addToMap",function(a,d,b){a.put(d.asString(),JS.SV.copySafely(b))},"java.util.Map,JS.SV,JS.SV");b.unEscapeBitSet=c(b,"unEscapeBitSet",function(a,d){switch(a.tok){case 4:var b=JU.BS.unescape(a.value);if(null==b)break;d.or(b);return!0;case 10:return d.or(a.value),
!0}return!1},"JS.SV,JU.BS");b.strListValue=c(b,"strListValue",function(a){if(7!=a.tok)return x(-1,[JS.SV.sValue(a)]);a=a.getList();for(var d=Array(a.size()),b=a.size();0<=--b;)d[b]=JS.SV.sValue(a.get(b));return d},"JS.T");b.getArrayDepth=c(b,"getArrayDepth",function(a){for(var d=0,b;7==a.tok&&0<(b=a.getList()).size();)d++,a=b.get(0);return d},"JS.T");b.fflistValue=c(b,"fflistValue",function(a){if(7!=a.tok)return x(-1,[L(-1,[JS.SV.fValue(a)])]);a=a.getList();var d=a.size(),b;b=JU.AU.newFloat2(d);for(var c=
b.length;0<=--c;)b[c]=JS.SV.flistValue(c>=d?null:a.get(c),0);return b},"JS.T,~N");b.flistValue=c(b,"flistValue",function(a,d){if(null==a||7!=a.tok)return L(-1,[JS.SV.fValue(a)]);var b=a.getList(),c;c=L(Math.max(d,b.size()),0);0==d&&(d=c.length);for(var e=Math.min(b.size(),d);0<=--e;)c[e]=JS.SV.fValue(b.get(e));return c},"JS.T,~N");c(b,"toArray",function(){var a,d,b=null,c=null;switch(this.tok){case 10:d=new JU.Lst;a=JS.SV.getBitSet(this,!0);for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))d.addLast(JS.SV.newI(e));
return JS.SV.newV(7,d);case 11:b=this.value;a=3;break;case 12:c=this.value;a=4;break;case 7:return this;case 1275068418:return this.arrayToList(new JS.SV);default:return d=new JU.Lst,d.addLast(this),JS.SV.newV(7,d)}d=new JU.Lst;for(e=0;e<a;e++){var f=L(a,0);null==b?c.getRow(e,f):b.getRow(e,f);d.addLast(JS.SV.getVariableAF(f))}return JS.SV.newV(7,d)});c(b,"arrayToList",function(a){if(1275068418!=this.tok||null==a)return null;for(var d=this.value,b=new JU.Lst,c=0,e=d.length;c<e;c++)b.addLast(JS.SV.getVariable(d[c]));
a.tok=7;a.value=b;return a},"JS.SV");c(b,"mapValue",function(a){switch(this.tok){case 6:var d=this.value.get(a);return null==d&&a.equals("length")&&this.value.containsKey("_DATA_")?(d=this.value.get("_DATA_"),JS.SV.newI(d.value.data.length)):d;case 14:return d=this.value,a.equals("_path")?JS.SV.newS(d.contextPath):d.getVariable(a)}return null},"~S");c(b,"getList",function(){switch(this.tok){case 7:return this.value;case 1275068418:return this.tok=7,this.value=this.toArray().value;default:return null}});
b.isScalar=c(b,"isScalar",function(a){switch(a.tok){case 7:return!1;case 4:return 0>a.value.indexOf("\n");default:return!0}},"JS.SV");j(b,"toJSON",function(){switch(this.tok){case 1073742335:case 1073742334:case 2:case 3:return JS.SV.sValue(this);case 15:return JU.PT.byteArrayToJSON(this.value.data);case 14:return JU.PT.toJSON(null,this.value.getFullMap());case 7:case 6:if(null!=this.myName)return this.myName=null,6==this.tok?"{  }":"[  ]";this.myName="x";var a=JU.PT.toJSON(null,this.value);this.myName=
null;return a;default:return JU.PT.toJSON(null,this.value)}});c(b,"mapGet",function(a){return this.getMap().get(a)},"~S");c(b,"mapPut",function(a,d){switch(this.tok){case 6:case 14:this.getMap().put(a,JS.SV.copySafely(d))}},"~S,JS.SV");c(b,"getMap",function(){switch(this.tok){case 6:return this.value;case 14:return this.value.vars}return null});c(b,"getMapKeys",function(a,d){if(6!=this.tok)return"";var b=new JU.SB;JS.SV.sValueArray(b,this,"","",!0,!1,!1,a+1,d);return b.toString()},"~N,~B");j(b,"toString",
function(){return this.toString2()+"["+this.myName+" index ="+this.index+" intValue="+this.intValue+"]"});c(b,"getKeys",function(a){switch(this.tok){case 6:case 14:case 7:break;default:return null}var d=new JU.Lst;this.getKeyList(a,d,"");a=d.toArray(Array(d.size()));java.util.Arrays.sort(a);return a},"~B");c(b,"getKeyList",function(a,d,b){var c=this.getMap();if(null==c){if(a){var e,f;null!=(e=this.getList())&&0<(f=e.size())&&e.get(f-1).getKeyList(!0,d,b+"."+f+".")}}else for(var h,c=c.entrySet().iterator();c.hasNext()&&
((h=c.next())||1);)e=h.getKey(),a?(f=b.endsWith("."),0==e.length||!JU.PT.isLetter(e.charAt(0))?(f&&(b=b.substring(0,b.length-1)),e="["+JU.PT.esc(e)+"]"):!f&&0<b.length&&(b+="."),d.addLast(b+e),h.getValue().getKeyList(!0,d,b+e+".")):d.addLast(b+e)},"~B,JU.Lst,~S");b.deepCopy=c(b,"deepCopy",function(a,d,b){if(d){d=new java.util.Hashtable;var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){var e=c.getValue();d.put(c.getKey(),b?JS.SV.deepCopySV(e):e)}return d}c=new JU.Lst;d=0;for(e=a.size();d<
e;d++){var f=a.get(d);c.addLast(b?JS.SV.deepCopySV(f):f)}return c},"~O,~B,~B");b.deepCopySV=c(b,"deepCopySV",function(a){switch(a.tok){case 6:case 7:if("\r".equals(a.myName))a.myName=null,a=JS.SV.newV(a.tok,6==a.tok?new java.util.Hashtable:new JU.Lst);else{var d=a.myName;a.myName="\r";var b=a;a=JS.SV.newV(a.tok,JS.SV.deepCopy(a.value,6==a.tok,!0));b.myName=d}}return a},"JS.SV");c(b,"sortMapArray",function(a){null!=this.getList()&&java.util.Collections.sort(this.getList(),U(JS.SV.Sort,this,null,0,
a));return this},"~S");b.safeJSON=c(b,"safeJSON",function(a,d){return"{"+(y(d,"JS.SV")?JU.PT.esc(a)+" : "+JS.SV.format(x(-1,[null,d]),0):JU.PT.toJSON(a,d))+"}"},"~S,~O");c(b,"isNaN",function(){return this===JS.SV.vNaN||"NaN".equals(this.value)});b.$SV$Sort$=function(){var a=n(function(){X(this,arguments);this.arrayPt=0;this.myKey=null;v(this,arguments)},JS.SV,"Sort",null,java.util.Comparator);A(a,function(a,b){this.arrayPt=a;this.myKey=b},"~N,~S");j(a,"compare",function(a,b){if(a.tok!=b.tok){if(3==
a.tok||2==a.tok||3==b.tok||2==b.tok){var c=JS.SV.fValue(a),e=JS.SV.fValue(b);return c<e?-1:c>e?1:0}if(4==a.tok||4==b.tok)return JS.SV.sValue(a).compareTo(JS.SV.sValue(b))}switch(a.tok){case 2:return a.intValue<b.intValue?-1:a.intValue>b.intValue?1:0;case 4:return JS.SV.sValue(a).compareTo(JS.SV.sValue(b));case 7:c=a.getList();e=b.getList();if(c.size()!=e.size())return c.size()<e.size()?-1:1;var f=this.arrayPt;0>f&&(f+=c.size());return 0>f||f>=c.size()?0:this.compare(c.get(f),e.get(f));case 6:if(null!=
this.myKey)return this.compare(a.getMap().get(this.myKey),b.getMap().get(this.myKey));default:return c=JS.SV.fValue(a),e=JS.SV.fValue(b),c<e?-1:c>e?1:0}},"JS.SV,JS.SV")};b.vT=JS.SV.newSV(1073742335,1,"true");b.vF=JS.SV.newSV(1073742334,0,"false");b.vNaN=JS.SV.newSV(3,2147483647,Float.$valueOf(NaN));b.pt0=new JU.P3;b.jvxlCoder=null});s("JS");B(["java.util.Hashtable"],"JS.T",["java.util.Arrays","JU.AU","$.Lst","JU.Logger"],function(){var b=n(function(){this.tok=0;this.value=null;this.intValue=2147483647;
v(this,arguments)},JS,"T",null);b.t=c(b,"t",function(a){var d=new JS.T;d.tok=a;return d},"~N");b.tv=c(b,"tv",function(a,d,b){a=JS.T.t(a);a.intValue=d;a.value=b;return a},"~N,~N,~O");b.o=c(b,"o",function(a,d){var b=JS.T.t(a);b.value=d;return b},"~N,~O");b.n=c(b,"n",function(a,d){var b=JS.T.t(a);b.intValue=d;return b},"~N,~N");b.i=c(b,"i",function(a){var d=JS.T.t(2);d.intValue=a;return d},"~N");b.tokAttr=c(b,"tokAttr",function(a,d){return(a&d)==(d&d)},"~N,~N");b.tokAttrOr=c(b,"tokAttrOr",function(a,
d,b){return(a&d)==(d&d)||(a&b)==(b&b)},"~N,~N,~N");b.getPrecedence=c(b,"getPrecedence",function(a){return a>>9&15},"~N");b.getMaxMathParams=c(b,"getMaxMathParams",function(a){return a>>9&3},"~N");b.addToken=c(b,"addToken",function(a,d){JS.T.tokenMap.put(a,d)},"~S,JS.T");b.getTokenFromName=c(b,"getTokenFromName",function(a){return JS.T.tokenMap.get(a)},"~S");b.getTokFromName=c(b,"getTokFromName",function(a){a=JS.T.getTokenFromName(a.toLowerCase());return null==a?0:a.tok},"~S");b.nameOf=c(b,"nameOf",
function(a){for(var d,b=JS.T.tokenMap.values().iterator();b.hasNext()&&((d=b.next())||1);)if(d.tok==a)return""+d.value;return"0x"+Integer.toHexString(a)},"~N");j(b,"toString",function(){return this.toString2()});c(b,"toString2",function(){return"Token["+JS.T.astrType[16>this.tok?this.tok:16]+"("+this.tok%1E3+"/0x"+Integer.toHexString(this.tok)+")"+(2147483647==this.intValue?"":" intValue="+this.intValue+"(0x"+Integer.toHexString(this.intValue)+")")+(null==this.value?"":"string"==typeof this.value?
' value="'+this.value+'"':y(this.value,"JS.SV")?' value="'+this.value.asString()+'"':" value="+this.value)+"]"});b.getCommandSet=c(b,"getCommandSet",function(a){var d="",b=new java.util.Hashtable,g=0;a=null==a||0==a.length?null:a.toLowerCase();for(var c=null!=a&&1<a.length,l,e=JS.T.tokenMap.entrySet().iterator();e.hasNext()&&((l=e.next())||1);){var f=l.getKey(),h=l.getValue();0!=(h.tok&4096)&&((null==a||0==f.indexOf(a))&&(c||h.value.equals(f)))&&b.put(f,Boolean.TRUE)}for(e=b.entrySet().iterator();e.hasNext()&&
((l=e.next())||1);)if(f=l.getKey(),"s"!=f.charAt(f.length-1)||!b.containsKey(f.substring(0,f.length-1)))d+=(0==g++?"":";")+f;return d},"~S");b.getAtomPropertiesLike=c(b,"getAtomPropertiesLike",function(a){a=a.toLowerCase();for(var d=new JU.Lst,b=0==a.length,g,c=JS.T.tokenMap.entrySet().iterator();c.hasNext()&&((g=c.next())||1);){var l=g.getKey();if("_"!=l.charAt(0)){var e=g.getValue();if(JS.T.tokAttr(e.tok,1077936128)&&(b||l.toLowerCase().startsWith(a))){if(b||!e.value.toLowerCase().startsWith(a))e=
JS.T.o(e.tok,l);d.addLast(e)}}}return 0==d.size()?null:d},"~S");b.getTokensLike=c(b,"getTokensLike",function(a){a=a.equals("setparam")?536870912:a.equals("misc")?1073741824:a.equals("mathfunc")?134217728:4096;for(var d=536870912==a?1610612736:0,b=new JU.Lst,g,c=JS.T.tokenMap.entrySet().iterator();c.hasNext()&&((g=c.next())||1);){var l=g.getKey(),e=g.getValue();JS.T.tokAttr(e.tok,a)&&(0==d||!JS.T.tokAttr(e.tok,d))&&b.addLast(l)}g=b.toArray(Array(b.size()));java.util.Arrays.sort(g);return g},"~S");
b.getSettableTokFromString=c(b,"getSettableTokFromString",function(a){a=JS.T.getTokFromName(a);return 0!=a&&JS.T.tokAttr(a,2048)&&!JS.T.tokAttr(a,1140850688)?a:0},"~S");b.completeCommand=c(b,"completeCommand",function(a,d,b,g,c){null==a?a=JS.T.tokenMap:b=!1;var l=new JU.Lst;g=g.toLowerCase();var e;for(a=a.keySet().iterator();a.hasNext()&&((e=a.next())||1);)if(e.startsWith(g)){var f=JS.T.getTokFromName(e);(b?JS.T.tokAttr(f,4096):d?JS.T.tokAttr(f,536870912)&&!JS.T.tokAttr(f,1610612736):1)&&l.addLast(e)}return JU.AU.sortedItem(l,
c)},"java.util.Map,~B,~B,~S,~N");b.getParamType=c(b,"getParamType",function(a){return!JS.T.tokAttr(a,536870912)?0:a&662700032},"~N");b.getTokensType=c(b,"getTokensType",function(a,d){for(var b,g=JS.T.tokenMap.entrySet().iterator();g.hasNext()&&((b=g.next())||1);){var c=b.getValue();JS.T.tokAttr(c.tok,d)&&a.put(b.getKey(),b.getValue())}},"java.util.Map,~N");b.isIDcmd=c(b,"isIDcmd",function(a){switch(a){case 135180:case 135176:case 135174:case 135188:case 134353926:return!0;default:return!1}},"~N");
c(b,"equals",function(a){if(!y(a,"JS.T"))return!1;if(this.tok==a.tok)return a.intValue==this.intValue&&(2==this.tok||1073742335==this.tok||1073742334==this.tok||a.value.equals(this.value));switch(this.tok){case 2:return 3==a.tok&&a.value.floatValue()==this.intValue;case 3:return 2==a.tok&&this.value.floatValue()==a.intValue;default:return!1}},"~O");JS.T.astrType="nada identifier integer decimal string inscode hash array point point4 bitset matrix3f matrix4f array hash bytearray keyword".$plit(" ");
b.tokenSpaceBeforeSquare=JS.T.o(1073742195," ");b.tokenOn=JS.T.tv(1073742335,1,"on");b.tokenOff=JS.T.tv(1073742334,0,"off");b.tokenAll=JS.T.o(1073742327,"all");b.tokenIf=JS.T.o(134320649,"if");b.tokenAnd=JS.T.o(268438528,"and");b.tokenAndSpec=JS.T.o(268439552,"");b.tokenOr=JS.T.o(268438016,"or");b.tokenAndFALSE=JS.T.o(268438528,"and");b.tokenOrTRUE=JS.T.o(268438016,"or");b.tokenOpIf=JS.T.o(805307393,"?");b.tokenComma=JS.T.o(268436992,",");b.tokenDefineString=JS.T.tv(12290,4,"@");b.tokenPlus=JS.T.o(268440577,
"+");b.tokenMinus=JS.T.o(268440576,"-");b.tokenMul3=JS.T.o(1275068930,"mul3");b.tokenTimes=JS.T.o(268441089,"*");b.tokenDivide=JS.T.o(268441088,"/");b.tokenLength=JS.T.tv(268442113,1275068435,"len3");b.tokenLeftParen=JS.T.o(268435968,"(");b.tokenRightParen=JS.T.o(268435969,")");b.tokenArraySquare=JS.T.o(1275068418,"[");b.tokenArrayOpen=JS.T.o(268437504,"[");b.tokenArrayClose=JS.T.o(268437505,"]");b.tokenLeftBrace=JS.T.o(1073742332,"{");b.tokenExpressionBegin=JS.T.o(1073742325,"expressionBegin");b.tokenExpressionEnd=
JS.T.o(1073742326,"expressionEnd");b.tokenConnected=JS.T.o(134217736,"connected");b.tokenCoordinateBegin=JS.T.o(1073742332,"{");b.tokenRightBrace=JS.T.o(1073742338,"}");b.tokenCoordinateEnd=JS.T.tokenRightBrace;b.tokenColon=JS.T.o(268436482,":");b.tokenSetCmd=JS.T.o(36867,"set");b.tokenSet=JS.T.tv(36867,61,"");b.tokenSetArray=JS.T.tv(36867,91,"");b.tokenSetProperty=JS.T.tv(36867,46,"");b.tokenSetVar=JS.T.tv(36868,61,"var");b.tokenEquals=JS.T.o(268440324,"=");b.tokenScript=JS.T.o(134222850,"script");
b.tokenSwitch=JS.T.o(102410,"switch");b.tokenMap=new java.util.Hashtable;for(var a=x(-1,["(",JS.T.tokenLeftParen,")",JS.T.tokenRightParen,"and",JS.T.tokenAnd,"&",null,"&&",null,"or",JS.T.tokenOr,"|",null,"||",null,"?",JS.T.tokenOpIf,",",JS.T.tokenComma,"=",JS.T.tokenEquals,"==",null,":",JS.T.tokenColon,"+",JS.T.tokenPlus,"-",JS.T.tokenMinus,"*",JS.T.tokenTimes,"/",JS.T.tokenDivide,"script",JS.T.tokenScript,"source",null,"set",JS.T.tokenSetCmd,"switch",JS.T.tokenSwitch,"all",JS.T.tokenAll,"off",JS.T.tokenOff,
"false",null,"on",JS.T.tokenOn,"true",null]),d,b=null,g,l,e=a.length-1,f=0;f<e;f+=2)g=a[f],l=g.toLowerCase(),d=a[f+1],null==d?d=b:null==d.value&&(d.value=g),JS.T.tokenMap.put(l,d),b=d;var a=null,a=x(-1,"+= -= *= /= \\= &= |= not ! xor tog < <= >= > != <> LIKE CONTAINS within . .. [ ] { } $ % ; ++ -- ** \\ animation anim assign axes backbone background bind bondorder boundbox boundingBox break calculate capture cartoon cartoons case catch cd center centre centerat cgo color colour compare configuration conformation config connect console contact contacts continue data default define @ delay delete density depth dipole dipoles display dot dots draw echo ellipsoid ellipsoids else elseif end endif exit eval file files font for format frame frames frank function functions geosurface getProperty goto halo halos helix helixalpha helix310 helixpi hbond hbonds help hide history hover if in initialize invertSelected isosurface javascript label labels lcaoCartoon lcaoCartoons load log loop matrix measure measures monitor monitors meshribbon meshribbons message minimize minimization mo mode2d model models modulation move moveTo mutate navigate navigation nbo origin out parallel pause wait plot private plot3d pmesh polygon polyhedra polyhedron print process prompt quaternion quaternions quit ramachandran rama refresh reset unset restore restrict return ribbon ribbons rocket rockets rotate rotateSelected save select selectionHalos selectionHalo showSelections sheet show slab spacefill cpk spin ssbond ssbonds star stars step steps stereo strand strands structure _structure strucNo struts strut subset subsystem synchronize sync this trace translate translateSelected try unbind unitcell var varna vector vectors vibration while wireframe write zap zoom zoomTo atom atoms axisangle basepair basepairs orientation orientations pdbheader polymer polymers residue residues rotation row sequence seqcode shape state symbol symmetry symmetryHM spaceGroup transform translation url _ abs absolute _args acos add adpmax adpmin align altloc altlocs ambientOcclusion amino angle array as _a atomID _atomID atomIndex atomName atomno atomType atomX atomY atomZ average babel babel21 back backlit backshell balls baseModel best beta bin bondCount bonded bottom branch brillouin bzone cache carbohydrate cell chain chains chainNo chemicalShift cs clash clear clickable clipboard connected context constraint contourLines coord coordinates coords cos cross covalentRadius covalent direction displacement displayed distance div DNA domains dotted DSSP DSSR element elemno _e error exportScale fill find fixedTemperature forcefield formalCharge charge eta front frontlit frontOnly fullylit fx fy fz fxyz fux fuy fuz fuxyz group groups group1 _g groupID _groupID groupIndex hidden highlight hkl hydrophobicity hydrophobic hydro id identify ident image info infoFontSize inline insertion insertions intramolecular intra intermolecular inter bondingRadius ionicRadius ionic isAromatic Jmol JSON join keys last left length lines list magneticShielding ms mass max mep mesh middle min mlp mode modify modifyOrCreate modt modt1 modt2 modt3 modx mody modz modo modxyz molecule molecules modelIndex monomer morph movie mouse mul mul3 nboCharges nci next noDelay noDots noFill noMesh none null inherit normal noBackshell noContourLines notFrontOnly noTriangles now nucleic occupancy omega only opaque options partialCharge pattern phi pivot plane planar play playRev point points pointGroup polymerLength pop previous prev probe property properties protein psi purine push PyMOL pyrimidine random range rasmol replace resno resume rewind reverse right rmsd RNA rna3d rock rubberband rxyz saSurface saved scale scene search smarts selected seqid shapely sidechain sin site size smiles substructure solid sort specialPosition spinOp sqrt split starWidth starScale stddev straightness structureId supercell sub sum sum2 surface surfaceDistance symop symops sx sy sz sxyz tan temperature relativeTemperature tensor theta thisModel ticks top torsion trajectory trajectories translucent transparent triangles trim type ux uy uz uxyz user uvw valence vanderWaals vdw vdwRadius visible volume vx vy vz vxyz xyz w wyckoff wyckoffm x y z addHydrogens allConnected angstroms anisotropy append arc area aromatic arrow async audio auto axis barb binary blockData cancel cap cavity centroid check checkCIR chemical circle collapsed col colorScheme command commands contour contours corners count criterion create crossed curve cutoff cylinder diameter discrete distanceFactor downsample drawing dynamicMeasurements eccentricity ed edges edgesOnly energy exitJmol faceCenterOffset filter first fixed fix flat fps from frontEdges full fullPlane functionXY functionXYZ gridPoints hiddenLinesDashed homo ignore InChI InChIKey increment insideout interior intersection intersect internal lattice line lineData link lobe lonePair lp lumo macro macros manifest mapProperty maxSet menu minSet modelBased molecular mrc msms name nmr noCross noDebug noEdges noHead noLoad noPlane object obj offset offsetSide once orbital atomicOrbital packed palindrome parameters path pdb period periodic perpendicular perp phase planarParam pocket pointsPerAngstrom radical rad reference remove resolution reverseColor rotate45 selection sigma sign silent sphere squared stdInChI stdInChIKey stop title titleFormat to validation value variable variables vertices width wigner wignerSeitz backgroundModel celShading celShadingPower debug debugHigh defaultLattice measurements measurement scale3D toggleLabel userColorScheme throw timeout timeouts window animationMode appletProxy atomTypes axesColor axis1Color axis2Color axis3Color backgroundColor bondmode boundBoxColor boundingBoxColor chirality cipRule currentLocalPath dataSeparator defaultAngleLabel defaultColorScheme defaultColors defaultDirectory defaultDistanceLabel defaultDropScript defaultLabelPDB defaultLabelXYZ defaultLoadFilter defaultLoadScript defaults defaultTorsionLabel defaultVDW drawFontSize eds edsDiff energyUnits fileCacheDirectory fontsize helpPath hoverLabel language loadFormat loadLigandFormat logFile measurementUnits nihResolverFormat nmrPredictFormat nmrUrlFormat pathForAllFiles picking pickingStyle pickLabel platformSpeed propertyColorScheme quaternionFrame smilesUrlFormat smiles2dImageFormat unitCellColor axesOffset axisOffset axesScale axisScale bondTolerance cameraDepth defaultDrawArrowScale defaultTranslucent dipoleScale ellipsoidAxisDiameter gestureSwipeFactor hbondsAngleMinimum hbondHXDistanceMaximum hbondsDistanceMaximum hbondNODistanceMaximum hoverDelay loadAtomDataTolerance minBondDistance minimizationCriterion minimizationMaxAtoms modulationScale mouseDragFactor mouseWheelFactor navFPS navigationDepth navigationSlab navigationSpeed navX navY navZ particleRadius pointGroupDistanceTolerance pointGroupLinearTolerance radius rotationRadius scaleAngstromsPerInch sheetSmoothing slabRange solventProbeRadius spinFPS spinX spinY spinZ stereoDegrees strutDefaultRadius strutLengthMaximum vectorScale vectorsCentered vectorSymmetry vectorTrail vibrationPeriod vibrationScale visualRange ambientPercent ambient animationFps axesMode bondRadiusMilliAngstroms bondingVersion delayMaximumMs diffusePercent diffuse dotDensity dotScale ellipsoidDotCount helixStep hermiteLevel historyLevel labelpointerwidth lighting logLevel meshScale minimizationReportSteps minimizationSteps minPixelSelRadius percentVdwAtom perspectiveModel phongExponent pickingSpinRate propertyAtomNumberField propertyAtomNumberColumnCount propertyDataColumnCount propertyDataField repaintWaitMs ribbonAspectRatio contextDepthMax scriptReportingLevel showScript smallMoleculeMaxAtoms specular specularExponent specularPercent specPercent specularPower specpower strandCount strandCountForMeshRibbon strandCountForStrands strutSpacing zDepth zSlab zshadePower allowEmbeddedScripts allowGestures allowKeyStrokes allowModelKit allowMoveAtoms allowMultiTouch allowRotateSelected antialiasDisplay antialiasImages antialiasTranslucent appendNew applySymmetryToBonds atomPicking allowAudio autobond autoFPS autoplayMovie axesMolecular axesOrientationRasmol axesUnitCell axesWindow bondModeOr bondPicking bonds bond cartoonBaseEdges cartoonBlocks cartoonBlockHeight cartoonsFancy cartoonFancy cartoonLadders cartoonRibose cartoonRockets cartoonSteps chainCaseSensitive cipRule6Full colorRasmol debugScript defaultStructureDssp disablePopupMenu displayCellParameters showUnitcellInfo dotsSelectedOnly dotSurface doublePrecision dragSelected drawHover drawPicking dsspCalculateHydrogenAlways elementKey ellipsoidArcs ellipsoidArrows ellipsoidAxes ellipsoidBall ellipsoidDots ellipsoidFill fileCaching fontCaching fontScaling forceAutoBond fractionalRelative greyscaleRendering hbondsBackbone hbondsRasmol hbondsSolid hetero hideNameInPopup hideNavigationPoint hideNotSelected highResolution hydrogen hydrogens imageState isKiosk isosurfaceKey isosurfacePropertySmoothing isosurfacePropertySmoothingPower jmolInJSpecView justifyMeasurements labelKey languageTranslation leadAtom leadAtoms legacyAutoBonding legacyHAddition legacyJavaFloat logCommands logGestures macroDirectory measureAllModels measurementLabels measurementNumbers messageStyleChime minimizationRefresh minimizationSilent modelkit modelkitMode modulateOccupancy monitorEnergy multiplebondbananas multipleBondRadiusFactor multipleBondSpacing multiProcessor navigationMode navigationPeriodic occupancyThreshold partialDots pdbAddHydrogens pdbGetHeader pdbSequential perspectiveDepth preserveState rangeSelected redo redoMove refreshing ribbonBorder rocketBarrels saveProteinStructureState scriptQueue selectAllModels selectHetero selectHydrogen showAxes showBoundBox showBoundingBox showFrank showHiddenSelectionHalos showHydrogens showKeyStrokes showMeasurements showModulationVectors showMultipleBonds showNavigationPointAlways showTiming showUnitcell showUnitcellDetails slabByAtom slabByMolecule slabEnabled smartAromatic solvent solventProbe ssBondsBackbone statusReporting strutsMultiple syncMouse syncScript testFlag1 testFlag2 testFlag3 testFlag4 traceAlpha twistedSheets undoAuto undo undoMax undoMove useMinimizationThread useNumberLocalization waitForMoveTo windowCentered wireframeRotation zeroBasedXyzRasmol zoomEnabled zoomHeight zoomLarge zShade".split(" ")),
h=F(-1,[268442114,-1,-1,-1,-1,-1,-1,268439040,-1,268438017,268438018,268440323,268440322,268440321,268440320,268440325,-1,268440326,268440327,134217759,1073742336,1073742337,268437504,268437505,1073742332,1073742338,1073742330,268441090,1073742339,268441602,268441601,268441603,268441091,4097,-1,4098,1611272194,1114249217,1610616835,4100,4101,1812599299,-1,102407,4102,4103,1112152066,-1,102411,102412,20488,12289,-1,4105,135174,1765808134,-1,134221831,1094717448,-1,-1,4106,528395,134353926,-1,102408,
134221834,102413,12290,-1,528397,12291,1073741914,554176526,135175,-1,1610625028,1275069444,1112150019,135176,537022465,1112150020,-1,364547,102402,102409,364548,266255,134218759,1228935687,-1,4114,134320648,1287653388,4115,-1,1611272202,134320141,-1,1112150021,1275072526,20500,1112152070,-1,136314895,2097159,2097160,2097162,1613238294,-1,20482,12294,1610616855,544771,134320649,1275068432,4121,4122,135180,134238732,1825200146,-1,135182,-1,134223363,36869,528411,134217766,1745489939,-1,-1,-1,1112152071,
-1,20485,4126,-1,1073877010,603979882,1094717454,-1,1275072532,4128,4129,4130,4131,-1,1073877011,1073742078,1073742079,102436,20487,-1,4133,4134,135190,135188,1073742106,1275203608,-1,36865,102439,134256129,134221850,-1,266281,4138,-1,266284,4141,-1,4142,12295,36866,1112152073,-1,1112152074,-1,528432,4145,4146,1275082241,1611141172,-1,-1,2097184,134222350,554176565,1112152075,-1,1095241729,1611141176,-1,1112152076,-1,266298,-1,528443,1649022989,-1,1639976963,-1,1094713370,659482,-1,2109448,1094713371,
4156,-1,1073742340,1112152078,4160,4162,364558,4163,1814695966,36868,20489,135198,-1,4166,102406,659488,134221856,12297,4168,4170,1153433601,-1,134217731,1073741863,-1,1073742077,-1,1073742088,1094713362,-1,1073742120,-1,1073742132,1275068935,1086324744,1086324747,1086324748,1073742158,1086326798,1088421903,603979956,134217764,1073742176,1073742178,1073742184,1275068446,134218250,1073741826,134217765,134218241,1275069441,1111490561,1111490562,1073741832,1086324739,-1,553648129,2097154,134217729,1275068418,
1073741848,1094713346,-1,-1,1094713347,1086326786,1094715393,1086326785,1111492609,1111492610,1111492611,96,1073741856,1073741857,1073741858,1073741861,1073741862,1073741859,2097200,1073741864,1073741865,1275068420,1228931586,2097155,1073741871,1073742328,1073741872,-1,134221829,2097188,1094713349,1086326788,-1,1094713351,1111490563,-1,1073741881,1073741882,2097190,1073741884,134217736,14,1073741894,1073741898,1073742329,-1,-1,134218245,1275069442,1111490564,-1,1073741918,1073741922,2097192,1275069443,
1275068928,2097156,1073741925,1073741926,1073741915,1111490587,1086326789,1094715402,1094713353,1073741936,570425357,1073741938,1275068427,1073741946,545259560,1631586315,-1,1111490565,1073741954,1073741958,1073741960,1073741964,1111492612,1111492613,1111492614,1145047050,1111492615,1111492616,1111492617,1145047053,1086324742,-1,1086324743,1094713356,-1,-1,1094713357,2097194,536870920,134219777,1113589786,-1,-1,1073741974,1086324745,-1,4120,1073741982,553648145,1073741984,1086324746,-1,1073741989,
-1,1073741990,-1,1111492618,-1,-1,1073742331,1073741991,1073741992,1275069446,1140850706,1073741993,1073741996,1275068435,1140850692,1073742001,1111490566,-1,1111490567,64,1073742016,1073742018,1073742019,32,1073742022,1073742024,1073742025,1073742026,1111490580,-1,1111490581,1111490582,1111490583,1111490584,1111490585,1111490586,1145045008,1094713360,-1,1094713359,1094713361,1073742029,1073742031,1073742030,1275068929,1275068930,603979891,1073742036,1073742037,603979892,1073742042,1073742046,1073742052,
1073742333,-1,-1,1073742056,1073742057,1073742039,1073742058,1073742060,134218760,2097166,1128269825,1111490568,1073742072,1073742074,1073742075,1111492619,134218753,1111490569,1275068725,134217750,-1,1073742096,1073742098,134217751,-1,1275068447,1094713363,1275334681,1073742108,-1,1073742109,1715472409,-1,2097168,1111490570,2097170,1275335685,1073742110,2097172,134219266,1073742114,1073742116,1275068443,1094715412,4143,1073742125,1140850693,1073742126,1073742127,2097174,1073742128,1073742129,1073742134,
1145045003,1073742135,1073742136,536875059,1073742139,134218756,-1,1113589787,1094713368,1073742144,2097178,134218244,1094713369,1140850694,134218757,1237320707,1073742150,1275068444,2097196,1296041985,134218246,1275069447,570425403,-1,192,1111490574,1086324749,1073742163,1275068931,128,160,2097180,1111490575,1296041986,-1,1094713365,1094713366,1094713367,1145047052,134218255,1111492620,-1,1275068445,1111490576,2097182,1073742164,1073742172,1073742174,536870926,-1,1111490588,-1,1073742182,1275068932,
1140850696,1111490577,1111490578,1111490579,1145045006,1073742186,1073742187,1094715420,1648363544,-1,-1,2097198,1312817669,1111492626,1111492627,1111492628,1145047055,1145047049,1140850705,1086324754,1086324755,1111492629,1111492630,1111492631,1073741828,1073741834,1073741836,1073741837,1073741839,1073741840,1073741842,1075838996,1073741846,1073741849,4108,1073741852,1073741854,1073741860,1073741866,1073741868,1073741874,1073741875,1073741876,1094713350,1073741877,603979821,1073741879,1073741880,
1073741886,1275068934,1073741888,1073741890,1073741892,1073741896,1073741900,1073741902,1275068425,1073741905,1073741904,1073741906,1073741908,1073741910,1073741912,1073741917,1073741920,1073741924,1073741928,1073741929,603979836,1073741931,1073741932,1073741933,1073741934,1073741935,266256,1073741937,1073741940,1073741942,12293,-1,1073741948,1073741950,1073741952,1073741956,1073741961,1073741962,1073741966,1073741968,1073741970,603979856,1073741973,1073741976,1275068433,1073741978,1073741981,1073741985,
1073741986,134217763,-1,1073741988,1073741994,1073741998,1073742E3,1073741999,1073742002,1073742004,1073742006,1073742008,4124,-1,1073742010,4125,1073742014,1073742015,1073742020,1073742027,1073742028,1073742032,1073742033,1073742034,1073742038,1073742040,1073742041,1073742044,1073742048,1073742050,1073742054,1073742064,1073742062,1073742066,1073742068,1073742070,1073742076,1073741850,1073742080,1073742082,1073742083,1073742084,1073742086,1073742090,-1,1073742092,-1,1073742094,1073742099,1073742100,
1073742104,1073742112,1073742111,1073742118,1073742119,1073742122,1073742124,1073742130,1073742140,1073742146,1073742147,1073742148,1073742154,1073742156,1073742159,1073742160,1073742162,1073742166,1073742168,1073742170,1073742189,1073742188,1073742190,1073742192,1073742194,1073742196,1073742197,-1,536870914,603979820,553648135,536870916,536870917,536870918,537006096,-1,1610612740,1610612741,536870930,36870,536875070,-1,536870932,545259521,545259522,545259524,545259526,545259528,545259530,545259532,
545259534,1610612737,545259536,-1,1086324752,1086324753,545259538,545259540,545259542,545259545,-1,545259546,545259547,545259548,545259543,545259544,545259549,545259550,545259552,545259554,545259555,570425355,545259556,545259557,545259558,545259559,1610612738,545259561,545259562,545259563,545259564,545259565,545259566,545259568,545259570,545259569,545259571,545259572,545259573,545259574,545259576,553648158,545259578,545259580,545259582,545259584,545259586,570425345,-1,570425346,-1,570425348,570425350,
570425352,570425353,570425354,570425356,570425358,570425359,570425361,570425360,-1,570425362,570425363,570425364,570425365,553648152,570425366,570425367,570425368,570425371,570425372,570425373,570425374,570425376,570425378,570425380,570425381,570425382,570425384,1665140738,570425388,570425390,570425392,570425393,570425394,570425396,570425398,570425400,570425402,570425404,570425406,570425408,1648361473,603979972,603979973,553648185,570425412,570425414,570425416,553648130,-1,553648132,553648133,553648134,
553648136,553648137,553648138,-1,553648139,553648140,553648141,553648142,553648143,553648144,553648147,1073741995,553648148,553648149,553648150,553648151,553648153,553648154,553648155,553648156,553648157,553648160,553648161,553648162,553648164,553648165,553648166,553648167,553648168,536870922,553648170,536870924,553648172,553648174,-1,553648176,-1,553648178,553648180,553648182,553648183,553648186,553648188,553648190,603979778,603979780,603979781,603979782,603979783,603979784,603979785,603979786,603979788,
603979790,603979792,603979794,603979796,603979797,603979798,603979800,603979802,603979804,603979806,603979808,603979809,603979812,603979814,1677721602,-1,603979815,603979810,570425347,603979816,-1,603979817,603979818,603979819,603979811,603979822,603979823,603979824,603979825,603979826,603979827,603979828,-1,603979829,603979830,603979831,603979832,603979833,603979834,603979835,603979838,603979839,603979840,603979841,603979842,603979843,603979844,603979845,603979846,603979847,603979848,603979849,603979850,
603979852,603979853,603979854,1612709894,603979858,603979860,603979862,603979863,1612709900,-1,603979864,603979865,603979866,603979867,553648146,603979868,603979869,603979870,603979871,2097165,-1,603979872,603979873,603979874,603979875,603979876,545259567,603979877,603979878,1610612739,603979879,603979880,603979881,603983903,-1,603979884,603979885,603979886,570425369,570425370,603979887,603979889,603979890,553648159,603979893,603979894,603979895,603979896,603979897,603979898,603979899,4139,4140,603979900,
603979901,603979902,603979903,603979904,603979906,603979908,603979910,603979914,603979916,-1,603979918,603979920,603979922,603979924,603979926,603979927,603979928,603979930,603979934,603979936,603979937,603979939,603979940,603979942,603979944,1612709912,603979948,603979952,603979954,603979955,603979957,603979958,603979960,603979962,603979964,603979965,603979966,603979968,603979969,603984065,553648184,4165,603979970,603979971,603979975,603979976,603979977,603979978,603979980,603979982,603979983,603979984]);
a.length!=h.length&&(JU.Logger.error("sTokens.length ("+a.length+") != iTokens.length! ("+h.length+")"),System.exit(1));e=a.length;for(f=0;f<e;f++)g=a[f],l=g.toLowerCase(),d=h[f],d=b=-1==d?b:JS.T.o(d,g),null!=JS.T.tokenMap.get(l)&&JU.Logger.error("duplicate token definition:"+l),JS.T.tokenMap.put(l,d);h=a=null});s("J.shape");B(["J.shape.Shape"],"J.shape.AtomShape","JU.AU $.BS J.atomdata.RadiusData J.c.PAL $.VDW JU.BSUtil $.C".split(" "),function(){var b=n(function(){this.mad=-1;this.paletteIDs=this.colixes=
this.mads=null;this.isActive=!1;this.rd=null;this.isSet=!1;this.monomerCount=0;this.bsSizeDefault=null;v(this,arguments)},J.shape,"AtomShape",J.shape.Shape);j(b,"initShape",function(){});j(b,"initModelSet",function(){this.isSet=!0;var a=this.ms.ac;null!=this.mads&&(this.mads=JU.AU.arrayCopyShort(this.mads,a));null!=this.colixes&&(this.colixes=JU.AU.arrayCopyShort(this.colixes,a));null!=this.paletteIDs&&(this.paletteIDs=JU.AU.arrayCopyByte(this.paletteIDs,a))});j(b,"getSize",function(a){return null==
this.mads?0:this.mads[a]},"~N");j(b,"setSize",function(a,d){this.setSize2(a,d)},"~N,JU.BS");c(b,"setSize2",function(a,d){0==a?this.setSizeRD(null,d):(null==this.rd?this.rd=new J.atomdata.RadiusData(null,a,J.atomdata.RadiusData.EnumType.SCREEN,null):this.rd.value=a,this.setSizeRD(this.rd,d))},"~N,JU.BS");j(b,"setSizeRD",function(a,d){if(this.isSet){this.isActive=!0;var b=null!=a&&0!=a.value,c=null==d,e=this.ms.ac,f=c?e-1:d.nextSetBit(0);null==this.bsSizeSet&&(this.bsSizeSet=JU.BS.newN(e));null==this.mads&&
0<=f&&(this.mads=V(e,0));for(e=f;0<=e;e=c?e-1:d.nextSetBit(e+1))this.setSizeRD2(e,a,b)}},"J.atomdata.RadiusData,JU.BS");c(b,"setSizeRD2",function(a,d,b){var c=this.ms.at[a];this.mads[a]=c.calculateMad(this.vwr,d);this.bsSizeSet.setBitTo(a,b);c.setShapeVisibility(this.vf,b)},"~N,J.atomdata.RadiusData,~B");c(b,"setPropAS",function(a,d,b){if("color"===a){this.isActive=!0;var c=JU.C.getColixO(d),e=J.c.PAL.pidOf(d);d=this.checkColixLength(c,b.length());for(a=b.nextSetBit(0);0<=a&&a<d;a=b.nextSetBit(a+
1))this.setColixAndPalette(c,e,a)}else if("pymolparams"===a){this.isActive=!0;var e=d[0],f=d[1],h=d[2],k=new J.atomdata.RadiusData(null,0,J.atomdata.RadiusData.EnumType.FACTOR,J.c.VDW.AUTO);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);a=b.nextSetBit(0);null==this.mads&&0<=a&&(this.mads=V(this.ms.ac,0));d=this.checkColixLength(null==e?0:4,b.length());for(var m=0;0<=a&&a<d;a=b.nextSetBit(a+1),m++){var c=null==e?0:e[m],j=null==f?0:f[m];0.01<j&&(c=
JU.C.getColixTranslucent3(c,!0,j));this.setColixAndPalette(c,J.c.PAL.UNKNOWN.id,a);null!=h&&(c=0<(k.value=h[m]),0==k.value&&this.bsSizeSet.get(a)||this.setSizeRD2(a,k,c))}}else if("translucency"===a){this.isActive=!0;d=d.equals("translucent");this.checkColixLength(4,this.ms.ac);for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))this.colixes[a]=JU.C.getColixTranslucent3(this.colixes[a],d,this.translucentLevel),d&&this.bsColixSet.set(a)}else"deleteModelAtoms"===a?(a=d[2],d=a[1],a=a[2],this.mads=JU.AU.deleteElements(this.mads,
d,a),this.colixes=JU.AU.deleteElements(this.colixes,d,a),this.paletteIDs=JU.AU.deleteElements(this.paletteIDs,d,a),JU.BSUtil.deleteBits(this.bsSizeSet,b),JU.BSUtil.deleteBits(this.bsColixSet,b)):this.setPropS(a,d,b)},"~S,~O,JU.BS");c(b,"checkColixLength",function(a,d){d=Math.min(this.ms.ac,d);if(0==a)return null==this.colixes?0:this.colixes.length;if(null==this.colixes||d>this.colixes.length)this.colixes=JU.AU.ensureLengthShort(this.colixes,d),this.paletteIDs=JU.AU.ensureLengthByte(this.paletteIDs,
d);null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.ms.ac));return d},"~N,~N");c(b,"setColixAndPalette",function(a,d,b){null==this.colixes&&this.checkColixLength(-1,this.ms.ac);this.colixes[b]=a=this.getColixI(a,d,b);this.bsColixSet.setBitTo(b,0!=a||0==this.shapeID);this.paletteIDs[b]=d},"~N,~N,~N");j(b,"setAtomClickability",function(){if(this.isActive)for(var a=this.ms.at,d=this.ms.ac;0<=--d;){var b=a[d];null==b||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(d))||b.setClickable(this.vf)}});
j(b,"getShapeState",function(){return null})});s("J.shape");B(["J.shape.FontLineShape","JU.P3","$.V3"],"J.shape.Axes",["JU.PT","JU.Escape","JV.JC"],function(){var b=n(function(){this.axisXY=null;this.scale=0;this.corner=this.fixedOriginUC=this.pt0=this.axes2=this.axisType=this.labels=this.axisPoints=this.originPoint=this.fixedOrigin=null;v(this,arguments)},J.shape,"Axes",J.shape.FontLineShape);P(b,function(){this.axisXY=new JU.P3;this.originPoint=new JU.P3;this.axisPoints=Array(6);for(var a=6;0<=
--a;)this.axisPoints[a]=new JU.P3;this.pt0=new JU.P3;this.fixedOriginUC=new JU.P3;this.corner=new JU.V3});j(b,"setProperty",function(a,d){if("position"===a){var b=0==this.axisXY.z&&0!=d.z;this.axisXY=d;this.setScale(b?1:this.scale)}else"origin"===a?(null==d||0==d.length()?this.fixedOrigin=null:(null==this.fixedOrigin&&(this.fixedOrigin=new JU.P3),this.fixedOrigin.setT(d)),this.reinitShape()):"labels"===a?this.labels=d:"labelsOn"===a?this.labels=null:"labelsOff"===a?this.labels=x(-1,["","",""]):("type"===
a&&(this.axisType=d,"abc".equals(this.axisType)&&(this.axisType=null)),"axes2"===a?this.axes2=null==d||d.equals("")?null:d:this.setPropFLS(a,d))},"~S,~O,JU.BS");j(b,"initShape",function(){this.translucentAllowed=!1;this.myType="axes";this.font3d=this.vwr.gdata.getFont3D(16);this.setPoints(this.vwr.g.axesMode)});c(b,"setPoints",function(a){var d;if(603979808!=a||null==(d=this.vwr.getCurrentUnitCell()))this.originPoint.setT(null!=this.fixedOrigin?this.fixedOrigin:603979809==a?this.vwr.getBoundBoxCenter():
this.pt0),this.setScale(this.vwr.getFloat(570425346)/2);else{a=d.getUnitCellMultiplier();d=d.getUnitCellMultiplied();var b=this.vwr.getFloat(570425345);this.fixedOriginUC.set(b,b,b);var c=d.getCartesianOffset(),e=d.getUnitCellVerticesNoOffset();this.originPoint.add2(c,e[0]);0!=b?d.toCartesian(this.fixedOriginUC,!1):null!=this.fixedOrigin&&this.originPoint.setT(this.fixedOrigin);0!=b&&this.originPoint.add(this.fixedOriginUC);d=this.scale=this.vwr.getFloat(570425346)/2;null!=a&&0<a.z&&(d*=Math.abs(a.z));
this.axisPoints[0].scaleAdd2(d,e[4],this.originPoint);this.axisPoints[1].scaleAdd2(d,e[2],this.originPoint);this.axisPoints[2].scaleAdd2(d,e[1],this.originPoint)}},"~N");c(b,"reinitShape",function(){var a=this.font3d;this.initShape();null!=a&&(this.font3d=a)});c(b,"getAxisPoint",function(a,d,b){d?b.setT(this.axisPoints[a]):(b.sub2(this.axisPoints[a],this.originPoint),b.scale(0.5));return b},"~N,~B,JU.P3");j(b,"getProperty",function(a){return"originPoint"===a?this.originPoint:"axisPoints"===a?(this.setPoints(this.vwr.g.axesMode),
this.axisPoints):"axesTypeXY"===a?0==this.axisXY.z?Boolean.FALSE:Boolean.TRUE:"origin"===a?this.fixedOrigin:null},"~S,~N");c(b,"setScale",function(a){this.scale=a;this.corner.setT(this.vwr.getBoundBoxCornerVector());for(var d=6;0<=--d;){var b=this.axisPoints[d];b.setT(JV.JC.unitAxisVectors[d]);1.5>this.corner.x&&(this.corner.x=1.5);1.5>this.corner.y&&(this.corner.y=1.5);1.5>this.corner.z&&(this.corner.z=1.5);0==this.axisXY.z&&(b.x*=this.corner.x*a,b.y*=this.corner.y*a,b.z*=this.corner.z*a);b.add(this.originPoint)}},
"~N");c(b,"getAxesState",function(a){a.append("  axes scale ").appendF(this.vwr.getFloat(570425346)).append(";\n");null!=this.fixedOrigin&&a.append("  axes center ").append(JU.Escape.eP(this.fixedOrigin)).append(";\n");0!=this.axisXY.z&&a.append("  axes position [").appendI(D(this.axisXY.x)).append(" ").appendI(D(this.axisXY.y)).append(" ").append(0>this.axisXY.z?" %":"").append("]");null!=this.axes2&&a.append(" ").append(JU.PT.esc(this.axes2));a.append(";\n");if(null!=this.labels){a.append("  axes labels ");
for(var d=0;d<this.labels.length;d++)null!=this.labels[d]&&a.append(JU.PT.esc(this.labels[d])).append(" ");a.append(";\n")}null!=this.axisType&&a.append("  axes type "+JU.PT.esc(this.axisType));return a.toString()},"JU.SB")});s("J.shape");B(["J.shape.AtomShape"],"J.shape.Balls",["JU.BS","J.c.PAL","JU.C"],function(){var b=I(J.shape,"Balls",J.shape.AtomShape);j(b,"setSize",function(a,d){2147483647==a?(this.isActive=!0,null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS),this.bsSizeSet.or(d)):this.setSize2(a,
d)},"~N,JU.BS");j(b,"setSizeRD",function(a,d){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var b=Math.min(this.ms.at.length,d.length()),c=d.nextSetBit(0);0<=c&&c<b;c=d.nextSetBit(c+1))this.ms.at[c].setMadAtom(this.vwr,a),this.bsSizeSet.set(c)},"J.atomdata.RadiusData,JU.BS");j(b,"setProperty",function(a,d,b){if("color"===a){var c=JU.C.getColixO(d);0==c&&(c=2);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var e=J.c.PAL.pidOf(d);for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+
1)){var f=this.ms.at[a];f.colixAtom=this.getColixA(c,e,f);this.bsColixSet.setBitTo(a,2!=c||e!=J.c.PAL.NONE.id);f.paletteID=e}this.vwr.setModelkitPropertySafely("updateatomkeys",b)}else if("colorValues"===a){if(0!=d.length){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var h=0,e=null;for(a=b.nextSetBit(0);0<=a&&!(h>=d.length);a=b.nextSetBit(a+1))e=Integer.$valueOf(d[h++]),c=JU.C.getColixO(e),0==c&&(c=2),e=J.c.PAL.pidOf(e),f=this.ms.at[a],f.colixAtom=this.getColixA(c,e,f),this.bsColixSet.setBitTo(a,
2!=c||e!=J.c.PAL.NONE.id),f.paletteID=e}}else if("colors"===a){h=d[0];null==this.bsColixSet&&(this.bsColixSet=new JU.BS);d=this.ms.at;for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))if(!(a>=h.length||0==(c=h[a])))d[a].colixAtom=c,d[a].paletteID=J.c.PAL.UNKNOWN.id,this.bsColixSet.set(a)}else if("translucency"===a){c=d.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new JU.BS);d=this.ms.at;for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))d[a].setTranslucent(c,this.translucentLevel),c&&this.bsColixSet.set(a)}else a.startsWith("ball")&&
(a=a.substring(4).intern()),this.setPropAS(a,d,b)},"~S,~O,JU.BS");j(b,"setAtomClickability",function(){for(var a=this.vwr.slm.bsDeleted,d=this.ms.ac;0<=--d;){var b=this.ms.at[d];null!=b&&(b.setClickable(0),null!=a&&a.get(d)||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(d))||b.setClickable(this.vf))}})});s("J.shape");B(["J.shape.Shape"],"J.shape.FontLineShape",null,function(){var b=n(function(){this.font3d=this.tickInfos=null;v(this,arguments)},J.shape,"FontLineShape",J.shape.Shape);
j(b,"initShape",function(){this.translucentAllowed=!1});c(b,"setPropFLS",function(a,d){if("tickInfo"===a){var b=d.type;if(null==d.ticks)if(" "==d.type)this.tickInfos=null;else{if(null!=this.tickInfos){for(var b=!1,c=0;4>c;c++)null!=this.tickInfos[c]&&this.tickInfos[c].type==d.type?this.tickInfos[c]=null:b=!0;b||(this.tickInfos=null)}}else null==this.tickInfos&&(this.tickInfos=Array(4)),this.tickInfos["xyz".indexOf(b)+1]=d}else"font"===a&&(this.font3d=d)},"~S,~O");j(b,"getShapeState",function(){return null})});
s("J.shape");B(["J.shape.Shape"],"J.shape.Frank",["J.i18n.GT","JV.Viewer"],function(){var b=n(function(){this.baseFont3d=this.currentMetricsFont3d=null;this.scaling=this.dy=this.dx=this.y=this.x=this.frankDescent=this.frankAscent=this.frankWidth=0;this.font3d=null;v(this,arguments)},J.shape,"Frank",J.shape.Shape);j(b,"initShape",function(){this.myType="frank";this.baseFont3d=this.font3d=this.vwr.gdata.getFont3DFSS("SansSerif","Plain",16);if(JV.Viewer.isJS||JV.Viewer.isSwingJS)J.shape.Frank.frankString=
"JSmol";this.calcMetrics()});j(b,"setProperty",function(a,d){"font"===a&&10<=d.fontSize&&(this.baseFont3d=d,this.scaling=0)},"~S,~O,JU.BS");j(b,"wasClicked",function(a,d){var b=this.vwr.getScreenWidth(),c=this.vwr.getScreenHeight();return 0<b&&0<c&&a>b-this.frankWidth-4&&d>c-this.frankAscent-4},"~N,~N");j(b,"checkObjectHovered",function(a,d){if(!this.vwr.getShowFrank()||!this.wasClicked(a,d)||!this.vwr.menuEnabled())return!1;this.vwr.hoverOnPt(a,d,J.i18n.GT.$("Click for menu..."),null,null);return!0},
"~N,~N,JU.BS");c(b,"calcMetrics",function(){this.font3d!==this.currentMetricsFont3d&&(this.currentMetricsFont3d=this.font3d,this.frankWidth=this.font3d.stringWidth(J.shape.Frank.frankString),this.frankDescent=this.font3d.getDescent(),this.frankAscent=this.font3d.getAscent())});c(b,"getFont",function(a){a!=this.scaling&&(this.scaling=a,this.font3d=this.vwr.gdata.getFont3DScaled(this.baseFont3d,a),this.calcMetrics())},"~N");j(b,"getShapeState",function(){return null});b.frankString="Jmol"});s("J.shape");
B(null,"J.shape.Shape",["J.c.PAL","JU.C","$.Logger","JV.JC"],function(){var b=n(function(){this.ms=this.vwr=this.myType=null;this.translucentLevel=this.vf=this.shapeID=0;this.translucentAllowed=!0;this.isBioShape=!1;this.bsColixSet=this.bsSizeSet=null;v(this,arguments)},J.shape,"Shape",null);c(b,"initializeShape",function(a,d,b){this.vwr=a;this.shapeID=b;this.vf=JV.JC.getShapeVisibilityFlag(b);this.setModelSet(d);this.initShape()},"JV.Viewer,JM.ModelSet,~N");c(b,"setModelVisibilityFlags",function(){},
"JU.BS");c(b,"getSize",function(){return 0},"~N");c(b,"getSizeG",function(){return 0},"JM.Group");c(b,"replaceGroup",function(){},"JM.Group,JM.Group");c(b,"setModelSet",function(a){this.ms=a;this.initModelSet()},"JM.ModelSet");c(b,"initModelSet",function(){});c(b,"setShapeSizeRD",function(a,d,b){null==d?this.setSize(a,b):this.setSizeRD(d,b)},"~N,J.atomdata.RadiusData,JU.BS");c(b,"setSize",function(){},"~N,JU.BS");c(b,"setSizeRD",function(){},"J.atomdata.RadiusData,JU.BS");c(b,"setPropS",function(a,
d){"setProperties"===a?this.setProperties(d):"translucentLevel"===a?this.translucentLevel=d.floatValue():"refreshTrajectories"!==a&&JU.Logger.warn("unassigned "+JV.JC.shapeClassBases[this.shapeID]+" + shape setProperty:"+a+":"+d)},"~S,~O,JU.BS");c(b,"setProperties",function(a){var d=this.vwr.bsA();if(y(a,"JU.Lst"))for(;0<a.size();){var b=a.removeItemAt(0);this.setProperty(b[0].intern(),b[1],d)}else{b=a;a=0;for(var c=b.length;a<c;a++)this.setProperty(b[a][0].intern(),b[a][1],d)}},"~O");c(b,"getPropertyData",
function(a,d){return this.getPropShape(a,d)},"~S,~A");c(b,"getPropShape",function(a,d){if(y(d[1],Integer)){var b=d[1].intValue();d[1]=this.getProperty(a,b);return null!=d[1]}return!1},"~S,~A");c(b,"getProperty",function(){return null},"~S,~N");c(b,"getIndexFromName",function(){return-1},"~S");c(b,"wasClicked",function(){return!1},"~N,~N");c(b,"findNearestAtomIndex",function(){},"~N,~N,~A,JU.BS");c(b,"checkBoundsMinMax",function(){},"JU.P3,JU.P3");c(b,"setAtomClickability",function(){});c(b,"checkObjectClicked",
function(){return null},"~N,~N,~N,JU.BS,~B");c(b,"checkObjectHovered",function(){return!1},"~N,~N,JU.BS");c(b,"checkObjectDragged",function(){return!1},"~N,~N,~N,~N,~N,JU.BS");c(b,"coordinateInRange",function(a,d,b,c,e){this.vwr.tm.transformPtScrSafe(b,e);a=(a-e.x)*(a-e.x)+(d-e.y)*(d-e.y);return a<=c?a:-1},"~N,~N,JU.T3,~N,JU.P3i");c(b,"getColixI",function(a,d,b){return this.getColixA(a,d,this.ms.at[b])},"~N,~N,~N");c(b,"getColixA",function(a,d,b){return 2==a?this.vwr.cm.getColixAtomPalette(b,d):a},
"~N,~N,JM.Atom");c(b,"getColixB",function(a,d,b){return 2==a?this.vwr.cm.getColixBondPalette(b,d):a},"~N,~N,JM.Bond");c(b,"getShapeDetail",function(){return null});b.getColix=c(b,"getColix",function(a,d,b){return JU.C.getColixInherited(null==a||d>=a.length?0:a[d],b.colixAtom)},"~A,~N,JM.Atom");b.getFontCommand=c(b,"getFontCommand",function(a,d){return null==d?"":"font "+a+" "+d.getInfo()},"~S,JU.Font");b.getColorCommandUnk=c(b,"getColorCommandUnk",function(a,d,b){return J.shape.Shape.getColorCommand(a,
J.c.PAL.UNKNOWN.id,d,b)},"~S,~N,~B");b.getColorCommand=c(b,"getColorCommand",function(a,d,b,c){if(d==J.c.PAL.UNKNOWN.id&&0==b)return"";d=d==J.c.PAL.UNKNOWN.id&&0==b?"":(c?J.shape.Shape.getTranslucentLabel(b)+" ":"")+(d!=J.c.PAL.UNKNOWN.id&&!J.c.PAL.isPaletteVariable(d)?J.c.PAL.getPaletteName(d):J.shape.Shape.encodeColor(b));return"color "+a+" "+d},"~S,~N,~N,~B");b.encodeColor=c(b,"encodeColor",function(a){return JU.C.isColixColorInherited(a)?"none":JU.C.getHexCode(a)},"~N");b.getTranslucentLabel=
c(b,"getTranslucentLabel",function(a){return JU.C.isColixTranslucent(a)?JU.C.getColixTranslucencyLabel(a):"opaque"},"~N");b.appendCmd=c(b,"appendCmd",function(a,d){0!=d.length&&a.append("  ").append(d).append(";\n")},"JU.SB,~S")});s("J.shape");B(["J.shape.Shape","JU.P3i"],"J.shape.Sticks","java.util.Hashtable JU.BS $.P3 J.c.PAL JU.BSUtil $.C $.Edge $.Escape".split(" "),function(){var b=n(function(){this.myMask=0;this.haveStrutPoints=this.reportAll=!1;this.ptXY=this.closestAtom=this.selectedBonds=
this.bsOrderSet=null;v(this,arguments)},J.shape,"Sticks",J.shape.Shape);P(b,function(){this.closestAtom=F(1,0);this.ptXY=new JU.P3i});j(b,"initShape",function(){this.myMask=1023;this.reportAll=!1});j(b,"setSize",function(a,d){if(2147483647==a)this.selectedBonds=JU.BSUtil.copy(d);else if(-2147483648==a)null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS),this.bsOrderSet.or(d);else{null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):
this.ms.getBondIteratorForType(this.myMask,d);b.hasNext();){this.bsSizeSet.set(b.nextIndex());var c=b.next();null!=c&&c.setMad(a)}}},"~N,JU.BS");j(b,"setProperty",function(a,d,b){if("type"===a)this.myMask=d.intValue();else if("reportAll"===a)this.reportAll=!0;else if("reset"===a)this.selectedBonds=this.bsColixSet=this.bsSizeSet=this.bsOrderSet=null;else if("bondOrder"===a){null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS);a=d.intValue();for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):
this.ms.getBondIteratorForType(65535,b);b.hasNext();)this.bsOrderSet.set(b.nextIndex()),b.next().setOrder(a)}else if("color"===a)if(null==this.bsColixSet&&(this.bsColixSet=new JU.BS),a=JU.C.getColixO(d),d=y(d,"J.c.PAL")?d:null,d===J.c.PAL.TYPE||d===J.c.PAL.ENERGY){var c=d===J.c.PAL.ENERGY;for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);b.hasNext();){this.bsColixSet.set(b.nextIndex());var e=b.next();e.colix=c?this.getColixB(a,
d.id,e):JU.C.getColix(JU.Edge.getArgbHbondType(e.order))}}else{if(!(2==a&&d!==J.c.PAL.CPK))for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);b.hasNext();)d=b.nextIndex(),b.next().colix=a,this.bsColixSet.setBitTo(d,0!=a&&2!=a)}else if("translucency"===a){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);a=d.equals("translucent");for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,
b);b.hasNext();)this.bsColixSet.set(b.nextIndex()),b.next().setTranslucent(a,this.translucentLevel)}else"deleteModelAtoms"!==a&&this.setPropS(a,d,b)},"~S,~O,JU.BS");j(b,"getProperty",function(a){return a.equals("selectionState")?null!=this.selectedBonds?"select BONDS "+JU.Escape.eBS(this.selectedBonds)+"\n":"":a.equals("sets")?x(-1,[this.bsOrderSet,this.bsSizeSet,this.bsColixSet]):null},"~S,~N");j(b,"setAtomClickability",function(){for(var a=this.ms.bo,d=this.ms.bondCount;0<=--d;){var b=a[d];null==
b||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(b.atom1.i)||this.ms.isAtomHidden(b.atom2.i))||(b.atom1.setClickable(this.vf),b.atom2.setClickable(this.vf))}});j(b,"getShapeState",function(){return null});j(b,"checkObjectHovered",function(a,d,b){var c=new JU.P3;b=this.findPickedBond(a,d,b,c,this.closestAtom);if(null==b)return!1;this.vwr.highlightBond(b.index,this.closestAtom[0],a,d);return!0},"~N,~N,JU.BS");j(b,"checkObjectClicked",function(a,d,b,c){b=new JU.P3;a=this.findPickedBond(a,
d,c,b,this.closestAtom);if(null==a)return null;d=a.atom1.mi;c=a.getIdentity();var e=new java.util.Hashtable;e.put("pt",b);e.put("index",Integer.$valueOf(a.index));e.put("modelIndex",Integer.$valueOf(d));e.put("model",this.vwr.getModelNumberDotted(d));e.put("type","bond");e.put("info",c);this.vwr.setStatusAtomPicked(-3,'["bond","'+a.getIdentity()+'",'+b.x+","+b.y+","+b.z+"]",e,!1);return e},"~N,~N,~N,JU.BS,~B");c(b,"findPickedBond",function(a,d,b,c,e){b=100;this.vwr.gdata.isAntialiased()&&(a<<=1,d<<=
1,b<<=1);for(var f=null,h=new JU.P3,k=this.ms.bo,m=this.ms.bondCount;0<=--m;){var j=k[m];if(!(null==j||0==j.shapeVisibilityFlags)){var p=j.atom1,q=j.atom2;if(p.checkVisible()&&q.checkVisible()){h.ave(p,q);var r=this.coordinateInRange(a,d,h,b,this.ptXY);if(0<=r&&40<Math.abs(p.sY-q.sY)+Math.abs(p.sX-q.sX)){var u=1*(this.ptXY.x-p.sX)/(q.sX-p.sX);0.4>u||0.6<u||(b=r,f=j,null!=e&&(e[0]=0.5>u?p.i:q.i),c.setT(h))}}}}return f},"~N,~N,JU.BS,JU.P3,~A")});s("J.shape");B(["J.shape.FontLineShape"],"J.shape.Uccage",
null,function(){var b=I(J.shape,"Uccage",J.shape.FontLineShape);j(b,"setProperty",function(a,d){this.setPropFLS(a,d)},"~S,~O,JU.BS");c(b,"initShape",function(){Z(this,J.shape.Uccage,"initShape",[]);this.font3d=this.vwr.gdata.getFont3D(16);this.myType="unitcell"})});s("J.thread");B(["J.thread.JmolThread"],"J.thread.HoverWatcherThread",null,function(){var b=n(function(){this.moved=this.current=this.actionManager=null;this.hoverDelay=0;v(this,arguments)},J.thread,"HoverWatcherThread",J.thread.JmolThread);
A(b,function(a,d,b,c){this.setViewer(c,"HoverWatcher");this.actionManager=a;this.current=d;this.moved=b;this.start()},"JV.ActionManager,JV.MouseState,JV.MouseState,JV.Viewer");j(b,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);a=0;break;case 0:this.hoverDelay=this.vwr.getHoverDelay();if(this.stopped||0>=this.hoverDelay||!this.runSleep(this.hoverDelay,1))return;a=1;break;case 1:this.moved.is(this.current)&&(this.currentTime=System.currentTimeMillis(),this.currentTime-
this.moved.time>(this.vwr.acm.zoomTrigger?100:this.hoverDelay)&&!this.stopped&&this.actionManager.checkHover()),a=0}},"~N")});s("J.thread");B(["java.lang.Thread"],"J.thread.JmolThread",["JU.Logger","JV.Viewer"],function(){var b=n(function(){this.$name="JmolThread";this.sc=this.eval=this.vwr=null;this.hoverEnabled=this.haveReference=!1;this.sleepTime=this.currentTime=this.lastRepaintTime=this.targetTime=this.startTime=0;this.isReset=this.stopped=this.isJS=!1;this.useTimeout=!0;this.junk=0;v(this,arguments)},
J.thread,"JmolThread",Thread);c(b,"setManager",function(){return 0},"~O,JV.Viewer,~O");c(b,"setViewer",function(a,d){this.setName(d);this.$name=d+"_"+ ++J.thread.JmolThread.threadIndex;this.vwr=a;this.isJS=a.isSingleThreaded},"JV.Viewer,~S");c(b,"setEval",function(a){this.eval=a;this.sc=this.vwr.getEvalContextAndHoldQueue(a);null!=this.sc&&(this.useTimeout=a.getAllowJSThreads())},"J.api.JmolScriptEvaluator");c(b,"resumeEval",function(){if(!(null==this.eval||!this.isJS&&!this.vwr.testAsync||!this.useTimeout)){this.sc.mustResumeEval=
!this.stopped;var a=this.eval,d=this.sc;this.sc=this.eval=null;setTimeout(function(){a.resumeEval(d)},1)}});j(b,"start",function(){this.run()});j(b,"run",function(){this.startTime=System.currentTimeMillis();try{this.run1(-1)}catch(a){if(H(a,"InterruptedException")){var d=a;JU.Logger.debugging&&!y(this,"J.thread.HoverWatcherThread")&&this.oops(d)}else if(H(a,Exception))this.oops(a);else throw a;}});c(b,"oops",function(a){JU.Logger.debug(this.$name+" exception "+a);(!JV.Viewer.isJS||JV.Viewer.isSwingJS)&&
a.printStackTrace();this.vwr.queueOnHold=!1},"Exception");c(b,"runSleep",function(a,d){if(this.isJS&&!this.useTimeout)return!0;var b=this;setTimeout(function(){b.run1(d)},Math.max(a,0));return!1},"~N,~N");c(b,"interrupt",function(){this.stopped=!0;this.vwr.startHoverWatcher(!0);this.isJS||Z(this,J.thread.JmolThread,"interrupt",[])});c(b,"checkInterrupted",function(a){return this.haveReference&&(null==a||!a.$name.equals(this.$name))?!0:this.stopped},"J.thread.JmolThread");c(b,"reset",function(){this.isReset=
!0;this.interrupt()});c(b,"toString",function(){return Z(this,J.thread.JmolThread,"toString",[])+"["+this.$name+"]"});b.threadIndex=0});s("J.thread");B(["J.thread.JmolThread"],"J.thread.TimeoutThread",["JU.SB"],function(){var b=n(function(){this.script=null;this.status=0;this.triggered=!0;v(this,arguments)},J.thread,"TimeoutThread",J.thread.JmolThread);A(b,function(a,d,b,c){this.setViewer(a,d);this.$name=d;this.set(b,c)},"JV.Viewer,~S,~N,~S");c(b,"set",function(a,d){this.sleepTime=a;null!=d&&(this.script=
d)},"~N,~S");j(b,"toString",function(){return"timeout name="+this.$name+" executions="+this.status+" mSec="+this.sleepTime+" secRemaining="+(this.targetTime-System.currentTimeMillis())/1E3+" script="+this.script});j(b,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime);a=0;break;case 0:if(this.checkInterrupted(null)||(null==this.script||0==this.script.length)||!this.runSleep(26,1))return;a=
1;break;case 1:a=System.currentTimeMillis()<this.targetTime?0:2;break;case 2:this.currentTime=System.currentTimeMillis();if(null==this.vwr.timeouts.get(this.$name))return;this.status++;(a=0>this.sleepTime)?this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime):this.vwr.timeouts.remove(this.$name);this.triggered&&(this.triggered=!1,this.$name.equals("_SET_IN_MOTION_")?this.vwr.checkInMotion(2):this.vwr.evalStringQuiet(a?this.script+';\ntimeout ID "'+this.$name+'";':this.script));a=a?0:
-2;break;case -2:this.vwr.timeouts.remove(this.$name);return}},"~N");b.clear=c(b,"clear",function(a){for(var d,b=a.values().iterator();b.hasNext()&&((d=b.next())||1);){var c=d;c.script.equals("exitJmol")||c.interrupt()}a.clear()},"java.util.Map");b.setTimeout=c(b,"setTimeout",function(a,d,b,c,e){var f=d.get(b);0==c?null!=f&&(f.interrupt(),d.remove(b)):null!=f?f.set(c,e):(f=new J.thread.TimeoutThread(a,b,c,e),d.put(b,f),f.start())},"JV.Viewer,java.util.Map,~S,~N,~S");b.trigger=c(b,"trigger",function(a,
d){var b=a.get(d);null!=b&&(b.triggered=0>b.sleepTime)},"java.util.Map,~S");b.showTimeout=c(b,"showTimeout",function(a,d){var b=new JU.SB;if(null!=a)for(var c,e=a.values().iterator();e.hasNext()&&((c=e.next())||1);){var f=c;(null==d||f.$name.equalsIgnoreCase(d))&&b.append(f.toString()).append("\n")}return 0<b.length()?b.toString():"<no timeouts set>"},"java.util.Map,~S")});s("JM");B(["JU.Node","$.Point3fi","J.c.PAL"],"JM.Atom","JU.BS $.CU $.P3 $.PT $.SB J.atomdata.RadiusData J.c.VDW JM.Group JU.C $.Elements JV.JC".split(" "),
function(){var b=n(function(){this.altloc="\x00";this.atomSite=this.atomID=0;this.group=null;this.atomNumberFlags=this.valence=this.userDefinedVanDerWaalRadius=0;this.atomSymmetry=null;this.paletteID=this.colixAtom=this.madAtom=this.formalChargeAndFlags=0;this.bonds=null;this.shapeVisibilityFlags=this.clickabilityFlags=this.nBackbonesDisplayed=this.nBondsDisplayed=0;v(this,arguments)},JM,"Atom",JU.Point3fi,JU.Node);P(b,function(){this.paletteID=J.c.PAL.CPK.id});j(b,"setAtom",function(a,d,b,c,e,f,
h,k,m){this.mi=a;this.atomSymmetry=e;this.atomSite=f;this.i=d;this.atomNumberFlags=h;m&&(this.formalChargeAndFlags=2);0!=k&&-2147483648!=k&&this.setFormalCharge(k);this.userDefinedVanDerWaalRadius=c;null!=b&&this.setT(b);return this},"~N,~N,JU.P3,~N,JU.BS,~N,~N,~N,~B,~B");c(b,"setShapeVisibility",function(a,d){this.shapeVisibilityFlags=d?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(b,"isCovalentlyBonded",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d].isCovalent()&&
this.bonds[d].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");c(b,"isBonded",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");c(b,"getBond",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(null!=this.bonds[d].getOtherAtom(a))return this.bonds[d];return null},"JM.Atom");c(b,"addDisplayedBond",function(a,d){this.nBondsDisplayed+=d?1:-1;this.setShapeVisibility(a,0<this.nBondsDisplayed)},
"~N,~B");c(b,"deleteBond",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d]===a){this.deleteBondAt(d);break}},"JM.Bond");c(b,"deleteBondAt",function(a){this.setCIPChirality(0);var d=this.bonds.length-1;if(0==d)this.bonds=null;else{for(var b=Array(d),c=0;c<a;++c)b[c]=this.bonds[c];for(;c<d;++c)b[c]=this.bonds[c+1];this.bonds=b}},"~N");j(b,"getBondedAtomIndex",function(a){return this.bonds[a].getOtherAtom(this).i},"~N");c(b,"setMadAtom",function(a,d){this.madAtom=
this.calculateMad(a,d)},"JV.Viewer,J.atomdata.RadiusData");c(b,"calculateMad",function(a,d){if(null==d)return 0;var b=d.value;if(0==b)return 0;switch(d.factorType){case J.atomdata.RadiusData.EnumType.SCREEN:return fa(b);case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:var c=0;switch(d.vdwType){case J.c.VDW.TEMP:c=a.ms.getBfactor100Hi();c=0<c?this.getBfactor100()/c:0;break;case J.c.VDW.HYDRO:c=Math.abs(this.getHydrophobicity());break;case J.c.VDW.BONDING:c=this.getBondingRadius();
break;case J.c.VDW.ADPMIN:case J.c.VDW.ADPMAX:c=this.getADPMinMax(d.vdwType===J.c.VDW.ADPMAX);break;default:c=this.getVanderwaalsRadiusFloat(a,d.vdwType)}b=d.factorType===J.atomdata.RadiusData.EnumType.FACTOR?b*c:b+c;break;case J.atomdata.RadiusData.EnumType.ABSOLUTE:if(16.1==b)return 32200}c=fa(0>b?b:2E3*b);0>c&&0<b&&(c=0);return c},"JV.Viewer,J.atomdata.RadiusData");c(b,"getADPMinMax",function(a){var d=this.getTensors();if(null==d)return 0;var b=d[0];if(null==b||1!=b.iType)return 0;this.group.chain.model.ms.isModulated(this.i)&&
b.isUnmodulated&&(b=d[1]);return b.getFactoredValue(a?2:1)},"~B");c(b,"getTensors",function(){return this.group.chain.model.ms.getAtomTensorList(this.i)});c(b,"getRasMolRadius",function(){return Math.abs(w(this.madAtom/8))});j(b,"getEdges",function(){return null==this.bonds?[]:this.bonds});j(b,"getBondCount",function(){return null==this.bonds?0:this.bonds.length});c(b,"setTranslucent",function(a,d){this.colixAtom=JU.C.getColixTranslucent3(this.colixAtom,a,d)},"~B,~N");j(b,"getElementNumber",function(){return JU.Elements.getElementNumber(this.atomNumberFlags)});
j(b,"getIsotopeNumber",function(){return JU.Elements.getIsotopeNumber(this.atomNumberFlags)});j(b,"getAtomicAndIsotopeNumber",function(){return this.atomNumberFlags});c(b,"setAtomicAndIsotopeNumber",function(a){if(0>a||(a&127)>=JU.Elements.elementNumberMax||65535<a)a=0;this.atomNumberFlags=a},"~N");c(b,"getElementSymbolIso",function(a){return JU.Elements.elementSymbolFromNumber(a?this.atomNumberFlags:this.atomNumberFlags&127)},"~B");c(b,"getElementSymbol",function(){return this.getElementSymbolIso(!0)});
c(b,"isHetero",function(){return 0!=(this.formalChargeAndFlags&2)});c(b,"hasVibration",function(){return 0!=(this.formalChargeAndFlags&1)});c(b,"setFormalCharge",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&15|(-2147483648==a?0:7<a?7:-3>a?-3:a)<<24},"~N");c(b,"setVibrationVector",function(){this.formalChargeAndFlags|=1});c(b,"setNegativeDisorder",function(){this.formalChargeAndFlags|=4});c(b,"isNegativeDisorder",function(){return 0!=(this.formalChargeAndFlags&4)});j(b,"getFormalCharge",
function(){return this.formalChargeAndFlags>>24});c(b,"getOccupancy100",function(){var a=this.group.chain.model.ms.occupancies;return null==a?100:Math.round(a[this.i])});c(b,"isOccupied",function(){var a=this.group.chain.model.ms.occupancies;return null==a||50<=a[this.i]});c(b,"getBfactor100",function(){var a=this.group.chain.model.ms.bfactor100s;return null==a?0:a[this.i]});c(b,"getHydrophobicity",function(){var a=this.group.chain.model.ms.hydrophobicities;return null==a?JU.Elements.getHydrophobicity(this.group.groupID):
a[this.i]});c(b,"setRadius",function(a){return!Float.isNaN(this.userDefinedVanDerWaalRadius=0<a?a:NaN)},"~N");c(b,"$delete",function(a){this.valence=-1;if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.getOtherAtom(this).deleteBond(b);a.set(b.index)}this.bonds=null},"JU.BS");j(b,"isDeleted",function(){return 0>this.valence});c(b,"setValence",function(a){this.isDeleted()||(this.valence=0>a?0:127>=a?a:127)},"~N");j(b,"getValence",function(){return this.isDeleted()?-1:0<
this.valence?this.valence:this.getValenceAromatic(!0)});c(b,"getValenceAromatic",function(a){if(this.isDeleted())return-1;var d=this.valence;if(0==d&&null!=this.bonds){for(var b=0,c=this.bonds.length;0<=--c;)d+=this.bonds[c].getValence(),a&&this.bonds[c].is(515)&&b++;0<d&&(3>d&&0!=b)&&d++}return d},"~B");j(b,"getCovalentBondCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.isCovalentNotPartial0()&&!b.getOtherAtom(this).isDeleted()&&++a}return a});
c(b,"getCovalentOrPartialBondCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.isCovalent()&&!b.getOtherAtom(this).isDeleted()&&++a}return a});j(b,"getCovalentHydrogenCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;)if(this.bonds[d].isCovalentNotPartial0()){var b=this.bonds[d].getOtherAtom(this);0<=b.valence&&1==b.getElementNumber()&&++a}return a});j(b,"getImplicitHydrogenCount",function(){return this.group.chain.model.ms.getMissingHydrogenCount(this,
!1)});j(b,"getTotalHydrogenCount",function(){return this.getCovalentHydrogenCount()+this.getImplicitHydrogenCount()});j(b,"getTotalValence",function(){var a=this.getValence();if(0>a)return a;var d=this.getImplicitHydrogenCount();return a+d+this.group.chain.model.ms.aaRet[4]});j(b,"getCovalentBondCountPlusMissingH",function(){return this.getCovalentBondCount()+this.getImplicitHydrogenCount()});c(b,"getTargetValence",function(){switch(this.getElementNumber()){case 6:case 14:case 32:return 4;case 5:case 7:case 15:return 3;
case 8:case 16:return 2;case 1:case 9:case 17:case 35:case 53:return 1}return-1});c(b,"getDimensionValue",function(a){return 0==a?this.x:1==a?this.y:this.z},"~N");c(b,"getVanderwaalsRadiusFloat",function(a,d){return Float.isNaN(this.userDefinedVanDerWaalRadius)?a.getVanderwaalsMarType(this.atomNumberFlags,this.getVdwType(d))/1E3:this.userDefinedVanDerWaalRadius},"JV.Viewer,J.c.VDW");c(b,"getVdwType",function(a){switch(a){case J.c.VDW.AUTO:a=this.group.chain.model.ms.getDefaultVdwType(this.mi);break;
case J.c.VDW.NOJMOL:a=this.group.chain.model.ms.getDefaultVdwType(this.mi),a===J.c.VDW.AUTO_JMOL&&(a=J.c.VDW.AUTO_BABEL)}return a},"J.c.VDW");c(b,"getBondingRadius",function(){var a=this.group.chain.model.ms.bondingRadii,a=null==a||this.i>=a.length?0:a[this.i];return 0==a?JU.Elements.getBondingRadius(this.atomNumberFlags,this.getFormalCharge()):a});c(b,"getVolume",function(a,d){var b=null==d?this.userDefinedVanDerWaalRadius:NaN;Float.isNaN(b)&&(b=a.getVanderwaalsMarType(this.getElementNumber(),this.getVdwType(d))/
1E3);var c=0;if(null!=this.bonds)for(var e=0;e<this.bonds.length;e++)if(this.bonds[e].isCovalent()){var f=this.bonds[e].getOtherAtom(this),h=null==d?f.userDefinedVanDerWaalRadius:NaN;Float.isNaN(h)&&(h=a.getVanderwaalsMarType(f.getElementNumber(),f.getVdwType(d))/1E3);f=this.distance(f);if(!(f>b+h)){if(f+b<=h)return 0;h=b-(b*b+f*f-h*h)/(2*f);c-=1.0471975511965976*h*h*(3*b-h)}}return c+4.1887902047863905*b*b*b},"JV.Viewer,J.c.VDW");c(b,"getCurrentBondCount",function(){return null==this.bonds?0:this.bonds.length});
c(b,"getRadius",function(){return Math.abs(this.madAtom/2E3)});j(b,"getIndex",function(){return this.i});j(b,"getAtomSite",function(){return this.atomSite});j(b,"getGroupBits",function(a){this.group.setAtomBits(a)},"JU.BS");j(b,"getAtomName",function(){return 0<this.atomID?JM.Group.specialAtomNames[this.atomID]:null==this.group.chain.model.ms.atomNames?"":this.group.chain.model.ms.atomNames[this.i]});j(b,"getAtomType",function(){var a=this.group.chain.model.ms.atomTypes,a=null==a?null:a[this.i];return null==
a?this.getAtomName():a});j(b,"getAtomNumber",function(){var a=this.group.chain.model.ms.atomSerials;return null==a?this.i:a[this.i]});c(b,"getSeqID",function(){var a=this.group.chain.model.ms.atomSeqIDs;return null==a?0:a[this.i]});c(b,"isVisible",function(a){return(this.shapeVisibilityFlags&a)==a},"~N");c(b,"getPartialCharge",function(){var a=this.group.chain.model.ms.partialCharges;return null==a?0:a[this.i]});c(b,"getSymmetryTranslation",function(a,d,b){for(var c=0;c<d.length;c++)if(this.atomSymmetry.get(a+=
b))return d[c];return 0},"~N,~A,~N");c(b,"getCellTranslation",function(a,d,b){for(var c=b,e=0;e<d.length;e++)for(var f=0;f<b;f++,c++)if(this.atomSymmetry.get(c)&&d[e]==a)return d[e];return 0},"~N,~A,~N");c(b,"getSymmetryOperatorList",function(a){var d="",b=this.group.chain.model.ms,c=b.getModelSymmetryCount(this.mi);if(0==c||null==this.atomSymmetry)return"";for(var b=b.getModelCellRange(this.mi),e=c,f=null==b?1:b.length,h=a?null:new JU.BS,k=0;k<f;k++)for(var m=0;m<c;m++)this.atomSymmetry.get(e++)&&
(a?d+=","+(m+1)+(null==b?555:b[k]):h.set(m+1));if(!a)for(k=h.nextSetBit(0);0<=k;k=h.nextSetBit(k+1))d+=","+k;return 0==d.length?"":d.substring(1)},"~B");j(b,"getModelIndex",function(){return this.mi});j(b,"getMoleculeNumber",function(a){return this.group.chain.model.ms.getMoleculeIndex(this.i,a)+1},"~B");c(b,"getFractionalCoord",function(a,d,b,c){c=this.getFractionalCoordPt(a,b,c);return"X"==d?c.x:"Y"==d?c.y:c.z},"~B,~S,~B,JU.P3");j(b,"getXYZ",function(){return this});c(b,"getFractionalCoordPt",function(a,
d,b){var c=this.getUnitCell();null==b?b=JU.P3.newP(this):b.setT(this);null!=c&&(c=c.getUnitCellMultiplied(),c.toFractional(b,d),a&&JU.PT.fixPtFloats(b,1E5));return b},"~B,~B,JU.P3");c(b,"getUnitCell",function(){return this.group.chain.model.ms.getUnitCellForAtom(this.i)});c(b,"getFractionalUnitCoord",function(a,d,b){b=this.getFractionalUnitCoordPt(a,!1,b);return"X"==d?b.x:"Y"==d?b.y:b.z},"~B,~S,JU.P3");c(b,"getFractionalUnitCoordPt",function(a,d,b){var c=this.getUnitCell();null==b?b=JU.P3.newP(this):
b.setT(this);if(null==c)return b;c=c.getUnitCellMultiplied();this.group.chain.model.isJmolDataFrame?(c.toFractional(b,!1),d&&c.toCartesian(b,!1)):(c.toUnitCell(b,null),d||c.toFractional(b,!1));a&&JU.PT.fixPtFloats(b,d?1E4:1E5);return b},"~B,~B,JU.P3");c(b,"getFractionalUnitDistance",function(a,d,b){var c=this.getUnitCell();if(null==c)return this.distance(a);d.setT(this);b.setT(a);this.group.chain.model.isJmolDataFrame?(c.toFractional(d,!0),c.toFractional(b,!0)):(c.toUnitCell(d,null),c.toUnitCell(b,
null));return d.distance(b)},"JU.T3,JU.T3,JU.T3");c(b,"setFractionalCoord",function(a,d,b){var c=this.getUnitCell();null!=c&&c.toFractional(this,b);switch(a){case 1111492615:case 1111492612:this.x=d;break;case 1111492616:case 1111492613:this.y=d;break;case 1111492617:case 1111492614:this.z=d}null!=c&&c.toCartesian(this,b)},"~N,~N,~B");c(b,"setFractionalCoordTo",function(a,d){this.setFractionalCoordPt(this,a,d)},"JU.P3,~B");c(b,"setFractionalCoordPt",function(a,d,b){a.setT(d);d=this.getUnitCell();
null!=d&&d.toCartesian(a,b&&!this.group.chain.model.isJmolDataFrame)},"JU.P3,JU.P3,~B");c(b,"isCursorOnTopOf",function(a,d,b,c){var e=w(this.sD/2);e<b&&(e=b);b=e*e;e=this.sX-a;e*=e;if(e>b)return!1;var f=this.sY-d;b-=e+f*f;if(0>b)return!1;if(null==c)return!0;var e=this.sZ,f=c.sZ,h=w(c.sD/2);if(e<f-h)return!0;a=c.sX-a;d=c.sY-d;d=h*h-(a*a+d*d);return e-Math.sqrt(b)<f-Math.sqrt(d)},"~N,~N,~N,JM.Atom");c(b,"getInfo",function(){return this.getIdentity(2)});c(b,"getIdentityXYZ",function(a,d){a=3==d||this.group.chain.model.isJmolDataFrame?
this.getFractionalCoordPt(!this.group.chain.model.ms.vwr.g.legacyJavaFloat,!1,a):this;return(3==d?"":this.getIdentity(d)+" ")+JU.PT.formatF(a.x,0,3,!0,!0)+" "+JU.PT.formatF(a.y,0,3,!0,!0)+" "+JU.PT.formatF(a.z,0,3,!0,!0)},"JU.P3,~N");c(b,"getIdentity",function(a){var d=new JU.SB,b=this.getGroup3(!0);if(null!=b&&0<b.length&&(!b.equals("UNK")||this.group.chain.model.isBioModel)){d.append("[");d.append(b);d.append("]");b=this.group.getSeqcodeString();null!=b&&d.append(b);b=this.group.chain.chainID;if(0!=
b&&32!=b){d.append(":");var c=this.getChainIDStr();256<=b&&(c=JU.PT.esc(c));d.append(c)}if(2!=a&&5!=a)return d.toString();d.append(".")}d.append(this.getAtomName());0==d.length()&&(d.append(this.getElementSymbolIso(!1)),d.append(" "),d.appendI(this.getAtomNumber()));2==a&&("\x00"!=this.altloc&&(d.append("%"),d.appendC(this.altloc)),1<this.group.chain.model.ms.mc&&!this.group.chain.model.isJmolDataFrame&&(d.append("/"),d.append(this.getModelNumberForLabel())),d.append(" #"),d.appendI(this.getAtomNumber()));
return d.toString()},"~N");j(b,"getGroup3",function(a){var d=this.group.getGroup3();return a||null!=d&&0<d.length?d:"UNK"},"~B");j(b,"getGroup1",function(a){var d=this.group.getGroup1();return"\x00"!=d?""+d:"\x00"!=a?""+a:""},"~S");j(b,"getBioSmilesType",function(){return this.group.isProtein()?"p":this.group.isDna()?"d":this.group.isRna()?"r":this.group.isCarbohydrate()?"c":" "});j(b,"isPurine",function(){return this.group.isPurine()});j(b,"isPyrimidine",function(){return this.group.isPyrimidine()});
j(b,"getResno",function(){return this.group.getResno()});c(b,"isClickable",function(){return this.checkVisible()&&0!=this.clickabilityFlags&&0!=((this.shapeVisibilityFlags|this.group.shapeVisibilityFlags)&this.clickabilityFlags)});c(b,"setClickable",function(a){0==a?this.clickabilityFlags=0:(this.clickabilityFlags|=a,1040384!=a&&(this.shapeVisibilityFlags|=a))},"~N");c(b,"checkVisible",function(){if(this.isVisible(2))return this.isVisible(4);var a=this.isVisible(9);if(a){a=this.shapeVisibilityFlags;
if(0!=this.group.shapeVisibilityFlags&&(8192!=this.group.shapeVisibilityFlags||this.isLeadAtom()))a|=this.group.shapeVisibilityFlags;a&=-10;32==a&&0==this.clickabilityFlags&&(a=0);if(a=0!=a)this.shapeVisibilityFlags|=4}this.shapeVisibilityFlags|=2;return a});j(b,"isLeadAtom",function(){return this.group.isLeadAtom(this.i)});j(b,"getChainID",function(){return this.group.chain.chainID});j(b,"getChainIDStr",function(){return this.group.chain.getIDStr()});c(b,"getSurfaceDistance100",function(){return this.group.chain.model.ms.getSurfaceDistance100(this.i)});
c(b,"getVibrationVector",function(){return this.group.chain.model.ms.getVibration(this.i,!1)});c(b,"getModulation",function(){return this.group.chain.model.ms.getModulation(this.i)});c(b,"getModelNumberForLabel",function(){return this.group.chain.model.ms.getModelNumberForAtomLabel(this.mi)});c(b,"getModelNumber",function(){return this.group.chain.model.ms.getModelNumber(this.mi)%1E6});j(b,"getBioStructureTypeName",function(){return this.group.getBioStructureType().getBioStructureTypeName(!0)});j(b,
"equals",function(a){return this===a},"~O");j(b,"hashCode",function(){return this.i});c(b,"findAromaticNeighbor",function(a){if(null==this.bonds)return null;for(var d=this.bonds.length;0<=--d;){var b=this.bonds[d],c=b.getOtherAtom(this);if(b.isAromatic()&&c.i!=a)return c}return null},"~N");c(b,"atomPropertyInt",function(a,d){switch(d){case 1094715393:return this.getAtomNumber();case 1094713368:return this.getSeqID();case 1094713346:return this.atomID;case 1094713371:return Math.max(0,this.altloc.charCodeAt(0)-
32);case 1094713347:return this.i;case 1228931586:return this.getCovalentBondCount();case 1094713351:return this.group.chain.chainNo;case 1765808134:return a.gdata.getColorArgbOrGray(this.colixAtom);case 1086326789:case 1094715402:return this.getElementNumber();case 1094713353:return this.getAtomicAndIsotopeNumber();case 1228935687:return this.group.chain.model.fileIndex+1;case 1631586315:return this.getFormalCharge();case 1094713356:return this.group.groupID;case 1094713357:return this.group.groupIndex;
case 1094717454:return this.getModelNumber();case -1094717454:return a.ms.modelFileNumbers[this.mi];case 1094713359:return this.mi;case 1094713360:return this.getMoleculeNumber(!0);case 1094713361:return this.group.getMonomerIndex()+1;case 1128269825:return this.getOccupancy100();case 1094713362:return this.group.getBioPolymerIndexInModel()+1;case 1094713363:return this.group.getBioPolymerLength();case 1665140738:return this.getRasMolRadius();case 1094715412:return this.getResno();case 1094713365:return Math.round(a.antialiased?
w(this.sX/2):this.sX);case 1094713366:return Math.round(a.getScreenHeight()-(a.antialiased?w(this.sY/2):this.sY));case 1094713367:return Math.round(a.antialiased?w(this.sZ/2):this.sZ);case 1094713369:return this.getAtomSite();case 1095241729:return this.getSpin();case 1639976963:return this.group.getBioStructureType().getId();case 1237320707:return this.group.getBioStructureSubType(1111490651).getId();case 1094713370:return this.group.getStrucNo();case 1296041986:return this.getSymOp();case 1094715420:return this.getValence()}return 0},
"JV.Viewer,~N");c(b,"getSpin",function(){return this.group.chain.model.ms.getSpin(this.i)});c(b,"getSymOp",function(){return null==this.atomSymmetry?0:this.atomSymmetry.nextSetBit(0)+1});c(b,"atomPropertyFloat",function(a,d,b){switch(d){case 1111490561:return this.getADPMinMax(!0);case 1111490562:return this.getADPMinMax(!1);case 1111492609:case 1111492629:return this.x;case 1111492610:case 1111492630:return this.y;case 1111492611:case 1111492631:return this.z;case 1111490587:return this.group.chain.model.ms.getAtomicDSSRDataFloat("dssr",
this.i);case 1114249217:case 1112152066:case 1112150019:case 1112150020:case 1112150021:case 1112152070:case 1112152071:case 1112152073:case 1112152074:case 1112152076:case 1649022989:case 1112152078:return a.shm.getAtomShapeValue(d,this.group,this.i);case 1111492618:return this.getBondingRadius();case 1111490563:return a.getNMRCalculation().getChemicalShift(this);case 1111490564:return JU.Elements.getCovalentRadius(this.atomNumberFlags);case 1111490565:case 1111490576:case 1111490574:return this.group.getGroupParameter(d);
case 1111492615:case 1111492612:return this.getFractionalCoord(!a.g.legacyJavaFloat,"X",!1,b);case 1111492616:case 1111492613:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Y",!1,b);case 1111492617:case 1111492614:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Z",!1,b);case 1113589786:return this.getHydrophobicity();case 1111490566:return a.getNMRCalculation().getMagneticShielding(this);case 1111490567:return this.getMass();case 1128269825:return this.getOccupancy100()/100;case 1111492619:return this.getPartialCharge();
case 1111490569:case 1111490570:case 1111490568:if(this.group.chain.model.isJmolDataFrame&&4138==this.group.chain.model.jmolFrameTypeInt)switch(d){case 1111490569:return this.getFractionalCoord(!a.g.legacyJavaFloat,"X",!1,b);case 1111490570:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Y",!1,b);case 1111490568:return a=this.getFractionalCoord(!a.g.legacyJavaFloat,"Z",!1,b)-180,-180>a?360+a:a}return this.group.getGroupParameter(d);case 1665140738:case 1112152075:return this.getRadius();case 1113589787:return a.slm.isAtomSelected(this.i)?
1:0;case 1111490575:return a.ms.getSurfaceDistanceMax(),this.getSurfaceDistance100()/100;case 1111492620:return this.getBfactor100()/100;case 1111490588:return JU.C.getColixTranslucencyFractional(this.colixAtom);case 1312817669:return this.getVolume(a,J.c.VDW.AUTO);case 1111490577:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"X",b);case 1111490578:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"Y",b);case 1111490579:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"Z",b);
case 1648363544:return this.getVanderwaalsRadiusFloat(a,J.c.VDW.AUTO);case 1648361473:return d=this.getVibrationVector(),null==d?0:d.length()*a.getFloat(1648361473);case 1111492626:return this.getVib("x");case 1111492627:return this.getVib("y");case 1111492628:return this.getVib("z");case 1111490583:return this.getVib("X");case 1111490584:return this.getVib("Y");case 1111490585:return this.getVib("Z");case 1111490586:return this.getVib("O");case 1111490580:return this.getVib("1");case 1111490581:return this.getVib("2");
case 1111490582:return this.getVib("3");case 1145047050:case 1145047053:case 1145045006:case 1145047052:case 1145047055:case 1145045008:case 1145047049:return a=this.atomPropertyTuple(a,d,b),null==a?-1:a.length()}return this.atomPropertyInt(a,d)},"JV.Viewer,~N,JU.P3");c(b,"getVib",function(a){return this.group.chain.model.ms.getVibCoord(this.i,a)},"~S");c(b,"getNominalMass",function(){var a=this.getIsotopeNumber();return 0<a?a:JU.Elements.getNaturalIsotope(this.getElementNumber())});j(b,"getMass",
function(){var a=this.getIsotopeNumber();return 0<a?a:JU.Elements.getAtomicMass(this.getElementNumber())});c(b,"atomPropertyString",function(a,d){var b;switch(d){case 1153433601:return this.getIdentity(5);case 1086324739:return b=this.altloc,"\x00"==b?"":""+b;case 1086326786:return this.getAtomName();case 1086326785:return this.getAtomType();case 1086326788:return this.getChainIDStr();case 1086324752:return this.getCIPChirality(!0);case 1086324753:return this.getCIPChiralityRule();case 1140850705:case 1086324754:return this.getWyckoffPosition(!1);
case 1086324755:return this.getWyckoffPosition(!0);case 1086324744:return this.getGroup1("?");case 1086324747:return b=this.group.getSeqcodeString(),null==b?"":b;case 1086324743:return this.getGroup1("\x00");case 1086324742:return this.getGroup3(!1);case 1086326789:return this.getElementSymbolIso(!0);case 1086324745:return this.getIdentity(2);case 1086324746:return b=this.group.getInsertionCode(),"\x00"==b?"":""+b;case 1825200146:case 1287653388:return b=a.shm.getShapePropertyIndex(5,"label",this.i),
null==b&&(b=""),b;case 1145045003:return a.getSymStatic().staticToRationalXYZ(this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,null)," ");case 1639976963:return this.group.getBioStructureType().getBioStructureTypeName(!1);case 1237320707:return this.group.getBioStructureSubType(1111490651).getBioStructureTypeName(!1);case 1086324749:return this.group.getStructureId();case 1086324748:return a.getHybridizationAndAxes(this.i,null,null,"d");case 1086326798:return this.getElementSymbolIso(!1);case 1088421903:return this.getSymmetryOperatorList(!0)}return""},
"JV.Viewer,~N");c(b,"getWyckoffPosition",function(a){var d=this.group.chain.model.ms,b=d.getBasisAtom(this.i,!0).getSeqID();if(0!=b)return(a?""+(b>>16):"")+String.fromCharCode(b&255);var b=this.getUnitCell(),c;if(null==b||null==(c=b.getWyckoffPosition(this,"M")))c="0?";d.setAtomSeqID(this.i,(JU.PT.parseInt(c)<<16)+c.charAt(c.length-1).charCodeAt(0));return a?c:c.substring(c.length-1)},"~B");j(b,"getCIPChirality",function(a){var d=(this.formalChargeAndFlags&496)>>4;0==d&&(1<this.atomNumberFlags&&a)&&
(d=this.group.chain.model.ms.getAtomCIPChiralityCode(this),this.formalChargeAndFlags|=(0==d?3:d)<<4);return JV.JC.getCIPChiralityName(d)},"~B");c(b,"getCIPChiralityRule",function(){var a=0==this.getCIPChirality(!0).length?-1:(this.formalChargeAndFlags&3584)>>9;return JV.JC.getCIPRuleName(a+1)});j(b,"setCIPChirality",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&-4081|a<<4},"~N");j(b,"getCIPChiralityCode",function(){return(this.formalChargeAndFlags&496)>>4});j(b,"getInsertionCode",
function(){return this.group.getInsertionCode()});c(b,"atomPropertyTuple",function(a,d,b){switch(d){case 1073742329:return JU.P3.newP(this);case 1145047050:return this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145047053:return this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145045006:return this.group.chain.model.isJmolDataFrame?this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b):this.getFractionalUnitCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145047052:return JU.P3.new3(Math.round(a.antialiased?
w(this.sX/2):this.sX),Math.round(a.getScreenHeight()-(a.antialiased?w(this.sY/2):this.sY)),Math.round(a.antialiased?w(this.sZ/2):this.sZ));case 1145047055:return this.getVibrationVector();case 1145045008:return a=this.getModulation(),null==a?null:a.getV3();case 1145047049:return this;case 1765808134:return JU.CU.colorPtFromInt(this.group.chain.model.ms.vwr.gdata.getColorArgbOrGray(this.colixAtom),b)}return null},"JV.Viewer,~N,JU.P3");j(b,"getOffsetResidueAtom",function(a,d){return this.group.getAtomIndex(a,
d)},"~S,~N");j(b,"isCrossLinked",function(a){return this.group.isCrossLinked(a.group)},"JU.Node");j(b,"getCrossLinkVector",function(a,d,b){return this.group.getCrossLinkVector(a,d,b)},"JU.Lst,~B,~B");j(b,"toString",function(){return this.getInfo()});j(b,"findAtomsLike",function(a){return this.group.chain.model.ms.vwr.getAtomBitSet(a)},"~S");c(b,"getUnitID",function(a){var d=this.group.chain.model;return d.isBioModel?d.getUnitID(this,a):""},"~N");j(b,"getFloatProperty",function(a){a=this.group.chain.model.ms.vwr.getDataObj(a,
null,1);var d=NaN;if(null!=a)try{d=a[this.i]}catch(b){if(!H(b,Exception))throw b;}return d},"~S");j(b,"modelIsRawPDB",function(){var a=this.group.chain.model;return a.isBioModel&&!a.isPdbWithMultipleBonds&&0==a.hydrogenCount});c(b,"setSymop",function(a,d){null==this.atomSymmetry&&(this.atomSymmetry=new JU.BS);d&&this.atomSymmetry.clearAll();0<a&&this.atomSymmetry.set(a-1)},"~N,~B");j(b,"getExplicitHydrogenCount",function(){return 0})});s("JM");B(["JU.V3"],"JM.AtomCollection","java.util.ArrayList $.Arrays $.Hashtable JU.A4 $.AU $.BS $.Lst $.M3 $.Measure $.P3 $.PT $.SB J.api.Interface J.atomdata.RadiusData J.c.PAL $.VDW JM.Group JS.T JU.BSUtil $.Elements $.Logger $.Parser $.Vibration".split(" "),
function(){var b=n(function(){this.at=this.bioModelset=this.g3d=this.vwr=null;this.ac=0;this.labeler=this.pointGroup=this.trajectory=null;this.maxVanderwaalsRadius=this.maxBondingRadius=1.4E-45;this.hasBfactorRange=!1;this.bfactor100Hi=this.bfactor100Lo=0;this.haveBSClickable=this.haveBSVisible=!1;this.bsSurface=null;this.surfaceDistanceMax=this.nSurfaceAtoms=0;this.haveChirality=!1;this.bspf=null;this.canSkipLoad=this.preserveState=!0;this.haveStraightness=!1;this.aaRet=this.bsPartialCharges=this.hydrophobicities=
this.bondingRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vib=this.vibrations=this.dssrData=this.atomSeqIDs=this.atomResnos=this.atomSerials=this.atomTypes=this.atomNames=this.tainted=this.surfaceDistance100s=this.atomTensors=this.atomTensorList=this.bsModulated=this.bsClickable=this.bsVisible=this.bsHidden=null;S("JM.AtomCollection.AtomSorter")||JM.AtomCollection.$AtomCollection$AtomSorter$();this.atomCapacity=0;v(this,arguments)},JM,"AtomCollection",null);c(b,"getAtom",function(a){return 0<=
a&&a<this.at.length?this.at[a]:null},"~N");c(b,"setupAC",function(){this.bsHidden=new JU.BS;this.bsVisible=new JU.BS;this.bsClickable=new JU.BS;null==JM.AtomCollection.userSettableValues&&(JM.AtomCollection.userSettableValues="atomName atomType coord element formalCharge hydrophobicity ionic occupancy partialCharge temperature valence vanderWaals vibrationVector atomNo seqID resNo chain site".$plit(" "))});c(b,"releaseModelSetAC",function(){this.ac=0;this.bfactor100s=this.occupancies=this.vibrations=
this.atomSeqIDs=this.atomSerials=this.dssrData=this.atomResnos=this.atomTypes=this.atomNames=this.tainted=this.bsSurface=this.surfaceDistance100s=this.bspf=this.g3d=this.vwr=this.at=null;this.resetPartialCharges();this.atomTensors=this.bondingRadii=null});c(b,"mergeAtomArrays",function(a){this.tainted=a.tainted;this.atomNames=a.atomNames;this.atomTypes=a.atomTypes;this.atomResnos=a.atomResnos;this.atomSerials=a.atomSerials;this.atomSeqIDs=a.atomSeqIDs;this.vibrations=a.vibrations;this.occupancies=
a.occupancies;this.bfactor100s=a.bfactor100s;this.bondingRadii=a.bondingRadii;this.partialCharges=a.partialCharges;this.bsPartialCharges=a.bsPartialCharges;this.atomTensors=a.atomTensors;this.atomTensorList=a.atomTensorList;this.bsModulated=a.bsModulated;this.haveStraightness=!1;this.surfaceDistance100s=null},"JM.AtomCollection");c(b,"getAtomPointVector",function(a){var d=new JU.Lst,b=this.ac;if(null!=a)for(var c=a.nextSetBit(0);0<=c&&c<b;c=a.nextSetBit(c+1))d.addLast(this.at[c]);return d},"JU.BS");
c(b,"modelSetHasVibrationVectors",function(){return null!=this.vibrations});c(b,"getAtomTypes",function(){return this.atomTypes});c(b,"getPartialCharges",function(){return this.partialCharges});c(b,"getBondingRadii",function(){return this.bondingRadii});c(b,"getBFactors",function(){return this.bfactor100s});c(b,"getHydrophobicity",function(){return this.hydrophobicities});c(b,"setBsHidden",function(a){this.bsHidden=a},"JU.BS");c(b,"isAtomHidden",function(a){return this.bsHidden.get(a)},"~N");c(b,
"getLabeler",function(){return null==this.labeler?this.labeler=J.api.Interface.getInterface("JM.LabelToken",this.vwr,"ms"):this.labeler});c(b,"getAtomInfo",function(a,d,b){return null==d?this.at[a].getInfo():this.getLabeler().formatLabel(this.vwr,this.at[a],d,b)},"~N,~S,JU.P3");c(b,"getElementName",function(a){return JU.Elements.elementNameFromNumber(this.at[a].getAtomicAndIsotopeNumber())},"~N");c(b,"getQuaternion",function(a,d){return 0>a?null:this.at[a].group.getQuaternion(d)},"~N,~S");c(b,"getFirstAtomIndexFromAtomNumber",
function(a,d){for(var b=0;b<this.ac;b++){var c=this.at[b];if(!JM.AtomCollection.isDeleted(c)&&c.getAtomNumber()==a&&d.get(c.mi))return b}return-1},"~N,JU.BS");c(b,"setFormalCharges",function(a,d){if(null!=a){this.resetPartialCharges();for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.at[b].setFormalCharge(d),this.taintAtom(b,4)}},"JU.BS,~N");c(b,"getAtomicCharges",function(){for(var a=L(this.ac,0),d=this.ac;0<=--d;)a[d]=JM.AtomCollection.isDeleted(this.at[d])?0:this.at[d].getElementNumber();
return a});c(b,"getRadiusVdwJmol",function(a){return JU.Elements.getVanderwaalsMar(a.getElementNumber(),J.c.VDW.JMOL)/1E3},"JM.Atom");c(b,"getMaxVanderwaalsRadius",function(){1.4E-45==this.maxVanderwaalsRadius&&this.findMaxRadii();return this.maxVanderwaalsRadius});c(b,"findMaxRadii",function(){for(var a,d=this.ac;0<=--d;){var b=this.at[d];if(!JM.AtomCollection.isDeleted(b)){if((a=b.getBondingRadius())>this.maxBondingRadius)this.maxBondingRadius=a;if((a=b.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO))>
this.maxVanderwaalsRadius)this.maxVanderwaalsRadius=a}}});c(b,"clearBfactorRange",function(){this.hasBfactorRange=!1});c(b,"calcBfactorRange",function(a){if(!this.hasBfactorRange){this.bfactor100Lo=2147483647;this.bfactor100Hi=-2147483648;if(null==a)for(var d=0;d<this.ac;d++)this.setBf(d);else for(d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.setBf(d);this.hasBfactorRange=!0}},"JU.BS");c(b,"setBf",function(a){JM.AtomCollection.isDeleted(this.at[a])||(a=this.at[a].getBfactor100(),a<this.bfactor100Lo?
this.bfactor100Lo=a:a>this.bfactor100Hi&&(this.bfactor100Hi=a))},"~N");c(b,"getBfactor100Lo",function(){this.hasBfactorRange||(this.vwr.g.rangeSelected?this.calcBfactorRange(this.vwr.bsA()):this.calcBfactorRange(null));return this.bfactor100Lo});c(b,"getBfactor100Hi",function(){this.getBfactor100Lo();return this.bfactor100Hi});c(b,"getSurfaceDistanceMax",function(){null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistanceMax});c(b,"calculateVolume",function(a,d){var b=
0;if(null!=a)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))b+=this.at[c].getVolume(this.vwr,d);return b},"JU.BS,J.c.VDW");c(b,"getSurfaceDistance100",function(a){if(0==this.nSurfaceAtoms)return-1;null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistance100s[a]},"~N");c(b,"calcSurfaceDistances",function(){this.calculateSurface(null,-1)});c(b,"calculateSurface",function(a,d){0>d&&(d=3);var b=J.api.Interface.getOption("geodesic.EnvelopeCalculation",this.vwr,"ms").set(this.vwr,
this.ac,null);b.calculate(new J.atomdata.RadiusData(null,d,J.atomdata.RadiusData.EnumType.ABSOLUTE,null),3.4028235E38,a,JU.BSUtil.copyInvert(a,this.ac),!1,!1,!1,!0);var c=b.getPoints();this.surfaceDistanceMax=0;this.bsSurface=b.getBsSurfaceClone();this.surfaceDistance100s=F(this.ac,0);this.nSurfaceAtoms=JU.BSUtil.cardinalityOf(this.bsSurface);if(0==this.nSurfaceAtoms||null==c||0==c.length)return c;for(var b=3.4028235E38==d?0:d,e=0;e<this.ac;e++)if(this.bsSurface.get(e)||JM.AtomCollection.isDeleted(this.at[e]))this.surfaceDistance100s[e]=
0;else{for(var f=3.4028235E38,h=this.at[e],k=c.length;0<=--k;)f=Math.min(Math.abs(c[k].distance(h)-b),f);f=this.surfaceDistance100s[e]=w(Math.floor(100*f));this.surfaceDistanceMax=Math.max(this.surfaceDistanceMax,f)}return c},"JU.BS,~N");c(b,"setAtomCoord2",function(a,d,b){var c=null,e=null,f=null,h=0,k=1;if(y(b,"JU.P3"))c=b;else if(y(b,"JU.Lst")){f=b;if(0==(k=f.size()))return;h=1}else if(JU.AU.isAP(b)){e=b;if(0==(k=e.length))return;h=2}else return;b=0;if(null!=a)for(var m=a.nextSetBit(0);0<=m;m=
a.nextSetBit(m+1)){switch(h){case 1:if(b>=k)return;c=f.get(b++);break;case 2:if(b>=k)return;c=e[b++]}if(null!=c)switch(d){case 1145047049:this.setAtomCoord(m,c.x,c.y,c.z);break;case 1145047050:case 1145047053:this.at[m].setFractionalCoordTo(c,!1);this.taintAtom(m,2);break;case 1145047055:this.setAtomVibrationVector(m,c)}}},"JU.BS,~N,~O");c(b,"setAtomVibrationVector",function(a,d){this.taintAtom(a,12);return this.setVibrationVector(a,d)},"~N,JU.T3");c(b,"setAtomCoord",function(a,d,b,c){if(!(0>a||a>=
this.ac)){var e=this.at[a];e.set(d,b,c);this.fixTrajectory(e);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(b,"fixTrajectory",function(a){this.isTrajectory(a.mi)&&this.trajectory.fixAtom(a)},"JM.Atom");c(b,"setAtomCoordRelative",function(a,d,b,c){if(!(0>a||a>=this.ac)){var e=this.at[a];e.add3(d,b,c);this.fixTrajectory(e);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(b,"setAtomsCoordRelative",function(a,d,b,c){if(null!=a)for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))this.setAtomCoordRelative(e,d,b,c)},"JU.BS,~N,~N,~N");
c(b,"setAPa",function(a,d,b,c,e,f,h){var k=0;if(!(null!=f&&0==f.length||null==a)){for(var m=null!=f&&f.length==this.ac||null!=h&&h.length==this.ac,j=a.nextSetBit(0);0<=j;j=a.nextSetBit(j+1)){m&&(k=j);if(null!=f){if(k>=f.length)return;c=f[k++];if(Float.isNaN(c))continue;b=D(c)}else if(null!=h){if(k>=h.length)return;e=h[k++]}var p=this.at[j],q;switch(d){case 1086326786:this.setAtomName(j,e,!0);break;case 1086326785:this.setAtomType(j,e);break;case 1086326788:this.setChainID(j,e);break;case 1094715393:this.setAtomNumber(j,
b,!0);break;case 1094713368:this.setAtomSeqID(j,b);break;case 1111492609:case 1111492629:this.setAtomCoord(j,c,p.y,p.z);break;case 1111492610:case 1111492630:this.setAtomCoord(j,p.x,c,p.z);break;case 1111492611:case 1111492631:this.setAtomCoord(j,p.x,p.y,c);break;case 1111492626:case 1111492627:case 1111492628:this.setVibrationVector2(j,d,c);break;case 1111492612:case 1111492613:case 1111492614:case 1111492615:case 1111492616:case 1111492617:p.setFractionalCoord(d,c,!1);this.taintAtom(j,2);break;
case 1094715402:case 1086326789:this.setElement(p,b,!0);break;case 1631586315:this.resetPartialCharges();p.setFormalCharge(b);this.taintAtom(j,4);break;case 1113589786:this.setHydrophobicity(j,c);break;case 1128269825:q=2>c&&0.01<=c?100*c:c;this.setOccupancy(j,q,!0);break;case 1111492619:this.setPartialCharge(j,c,!0);break;case 1111492618:this.setBondingRadius(j,c);break;case 1111492620:this.setBFactor(j,c,!0);break;case 1094715412:this.setAtomResno(j,b);break;case 1825200146:case 1287653388:this.vwr.shm.setAtomLabel(e,
j);break;case 1665140738:case 1112152075:q=c;0>q?q=0:16<q&&(q=16.1);p.madAtom=fa(2E3*q);break;case 1113589787:this.vwr.slm.setSelectedAtom(p.i,0!=c);break;case 1094715420:p.setValence(b);this.taintAtom(j,10);break;case 1648363544:p.setRadius(c)?this.taintAtom(j,11):this.untaint(j,11);break;default:JU.Logger.error("unsettable atom property: "+JS.T.nameOf(d));return}}switch(d){case 1113589787:this.vwr.slm.setSelectedAtom(-1,!1);break;case 1665140738:case 1112152075:this.vwr.setShapeSize(0,2147483647,
a)}}},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"getVibCoord",function(a,d){var b=null,c=null;switch(d.charCodeAt(0)){case 120:case 121:case 122:c=this.getVibration(a,!1);break;default:b=this.getModulation(a),null!=b&&(c=b.getVibration(!1),null==c&&(c=b))}if(null==c&&null==b)return NaN;switch(d.charCodeAt(0)){case 120:case 88:return c.x;case 121:case 89:return c.y;case 122:case 90:return c.z;case 79:return b.getModulation("O",null,!0).floatValue();case 49:case 50:case 51:return b=b.getModulation("T",null,!0),
b="1"==d?b.x:"2"==d?b.y:b.z,b-Math.floor(b);default:return NaN}},"~N,~S");c(b,"getVibration",function(a,d){var b=null==this.vibrations?null:this.vibrations[a];return y(b,"J.api.JmolModulationSet")?b.getVibration(d):null==b&&d?new JU.Vibration:b},"~N,~B");c(b,"getModulation",function(a){a=null==this.vibrations?null:this.vibrations[a];return null!=a&&0<a.modDim?a:null},"~N");c(b,"setVibrationVector",function(a,d){if(null==d)return null!=this.vibrations&&this.vibrations.length>a&&(this.vibrations[a]=
null),null;if(Double.isNaN(d.x)||(Double.isNaN(d.y)||Double.isNaN(d.z))||a>=this.at.length)return null;null==this.vibrations?this.vibrations=Array(this.at.length):this.vibrations.length<=a&&(this.vibrations=JU.AU.arrayCopyObject(this.vibrations,this.at.length));y(d,"JU.Vibration")?null==this.vibrations[a]?this.vibrations[a]=this.vib=d:(this.vib=this.vibrations[a],this.vib.setXYZ(d)):(null==this.vibrations[a]&&(this.vibrations[a]=new JU.Vibration),this.vibrations[a].setXYZ(d));this.at[a].setVibrationVector();
return this.vibrations[a]},"~N,JU.T3");c(b,"setVibrationVector2",function(a,d,b){var c=this.getVibration(a,!0);if(null!=c){switch(d){case 1111492626:c.x=b;break;case 1111492627:c.y=b;break;case 1111492628:c.z=b}this.setAtomVibrationVector(a,c)}},"~N,~N,~N");c(b,"setAtomName",function(a,d,b){if(!b||!d.equals(this.at[a].getAtomName())){var c=this.am[this.at[a].mi].isBioModel?this.vwr.getJBR().lookupSpecialAtomID(d):0;this.at[a].atomID=c;0>=c&&(null==this.atomNames&&(this.atomNames=Array(this.at.length)),
this.atomNames[a]=d);b&&this.taintAtom(a,0)}},"~N,~S,~B");c(b,"setAtomType",function(a,d){d.equals(this.at[a].getAtomType())||(null==this.atomTypes&&(this.atomTypes=Array(this.at.length)),this.atomTypes[a]=d)},"~N,~S");c(b,"setChainID",function(a,d){if(!d.equals(this.at[a].getChainIDStr())){var b=this.at[a].getChainID(),b=this.getChainBits(b);this.at[a].group.chain.chainID=this.vwr.getChainID(d,!0);for(var c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.taintAtom(c,16)}},"~N,~S");c(b,"setAtomNumber",
function(a,d,b){b&&d==this.at[a].getAtomNumber()||(null==this.atomSerials&&(this.atomSerials=F(this.at.length,0)),this.atomSerials[a]=d,b&&this.taintAtom(a,13))},"~N,~N,~B");c(b,"setElement",function(a,d,b){b&&a.getElementNumber()==d||(a.setAtomicAndIsotopeNumber(d),a.paletteID=J.c.PAL.CPK.id,a.colixAtom=this.vwr.cm.getColixAtomPalette(a,J.c.PAL.CPK.id),this.resetPartialCharges(),b&&this.taintAtom(a.i,3))},"JM.Atom,~N,~B");c(b,"setSite",function(a,d,b){a.atomSite!=d&&(a.atomSite=d,b&&this.taintAtom(a.i,
17))},"JM.Atom,~N,~B");c(b,"resetPartialCharges",function(){this.bsPartialCharges=this.partialCharges=null});c(b,"setAtomResno",function(a,d){d!=this.at[a].getResno()&&(this.at[a].group.setResno(d),null==this.atomResnos&&(this.atomResnos=F(this.at.length,0)),this.atomResnos[a]=d,this.taintAtom(a,15))},"~N,~N");c(b,"setAtomSeqID",function(a,d){d!=this.at[a].getSeqID()&&(null==this.atomSeqIDs&&(this.atomSeqIDs=F(this.at.length,0)),this.atomSeqIDs[a]=d,this.taintAtom(a,14))},"~N,~N");c(b,"setOccupancy",
function(a,d,b){if(!(b&&d==this.at[a].getOccupancy100())){if(null==this.occupancies){if(100==d)return;this.occupancies=L(this.at.length,0);for(var c=this.at.length;0<=--c;)this.occupancies[c]=100}this.occupancies[a]=d;b&&this.taintAtom(a,7)}},"~N,~N,~B");c(b,"getOccupancyFloat",function(a){return null==this.occupancies||a>=this.occupancies.length?100:this.occupancies[a]},"~N");c(b,"setPartialCharge",function(a,d,b){if(!Float.isNaN(d)){if(null==this.partialCharges){this.bsPartialCharges=new JU.BS;
if(0==d)return;this.partialCharges=L(this.at.length,0)}this.bsPartialCharges.set(a);this.partialCharges[a]=d;b&&this.taintAtom(a,8)}},"~N,~N,~B");c(b,"setBondingRadius",function(a,d){Float.isNaN(d)||d==this.at[a].getBondingRadius()||(null==this.bondingRadii?this.bondingRadii=L(this.at.length,0):this.bondingRadii.length<this.at.length&&(this.bondingRadii=JU.AU.ensureLengthA(this.bondingRadii,this.at.length)),this.bondingRadii[a]=d,this.taintAtom(a,6))},"~N,~N");c(b,"setBFactor",function(a,d,b){if(!(Float.isNaN(d)||
b&&d==this.at[a].getBfactor100())){if(null==this.bfactor100s){if(0==d)return;this.bfactor100s=V(this.at.length,0)}this.bfactor100s[a]=va(100*(-327.68>d?-327.68:327.67<d?327.67:d)+(0>d?-0.5:0.5));b&&this.taintAtom(a,9)}},"~N,~N,~B");c(b,"setHydrophobicity",function(a,d){if(!(Float.isNaN(d)||d==this.at[a].getHydrophobicity())){if(null==this.hydrophobicities){this.hydrophobicities=L(this.at.length,0);for(var b=0;b<this.at.length;b++)this.hydrophobicities[b]=JU.Elements.getHydrophobicity(this.at[b].group.groupID)}this.hydrophobicities[a]=
d;this.taintAtom(a,5)}},"~N,~N");c(b,"setAtomData",function(a,d,b,c){var e=null,f=null;switch(a){case 2:this.loadCoordinates(b,1073742329,!c);return;case 12:this.loadCoordinates(b,4166,!0);return;case 18:e=L(this.ac,0),f=JU.BS.newN(this.ac)}c=JU.Parser.markLines(b,";");var h=0;try{for(var k=JU.PT.parseInt(b.substring(0,c[0]-1)),m=1;m<=k;m++){var j=JU.PT.getTokens(JU.PT.parseTrimmed(b.substring(c[m],c[m+1]-1))),p=JU.PT.parseInt(j[0])-1;if(!(0>p||p>=this.ac)){var q=this.at[p];h++;var r=j.length-1,u=
JU.PT.parseFloat(j[r]);switch(a){case 18:e[p]=u;f.set(p);continue;case 0:this.setAtomName(p,j[r],!0);break;case 13:this.setAtomNumber(p,D(u),!0);break;case 15:this.setAtomResno(p,D(u));break;case 14:this.setAtomSeqID(p,D(u));break;case 1:this.setAtomType(p,j[r]);break;case 16:this.setChainID(p,j[r]);break;case 17:q.atomSite=D(u);break;case 3:q.setAtomicAndIsotopeNumber(D(u));q.paletteID=J.c.PAL.CPK.id;q.colixAtom=this.vwr.cm.getColixAtomPalette(q,J.c.PAL.CPK.id);break;case 4:q.setFormalCharge(D(u));
break;case 5:this.setHydrophobicity(p,u);break;case 6:this.setBondingRadius(p,u);break;case 8:this.setPartialCharge(p,u,!0);break;case 9:this.setBFactor(p,u,!0);break;case 10:q.setValence(D(u));break;case 11:q.setRadius(u)}this.taintAtom(p,a)}}18==a&&0<h&&this.vwr.setData(d,x(-1,[d,e,f,Integer.$valueOf(1)]),0,0,0,0,0)}catch(C){if(H(C,Exception))JU.Logger.error("loadData error: "+C);else throw C;}},"~N,~S,~S,~B");c(b,"loadCoordinates",function(a,d,b){var c=JU.Parser.markLines(a,";"),e=4166==d||1095241729==
d?new JU.V3:null;try{for(var f=JU.PT.parseInt(a.substring(0,c[0]-1)),h=1;h<=f;h++){var k=JU.PT.getTokens(JU.PT.parseTrimmed(a.substring(c[h],c[h+1]))),m=JU.PT.parseInt(k[0])-1,j=k[3].equalsIgnoreCase("1.4E-45")?1.4E-45:JU.PT.parseFloat(k[3]),p=k[4].equalsIgnoreCase("1.4E-45")?1.4E-45:JU.PT.parseFloat(k[4]),q=JU.PT.parseFloat(k[5]);switch(d){case 4166:e.set(j,p,q);var r=this.setAtomVibrationVector(m,e);null!=r&&7<k.length&&(r.modDim=JU.PT.parseInt(k[6]),r.magMoment=JU.PT.parseFloat(k[7]));break;default:this.setAtomCoord(m,
j,p,q),b||this.untaint(m,2)}}}catch(u){if(H(u,Exception))JU.Logger.error("Frame.loadCoordinate error: "+u);else throw u;}},"~S,~N,~B");c(b,"validateBspf",function(a){null!=this.bspf&&(this.bspf.isValid=a)},"~B");c(b,"validateBspfForModel",function(a,d){null!=this.bspf&&this.bspf.validateModel(a,d)},"~N,~B");c(b,"setPreserveState",function(a){this.preserveState=a},"~B");b.getUserSettableType=c(b,"getUserSettableType",function(a){var d=0==a.indexOf("property_");a=d?a.substring(9):a;for(var b=0;18>b;b++)if(JM.AtomCollection.userSettableValues[b].equalsIgnoreCase(a))return b;
return d?18:-1},"~S");c(b,"getTaintedAtoms",function(a){return null==this.tainted?null:this.tainted[a]},"~N");c(b,"taintAtoms",function(a,d){this.canSkipLoad=!1;if(this.preserveState)for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.taintAtom(b,d)},"JU.BS,~N");c(b,"taintAtom",function(a,d){this.preserveState&&(null==this.tainted&&(this.tainted=Array(18)),null==this.tainted[d]&&(this.tainted[d]=JU.BS.newN(this.ac)),this.tainted[d].set(a));2==d&&this.taintModelCoord(a)},"~N,~N");c(b,"taintModelCoord",
function(a){a=this.am[this.at[a].mi];this.validateBspfForModel(a.trajectoryBaseIndex,!1);a.isBioModel&&a.resetDSSR(!0);this.pointGroup=null},"~N");c(b,"untaint",function(a,d){this.preserveState&&(null==this.tainted||null==this.tainted[d]||this.tainted[d].clear(a))},"~N,~N");c(b,"setTaintedAtoms",function(a,d){if(this.preserveState){if(null==a){if(null==this.tainted)return;this.tainted[d]=null;return}null==this.tainted&&(this.tainted=Array(18));null==this.tainted[d]&&(this.tainted[d]=JU.BS.newN(this.ac));
JU.BSUtil.copy2(a,this.tainted[d])}if(2==d){var b=a.nextSetBit(0);0<=b&&this.taintModelCoord(b)}},"JU.BS,~N");c(b,"unTaintAtoms",function(a,d){if(!(null==this.tainted||null==this.tainted[d])){for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.tainted[d].clear(b);0>this.tainted[d].nextSetBit(0)&&(this.tainted[d]=null)}},"JU.BS,~N");c(b,"findNearest2",function(a,d,b,c,e){for(var f=null,h,k=this.ac;0<=--k;)if(!(null!=c&&c.get(k)||null==(h=this.at[k])))h.isClickable()&&this.isCursorOnTopOf(h,a,d,
e,f)&&(f=h);b[0]=f},"~N,~N,~A,JU.BS,~N");c(b,"isCursorOnTopOf",function(a,d,b,c,e){return 1<a.sZ&&!this.g3d.isClippedZ(a.sZ)&&this.g3d.isInDisplayRange(a.sX,a.sY)&&a.isCursorOnTopOf(d,b,c,e)},"JM.Atom,~N,~N,~N,JM.Atom");c(b,"fillADa",function(a,d){a.xyz=a.atoms=this.at;a.ac=this.ac;a.atomicNumber=F(this.ac,0);var b=0!=(d&2);b&&(a.atomRadius=L(this.ac,0));for(var c=0!=(d&16),e=0;e<this.ac;e++){var f=this.at[e];JM.AtomCollection.isDeleted(f)||!c&&0<=a.modelIndex&&f.mi!=a.firstModelIndex?(null==a.bsIgnored&&
(a.bsIgnored=new JU.BS),a.bsIgnored.set(e)):(a.atomicNumber[e]=f.getElementNumber(),a.lastModelIndex=f.mi,b&&(a.atomRadius[e]=this.getWorkingRadius(f,a)))}},"J.atomdata.AtomData,~N");c(b,"getWorkingRadius",function(a,d){var b=0,c=d.radiusData;switch(c.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:b=c.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:switch(c.vdwType){case J.c.VDW.BONDING:b=a.getBondingRadius();break;case J.c.VDW.ADPMAX:b=
a.getADPMinMax(!0);break;case J.c.VDW.ADPMIN:b=a.getADPMinMax(!1);break;default:b=a.getVanderwaalsRadiusFloat(this.vwr,d.radiusData.vdwType)}b=c.factorType===J.atomdata.RadiusData.EnumType.FACTOR?b*c.value:b+c.value}return b+c.valueExtended},"JM.Atom,J.atomdata.AtomData");c(b,"calculateHydrogens",function(a,d,b,c){var e=256==(c&256),f=512==(c&512),h=8==(c&8),k=2048==(c&2048);c=4096==(c&4096);var m=new JU.V3,j=new JU.V3,p=Array(this.ac),q=this.vwr.slm.bsDeleted,r,u=d[0]=0;if(null==a)return p;var C=
this.vwr.getOperativeSymmetry();null!=C&&0==this.vwr.getObjectMad10(5)&&(C=null);for(var n=null==C?null:new JU.P3,s=a.nextSetBit(0);0<=s;s=a.nextSetBit(s+1))if(!(null!=q&&q.get(s))){var v=this.at[s],x=v.getElementNumber();if(!(f&&6!=x)){var y=6>=x?1.1:10>=x?1:1.3;switch(x){case 7:case 8:y=1}var z=e||k||c?v.getCovalentHydrogenCount():0;if(!(e&&0<z||k&&0==z)){var w=this.getMissingHydrogenCount(v,!1);if(!(e&&0==w)){k||(z=w);var A=this.aaRet[0];r=this.aaRet[2];var B=this.aaRet[3]-(k?z:0);if(!(0==B&&v.isHetero())){p[s]=
Array(z);w=0;if(0==B)switch(z){case 4:m.set(0.635,0.635,0.635),r=JU.P3.newP(m),r.add(v),w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);case 3:m.set(-0.635,-0.635,0.635),r=JU.P3.newP(m),r.add(v),w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);case 2:m.set(-0.635,0.635,-0.635),r=JU.P3.newP(m),r.add(v),w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);case 1:m.set(0.635,-0.635,-0.635),r=JU.P3.newP(m),r.add(v),w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n)}else switch(z){case 3:this.getHybridizationAndAxes(s,x,m,j,"sp3b",
!1,!0,h,null);r=new JU.P3;r.scaleAdd2(y,m,v);w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);this.getHybridizationAndAxes(s,x,m,j,"sp3c",!1,!0,h,null);r=new JU.P3;r.scaleAdd2(y,m,v);w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);this.getHybridizationAndAxes(s,x,m,j,"sp3d",!1,!0,h,null);r=new JU.P3;r.scaleAdd2(y,m,v);w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);break;case 2:B=2==r||5==x||1==B&&4==A||7==x&&this.isAdjacentSp2(v);this.getHybridizationAndAxes(s,x,m,j,B?"sp2b":3==A?"sp3c":"lpa",!1,!0,h,null);r=JU.P3.newP(m);
r.scaleAdd2(y,m,v);w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);this.getHybridizationAndAxes(s,x,m,j,B?"sp2c":3==A?"sp3d":"lpb",!1,!0,h,null);r=JU.P3.newP(m);r.scaleAdd2(y,m,v);w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);break;case 1:switch(A-B){case 1:if(8==x&&v===v.group.getCarbonylOxygenAtom()){p[s]=null;continue}if(null!=this.getHybridizationAndAxes(s,x,m,j,2==r||5==x||6==x&&1==this.aaRet[1]||7==x&&(new Boolean((new Boolean(v.group.getNitrogenAtom()===v&0==v.getFormalCharge())).valueOf()||this.isAdjacentSp2(v))).valueOf()?
"sp2c":"sp3d",!0,!1,h,null))r=JU.P3.newP(m),r.scaleAdd2(y,m,v),w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);break;case 2:this.getHybridizationAndAxes(s,x,m,j,4==A?"sp2c":"sp2b",!1,!1,h,null);r=JU.P3.newP(m);r.scaleAdd2(y,m,v);w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n);break;case 3:this.getHybridizationAndAxes(s,x,m,j,"spb",!1,!0,h,null),r=JU.P3.newP(m),r.scaleAdd2(y,m,v),w=JM.AtomCollection.addH(p[s],w,r,v,b,C,n)}}if(w<z){v=Array(w);for(x=0;x<w;x++)v[x]=p[s][x];p[s]=v}u+=w}}}}}d[0]=u;return p},"JU.BS,~A,JU.Lst,~N");
b.addH=c(b,"addH",function(a,d,b,c,e,f,h){if(null!=f&&(h.setT(b),f.toFractional(h,!1),!f.isWithinUnitCell(h,1,1,1,NaN)))return d;a[d++]=b;null!=e&&e.addLast(c);return d},"~A,~N,JU.P3,JM.Atom,JU.Lst,J.api.SymmetryInterface,JU.P3");c(b,"isAdjacentSp2",function(a){for(var d=a.bonds,b=0;b<d.length;b++)for(var c=d[b].getOtherAtom(a).bonds,e=0;e<c.length;e++)switch(c[e].getCovalentOrder()){case 2:case 3:return!0}return!1},"JM.Atom");c(b,"getMissingHydrogenCount",function(a,d){null==this.aaRet&&(this.aaRet=
F(5,0));var b=a.getTargetValence();if(0>b)return 0;var c=a.getFormalCharge(),e=a.getValence(),f=this.am[a.mi],f=f.isBioModel&&!f.isPdbWithMultipleBonds?a.group.getGroup3():null;this.aaRet[0]=b;this.aaRet[1]=c;this.aaRet[2]=0;this.aaRet[3]=a.getCovalentBondCount();this.aaRet[4]=null==f?0:e;null!=f&&0==c&&this.bioModelset.getAminoAcidValenceAndCharge(f,a.getAtomName(),this.aaRet)&&(b=this.aaRet[0],c=this.aaRet[1]);0!=c&&(b+=4==b?-Math.abs(c):c,this.aaRet[0]=b);b-=e;return 0>b&&!d?0:b},"JM.Atom,~B");
c(b,"fixFormalCharges",function(a){for(var d=0,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var c=this.at[b],e=this.getMissingHydrogenCount(c,!0);if(0!=e){var f=c.getFormalCharge(),e=f-e;c.setFormalCharge(e);this.taintAtom(b,4);JU.Logger.debugging&&JU.Logger.debug("atom "+c+" formal charge "+f+" -> "+e);d++}}return d},"JU.BS");c(b,"getHybridizationAndAxes",function(a,d,b,c,e,f,h,k,m){var j=0<e.length&&"-"==e.charAt(0)?e.substring(1):e;if(0<=e.indexOf("d")&&!e.endsWith("sp3d"))return this.getHybridizationAndAxesD(a,
b,c,j);e=this.at[a];0==d&&(d=e.getElementNumber());var p=this.getAttached(e,4,f,k),q=p.length,r=j.charAt(j.length-1).charCodeAt(0)-97;if(0>r||6<r)r=0;b.set(0,0,0);c.set(0,0,0);for(var u=Array(4),C=0;C<q;C++){var n=p[C];if(null==n){q=C;break}u[C]=JU.V3.newVsub(e,n);u[C].normalize();b.add(u[C])}0<q&&c.setT(u[0]);C=!1;a=new JU.V3;if(3<=q){2.9845130209103035>c.angle(u[1])?a.cross(c,u[1]):a.cross(c,u[2]);a.normalize();var s=new JU.V3;2.9845130209103035>u[1].angle(u[2])?s.cross(u[1],u[2]):s.cross(c,u[2]);
s.normalize();C=0.95<=Math.abs(s.dot(a))}var v=0==j.indexOf("sp3"),n=!v&&0==j.indexOf("sp2"),x=!v&&!n&&0==j.indexOf("sp"),w=0==j.indexOf("p"),y=0==j.indexOf("lp"),s=null;if(f){if(0==q)return null;if(v){if(3<r||4<q)return null}else if(n){if(2<r||3<q)return null}else if(x&&(1<r||2<q))return null;switch(q){case 1:if(1==d&&!v)return null;if(v){s="sp3";break}switch(p[0].getCovalentBondCount()){case 1:if(2!=p[0].getValence()){s="sp";break}case 2:s=x?"sp":"sp2";break;case 3:if(!n&&!w)return null;s="sp2"}break;
case 2:if(0.1>b.length()){if(0<=j.indexOf("2")||0<=j.indexOf("3"))return null;s="sp";break}s=v?"sp3":"sp2";if(0==j.indexOf("sp"))break;if(y){s="lp";break}s=j;break;default:if(C&&!k)s="sp2";else{C&&b.setT(a);if(y&&3==q){s="lp";break}s="sp3"}}if(null==s)return null;if(0==j.indexOf("p")){if("sp3"===s)return null}else if(0>j.indexOf(s))return null}if(r<q&&!j.startsWith("p")&&!j.startsWith("l"))return b.sub2(p[r],e),b.normalize(),s;switch(q){case 0:j.equals("sp3c")||j.equals("sp2d")||j.equals("lpa")?b.set(-0.5,
-0.7,1):j.equals("sp3b")||j.equals("lpb")?b.set(0.5,-0.7,-1):j.equals("sp3a")?b.set(0,1,0):b.set(0,0,1);c.set(1,0,0);break;case 1:a.setT(JM.AtomCollection.vRef);c.cross(a,b);if(v){for(C=p[0].getBondCount();0<=--C;)if(p[0].bonds[C].isCovalentNotPartial0()&&p[0].getBondedAtomIndex(C)!=e.i&&(c.sub2(p[0],p[0].bonds[C].getOtherAtom(p[0])),c.cross(b,c),0!=c.length())){c.cross(c,b);break}c.normalize();Float.isNaN(c.x)&&(c.setT(JM.AtomCollection.vRef),c.cross(c,b));a.cross(b,c);a.normalize();b.normalize();
c.scaleAdd2(2.828,c,b);3!=r&&(c.normalize(),(new JU.M3).setAA(JU.A4.new4(b.x,b.y,b.z,2.09439507*(2==r?1:-1))).rotate(c));b.setT(c);c.cross(a,b);break}a.cross(c,b);j=p[0].getCovalentBondCount();switch(j){case 3:if(m!==p[0]){this.getHybridizationAndAxes(p[0].i,0,c,a,"pz",!1,h,k,e);a.setT(c);n?(c.cross(c,b),1==r&&c.scale(-1),c.scale(JM.AtomCollection.sqrt3_2),b.scaleAdd2(0.5,b,c)):x||(a.setT(b),b.setT(c));c.cross(a,b);break}j=2;case 1:if(1==j&&2!=p[0].getValence())break;case 2:h=p[0];c.setT(b);for(a.setT(JM.AtomCollection.vRef);null!=
h&&2==h.getCovalentBondCount();){k=h.bonds;n=null;for(C=0;C<k.length;C++)if(k[C].isCovalentNotPartial0()&&(n=k[C].getOtherAtom(h),n!==e)){a.sub2(n,h);break}a.cross(a,c);if(0.1<a.length()||2!=n.getCovalentBondCount())break;e=h;h=n}x||(0.1<a.length()?(b.cross(a,c),b.normalize(),1==r&&b.scale(-1),b.scale(JM.AtomCollection.sqrt3_2),b.scaleAdd2(0.5,c,b),w&&(a.cross(b,c),b.setT(a),a.setT(c)),c.cross(a,b)):(b.setT(c),c.cross(JM.AtomCollection.vRef,c)))}break;case 2:if(0.1>b.length()){if(!j.equals("pz")){n=
p[0];(m=3==n.getCovalentBondCount())||(m=3==(n=p[1]).getCovalentBondCount());if(m){this.getHybridizationAndAxes(n.i,0,c,b,"pz",!1,h,k,null);j.equals("px")&&c.scale(-1);b.setT(u[0]);break}a.setT(JM.AtomCollection.vRef);b.cross(a,c);a.cross(b,c)}b.setT(c);c.cross(a,b);break}a.cross(b,c);if(n){c.cross(b,a);break}if(v||y){a.normalize();b.normalize();j.equals("lp")||(0==r||2==r?b.scaleAdd2(-1.2,a,b):b.scaleAdd2(1.2,a,b));c.cross(b,a);break}c.cross(b,a);b.setT(a);0>b.z&&(b.scale(-1),c.scale(-1));break;
default:if(v)break;if(!C){c.cross(b,c);break}b.setT(a);0>b.z&&h&&(b.scale(-1),c.scale(-1))}c.normalize();b.normalize();return s},"~N,~N,JU.V3,JU.V3,~S,~B,~B,~B,JU.T3");c(b,"getHybridizationAndAxesD",function(a,d,b,c){c.startsWith("sp3d2")&&(c="d2sp3"+(5==c.length?"a":c.substring(5)));c.startsWith("sp3d")&&(c="dsp3"+(4==c.length?"a":c.substring(4)));if(c.equals("d2sp3")||c.equals("dsp3"))c+="a";var e=c.startsWith("dsp3"),f=c.charAt(c.length-1).charCodeAt(0)-97;if(null!=d&&(!e&&(5<f||!c.startsWith("d2sp3"))||
e&&4<f))return null;a=this.at[a];c=this.getAttached(a,6,!0,!1);if(null==c)return null==d?null:"?";var h=c.length;if(3>h&&null!=d)return null;for(var k=f>=h,m=w(h*(h-1)/2),j=JU.AU.newInt2(m),p=F(3,0),m=F(3,m,0),q=0,r=0,u=0;u<h-1;u++)for(var n=u+1;n<h;n++){var s=JU.Measure.computeAngleABC(c[u],a,c[n],!0),s=105>s?0:150<=s?2:1;m[s][p[s]]=q;p[s]++;j[q++]=F(-1,[u,n]);0==u&&1==s&&r++}q=100*p[0]+10*p[1]+p[2];if(null==d)switch(q){default:return"";case 0:return"";case 1:return"linear";case 100:case 10:return"bent";
case 111:case 201:return"T-shaped";case 30:case 120:case 210:case 300:return 162<Math.abs(JU.Measure.computeTorsion(c[0],a,c[1],c[2],!0))?"trigonal planar":"trigonal pyramidal";case 330:return 1==r%2?"tetrahedral":"uncapped trigonal pyramid";case 60:case 150:case 240:return"tetrahedral";case 402:return"square planar";case 411:case 501:return"see-saw";case 631:return"trigonal bipyramidal";case 802:return"uncapped square pyramid";case 1203:return"octahedral"}switch(q){default:return null;case 201:break;
case 210:case 330:case 411:case 631:if(!e)return null;break;case 300:case 402:case 501:case 802:case 1203:if(e)return null}if(k)if(e)switch(p[1]){case 0:d.sub2(c[j[m[0][0]][0]],a);b.sub2(c[j[m[0][0]][1]],a);d.cross(d,b);d.normalize();4==f&&d.scale(-1);p=this.findNotAttached(h,j,m[2],p[2]);u=p.nextSetBit(0);b.sub2(c[u],a);b.normalize();b.scale(0.5);d.scaleAdd2(JM.AtomCollection.sqrt3_2,d,b);f=-1;break;case 1:4==f?(b=j[m[1][0]],d.add2(c[b[0]],c[b[1]]),d.scaleAdd2(-2,a,d),f=-1):(p=this.findNotAttached(h,
j,m[1],p[1]),f=p.nextSetBit(0));break;default:p=this.findNotAttached(h,j,m[1],p[1]),f=p.nextSetBit(0)}else{q=!1;if(4==h)switch(p[2]){case 1:p=this.findNotAttached(h,j,m[2],p[2]);u=p.nextSetBit(0);f=4==f?u:p.nextSetBit(u+1);break;default:q=!0}else{p=this.findNotAttached(h,j,m[2],p[2]);u=p.nextSetBit(0);for(n=h;n<f&&0<=u;n++)u=p.nextSetBit(u+1);-1==u?q=!0:f=u}q&&(d.sub2(c[j[m[0][0]][0]],a),b.sub2(c[j[m[0][0]][1]],a),d.cross(d,b),4==f&&d.scale(-1),f=-1)}0<=f&&d.sub2(c[f],a);k&&d.scale(-1);d.normalize();
return e?"dsp3":"d2sp3"},"~N,JU.V3,JU.V3,~S");c(b,"getAttached",function(a,d,b,c){var e=a.getCovalentBondCount();if(e>d)return null;d=Array(e);if(0<e){for(var e=a.bonds,f=0,h=0;h<e.length;h++)if(e[h].isCovalentNotPartial0()){var k=e[h].getOtherAtom(a);if(!c||1!=k.getAtomicAndIsotopeNumber())d[f++]=k}b&&!c&&java.util.Arrays.sort(d,U(JM.AtomCollection.AtomSorter,this,null))}return d},"JM.Atom,~N,~B,~B");c(b,"findNotAttached",function(a,d,b,c){var e=JU.BS.newN(a);e.setBits(0,a);for(var f=0;f<a;f++)for(var h=
0;h<c;h++){var k=d[b[h]];(k[0]==f||k[1]==f)&&e.clear(f)}return e},"~N,~A,~A,~N");c(b,"getAtomBitsMDa",function(a,d,b){var c=y(d,Integer)?d.intValue():0;switch(a){case 1086326786:case 1086326785:var e=1086326785==a;d=","+d+",";for(a=this.ac;0<=--a;)if(!JM.AtomCollection.isDeleted(this.at[a])){var f=e?this.at[a].getAtomType():this.at[a].getAtomName();0<=d.indexOf(","+f+",")&&b.set(a)}return b;case 1094715393:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getAtomNumber()==
c&&b.set(a);return b;case 2097155:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&0<this.at[a].getCovalentBondCount()&&b.set(a);return b;case 2097188:case 2097156:case 136314895:case 2097166:case 2097168:case 2097170:case 2097172:case 2097174:case 2097184:return this.haveBioModels?this.bioModelset.getAtomBitsBS(a,null,b):b;case 1612709900:c=1;case 1094715402:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getElementNumber()==c&&b.set(a);return b;case 1612709894:for(a=
this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isHetero()&&b.set(a);return b;case 1073741824:return this.getIdentifierOrNull(d);case 2097165:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isLeadAtom()&&b.set(a);return b;case 1094713362:case 1639976963:return this.haveBioModels?this.bioModelset.getAtomBitsBS(a,d,b):b;case 1094715412:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getResno()==c&&b.set(a);return b;case 1612709912:d=
F(2,0);for(a=this.ac;0<=--a;)if(!JM.AtomCollection.isDeleted(this.at[a]))if(c=this.at[a].group.groupID,42<=c&&45>c)b.set(a);else if(8==(f=this.at[a]).getElementNumber()&&2==f.getCovalentBondCount()){for(var c=f.bonds,h=0,k=c.length;0<=--k&&3>h;)if(c[k].isCovalentNotPartial0()&&1==(e=c[k].getOtherAtom(f)).getElementNumber())d[h++%2]=e.i;2==h&&(b.set(d[1]),b.set(d[0]),b.set(a))}return b;case 1073742355:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.isAltLoc(this.at[a].altloc,d)&&
b.set(a);return b;case 1073742356:d=d.toUpperCase();0<=d.indexOf("\\?")&&(d=JU.PT.rep(d,"\\?","\u0001"));(f=d.startsWith("?*"))&&(d=d.substring(1));for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.isAtomNameMatch(this.at[a],d,f,f)&&b.set(a);return b;case 1073742357:return JU.BSUtil.copy(this.getChainBits(c));case 1073742360:return this.getSpecName(d);case 1073742361:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].group.groupID==c&&b.set(a);return b;case 1073742362:return JU.BSUtil.copy(this.getSeqcodeBits(c,
!0));case 5:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].group.getInsCode()==c&&b.set(a);return b;case 1296041986:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getSymOp()==c&&b.set(a);return b}f=d.nextSetBit(0);if(0>f)return b;switch(a){case 1094717454:e=JU.BSUtil.copy(d);for(a=f;0<=a;a=e.nextSetBit(a+1))b.or(this.am[this.at[a].mi].bsAtoms),e.andNot(b);return b;case 1086326788:e=JU.BSUtil.copy(d);for(a=f;0<=a;a=e.nextSetBit(a+1))this.at[a].group.chain.setAtomBits(b),
e.andNot(b);return b;case 1086326789:e=new JU.BS;for(a=f;0<=a;a=d.nextSetBit(a+1))e.set(this.at[a].getElementNumber());for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&e.get(this.at[a].getElementNumber())&&b.set(a);return b;case 1086324742:e=JU.BSUtil.copy(d);for(a=f;0<=a;a=e.nextSetBit(a+1))this.at[a].group.setAtomBits(b),e.andNot(b);return b;case 1095241729:for(a=this.ac;0<=--a;)f=this.getVibration(a,!1),null!=f&&-2==f.modDim&&b.set(a);return b;case 1145047055:e=(new JU.SB).append(";");
for(a=f;0<=a;a=d.nextSetBit(a+1))f=this.getVibration(a,!1),null!=f&&(f=";"+f.getApproxString100()+";",0>e.indexOf(f)&&e.append(f));for(a=this.ac;0<=--a;)f=this.getVibration(a,!1),null!=f&&0<=e.indexOf(";"+f.getApproxString100()+";")&&b.set(a);return b;case 1094713369:e=new JU.BS;for(a=f;0<=a;a=d.nextSetBit(a+1))e.set(this.at[a].atomSite);for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&e.get(this.at[a].atomSite)&&b.set(a);return b}JU.Logger.error("MISSING getAtomBits entry for "+JS.T.nameOf(a));
return b},"~N,~O,JU.BS");c(b,"getChainBits",function(a){var d=this.vwr.getBoolean(603979822);d?97<=a&&122>=a&&(a+=159):0<=a&&300>a&&(a=this.chainToUpper(a));for(var b=new JU.BS,c=JU.BS.newN(this.ac),e,f=c.nextClearBit(0);f<this.ac;f=c.nextClearBit(f+1))if(!JM.AtomCollection.isDeleted(this.at[f])){var h=this.at[f].group.chain;a==(e=h.chainID)||!d&&0<=e&&300>e&&a==this.chainToUpper(e)?(h.setAtomBits(b),c.or(b)):h.setAtomBits(c)}return b},"~N");c(b,"chainToUpper",function(a){return 97<=a&&122>=a?a-32:
256<=a&&300>a?a-191:a},"~N");c(b,"isAltLoc",function(a,d){if(null==d)return"\x00"==a;if(1!=d.length)return!1;var b=d.charAt(0);return"*"==b||"?"==b&&"\x00"!=a||a==b},"~S,~S");c(b,"getSeqcodeBits",function(a,d){var b=new JU.BS,c=JM.Group.getSeqNumberFor(a),e=2147483647!=c,f=!0,h=JM.Group.getInsertionCodeChar(a);switch(h.charCodeAt(0)){case 63:for(var k=this.ac;0<=--k;)if(!JM.AtomCollection.isDeleted(this.at[k])){var m=this.at[k].group.seqcode;if((!e||c==JM.Group.getSeqNumberFor(m))&&0!=JM.Group.getInsertionCodeFor(m))b.set(k),
f=!1}break;default:for(k=this.ac;0<=--k;)if(!JM.AtomCollection.isDeleted(this.at[k])&&(m=this.at[k].group.seqcode,a==m||!e&&a==JM.Group.getInsertionCodeFor(m)||"*"==h&&c==JM.Group.getSeqNumberFor(m)))b.set(k),f=!1}return!f||d?b:null},"~N,~B");c(b,"getIdentifierOrNull",function(a){var d=this.getSpecNameOrNull(a,!1);0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));return null!=d||0<a.indexOf("?")?d:0<a.indexOf("*")?this.getSpecNameOrNull(a,!0):this.haveBioModels?this.bioModelset.getIdentifierOrNull(a):
null},"~S");c(b,"getSpecName",function(a){var d=this.getSpecNameOrNull(a,!1);if(null!=d)return d;0<a.indexOf("*")&&(d=this.getSpecNameOrNull(a,!0));return null==d?new JU.BS:d},"~S");c(b,"getSpecNameOrNull",function(a,d){var b=null;a=a.toUpperCase();0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));var c=a.startsWith("?*");c&&(a=a.substring(1));for(var e=this.ac;0<=--e;)if(!JM.AtomCollection.isDeleted(this.at[e])){var f=this.at[e].getGroup3(!0);if(null!=f&&0<f.length){if(JU.PT.isMatch(f,a,d,!0)){null==
b&&(b=JU.BS.newN(e+1));for(b.set(e);0<=--e;)!JM.AtomCollection.isDeleted(this.at[e])&&this.at[e].getGroup3(!0).equals(f)&&b.set(e);e++}}else this.isAtomNameMatch(this.at[e],a,d,c)&&(null==b&&(b=JU.BS.newN(e+1)),b.set(e))}return b},"~S,~B");c(b,"isAtomNameMatch",function(a,d,b,c){return JU.PT.isMatch(a.getAtomName().toUpperCase(),d,b,c)},"JM.Atom,~S,~B,~B");c(b,"getAtomIndices",function(a){for(var d=0,b=F(this.ac,0),c=a.nextSetBit(0);0<=c&&c<this.ac;c=a.nextSetBit(c+1))b[c]=++d;return b},"JU.BS");
c(b,"getAtomsNearPlane",function(a,d){for(var b=new JU.BS,c=this.ac;0<=--c;){var e=this.at[c];if(!JM.AtomCollection.isDeleted(e)){var f=JU.Measure.distanceToPlane(d,e);(0<a&&-0.1<=f&&f<=a||0>a&&0.1>=f&&f>=a||0==a&&0.01>Math.abs(f))&&b.set(e.i)}}return b},"~N,JU.P4");c(b,"clearVisibleSets",function(){this.haveBSClickable=this.haveBSVisible=!1});c(b,"getAtomsInFrame",function(a){this.clearVisibleSets();a.clearAll();for(var d=this.ac;0<=--d;)!JM.AtomCollection.isDeleted(this.at[d])&&this.at[d].isVisible(1)&&
a.set(d)},"JU.BS");c(b,"getVisibleSet",function(a){if(a)this.vwr.setModelVisibility(),this.vwr.shm.finalizeAtoms(null,!0);else if(this.haveBSVisible)return this.bsVisible;this.bsVisible.clearAll();for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].checkVisible()&&this.bsVisible.set(a);null!=this.vwr.shm.bsSlabbedInternal&&this.bsVisible.andNot(this.vwr.shm.bsSlabbedInternal);this.haveBSVisible=!0;return this.bsVisible},"~B");c(b,"getClickableSet",function(a){if(a)this.vwr.setModelVisibility();
else if(this.haveBSClickable)return this.bsClickable;this.bsClickable.clearAll();for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isClickable()&&this.bsClickable.set(a);this.haveBSClickable=!0;return this.bsClickable},"~B");c(b,"isModulated",function(a){return null!=this.bsModulated&&this.bsModulated.get(a)},"~N");c(b,"deleteModelAtoms",function(a,d,b){this.at=JU.AU.deleteElements(this.at,a,d);this.ac=this.at.length;for(var c=a;c<this.ac;c++)this.at[c].i=c,this.at[c].mi--;
null!=this.bsModulated&&JU.BSUtil.deleteBits(this.bsModulated,b);this.deleteAtomTensors(b);this.atomNames=JU.AU.deleteElements(this.atomNames,a,d);this.atomTypes=JU.AU.deleteElements(this.atomTypes,a,d);this.atomResnos=JU.AU.deleteElements(this.atomResnos,a,d);this.atomSerials=JU.AU.deleteElements(this.atomSerials,a,d);this.atomSeqIDs=JU.AU.deleteElements(this.atomSeqIDs,a,d);this.dssrData=JU.AU.deleteElements(this.dssrData,a,d);this.bfactor100s=JU.AU.deleteElements(this.bfactor100s,a,d);this.hasBfactorRange=
!1;this.occupancies=JU.AU.deleteElements(this.occupancies,a,d);this.resetPartialCharges();this.atomTensorList=JU.AU.deleteElements(this.atomTensorList,a,d);this.vibrations=JU.AU.deleteElements(this.vibrations,a,d);this.nSurfaceAtoms=0;this.surfaceDistance100s=this.bsSurface=null;if(null!=this.tainted)for(a=0;18>a;a++)JU.BSUtil.deleteBits(this.tainted[a],b)},"~N,~N,JU.BS");c(b,"getAtomIdentityInfo",function(a,d,b){d.put("_ipt",Integer.$valueOf(a));d.put("atomIndex",Integer.$valueOf(a));d.put("atomno",
Integer.$valueOf(this.at[a].getAtomNumber()));d.put("info",this.getAtomInfo(a,null,b));d.put("sym",this.at[a].getElementSymbol())},"~N,java.util.Map,JU.P3");c(b,"getAtomTensorList",function(a){return 0>a||null==this.atomTensorList||a>=this.atomTensorList.length?null:this.atomTensorList[a]},"~N");c(b,"deleteAtomTensors",function(a){if(null!=this.atomTensors){for(var d=new JU.Lst,b,c=this.atomTensors.keySet().iterator();c.hasNext()&&((b=c.next())||1);){for(var e=this.atomTensors.get(b),f=e.size();0<=
--f;){var h=e.get(f);(a.get(h.atomIndex1)||0<=h.atomIndex2&&a.get(h.atomIndex2))&&e.removeItemAt(f)}0==e.size()&&d.addLast(b)}for(f=d.size();0<=--f;)this.atomTensors.remove(d.get(f))}},"JU.BS");c(b,"setCapacity",function(a){this.atomCapacity+=a},"~N");c(b,"setAtomTensors",function(a,d){if(!(null==d||0==d.size())){null==this.atomTensors&&(this.atomTensors=new java.util.Hashtable);null==this.atomTensorList&&(this.atomTensorList=Array(this.at.length));this.atomTensorList=JU.AU.ensureLength(this.atomTensorList,
this.at.length);this.atomTensorList[a]=JM.AtomCollection.getTensorList(d);for(var b=d.size();0<=--b;){var c=d.get(b);c.atomIndex1=a;c.atomIndex2=-1;c.modelIndex=this.at[a].mi;this.addTensor(c,c.type);null!=c.altType&&this.addTensor(c,c.altType)}}},"~N,JU.Lst");c(b,"addTensor",function(a,d){d=d.toLowerCase();var b=this.atomTensors.get(d);null==b&&(this.atomTensors.put(d,b=new JU.Lst),b.ensureCapacity(this.atomCapacity));b.addLast(a)},"JU.Tensor,~S");b.getTensorList=c(b,"getTensorList",function(a){for(var d=
-1,b=!1,c=a.size(),e=c;0<=--e;){var f=a.get(e);f.forThermalEllipsoid?d=e:2==f.iType&&(b=!0)}var h=Array((0<=d||!b?0:1)+c);if(0<=d&&(h[0]=a.get(d),1==a.size()))return h;if(b){d=0;for(e=c;0<=--e;)f=a.get(e),f.forThermalEllipsoid||(h[++d]=f)}else for(e=0;e<c;e++)h[e]=a.get(e);return h},"JU.Lst");c(b,"getAtomTensor",function(a,d){var b=this.getAtomTensorList(a);if(null!=b&&null!=d){d=d.toLowerCase();for(var c=0;c<b.length;c++){var e=b[c];if(null!=e&&(d.equals(e.type)||d.equals(e.altType)))return e}}return null},
"~N,~S");c(b,"getAllAtomTensors",function(a){if(null==this.atomTensors)return null;if(null!=a)return this.atomTensors.get(a.toLowerCase());a=new JU.Lst;for(var d,b=this.atomTensors.entrySet().iterator();b.hasNext()&&((d=b.next())||1);)a.addAll(d.getValue());return a},"~S");c(b,"scaleVectorsToMax",function(a){if(null!=this.vibrations){for(var d=0,b=JU.BS.newN(this.ac),c=this.vibrations.length;0<=--c;){var e=this.getVibration(c,!1);if(null!=e&&(-1==e.modDim||-2==e.modDim))e.resetMoment(),d=Math.max(d,
e.length()),b.set(c)}if(!(d==a||0==d)){d=a/d;a=!1;for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1)){var e=this.getVibration(c,!1),f=this.getModulation(c);if(null==f){if(0==d)return;e.scale(d)}else f.scaleVibration(d);a||(this.taintAtom(c,12),a=!0)}this.tainted[12].or(b)}}},"~N");c(b,"getAtomsFromAtomNumberInFrame",function(a){for(var d=this.vwr.getVisibleFrameAtomsNoSplitData(),b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))this.at[b].getAtomNumber()!=a&&d.clear(b);return d},"~N");c(b,"generateCrystalClass",
function(a,d){var b=0>a||a>=this.ac?this.vwr.getOperativeSymmetry():this.at[a].getUnitCell(),c=null!=d&&Float.isNaN(d.x),b=null==b?null:b.generateCrystalClass(c?null:null!=d?d:this.at[a]);return null==b?new JU.Lst:b},"~N,JU.P3");b.isDeleted=c(b,"isDeleted",function(a){return null==a||a.isDeleted()},"JM.Atom");c(b,"getGroupsForAtoms",function(a){for(var d=new java.util.ArrayList,b=null,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=this.at[c].group;e!==b&&(b=e,d.add(e))}return d},"JU.BS");b.$AtomCollection$AtomSorter$=
function(){var a=n(function(){X(this,arguments);v(this,arguments)},JM.AtomCollection,"AtomSorter",null,java.util.Comparator);j(a,"compare",function(a,b){return a.i>b.i?1:a.i<b.i?-1:0},"JM.Atom,JM.Atom")};b.sqrt3_2=Math.sqrt(3)/2;b.vRef=JU.V3.new3(3.14159,2.71828,1.41421);b.userSettableValues=null});s("JM");B(["J.api.AtomIndexIterator"],"JM.AtomIteratorWithinModel",["J.atomdata.RadiusData"],function(){var b=n(function(){this.bspf=this.cubeIterator=null;this.isZeroBased=this.hemisphereOnly=this.threadSafe=
!1;this.modelIndex=2147483647;this.atomIndex=-1;this.distanceSquared=this.zeroBase=0;this.bsSelected=null;this.checkGreater=this.isGreaterOnly=!1;this.radiusData=null;this.vdw1=0;this.isVdw=!1;this.vwr=this.atoms=null;this.iNext=0;v(this,arguments)},JM,"AtomIteratorWithinModel",null,J.api.AtomIndexIterator);c(b,"initialize",function(a,d,b,c,e,f){this.bspf=a;this.bsSelected=d;this.isGreaterOnly=b;this.isZeroBased=c;this.hemisphereOnly=e;this.threadSafe=f;this.cubeIterator=null},"J.bspt.Bspf,JU.BS,~B,~B,~B,~B");
j(b,"setModel",function(a,d,b,c,e,f,h){this.threadSafe&&(d=-1-d);if(d!=this.modelIndex||null==this.cubeIterator)this.cubeIterator=this.bspf.getCubeIterator(d),this.modelIndex=d;this.zeroBase=this.isZeroBased?b:0;if(-2147483648!=f){this.atomIndex=0>f?-1:c;if(this.isVdw=null!=h)this.radiusData=h,this.atoms=a.at,this.vwr=a.vwr,f=h.factorType===J.atomdata.RadiusData.EnumType.OFFSET?5+h.value:5*h.value,this.vdw1=this.atoms[c].getVanderwaalsRadiusFloat(this.vwr,h.vdwType);this.checkGreater=this.isGreaterOnly&&
2147483647!=c;this.setCenter(e,f)}},"JM.ModelSet,~N,~N,~N,JU.T3,~N,J.atomdata.RadiusData");j(b,"setCenter",function(a,d){this.setCenter2(a,d)},"JU.T3,~N");c(b,"setCenter2",function(a,d){null!=this.cubeIterator&&(this.cubeIterator.initialize(a,d,this.hemisphereOnly),this.distanceSquared=d*d)},"JU.T3,~N");j(b,"hasNext",function(){return this.hasNext2()});c(b,"hasNext2",function(){if(0<=this.atomIndex)for(;this.cubeIterator.hasMoreElements();){var a=this.cubeIterator.nextElement();if((this.iNext=a.i)!=
this.atomIndex&&(!this.checkGreater||this.iNext>this.atomIndex)&&(null==this.bsSelected||this.bsSelected.get(this.iNext)))return!0}else if(this.cubeIterator.hasMoreElements())return a=this.cubeIterator.nextElement(),this.iNext=a.i,!0;this.iNext=-1;return!1});j(b,"next",function(){return this.iNext-this.zeroBase});j(b,"foundDistance2",function(){return null==this.cubeIterator?-1:this.cubeIterator.foundDistance2()});j(b,"addAtoms",function(a){for(var d;this.hasNext();)if(0<=(d=this.next())){var b;if(this.isVdw){b=
this.atoms[d].getVanderwaalsRadiusFloat(this.vwr,this.radiusData.vdwType)+this.vdw1;switch(this.radiusData.factorType){case J.atomdata.RadiusData.EnumType.OFFSET:b+=2*this.radiusData.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:b*=this.radiusData.value}b*=b}else b=this.distanceSquared;this.foundDistance2()<=b&&a.set(d)}},"JU.BS");j(b,"release",function(){null!=this.cubeIterator&&(this.cubeIterator.release(),this.cubeIterator=null)});j(b,"getPosition",function(){return null})});s("JM");B(["JM.AtomIteratorWithinModel"],
"JM.AtomIteratorWithinModelSet",null,function(){var b=n(function(){this.center=this.bsModels=null;this.distance=0;v(this,arguments)},JM,"AtomIteratorWithinModelSet",JM.AtomIteratorWithinModel);A(b,function(a){M(this,JM.AtomIteratorWithinModelSet,[]);this.bsModels=a},"JU.BS");j(b,"setCenter",function(a,d){this.center=a;this.distance=d;this.set(0)},"JU.T3,~N");c(b,"set",function(a){if(0>(this.modelIndex=this.bsModels.nextSetBit(a))||null==(this.cubeIterator=this.bspf.getCubeIterator(this.modelIndex)))return!1;
this.setCenter2(this.center,this.distance);return!0},"~N");j(b,"hasNext",function(){return this.hasNext2()?!0:!this.set(this.modelIndex+1)?!1:this.hasNext()})});s("JM");B(["JU.Edge","JV.JC"],"JM.Bond",["JU.C"],function(){var b=n(function(){this.atom2=this.atom1=null;this.shapeVisibilityFlags=this.colix=this.mad=0;v(this,arguments)},JM,"Bond",JU.Edge);A(b,function(a,d,b,c,e){M(this,JM.Bond,[]);this.atom1=a;this.atom2=d;this.colix=e;this.setOrder(b);this.setMad(c)},"JM.Atom,JM.Atom,~N,~N,~N");c(b,"setMad",
function(a){this.mad=a;this.setShapeVisibility(0!=a)},"~N");c(b,"setShapeVisibility",function(a){0!=(this.shapeVisibilityFlags&JM.Bond.myVisibilityFlag)!=a&&(this.atom1.addDisplayedBond(JM.Bond.myVisibilityFlag,a),this.atom2.addDisplayedBond(JM.Bond.myVisibilityFlag,a),this.shapeVisibilityFlags=a?this.shapeVisibilityFlags|JM.Bond.myVisibilityFlag:this.shapeVisibilityFlags&~JM.Bond.myVisibilityFlag)},"~B");c(b,"getIdentity",function(){return this.index+1+" "+JU.Edge.getBondOrderNumberFromOrder(this.order)+
" "+this.atom1.getInfo()+" -- "+this.atom2.getInfo()+" "+this.atom1.distance(this.atom2)});j(b,"isCovalent",function(){return 0!=(this.order&1023)});j(b,"isHydrogen",function(){return JU.Edge.isOrderH(this.order)});c(b,"isAromatic",function(){return 0!=(this.order&512)});c(b,"getEnergy",function(){return 0});c(b,"getValence",function(){return!this.isCovalent()||33==this.order?0:this.is(515)?1:this.order&7});c(b,"deleteAtomReferences",function(){null!=this.atom1&&this.atom1.deleteBond(this);null!=
this.atom2&&this.atom2.deleteBond(this);this.atom1=this.atom2=null});c(b,"setTranslucent",function(a,d){this.colix=JU.C.getColixTranslucent3(this.colix,a,d)},"~B,~N");c(b,"setOrder",function(a){16==this.atom1.getElementNumber()&&16==this.atom2.getElementNumber()&&(a|=256);512==a&&(a=515);this.order=a|this.order&131072},"~N");j(b,"getAtomIndex1",function(){return this.atom1.i});j(b,"getAtomIndex2",function(){return this.atom2.i});j(b,"getCovalentOrder",function(){return JU.Edge.getCovalentBondOrder(this.order)});
c(b,"getOtherAtom",function(a){return this.atom1===a?this.atom2:this.atom2===a?this.atom1:null},"JM.Atom");c(b,"is",function(a){return(this.order&131071)==a},"~N");j(b,"getOtherNode",function(a){return this.atom1===a?this.atom2:this.atom2===a||null==a?this.atom1:null},"JU.SimpleNode");c(b,"setAtropisomerOptions",function(){if(1<this.getCovalentOrder())return!1;var a,d=2147483647,b=this.atom1.bonds;for(a=0;a<b.length;a++){var c=b[a].getOtherAtom(this.atom1);if(c!==this.atom2)break}if(a<b.length){b=
this.atom2.bonds;for(d=0;d<b.length&&!(c=b[d].getOtherAtom(this.atom2),c!==this.atom1);d++);}if(2<a||d>=b.length||2<d)return!1;this.order=JU.Edge.getAtropismOrder(a+1,d+1);return!0});j(b,"getCIPChirality",function(){return""},"~B");j(b,"setCIPChirality",function(){},"~N");j(b,"toString",function(){return this.atom1+" - "+this.atom2});j(b,"getAtom",function(a){return 1==a?this.atom2:this.atom1},"~N");c(b,"isCovalentNotPartial0",function(){return 0!=(this.order&1023)&&33!=this.order});b.myVisibilityFlag=
JV.JC.getShapeVisibilityFlag(1)});s("JM");B(["JM.AtomCollection","JU.V3"],"JM.BondCollection","JU.AU $.BS $.Measure JM.Bond $.BondIteratorSelected $.BondSet $.HBond JU.C $.Edge".split(" "),function(){var b=n(function(){this.bo=null;this.bondCount=0;this.molecules=this.freeBonds=this.numCached=null;this.defaultCovalentMad=this.moleculeCount=0;this.bsAromatic=this.bsAromaticDouble=this.bsAromaticSingle=null;this.haveHiddenBonds=!1;this.v2=this.v1=null;this.haveAtropicBonds=!1;v(this,arguments)},JM,
"BondCollection",JM.AtomCollection);P(b,function(){this.v1=new JU.V3;this.v2=new JU.V3});c(b,"setupBC",function(){this.bsAromatic=new JU.BS;this.numCached=F(5,0);this.freeBonds=Array(5);for(var a=5;0<--a;)this.freeBonds[a]=Array(200);this.setupAC()});c(b,"releaseModelSetBC",function(){this.freeBonds=this.bo=null;this.releaseModelSetAC()});c(b,"getBondIteratorForType",function(a,d){return new JM.BondIteratorSelected(this.bo,this.bondCount,a,d,this.vwr.getBoolean(603979812))},"~N,JU.BS");c(b,"getBondIterator",
function(a){return new JM.BondIteratorSelected(this.bo,this.bondCount,131071,a,!1)},"JU.BS");c(b,"getBondColix1",function(a){return JU.C.getColixInherited(this.bo[a].colix,this.bo[a].atom1.colixAtom)},"~N");c(b,"getBondColix2",function(a){return JU.C.getColixInherited(this.bo[a].colix,this.bo[a].atom2.colixAtom)},"~N");c(b,"getBondCountInModel",function(a){for(var d=0,b=this.bondCount;0<=--b;)null!=this.bo[b]&&this.bo[b].atom1.mi==a&&d++;return d},"~N");c(b,"getBondsForSelectedAtoms",function(a,d){var b=
new JU.BS,c=a.cardinality();switch(c){case 0:return b;case 1:case 2:var e=this.at[a.nextSetBit(0)],f=2==c?this.at[a.nextSetBit(e.i+1)]:null;if(1==c||d){for(c=e.getBondCount();0<=--c;)b.set(e.bonds[c].index);if(null!=f)for(c=f.getBondCount();0<=--c;)b.set(f.bonds[c].index)}else c=e.getBond(f),null!=c&&b.set(c.index);return b}for(e=0;e<this.bondCount;++e)c=this.bo[e],null!=c&&(f=a.get(c.atom1.i),c=a.get(c.atom2.i),(d?f||c:f&&c)&&b.set(e));return b},"JU.BS,~B");c(b,"bondAtoms",function(a,d,b,c,e,f,h,
k){b=this.getOrAddBond(a,d,b,c,e,f,!0);k&&(b.order|=131072,h&&(a.group=d.group,a.group.addAtoms(a.i)));return b},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B,~B");c(b,"getOrAddBond",function(a,d,b,c,e,f,h){if(131071==b||65535==b)b=1;a.isBonded(d)?(a=a.getBond(d).index,h&&(this.bo[a].setOrder(b),this.bo[a].setMad(c),y(this.bo[a],"JM.HBond")&&(this.bo[a].energy=f))):(this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250)),a=this.setBond(this.bondCount++,this.bondMutually(a,
d,b,c,f)).index);null!=e&&e.set(a);return this.bo[a]},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B");c(b,"setBond",function(a,d){return this.bo[d.index=a]=d},"~N,JM.Bond");c(b,"bondMutually",function(a,d,b,c,e){b=JU.Edge.isOrderH(b)?new JM.HBond(a,d,b,c,0,e):new JM.Bond(a,d,b,c,0);this.addBondToAtom(a,b);this.addBondToAtom(d,b);return b},"JM.Atom,JM.Atom,~N,~N,~N");c(b,"addBondToAtom",function(a,d){null==a.bonds?(a.bonds=Array(1),a.bonds[0]=d):a.bonds=this.addToBonds(d,a.bonds)},"JM.Atom,JM.Bond");c(b,"addToBonds",
function(a,d){var b;if(null==d)b=0<this.numCached[1]?this.freeBonds[1][--this.numCached[1]]:Array(1),b[0]=a;else{var c=d.length;b=c+1;b=5>b&&0<this.numCached[b]?this.freeBonds[b][--this.numCached[b]]:Array(b);b[c]=a;for(var e=c;0<=--e;)b[e]=d[e];5>c&&200>this.numCached[c]&&(this.freeBonds[c][this.numCached[c]++]=d)}return b},"JM.Bond,~A");c(b,"addHBond",function(a,d,b,c){this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250));return this.setBond(this.bondCount++,
this.bondMutually(a,d,b,1,c)).index},"JM.Atom,JM.Atom,~N,~N");c(b,"deleteAllBonds2",function(){this.vwr.setShapeProperty(1,"reset",null);for(var a=this.bondCount;0<=--a;)null!=this.bo[a]&&(this.bo[a].deleteAtomReferences(),this.bo[a]=null);this.bondCount=0});c(b,"getDefaultMadFromOrder",function(a){return JU.Edge.isOrderH(a)?1:32768==a?w(Math.floor(2E3*this.vwr.getFloat(570425406))):this.defaultCovalentMad},"~N");c(b,"deleteConnections",function(a,d,b,c,e,f,h){var k=0>a,m=0>d,j=k||m;a=this.fixD(a,
k);d=this.fixD(d,m);var p=new JU.BS,q=0,r=b|=131072;!h&&JU.Edge.isOrderH(b)&&(b=30720);if(f)f=c;else{f=new JU.BS;for(var u=c.nextSetBit(0);0<=u;u=c.nextSetBit(u+1)){var n=this.at[u];if(null!=n.bonds)for(var s=n.bonds.length;0<=--s;)e.get(n.getBondedAtomIndex(s))&&f.set(n.bonds[s].index)}}for(u=f.nextSetBit(0);u<this.bondCount&&0<=u;u=f.nextSetBit(u+1))if(c=this.bo[u],null!=c&&this.isInRange(c.atom1,c.atom2,a,d,k,m,j)&&(h||r==(c.order&-257|131072)||0!=(b&c.order&30720)))p.set(u),q++;0<q&&this.deleteBonds(p,
!1);return F(-1,[0,q])},"~N,~N,~N,JU.BS,JU.BS,~B,~B");c(b,"fixD",function(a,d){return d?-a:a*a},"~N,~B");c(b,"isInRange",function(a,d,b,c,e,f,h){var k=a.distanceSquared(d);return h?(h=Math.sqrt(k),a=a.getBondingRadius()+d.getBondingRadius(),(e?h>=a*b:k>=b)&&(f?h<=a*c:k<=c)):k>=b&&k<=c},"JM.Atom,JM.Atom,~N,~N,~B,~B,~B");c(b,"dBb",function(a,d){if(0!=a.cardinality()){this.resetMolecules();for(var b=-1,c=a.nextSetBit(0);0<=c&&c<this.bondCount;c=a.nextSetBit(c+1)){var e=this.bo[c];if(null!=e&&a.get(c)){if(!d){var f=
e.atom1.mi;f!=b&&this.am[b=f].resetBoundCount()}e.deleteAtomReferences();this.bo[c]=null}}b=this.vwr.getShapeProperty(1,"sets");if(null!=b)for(c=0;c<b.length;c++)null!=b[c]&&b[c].andNot(a);this.bsAromatic.andNot(a)}},"JU.BS,~B");c(b,"resetAromatic",function(){for(var a=this.bondCount;0<=--a;){var d=this.bo[a];null!=d&&d.isAromatic()&&d.setOrder(515)}});c(b,"assignAromaticBondsBs",function(a,d){a||(this.bsAromatic=new JU.BS);this.bsAromaticSingle=new JU.BS;this.bsAromaticDouble=new JU.BS;for(var b=
null==d,c=b?this.bondCount-1:d.nextSetBit(0),e=c;0<=e;e=b?e-1:d.nextSetBit(e+1)){var f=this.bo[e];if(null!=f)switch(this.bsAromatic.get(e)&&f.setOrder(515),f.order&131071){case 515:if(!this.assignAromaticMustBeSingle(f.atom1)&&!this.assignAromaticMustBeSingle(f.atom2)){this.bsAromatic.set(e);break}f.order=513;case 513:this.bsAromaticSingle.set(e);break;case 514:this.bsAromaticDouble.set(e)}}for(var c=(b=null==d)?this.bondCount-1:d.nextSetBit(0),h=new JU.BS,e=c;0<=e;e=b?e-1:d.nextSetBit(e+1))if(f=
this.bo[e],!(null==f||!f.is(515)||this.bsAromaticDouble.get(e)||this.bsAromaticSingle.get(e)))if(h.set(e),8==f.atom1.getElementNumber()||8==f.atom2.getElementNumber())this.assignAromaticDouble(f)||this.assignAromaticSingle(f);for(e=h.nextSetBit(0);0<=e;e=h.nextSetBit(e+1))this.assignAromaticDouble(f=this.bo[e])||this.assignAromaticSingle(f);h=new JU.BS;for(e=c;0<=e;e=b?e-1:d.nextSetBit(e+1))if(f=this.bo[e],null!=f)if(this.bsAromaticDouble.get(e))f.is(514)||(this.bsAromatic.set(e),h.set(f.atom1.mi),
f.setOrder(this.isLinear(f,this.v1,this.v2)?3:514));else if((this.bsAromaticSingle.get(e)||f.isAromatic())&&!f.is(513))this.bsAromatic.set(e),f.setOrder(513);b=this.am;for(e=h.nextSetBit(0);0<=e;e=h.nextSetBit(e+1))b[e].isBioModel&&(b[e].isPdbWithMultipleBonds=!0);this.assignAromaticNandO(d);this.bsAromaticDouble=this.bsAromaticSingle=null},"~B,JU.BS");c(b,"isLinear",function(a,d,b){if(3==a.order)return!0;if(2!=a.atom1.getCovalentBondCount()||2!=a.atom2.getCovalentBondCount())return!1;for(var c=a.atom1.getEdges(),
e=c.length;0<=-e;)if(c[e]!==a&&c[e].isCovalent()){if(175>JU.Measure.computeAngle(c[e].getOtherNode(a.atom1),a.atom1,a.atom2,d,b,!0))return!1;break}c=a.atom2.getEdges();for(e=c.length;0<=-e;)if(c[e]!==a&&c[e].isCovalent()){if(175>JU.Measure.computeAngle(c[e].getOtherNode(a.atom2),a.atom2,a.atom1,d,b,!0))return!1;break}return!0},"JM.Bond,JU.V3,JU.V3");c(b,"assignAromaticDouble",function(a){var d=a.index;if(this.bsAromaticSingle.get(d))return!1;if(this.bsAromaticDouble.get(d))return!0;this.bsAromaticDouble.set(d);
return!this.assignAromaticSingleForAtom(a.atom1,d)||!this.assignAromaticSingleForAtom(a.atom2,d)?(this.bsAromaticDouble.clear(d),!1):!0},"JM.Bond");c(b,"assignAromaticSingle",function(a){var d=a.index;if(this.bsAromaticDouble.get(d))return!1;if(this.bsAromaticSingle.get(d))return!0;this.bsAromaticSingle.set(d);return!this.assignAromaticDoubleForAtom(a.atom1)||!this.assignAromaticDoubleForAtom(a.atom2)?(this.bsAromaticSingle.clear(d),!1):!0},"JM.Bond");c(b,"assignAromaticSingleForAtom",function(a,
d){var b=a.bonds;if(null==b)return!1;for(var c=b.length;0<=--c;){var e=b[c],f=e.index;if(!(f==d||!e.isAromatic()||this.bsAromaticSingle.get(f)))if(this.bsAromaticDouble.get(f)||!this.assignAromaticSingle(e))return!1}return!0},"JM.Atom,~N");c(b,"assignAromaticDoubleForAtom",function(a){a=a.bonds;if(null==a)return!1;for(var d=!1,b=-1,c=a.length;0<=--c;)this.bsAromaticDouble.get(a[c].index)&&(d=!0),a[c].isAromatic()&&(b=c);for(c=a.length;0<=--c;){var e=a[c],f=e.index;if(e.isAromatic()&&!this.bsAromaticDouble.get(f)&&
!this.bsAromaticSingle.get(f))if(!d&&this.assignAromaticDouble(e))d=!0;else if((d||c<b)&&!this.assignAromaticSingle(e))return!1}return d},"JM.Atom");c(b,"allowAromaticBond",function(a){if(this.assignAromaticMustBeSingle(a.atom1)||this.assignAromaticMustBeSingle(a.atom2))return!1;switch(a.getCovalentOrder()){case 1:case 2:return 3>=a.atom1.getCovalentBondCount()&&3>=a.atom2.getCovalentBondCount();default:return!1}},"JM.Bond");c(b,"assignAromaticMustBeSingle",function(a){var d=a.getElementNumber();
switch(d){case 6:case 7:case 8:case 16:break;default:return!0}var b=a.getValenceAromatic(!1);switch(d){case 6:return 4==b;case 7:return a.group.getNitrogenAtom()===a||3==b&&1>a.getFormalCharge();case 8:return a.group.getCarbonylOxygenAtom()!==a&&2==b&&1>a.getFormalCharge();case 16:return 5==a.group.groupID||2==b&&1>a.getFormalCharge()}return!1},"JM.Atom");c(b,"assignAromaticNandO",function(a){for(var d,b=null==a,c=b?this.bondCount-1:a.nextSetBit(0);0<=c;c=b?c-1:a.nextSetBit(c+1))if(d=this.bo[c],null!=
d&&d.is(513)){var e,f=d.atom2,h,k=f.getElementNumber();7==k||8==k?(h=k,e=f,f=d.atom1,k=f.getElementNumber()):(e=d.atom1,h=e.getElementNumber());if(!(7!=h&&8!=h)){var m=e.getValence();if(!(0>m)){var j=e.getCovalentBondCount();e=e.getFormalCharge();switch(h){case 7:3==m&&(3==j&&1>e&&6==k&&3==f.getValence())&&d.setOrder(514);break;case 8:1==m&&(0==e&&(14==k||16==k))&&d.setOrder(514)}}}}},"JU.BS");c(b,"getAtomBitsMDb",function(a,d){var b=new JU.BS;switch(a){default:return this.getAtomBitsMDa(a,d,b);case 1677721602:for(var c=
d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))c<this.bondCount&&null!=this.bo[c]?(b.set(this.bo[c].atom1.i),b.set(this.bo[c].atom2.i)):d.clear(c);return b;case 1073742331:for(c=this.bondCount;0<=--c;)null!=this.bo[c]&&this.bo[c].isAromatic()&&(b.set(this.bo[c].atom1.i),b.set(this.bo[c].atom2.i));return b}},"~N,~O");c(b,"removeUnnecessaryBonds",function(a,d){var b=new JU.BS,c=new JU.BS,e=a.bonds;if(null!=e){for(var f=0;f<e.length;f++)e[f].isCovalent()?1==e[f].getOtherAtom(a).getElementNumber()&&b.set(e[f].getOtherAtom(a).i):
c.set(e[f].index);0<=c.nextSetBit(0)&&this.deleteBonds(c,!1);d&&b.set(a.i);0<=b.nextSetBit(0)&&this.vwr.deleteAtoms(b,!1)}},"JM.Atom,~B");c(b,"displayBonds",function(a,d){d||(this.haveHiddenBonds=!0);for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))b<this.bondCount&&(null!=this.bo[b]&&0!=this.bo[b].mad)&&this.bo[b].setShapeVisibility(d)},"JM.BondSet,~B");c(b,"getAtomsConnected",function(a,d,b,c){for(var e=y(c,"JM.BondSet"),f=e?new JM.BondSet:new JU.BS,h=F(this.ac,0),k,m=30720==b,j=65535==b,p=0;p<
this.bondCount;p++){var q=this.bo[p];if(null!=q&&(j||q.is(b)||m&&q.isHydrogen()))e?f.set(p):(c.get(q.atom1.i)&&(h[k=q.atom2.i]++,f.set(k)),c.get(q.atom2.i)&&(h[k=q.atom1.i]++,f.set(k)))}if(e)return f;b=0==a;for(k=this.ac;0<=--k;)c=h[k],null==this.at[k]||c<a||c>d?f.clear(k):b&&0==c&&f.set(k);return f},"~N,~N,~N,JU.BS");c(b,"addConnectedHAtoms",function(a,d){if(null!=a.bonds)for(var b=a.bonds.length;0<=--b;){var c=a.bonds[b].getOtherAtom(a);1==c.getElementNumber()&&d.set(c.i)}},"JM.Atom,JU.BS")});s("JM");
O(JM,"BondIterator");s("JM");B(["JM.BondIterator"],"JM.BondIteratorSelected",null,function(){var b=n(function(){this.bonds=null;this.iBond=this.bondType=this.bondCount=0;this.bsSelected=null;this.bondSelectionModeOr=!1;v(this,arguments)},JM,"BondIteratorSelected",null,JM.BondIterator);A(b,function(a,d,b,c,e){this.bonds=a;this.bondCount=d;this.bondType=b;this.bsSelected=c;this.bondSelectionModeOr=e},"~A,~N,~N,JU.BS,~B");j(b,"hasNext",function(){if(131071==this.bondType)return this.iBond=this.bsSelected.nextSetBit(this.iBond),
0<=this.iBond&&this.iBond<this.bondCount;for(;this.iBond<this.bondCount;++this.iBond){var a=this.bonds[this.iBond];if(!(null==a||65535!=this.bondType&&0==(a.order&this.bondType))&&!(65535==this.bondType&&32768==a.order)){var d=this.bsSelected.get(a.atom1.i),a=this.bsSelected.get(a.atom2.i);if(!this.bondSelectionModeOr&&d&&a||this.bondSelectionModeOr&&(d||a))return!0}}return!1});j(b,"nextIndex",function(){return this.iBond});j(b,"next",function(){return this.bonds[this.iBond++]})});s("JM");B(["JU.BS"],
"JM.BondSet",["JU.BSUtil"],function(){var b=n(function(){this.associatedAtoms=null;v(this,arguments)},JM,"BondSet",JU.BS);A(b,function(){M(this,JM.BondSet,[])});b.newBS=c(b,"newBS",function(a){var d=new JM.BondSet;JU.BSUtil.copy2(a,d);return d},"JU.BS");c(b,"getAssociatedAtoms",function(a){null==this.associatedAtoms&&(this.associatedAtoms=a.getAtomIndices(a.getAtoms(1677721602,this)));return this.associatedAtoms},"JM.ModelSet")});s("JM");B(["JM.Structure"],"JM.Chain",["JU.AU"],function(){var b=n(function(){this.model=
null;this.chainNo=this.chainID=0;this.groups=null;this.selectedGroupCount=this.groupCount=0;v(this,arguments)},JM,"Chain",null,JM.Structure);A(b,function(a,d,b){this.model=a;this.chainID=d;this.chainNo=b;this.groups=Array(16)},"JM.Model,~N,~N");c(b,"getIDStr",function(){return 0==this.chainID?"":256>this.chainID?""+String.fromCharCode(this.chainID):this.model.ms.vwr.getChainIDStr(this.chainID)});c(b,"calcSelectedGroupsCount",function(a){for(var d=this.selectedGroupCount=0;d<this.groupCount;d++)this.groups[d].selectedIndex=
this.groups[d].isSelected(a)?this.selectedGroupCount++:-1},"JU.BS");c(b,"fixIndices",function(a,d){for(var b=0;b<this.groupCount;b++)this.groups[b].fixIndices(a,d)},"~N,JU.BS");j(b,"setAtomBits",function(a){for(var d=0;d<this.groupCount;d++)this.groups[d].setAtomBits(a)},"JU.BS");j(b,"setAtomBitsAndClear",function(a,d){for(var b=0;b<this.groupCount;b++)this.groups[b].setAtomBitsAndClear(a,d)},"JU.BS,JU.BS");c(b,"addGroup",function(a,d){this.groupCount==this.groups.length&&(this.groups=JU.AU.doubleLength(this.groups));
this.groups[this.groupCount++]=a;a.groupIndex=d;return a},"JM.Group,~N")});s("JM");B(["JM.Structure","java.lang.Short","JV.JC"],"JM.Group","java.util.Hashtable JU.BS $.Quat J.c.STR JU.BSUtil $.Escape $.Logger $.Point3fi".split(" "),function(){var b=n(function(){this.chain=null;this.groupIndex=0;this.group1="\x00";this.leadAtomIndex=this.firstAtomIndex=-1;this.lastAtomIndex=0;this.bsAdded=null;this.shapeVisibilityFlags=this.selectedIndex=this.groupID=this.seqcode=0;this.unitID=this.strutPoint=this.dssrNT=
null;v(this,arguments)},JM,"Group",null,JM.Structure);c(b,"setGroup",function(a,d,b,c,e){this.chain=a;this.seqcode=b;this.firstAtomIndex=c;this.lastAtomIndex=e;null!=d&&0<d.length&&this.setGroupID(d);return this},"JM.Chain,~S,~N,~N,~N");c(b,"setGroupID",function(){},"~S");c(b,"isAdded",function(a){return null!=this.bsAdded&&this.bsAdded.get(a)},"~N");c(b,"addAtoms",function(a){null==this.bsAdded&&(this.bsAdded=new JU.BS);this.bsAdded.set(a)},"~N");j(b,"setAtomBits",function(a){a.setBits(this.firstAtomIndex,
this.lastAtomIndex+1);null!=this.bsAdded&&a.or(this.bsAdded)},"JU.BS");j(b,"setAtomBitsAndClear",function(a,d){a.setBits(this.firstAtomIndex,this.lastAtomIndex+1);d.clearBits(this.firstAtomIndex,this.lastAtomIndex+1);null!=this.bsAdded&&(a.or(this.bsAdded),d.andNot(this.bsAdded))},"JU.BS,JU.BS");c(b,"isSelected",function(a){var d=a.nextSetBit(this.firstAtomIndex);return 0<=d&&d<=this.lastAtomIndex||null!=this.bsAdded&&this.bsAdded.intersects(a)},"JU.BS");c(b,"setShapeVisibility",function(a,d){this.shapeVisibilityFlags=
d?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(b,"getGroup3",function(){return 1>this.groupID?"":JM.Group.group3Names[this.groupID]});c(b,"getGroup1",function(){return"\x00"==this.group1?"?":this.group1});c(b,"getBioPolymerLength",function(){return 0});c(b,"getMonomerIndex",function(){return-1});c(b,"getStructure",function(){return null});c(b,"getStrucNo",function(){return 0});c(b,"getBioStructureType",function(){return J.c.STR.NOT});c(b,"getBioStructureSubType",function(){return this.getBioStructureType()},
"~N");c(b,"setDSSRStructureSubType",function(){},"J.c.STR");c(b,"setProteinStructureType",function(){return-1},"J.c.STR,~N");c(b,"isProtein",function(){return 1<=this.groupID&&24>this.groupID});c(b,"isNucleic",function(){return 24<=this.groupID&&42>this.groupID});c(b,"isDna",function(){return this.isDnaByID()});c(b,"isRna",function(){return this.isRnaByID()});c(b,"isPurine",function(){return this.isPurineByID()});c(b,"isPurineByID",function(){return this.isNucleic()&&0!=(153957&1<<this.groupID-24)||
0<="AGag".indexOf(this.getGroup1())});c(b,"isPyrimidine",function(){return this.isPyrimidineByID()});c(b,"isPyrimidineByID",function(){return this.isNucleic()&&0!=(108186&1<<this.groupID-24)});c(b,"isRnaByID",function(){return this.isNucleic()&&0!=(196663&1<<this.groupID-24)});c(b,"isDnaByID",function(){return this.isNucleic()&&0!=(65480&1<<this.groupID-24)});c(b,"isCarbohydrate",function(){return!1});c(b,"getResno",function(){return-2147483648==this.seqcode?0:this.seqcode>>8});c(b,"setResno",function(a){this.seqcode=
JM.Group.getSeqcodeFor(a,this.getInsertionCode())},"~N");b.getSeqNumberFor=c(b,"getSeqNumberFor",function(a){return JM.Group.haveSequenceNumber(a)?a>>8:2147483647},"~N");b.haveSequenceNumber=c(b,"haveSequenceNumber",function(a){return 0!=(a&128)},"~N");c(b,"getSeqcodeString",function(){return JM.Group.getSeqcodeStringFor(this.seqcode)});b.getSeqcodeFor=c(b,"getSeqcodeFor",function(a,d){if(-2147483648==a)return a;"A"<=d&&"Z">=d||("a"<=d&&"z">=d||"0"<=d&&"9">=d||"?"==d||"*"==d)||(" "!=d&&"\x00"!=d&&
JU.Logger.warn("unrecognized insertionCode:"+d),d="\x00");return(2147483647==a?0:a<<8|128)+d.charCodeAt(0)},"~N,~S");b.getSeqcodeStringFor=c(b,"getSeqcodeStringFor",function(a){if(-2147483648==a)return null;var d=""+(a>>8);0!=(a&127)&&(d+="^"+String.fromCharCode(a&127));return d},"~N");c(b,"getInsertionCode",function(){return-2147483648==this.seqcode?"\x00":String.fromCharCode(this.seqcode&127)});c(b,"getInsCode",function(){return this.seqcode&127});b.getInsertionCodeFor=c(b,"getInsertionCodeFor",
function(a){return a&127},"~N");b.getInsertionCodeChar=c(b,"getInsertionCodeChar",function(a){return-2147483648==a?"\x00":String.fromCharCode(a&127)},"~N");c(b,"scaleToScreen",function(a,d){return this.chain.model.ms.vwr.tm.scaleToScreen(a,d)},"~N,~N");c(b,"isCursorOnTopOf",function(a,d,b,c,e){return this.chain.model.ms.isCursorOnTopOf(a,d,b,c,e)},"JM.Atom,~N,~N,~N,JM.Atom");c(b,"getModel",function(){return this.chain.model});c(b,"getSelectedMonomerCount",function(){return 0});c(b,"getSelectedMonomerIndex",
function(){return-1});c(b,"isLeadAtom",function(){return!1},"~N");c(b,"getLeadAtom",function(){return null});c(b,"getLeadAtomOr",function(a){var d=this.getLeadAtom();return null==d?a:d},"JM.Atom");c(b,"getLeadOrFirstAtomIndex",function(){return null==this.getLeadAtom()?this.firstAtomIndex:this.leadAtomIndex});c(b,"getQuaternion",function(){return null},"~S");c(b,"getQuaternionFrame",function(a){if(3>this.lastAtomIndex-this.firstAtomIndex)return null;var d=this.firstAtomIndex;return JU.Quat.getQuaternionFrame(a[d],
a[++d],a[++d])},"~A");c(b,"setStrucNo",function(){},"~N");c(b,"getHelixData",function(a){return JU.Escape.escapeHelical(null,a,null,null,null)},"~N,~S,~N");c(b,"isWithinStructure",function(){return!1},"J.c.STR");c(b,"getProteinStructureTag",function(){return null});c(b,"getStructureId",function(){return""});c(b,"getBioPolymerIndexInModel",function(){return-1});c(b,"isCrossLinked",function(){return!1},"JM.Group");c(b,"getCrossLinkVector",function(){return!1},"JU.Lst,~B,~B");c(b,"getNitrogenAtom",function(){return null});
c(b,"getCarbonylOxygenAtom",function(){return null});c(b,"fixIndices",function(a,d){this.firstAtomIndex-=a;this.leadAtomIndex-=a;this.lastAtomIndex-=a;null!=this.bsAdded&&JU.BSUtil.deleteBits(this.bsAdded,d)},"~N,JU.BS");c(b,"getGroupInfo",function(a,d){var b=new java.util.Hashtable;b.put("groupIndex",Integer.$valueOf(a));b.put("groupID",Short.$valueOf(this.groupID));var c=this.getSeqcodeString();null!=c&&b.put("seqCode",c);b.put("_apt1",Integer.$valueOf(this.firstAtomIndex));b.put("_apt2",Integer.$valueOf(this.lastAtomIndex));
null!=this.bsAdded&&b.put("addedAtoms",this.bsAdded);b.put("atomInfo1",this.chain.model.ms.getAtomInfo(this.firstAtomIndex,null,d));b.put("atomInfo2",this.chain.model.ms.getAtomInfo(this.lastAtomIndex,null,d));b.put("visibilityFlags",Integer.$valueOf(this.shapeVisibilityFlags));return b},"~N,JU.P3");c(b,"getMinZ",function(a,d){d[0]=2147483647;for(var b=this.firstAtomIndex;b<=this.lastAtomIndex;b++)this.checkMinZ(a[b],d);if(null!=this.bsAdded)for(b=this.bsAdded.nextSetBit(0);0<=b;b=this.bsAdded.nextSetBit(b+
1))this.checkMinZ(a[b],d)},"~A,~A");c(b,"checkMinZ",function(a,d){var b=a.sZ-w(a.sD/2)-2;b<d[0]&&(d[0]=Math.max(1,b))},"JM.Atom,~A");c(b,"getGroupParameter",function(){return NaN},"~N");c(b,"getAtomIndex",function(){return-1},"~S,~N");c(b,"getBSSideChain",function(){return new JU.BS});j(b,"toString",function(){return"["+this.getGroup3()+"-"+this.getSeqcodeString()+"]"});c(b,"isNucleicMonomer",function(){return!1});c(b,"unsetStrutPoint",function(){null==this.strutPoint&&(this.strutPoint=new JU.Point3fi);
this.strutPoint.sX=-2147483648});c(b,"getUnitID",function(){if(null==this.unitID){var a=this.getLeadOrFirstAtomIndex();this.unitID=this.chain.model.ms.at[a].getUnitID(2)}return this.unitID});b.standardGroupList=null;b.group3Names=Array(128);b.specialAtomNames=null});s("JM");B(["JM.Bond"],"JM.HBond",["JU.Logger"],function(){var b=n(function(){this.energy=0;v(this,arguments)},JM,"HBond",JM.Bond);A(b,function(a,d,b,c,e,f){M(this,JM.HBond,[a,d,b,c,e]);this.energy=f;JU.Logger.debugging&&JU.Logger.debug("HBond energy = "+
f+" #"+this.getIdentity())},"JM.Atom,JM.Atom,~N,~N,~N,~N");j(b,"getEnergy",function(){return this.energy});b.calcEnergy=c(b,"calcEnergy",function(a,d,b,c){return Math.round(-27888/a- -27888/c+-27888/b- -27888/d)},"~N,~N,~N,~N")});s("JM");B(null,"JM.LabelToken","java.util.Hashtable JU.AU $.PT $.SB JS.SV $.T JU.Edge JV.JC".split(" "),function(){var b=n(function(){this.data=this.key=this.text=null;this.tok=0;this.pt=-1;this.ch1="\x00";this.width=0;this.precision=2147483647;this.intAsFloat=this.zeroPad=
this.alignLeft=!1;v(this,arguments)},JM,"LabelToken",null);c(b,"set",function(a,d){this.text=a;this.pt=d;return this},"~S,~N");b.isLabelPropertyTok=c(b,"isLabelPropertyTok",function(a){for(var d=JM.LabelToken.labelTokenIds.length;0<=--d;)if(JM.LabelToken.labelTokenIds[d]==a)return!0;return!1},"~N");b.compile=c(b,"compile",function(a,d,b,c){if(null==d||0==d.length)return null;if(0>d.indexOf("%")||2>d.length)return x(-1,[(new JM.LabelToken).set(d,-1)]);for(var e=0,f=-1,h=d.length;++f<h&&0<=(f=d.indexOf("%",
f));)e++;for(var e=Array(2*e+1),k,m=0,f=0;0<=(k=d.indexOf("%",f));)f!=k&&(e[m++]=(new JM.LabelToken).set(d.substring(f,k),-1)),f=e[m++]=(new JM.LabelToken).set(null,k),a.autoCalculate(f.tok,null),f=JM.LabelToken.setToken(a,d,f,h,b.charCodeAt(0),c);f<h&&(e[m++]=(new JM.LabelToken).set(d.substring(f),-1));return e},"JV.Viewer,~S,~S,java.util.Map");c(b,"formatLabel",function(a,d,b,c){return null==b||0==b.length?null:JM.LabelToken.formatLabelAtomArray(a,d,JM.LabelToken.compile(a,b,"\x00",null),"\x00",
null,c)},"JV.Viewer,JM.Atom,~S,JU.P3");b.formatLabelAtomArray=c(b,"formatLabelAtomArray",function(a,d,b,c,e,f){if(null==d)return null;var h="0"<c?null:new JU.SB;if(null!=b)for(var k=0;k<b.length;k++){var m=b[k];if(null==m)break;"0"<c&&m.ch1!=c||(0>=m.tok||null!=m.key?null!=h&&(h.append(m.text),"\x00"!=m.ch1&&h.appendC(m.ch1)):JM.LabelToken.appendAtomTokenValue(a,d,m,h,e,f))}return null==h?null:h.toString().intern()},"JV.Viewer,JM.Atom,~A,~S,~A,JU.P3");b.getBondLabelValues=c(b,"getBondLabelValues",
function(){var a=new java.util.Hashtable;a.put("#","");a.put("ORDER","");a.put("TYPE","");a.put("LENGTH",Float.$valueOf(0));a.put("ENERGY",Float.$valueOf(0));return a});b.formatLabelBond=c(b,"formatLabelBond",function(a,d,b,c,e,f){c.put("#",""+(d.index+1));c.put("ORDER",""+JU.Edge.getBondOrderNumberFromOrder(d.order));c.put("TYPE",JU.Edge.getBondOrderNameFromOrder(d.order));c.put("LENGTH",Float.$valueOf(d.atom1.distance(d.atom2)));c.put("ENERGY",Float.$valueOf(d.getEnergy()));JM.LabelToken.setValues(b,
c);JM.LabelToken.formatLabelAtomArray(a,d.atom1,b,"1",e,f);JM.LabelToken.formatLabelAtomArray(a,d.atom2,b,"2",e,f);return JM.LabelToken.getLabel(b)},"JV.Viewer,JM.Bond,~A,java.util.Map,~A,JU.P3");b.formatLabelMeasure=c(b,"formatLabelMeasure",function(a,d,b,c,e){var f=new java.util.Hashtable;f.put("#",""+(d.index+1));f.put("VALUE",Float.$valueOf(c));f.put("UNITS",e);b=JM.LabelToken.compile(a,b,"\u0001",f);if(null==b)return"";JM.LabelToken.setValues(b,f);f=d.ms.at;d=d.countPlusIndices;for(c=d[0];1<=
c;--c)0<=d[c]&&JM.LabelToken.formatLabelAtomArray(a,f[d[c]],b,String.fromCharCode(48+c),null,null);b=JM.LabelToken.getLabel(b);return null==b?"":b},"JV.Viewer,JM.Measurement,~S,~N,~S");b.setValues=c(b,"setValues",function(a,d){for(var b=0;b<a.length;b++){var c=a[b];if(null==c)break;if(null!=c.key){var e=d.get(c.key);c.text=y(e,Float)?c.format(e.floatValue(),null,null):c.format(NaN,e,null)}}},"~A,java.util.Map");b.getLabel=c(b,"getLabel",function(a){for(var d=new JU.SB,b=0;b<a.length;b++){var c=a[b];
if(null==c)break;d.append(c.text)}return d.toString()},"~A");b.setToken=c(b,"setToken",function(a,d,b,c,e,f){var h=b.pt+1;if(h>=c)return b.text="%",h;var k;"-"==d.charAt(h)&&(b.alignLeft=!0,++h);h<c&&"0"==d.charAt(h)&&(b.zeroPad=!0,++h);for(;h<c&&JU.PT.isDigit(k=d.charAt(h));)b.width=10*b.width+(k.charCodeAt(0)-48),++h;b.precision=2147483647;var m=!1;if(h<c&&"."==d.charAt(h)){++h;if(h<c&&"-"==(k=d.charAt(h)))m=!0,++h;if(h<c&&JU.PT.isDigit(k=d.charAt(h))){++h;b.precision=k.charCodeAt(0)-48;if(h<c&&
JU.PT.isDigit(k=d.charAt(h)))++h,b.precision=10*b.precision+(k.charCodeAt(0)-48);m&&(b.precision=-1-b.precision)}}if(h<c&&null!=f){var j;for(f=f.keySet().iterator();f.hasNext()&&((j=f.next())||1);)if(d.indexOf(j,h)==h)return h+(b.key=j).length}if(h<c)switch((k=d.charAt(h++)).charCodeAt(0)){case 37:return b.text="%",h;case 91:j=d.indexOf("]",h);if(j<h){h=c;break}h=d.substring(h,j).toLowerCase();h.startsWith("property_")?(b.tok=134221834,b.data=a.getDataObj(h,null,1)):h.startsWith("validation.")?(b.tok=
1073742189,b.data=a.getDataObj("property_"+h.substring(11),null,1)):h.startsWith("unitid")?(b.tok=1073741974,b.data=Integer.$valueOf(JV.JC.getUnitIDFlags(h.substring(6)))):(a=JS.T.getTokenFromName(h),null!=a&&JM.LabelToken.isLabelPropertyTok(a.tok)&&(b.tok=a.tok));h=j+1;break;case 123:j=d.indexOf("}",h);if(j<h){h=c;break}h=d.substring(h,j);b.data=a.getDataObj(h,null,1);null==b.data?(b.data=a.getDataObj(h,null,-1),null!=b.data&&(b.data=b.data[1],"string"==typeof b.data&&(b.data=JU.PT.split(b.data,
"\n")),JU.AU.isAS(b.data)||(b.data=null)),null==b.data?(b.tok=1715472409,b.data=h):b.tok=1275068418):b.tok=134221834;h=j+1;break;default:var p,q;if(h<c&&0<=(p="fuv".indexOf(k))&&0<=(q="xyz".indexOf(d.charAt(h))))b.tok=JM.LabelToken.twoCharLabelTokenIds[3*p+q],h++;else if(0<=(p="AaBbCcDEefGgIiLlMmNnOoPpQqRrSsTtUuVvWwXxxYyyZzz%%%gqW".indexOf(k)))b.tok=JM.LabelToken.labelTokenIds[p]}b.text=d.substring(b.pt,h);if(h<c&&0!=e&&JU.PT.isDigit(k=d.charAt(h)))h++,b.ch1=k,k.charCodeAt(0)!=e&&1!=e&&(b.tok=0);
return h},"JV.Viewer,~S,JM.LabelToken,~N,~N,java.util.Map");b.appendAtomTokenValue=c(b,"appendAtomTokenValue",function(a,d,b,c,e,f){var h=null,k=NaN,m=null;try{switch(b.tok){case 1153433601:h=d.atomPropertyString(a,1153433601);break;case 1094713347:h=""+(null==e?d.i:e[d.i]);break;case 1765808134:m=d.atomPropertyTuple(a,b.tok,f);break;case 1073741974:h=d.getUnitID(b.data.intValue());break;case 134221834:case 1073742189:if(null!=b.data&&(k=b.data[d.i],1073742189==b.tok&&1!=k&&0!=k)){var j=a.getAtomValidation(b.text.substring(13,
b.text.length-1),d);if(null==j)System.out.println("?? o is null ??");else if(1==j.size())k=j.get(0).floatValue();else{k=NaN;h="";a=0;for(var p=j.size();a<p;a++)h+=","+j.get(a);1<h.length&&(h=h.substring(1))}}break;case 1715472409:var q=a.ms.getInfo(d.mi,b.data),r=d.i-a.ms.am[d.mi].firstAtomIndex,j=null;if(0<=r)if(y(q,Array))var u=q,j=r<u.length?u[r]:null;else y(q,"JU.Lst")&&(j=r<q.size()?JS.SV.oValue(q.get(r)):null);null==j?h="":y(j,Float)?k=j.floatValue():y(j,Integer)?k=j.intValue():y(j,"JU.T3")?
m=j:h=j.toString();break;case 1275068418:null!=b.data&&(u=b.data,h=d.i<u.length?u[d.i]:"");break;case 1631586315:var n=d.getFormalCharge(),h=0<n?""+n+"+":0>n?""+-n+"-":"";break;case 1094717454:h=d.getModelNumberForLabel();break;case 1128269825:h=""+d.atomPropertyInt(a,b.tok);break;case 1665140738:k=d.atomPropertyFloat(a,b.tok,f);break;case 1086324749:h=d.group.getStructureId();break;case 1094713370:var s=d.group.getStrucNo(),h=0>=s?"":""+s;break;case 1111490574:if(Float.isNaN(k=d.group.getGroupParameter(1111490574)))h=
"null";break;case 1111492626:case 1111492627:case 1111492628:case 1111490583:case 1111490584:case 1111490585:case 1111490586:k=d.atomPropertyFloat(a,b.tok,f);Float.isNaN(k)&&(h="");break;case 1073877011:h=a.getNBOAtomLabel(d);break;case 1086324747:case 1639976963:case 1237320707:h=d.atomPropertyString(a,b.tok);break;case 1140850705:h=d.getIdentityXYZ(f,1);break;case 1086324754:h=d.getWyckoffPosition(!1);break;case 1086324755:h=d.getWyckoffPosition(!0);break;case 79:h=d.getSymmetryOperatorList(!1);
break;case 81:k=d.getOccupancy100()/100;break;default:switch(b.tok&1136656384){case 1094713344:b.intAsFloat?k=d.atomPropertyInt(a,b.tok):h=""+d.atomPropertyInt(a,b.tok);break;case 1111490560:k=d.atomPropertyFloat(a,b.tok,f);break;case 1086324736:h=d.atomPropertyString(a,b.tok);break;case 1077936128:m=d.atomPropertyTuple(a,b.tok,f);null==m&&(h="");break;default:1145045003==b.tok&&(h=d.atomPropertyString(a,1145045003))}}}catch(v){if(H(v,"IndexOutOfBoundsException"))k=NaN,m=h=null;else throw v;}h=b.format(k,
h,m);null==c?b.text=h:c.append(h)},"JV.Viewer,JM.Atom,JM.LabelToken,JU.SB,~A,JU.P3");c(b,"format",function(a,d,b){return Float.isNaN(a)?null!=d?JU.PT.formatS(d,this.width,this.precision,this.alignLeft,this.zeroPad):null!=b?(0==this.width&&2147483647==this.precision&&(this.width=6,this.precision=2),JU.PT.formatF(b.x,this.width,this.precision,!1,!1)+JU.PT.formatF(b.y,this.width,this.precision,!1,!1)+JU.PT.formatF(b.z,this.width,this.precision,!1,!1)):this.text:JU.PT.formatF(a,this.width,this.precision,
this.alignLeft,this.zeroPad)},"~N,~S,JU.T3");b.labelTokenIds=F(-1,[1086324739,1086326786,1086326785,1111492620,1631586315,1086326788,1094713347,1086324746,1086326789,1111490569,1094713357,1094713361,1111492618,1094715393,1094713363,1094715402,1094717454,1086324743,1094713360,1086324742,79,1088421903,1111492619,1111490570,81,1128269825,1094715412,1086324747,1094713369,1086326788,1111490574,1111492620,1086324745,1111490575,1648363544,1145047055,1140850705,1086324755,1111492612,1111492609,1111492629,
1111492613,1111492610,1111492630,1111492614,1111492611,1111492631,1114249217,1112152066,1112150019,1112150020,1112150021,1112152070,1112152071,1112152073,1112152074,1112152076,1649022989,1112152078,1111490561,1111490562,1153433601,1094713346,1228931586,1765808134,1094713356,1111490564,1228935687,1287653388,1825200146,1111490567,1094713359,1111490565,1111490568,1094713362,1715472409,1665140738,1113589787,1086324748,1086324744,1112152075,1639976963,1237320707,1094713370,1086324749,1086326798,1111490576,
1111490577,1111490578,1111490579,1094715420,1648361473,1111492626,1111492627,1111492628,1312817669,1145045006,1145047050,1145047049,1145047053,1111492615,1111492616,1111492617,1113589786,1094713365,1094713366,1094713367,1145047052,1111490566,1111490563,1094713351,1094713368,1111490583,1111490584,1111490585,1111490586,1145045008,1296041986,1073877011,1086324752,1086324753,1086324754,1145045003,1095241729]);b.twoCharLabelTokenIds=F(-1,[1111492612,1111492613,1111492614,1111490577,1111490578,1111490579,
1111492626,1111492627,1111492628])});s("JM");B(null,"JM.Measurement","JU.Measure $.PT $.SB J.atomdata.RadiusData J.c.VDW JM.LabelToken JU.Escape".split(" "),function(){var b=n(function(){this.thisID=this.ms=null;this.index=0;this.isVisible=!0;this.isTrajectory=this.isHidden=!1;this.$isValid=!0;this.colix=0;this.labelColix=-1;this.mad=0;this.tickInfo=null;this.traceX=-2147483648;this.count=this.traceY=0;this.pts=this.countPlusIndices=null;this.value=0;this.renderArc=this.renderAxis=this.type=this.strMeasurement=
this.vwr=this.text=this.units=this.strFormat=this.property=null;this.fixedValue=NaN;this.inFront=!1;this.modelIndex=0;this.useDefaultLabel=this.tainted=this.isPending=!1;this.newUnits=null;v(this,arguments)},JM,"Measurement",null);P(b,function(){this.countPlusIndices=F(5,0)});c(b,"isTainted",function(){return this.tainted&&!(this.tainted=!1)});c(b,"setM",function(a,d,b,c,e,f){this.ms=a;this.index=f;this.vwr=a.vwr;this.colix=c;this.strFormat=e;null!=d&&(this.modelIndex=d.modelIndex,this.tickInfo=d.tickInfo,
this.pts=d.pts,this.mad=d.mad,this.thisID=d.thisID,this.text=d.text,this.property=d.property,this.units=d.units,null==this.property&&"+hz".equals(this.units)&&(this.property="property_J"),null!=this.thisID&&null!=this.text&&(this.labelColix=this.text.colix));null==this.pts&&(this.pts=Array(4));d=null==d?null:d.countPlusIndices;this.count=null==d?0:d[0];0<this.count&&(System.arraycopy(d,0,this.countPlusIndices,0,this.count+1),this.isTrajectory=a.isTrajectoryMeasurement(this.countPlusIndices));this.value=
(this.isPending=Float.isNaN(b))||this.isTrajectory?this.getMeasurement(null):b;this.formatMeasurement(null);return this},"JM.ModelSet,JM.Measurement,~N,~N,~S,~N");c(b,"setPoints",function(a,d,b,c){this.ms=a;this.countPlusIndices=d;this.count=d[0];this.pts=null==b?Array(4):b;this.vwr=a.vwr;this.tickInfo=c;return this},"JM.ModelSet,~A,~A,JM.TickInfo");c(b,"setCount",function(a){this.setCountM(a)},"~N");c(b,"setCountM",function(a){this.count=this.countPlusIndices[0]=a},"~N");c(b,"getAtomIndex",function(a){return 0<
a&&a<=this.count?this.countPlusIndices[a]:-1},"~N");c(b,"getAtom",function(a){a=this.countPlusIndices[a];return-1>a?this.pts[-2-a]:this.ms.at[a]},"~N");c(b,"getLastIndex",function(){return 0<this.count?this.countPlusIndices[this.count]:-1});c(b,"getString",function(){return this.strMeasurement});j(b,"toString",function(){return this.getString()});c(b,"getStringUsing",function(a,d,b){this.vwr=a;this.value=this.getMeasurement(null);this.formatMeasurementAs(d,b,!0);return null==d?this.getInfoAsString(b):
this.strMeasurement},"JV.Viewer,~S,~S");c(b,"getStringDetail",function(){return(2==this.count?"Distance":3==this.count?"Angle":"Torsion")+this.getMeasurementScript(" - ",!1)+" : "+this.value});c(b,"refresh",function(a){this.value=this.getMeasurement(a);this.isTrajectory=this.ms.isTrajectoryMeasurement(this.countPlusIndices);this.formatMeasurement(null)},"~A");c(b,"getMeasurementScript",function(a,d){for(var b=new JU.SB,c=a.equals(" "),e=1;e<=this.count;e++)b.append(1<e?a:" ").append(this.getLabel(e,
c,d));return b.toString()},"~S,~B");c(b,"formatMeasurementAs",function(a,d,b){null!=a&&0==a.length&&(a=null);if(b||!(null!=a&&0!=a.indexOf(this.countPlusIndices[0]+":")))this.strFormat=a,this.formatMeasurement(d)},"~S,~S,~B");c(b,"formatMeasurement",function(a){this.tainted=!0;switch(Float.isNaN(this.value)?0:this.count){default:this.strMeasurement=null;break;case 2:this.strMeasurement=this.formatDistance(a);break;case 3:case 4:this.strMeasurement=this.formatAngle(this.value)}},"~S");c(b,"reformatDistanceIfSelected",
function(a){if(2==this.count&&this.vwr.slm.isSelected(this.countPlusIndices[1])&&this.vwr.slm.isSelected(this.countPlusIndices[2])){var d;if(this.useDefaultLabel&&null!=this.strFormat&&0<=(d=this.strFormat.indexOf("//")))this.strFormat=this.strFormat.substring(0,d);a&&(this.units=null);this.formatMeasurement(null)}},"~B");c(b,"formatDistance",function(a){var d=this.getLabelString();if(null==d)return"";var b=this.strFormat.indexOf("//");null==a&&(a=this.units,null==a&&(a=0<=b?this.strFormat.substring(b+
2):null==this.property?this.vwr.g.measureDistanceUnits:""));0<=b&&(this.strFormat=this.strFormat.substring(0,b));this.strFormat+="//"+a;a=JM.Measurement.fixUnits(a);b=d.indexOf("//");0<=b&&(d=d.substring(0,b),0==d.length&&(d="%VALUE"));a=this.fixValue(a,0<=d.indexOf("%V"));return this.formatString(a,this.newUnits,d)},"~S");c(b,"fixValue",function(a,d){this.checkJ(a);null!=a&&a.startsWith("+")&&(this.isPending||(this.value=Math.abs(this.value)),a=a.substring(1));this.newUnits=a;if(2!=this.count)return this.value;
var b=this.value;null==a&&null!=this.property&&(a="");if(null!=a){var c=a.equals("%");if(null==this.property&&(c||a.endsWith("hz"))){var e=this.getAtomIndex(1),f=this.getAtomIndex(2);if(0<=e&&0<=f){var e=this.getAtom(1),f=this.getAtom(2),h=JM.Measurement.nmrType(a),k=!c&&1==h;this.type=c?"percent":k?"dipoleCouplingConstant":3==h?"NOE or 3JHH":"J-CouplingConstant";3==h?(e=this.vwr.getNMRCalculation().getNOEorJHH(x(-1,[e,null,null,f]),11),null==e?(b=NaN,this.newUnits=a=""):(b=e[1],a=this.newUnits=2==
e.length?"noe":"hz")):b=c?b/(e.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)+f.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)):k?this.vwr.getNMRCalculation().getDipolarConstantHz(e,f):this.vwr.getNMRCalculation().getIsoOrAnisoHz(!0,e,f,a,null);this.$isValid=!Float.isNaN(b);c&&(a="pm")}}return JM.Measurement.toUnits(b,a,d)}return d?Math.round(100*b)/100:b},"~S,~B");c(b,"checkJ",function(a){null!=this.property||(null!=a||null!=this.units)||(a=this.vwr.g.measureDistanceUnits,"+hz".equals(a)&&(this.property=
"property_J",this.units=a))},"~S");b.nmrType=c(b,"nmrType",function(a){return 0>a.indexOf("hz")?0:a.equals("noe_hz")?3:a.startsWith("dc_")||a.equals("khz")?1:2},"~S");c(b,"formatAngle",function(a){var d=this.getLabelString();0<=d.indexOf("%V")&&(a=Math.round(10*a)/10);return this.formatString(a,"\u00b0",d)},"~N");c(b,"getLabelString",function(){var a=this.countPlusIndices[0]+":",d=null;if(null!=this.strFormat){if(0==this.strFormat.length)return null;d=2<this.strFormat.length&&0==this.strFormat.indexOf(a)?
this.strFormat:null}this.useDefaultLabel=!1;null==d&&(this.strFormat=null,d=this.vwr.getDefaultMeasurementLabel(this.countPlusIndices[0]),this.useDefaultLabel=null==this.units);0==d.indexOf(a)&&(d=d.substring(2));null==this.strFormat&&(this.strFormat=a+d);return d});c(b,"formatString",function(a,d,b){return JM.LabelToken.formatLabelMeasure(this.vwr,this,b,a,d)},"~N,~S,~S");c(b,"sameAsPoints",function(a,d){if(this.count!=a[0])return!1;for(var b=!0,c=1;c<=this.count&&b;c++)b=this.countPlusIndices[c]==
a[c];if(b)for(c=0;c<this.count&&b;c++)null!=d[c]&&(b=0.01>this.pts[c].distance(d[c]));if(b)return!0;switch(this.count){default:return!0;case 2:return this.sameAsIJ(a,d,1,2)&&this.sameAsIJ(a,d,2,1);case 3:return this.sameAsIJ(a,d,1,3)&&this.sameAsIJ(a,d,2,2)&&this.sameAsIJ(a,d,3,1);case 4:return this.sameAsIJ(a,d,1,4)&&this.sameAsIJ(a,d,2,3)&&this.sameAsIJ(a,d,3,2)&&this.sameAsIJ(a,d,4,1)}},"~A,~A");c(b,"sameAsIJ",function(a,d,b,c){b=this.countPlusIndices[b];a=a[c];return 0<=b||0<=a?b==a:0.01>this.pts[-2-
b].distance(d[-2-a])},"~A,~A,~N,~N");c(b,"sameAs",function(a,d){return this.sameAsIJ(this.countPlusIndices,this.pts,a,d)},"~N,~N");c(b,"getPropMeasurement",function(a){if(null==this.countPlusIndices||2!=this.count)return NaN;for(var d=this.count;0<=--d;)if(0>this.countPlusIndices[d+1])return NaN;try{var b=null==a?this.getAtom(1):a[0],c=null==a?this.getAtom(2):a[1],e=this.vwr.getDataObj(this.property,null,2),f=b.i,h=c.i;return null==e||h>=e.length||f>=e.length?NaN:e[f][h]}catch(k){return NaN}},"~A");
c(b,"getMeasurement",function(a){this.checkJ(null);if(!Float.isNaN(this.fixedValue))return this.fixedValue;if(null!=this.property)return this.getPropMeasurement(a);if(null==this.countPlusIndices||2>this.count)return NaN;for(var d=this.count;0<=--d;)if(-1==this.countPlusIndices[d+1])return NaN;var d=null==a?this.getAtom(1):a[0],b=null==a?this.getAtom(2):a[1],c;switch(this.count){case 2:return d.distance(b);case 3:return c=null==a?this.getAtom(3):a[2],JU.Measure.computeAngleABC(d,b,c,!0);case 4:return c=
null==a?this.getAtom(3):a[2],a=null==a?this.getAtom(4):a[3],JU.Measure.computeTorsion(d,b,c,a,!0);default:return NaN}},"~A");c(b,"getLabel",function(a,d,b){var c=this.countPlusIndices[a];return 0>c?(b?"modelIndex "+this.getAtom(a).mi+" ":"")+JU.Escape.eP(this.getAtom(a)):d?"({"+c+"})":this.vwr.getAtomInfo(c)},"~N,~B,~B");c(b,"setModelIndex",function(a){this.modelIndex=a;if(null!=this.pts)for(var d=0;d<this.count;d++)null!=this.pts[d]&&(this.pts[d].mi=a)},"~N");c(b,"isValid",function(){return!(this.sameAs(1,
2)||2<this.count&&this.sameAs(1,3)||4==this.count&&this.sameAs(2,4))});b.find=c(b,"find",function(a,d){for(var b=d.countPlusIndices,c=d.pts,e=a.size();0<=--e;)if(a.get(e).sameAsPoints(b,c))return e;return-1},"JU.Lst,JM.Measurement");c(b,"isConnected",function(a,d){for(var b=-1,c=1;c<=d;c++){var e=this.getAtomIndex(c);if(!(0>e)){if(0<=b&&!a[e].isBonded(a[b]))return!1;b=e}}return!0},"~A,~N");c(b,"getInfoAsString",function(a){var d=this.fixValue(a,!0);a=new JU.SB;a.append(2==this.count?null!=this.property?
this.property:null==this.type?"distance":this.type:3==this.count?"angle":"dihedral");a.append(" \t").appendF(d);a.append(" \t").append(JU.PT.esc(this.strMeasurement));for(d=1;d<=this.count;d++)a.append(" \t").append(this.getLabel(d,!1,!1));null!=this.thisID&&a.append(" \t").append(this.thisID);return a.toString()},"~S");c(b,"isInRange",function(a,d){if(a.factorType===J.atomdata.RadiusData.EnumType.FACTOR){var b=this.getAtom(1),c=this.getAtom(2),b=(b.getVanderwaalsRadiusFloat(this.vwr,a.vdwType)+c.getVanderwaalsRadiusFloat(this.vwr,
a.vdwType))*a.value;return d<=b}return 3.4028235E38==a.values[0]||d>=a.values[0]&&d<=a.values[1]},"J.atomdata.RadiusData,~N");c(b,"isIntramolecular",function(a,d){for(var b=-1,c=1;c<=d;c++){var e=this.getAtomIndex(c);if(!(0>e))if(e=a[e].getMoleculeNumber(!1),0>b)b=e;else if(e!=b)return!1}return!0},"~A,~N");c(b,"isMin",function(a){var d=this.getAtom(1),b=this.getAtom(2),c=D(100*b.distanceSquared(d)),d=d.getAtomName(),b=b.getAtomName(),b=0>d.compareTo(b)?d+b:b+d;a=a.get(b);return null!=a&&c==a.intValue()},
"java.util.Map");b.isUnits=c(b,"isUnits",function(a){return JU.PT.isOneOf((a.startsWith("+")?a.substring(1):a).toLowerCase(),";nm;nanometers;pm;picometers;angstroms;angstroms;ang;\u00c5;au;vanderwaals;vdw;%;noe;")||0>a.indexOf(" ")&&a.endsWith("hz")},"~S");b.toUnits=c(b,"toUnits",function(a,d,b){return Float.isNaN(a)?NaN:d.equals("hz")?b?Math.round(10*a)/10:a:d.equals("nm")?b?Math.round(100*a)/1E3:a/10:d.equals("pm")?b?Math.round(1E3*a)/10:100*a:d.equals("au")?b?Math.round(1E3*(a/0.5291772))/1E3:
a/0.5291772:d.endsWith("khz")?b?Math.round(a/10)/100:a/1E3:b?Math.round(100*a)/100:a},"~N,~S,~B");b.fromUnits=c(b,"fromUnits",function(a,d){return d.equals("nm")?10*a:d.equals("pm")?a/100:d.equals("au")?0.5291772*a:d.equals("\u00c5")?a:0},"~N,~S");b.fixUnits=c(b,"fixUnits",function(a){var d=a.endsWith("s")?a.substring(0,a.length-1):a;return d.equals("nanometer")?"nm":d.equals("bohr")||d.equals("atomicunits")||d.equals("atomic")?"au":d.equals("picometer")?"pm":d.equals("\u00e5")||d.equals("angstrom")||
d.equals("a")||d.equals("ang")?"\u00c5":d.equals("vanderwaal")||d.equals("vdw")?"%":a},"~S");c(b,"getDistanceFormatForState",function(){return this.useDefaultLabel?null:this.strFormat});c(b,"setFromMD",function(a){this.modelIndex=a.modelIndex;null!=a.thisID&&(this.thisID=a.thisID,null!=a.text&&null!=a.text.text&&(this.text=a.text));this.units="default".equals(a.units)?null:a.units;this.property=a.property;this.fixedValue=a.fixedValue;0!=a.colix&&(this.colix=a.colix);0!=a.mad&&(this.mad=a.mad);null!=
a.strFormat&&(this.strFormat=(null==this.strFormat?a.strFormat:this.strFormat.substring(0,2))+a.strFormat.substring(2));null!=a.text&&(null==this.text?this.text=a.text:(null!=a.text.font&&(this.text.setFont(a.text.font,!1),this.text.fontScale=a.text.font.fontSize/a.text.font.fontSizeNominal),this.text.text=null,0!=a.text.align&&(this.text.align=a.text.align),0!=a.colix&&(this.labelColix=this.text.colix=a.text.colix)));this.formatMeasurement(null)},"JM.MeasurementData,~B")});s("JM");B(["J.api.JmolMeasurementClient"],
"JM.MeasurementData",["JU.Lst","JM.Measurement"],function(){var b=n(function(){this.points=this.measurements=this.measurementStrings=this.bsSelected=this.client=null;this.mustNotBeConnected=this.mustBeConnected=!1;this.tickInfo=null;this.tokAction=12290;this.note=this.property=this.strFormat=this.radiusData=null;this.isAll=!1;this.colix=0;this.intramolecular=null;this.mad=0;this.units=this.text=this.thisID=null;this.fixedValue=0;this.ms=this.minArray=this.atoms=null;this.allowSelf=!1;this.vwr=null;
this.iFirstAtom=0;this.justOneModel=!0;this.htMin=null;this.modelIndex=0;v(this,arguments)},JM,"MeasurementData",null,J.api.JmolMeasurementClient);c(b,"init",function(a,d,b){this.vwr=d;this.points=b;this.thisID=a;return this},"~S,JV.Viewer,JU.Lst");c(b,"setModelSet",function(a){this.ms=a;return this},"JM.ModelSet");c(b,"set",function(a,d,b,c,e,f,h,k,m,j,p,q,r,u,n,s){this.ms=this.vwr.ms;this.tokAction=a;2<=this.points.size()&&(y(this.points.get(0),"JU.BS")&&y(this.points.get(1),"JU.BS"))&&(this.justOneModel=
this.vwr.ms.getModelBS(this.points.get(0),!1).equals(this.vwr.ms.getModelBS(this.points.get(1),!1)));this.vwr.am.splitFrame&&(this.justOneModel=!0);this.bsSelected=s;this.htMin=d;this.radiusData=b;this.property=c;this.strFormat=e;this.units=f;this.tickInfo=h;this.mustBeConnected=k;this.mustNotBeConnected=m;this.intramolecular=j;this.isAll=p;this.mad=q;this.colix=r;this.text=u;this.fixedValue=n;return this},"~N,java.util.Map,J.atomdata.RadiusData,~S,~S,~S,JM.TickInfo,~B,~B,Boolean,~B,~N,~N,JM.Text,~N,JU.BS");
c(b,"processNextMeasure",function(a,d){var b=d.getMeasurement(null);if(!(null!=this.htMin&&!d.isMin(this.htMin)||null!=this.radiusData&&!d.isInRange(this.radiusData,b)))if(null==this.measurementStrings&&null==this.measurements){var c=this.minArray[this.iFirstAtom];d.value=b;b=d.fixValue(this.units,!1);this.minArray[this.iFirstAtom]=-Infinity==1/c?b:Math.min(c,b)}else null!=this.measurementStrings?this.measurementStrings.addLast(d.getStringUsing(this.vwr,this.strFormat,this.units)):this.measurements.addLast(Float.$valueOf(d.getMeasurement(null)))},
"JM.MeasurementData,JM.Measurement");c(b,"getMeasurements",function(a,d){if(d){this.minArray=L(this.points.get(0).cardinality(),0);for(var b=0;b<this.minArray.length;b++)this.minArray[b]=-0;this.define(null,this.ms);return this.minArray}if(a)return this.allowSelf=!0,this.measurements=new JU.Lst,this.define(null,this.ms),this.measurements;this.measurementStrings=new JU.Lst;this.define(null,this.ms);return this.measurementStrings},"~B,~B");c(b,"define",function(a,d){this.client=null==a?this:a;this.atoms=
d.at;var b=this.points.size();if(!(2>b)){this.modelIndex=-1;var c=Array(4),e=F(5,0),f=(new JM.Measurement).setPoints(d,e,c,null);f.setCount(b);f.property=this.property;f.strFormat=this.strFormat;f.units=this.units;f.fixedValue=this.fixedValue;for(var h=-1,k=0;k<b;k++){var m=this.points.get(k);if(y(m,"JU.BS")){h=m.cardinality();if(0==h)return;1<h&&(this.modelIndex=0);h=k;0==k&&(this.iFirstAtom=0);e[k+1]=m.nextSetBit(0)}else c[k]=m,e[k+1]=-2-k}this.nextMeasure(0,h,f,this.modelIndex)}},"J.api.JmolMeasurementClient,JM.ModelSet");
c(b,"nextMeasure",function(a,d,b,c){if(a>d)(this.allowSelf&&!this.mustBeConnected&&!this.mustNotBeConnected||b.isValid())&&((!this.mustBeConnected||b.isConnected(this.atoms,a))&&(!this.mustNotBeConnected||!b.isConnected(this.atoms,a))&&(null==this.intramolecular||b.isIntramolecular(this.atoms,a)==this.intramolecular.booleanValue()))&&this.client.processNextMeasure(this,b);else{var e=this.points.get(a),f=b.countPlusIndices,h=0==a?2147483647:f[a];if(0>h)this.nextMeasure(a+1,d,b,c);else{for(var k=!1,
m=e.nextSetBit(0),j=0;0<=m;m=e.nextSetBit(m+1),j++)if(m!=h||this.allowSelf){var p=this.atoms[m].mi;if(0<=c&&this.justOneModel)if(0==a)c=p;else if(c!=p)continue;this.modelIndex=p;f[a+1]=m;0==a&&(this.iFirstAtom=j);k=!0;this.nextMeasure(a+1,d,b,c)}k||this.nextMeasure(a+1,d,b,c)}}},"~N,~N,JM.Measurement,~N")});s("JM");B(["JM.Measurement"],"JM.MeasurementPending",null,function(){var b=n(function(){this.haveModified=this.haveTarget=!1;this.numSet=0;this.lastIndex=-1;v(this,arguments)},JM,"MeasurementPending",
JM.Measurement);c(b,"set",function(a){return this.setM(a,null,NaN,0,null,0)},"JM.ModelSet");c(b,"checkPoint",function(a){for(var d=1;d<=this.numSet;d++)if(this.countPlusIndices[d]==-1-d&&0.01>this.pts[d-1].distance(a))return!1;return!0},"JU.Point3fi");c(b,"getIndexOf",function(a){for(var d=1;d<=this.numSet;d++)if(this.countPlusIndices[d]==a)return d;return 0},"~N");j(b,"setCount",function(a){this.setCountM(a);this.numSet=a},"~N");c(b,"addPoint",function(a,d,b){if(0<=a&&this.ms.vwr.am.splitFrame){var c=
this.ms.at[a].mi;if(0<this.count){if(c!=this.modelIndex)return this.count}else this.modelIndex=c}this.haveModified=a!=this.lastIndex;this.lastIndex=a;if(null==d){if(0<this.getIndexOf(a))return b&&(this.numSet=this.count),this.count;this.haveTarget=0<=a;if(!this.haveTarget)return this.count=this.numSet;this.count=this.numSet+1;this.countPlusIndices[this.count]=a}else{if(!this.checkPoint(d))return b&&(this.numSet=this.count),this.count;a=this.numSet;this.haveModified=this.haveTarget=!0;this.count=this.numSet+
1;this.pts[a]=d;this.countPlusIndices[this.count]=-2-a}this.countPlusIndices[0]=this.count;b&&(this.numSet=this.count);this.value=this.getMeasurement(null);this.strFormat=null;this.formatMeasurement(null);return this.count},"~N,JU.Point3fi,~B")});s("JM");B(null,"JM.Model","java.util.Hashtable JU.AU $.BS $.M3 $.P3 $.SB JS.T JU.BSUtil JV.FileManager".split(" "),function(){var b=n(function(){this.mat4=this.ms=null;this.fileIndex=this.modelIndex=0;this.isModelKit=this.isPdbWithMultipleBonds=this.isBioModel=
!1;this.translation=this.biosymmetry=this.properties=this.auxiliaryInfo=this.orientation=this.annotationCache=this.simpleCage=this.chains=null;this.loadState="";this.loadScript=null;this.isTrajectory=this.isJmolDataFrame=this.structureTainted=this.hasRasmolHBonds=!1;this.act=this.insertionCount=this.altLocCount=this.trajectoryBaseIndex=0;this.bondCount=-1;this.chainCount=0;this.groupCount=-1;this.firstMoleculeIndex=this.firstAtomIndex=this.biosymmetryCount=this.moleculeCount=this.hydrogenCount=0;
this.bsAtomsDeleted=this.bsAtoms=null;this.frameDelay=this.defaultRotationRadius=0;this.selectedTrajectory=-1;this.jmolFrameType=this.jmolData=null;this.jmolFrameTypeInt=0;this.dataFrames=null;this.dataSourceFrame=0;this.bsCheck=this.pdbID=this.uvw0=this.uvw=null;this.hasChirality=!1;this.isOrderly=!0;this.bsAsymmetricUnit=null;v(this,arguments)},JM,"Model",null);A(b,function(){this.setupArrays()});c(b,"setupArrays",function(){this.chains=Array(8);this.loadScript=new JU.SB;this.bsAtoms=new JU.BS;
this.bsAtomsDeleted=new JU.BS});c(b,"set",function(a,d,b,c,e,f){this.ms=a;this.dataSourceFrame=this.modelIndex=d;this.trajectoryBaseIndex=(this.isTrajectory=0<=b)?b:d;null==f&&(f=new java.util.Hashtable);this.auxiliaryInfo=f;a=f.get("biosymmetryCount");null!=a&&(this.biosymmetryCount=a.intValue(),this.biosymmetry=f.get("bioSymmetry"));a=f.get("fileName");null!=a&&f.put("fileName",JV.FileManager.stripTypePrefix(a));this.properties=e;null==c?this.jmolFrameType="modelSet":(e=c.get("header"),this.jmolData=
c,this.isJmolDataFrame=!0,f.put("jmolData",c),f.put("title",e),this.jmolFrameType=0<=e.indexOf("ramachandran")?"ramachandran":0<=e.indexOf("quaternion")?"quaternion":0<=e.indexOf("spin")?"spin":"data",this.jmolFrameTypeInt=JS.T.getTokFromName(this.jmolFrameType),System.out.println("JmolFrameType is "+JS.T.nameOf(this.jmolFrameTypeInt)));return this},"JM.ModelSet,~N,~N,java.util.Map,java.util.Properties,java.util.Map");c(b,"getTrueAtomCount",function(){return JU.BSUtil.andNot(this.bsAtoms,this.bsAtomsDeleted).cardinality()});
c(b,"isContainedIn",function(a){null==this.bsCheck&&(this.bsCheck=new JU.BS);this.bsCheck.clearAll();this.bsCheck.or(a);a=JU.BSUtil.andNot(this.bsAtoms,this.bsAtomsDeleted);this.bsCheck.and(a);return this.bsCheck.equals(a)},"JU.BS");c(b,"resetBoundCount",function(){this.bondCount=-1});c(b,"getBondCount",function(){if(0<=this.bondCount)return this.bondCount;var a=this.ms.bo;this.bondCount=0;for(var d=this.ms.bondCount;0<=--d;)null!=a[d]&&a[d].atom1.mi==this.modelIndex&&this.bondCount++;return this.bondCount});
c(b,"getChainCount",function(a){if(1<this.chainCount&&!a)for(a=0;a<this.chainCount;a++)if(0==this.chains[a].chainID)return this.chainCount-1;return this.chainCount},"~B");c(b,"calcSelectedGroupsCount",function(a){for(var d=this.chainCount;0<=--d;)this.chains[d].calcSelectedGroupsCount(a)},"JU.BS");c(b,"getGroupCount",function(){if(0>this.groupCount){this.groupCount=0;for(var a=this.chainCount;0<=--a;)this.groupCount+=this.chains[a].groupCount}return this.groupCount});c(b,"getChainAt",function(a){return a<
this.chainCount?this.chains[a]:null},"~N");c(b,"getChain",function(a){for(var d=this.chainCount;0<=--d;){var b=this.chains[d];if(b.chainID==a)return b}return null},"~N");c(b,"resetDSSR",function(a){this.annotationCache=null;a&&this.auxiliaryInfo.remove("dssr")},"~B");c(b,"fixIndices",function(a,d,b){this.fixIndicesM(a,d,b)},"~N,~N,JU.BS");c(b,"fixIndicesM",function(a,d,b){this.dataSourceFrame>a&&this.dataSourceFrame--;this.trajectoryBaseIndex>a&&this.trajectoryBaseIndex--;this.firstAtomIndex-=d;for(a=
0;a<this.chainCount;a++)this.chains[a].fixIndices(d,b);JU.BSUtil.deleteBits(this.bsAtoms,b);JU.BSUtil.deleteBits(this.bsAtomsDeleted,b)},"~N,~N,JU.BS");c(b,"freeze",function(){this.freezeM();return!1});c(b,"freezeM",function(){for(var a=0;a<this.chainCount;a++)if(0==this.chains[a].groupCount){for(var d=a+1;d<this.chainCount;d++)this.chains[d-1]=this.chains[d];this.chainCount--}this.chains=JU.AU.arrayCopyObject(this.chains,this.chainCount);this.groupCount=-1;this.getGroupCount();for(a=0;a<this.chainCount;++a)this.chains[a].groups=
JU.AU.arrayCopyObject(this.chains[a].groups,this.chains[a].groupCount)});c(b,"getUVWMatrix",function(a){if(null==this.uvw0)return null;for(var d=new JU.M3,b=0;3>b;b++){var c=JU.P3.newP(a?this.uvw0[b]:this.uvw[b]);c.normalize();d.setColumnV(b,c)}return d},"~B")});s("JM");B(["java.util.Hashtable","JU.BS"],"JM.ModelLoader","java.util.Arrays JU.AU $.Lst $.P3 $.PT $.SB $.V3 J.api.Interface JM.AtomCollection $.Chain $.Group $.Model $.ModelSet JS.T JU.BSUtil $.Elements $.JmolMolecule $.Logger JV.JC".split(" "),
function(){var b=n(function(){this.modelSet0=this.ms=this.vwr=null;this.appendNew=this.merging=!1;this.specialAtomIndexes=this.group3Counts=this.group3Lists=this.jmolData=null;this.doAddPDBHydrogens=this.doMinimize=this.isPyMOLsession=this.isTrajectory=this.isMutate=this.isMOL2D=this.is2D=this.someModelsAreModulated=this.someModelsHaveUnitcells=!1;this.groups=this.jbr=this.fileHeader=null;this.groupCount=0;this.modulationTUV=null;this.noH=!1;this.firstAtomIndexes=this.seqcodes=this.group3Of=this.chainOf=
this.htAtomMap=null;this.iModel=0;this.model=null;this.currentChainID=0;this.isNewChain=!1;this.currentChain=null;this.currentGroupSequenceNumber=0;this.currentGroupInsertionCode="\x00";this.nullGroup=this.currentGroup3=null;this.adapterTrajectoryCount=this.adapterModelCount=this.baseTrajectoryCount=this.baseGroupIndex=this.baseAtomIndex=this.baseModelCount=this.baseModelIndex=0;this.modulationOn=this.noAutoBond=!1;this.$mergeGroups=this.appendToModelIndex=this.htGroup1=null;this.iChain=0;this.vStereo=
null;this.lastModel=-1;this.structuresDefinedInFile=null;v(this,arguments)},JM,"ModelLoader",null);P(b,function(){this.htAtomMap=new java.util.Hashtable;this.structuresDefinedInFile=new JU.BS});A(b,function(a,d,b,c,e,f){this.vwr=a;this.ms=new JM.ModelSet(a,d);var h=a.getModelAdapter();this.modelSet0=e;(this.merging=null!=e&&(0<e.ac||null!=e.vwr.getOperativeSymmetry()))?this.ms.canSkipLoad=!1:a.resetShapes(!1);this.ms.preserveState=a.getPreserveState();this.ms.showRebondTimes=a.getBoolean(603979934);
null==f?(this.initializeInfo(d,null),this.createModelSet(null,null,null),a.setStringProperty("_fileType","")):(this.ms.preserveState||(this.ms.canSkipLoad=!1),d=h.getAtomSetCollectionAuxiliaryInfo(c),d.put("loadScript",b),this.initializeInfo(h.getFileTypeName(c).toLowerCase().intern(),d),this.createModelSet(h,c,f),null!=d.get("lowPrecision")&&a.setBooleanPropertyTok("doublePrecision",603979831,!1),null!=this.jbr&&this.jbr.setLoader(null),this.jbr=null)},"JV.Viewer,~S,JU.SB,~O,JM.ModelSet,JU.BS");
c(b,"initializeInfo",function(a,d){this.ms.g3d=this.vwr.gdata;this.ms.modelSetTypeName=a;this.ms.isXYZ="xyz"===a;this.ms.msInfo=d;this.ms.modelSetProperties=this.ms.getInfoM("properties");this.ms.haveBioModels=this.ms.getMSInfoB(JV.JC.getBoolName(4));this.ms.haveBioModels&&(this.jbr=this.vwr.getJBR().setLoader(this),this.jbr.carbohydrates=d.get("carbohydrates"));this.isMutate=this.ms.getMSInfoB("isMutate");this.jmolData=0==this.adapterModelCount?this.ms.getInfoM("jmolData"):null;this.fileHeader=this.ms.getInfoM("fileHeader");
var b=this.ms.getInfoM("trajectorySteps");if(this.isTrajectory=null!=b)this.ms.trajectory=this.newTrajectory(this.ms,b);this.isPyMOLsession=this.ms.getMSInfoB("isPyMOL");this.doAddPDBHydrogens=null!=this.jbr&&!this.isTrajectory&&!this.isPyMOLsession&&!this.ms.getMSInfoB("pdbNoHydrogens")&&(this.ms.getMSInfoB("pdbAddHydrogens")||this.vwr.getBoolean(603979894));null!=d&&(d.remove("pdbNoHydrogens"),d.remove("pdbAddHydrogens"),d.remove("trajectorySteps"),this.isTrajectory&&(this.ms.vibrationSteps=d.remove("vibrationSteps")),
d.containsKey("highPrecision")&&this.vwr.setBooleanProperty("legacyJavaFloat",!0));this.htGroup1=this.ms.getInfoM("htGroup1");b=this.ms.getInfoM("modulationOn");null!=b&&(this.modulationOn=!0,this.modulationTUV=b===Boolean.TRUE?null:b);this.noAutoBond=this.ms.getMSInfoB("noAutoBond");this.noH=this.ms.getMSInfoB("noHydrogen");this.doMinimize=((this.is2D=this.ms.getMSInfoB("is2D"))&&!this.noH||this.ms.getMSInfoB("minimize3D"))&&this.ms.getMSInfoB("doMinimize");this.adapterTrajectoryCount=this.isTrajectory?
this.ms.trajectory.steps.size():0;this.ms.someModelsHaveSymmetry=this.ms.getMSInfoB(JV.JC.getBoolName(1));this.someModelsHaveUnitcells=this.ms.getMSInfoB(JV.JC.getBoolName(2));this.someModelsAreModulated=this.ms.getMSInfoB(JV.JC.getBoolName(9));this.ms.someModelsHaveFractionalCoordinates=this.ms.getMSInfoB(JV.JC.getBoolName(1));this.merging&&(this.ms.haveBioModels=(new Boolean(this.ms.haveBioModels|this.modelSet0.haveBioModels)).valueOf(),this.ms.bioModelset=this.modelSet0.bioModelset,null!=this.ms.bioModelset&&
this.ms.bioModelset.set(this.vwr,this.ms),this.ms.someModelsHaveSymmetry=(new Boolean(this.ms.someModelsHaveSymmetry|this.modelSet0.getMSInfoB(JV.JC.getBoolName(1)))).valueOf(),this.someModelsHaveUnitcells=(new Boolean(this.someModelsHaveUnitcells|this.modelSet0.getMSInfoB(JV.JC.getBoolName(2)))).valueOf(),this.ms.someModelsHaveFractionalCoordinates=(new Boolean(this.ms.someModelsHaveFractionalCoordinates|this.modelSet0.getMSInfoB(JV.JC.getBoolName(0)))).valueOf(),this.ms.someModelsHaveAromaticBonds=
(new Boolean(this.ms.someModelsHaveAromaticBonds|this.modelSet0.someModelsHaveAromaticBonds)).valueOf(),this.ms.msInfo.put(JV.JC.getBoolName(1),Boolean.$valueOf(this.ms.someModelsHaveSymmetry)),this.ms.msInfo.put(JV.JC.getBoolName(2),Boolean.$valueOf(this.someModelsHaveUnitcells)),this.ms.msInfo.put(JV.JC.getBoolName(0),Boolean.$valueOf(this.ms.someModelsHaveFractionalCoordinates)),this.ms.msInfo.put(JV.JC.getBoolName(8),Boolean.$valueOf(this.ms.someModelsHaveAromaticBonds)))},"~S,java.util.Map");
c(b,"newTrajectory",function(a,d){return J.api.Interface.getInterface("JM.Trajectory",this.vwr,"load").set(this.vwr,a,d)},"JM.ModelSet,JU.Lst");c(b,"getGroup3",function(a){return a>=this.group3Of.length?null:this.group3Of[a]},"~N");c(b,"getFirstAtomIndex",function(a){return this.firstAtomIndexes[a]},"~N");c(b,"getAtomCount",function(){return this.ms.ac});c(b,"createModelSet",function(a,d,b){var c=null==a?0:a.getAtomCount(d,-1);0<c&&JU.Logger.info("reading "+c+" atoms");this.adapterModelCount=null==
a?1:a.getAtomSetCount(d);this.appendToModelIndex=null==this.ms.msInfo?null:this.ms.msInfo.get("appendToModelIndex");this.appendNew=!this.isMutate&&(!this.merging||null==a||1<this.adapterModelCount||this.isTrajectory||this.vwr.getBoolean(603979792)&&null==this.appendToModelIndex);this.htAtomMap.clear();this.chainOf=Array(32);this.group3Of=Array(32);this.seqcodes=F(32,0);this.firstAtomIndexes=F(32,0);this.currentChainID=2147483647;this.currentChain=null;this.currentGroupInsertionCode="\uffff";this.currentGroup3=
"xxxxx";this.iModel=-1;this.model=null;this.merging&&this.mergeTrajAndVib(this.modelSet0,this.ms);this.initializeAtomBondModelCounts(c);!this.noH&&(null!=b&&(this.doMinimize||this.is2D))&&b.setBits(this.baseAtomIndex,this.baseAtomIndex+a.getAtomCount(d,0));if(null==a)this.setModelNameNumberProperties(0,-1,"",1,null,null,null);else{0<this.adapterModelCount&&(JU.Logger.info("ModelSet: haveSymmetry:"+this.ms.someModelsHaveSymmetry+" haveUnitcells:"+this.someModelsHaveUnitcells+" haveFractionalCoord:"+
this.ms.someModelsHaveFractionalCoordinates),JU.Logger.info(this.adapterModelCount+" model"+(1==this.ms.mc?"":"s")+' in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them.'));b=this.ms.getInfoM("defaultOrientationQuaternion");null!=b&&(JU.Logger.info("defaultOrientationQuaternion = "+b),JU.Logger.info('Use "set autoLoadOrientation TRUE" before loading or "restore orientation DEFAULT" after loading to view this orientation.'));this.iterateOverAllNewModels(a,
d);b=a.getBondIterator(d);c=null!=b;this.iterateOverAllNewAtoms(a,d,c);var e=this.vwr.getMadBond();c&&(this.ms.defaultCovalentMad=null==this.jmolData?e:0,this.iterateOverAllNewBonds(b));this.ms.defaultCovalentMad=e;this.merging&&!this.appendNew&&(b=a.getAtomSetAuxiliaryInfo(d,0),this.ms.setInfo(this.baseModelIndex,"initialAtomCount",b.get("initialAtomCount")),this.ms.setInfo(this.baseModelIndex,"initialBondCount",b.get("initialBondCount")));this.initializeUnitCellAndSymmetry();this.initializeBonding()}this.finalizeGroupBuild();
this.is2D&&this.doMinimize&&this.setupMinimization();this.doAddPDBHydrogens&&this.jbr.finalizeHydrogens();null!=a&&(this.ms.calculatePolymers(this.groups,this.groupCount,this.baseGroupIndex,null),null!=this.jbr&&this.jbr.iterateOverAllNewStructures(a,d));this.setDefaultRendering(this.vwr.getInt(553648170));var f=this.vwr.rd;b=this.ms.ac;c=this.ms.at;for(e=this.baseAtomIndex;e<b;e++)c[e].setMadAtom(this.vwr,f);f=this.ms.am;for(e=f[this.baseModelIndex].firstAtomIndex;e<b;e++)null!=c[e]&&f[c[e].mi].bsAtoms.set(e);
this.freeze();this.finalizeShapes();this.vwr.setModelSet(this.ms);this.setAtomProperties();null!=a&&a.finish(d);null!=this.modelSet0&&this.modelSet0.releaseModelSet();this.modelSet0=null},"J.api.JmolAdapter,~O,JU.BS");c(b,"mergeTrajAndVib",function(a,d){this.baseModelCount=a.mc;this.baseTrajectoryCount=0;null==a.trajectory&&this.isTrajectory&&this.newTrajectory(a,new JU.Lst);if(!(null==a.trajectory||0==a.mc)){this.baseTrajectoryCount=a.mc;for(var b=a.trajectory.steps.size(),c=b;c<this.baseTrajectoryCount;c++)a.trajectory.steps.addLast(null);
if(this.isTrajectory){if(null==a.vibrationSteps){a.vibrationSteps=new JU.Lst;for(c=b;0<=--c;)a.vibrationSteps.addLast(null)}b=d.trajectory.steps.size();for(c=0;c<b;c++)a.trajectory.steps.addLast(d.trajectory.steps.get(c)),a.vibrationSteps.addLast(null==d.vibrationSteps?null:d.vibrationSteps.get(c))}else d.trajectory=this.newTrajectory(d,null);d.vibrationSteps=a.vibrationSteps;d.trajectory.steps=a.trajectory.steps;a.trajectory=null}},"JM.ModelSet,JM.ModelSet");c(b,"setDefaultRendering",function(a){if(!this.isPyMOLsession){for(var d=
new JU.SB,b=this.ms.mc,c=this.ms.am,e=this.baseModelIndex;e<b;e++)c[e].isBioModel&&c[e].getDefaultLargePDBRendering(d,a);0!=d.length()&&(d.append("select *;"),a=this.ms.getInfoM("jmolscript"),null==a&&(a=""),d.append(a),this.ms.msInfo.put("jmolscript",d.toString()))}},"~N");c(b,"setAtomProperties",function(){for(var a=this.ms.mc,d=this.baseModelIndex;d<a;d++){var b=this.ms.getInfo(d,"atomProperties");null!=this.jmolData&&this.addJmolDataProperties(this.ms.am[d],this.ms.getInfo(d,"jmolData"));var c=
this.ms.getInfo(d,"groupPropertyList");this.ms.am[d].isBioModel&&null!=this.ms.getInfo(d,"dssr")&&this.vwr.getAnnotationParser(1111490587).setGroup1(this.ms,d);if(null!=b){for(var e,b=b.entrySet().iterator();b.hasNext()&&((e=b.next())||1);){var f=e.getKey(),h=e.getValue(),k=this.ms.getModelAtomBitSetIncludingDeleted(d,!0);if(this.doAddPDBHydrogens)var m=null!=c&&JU.PT.isOneOf(f,c),h=this.jbr.fixPropertyValue(k,h,m);f="property_"+f.toLowerCase();JU.Logger.info("creating "+f+" for model "+this.ms.getModelName(d));
this.vwr.setData(f,x(-1,[f,h,k,Integer.$valueOf(-1),Boolean.FALSE,e]),this.ms.ac,0,0,2147483647,0)}this.ms.setInfo(d,"atomProperties",null)}}});c(b,"initializeAtomBondModelCounts",function(a){var d=this.adapterTrajectoryCount;if(this.merging){if(this.appendNew)this.baseModelIndex=this.baseModelCount,this.ms.mc=this.baseModelCount+this.adapterModelCount;else{this.baseModelIndex=null==this.appendToModelIndex?this.vwr.am.cmi:this.appendToModelIndex.intValue();if(0>this.baseModelIndex||this.baseModelIndex>=
this.baseModelCount)this.baseModelIndex=this.baseModelCount-1;this.ms.mc=this.baseModelCount}this.ms.ac=this.baseAtomIndex=this.modelSet0.ac;this.ms.bondCount=this.modelSet0.bondCount;this.$mergeGroups=this.modelSet0.getGroups();this.groupCount=this.baseGroupIndex=this.$mergeGroups.length;this.ms.mergeModelArrays(this.modelSet0);this.ms.growAtomArrays(this.ms.ac+a)}else this.ms.mc=this.adapterModelCount,this.ms.ac=0,this.ms.bondCount=0,this.ms.at=Array(a),this.ms.bo=Array(250+a);this.doAddPDBHydrogens&&
this.jbr.initializeHydrogenAddition();1<d&&(this.ms.mc+=d-1);this.ms.am=JU.AU.arrayCopyObject(this.ms.am,this.ms.mc);this.ms.modelFileNumbers=JU.AU.arrayCopyI(this.ms.modelFileNumbers,this.ms.mc);this.ms.modelNumbers=JU.AU.arrayCopyI(this.ms.modelNumbers,this.ms.mc);this.ms.modelNumbersForAtomLabel=JU.AU.arrayCopyS(this.ms.modelNumbersForAtomLabel,this.ms.mc);this.ms.modelNames=JU.AU.arrayCopyS(this.ms.modelNames,this.ms.mc);this.ms.frameTitles=JU.AU.arrayCopyS(this.ms.frameTitles,this.ms.mc);if(this.merging)for(a=
0;a<this.modelSet0.mc;a++)(this.ms.am[a]=this.modelSet0.am[a]).ms=this.ms},"~N");c(b,"mergeGroups",function(){var a=this.modelSet0.getModelSetAuxiliaryInfo(null),d=a.get("group3Lists"),a=a.get("group3Counts"),b=null==d?0:d.length;if(null!=d){for(var c=0;c<this.baseModelCount;c++)c<b&&(this.group3Lists[c+1]=d[c+1],this.group3Counts[c+1]=a[c+1]),this.structuresDefinedInFile.set(c);this.group3Lists[0]=d[0];this.group3Counts[0]=a[0]}!this.appendNew&&this.ms.haveBioModels&&this.structuresDefinedInFile.clear(this.baseModelIndex)});
c(b,"iterateOverAllNewModels",function(a,d){this.group3Lists=Array(this.ms.mc+1);this.group3Counts=JU.AU.newInt2(this.ms.mc+1);this.structuresDefinedInFile=new JU.BS;this.merging&&this.mergeGroups();for(var b=this.isTrajectory?this.baseTrajectoryCount:-1,c=this.baseModelIndex,e=0;e<this.adapterModelCount;++e,++c){var f=a.getAtomSetNumber(d,e),h=a.getAtomSetName(d,e),k=a.getAtomSetAuxiliaryInfo(d,e);k.containsKey("modelID")&&k.put("modelID0",k.get("modelID"));var m=k.get("modelProperties");if(!this.merging||
this.appendNew){var j=k.get("fileType");this.vwr.setStringProperty("_fileType",j);this.vwr.fm.setFileType(j)}null==h&&(null!=this.jmolData&&(h=this.jmolData.get("header"),h=2<h.indexOf(";")?h.substring(h.indexOf(":")+2,h.indexOf(";")):null),null==h&&(h=this.appendNew?""+f%1E6:""));this.setModelNameNumberProperties(c,b,h,f,m,k,this.jmolData)}b=this.ms.am[null==this.appendToModelIndex?this.baseModelIndex:this.ms.mc-1];this.vwr.setSmilesString(this.ms.msInfo.get("smilesString"));e=this.ms.msInfo.remove("loadState");
f=this.ms.msInfo.remove("loadScript");if(0>f.indexOf("Viewer.AddHydrogens")||!b.isModelKit){h=JU.PT.split(e,"\n");k=new JU.SB;for(e=0;e<h.length;e++)m=b.loadState.indexOf(h[e]),(0>m||m!=b.loadState.lastIndexOf(h[e]))&&k.append(h[e]).appendC("\n");b.loadState+=b.loadScript.toString()+k.toString();b.loadScript=new JU.SB;if(0<=f.indexOf("load append ")||0<=f.indexOf('data "append '))f.insert(0,";var anew = appendNew;"),f.append(";set appendNew anew");b.loadScript.append("  ").appendSB(f).append(";\n")}if(this.isTrajectory){e=
this.ms.mc-c+1;JU.Logger.info(e+" trajectory steps read");this.ms.setInfo(this.baseModelCount,"trajectoryStepCount",Integer.$valueOf(e));b=this.adapterModelCount;for(e=c;e<this.ms.mc;e++,b++)this.ms.am[e]=this.ms.am[this.baseModelCount],this.ms.modelNumbers[e]=a.getAtomSetNumber(d,b),this.ms.modelNames[e]=a.getAtomSetName(d,b),this.structuresDefinedInFile.set(e)}this.finalizeModels(this.baseModelCount)},"J.api.JmolAdapter,~O");c(b,"setModelNameNumberProperties",function(a,d,b,c,e,f,h){if(this.appendNew){var k=
null!=f&&Boolean.TRUE===f.get(JV.JC.getBoolName(4));this.ms.am[a]=k?this.jbr.getBioModel(a,d,h,e,f):(new JM.Model).set(this.ms,a,d,h,e,f);this.ms.modelNumbers[a]=c;this.ms.modelNames[a]=b;k&&this.jbr.setGroupLists(a)}else d=f.get("PDB_CONECT_firstAtom_count_max"),null!=d&&this.ms.setInfo(a,"PDB_CONECT_firstAtom_count_max",d);d=this.ms.am;c=this.ms.at;d[a].bsAtoms.set(c.length+1);d[a].bsAtoms.clear(c.length+1);c=this.ms.getInfo(a,"altLocs");d[a].altLocCount=null==c?0:c.length;null!=c&&(c=c.toCharArray(),
java.util.Arrays.sort(c),c=String.valueOf(c),this.ms.setInfo(a,"altLocs",c));c=this.ms.getInfo(a,"insertionCodes");d[a].insertionCount=null==c?0:c.length;b=null!=this.ms.modelSetName&&this.ms.modelSetName.startsWith("Jmol Model Kit")||b.startsWith("Jmol Model Kit")||"Jme".equals(this.ms.getInfo(a,"fileType"))&&this.is2D;d[a].isModelKit=b},"~N,~N,~S,~N,java.util.Properties,java.util.Map,java.util.Map");c(b,"finalizeModels",function(a){var d=this.ms.mc;if(d!=a){var b,c=0,e=-1,f=this.ms.modelNumbers,
h=this.ms.modelNames;if(this.isTrajectory)for(var k=a;++k<this.ms.mc;)f[k]=f[k-1]+1;if(0<a){if(1E6>f[0])for(k=0;k<a;k++)0==h[k].length&&(h[k]=""+f[k]),f[k]+=1E6,this.ms.modelNumbersForAtomLabel[k]="1."+(k+1);var m=f[a-1],m=m-m%1E6;1E6>f[a]&&(m+=1E6);for(k=a;k<d;k++)f[k]+=m}for(var j=this.ms.am,k=a;k<d;++k)if(this.ms.setInfo(k,"fileType",this.ms.modelSetTypeName),null!=this.fileHeader&&this.ms.setInfo(k,"fileHeader",this.fileHeader),m=w(f[k]/1E6),m!=e&&(c=0,e=m),c++,0==m?(b=""+this.ms.getModelNumber(k),
m=1):b=m+"."+c,this.ms.modelNumbersForAtomLabel[k]=b,j[k].fileIndex=m-1,this.ms.modelFileNumbers[k]=1E6*m+c,null==h[k]||0==h[k].length)h[k]=b;if(this.merging)for(k=0;k<a;k++)j[k].ms=this.ms;for(k=0;k<d;k++)this.ms.setInfo(k,"modelName",h[k]),this.ms.setInfo(k,"modelNumber",Integer.$valueOf(f[k]%1E6)),this.ms.setInfo(k,"modelFileNumber",Integer.$valueOf(this.ms.modelFileNumbers[k])),this.ms.setInfo(k,"modelNumberDotted",this.ms.getModelNumberDotted(k)),a=this.ms.getInfo(k,"altLocs"),null!=a&&JU.Logger.info("model "+
this.ms.getModelNumberDotted(k)+" alternative locations: "+a)}},"~N");c(b,"iterateOverAllNewAtoms",function(a,d,b){var c=-1,e=0,f=!1,h=!1,k=a.getAtomIterator(d),m=a.getAtomCount(d,-1);this.ms.setCapacity(a.getAtomCount(d,-1));d=0;var j=this.ms.am;0<this.ms.mc&&(this.nullGroup=(new JM.Group).setGroup(new JM.Chain(this.ms.am[this.baseModelIndex],32,0),"",0,-1,-1));for(;k.hasNext();){d++;var p=k.getAtomSetIndex()+this.baseModelIndex;p!=c&&(this.iChain=0,this.iModel=p,this.model=j[p],c=this.model.bsAtoms,
this.merging&&(!this.appendNew&&null!=this.vwr.getOperativeSymmetry())&&(e=this.getAtomSiteBase(c)),this.currentChainID=2147483647,this.isNewChain=!0,c.set(this.ms.ac+m),c.clearAll(),this.model.isOrderly=null==this.appendToModelIndex,f=this.model.isBioModel,c=p,h=f&&this.doAddPDBHydrogens,null!=this.jbr&&this.jbr.setHaveHsAlready(!1));var p=k.getGroup3(),q=k.getChainID();this.checkNewGroup(a,q,p,k.getSequenceNumber(),k.getInsertionCode(),h,!1);q=k.getElementNumber();h&&1==JU.Elements.getElementNumber(q)&&
this.jbr.setHaveHsAlready(!0);var r=k.getAtomName(),u=h?this.getPdbCharge(p,r):k.getFormalCharge(),p=this.addAtom(f,k,r,q,e,u,p);b&&this.htAtomMap.put(k.getUniqueID(),p)}0<this.groupCount&&h&&this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain?1:0);c=-1;a=null;b=this.ms.at;for(e=j[0].firstAtomIndex=0;e<this.ms.ac;e++)null!=b[e]&&b[e].mi>c&&(c=b[e].mi,k=j[c],k.firstAtomIndex=e,k.isOrderly=k.act==k.bsAtoms.length()-e,k=this.ms.getDefaultVdwType(c),k!==a&&(JU.Logger.info("Default Van der Waals type for model set to "+
k.getVdwLabel()),a=k));JU.Logger.info(d+" atoms created")},"J.api.JmolAdapter,~O,~B");c(b,"getAtomSiteBase",function(a){for(var d=0,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var c=this.ms.at[b];!JM.AtomCollection.isDeleted(c)&&c.atomSite>d&&(d=c.atomSite)}return d},"JU.BS");c(b,"addJmolDataProperties",function(a,d){if(null!=d){var b=d.get("properties");if(!b.containsKey("spinZ"))for(var c=a.bsAtoms,e=c.cardinality(),f,b=b.entrySet().iterator();b.hasNext()&&((f=b.next())||1);){var h=f.getKey(),k=
f.getValue();if(k.length!=e)break;var m=h.startsWith("property_")?1715472409:JS.T.getTokFromName(h);switch(m){default:if(JS.T.tokAttr(m,2048)){this.vwr.setAtomProperty(c,m,0,0,null,k,null);break}case 1111492629:case 1111492630:case 1111492631:h="property_"+h;case 1715472409:this.vwr.setData(h,x(-1,[h,k,c,Integer.$valueOf(1)]),0,0,0,0,0)}}}},"JM.Model,java.util.Map");c(b,"getPdbCharge",function(a,d){return a.equals("ARG")&&d.equals("NH1")||a.equals("LYS")&&d.equals("NZ")||a.equals("HIS")&&d.equals("ND1")?
1:0},"~S,~S");c(b,"addAtom",function(a,d,b,c,e,f,h){var k=d.getSymmetry(),m=d.getAtomSite()+e,j=d.getPartialCharge(),p=d.getTensors(),q=d.getOccupancy(),r=d.getBfactor(),u=d.getXYZ(),n=d.getIsHetero(),s=0>d.getPart(),v=d.getSerial(),x=d.getSeqID(),w=d.getVib();e=d.getAltLoc();var y=d.getRadius();d=d.getBondRadius();var z=0,A=null;if(null!=b){var B;if(0<=(B=b.indexOf("\x00")))A=b.substring(B+1),b=b.substring(0,B);a&&(0<=b.indexOf("*")&&(b=b.$replace("*","'")),z=this.vwr.getJBR().lookupSpecialAtomID(b),
2==z&&"CA".equalsIgnoreCase(h)&&(z=0))}a=this.ms.addAtom(this.iModel,this.nullGroup,c,b,A,v,x,m,u,y,w,f,j,q,r,p,n,s,z,k,d);a.altloc=e;return a},"~B,J.api.JmolAdapterAtomIterator,~S,~N,~N,~N,~S");c(b,"checkNewGroup",function(a,d,b,c,e,f,h){d!=this.currentChainID&&(this.currentChainID=d,this.currentChain=this.getOrAllocateChain(this.model,d),this.currentGroupInsertionCode="\uffff",this.currentGroupSequenceNumber=-1,this.currentGroup3="xxxx",this.isNewChain=!0);d=null==b?null:b.intern();if(c!=this.currentGroupSequenceNumber||
e!=this.currentGroupInsertionCode||d!==this.currentGroup3){0<this.groupCount&&f&&(this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain&&!h?1:0),this.jbr.setHaveHsAlready(!1));this.currentGroupSequenceNumber=c;this.currentGroupInsertionCode=e;for(this.currentGroup3=d;this.groupCount>=this.group3Of.length;)this.chainOf=JU.AU.doubleLength(this.chainOf),this.group3Of=JU.AU.doubleLengthS(this.group3Of),this.seqcodes=JU.AU.doubleLengthI(this.seqcodes),this.firstAtomIndexes=JU.AU.doubleLengthI(this.firstAtomIndexes);
this.firstAtomIndexes[this.groupCount]=this.ms.ac;this.chainOf[this.groupCount]=this.currentChain;this.group3Of[this.groupCount]=b;this.seqcodes[this.groupCount]=JM.Group.getSeqcodeFor(c,e);++this.groupCount}},"J.api.JmolAdapter,~N,~S,~N,~S,~B,~B");c(b,"getOrAllocateChain",function(a,d){var b=a.getChain(d);if(null!=b)return b;a.chainCount==a.chains.length&&(a.chains=0==a.chainCount?Array(2):JU.AU.doubleLength(a.chains));return a.chains[a.chainCount++]=new JM.Chain(a,d,0==d||32==d?0:++this.iChain)},
"JM.Model,~N");c(b,"iterateOverAllNewBonds",function(a){for(var d=this.isMutate&&!this.vwr.getBoolean(603979894),b=!1;a.hasNext();){var c=a.getEncodedOrder(),e=d?1:c,c=this.bondAtoms(a.getAtomUniqueID1(),a.getAtomUniqueID2(),e);null!=c&&(1<e&&(1025!=e&&1041!=e)&&(b=!0),e=a.getPymolRadius(),0<e&&c.setMad(fa(2E3*e)),e=a.getColix(),0<=e&&(c.colix=e))}b&&(this.ms.someModelsHaveSymmetry&&!this.vwr.getBoolean(603979794))&&JU.Logger.info('ModelSet: use "set appletSymmetryToBonds TRUE " to apply the file-based multiple bonds to symmetry-generated atoms.')},
"J.api.JmolAdapterBondIterator");c(b,"bondAtoms",function(a,d,b){var c=this.htAtomMap.get(a);if(null==c)return JU.Logger.error("bondAtoms cannot find atomUid1?:"+a),null;a=this.htAtomMap.get(d);if(null==a)return JU.Logger.error("bondAtoms cannot find atomUid2?:"+d),null;if(c.isBonded(a))return null;1025==b||1041==b?(d=c.getModelIndex(),d!=this.lastModel&&(this.lastModel=d,d=this.ms.getModelAuxiliaryInfo(d),this.isMOL2D=this.is2D||null!=d&&"2D".equals(d.get("dimension"))),b=this.ms.bondMutually(c,
a,this.isMOL2D?b:513,this.ms.getDefaultMadFromOrder(1),0),this.isMOL2D&&(null==this.vStereo&&(this.vStereo=new JU.Lst),this.vStereo.addLast(b))):(b=this.ms.bondMutually(c,a,b,this.ms.getDefaultMadFromOrder(b),0),b.isAromatic()&&(this.ms.someModelsHaveAromaticBonds=!0));this.ms.bondCount==this.ms.bo.length&&(this.ms.bo=JU.AU.arrayCopyObject(this.ms.bo,this.ms.bondCount+250));this.ms.setBond(this.ms.bondCount++,b);return b},"~O,~O,~N");c(b,"initializeUnitCellAndSymmetry",function(){this.someModelsAreModulated&&
null==this.ms.bsModulated&&(this.ms.bsModulated=new JU.BS);var a=null!=this.modelSet0&&null!=this.modelSet0.unitCells;if(this.someModelsHaveUnitcells||a){this.ms.unitCells=Array(this.ms.mc);this.ms.haveUnitCells=!0;for(var d=0,b=0;d<this.ms.mc;d++){var c=this.ms.getModelAuxiliaryInfo(d);if(a&&d<this.baseModelCount)this.ms.unitCells[d]=this.modelSet0.unitCells[d];else if(null!=c.get("spaceGroupIndex")){this.ms.unitCells[d]=J.api.Interface.getSymmetry(this.vwr,"file");c=null;if(this.isTrajectory){var e=
this.ms.getInfoM("unitCells");null!=e&&(c=e.get(b++))}this.ms.unitCells[d].setSymmetryInfoFromFile(this.ms,d,c)}}}if(this.appendNew&&this.ms.someModelsHaveSymmetry){this.ms.getAtoms(1088421903,null);a=this.ms.at;d=this.baseAtomIndex;b=-1;for(c=0;d<this.ms.ac;d++){if(a[d].mi!=b){b=a[d].mi;c=this.baseAtomIndex+this.ms.getInfoI(b,"presymmetryAtomIndex");if(0>c)break;e=this.ms.getInfoI(b,"presymmetryAtomCount");this.ms.am[b].auxiliaryInfo.put("presymmetryAtomIndex",Integer.$valueOf(c));this.ms.setInfo(b,
"asymmetricUnit",this.ms.am[b].bsAsymmetricUnit=JU.BSUtil.newBitSet2(c,c+e));c+=e}d>=c&&this.ms.bsSymmetry.set(d)}}if(this.appendNew&&this.ms.someModelsHaveFractionalCoordinates){a=this.ms.at;b=-1;c=null;e=!1;for(d=this.baseAtomIndex;d<this.ms.ac;d++)if(a[d].mi!=b&&(b=a[d].mi,c=this.ms.getUnitCell(b),e=null!=c&&c.getCoordinatesAreFractional()),e){var f=null==this.ms.getModulation(d)?c:a[d].getUnitCell();f.toCartesian(f.toSupercell(a[d]),!1)}for(d=this.baseModelIndex;d<this.ms.mc;d++)this.ms.isTrajectory(d)&&
this.ms.trajectory.setUnitCell(d)}});c(b,"initializeBonding",function(){var a=this.ms.mc,d=this.ms.am,b=0,c=this.ms.getInfoM("bsExcludeBonding");null==c&&(c=null==this.ms.getInfoM(JV.JC.getBoolName(3))?null:new JU.BS,null!=c&&this.ms.setPdbConectBonding(this.baseAtomIndex,this.baseModelIndex,c));var e=this.vwr.getBoolean(603979794),f=this.vwr.getBoolean(603979798),h=this.vwr.getBoolean(603979848),k=null,m=!1;if(!this.noAutoBond)for(var j=this.baseModelIndex;j<a;j++){var b=d[j].bsAtoms.cardinality(),
p=this.ms.getInfoI(j,"initialBondCount"),q=d[j].isBioModel;0>p&&(p=this.ms.bondCount);if(h||f&&(0==p||q&&null==this.jmolData&&(this.ms.getMSInfoB("havePDBHeaderName")||p<w(b/2))||this.ms.getInfoB(j,"hasSymmetry")&&!e&&!this.ms.getInfoB(j,"hasBonds")))if(m=!0,this.merging||1<a)null==k&&(k=JU.BS.newN(this.ms.ac)),(j==this.baseModelIndex||!this.isTrajectory)&&k.or(d[j].bsAtoms)}this.modulationOn&&this.ms.setModulation(null,!0,this.modulationTUV,!1);m?(this.ms.autoBondBs4(k,k,c,null,this.ms.defaultCovalentMad,
this.vwr.getBoolean(603979872),null),JU.Logger.info("ModelSet: autobonding; use  autobond=false  to not generate bonds automatically")):JU.Logger.info("ModelSet: not autobonding; use  forceAutobond=true  to force automatic bond creation")});c(b,"finalizeGroupBuild",function(){this.groups=Array(this.groupCount);if(this.merging)for(var a=0;a<this.$mergeGroups.length;a++)(this.groups[a]=this.$mergeGroups[a]).chain.model.ms=this.ms;for(a=this.baseGroupIndex;a<this.groupCount;++a)this.distinguishAndPropagateGroup(a,
this.chainOf[a],this.group3Of[a],this.seqcodes[a],this.firstAtomIndexes[a],(a==this.groupCount-1?this.ms.ac:this.firstAtomIndexes[a+1])-1);if(null!=this.group3Lists){this.ms.msInfo.put("group3Lists",this.group3Lists);this.ms.msInfo.put("group3Counts",this.group3Counts);for(a=0;a<this.group3Counts.length;a++)null==this.group3Counts[a]&&(this.group3Counts[a]=F(0,0))}});c(b,"distinguishAndPropagateGroup",function(a,d,b,c,e,f){if(f<e)throw new NullPointerException;var h=null==b||null==this.jbr?null:this.jbr.distinguishAndPropagateGroup(d,
b,c,e,f,this.specialAtomIndexes,this.ms.at);null==h?(h=(new JM.Group).setGroup(d,b,c,e,f),null!=this.jbr&&(h.groupID=this.jbr.getGroupID(b)),c="o>"):c=h.isProtein()?"p>":h.isNucleic()?"n>":h.isCarbohydrate()?"c>":"o>";null!=b&&(this.countGroup(this.ms.at[e].mi,c,b),h.isNucleic()&&(b=null==this.htGroup1?null:this.htGroup1.get(b),null!=b&&(h.group1=b.charAt(0))));this.groups[a]=d.addGroup(h,a);for(a=f+1;--a>=e;)this.ms.at[a].group=h},"~N,JM.Chain,~S,~N,~N,~N");c(b,"countGroup",function(a,d,b){var c=
a+1;if(!(null==this.group3Lists||null==this.group3Lists[c])){var e=(b+"   ").substring(0,3),f=this.group3Lists[c].indexOf(e);0>f&&(this.group3Lists[c]+=",["+e+"]",f=this.group3Lists[c].indexOf(e),this.group3Counts[c]=JU.AU.arrayCopyI(this.group3Counts[c],this.group3Counts[c].length+10));this.group3Counts[c][w(f/6)]++;f=this.group3Lists[c].indexOf(",["+e);0<=f&&(this.group3Lists[c]=this.group3Lists[c].substring(0,f)+d+this.group3Lists[c].substring(f+2));0<=a&&this.countGroup(-1,d,b)}},"~N,~S,~S");
c(b,"freeze",function(){this.htAtomMap.clear();this.ms.ac<this.ms.at.length&&this.ms.growAtomArrays(this.ms.ac);this.ms.bondCount<this.ms.bo.length&&(this.ms.bo=JU.AU.arrayCopyObject(this.ms.bo,this.ms.bondCount));for(var a=5;0<--a;){this.ms.numCached[a]=0;for(var d=this.ms.freeBonds[a],b=d.length;0<=--b;)d[b]=null}this.ms.setAtomNamesAndNumbers(0,this.baseAtomIndex,this.modelSet0,!1);this.findElementsPresent();this.ms.resetMolecules();this.currentChain=this.model=null;!this.ms.haveBioModels||this.isPyMOLsession||
this.isMutate?this.ms.freezeModels():(a=this.vwr.getBoolean(603979826),a=this.ms.calculateStructuresAllExcept(this.structuresDefinedInFile,a,!1,!0,!0,a,1405E3<=JV.JC.versionInt&&null==this.ms.getInfoM("DSSP1")?2:1),0<a.length&&JU.Logger.info(a))});c(b,"findElementsPresent",function(){this.ms.elementsPresent=Array(this.ms.mc);for(var a=0;a<this.ms.mc;a++)this.ms.elementsPresent[a]=JU.BS.newN(64);for(a=this.ms.ac;0<=--a;){var d=this.ms.at[a];if(null!=d){var b=d.getAtomicAndIsotopeNumber();b>=JU.Elements.elementNumberMax&&
(b=JU.Elements.elementNumberMax+JU.Elements.altElementIndexFromNumber(b));this.ms.elementsPresent[d.mi].set(b)}}});c(b,"setupMinimization",function(){this.initialize2DMin();var a=new JU.V3,d=1;if(null!=this.vStereo){var b=this.vStereo.size();a:for(;0<=--b;)for(var c=this.vStereo.get(b),e=c.atom1,f=e.bonds,h=e.getBondCount();0<=--h;){var k=f[h];if(k!==c&&(k=k.getOtherAtom(e),a.sub2(k,e),0.1>Math.abs(a.x))){1025==c.order==0>a.y&&(d=-1);break a}}}this.set2dZ(a,d);if(null!=this.vStereo){a=JU.BSUtil.newBitSet2(this.baseAtomIndex,
this.ms.ac);for(b=this.vStereo.size();0<=--b;){c=this.vStereo.get(b);d=1025==c.order?3:-3;c.order=1;6>c.atom1.getBondCount()&&(c.atom2.z!=c.atom1.z&&0>d==c.atom2.z<c.atom1.z)&&(d/=3);e=JU.JmolMolecule.getBranchBitSet(this.ms.at,c.atom2.i,a,null,c.atom1.i,!1,!0);e.set(c.atom2.i);for(h=e.nextSetBit(0);0<=h;h=e.nextSetBit(h+1))this.ms.at[h].z+=d;c.atom2.x=(c.atom1.x+c.atom2.x)/2;c.atom2.y=(c.atom1.y+c.atom2.y)/2}this.vStereo=null}this.is2D=!1});c(b,"initialize2DMin",function(){for(var a=0,d=0,b=-1,c=
this.baseAtomIndex,e=this.ms.ac,f=c;f<e;f++){var h=this.ms.at[f],k=h.getModelIndex();k!=b&&(b=k,this.ms.setInfo(k,"dimension","3D"));k=h.bonds;if(null!=k)for(var m=k.length;0<=--m;)if(null!=k[m]){var j=k[m].getOtherAtom(h);1!=j.getAtomNumber()&&j.getIndex()>f&&(a+=j.distance(h),d++)}}if(0!=d){a=1.45/(a/d);for(f=c;f<e;f++)this.ms.at[f].scale(a)}});c(b,"set2dZ",function(a,d){var b=this.baseAtomIndex,c=this.ms.ac,e=JU.BS.newN(c),f=new JU.BS,h=JU.V3.new3(0,1,0),k=new JU.V3,m=new JU.BS;for(m.setBits(b,
c);b<c;b++)!e.get(b)&&!f.get(b)&&(f=this.getBranch2dZ(b,-1,m,f,a,h,k,d),e.or(f))},"JU.V3,~N");c(b,"getBranch2dZ",function(a,d,b,c,e,f,h,k){c=JU.BS.newN(this.ms.ac);if(0>a)return c;b=JU.BSUtil.copy(b);0<=d&&b.clear(d);JM.ModelLoader.setBranch2dZ(this.ms.at[a],c,b,e,f,h,k);return c},"~N,~N,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3,~N");b.setBranch2dZ=c(b,"setBranch2dZ",function(a,d,b,c,e,f,h){var k=a.i;if(b.get(k)&&(b.clear(k),d.set(k),null!=a.bonds))for(k=a.bonds.length;0<=--k;){var m=a.bonds[k];m.isHydrogen()||
(m=m.getOtherAtom(a),JM.ModelLoader.setAtom2dZ(a,m,c,e,f,h),JM.ModelLoader.setBranch2dZ(m,d,b,c,e,f,h))}},"JM.Atom,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3,~N");b.setAtom2dZ=c(b,"setAtom2dZ",function(a,d,b,c,e,f){b.sub2(d,a);b.z=0;b.normalize();e.cross(c,b);b=Math.acos(b.dot(c));f=0.4*-f*Math.sin(4*b);d.z=a.z+f},"JM.Atom,JM.Atom,JU.V3,JU.V3,JU.V3,~N");c(b,"finalizeShapes",function(){this.ms.sm=this.vwr.shm;this.ms.sm.setModelSet(this.ms);this.ms.setBsHidden(this.vwr.slm.getHiddenSet());this.merging||this.ms.sm.resetShapes(!1);
this.ms.sm.loadDefaultShapes(this.ms);this.ms.someModelsHaveAromaticBonds&&this.vwr.getBoolean(603979944)&&this.ms.assignAromaticBondsBs(!1,null);this.merging&&1==this.baseModelCount&&this.ms.sm.setShapePropertyBs(6,"clearModelIndex",null,null)});c(b,"undeleteAtom",function(a){this.ms.at[a].valence=0},"~N");b.createAtomDataSet=c(b,"createAtomDataSet",function(a,d,b,c,e){if(null==c)return null;var f=a.getModelAdapter(),h=new JU.P3,k=d.at,m=a.getFloat(570425363);if(null!=d.unitCells)for(var j=e.nextSetBit(0);0<=
j;j=e.nextSetBit(j+1))if(null!=k[j].atomSymmetry){m=-m;break}for(var j=-1,p=0,q=JU.BSUtil.cardinalityOf(e)==a.ms.ac,r=f.getAtomIterator(c);r.hasNext();){var u=r.getXYZ();if(!Float.isNaN(u.x+u.y+u.z))if(1145047049==b){j=e.nextSetBit(j+1);if(0>j)break;p++;JU.Logger.debugging&&JU.Logger.debug("atomIndex = "+j+": "+k[j]+" --\x3e ("+u.x+","+u.y+","+u.z);d.setAtomCoord(j,u.x,u.y,u.z)}else{h.setT(u);u=JU.BS.newN(d.ac);d.getAtomsWithin(m,h,u,-1);u.and(e);if(q)if(p=JU.BSUtil.cardinalityOf(u),0==p){JU.Logger.warn("createAtomDataSet: no atom found at position "+
h);continue}else 1<p&&JU.Logger.debugging&&JU.Logger.debug("createAtomDataSet: "+p+" atoms found at position "+h);switch(b){case 1145047055:var n=r.getVib();if(null==n)continue;JU.Logger.debugging&&JU.Logger.debug("xyz: "+h+" vib: "+n);d.setAtomCoords(u,1145047055,n);break;case 1128269825:d.setAtomProperty(u,b,0,r.getOccupancy(),null,null,null);break;case 1111492619:d.setAtomProperty(u,b,0,r.getPartialCharge(),null,null,null);break;case 1111492620:d.setAtomProperty(u,b,0,r.getBfactor(),null,null,
null)}}}switch(b){case 1145047055:d=f.getAtomSetName(c,0);JU.Logger.info("_vibrationName = "+d);a.setStringProperty("_vibrationName",d);break;case 1145047049:if(JU.Logger.info(p+" atom positions read"),d.recalculateLeadMidpointsAndWingVectors(-1),p==d.ac)return"boundbox {*};reset"}return null},"JV.Viewer,JM.ModelSet,~N,~O,JU.BS")});s("JM");B(["JM.BondCollection"],"JM.ModelSet","java.util.Hashtable JU.A4 $.AU $.BS $.Lst $.M3 $.M4 $.Measure $.P3 $.P4 $.PT $.Quat $.SB $.V3 J.api.Interface J.atomdata.RadiusData J.bspt.Bspf J.c.PAL $.VDW JM.Atom $.AtomIteratorWithinModel $.AtomIteratorWithinModelSet $.HBond $.Model $.StateScript JS.ScriptCompiler JU.BSUtil $.BoxInfo $.Edge $.Elements $.Escape $.JmolMolecule $.Logger JV.JC".split(" "),
function(){var b=n(function(){this.haveMultipleChains=this.haveBioModels=!1;this.am=this.modelSetName=this.bsSymmetry=null;this.mc=0;this.unitCells=null;this.haveUnitCells=!1;this.elementsPresent=this.frameTitles=this.modelNames=this.modelNumbersForAtomLabel=this.modelFileNumbers=this.modelNumbers=this.closest=null;this.isXYZ=!1;this.msInfo=this.modelSetProperties=null;this.isBbcageDefault=this.someModelsHaveFractionalCoordinates=this.someModelsHaveAromaticBonds=this.someModelsHaveSymmetry=!1;this.stateScripts=
this.boxInfo=this.bboxAtoms=this.bboxModels=null;this.thisStateModel=0;this.selectedMolecules=this.vibrationSteps=null;this.showRebondTimes=!0;this.sm=this.bsAll=null;this.proteinStructureTainted=!1;this.defaultBBox=this.vTemp=this.mat4t=this.mat4=this.matInv=this.matTemp=this.ptTemp2=this.ptTemp1=this.ptTemp=this.vOrientations=this.htPeaks=null;this.echoShapeActive=this.haveJmolDataFrames=!1;this.translations=this.modelSetTypeName=null;this.maxBondWarned=!1;v(this,arguments)},JM,"ModelSet",JM.BondCollection);
A(b,function(a,b){M(this,JM.ModelSet,[]);this.vwr=a;this.modelSetName=b;this.selectedMolecules=new JU.BS;this.stateScripts=new JU.Lst;this.boxInfo=new JU.BoxInfo;this.boxInfo.addBoundBoxPoint(JU.P3.new3(-10,-10,-10));this.boxInfo.addBoundBoxPoint(JU.P3.new3(10,10,10));this.am=Array(1);this.modelNumbers=F(1,0);this.modelFileNumbers=F(1,0);this.modelNumbersForAtomLabel=Array(1);this.modelNames=Array(1);this.frameTitles=Array(1);this.closest=Array(1);this.ptTemp=new JU.P3;this.ptTemp1=new JU.P3;this.ptTemp2=
new JU.P3;this.matTemp=new JU.M3;this.matInv=new JU.M3;this.mat4=new JU.M4;this.mat4t=new JU.M4;this.vTemp=new JU.V3;this.setupBC()},"JV.Viewer,~S");c(b,"getBoxInfo",function(){return this.boxInfo});c(b,"releaseModelSet",function(){this.am=null;this.mc=0;this.unitCells=this.bsAll=this.bsSymmetry=this.am=this.closest[0]=null;this.releaseModelSetBC()});c(b,"getEchoStateActive",function(){return this.echoShapeActive});c(b,"setEchoStateActive",function(a){this.echoShapeActive=a},"~B");c(b,"getModelSetTypeName",
function(){return this.modelSetTypeName});c(b,"getModelNumberIndex",function(a,b,c){if(b){for(b=0;b<this.mc;b++)if(this.modelNumbers[b]==a||1E6>a&&this.modelNumbers[b]==1E6+a)return b;return-1}if(1E6>a)return a;for(b=0;b<this.mc;b++)if(this.modelFileNumbers[b]==a)return c&&this.isTrajectory(b)&&this.setTrajectory(b),b;return-1},"~N,~B,~B");c(b,"getModelDataBaseName",function(a){for(var b=0;b<this.mc;b++)if(a.equals(this.am[b].bsAtoms))return this.getInfo(b,"dbName");return null},"JU.BS");c(b,"setTrajectory",
function(a){0<=a&&(this.isTrajectory(a)&&this.at[this.am[a].firstAtomIndex].mi!=a)&&this.trajectory.setModel(a)},"~N");c(b,"getBitSetTrajectories",function(){return null==this.trajectory?null:this.trajectory.getModelsSelected()});c(b,"setTrajectoryBs",function(a){if(null!=this.trajectory)for(var b=0;b<this.mc;b++)a.get(b)&&this.setTrajectory(b)},"JU.BS");c(b,"morphTrajectories",function(a,b,c){0<=a&&(0<=b&&this.isTrajectory(a)&&this.isTrajectory(b))&&this.trajectory.morph(a,b,c)},"~N,~N,~N");c(b,
"getTranslation",function(a){return null==this.translations||a>=this.translations.length?null:this.translations[a]},"~N");c(b,"translateModel",function(a,b){if(null==b){var c=this.getTranslation(a);null!=c&&(b=JU.P3.newP(c),b.scale(-1),this.translateModel(a,b),this.translations[a]=null)}else{if(null==this.translations||this.translations.length<=a)this.translations=Array(this.mc);null==this.translations[a]&&(this.translations[a]=new JU.P3);this.translations[a].add(b);for(var c=this.am[a].bsAtoms,e=
c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))this.at[e].add(b)}},"~N,JU.T3");c(b,"getFrameOffsets",function(a,b){if(null==a){if(b)for(var c=this.mc;0<=--c;){var e=this.am[c];!e.isJmolDataFrame&&!e.isTrajectory&&this.translateModel(e.modelIndex,null)}return null}if(0>a.nextSetBit(0))return null;if(b){for(var f=JU.BSUtil.copy(a),h=null,k=new JU.P3,c=0;c<this.mc;c++){e=this.am[c];if(!e.isJmolDataFrame&&!e.isTrajectory){var m=f.nextSetBit(0);e.bsAtoms.get(m)&&(null==h?h=JU.P3.newP(this.at[m]):(k.sub2(h,this.at[m]),
this.translateModel(c,k)))}f.andNot(e.bsAtoms)}return null}f=Array(this.mc);for(c=this.mc;0<=--c;)f[c]=new JU.P3;for(var h=-1,k=0,m=null,j=null!=this.trajectory&&this.trajectory.steps.size()==this.mc,p=j?this.mc:1,e=0;e<p;e++){j&&this.setTrajectory(e);for(c=0;c<=this.ac;c++)if(!(c<this.ac&&JM.AtomCollection.isDeleted(this.at[c]))){if(c==this.ac||this.at[c].mi!=h){0<k&&(m.scale(-1/k),0!=h&&m.sub(f[0]),k=0);if(c==this.ac)break;h=this.at[c].mi;m=f[h]}a.get(c)&&(m.add(this.at[c]),k++)}}f[0].set(0,0,0);
return f},"JU.BS,~B");c(b,"getAtoms",function(a,b){switch(a){default:return JU.BSUtil.andNot(this.getAtomBitsMaybeDeleted(a,b),this.vwr.slm.bsDeleted);case 1073742358:var c=b.intValue(),e=this.getModelNumberIndex(c,!0,!0);return 0>e&&0<c?new JU.BS:this.vwr.getModelUndeletedAtomsBitSet(e);case 1275203608:return c=x(-1,[null,null,null]),this.vwr.shm.getShapePropertyData(21,"getCenters",c),null==c[1]?new JU.BS:c[1]}},"~N,~O");c(b,"findNearestAtomIndex",function(a,b,c,e){if(0==this.ac)return-1;this.closest[0]=
null;if(this.vwr.am.splitFrame){a=this.vwr.am.setSplitFrameMouse(a);var f=this.vwr.am.getSplitFrameAtoms(!1);null==c?c=f:(c=JU.BSUtil.copy(c),c.or(f))}this.g3d.isAntialiased()&&(a<<=1,b<<=1);this.findNearest2(a,b,this.closest,c,e);this.sm.findNearestShapeAtomIndex(a,b,this.closest,c);a=null==this.closest[0]?-1:this.closest[0].i;this.closest[0]=null;return a},"~N,~N,JU.BS,~N");c(b,"calculatePointGroup",function(a,b){return this.calculatePointGroupForFirstModel(a,!1,!1,null,0,0,null,b,null)},"JU.BS,JU.P3");
c(b,"getPointGroupInfo",function(a,b){return this.calculatePointGroupForFirstModel(a,!1,!0,b,0,0,null,null,null)},"JU.BS,~S");c(b,"getPointGroupAsString",function(a,b,c,e,f,h,k){return this.calculatePointGroupForFirstModel(a,!0,!1,b,c,e,f,h,k)},"JU.BS,~S,~N,~N,~A,JU.P3,~S");c(b,"calculatePointGroupForFirstModel",function(a,b,c,e,f,h,k,m,j){var p=this.pointGroup,q=null,r=!1,u=!1,n=!1,s=null!=k,v=this.vwr.am.cmi;if(!s)if(k=null==a?-1:a.nextSetBit(0),0>v&&0<=k&&(v=this.at[k].mi),0>v&&(v=this.vwr.getVisibleFramesBitSet().nextSetBit(0),
a=null),q=this.vwr.getModelUndeletedAtomsBitSet(v),n=null!=a&&q.cardinality()!=a.cardinality(),null!=a&&q.and(a),k=q.nextSetBit(0),0>k&&(q=this.vwr.getModelUndeletedAtomsBitSet(v),k=q.nextSetBit(0)),u=this.vwr.shm.getShapePropertyIndex(18,"mad",k),r=null!=u&&0!=u.intValue()||this.vwr.tm.vibrationOn,u=null!=e&&0<=e.toUpperCase().indexOf(":POLY")){p=x(-1,[Integer.$valueOf(k),null]);this.vwr.shm.getShapePropertyData(21,"points",p);k=p[1];if(null==k)return null;q=null;r=!1;p=null}else k=this.at;var w;
if(null!=e&&0<=(w=e.indexOf(":")))e=e.substring(0,w);if(null!=e&&0<=(w=e.indexOf(".")))f=JU.PT.parseInt(e.substring(w+1)),0>f&&(f=0),e=e.substring(0,w);w=null;if(0>this.getJmolDataFrameInt(f,1095241729)||null==(w=this.getUnitCell(f)))w=J.api.Interface.getSymmetry(this.vwr,"calcPG");p=w.setPointGroup(this.vwr,p,m,k,q,r,s?0:this.vwr.getFloat(570425382),this.vwr.getFloat(570425384),null==q?k.length:q.cardinality(),n);!u&&!s&&(this.pointGroup=p);if(!b&&!c)return p.getPointGroupName();b=p.getPointGroupInfo(v,
j,c,e,f,h);return c?b:(1<this.mc?"frame "+this.getModelNumberDotted(v)+"; ":"")+b},"JU.BS,~B,~B,~S,~N,~N,~A,JU.P3,~S");c(b,"getDefaultStructure",function(a,b){return this.haveBioModels?this.bioModelset.getAllDefaultStructures(a,b):""},"JU.BS,JU.BS");c(b,"deleteModelBonds",function(a){a=this.getModelAtomBitSetIncludingDeleted(a,!1);this.makeConnections(0,3.4028235E38,131071,12291,a,a,null,!1,!1,0)},"~N");c(b,"makeConnections",function(a,b,c,e,f,h,k,m,j,p){this.moleculeCount=0;var q=1073741852==e&&
2048!=c?new JU.SB:null;a=this.makeConnections2(a,b,c,e,f,h,k,m,j,p,q);null!=q&&this.addStateScript(q.toString(),null,null,null,null,!1,!0);return a},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");c(b,"setPdbConectBonding",function(a,b,c){for(var e=this.vwr.getMadBond();b<this.mc;b++){var f=this.getInfo(b,"PDB_CONECT_bonds");if(null!=f){var h=f.size();this.setInfo(b,"initialBondCount",Integer.$valueOf(h));var k=this.getInfo(b,"PDB_CONECT_firstAtom_count_max"),m=k[0]+a,j=m+k[1];j>this.atomSerials.length&&
(j=this.atomSerials.length);for(var k=k[2],p=F(k+1,0),q=m;q<j;q++)if(0<(m=this.atomSerials[q]))p[m]=q+1;for(j=0;j<h;j++){var m=f.get(j),q=m[0],r=m[1],m=m[2];if(!(0>q||0>r||q>k||r>k))if(q=p[q]-1,r=p[r]-1,!(0>q||0>r)){var u=this.at[q],n=this.at[r];null!=c&&(u.isHetero()&&c.set(q),n.isHetero()&&c.set(r));if(u.altloc==n.altloc||"\x00"==u.altloc||"\x00"==n.altloc)this.getOrAddBond(u,n,m,2048==m?1:e,null,0,!1)}}}}},"~N,~N,JU.BS");c(b,"deleteAllBonds",function(){this.moleculeCount=0;for(var a=this.stateScripts.size();0<=
--a;)this.stateScripts.get(a).isConnect()&&this.stateScripts.removeItemAt(a);this.deleteAllBonds2()});c(b,"includeAllRelatedFrames",function(a,b){for(var c=0,e=0;e<this.mc;e++){var f=this.isTrajectory(e),h=f&&a.get(c=this.am[e].trajectoryBaseIndex);if(a.get(e)){if(f&&!h){a.set(c);this.includeAllRelatedFrames(a,!1);break}}else f||this.isJmolDataFrame(e)&&a.get(this.am[e].dataSourceFrame)?a.set(e):b&&0<=this.am[e].dataSourceFrame&&a.set(this.am[e].dataSourceFrame)}},"JU.BS,~B");c(b,"deleteModels",function(a){this.includeAllRelatedFrames(a,
!1);var b=a.cardinality();if(0==b)return null;this.moleculeCount=0;null!=this.msInfo&&this.msInfo.remove("models");for(var c=new JU.BS,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))this.clearDataFrameReference(e),c.or(this.am[e].bsAtoms);var f;if(b==this.mc)return f=this.getModelAtomBitSetIncludingDeleted(-1,!0),this.vwr.zap(!0,!1,!1),f;this.validateBspf(!1);f=new JU.BS;for(var h=!0,k=!1,m=new JU.BS,j=c.nextSetBit(0),e=0;e<this.mc;e++)c=this.am[e],e<this.mc-1&&(h=(new Boolean(h&(c.isOrderly||c.bsAtoms.length()<=
j))).valueOf()),a.get(e)?(0<=c.fileIndex&&m.set(c.fileIndex),f.or(this.getModelAtomBitSetIncludingDeleted(e,!1))):0<=c.fileIndex&&m.get(c.fileIndex)&&(k=!0);if(!h||k)return this.vwr.deleteAtoms(f,!1),null;b=Array(this.mc-b);h=this.am;for(k=e=0;e<this.mc;e++)a.get(e)||(c=this.am[e],c.modelIndex=k,b[k++]=c);this.am=b;c=this.mc;m=this.getBondsForSelectedAtoms(f,!0);this.deleteBonds(m,!0);for(k=e=0;e<c;e++)if(a.get(e)){var p=h[e],j=p.act;if(0!=j){var q=p.bsAtoms,p=p.firstAtomIndex;JU.BSUtil.deleteBits(this.bsSymmetry,
q);this.deleteModel(k,q,m);this.deleteModelAtoms(p,j,q);this.vwr.deleteModelAtoms(k,p,j,q);for(var r=c;--r>e;)h[r].fixIndices(k,j,q);this.vwr.shm.deleteShapeAtoms(x(-1,[b,this.at,F(-1,[k,p,j])]),q);this.mc--}}else k++;this.haveBioModels=!1;for(e=this.mc;0<=--e;)this.am[e].isBioModel&&(this.haveBioModels=!0,this.bioModelset.set(this.vwr,this));this.validateBspf(!1);this.bsAll=null;this.resetMolecules();this.isBbcageDefault=!1;this.calcBoundBoxDimensions(null,1);return f},"JU.BS");c(b,"resetMolecules",
function(){this.molecules=this.bsAll=null;this.moleculeCount=0;this.resetChirality()});c(b,"resetChirality",function(){if(this.haveChirality)for(var a=-1,b=this.ac;0<=--b;){var c=this.at[b];null!=c&&(c.setCIPChirality(0),c.mi!=a&&c.mi<this.am.length&&(this.am[a=c.mi].hasChirality=!1))}});c(b,"deleteModel",function(a,b,c){if(!(0>a)){this.modelNumbers=JU.AU.deleteElements(this.modelNumbers,a,1);this.modelFileNumbers=JU.AU.deleteElements(this.modelFileNumbers,a,1);this.modelNumbersForAtomLabel=JU.AU.deleteElements(this.modelNumbersForAtomLabel,
a,1);this.modelNames=JU.AU.deleteElements(this.modelNames,a,1);this.frameTitles=JU.AU.deleteElements(this.frameTitles,a,1);this.thisStateModel=-1;var e=this.getInfoM("group3Lists"),f=this.getInfoM("group3Counts"),h=a+1;if(null!=e&&null!=e[h])for(var k=w(e[h].length/6);0<=--k;)0<f[h][k]&&(f[0][k]-=f[h][k],0==f[0][k]&&(e[0]=e[0].substring(0,6*k)+",["+e[0].substring(6*k+2)));null!=e&&(this.msInfo.put("group3Lists",JU.AU.deleteElements(e,a,1)),this.msInfo.put("group3Counts",JU.AU.deleteElements(f,a,1)));
null!=this.unitCells&&(this.unitCells=JU.AU.deleteElements(this.unitCells,a,1));for(k=this.stateScripts.size();0<=--k;)this.stateScripts.get(k).deleteAtoms(a,c,b)||this.stateScripts.removeItemAt(k)}},"~N,JU.BS,JU.BS");c(b,"setAtomProperty",function(a,b,c,e,f,h,k){switch(b){case 1114249217:case 1112152066:case 1112152071:case 1112152073:case 1112152074:case 1649022989:case 1112152078:if(4<e&&(e=4),null!=h){c=L(this.ac,0);try{var m=a.nextSetBit(0);for(f=0;0<=m;m=a.nextSetBit(m+1))c[m]=h[f++]}catch(j){if(H(j,
Exception))return;throw j;}h=c}case 1112152070:case 1112152076:m=null;c=0;null==h?(16<e&&(e=16.1),0>e&&(e=0),c=w(Math.floor(2E3*e))):m=new J.atomdata.RadiusData(h,0,null,null);this.sm.setShapeSizeBs(JV.JC.shapeTokenIndex(b),c,m,a);return}this.setAPm(a,b,c,e,f,h,k)},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"getFileData",function(a){if(0>a)return"";var b=this.getInfo(a,"fileData");if(null!=b)return b;if(!this.getInfoB(a,"isCIF"))return this.getPDBHeader(a);b=this.vwr.getCifData(a);this.setInfo(a,"fileData",b);
return b},"~N");c(b,"addHydrogens",function(a,b){var c=a.get(0).mi,e=new JU.BS;if(this.isTrajectory(c)||1<this.am[c].getGroupCount())return e;this.growAtomArrays(this.ac+b.length);var f=this.vwr.rd,h=this.getDefaultMadFromOrder(1);this.am[c].resetDSSR(!1);for(var k=0,m=this.am[c].act+1;k<a.size();k++,m++){var j=a.get(k),p=this.addAtom(c,j.group,1,"H"+m,null,m,j.getSeqID(),m,b[k],NaN,null,0,0,100,NaN,null,!1,!1,0,null,NaN);p.setMadAtom(this.vwr,f);e.set(p.i);this.bondAtoms(j,p,1,h,null,0,!1,!1)}this.sm.loadDefaultShapes(this);
return e},"JU.Lst,~A");c(b,"mergeModelArrays",function(a){this.at=a.at;this.bo=a.bo;this.stateScripts=a.stateScripts;this.proteinStructureTainted=a.proteinStructureTainted;this.haveJmolDataFrames=a.haveJmolDataFrames;this.thisStateModel=-1;this.bsSymmetry=a.bsSymmetry;this.modelFileNumbers=a.modelFileNumbers;this.modelNumbersForAtomLabel=a.modelNumbersForAtomLabel;this.modelNames=a.modelNames;this.modelNumbers=a.modelNumbers;this.frameTitles=a.frameTitles;this.haveBioModels=a.haveBioModels;this.someModelsHaveSymmetry=
a.someModelsHaveSymmetry;this.haveMultipleChains=a.haveMultipleChains;this.haveChirality=a.haveChirality;this.boxInfo.setBoundBox(a.boxInfo.bbCorner0,a.boxInfo.bbCorner1,!0,1);null!=this.msInfo&&this.msInfo.remove("models");this.mergeAtomArrays(a)},"JM.ModelSet");c(b,"getUnitCell",function(a){var b=-2147483648==a,c=!b&&0>a;b?a=this.vwr.am.cmi:c&&(a=-1-a);if(0>a||a>=this.mc)return null;this.isTrajectory(a)&&(a=this.am[a].trajectoryBaseIndex);var e=this.am[a].simpleCage,f=null;null!=this.unitCells&&
(a<this.unitCells.length&&null!=this.unitCells[a]&&this.unitCells[a].haveUnitCell())&&(f=this.unitCells[a]);if(null==f&&null==e)b=this.getInfo(a,"unitCellParams"),null!=b&&this.setModelCage(a,this.vwr.getSymTemp().setUnitCellFromParams(b,!1,NaN),!1);else if(null!=f){if(b)return b=this.vwr.getUnitCellAtomIndex(),0<b&&(f=this.getUnitCellForAtom(b)),null==e?this.setModelCagePts(a,f.getUnitCellVectors(),"cage"):e;if(c)return f}if(null==f||null!=e&&!f.isSymmetryCell(e))f=e;return f},"~N");c(b,"setModelCagePts",
function(a,b,c){if(0>a&&0>(a=this.vwr.am.cmi))return null;var e=this.vwr.getSymTemp();try{return this.setModelCage(a,null==b?null:e.getUnitCell(b,!1,c),!0)}catch(f){if(H(f,Exception))return f.printStackTrace(),null;throw f;}},"~N,~A,~S");c(b,"getModelName",function(a){return 1>this.mc?"":0<=a?this.modelNames[a]:this.modelNumbersForAtomLabel[-1-a]},"~N");c(b,"getModelTitle",function(a){a=this.getJmolDataSourceFrame(a);return this.getInfo(a,"title")},"~N");c(b,"getModelFileName",function(a){a=this.getJmolDataSourceFrame(a);
return this.getInfo(a,"fileName")},"~N");c(b,"getModelFileType",function(a){a=this.getJmolDataSourceFrame(a);return this.getInfo(a,"fileType")},"~N");c(b,"setFrameTitle",function(a,b){if("string"==typeof b)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.frameTitles[c]=b;else for(var c=a.nextSetBit(0),e=0;0<=c;c=a.nextSetBit(c+1))e<b.length&&(this.frameTitles[c]=b[e++])},"JU.BS,~O");c(b,"getFrameTitle",function(a){return 0<=a&&a<this.mc?this.frameTitles[a]:""},"~N");c(b,"getModelNumberForAtomLabel",
function(a){return this.modelNumbersForAtomLabel[a]},"~N");c(b,"getGroups",function(){for(var a=0,b=0;b<this.mc;b++)a+=this.am[b].getGroupCount();for(var a=Array(a),c=b=0;b<this.mc;b++)for(var e=0;e<this.am[b].chainCount;e++)for(var f=0;f<this.am[b].chains[e].groupCount;f++)a[c]=this.am[b].chains[e].groups[f],a[c].groupIndex=c,c++;return a});c(b,"getModelIndexFromFileModel",function(a){for(var b=this.mc;0<=--b;)if(this.modelFileNumbers[b]==a)return b;return-1},"~N");c(b,"setCrystallographicDefaults",
function(){return!this.haveBioModels&&!this.haveMultipleChains&&(this.someModelsHaveSymmetry&&this.someModelsHaveFractionalCoordinates||null!=this.getUnitCell(this.vwr.am.cmi))});c(b,"getBoundBoxCenter",function(a){return this.isJmolDataFrame(a)?new JU.P3:(null==this.getDefaultBoundBox()?this.boxInfo:this.defaultBBox).getBoundBoxCenter()},"~N");c(b,"getBoundBoxCornerVector",function(){return this.boxInfo.getBoundBoxCornerVector()});c(b,"getBBoxVertices",function(){return this.boxInfo.getBoundBoxVertices()});
c(b,"setBoundBox",function(a,b,c,e){0==e&&null!=this.msInfo&&(this.msInfo.remove("boundbox"),this.defaultBBox=null,this.isBbcageDefault=!1,this.calcBoundBoxDimensions(null,e=1));this.isBbcageDefault=!1;this.bboxAtoms=this.bboxModels=null;this.boxInfo.setBoundBox(a,b,c,e)},"JU.T3,JU.T3,~B,~N");c(b,"getBoundBoxCommand",function(a){if(!a&&null!=this.bboxAtoms)return"boundbox "+JU.Escape.eBS(this.bboxAtoms);this.ptTemp.setT(this.boxInfo.getBoundBoxCenter());var b=this.boxInfo.getBoundBoxCornerVector();
a=a?"boundbox "+JU.Escape.eP(this.ptTemp)+" "+JU.Escape.eP(b)+"\n#or\n":"";this.ptTemp.sub(b);a+="boundbox corners "+JU.Escape.eP(this.ptTemp)+" ";this.ptTemp.scaleAdd2(2,b,this.ptTemp);b=Math.abs(8*b.x*b.y*b.z);return a+=JU.Escape.eP(this.ptTemp)+" # volume = "+b},"~B");c(b,"findAtomsInRectangle",function(a){for(var b=this.vwr.getVisibleFramesBitSet(),c=new JU.BS,e=this.ac;0<=--e;){var f=this.at[e];JM.AtomCollection.isDeleted(f)||(b.get(f.mi)?f.checkVisible()&&a.contains(f.sX,f.sY)&&c.set(e):e=this.am[f.mi].firstAtomIndex)}return c},
"JU.Rectangle");c(b,"getDefaultVdwType",function(a){return!this.am[a].isBioModel?J.c.VDW.AUTO_BABEL:0==this.am[a].hydrogenCount?J.c.VDW.AUTO_JMOL:J.c.VDW.AUTO_BABEL},"~N");c(b,"setRotationRadius",function(a,b){return this.isJmolDataFrame(a)?(this.am[a].defaultRotationRadius=b,!1):!0},"~N,~N");c(b,"calcRotationRadius",function(a,b,c){if(this.isJmolDataFrame(a))return a=this.am[a].defaultRotationRadius,0==a?10:a;if(c&&null!=this.getDefaultBoundBox())return 1.2*(this.defaultBBox.getMaxDim()/2);if(0==
this.ac)return 10;a=-2;c=0;for(var e=this.ac;0<=--e;){var f=this.at[e];if(!JM.AtomCollection.isDeleted(f))if(this.isJmolDataFrameForAtom(f)){for(a=f.mi;0<=e&&null!=this.at[e]&&this.at[e].mi==a;)e--;e++}else{if(f.mi!=a){a=f.mi;var h=this.am[a].isBioModel?null:this.getUnitCell(a);if(null!=h)for(var k=h.getUnitCellVerticesNoOffset(),h=h.getCartesianOffset(),m=0;8>m;m++)this.ptTemp.setT(k[m]),this.ptTemp.add(h),c=Math.max(c,b.distance(this.ptTemp))}f=b.distance(f)+this.getRadiusVdwJmol(f);f>c&&(c=f)}}return 0==
c?10:c},"~N,JU.P3,~B");c(b,"calcBoundBoxDimensions",function(a,b){null!=a&&0>a.nextSetBit(0)&&(a=null);if(!(null==a&&this.isBbcageDefault||0==this.ac)){if(null==this.getDefaultBoundBox())this.bboxModels=this.getModelBS(this.bboxAtoms=JU.BSUtil.copy(a),!1),this.calcAtomsMinMax(a,this.boxInfo)==this.ac&&(this.isBbcageDefault=!0),null==a&&null!=this.unitCells&&this.calcUnitCellMinMax();else{var c=this.defaultBBox.getBoundBoxVertices();this.boxInfo.reset();for(var e=0;8>e;e++)this.boxInfo.addBoundBoxPoint(c[e])}this.boxInfo.setBbcage(b)}},
"JU.BS,~N");c(b,"getDefaultBoundBox",function(){var a=this.getInfoM("boundbox");null==a?this.defaultBBox=null:(null==this.defaultBBox&&(this.defaultBBox=new JU.BoxInfo),this.defaultBBox.setBoundBoxFromOABC(a));return this.defaultBBox});c(b,"getBoxInfo",function(a,b){if(null==a)return this.boxInfo;var c=new JU.BoxInfo;this.calcAtomsMinMax(a,c);c.setBbcage(b);return c},"JU.BS,~N");c(b,"calcAtomsMinMax",function(a,b){b.reset();for(var c=0,e=null==a,f=e?this.ac-1:a.nextSetBit(0);0<=f;f=e?f-1:a.nextSetBit(f+
1)){c++;var h=this.at[f];null!=h&&!this.isJmolDataFrameForAtom(h)&&b.addBoundBoxPoint(h)}return c},"JU.BS,JU.BoxInfo");c(b,"calcUnitCellMinMax",function(){for(var a=new JU.P3,b=0;b<this.mc;b++){var c=this.unitCells[b];if(null!=c&&c.getCoordinatesAreFractional())for(var e=c.getUnitCellVerticesNoOffset(),c=c.getCartesianOffset(),f=0;8>f;f++)a.add2(c,e[f]),this.boxInfo.addBoundBoxPoint(a)}});c(b,"calcRotationRadiusBs",function(a){for(var b=this.getAtomSetCenter(a),c=0,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+
1)){var f=this.at[e],f=b.distance(f)+this.getRadiusVdwJmol(f);f>c&&(c=f)}return 0==c?10:c},"JU.BS");c(b,"getCenterAndPoints",function(a,b){for(var c,e,f=b?1:0,h=a.size();0<=--h;){var k=a.get(h);c=k[0];y(k[1],"JU.BS")?(e=k[1],f+=Math.min(c.cardinality(),e.cardinality())):f+=Math.min(c.cardinality(),k[1].length)}var m=x(2,f,null);b&&(m[0][0]=new JU.P3,m[1][0]=new JU.P3);for(h=a.size();0<=--h;)if(k=a.get(h),c=k[0],y(k[1],"JU.BS")){e=k[1];for(var k=c.nextSetBit(0),j=e.nextSetBit(0);0<=k&&0<=j;k=c.nextSetBit(k+
1),j=e.nextSetBit(j+1))m[0][--f]=this.at[k],m[1][f]=this.at[j],b&&(m[0][0].add(this.at[k]),m[1][0].add(this.at[j]))}else{e=k[1];for(var p=0,k=c.nextSetBit(0),j=0;0<=k&&j<e.length;k=c.nextSetBit(k+1),j++,p++)b?(m[0][0].add(this.at[k]),m[1][0].add(e[j]),m[0][--f]=this.at[k],m[1][f]=e[j]):(m[0][p]=this.at[k],m[1][p]=e[j])}b&&(m[0][0].scale(1/(m[0].length-1)),m[1][0].scale(1/(m[1].length-1)));return m},"JU.Lst,~B");c(b,"getAtomSetCenter",function(a){for(var b=new JU.P3,c=0,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+
1))this.isJmolDataFrameForAtom(this.at[e])||(c++,b.add(this.at[e]));1<c&&b.scale(1/c);return b},"JU.BS");c(b,"getAverageAtomPoint",function(){return this.getAtomSetCenter(this.vwr.bsA())});c(b,"setAPm",function(a,b,c,e,f,h,k){this.setAPa(a,b,c,e,f,h,k);switch(b){case 1094715420:case 1631586315:this.vwr.getBoolean(603979944)&&this.assignAromaticBondsBs(!0,null)}},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"addStateScript",function(a,b,c,e,f,h,k){var m=this.vwr.am.cmi;h?(this.thisStateModel!=m&&(a="frame "+(0>
m?"all #"+m:this.getModelNumberDotted(m))+";\n  "+a),this.thisStateModel=m):this.thisStateModel=-1;a=new JM.StateScript(this.thisStateModel,a,b,c,e,f,k);a.isValid()&&this.stateScripts.addLast(a);return a},"~S,JU.BS,JU.BS,JU.BS,~S,~B,~B");c(b,"freezeModels",function(){this.haveMultipleChains=this.haveBioModels=!1;for(var a=this.mc;0<=--a;)this.haveBioModels=(new Boolean(this.haveBioModels|this.am[a].freeze())).valueOf(),1<this.am[a].chainCount&&(this.haveMultipleChains=!0)});c(b,"getStructureList",
function(){return this.vwr.getStructureList()});c(b,"getInfoM",function(a){return null==this.msInfo?null:this.msInfo.get(a)},"~S");c(b,"getMSInfoB",function(a){a=this.getInfoM(a);return y(a,Boolean)&&a.booleanValue()},"~S");c(b,"isTrajectory",function(a){return this.am[a].isTrajectory},"~N");c(b,"isTrajectorySubFrame",function(a){return this.am[a].trajectoryBaseIndex!=a},"~N");c(b,"isTrajectoryMeasurement",function(a){return null!=this.trajectory&&this.trajectory.hasMeasure(a)},"~A");c(b,"getModelBS",
function(a,b){var c=new JU.BS,e=0,f=null==a;b=(new Boolean(b&null!=this.trajectory)).valueOf();for(var h=f?0:a.nextSetBit(0);0<=h&&h<this.ac;h=f?h+1:a.nextSetBit(h+1))JM.AtomCollection.isDeleted(this.at[h])||(c.set(e=this.at[h].mi),b&&this.trajectory.getModelBS(e,c),e=this.am[e],e.isOrderly&&(h=e.firstAtomIndex+e.act-1));return c},"JU.BS,~B");c(b,"getIterativeModels",function(a){for(var b=new JU.BS,c=0;c<this.mc;c++)if(a||!this.isJmolDataFrame(c))this.isTrajectorySubFrame(c)||b.set(c);return b},"~B");
c(b,"fillAtomData",function(a,b){if(0!=(b&4)){this.getMolecules();a.bsMolecules=Array(this.molecules.length);a.atomMolecule=F(this.ac,0);for(var c,e=0;e<this.molecules.length;e++){c=a.bsMolecules[e]=this.molecules[e].atomList;for(var f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1))a.atomMolecule[f]=e}}0!=(b&8)?(c=F(1,0),a.hAtomRadius=this.vwr.getVanderwaalsMar(1)/1E3,a.hAtoms=this.calculateHydrogens(a.bsSelected,c,null,512),a.hydrogenAtomCount=c[0]):(a.firstAtomIndex=0>a.modelIndex?null==a.bsSelected?
0:Math.max(0,a.bsSelected.nextSetBit(0)):this.am[a.modelIndex].firstAtomIndex,a.lastModelIndex=a.firstModelIndex=0==this.ac?0:this.at[a.firstAtomIndex].mi,a.modelName=this.getModelNumberDotted(a.firstModelIndex),this.fillADa(a,b))},"J.atomdata.AtomData,~N");c(b,"getModelNumberDotted",function(a){return 1>this.mc||a>=this.mc||0>a?"":JU.Escape.escapeModelFileNumber(this.modelFileNumbers[a])},"~N");c(b,"getModelNumber",function(a){return this.modelNumbers[2147483647==a?this.mc-1:a]},"~N");c(b,"getModelProperty",
function(a,b){var c=this.am[a].properties;return null==c?null:c.getProperty(b)},"~N,~S");c(b,"getModelAuxiliaryInfo",function(a){return 0>a?null:this.am[a].auxiliaryInfo},"~N");c(b,"setInfo",function(a,b,c){0<=a&&a<this.mc&&(null==c?this.am[a].auxiliaryInfo.remove(b):this.am[a].auxiliaryInfo.put(b,c))},"~N,~O,~O");c(b,"getInfo",function(a,b){return 0>a?null:this.am[a].auxiliaryInfo.get(b)},"~N,~S");c(b,"getInfoB",function(a,b){var c=this.am[a].auxiliaryInfo;return null!=c&&c.containsKey(b)&&c.get(b).booleanValue()},
"~N,~S");c(b,"getInfoI",function(a,b){var c=this.am[a].auxiliaryInfo;return null!=c&&c.containsKey(b)?c.get(b).intValue():-2147483648},"~N,~S");c(b,"getInsertionCountInModel",function(a){return this.am[a].insertionCount},"~N");b.modelFileNumberFromFloat=c(b,"modelFileNumberFromFloat",function(a){var b=w(Math.floor(a));for(a=w(Math.floor(1E4*(a-b+1E-5)));0!=a&&0==a%10;)a/=10;return 1E6*b+a},"~N");c(b,"getChainCountInModelWater",function(a,b){if(0>a){for(var c=0,e=this.mc;0<=--e;)c+=this.am[e].getChainCount(b);
return c}return this.am[a].getChainCount(b)},"~N,~B");c(b,"getGroupCountInModel",function(a){if(0>a){a=0;for(var b=this.mc;0<=--b;)a+=this.am[b].getGroupCount();return a}return this.am[a].getGroupCount()},"~N");c(b,"calcSelectedGroupsCount",function(){for(var a=this.vwr.bsA(),b=this.mc;0<=--b;)this.am[b].calcSelectedGroupsCount(a)});c(b,"isJmolDataFrame",function(a){return this.haveJmolDataFrames&&null!=this.am&&0<=a&&a<this.mc&&this.am[a].isJmolDataFrame},"~N");c(b,"isJmolDataFrameForAtom",function(a){return this.haveJmolDataFrames&&
this.am[a.mi].isJmolDataFrame},"JM.Atom");c(b,"getJmolDataFrameIndex",function(a,b){if(null==this.am[a].dataFrames)return-1;var c=this.am[a].dataFrames.get(b);return null==c?-1:c.intValue()},"~N,~S");c(b,"getJmolDataFrameInt",function(a,b){a=this.getJmolDataSourceFrame(a);if(!this.haveJmolDataFrames||null==this.am[a].dataFrames)return-1;for(var c,e=this.am[a].dataFrames.entrySet().iterator();e.hasNext()&&((c=e.next())||1);){var f=c.getValue().intValue();if(this.am[f].jmolFrameTypeInt==b)return f}return-1},
"~N,~N");c(b,"clearDataFrameReference",function(a){for(var b=0;b<this.mc;b++){var c=this.am[b].dataFrames;if(null!=c){for(var e=c.values().iterator();e.hasNext();)e.next().intValue()==a&&e.remove();c.isEmpty()&&(this.am[b].dataFrames=null)}}},"~N");c(b,"getJmolFrameType",function(a){return 0<=a&&a<this.mc?this.am[a].jmolFrameType:"modelSet"},"~N");c(b,"getJmolFrameTypeInt",function(a){return this.haveJmolDataFrames&&0<=a&&a<this.mc?this.am[a].jmolFrameTypeInt:0},"~N");c(b,"getJmolDataSourceFrame",
function(a){return 0<=a&&a<this.mc?this.am[a].dataSourceFrame:-1},"~N");c(b,"saveModelOrientation",function(a,b){this.am[a].orientation=b},"~N,JM.Orientation");c(b,"getModelOrientation",function(a){return this.am[a].orientation},"~N");c(b,"getPDBHeader",function(a){return this.am[a].isBioModel?this.am[a].getFullPDBHeader():this.getFileHeader(a)},"~N");c(b,"getFileHeader",function(a){if(0>a)return"";if(this.am[a].isBioModel)return this.getPDBHeader(a);a=this.getInfo(a,"fileHeader");null==a&&(a=this.modelSetName);
return null!=a?a:"no header information found"},"~N");c(b,"getAltLocCountInModel",function(a){return this.am[a].altLocCount},"~N");c(b,"getAltLocIndexInModel",function(a,b){if("\x00"==b)return 0;var c=this.getAltLocListInModel(a);return 0==c.length?0:c.indexOf(b)+1},"~N,~S");c(b,"getInsertionCodeIndexInModel",function(a,b){if("\x00"==b)return 0;var c=this.getInsertionListInModel(a);return 0==c.length?0:c.indexOf(b)+1},"~N,~S");c(b,"getAltLocListInModel",function(a){a=this.getInfo(a,"altLocs");return null==
a?"":a},"~N");c(b,"getInsertionListInModel",function(a){a=this.getInfo(a,"insertionCodes");return null==a?"":a},"~N");c(b,"getModelSymmetryCount",function(a){return 0<this.am[a].biosymmetryCount?this.am[a].biosymmetryCount:null==this.unitCells||null==this.unitCells[a]?0:this.unitCells[a].getSpaceGroupOperationCount()},"~N");c(b,"getModelCellRange",function(a){return null==this.unitCells?null:this.unitCells[a].getCellRange()},"~N");c(b,"getLastVibrationVector",function(a,b){if(null!=this.vibrations&&
a<this.vwr.ms.mc)for(var c,e=0>a||this.isTrajectory(a)||a>=this.mc-1?this.ac:this.am[a+1].firstAtomIndex,f=0>=a?0:this.am[a].firstAtomIndex;--e>=f;)if((0>a||!JM.AtomCollection.isDeleted(this.at[e])&&this.at[e].mi==a)&&((1275072532==b||0==b)&&null!=(c=this.getModulation(e))||(4166==b||0==b)&&null!=(c=this.getVibration(e,!1)))&&c.isNonzero())return e;return-1},"~N,~N");c(b,"getModulationList",function(a,b,c){var e=new JU.Lst;if(null!=this.vibrations)for(var f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))y(this.vibrations[f],
"J.api.JmolModulationSet")?e.addLast(this.vibrations[f].getModulation(b,c,!1)):e.addLast(Float.$valueOf("O"==b?NaN:-1));return e},"JU.BS,~S,JU.P3");c(b,"getElementsPresentBitSet",function(a){if(0<=a)return this.elementsPresent[a];a=new JU.BS;for(var b=0;b<this.mc;b++)a.or(this.elementsPresent[b]);return a},"~N");c(b,"getMoleculeIndex",function(a,b){0==this.moleculeCount&&this.getMolecules();for(var c=0;c<this.moleculeCount;c++)if(this.molecules[c].atomList.get(a))return b?this.molecules[c].indexInModel:
c;return 0},"~N,~B");c(b,"getMoleculeBitSet",function(a){0==this.moleculeCount&&this.getMolecules();var b=JU.BSUtil.copy(a);a=JU.BSUtil.copy(a);for(var c=0,e=new JU.BS;0<=(c=a.length()-1);)e=this.getMoleculeBitSetForAtom(c),null==e?(a.clear(c),b.clear(c)):(a.andNot(e),b.or(e));return b},"JU.BS");c(b,"getMoleculeBitSetForAtom",function(a){0==this.moleculeCount&&this.getMolecules();for(var b=0;b<this.moleculeCount;b++)if(this.molecules[b].atomList.get(a))return this.molecules[b].atomList;return null},
"~N");c(b,"getModelDipole",function(a){if(0>a)return null;var b=this.getInfo(a,"dipole");null==b&&(b=this.getInfo(a,"DIPOLE_VEC"));return b},"~N");c(b,"calculateMolecularDipole",function(a,b){if(null!=b){var c=b.nextSetBit(0);if(0>c)return null;a=this.at[c].mi}if(0>a)return null;var e=c=0,f=0,h=0,k=new JU.V3,m=new JU.V3;null==b&&(b=this.getModelAtomBitSetIncludingDeleted(-1,!1));this.vwr.getOrCalcPartialCharges(this.am[a].bsAtoms,null);for(var j=b.nextSetBit(0);0<=j;j=b.nextSetBit(j+1))if(!(JM.AtomCollection.isDeleted(this.at[j])||
this.at[j].mi!=a)){var p=this.partialCharges[j];0>p?(e++,h+=p,m.scaleAdd2(p,this.at[j],m)):0<p&&(c++,f+=p,k.scaleAdd2(p,this.at[j],k))}if(0.015<Math.abs(f+h))throw c="Dipole calculation requires balanced charges: "+f+" "+h,JU.Logger.info(c),new RuntimeException(c);if(0==e||0==c)return null;k.add(m);k.scale(4.8);return k},"~N,JU.BS");c(b,"getMoleculeCountInModel",function(a){var b=0;0==this.moleculeCount&&this.getMolecules();if(0>a)return this.moleculeCount;for(var c=0;c<this.mc;c++)a==c&&(b+=this.am[c].moleculeCount);
return b},"~N");c(b,"calcSelectedMoleculesCount",function(){var a=this.vwr.bsA();0==this.moleculeCount&&this.getMolecules();this.selectedMolecules.xor(this.selectedMolecules);for(var b=new JU.BS,c=0;c<this.moleculeCount;c++)JU.BSUtil.copy2(a,b),b.and(this.molecules[c].atomList),0<b.length()&&this.selectedMolecules.set(c)});c(b,"setCentroid",function(a,b){var c=this.getNotInCentroid(a,b);null!=c&&0<=c.nextSetBit(0)&&this.vwr.deleteAtoms(c,!1)},"JU.BS,~A");c(b,"getNotInCentroid",function(a,b){var c=
a.nextSetBit(0);if(0>c)return null;c=this.getUnitCell(this.at[c].mi);return null==c?null:c.notInCentroid(this,a,b)},"JU.BS,~A");c(b,"getMolecules",function(){if(0<this.moleculeCount)return this.molecules;null==this.molecules&&(this.molecules=Array(4));this.moleculeCount=0;for(var a=null,b=Array(this.mc),c=null,e=0;e<this.mc;e++)b[e]=this.vwr.getModelUndeletedAtomsBitSet(e),a=this.am[e],a.moleculeCount=0,c=a.isBioModel?a.getBioBranches(c):null;this.molecules=JU.JmolMolecule.getMolecules(this.at,b,
c,null);for(e=this.moleculeCount=this.molecules.length;0<=--e;)a=this.am[this.molecules[e].modelIndex],a.firstMoleculeIndex=e,a.moleculeCount++;return this.molecules});c(b,"initializeBspf",function(){if(!(null!=this.bspf&&this.bspf.isValid)){this.showRebondTimes&&JU.Logger.startTimer("build bspf");var a=new J.bspt.Bspf(3);JU.Logger.debugging&&JU.Logger.debug("sequential bspt order");for(var b=JU.BS.newN(this.mc),c=this.ac;0<=--c;){var e=this.at[c];!JM.AtomCollection.isDeleted(e)&&!this.isTrajectorySubFrame(e.mi)&&
(a.addTuple(this.am[e.mi].trajectoryBaseIndex,e),b.set(e.mi))}this.showRebondTimes&&(JU.Logger.checkTimer("build bspf",!1),a.stats());for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))a.validateModel(c,!0);a.isValid=!0;this.bspf=a}});c(b,"initializeBspt",function(a){this.initializeBspf();this.bspf.isInitializedIndex(a)||this.bspf.initialize(a,this.at,this.vwr.getModelUndeletedAtomsBitSet(a))},"~N");c(b,"setIteratorForPoint",function(a,b,c,e){0>b?a.setCenter(c,e):(this.initializeBspt(b),a.setModel(this,
b,this.am[b].firstAtomIndex,2147483647,c,e,null))},"J.api.AtomIndexIterator,~N,JU.T3,~N");c(b,"setIteratorForAtom",function(a,b,c,e,f){0>b&&(b=this.at[c].mi);b=this.am[b].trajectoryBaseIndex;this.initializeBspt(b);a.setModel(this,b,this.am[b].firstAtomIndex,c,this.at[c],e,f)},"J.api.AtomIndexIterator,~N,~N,~N,J.atomdata.RadiusData");c(b,"getSelectedAtomIterator",function(a,b,c,e,f){this.initializeBspf();if(f){f=this.getModelBS(a,!1);for(var h=f.nextSetBit(0);0<=h;h=f.nextSetBit(h+1))this.initializeBspt(h);
f=new JM.AtomIteratorWithinModelSet(f)}else f=new JM.AtomIteratorWithinModel;f.initialize(this.bspf,a,b,c,e,this.vwr.isParallel());return f},"JU.BS,~B,~B,~B,~B");j(b,"getBondCountInModel",function(a){return 0>a?this.bondCount:this.am[a].getBondCount()},"~N");c(b,"getAtomCountInModel",function(a){return 0>a?this.ac:this.am[a].act},"~N");c(b,"getModelAtomBitSetIncludingDeletedBs",function(a){var b=new JU.BS;null==a&&null==this.bsAll&&(this.bsAll=JU.BSUtil.setAll(this.ac));if(null==a)b.or(this.bsAll);
else for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))b.or(this.getModelAtomBitSetIncludingDeleted(c,!1));return b},"JU.BS");c(b,"getModelAtomBitSetIncludingDeleted",function(a,b){var c=0>a?this.bsAll:this.am[a].bsAtoms;null==c&&(c=this.bsAll=JU.BSUtil.setAll(this.ac));return b?JU.BSUtil.copy(c):c},"~N,~B");c(b,"getAtomBitsMaybeDeleted",function(a,b){var c;c=null;switch(a){default:return this.getAtomBitsMDa(a,b,new JU.BS);case 1073741925:case 1073742189:case 1111490587:case 1073742128:case 1073741863:case 1086324744:return c=
new JU.BS,this.haveBioModels?this.bioModelset.getAtomBitsStr(a,b,c):c;case 1677721602:case 1073742331:return this.getAtomBitsMDb(a,b);case 1812599299:var e=this.getBoxInfo(b,1);c=this.getAtomsWithin(e.getBoundBoxCornerVector().length()+1E-4,e.getBoundBoxCenter(),null,-1);for(var f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1))e.isWithin(this.at[f])||c.clear(f);return c;case 1094713350:c=JU.BSUtil.newBitSet2(0,this.ac);for(var f=b,h=F(-1,[D(f.x)-1,D(f.y)-1,D(f.z)-1,D(f.x),D(f.y),D(f.z),0]),f=this.mc;0<=
--f;)e=this.getUnitCell(f),null==e?JU.BSUtil.andNot(c,this.am[f].bsAtoms):c.andNot(e.notInCentroid(this,this.am[f].bsAtoms,h));return c;case 1094713360:return this.getMoleculeBitSet(b);case 1073742363:return this.getSelectCodeRange(b);case 2097196:c=JU.BS.newN(this.ac);e=-1;h=0;for(f=this.ac;0<=--f;){var k=this.at[f];if(!JM.AtomCollection.isDeleted(k)){var m=k.atomSymmetry;if(null!=m){if(k.mi!=e){e=k.mi;if(null==this.getModelCellRange(e))continue;h=this.getModelSymmetryCount(e)}for(var k=0,j=h;0<=
--j;)if(m.get(j)&&1<++k){c.set(f);break}}}}return c;case 1088421903:return JU.BSUtil.copy(null==this.bsSymmetry?this.bsSymmetry=JU.BS.newN(this.ac):this.bsSymmetry);case 1814695966:f="unitcell".equals(b);e=null==b||f?null:(c=b)[1];f=null!=c&&3==c.length?c[2]:null;k=null==e?NaN:e.floatValue();j=null==f?NaN:f.floatValue();null!=c&&(b=c[0]);if(null==b||y(b,"J.api.SymmetryInterface")){c=new JU.BS;var p=null!=b,e=y(b,"J.api.SymmetryInterface")?b:null;if(p&&null==e)return c;p&&(e=e.getUnitCellMultiplied());
h=e;e=-1;for(f=this.ac;0<=--f;)if(null!=this.at[f]){if(!p&&(m=this.at[f].getModelIndex(),m!=e&&(e=m,h=this.getUnitCell(m),null!=h&&(h=h.getUnitCellMultiplied())),null==h))continue;this.ptTemp1.setT(this.at[f]);h.toFractional(this.ptTemp1,!1);h.checkPeriodic(this.ptTemp1,k,j)&&c.set(f)}return c}"unitcell".equals(b)&&(b=JU.P3.new3(1,1,1));case 1094713349:c=new JU.BS;y(b,"JU.P3")?(e=b,j=NaN,h=k=null):(h=k=b[0],null==b[1]||b[1].floatValue(),f=b,e=JU.P3.newP(f),j=f.w);m=-1;for(f=this.ac;0<=--f;)JM.AtomCollection.isDeleted(this.at[f])||
(p=this.at[f].getModelIndex(),null==k&&m!=p&&(m=p,h=this.getUnitCell(m)),null!=h&&(this.ptTemp.setT(this.at[f]),h.toFractional(this.ptTemp,!1),h.isWithinUnitCell(this.ptTemp,e.x,e.y,e.z,j)&&c.set(f)));return c}},"~N,~O");c(b,"getSelectCodeRange",function(a){var b=new JU.BS,c=a[0],e=a[1];a=a[2];var f=this.vwr.getBoolean(603979822);0<=a&&(300>a&&!f)&&(a=this.chainToUpper(a));for(var h=this.mc;0<=--h;)if(this.am[h].isBioModel)for(var k=this.am[h],m,j=k.chainCount;0<=--j;){var p=k.chains[j];if(-1==a||
a==(m=p.chainID)||!f&&0<m&&300>m&&a==this.chainToUpper(m))for(var q=p.groups,p=p.groupCount,r=0;0<=r;)r=JM.ModelSet.selectSeqcodeRange(q,p,r,c,e,b)}return b},"~A");b.selectSeqcodeRange=c(b,"selectSeqcodeRange",function(a,b,c,e,f,h){var k,m,j,p=!1;for(m=c;m<b&&a[m].seqcode!=e;m++);if(m==b){if(0<c)return-1;p=!0;j=2147483647;for(var q=b;0<=--q;)if((k=a[q].seqcode)>e&&k-e<j)m=q,j=k-e;if(2147483647==j)return-1}if(2147483647==f)e=b-1,p=!0;else{for(e=m;e<b&&a[e].seqcode!=f;e++);if(e==b){if(0<c)return-1;
p=!0;j=2147483647;for(q=m;q<b;q++)if((k=a[q].seqcode)<f&&f-k<j)e=q,j=f-k;if(2147483647==j)return-1}}for(q=m;q<=e;++q)a[q].setAtomBits(h);return p?-1:e+1},"~A,~N,~N,~N,~N,JU.BS");c(b,"getAtomsWithinRadius",function(a,b,c,e,f){var h=new JU.BS;b=JU.BSUtil.andNot(b,this.vwr.slm.bsDeleted);var k=this.getSelectedAtomIterator(f,!1,!1,!1,!1);if(c){c=!this.vwr.g.legacyJavaFloat;var m=new JU.P3;f=null==f?JU.BSUtil.newBitSet2(0,this.mc):this.getModelBS(f,!1);f.and(this.getIterativeModels(!1));for(var j=b.nextSetBit(0);0<=
j;j=b.nextSetBit(j+1))for(var p=f.nextSetBit(0);0<=p;p=f.nextSetBit(p+1))0>a?this.getAtomsWithin(a,this.at[j].getFractionalUnitCoordPt(c,!0,m),h,p):(this.setIteratorForAtom(k,p,j,a,e),k.addAtoms(h))}else{null==f&&h.or(b);for(j=b.nextSetBit(0);0<=j;j=b.nextSetBit(j+1))0>a?this.getAtomsWithin(a,this.at[j],h,this.at[j].mi):(this.setIteratorForAtom(k,-1,j,a,e),k.addAtoms(h))}k.release();return h},"~N,JU.BS,~B,J.atomdata.RadiusData,JU.BS");c(b,"getAtomsWithin",function(a,b,c,e){null==c&&(c=new JU.BS);
if(0>a){a=-a;for(var f=this.ac;0<=--f;){var h=this.at[f];JM.AtomCollection.isDeleted(h)||0<=e&&h.mi!=e||!c.get(f)&&h.getFractionalUnitDistance(b,this.ptTemp1,this.ptTemp2)<=a&&c.set(h.i)}return c}for(var h=this.getSelectedAtomIterator(null,!1,!1,!1,!1),k=0<=e?JU.BSUtil.newAndSetBit(e):this.getIterativeModels(!0),m=k.nextSetBit(0);0<=m;m=k.nextSetBit(m+1))f=this.am[m].bsAtoms.nextSetBit(0),0>f||(this.setIteratorForAtom(h,e,f,-1,null),h.setCenter(b,a),h.addAtoms(c));h.release();return c},"~N,JU.T3,JU.BS,~N");
c(b,"deleteBonds",function(a,b){if(!b)for(var c=new JU.BS,e=new JU.BS,f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){var h=this.bo[f];if(null!=h){var k=h.atom1;this.am[k.mi].isModelKit||(c.clearAll(),e.clearAll(),c.set(k.i),e.set(h.getAtomIndex2()),this.addStateScript("connect ",null,c,e,"delete",!1,!0))}}this.dBb(a,b)},"JU.BS,~B");c(b,"makeConnections2",function(a,b,c,e,f,h,k,m,j,p,q){null==k&&(k=new JU.BS);var r=65535==c,u=131071==c,n=65537==c;u&&(c=1);var s=JU.Edge.isOrderH(c),v=!1,x=!1,w=!1,y=!1;
switch(e){case 12291:return this.deleteConnections(a,b,c,f,h,m,u);case 603979872:case 1073741852:if(515!=c){if(m){a=f;f=new JU.BS;h=new JU.BS;for(var z=a.nextSetBit(0);0<=z;z=a.nextSetBit(z+1))null!=this.bo[z]&&(f.set(this.bo[z].atom1.i),h.set(this.bo[z].atom2.i))}return F(-1,[s?this.autoHbond(f,h,!1):this.autoBondBs4(f,h,null,k,this.vwr.getMadBond(),603979872==e,q),0])}x=y=!0;break;case 1086324745:v=x=!0;break;case 1073742025:x=!0;break;case 1073741904:w=!0}e=!v&&!r;this.defaultCovalentMad=this.vwr.getMadBond();
q=0>a;var u=0>b,A=q||u,B=!m||0.1!=a||1E8!=b;B&&(a=this.fixD(a,q),b=this.fixD(b,u));var D=this.getDefaultMadFromOrder(c),I=0,K=0,L=null,M=null,O=null,P="\x00",Q=c|131072,S=65535!=c&&0!=(c&512);try{for(z=f.nextSetBit(0);0<=z;z=f.nextSetBit(z+1)){if(m){L=this.bo[z];if(null==L)continue;M=L.atom1;O=L.atom2}else{M=this.at[z];if(M.isDeleted())continue;P=this.isModulated(z)?"\x00":M.altloc}for(var R=m?0:h.nextSetBit(0);0<=R;R=h.nextSetBit(R+1)){if(m)R=2147483646;else{if(R==z)continue;O=this.at[R];if(null==
O||M.mi!=O.mi||O.isDeleted())continue;if("\x00"!=P&&P!=O.altloc&&"\x00"!=O.altloc)continue;L=M.getBond(O)}if(!(null==L?x:w)&&!(B&&!this.isInRange(M,O,a,b,q,u,A)||S&&null!=L&&!this.allowAromaticBond(L)))if(null==L)k.set(this.bondAtoms(M,O,c,D,k,p,j,!0).index),I++;else{if(e){if(n){var U=L.order;L.setOrder(c);L.setAtropisomerOptions()?(this.haveAtropicBonds=!0,K++):L.setOrder(U)}else L.setOrder(c);this.bsAromatic.clear(L.index)}if(r||c==L.order||Q==L.order||s&&L.isHydrogen())k.set(L.index),K++}}}}catch(V){if(!H(V,
Exception))throw V;}y&&this.assignAromaticBondsBs(!0,k);v||this.sm.setShapeSizeBs(1,-2147483648,null,k);return F(-1,[I,K])},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N,JU.SB");c(b,"autoBondBs4",function(a,b,c,e,f,h,k){if(h)return this.autoBond_Pre_11_9_24(a,b,c,e,f);if(0==this.ac)return 0;0==f&&(f=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();h=this.vwr.getFloat(570425348);var m=this.vwr.getFloat(570425364),m=m*m,j=0;this.showRebondTimes&&JU.Logger.startTimer("autobond");var p=-1,q=null==a,r,
u;q?(u=0,r=null):(a.equals(b)?r=a:(r=JU.BSUtil.copy(a),r.or(b)),u=r.nextSetBit(0));for(var n=this.getSelectedAtomIterator(null,!1,!1,!0,!1),s=!1;0<=u&&u<this.ac;u=q?u+1:r.nextSetBit(u+1)){var v=q||a.get(u),x=q||b.get(u),w=this.at[u];if(!JM.AtomCollection.isDeleted(w)){var y=w.mi;if(y!=p){p=y;if(this.isJmolDataFrame(y)){u=this.am[y].firstAtomIndex+this.am[y].act-1;continue}s=this.getInfoB(y,"autoBondUsingOccupation")}y=w.getBondingRadius();if(0!=y){var z=w.getFormalCharge(),A=0!=z;A&&(z=Math.signum(z));
var B=null!=c&&c.get(u);for(this.setIteratorForAtom(n,-1,u,y+this.maxBondingRadius+h,null);n.hasNext();){var D=this.at[n.next()];if(!D.isDeleted()){var F=D.i,H=q||a.get(F),I=q||b.get(F);!H&&!I||(!(v&&I||x&&H)||B&&c.get(F)||s&&null!=this.occupancies&&50>this.occupancies[u]!=50>this.occupancies[F]||A&&Math.signum(D.getFormalCharge())==z)||(H=this.isBondable(y,D.getBondingRadius(),n.foundDistance2(),m,h)?1:0,0<H&&this.autoBondCheck(w,D,H,f,e)&&(j++,null!=k&&k.append("connect ({"+u+"}) ({"+F+"});")))}}n.release()}}}this.showRebondTimes&&
JU.Logger.checkTimer("autoBond",!1);return j},"JU.BS,JU.BS,JU.BS,JU.BS,~N,~B,JU.SB");c(b,"isBondable",function(a,b,c,e,f){if(0==a||0==b||c<e)return!1;a=a+b+f;return c<=a*a},"~N,~N,~N,~N,~N");c(b,"autoBondCheck",function(a,b,c,e,f){if(20<a.getCurrentBondCount()||20<b.getCurrentBondCount())return this.maxBondWarned||JU.Logger.warn("maximum auto bond count reached"),this.maxBondWarned=!0,!1;var h=a.getFormalCharge();if(0!=h){var k=b.getFormalCharge();if(0>h&&0>k||0<h&&0<k)return!1}if(a.altloc!=b.altloc&&
"\x00"!=a.altloc&&"\x00"!=b.altloc&&null==this.getModulation(a.i))return!1;this.getOrAddBond(a,b,c,e,f,0,!1);return!0},"JM.Atom,JM.Atom,~N,~N,JU.BS");c(b,"autoBond_Pre_11_9_24",function(a,b,c,e,f){if(0==this.ac)return 0;0==f&&(f=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();var h=this.vwr.getFloat(570425348),k=this.vwr.getFloat(570425364),k=k*k,m=0;this.initializeBspf();for(var j=-1,p=this.ac;0<=--p;){var q=this.at[p];if(!JM.AtomCollection.isDeleted(q)){var r=null==a||a.get(p),u=null==b||
b.get(p);if((r||u)&&!q.isDeleted()){var n=q.mi;if(n!=j&&(j=n,this.isJmolDataFrame(n))){for(;0<=--p&&!(JM.AtomCollection.isDeleted(this.at[p])||this.at[p].mi!=n););p++;continue}var s=q.getBondingRadius();if(0!=s){var v=s+this.maxBondingRadius+h;this.initializeBspt(n);n=this.bspf.getCubeIterator(n);for(n.initialize(q,v,!0);n.hasMoreElements();)if(v=n.nextElement(),!(v===q||v.isDeleted())){var x=v.i,w=null==a||a.get(x),y=null==b||b.get(x);if(!(!w&&!y||null!=c&&c.get(x)&&c.get(p)))if(r&&y||u&&w)x=this.isBondable(s,
v.getBondingRadius(),n.foundDistance2(),k,h)?1:0,0<x&&this.autoBondCheck(q,v,x,f,e)&&m++}n.release()}}}}return m},"JU.BS,JU.BS,JU.BS,JU.BS,~N");c(b,"autoHbond",function(a,b,c){if(c){for(var e=this.getModelBS(a,!1),f=e.nextSetBit(0);0<=f&&c;f=e.nextSetBit(f+1))c=!this.am[f].hasRasmolHBonds;if(c)return 0}c=!1;for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))if(1==this.at[f].getElementNumber()){c=!0;break}e=new JU.BS;f=this.vwr.getBoolean(603979853);if(null==b||f&&!c)return JU.Logger.info((null==b?"DSSP/DSSR ":
"RasMol")+" pseudo-hbond calculation"),this.calcRasmolHydrogenBonds(a,b,null,!1,2147483647,!1,e),-e.cardinality();JU.Logger.info(c?"Standard Hbond calculation":"Jmol pseudo-hbond calculation");var h=null;if(!c){h=new JU.BS;for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))switch(this.at[f].atomID){case 64:case 4:case 14:case 15:case 16:case 17:h.set(f)}}var k,m;c?(k=this.vwr.getFloat(570425361),m=1):(k=this.vwr.getFloat(570425360),m=JM.ModelSet.hbondMinRasmol*JM.ModelSet.hbondMinRasmol);var j=k*k,p=
3.141592653589793*this.vwr.getFloat(570425359)/180,q=0,r=0;this.showRebondTimes&&JU.Logger.debugging&&JU.Logger.startTimer("hbond");var u=null,n=null;b=this.getSelectedAtomIterator(b,!1,!1,!1,!1);for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){var s=this.at[f],v=s.getElementNumber(),x=1==v;if(!(x?!c:c||7!=v&&8!=v)){if(x){v=!1;u=s.bonds;if(null==u)continue;for(var w=!1,n=0;!w&&n<u.length;n++)w=u[n].getOtherAtom(s).getElementNumber(),w=7==w||8==w;if(!w)continue}else v=h.get(f);for(this.setIteratorForAtom(b,
-1,s.i,k,null);b.hasNext();)if(w=this.at[b.next()],u=w.getElementNumber(),!(w===s||(x?1==u:7!=u&&8!=u)||(r=b.foundDistance2())<m||r>j||v&&h.get(w.i)||s.isBonded(w)))if(this.v1.sub2(s,w),null!=(n=JM.ModelSet.checkMinAttachedAngle(s,p,this.v1,this.v2,c)))if(this.v1.scale(-1),null!=(u=JM.ModelSet.checkMinAttachedAngle(w,p,this.v1,this.v2,c))){var y=0,z;x&&!Float.isNaN(u.x)&&!Float.isNaN(n.x)?(z=4096,y=JM.HBond.calcEnergy(Math.sqrt(r),u.distance(s),u.distance(n),w.distance(n))/1E3):z=2048;e.set(this.addHBond(s,
w,z,y));q++}}}b.release();this.sm.setShapeSizeBs(1,-2147483648,null,e);this.showRebondTimes&&JU.Logger.checkTimer("hbond",!1);return c?q:-q},"JU.BS,JU.BS,~B");b.checkMinAttachedAngle=c(b,"checkMinAttachedAngle",function(a,b,c,e,f){var h=a.bonds,k=!0,m=null;if(null!=h&&0<h.length)for(var j=3.4028235E38,p=h.length;0<=--p;)if(h[p].isCovalent()){var k=!1,q=h[p].getOtherAtom(a);if(f||1!=q.getElementNumber()){e.sub2(a,q);var r=e.angle(c);if(r<b)return null;r<j&&(m=q,j=r)}}return k?JU.P3.new3(NaN,0,0):m},
"JM.Atom,~N,JU.V3,JU.V3,~B");c(b,"setStructureIndexes",function(){for(var a,b=0,c=-1,e=-1,f=-1,h=0;h<this.ac;h++)if(!JM.AtomCollection.isDeleted(this.at[h])){if((e=this.at[h].mi)!=f)b=0,f=e,c=-1;if((a=this.at[h].group.getStrucNo())!=c&&0!=a)this.at[h].group.setStrucNo(++b),c=b}});c(b,"getModelInfoAsString",function(){var a=(new JU.SB).append('<models count="');a.appendI(this.mc).append('" modelSetHasVibrationVectors="').append(this.modelSetHasVibrationVectors()+'">\n<properties>');if(null!=this.modelSetProperties){for(var b=
this.modelSetProperties.propertyNames();b.hasMoreElements();){var c=b.nextElement();a.append('\n <property name="').append(c).append('" value=').append(JU.PT.esc(this.modelSetProperties.getProperty(c))).append(" />")}a.append("\n</properties>")}for(b=0;b<this.mc;++b)a.append('\n<model index="').appendI(b).append('" n="').append(this.getModelNumberDotted(b)).append('" id=').append(JU.PT.esc(""+this.getInfo(b,"modelID"))),c=this.vwr.getJDXBaseModelIndex(b),c!=b&&a.append(" baseModelId=").append(JU.PT.esc(this.getInfo(c,
"jdxModelID"))),a.append(" name=").append(JU.PT.esc(this.getModelName(b))).append(" title=").append(JU.PT.esc(this.getModelTitle(b))).append(' hasVibrationVectors="').appendB(this.vwr.modelHasVibrationVectors(b)).append('" />');a.append("\n</models>");return a.toString()});c(b,"getSymmetryInfoAsString",function(){for(var a=(new JU.SB).append("Symmetry Information:"),b=0;b<this.mc;++b){a.append("\nmodel #").append(this.getModelNumberDotted(b)).append("; name=").append(this.getModelName(b)).append("\n");
var c=this.getUnitCell(b);a.append(null==c?"no symmetry information":c.getSymmetryInfoStr())}return a.toString()});c(b,"createModels",function(a){a=this.mc+a;var b=JU.AU.arrayCopyObject(this.am,a);this.validateBspf(!1);this.modelNumbers=JU.AU.arrayCopyI(this.modelNumbers,a);this.modelFileNumbers=JU.AU.arrayCopyI(this.modelFileNumbers,a);this.modelNumbersForAtomLabel=JU.AU.arrayCopyS(this.modelNumbersForAtomLabel,a);this.modelNames=JU.AU.arrayCopyS(this.modelNames,a);this.frameTitles=JU.AU.arrayCopyS(this.frameTitles,
a);for(var c=w(this.modelFileNumbers[this.mc-1]/1E6)+1,e=this.mc,f=0;e<a;e++)this.modelNumbers[e]=e+this.mc,this.modelFileNumbers[e]=1E6*c+ ++f,this.modelNumbersForAtomLabel[e]=this.modelNames[e]=c+"."+f;this.thisStateModel=-1;c=this.getInfoM("group3Lists");null!=c&&(e=this.getInfoM("group3Counts"),c=JU.AU.arrayCopyS(c,a),e=JU.AU.arrayCopyII(e,a),this.msInfo.put("group3Lists",c),this.msInfo.put("group3Counts",e));this.unitCells=null==this.unitCells?Array(a):JU.AU.arrayCopyObject(this.unitCells,a);
for(e=this.mc;e<a;e++)b[e]=(new JM.Model).set(this,e,-1,null,null,null),b[e].loadState=" model create #"+e+";";this.am=b;this.mc=a;this.vwr.setAnimationRange(-1,-1)},"~N");c(b,"deleteAtoms",function(a){if(null!=a){for(var b=this.getModelBS(a,!1),c=new JU.BS,e=a.nextSetBit(0);0<=e&&e<this.ac;e=a.nextSetBit(e+1))JM.AtomCollection.isDeleted(this.at[e])||this.at[e].$delete(c);for(var f=JU.BSUtil.copy(a),e=0;e<this.mc;e++){var h=this.am[e];h.resetDSSR(!1);h.bsAtomsDeleted.or(a);h.bsAtomsDeleted.and(h.bsAtoms);
null!=h.bsAsymmetricUnit&&h.bsAsymmetricUnit.andNot(a);b.get(h.modelIndex)&&this.updateBasisFromSite(h.modelIndex);a=JU.BSUtil.andNot(h.bsAtoms,h.bsAtomsDeleted);h.firstAtomIndex=a.nextSetBit(0);h.act=a.cardinality();h.isOrderly=h.act==h.bsAtoms.length()-h.firstAtomIndex}this.dBb(c,!1);this.vwr.shm.notifyAtoms("atomsDeleted",x(-1,[f,b]));this.validateBspf(!1)}},"JU.BS");c(b,"clearDB",function(a){this.getModelAuxiliaryInfo(this.at[a].mi).remove("dbName")},"~N");c(b,"adjustAtomArrays",function(a,b,
c){this.ac=c;for(var e=b;e<c;e++){this.at[e]=this.at[a[e]];this.at[e].i=e;var f=this.am[this.at[e].mi];f.firstAtomIndex==a[e]&&(f.firstAtomIndex=e);f.bsAtoms.set(e)}if(null!=this.vibrations)for(e=b;e<c;e++)this.vibrations[e]=this.vibrations[a[e]];if(null!=this.atomTensorList)for(e=b;e<c;e++)if(f=this.atomTensorList[e]=this.atomTensorList[a[e]],null!=f)for(var h=f.length;0<=--h;){var k=f[h];null!=k&&(k.atomIndex1=e)}if(null!=this.atomNames)for(e=b;e<c;e++)this.atomNames[e]=this.atomNames[a[e]];if(null!=
this.atomTypes)for(e=b;e<c;e++)this.atomTypes[e]=this.atomTypes[a[e]];if(null!=this.atomResnos)for(e=b;e<c;e++)this.atomResnos[e]=this.atomResnos[a[e]];if(null!=this.atomSerials)for(e=b;e<c;e++)this.atomSerials[e]=this.atomSerials[a[e]];if(null!=this.atomSeqIDs)for(e=b;e<c;e++)this.atomSeqIDs[e]=this.atomSeqIDs[a[e]];if(null!=this.bfactor100s)for(e=b;e<c;e++)this.bfactor100s[e]=this.bfactor100s[a[e]];if(null!=this.occupancies)for(e=b;e<c;e++)this.occupancies[e]=this.occupancies[a[e]];if(null!=this.partialCharges)for(e=
b;e<c;e++)this.partialCharges[e]=this.partialCharges[a[e]]},"~A,~N,~N");c(b,"growAtomArrays",function(a){this.at=JU.AU.arrayCopyObject(this.at,a);null!=this.vibrations&&(this.vibrations=JU.AU.arrayCopyObject(this.vibrations,a));null!=this.occupancies&&(this.occupancies=JU.AU.arrayCopyF(this.occupancies,a));null!=this.bfactor100s&&(this.bfactor100s=JU.AU.arrayCopyShort(this.bfactor100s,a));null!=this.partialCharges&&(this.partialCharges=JU.AU.arrayCopyF(this.partialCharges,a));null!=this.atomTensorList&&
(this.atomTensorList=JU.AU.arrayCopyObject(this.atomTensorList,a));null!=this.atomNames&&(this.atomNames=JU.AU.arrayCopyS(this.atomNames,a));null!=this.atomTypes&&(this.atomTypes=JU.AU.arrayCopyS(this.atomTypes,a));null!=this.atomResnos&&(this.atomResnos=JU.AU.arrayCopyI(this.atomResnos,a));null!=this.atomSerials&&(this.atomSerials=JU.AU.arrayCopyI(this.atomSerials,a));null!=this.atomSeqIDs&&(this.atomSeqIDs=JU.AU.arrayCopyI(this.atomSeqIDs,a))},"~N");c(b,"addAtom",function(a,b,c,e,f,h,k,m,j,p,q,
r,u,n,s,v,w,x,y,z,A){m=(new JM.Atom).setAtom(a,this.ac,j,p,z,m,c,r,w,x);this.am[a].act++;this.am[a].bsAtoms.set(this.ac);JU.Elements.isElement(c,1)&&this.am[a].hydrogenCount++;this.ac>=this.at.length&&this.growAtomArrays(this.ac+100);this.at[this.ac]=m;this.setBFactor(this.ac,s,!1);this.setOccupancy(this.ac,n,!1);this.setPartialCharge(this.ac,u,!1);null!=v&&this.setAtomTensors(this.ac,v);m.group=b;m.colixAtom=this.vwr.cm.getColixAtomPalette(m,J.c.PAL.CPK.id);x&&m.setTranslucent(!0,0.5);null!=e&&(null!=
f&&(null==this.atomTypes&&(this.atomTypes=Array(this.at.length)),this.atomTypes[this.ac]=f),m.atomID=y,0==y&&(null==this.atomNames&&(this.atomNames=Array(this.at.length)),this.atomNames[this.ac]=e.intern()));-2147483648!=h&&(null==this.atomSerials&&(this.atomSerials=F(this.at.length,0)),this.atomSerials[this.ac]=h);0!=k&&(null==this.atomSeqIDs&&(this.atomSeqIDs=F(this.at.length,0)),this.atomSeqIDs[this.ac]=k);null!=q&&this.setVibrationVector(this.ac,q);Float.isNaN(A)||this.setBondingRadius(this.ac,
A);this.ac++;return m},"~N,JM.Group,~N,~S,~S,~N,~N,~N,JU.P3,~N,JU.V3,~N,~N,~N,~N,JU.Lst,~B,~B,~N,JU.BS,~N");c(b,"getInlineData",function(a){var b=null;if(0<=a)b=this.am[a].loadScript;else for(a=this.mc;0<=--a&&!(0<(b=this.am[a].loadScript).length()););a=b.lastIndexOf('data "');if(0>a)return b=JU.PT.getQuotedStringAt(b.toString(),0),JS.ScriptCompiler.unescapeString(b,0,b.length);a=b.indexOf2('"',a+7);var c=b.lastIndexOf('end "');return c<a||0>a?null:b.substring2(a+2,c)},"~N");c(b,"isAtomPDB",function(a){return 0<=
a&&this.am[this.at[a].mi].isBioModel},"~N");c(b,"setAtomNamesAndNumbers",function(a,b,c,e){var f=-1;if(e){for(;a<this.ac&&JM.AtomCollection.isDeleted(this.at[a]);)a++;if(a>=this.ac)return;f=this.at[a].mi;a=this.am[f].firstAtomIndex}null==this.atomSerials&&(this.atomSerials=F(this.ac,0));null==this.atomNames&&(this.atomNames=Array(this.ac));for(var h=this.isXYZ&&this.vwr.getBoolean(603979978),k=2147483647,m=1;a<this.ac;++a){var j=this.at[a];if(!JM.AtomCollection.isDeleted(j)){if(j.mi!=k){if(e&&2147483647!=
k&&j.mi!=f)continue;k=j.mi;m=h?0:1}var p=this.atomSerials[a];if(a>=-b){if(0==p||e)this.atomSerials[a]=a<b?c.atomSerials[a]:m;if(null==this.atomNames[a]||e)this.atomNames[a]=(j.getElementSymbol()+this.atomSerials[a]).intern()}else p>m&&(m=p),e&&(this.atomNames[a]=(j.getElementSymbol()+p).intern());(!this.am[k].isModelKit||0<j.getElementNumber())&&m++}}},"~N,~N,JM.AtomCollection,~B");c(b,"connect",function(a){this.resetMolecules();for(var b=new JU.BS,c=0;c<a.length;c++){var e=a[c];if(!(null==e||2>e.length)){var f=
D(e[0]),h=0>f;h&&(f=-1-f);var k=D(e[1]);if(!(0>k||f>=this.ac||k>=this.ac)){var m=2<e.length?D(e[2]):1;0>m&&(m&=65535);var j=3<e.length?fa(1E3*a[c][3]):this.getDefaultMadFromOrder(m);0==m||0==j&&32768!=m&&!JU.Edge.isOrderH(m)?(e=this.at[f].getBond(this.at[k]),null!=e&&b.set(e.index)):this.bondAtoms(this.at[f],this.at[k],m,j,null,4<e.length?e[4]:0,h,!0)}}}0<=b.nextSetBit(0)&&this.deleteBonds(b,!1)},"~A");c(b,"setFrameDelayMs",function(a,b){for(var c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.am[this.am[c].trajectoryBaseIndex].frameDelay=
a},"~N,JU.BS");c(b,"getFrameDelayMs",function(a){return a<this.am.length&&0<=a?this.am[this.am[a].trajectoryBaseIndex].frameDelay:0},"~N");c(b,"getModelIndexFromId",function(a){var b=0<=a.indexOf("#"),c=a.toLowerCase().endsWith(".basemodel");c&&(a=a.substring(0,a.length-10));for(var e=-1,f=null,h=0;h<this.mc;h++){var k=this.getInfo(h,"modelID"),m=a.startsWith("~")?"~"+this.getModelNumberDotted(h):null;if(!(null==m&&null==k&&null==(k=this.getModelTitle(h)))){b&&(f=this.getModelFileName(h),f.endsWith("#molfile")?
k=f:(f+="#",k=f+k));if(a.equalsIgnoreCase(k)||a.equalsIgnoreCase(m))return c?this.vwr.getJDXBaseModelIndex(h):h;null!=f&&a.startsWith(f)&&(e=-2)}}return null==f&&!b?-2:e},"~S");c(b,"getModelSetAuxiliaryInfo",function(a){var b=this.msInfo;null==b&&(b=new java.util.Hashtable);if(null!=a||!b.containsKey("models")){for(var c=new JU.Lst,e=0;e<this.mc;++e)if(null==a||a.get(e)){var f=this.getModelAuxiliaryInfo(e);f.put("modelIndex",Integer.$valueOf(e));c.addLast(f)}b.put("models",c)}return b},"JU.BS");c(b,
"getDihedralMap",function(a){for(var b=new JU.Lst,c=a.length,e=null,f=null,h=null,k=null,m=c-1;0<=--m;)for(var j=c;--j>m;)if(e=this.at[a[m]],f=this.at[a[j]],e.isBonded(f))for(var p=c;0<=--p;)if(p!=m&&p!=j&&(h=this.at[a[p]]).isBonded(e))for(var q=c;0<=--q;)if(q!=m&&q!=j&&q!=p&&(k=this.at[a[q]]).isBonded(f)){var r=F(4,0);r[0]=h.i;r[1]=e.i;r[2]=f.i;r[3]=k.i;b.addLast(r)}c=b.size();a=JU.AU.newInt2(c);for(m=c;0<=--m;)a[c-m-1]=b.get(m);return a},"~A");c(b,"setModulation",function(a,b,c,e){if(null==this.bsModulated)if(b)this.bsModulated=
new JU.BS;else if(null==a)return;null==a&&(a=this.getModelAtomBitSetIncludingDeleted(-1,!1));for(var f=this.vwr.getFloat(1275072532),h=!1,k=a.nextSetBit(0);0<=k;k=a.nextSetBit(k+1)){var m=this.getModulation(k);null!=m&&(m.setModTQ(this.at[k],b,c,e,f),null!=this.bsModulated&&this.bsModulated.setBitTo(k,b),h=!0)}h||(this.bsModulated=null)},"JU.BS,~B,JU.P3,~B");c(b,"getBoundBoxOrientation",function(a,b,c){var e=0,f=0,h=0,k=null,m=null,j=b.nextSetBit(0),p=0;if(0<=j){if(null==this.vOrientations){for(var q=
0,k=new JU.P4,p=Array(3375),e=-7;7>=e;e++)for(f=-7;7>=f;f++)for(h=0;14>=h;h++,q++)1<(p[q]=JU.V3.new3(e/7,f/7,h/14)).length()&&--q;this.vOrientations=Array(q);for(e=q;0<=--e;)k.set4(p[e].x,p[e].y,p[e].z,0),this.vOrientations[e]=JU.Quat.newP4(k);for(e=q;0<=--e;)q=Math.sqrt(1-p[e].lengthSquared()),Float.isNaN(q)&&(q=0),k.set4(p[e].x,p[e].y,p[e].z,q),this.vOrientations[e]=JU.Quat.newP4(k)}var q=new JU.P3,p=3.4028235E38,h=null,r=new JU.BoxInfo;r.setMargin(1312817669==a?0:0.1);for(e=this.vOrientations.length;0<=
--e;){k=this.vOrientations[e];r.reset();if(null==c)for(f=j;0<=f;f=b.nextSetBit(f+1)){var u=k.transform2(this.at[f],q);r.addBoundBoxPoint(u)}else for(f=c.length;0<=--f;)r.addBoundBoxPoint(k.transform2(c[f],q));switch(a){default:case 1312817669:case 1073741864:case 1814695966:f=(r.bbCorner1.x-r.bbCorner0.x)*(r.bbCorner1.y-r.bbCorner0.y)*(r.bbCorner1.z-r.bbCorner0.z);break;case 1111492629:f=r.bbCorner1.x-r.bbCorner0.x;break;case 1111492630:f=r.bbCorner1.y-r.bbCorner0.y;break;case 1111492631:f=r.bbCorner1.z-
r.bbCorner0.z}f<p&&(m=k,h=r,r=new JU.BoxInfo,r.setMargin(0.1),p=f)}switch(a){default:return m;case 1814695966:a=h.getBoundBoxVertices();a=x(-1,[a[0],a[4],a[2],a[1]]);m=m.inv();for(e=0;4>e;e++)m.transform2(a[e],a[e]),0<e&&a[e].sub(a[0]);return a;case 1312817669:case 1073741864:k=JU.Quat.newQ(m),e=h.bbCorner1.x-h.bbCorner0.x,f=h.bbCorner1.y-h.bbCorner0.y,h=h.bbCorner1.z-h.bbCorner0.z,e<f&&(q.set(0,0,1),k=JU.Quat.newVA(q,90).mulQ(k),m=e,e=f,f=m),f<h&&(h>e&&(q.set(0,1,0),k=JU.Quat.newVA(q,90).mulQ(k),
m=e,e=h,h=m),q.set(1,0,0),k=JU.Quat.newVA(q,90).mulQ(k),m=f,f=h,h=m)}}return 1312817669==a?p+"\t{"+e+" "+f+" "+h+"}\t"+b:1814695966==a?null:null==k||0==k.getTheta()?new JU.Quat:k},"~N,JU.BS,~A");c(b,"getUnitCellForAtom",function(a){if(0>a||a>this.ac||null==this.at[a])return null;if(null!=this.bsModulated){var b=this.getModulation(a),b=null==b?null:b.getSubSystemUnitCell();if(null!=b)return b}return this.getUnitCell(this.at[a].mi)},"~N");c(b,"clearCache",function(){for(var a=this.mc;0<=--a;)this.am[a].resetDSSR(!1)});
c(b,"getSymMatrices",function(a){var b=this.getModelSymmetryCount(a);if(0==b)return null;var c=Array(b),e=this.am[a].biosymmetry;null==e&&(e=this.getUnitCell(a));for(a=b;0<=--a;)c[a]=e.getSpaceGroupOperation(a);return c},"~N");c(b,"getSymmetryInvariant",function(a){a=this.getBasisAtom(a,!0);return null==a?F(0,0):this.getUnitCellForAtom(a.i).getInvariantSymops(a,null)},"~N");c(b,"getBsBranches",function(a){for(var b=w(a.length/6),c=Array(b),e=new java.util.Hashtable,f=0,h=0;f<b;f++,h+=6)if(!(1>Math.abs(a[h+
5]-a[h+4]))){var k=D(a[h+1]),m=D(a[h+2]),j=""+k+"_"+m;if(!e.containsKey(j)){e.put(j,Boolean.TRUE);for(var j=this.vwr.getBranchBitSet(m,k,!0),p=this.at[k].bonds,k=this.at[k],q=0;q<p.length;q++){var r=p[q];if(r.isCovalent()&&(r=r.getOtherAtom(k).i,r!=m&&j.get(r))){j=null;break}}c[f]=j}}return c},"~A");c(b,"recalculatePositionDependentQuantities",function(a,b){null!=this.vwr.shm.getShape(21)&&this.vwr.shm.getShapePropertyData(21,"move",x(-1,[a,b]));this.haveStraightness&&this.calculateStraightnessAll();
this.recalculateLeadMidpointsAndWingVectors(-1);for(var c=this.getModelBS(a,!1),e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))if(this.sm.notifyAtomPositionsChanged(e,a,b),null!=b){var f=this.am[e];f.isContainedIn(a)&&(null==f.mat4&&(f.mat4=JU.M4.newM4(null)),f.mat4.mul2(b,f.mat4))}},"JU.BS,JU.M4");c(b,"moveAtoms",function(a,b,c,e,f,h,k,m){if(null!=a){for(b=f.nextSetBit(0);0<=b;b=f.nextSetBit(b+1))a.rotTrans(this.at[b]),this.taintAtom(b,2);this.mat4.setM4(a);e=null}else if(m)k||(this.matInv.setM3(c),
this.matInv.invert(),this.matInv.rotate(e));else{null==b?this.matTemp.setM3(c):(this.ptTemp.set(0,0,0),this.matInv.setM3(c),this.matInv.invert(),this.matTemp.mul2(b,c),this.matTemp.mul2(this.matInv,this.matTemp));k?(this.vTemp.setT(h),this.mat4.setIdentity(),this.mat4.setTranslation(this.vTemp),this.mat4t.setToM3(this.matTemp),this.mat4.mul(this.mat4t),this.mat4t.setIdentity(),this.vTemp.scale(-1),this.mat4t.setTranslation(this.vTemp),this.mat4.mul(this.mat4t)):this.mat4.setToM3(this.matTemp);for(b=
f.nextSetBit(0);0<=b;b=f.nextSetBit(b+1))k?this.mat4.rotTrans(this.at[b]):(this.ptTemp.add(this.at[b]),this.mat4.rotTrans(this.at[b]),this.ptTemp.sub(this.at[b])),this.taintAtom(b,2);k||(this.ptTemp.scale(1/f.cardinality()),null==e&&(e=new JU.V3),e.add(this.ptTemp))}if(null!=e){for(b=f.nextSetBit(0);0<=b;b=f.nextSetBit(b+1))this.at[b].add(e),this.taintAtom(b,2);m||(this.mat4t.setIdentity(),this.mat4t.setTranslation(e),this.mat4.mul2(this.mat4t,this.mat4))}this.recalculatePositionDependentQuantities(f,
this.mat4)},"JU.M4,JU.M3,JU.M3,JU.V3,JU.BS,JU.P3,~B,~B");c(b,"setDihedrals",function(a,b,c){var e=w(a.length/6);1<c&&(c=1);for(var f=0,h=0;f<e;f++,h+=6){var k=b[f];if(!(null==k||k.isEmpty())){var m=this.at[D(a[h+1])],j=JU.V3.newVsub(this.at[D(a[h+2])],m),j=JU.A4.newVA(j,-((a[h+5]-a[h+4])*c)/57.29577951308232);this.matTemp.setAA(j);this.ptTemp.setT(m);for(m=k.nextSetBit(0);0<=m;m=k.nextSetBit(m+1))this.at[m].sub(this.ptTemp),this.matTemp.rotate(this.at[m]),this.at[m].add(this.ptTemp),this.taintAtom(m,
2)}}},"~A,~A,~N");c(b,"setAtomCoordsRelative",function(a,b){this.setAtomsCoordRelative(b,a.x,a.y,a.z);this.mat4.setIdentity();this.vTemp.setT(a);this.mat4.setTranslation(this.vTemp);this.recalculatePositionDependentQuantities(b,this.mat4)},"JU.T3,JU.BS");c(b,"setAtomCoords",function(a,b,c){this.setAtomCoord2(a,b,c);switch(b){case 1111492626:case 1111492627:case 1111492628:case 1145047055:break;default:this.recalculatePositionDependentQuantities(a,null)}},"JU.BS,~N,~O");c(b,"invertSelected",function(a,
b,c,e){this.resetChirality();if(null!=a)for(var f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+1)){var h=2*(a.x-this.at[f].x);c=2*(a.y-this.at[f].y);var k=2*(a.z-this.at[f].z);this.setAtomCoordRelative(f,h,c,k)}else if(null!=b){a=JU.V3.new3(b.x,b.y,b.z);a.normalize();for(var m=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z),f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+1))k=2*-JU.Measure.distanceToPlaneD(b,m,this.at[f]),h=a.x*k,c=a.y*k,k*=a.z,this.setAtomCoordRelative(f,h,c,k)}else if(0<=c&&(b=this.at[c],a=b.bonds,null!=a)){h=
new JU.BS;k=new JU.Lst;m=this.vwr.getModelUndeletedAtomsBitSet(b.mi);for(f=0;f<a.length;f++){var j=a[f].getOtherAtom(b);e.get(j.i)?h.or(JU.JmolMolecule.getBranchBitSet(this.at,j.i,m,null,c,!0,!0)):k.addLast(j)}0!=k.size()&&(a=JU.Measure.getCenterAndPoints(k)[0],e=JU.V3.newVsub(b,a),e=JU.Quat.newVA(e,180),this.moveAtoms(null,null,e.getMatrix(),null,h,b,!0,!1))}},"JU.P3,JU.P4,~N,JU.BS");c(b,"getCellWeights",function(a){var b=null,c=a.nextSetBit(0),e=-1,f;if(0<=c&&null!=(f=this.getUnitCell(e=this.at[c].mi))){f=
f.getUnitCellMultiplied();this.getModelAtomBitSetIncludingDeleted(e,!0).and(a);for(var b=L(a.cardinality(),0),h=new JU.P3,k=0;0<=c;c=a.nextSetBit(c+1))e=this.at[c],h.setT(e),f.toFractional(h,!1),f.unitize(h),b[k++]=f.getCellWeight(h)}return b},"JU.BS");c(b,"getAtomGroupQuaternions",function(a,b,c){var e=0,f=new JU.Lst;a=JU.BSUtil.copy(a);for(var h=new JU.BS,k=a.nextSetBit(0);0<=k&&e<b;k=a.nextSetBit(k+1)){var j=this.at[k].group;j.setAtomBits(h);a.andNot(h);var E=j.getQuaternion(c);if(null==E&&(this.am[this.at[k].mi].isBioModel||
(E=j.getQuaternionFrame(this.at)),null==E))continue;e++;f.addLast(E)}return f.toArray(Array(f.size()))},"JU.BS,~N,~S");c(b,"getConformation",function(a,b,c,e){for(var f=new JU.BS,h=this.mc;0<=--h;)if(!(0<=a&&h!=a)){var k=this.am[h],j=this.vwr.getModelUndeletedAtomsBitSet(a);null!=e&&j.and(e);if(!(0>j.nextSetBit(0)))if(b>k.altLocCount)1==b&&f.or(j);else{if(this.am[h].isBioModel){if(-1E3>b){var k=1E3+b,E=this.getAltLocListInModel(h);-32!=k&&0>E.indexOf(String.fromCharCode(-k))&&(k=-2147483648)}else 0>
b?(E=this.getAltLocListInModel(h),k=-1-b,k=k>=E.length?-2147483648:-E.charAt(k).charCodeAt(0)):k=b;if(-2147483648==k)continue;this.am[h].getConformation(k,c,j,f)}else{var p=this.getAltLocCountInModel(h),E=this.getAltLocListInModel(h),q=new JU.BS;if(-1E3>b)var r=String.fromCharCode(-1E3-b),k=E.indexOf(r);else if(0>b)if(k=-b,r=this.vwr.getDataObj("property_part",j,1),null==r)k-=1;else{for(var u=0,n=j.nextSetBit(0);0<=n;n=j.nextSetBit(n+1)){var s=r[u++];0!=s&&(s!=k&&s!=-k)&&j.clear(n)}f.or(j);k=-1}else k=
b-1;if(0>k||k>=p)continue;for(r=p;0<=--r;)r!=k&&j.andNot(this.getAtomBitsMDa(1073742355,E.substring(r,r+1),q))}f.or(j)}}return f},"~N,~N,~B,JU.BS");c(b,"getSequenceBits",function(a,b,c){return this.haveBioModels?this.bioModelset.getAllSequenceBits(a,b,c):c},"~S,JU.BS,JU.BS");c(b,"getBioPolymerCountInModel",function(a){return this.haveBioModels?this.bioModelset.getBioPolymerCountInModel(a):0},"~N");c(b,"getPolymerPointsAndVectors",function(a,b,c,e){this.haveBioModels&&this.bioModelset.getAllPolymerPointsAndVectors(a,
b,c,e)},"JU.BS,JU.Lst,~B,~N");c(b,"recalculateLeadMidpointsAndWingVectors",function(a){this.haveBioModels&&this.bioModelset.recalculatePoints(a)},"~N");c(b,"calcRasmolHydrogenBonds",function(a,b,c,e,f,h,k){this.haveBioModels&&this.bioModelset.calcAllRasmolHydrogenBonds(a,b,c,e,f,h,k,2)},"JU.BS,JU.BS,JU.Lst,~B,~N,~B,JU.BS");c(b,"calculateStraightnessAll",function(){this.haveBioModels&&!this.haveStraightness&&this.bioModelset.calculateStraightnessAll()});c(b,"calculateStruts",function(a,b){return this.haveBioModels?
this.bioModelset.calculateStruts(a,b):0},"JU.BS,JU.BS");c(b,"getGroupsWithin",function(a,b){return this.haveBioModels?this.bioModelset.getGroupsWithinAll(a,b):new JU.BS},"~N,JU.BS");c(b,"getProteinStructureState",function(a,b){return this.haveBioModels?this.bioModelset.getFullProteinStructureState(a,b):""},"JU.BS,~N");c(b,"calculateStructures",function(a,b,c,e,f,h){return this.haveBioModels?this.bioModelset.calculateAllStuctures(a,b,c,e,f,h):""},"JU.BS,~B,~B,~B,~B,~N");c(b,"calculateStructuresAllExcept",
function(a,b,c,e,f,h,k){this.freezeModels();return this.haveBioModels?this.bioModelset.calculateAllStructuresExcept(a,b,c,e,f,h,k):""},"JU.BS,~B,~B,~B,~B,~B,~N");c(b,"recalculatePolymers",function(a){this.bioModelset.recalculateAllPolymers(a,this.getGroups())},"JU.BS");c(b,"calculatePolymers",function(a,b,c,e){null!=this.bioModelset&&this.bioModelset.calculateAllPolymers(a,b,c,e)},"~A,~N,~N,JU.BS");c(b,"calcSelectedMonomersCount",function(){this.haveBioModels&&this.bioModelset.calcSelectedMonomersCount()});
c(b,"setProteinType",function(a,b){this.haveBioModels&&this.bioModelset.setAllProteinType(a,b)},"JU.BS,J.c.STR");c(b,"setStructureList",function(a){this.haveBioModels&&this.bioModelset.setAllStructureList(a)},"java.util.Map");c(b,"setConformation",function(a){this.haveBioModels&&this.bioModelset.setAllConformation(a);return JU.BSUtil.copy(a)},"JU.BS");c(b,"getHeteroList",function(a){a=this.haveBioModels?this.bioModelset.getAllHeteroList(a):null;return null==a?this.getInfoM("hetNames"):a},"~N");c(b,
"getUnitCellPointsWithin",function(a,b,c,e){var f=new JU.Lst,h=null,k=null;e&&(h=new java.util.Hashtable,k=new JU.Lst,h.put("atoms",k),h.put("points",f));var j=null==b?-1:b.nextSetBit(0);b=this.vwr.getModelUndeletedAtomsBitSet(0>j?this.vwr.am.cmi:this.at[j].mi);0>j&&(j=b.nextSetBit(0));if(0<=j){var E=this.getUnitCellForAtom(j);if(null!=E){b=E.getIterator(this.vwr,this.at[j],b,a);for(null!=c&&b.setCenter(c,a);b.hasNext();)j=b.next(),c=b.getPosition(),f.addLast(c),e&&k.addLast(Integer.$valueOf(j))}}return e?
h:f},"~N,JU.BS,JU.P3,~B");c(b,"calculateDssrProperty",function(a){null!=this.bioModelset&&this.bioModelset.haveDSSR&&this.bioModelset.getDSSRProperties(a)},"~S");c(b,"getAtomCIPChiralityCode",function(a){this.haveChirality=!0;var b=this.am[a.mi];b.hasChirality||(this.calculateChiralityForAtoms(b.bsAtoms,!1),b.hasChirality=!0);return a.getCIPChiralityCode()},"JM.Atom");c(b,"calculateChiralityForAtoms",function(a,b){this.haveChirality=!0;for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.at[c].setCIPChirality(0);
J.api.Interface.getSymmetry(this.vwr,"ms").calculateCIPChiralityForAtoms(this.vwr,a);if(!b)return null;for(var e="",c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))e+=this.at[c].getCIPChirality(!1);return e},"JU.BS,~B");c(b,"getPointTransf",function(a,b,c,e){this.isTrajectory(0<=a?a:b.mi)?this.trajectory.getFractional(b,e):e.setT(b);null!=c&&c.transform2(e,e)},"~N,JM.Atom,JU.Quat,JU.P3");c(b,"getSymmetryEquivAtoms",function(a,b,c){a=JU.BS.copy(a);var e=JU.BS.copy(a),f=a.nextSetBit(0);null==b&&(b=this.getUnitCellForAtom(f));
if(null!=b){null==c&&(c=this.vwr.getModelUndeletedAtomsBitSet(this.at[f].mi));b=JU.BSUtil.copy(c);for(c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.getSymmetryEquivAtomsForAtom(c,a,b,e)}return e},"JU.BS,J.api.SymmetryInterface,JU.BS");c(b,"getSymmetryEquivAtomsForAtom",function(a,b,c,e){a=this.at[a].getAtomSite();if(0<a)for(var f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1))this.at[f].getAtomSite()==a&&(e.set(f),null!=b&&(b.clear(f),c.clear(f)))},"~N,JU.BS,JU.BS,JU.BS");c(b,"setSpaceGroup",function(a,
b,c){null==this.unitCells&&(this.unitCells=Array(this.mc));this.unitCells[a]=b;this.haveUnitCells=!0;var e=1==b.getSpaceGroupOperationCount(),f=b.getFinalOperationCount();if(null!=c){var h=c.isEmpty(),k=this.vwr.getModelUndeletedAtomsBitSet(a);h?c=JU.BSUtil.copy(k):this.setAsymmetricUnit(a,k,c,!e);1<f&&this.setModelCage(a,null,!1);if(0<(null==this.atomSeqIDs?0:this.atomSeqIDs.length))for(var j=k.nextSetBit(0);0<=j;j=k.nextSetBit(j+1))this.atomSeqIDs[j]=0;if(e)this.fixP1AtomSites(b,k);else{for(var E=
null!=this.occupancies,p=b.getSymmetryOperations(),q=new JU.P3,r=new JU.P3,u=new JU.P3,n=0,s=c.nextSetBit(0);0<=s;s=c.nextSetBit(s+1)){j=this.at[s];r.setT(j);b.toFractional(r,!1);b.unitize(r);h&&this.setSite(j,++n,!0);n=j.atomSite;k.clear(s);var v=E?this.occupancies[s]:0,j=k.nextSetBit(h?s+1:0);a:for(;0<=j;j=k.nextSetBit(j+1)){var w=this.at[j];if(!(w.atomNumberFlags!=w.atomNumberFlags||E&&v!=this.occupancies[j])){q.setT(w);b.toFractional(q,!1);b.unitize(q);for(var x=0;x<f;x++)if(u.setT(r),p[x].rotTrans(u),
b.unitize(u),1.96E-6>u.distanceSquared(q)){this.setSite(w,n,!0);k.clear(j);c.clear(j);continue a}}}}k.isEmpty()||System.err.println("Model basis atoms not found for "+k);h&&this.setAsymmetricUnit(a,null,c,!e)}}this.setInfo(a,"unitCellParams",b.getUnitCellParams());this.setInfo(a,"spaceGroupAssigned",Boolean.TRUE);this.setInfo(a,"spaceGroupInfo",null);this.setInfo(a,"symmetryOperations",b.getSymopList(!1));this.setInfo(a,"spaceGroup",b.getSpaceGroupName());null!=this.am[a].simpleCage&&(b.getUnitCell(this.am[a].simpleCage.getUnitCellVectors(),
!1,null),this.setInfo(a,"unitCellParams",b.getUnitCellParams()));this.setModelCage(a,null,!1)},"~N,J.api.SymmetryInterface,JU.BS");c(b,"setAsymmetricUnit",function(a,b,c,e){null==b&&(b=this.vwr.getModelUndeletedAtomsBitSet(a));this.am[a].bsAsymmetricUnit=c;null==this.bsSymmetry&&(this.bsSymmetry=JU.BS.newN(this.ac));this.bsSymmetry.or(b);this.bsSymmetry.andNot(c);if(e){a=0;for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1)){var f=c.get(e);this.at[e].setSymop(f?1:0,!1);f&&this.setSite(this.at[e],++a,!1)}b.andNot(c)}},
"~N,JU.BS,JU.BS,~B");c(b,"setModelCage",function(a,b,c){0<=a&&a<this.mc&&(this.am[a].simpleCage=b,null!=b&&c&&this.setInfo(a,"unitCellParams",b.getUnitCellParams()),this.haveUnitCells=!0);return b},"~N,J.api.SymmetryInterface,~B");c(b,"fixP1AtomSites",function(a,b){if(!(null==a||1!=a.getSpaceGroupOperationCount()))for(var c=b.cardinality(),c=Array(c),e=0,f=a.getPrecision(),f=f*f,h=b.nextSetBit(0);0<=h;h=b.nextSetBit(h+1)){var k=this.at[h],j=new JU.A4;j.setT(k);a.toFractional(j,!1);a.unitize(j);for(var E=
!1,p=0;p<e;p++){var q=c[p];if(k.atomNumberFlags==q.angle&&q.distanceSquared(j)<f){E=!0;this.setSite(k,p+1,!0);break}}E||(j.angle=k.atomNumberFlags,c[e]=j,this.setSite(k,++e,!0))}},"J.api.SymmetryInterface,JU.BS");c(b,"getBasisAtom",function(a,b){var c=this.at[a];if(!b||null!=this.getUnitCellForAtom(a)){var e=c.atomSite;if(0<e){var f=this.am[c.mi].bsAsymmetricUnit;if(null!=f)for(var h=f.nextSetBit(0);0<=h;h=f.nextSetBit(h+1))if(this.at[h].atomSite==e)return this.at[h]}}return c},"~N,~B");c(b,"updateBasisFromSite",
function(a){if(null!=this.getUnitCell(a)){var b=this.am[a].bsAsymmetricUnit;if(null!=b){b.clearAll();var c=new JU.BS;a=this.am[a].bsAtoms;for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))if(!JM.AtomCollection.isDeleted(this.at[e])){var f=this.at[e].atomSite;c.get(f)||(c.set(f),b.set(e))}for(var h=F(c.length(),0),f=0,e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))h[e]=++f;for(e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))JM.AtomCollection.isDeleted(this.at[e])||(f=this.at[e].atomSite,this.setSite(this.at[e],
-1,!1),this.setSite(this.at[e],h[f],!0));null==this.bsSymmetry&&(this.bsSymmetry=JU.BS.newN(this.ac));this.bsSymmetry.or(a);this.bsSymmetry.andNot(b)}}},"~N");c(b,"getConnectingAtoms",function(a,b){for(var c=new JU.BS,e=new JU.BS,f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))for(var h=this.at[f],k=h.bonds,j=0,E=h.getBondCount();0<=--E;)if(k[E].isCovalent()&&!a.get(j=k[E].getOtherAtom(h).i))c.set(f),e.set(j);a.or(e);b.or(e);return c},"JU.BS,JU.BS");c(b,"saveAtomPositions",function(){for(var a=Array(this.at.length),
b=a.length;0<=--b;){var c=this.at[b];JM.AtomCollection.isDeleted(c)||(a[b]=JU.P3.newP(c))}return a});c(b,"restoreAtomPositions",function(a){for(var b=a.length;0<=--b;){var c=this.at[b];JM.AtomCollection.isDeleted(c)||c.setT(a[b])}},"~A");c(b,"clearUnitCell",function(a){if(null!=this.unitCells){if(0>a)for(a=0;a<this.mc;a++)this.clearUnitCell(a);else if(this.am[a].simpleCage=null,a<this.unitCells.length){this.unitCells[a]=null;for(a=this.getModelAuxiliaryInfo(a).entrySet().iterator();a.hasNext();)JV.JC.isSpaceGroupInfoKey(a.next().getKey())&&
a.remove();if(1<this.mc)return}this.unitCells=null;this.haveUnitCells=!1}},"~N");c(b,"fixDeletedBonds",function(a){var b=new JU.BS;if(null==this.bo)return a;for(var c=0,e=0;c<this.bondCount;c++)null!=this.bo[c]&&(0<=e&&b.setBitTo(c,a.get(e)),e++);return b},"JU.BS");c(b,"getEquivalentAtoms",function(a){var b=this.vwr.getModelUndeletedAtomsBitSet(this.at[a].mi);b.and(this.getAtomBitsMaybeDeleted(1094713369,JU.BSUtil.newAndSetBit(a)));return b},"~N");c(b,"morphAtoms",function(a,b,c,e,f){for(var h=a.nextSetBit(0);0<=
h;h=a.nextSetBit(h+1),c++){var k=this.vwr.ms.at[h];f.sub2(b[1][c],b[0][c]);f.scaleAdd2(e,f,b[0][c]);k.setT(f);this.taintAtom(h,2)}},"JU.BS,~A,~N,~N,JU.P3");c(b,"getCurrentSpinAtoms",function(){var a=this.vwr.getVisibleFramesBitSet();this.includeAllRelatedFrames(a,!0);a=this.vwr.getModelUndeletedAtomsBitSetBs(a);a.and(this.getAtoms(1095241729,a));return a});c(b,"getSpin",function(a){var b=this.at[a];if(null==b)return 0;var c=this.vibrations[a];if(null==c||0==c.magMoment)return 0;b=b.getSymOp()-1;if(0>
b)return 0;a=this.getUnitCellForAtom(a);return null==a?0:a.getSpinIndex(b)+1},"~N");c(b,"refreshDataFramePointGroup",function(a){a=this.getUnitCell(-1-a);null!=a&&a.updatePointGroup()},"~N");c(b,"getStructureAssignments",function(){null!=this.bioModelset&&this.bioModelset.haveDSSR&&this.bioModelset.getStructureDSSRAssignments()});c(b,"getAtomicDSSRDataFloat",function(a,b){return null!=this.bioModelset&&this.bioModelset.haveDSSR?this.bioModelset.getAtomicDSSRDataFloat(a,b):NaN},"~S,~N");c(b,"getDSSRProperties",
function(a){return null!=this.bioModelset&&this.bioModelset.haveDSSR?this.bioModelset.getDSSRProperties(a):null},"~S");var a=n(function(){this.isValid=!1;this.parts=this.stringData=this.floatData=this.key=this.dataPath=null;v(this,arguments)},JM.ModelSet,"DataList",null);A(a,function(a){this.dataPath=a;this.parts=a.$plit("\\.")},"~S");c(a,"setFloats",function(a){if(null!=this.floatData&&this.floatData.length>=a)return this.floatData;this.stringData=null;this.floatData=L(a,0);for(var b=0;b<a;b++)this.floatData[b]=
NaN;this.isValid=!0;return this.floatData},"~N");c(a,"setStringData",function(a){if(null!=this.stringData&&this.stringData.length>=a)return this.stringData;this.floatData=null;this.stringData=Array(a);this.isValid=!0;return this.stringData},"~N");c(a,"isFloat",function(){return null!=this.floatData});c(a,"getData",function(){return this.isFloat()?this.floatData:this.stringData});b.hbondMinRasmol=2.5});s("JM");B(["JU.M3","$.P3"],"JM.Orientation",["JU.PT","JU.Escape"],function(){var b=n(function(){this.rotationMatrix=
this.saveName=null;this.rotationRadius=this.zoom=this.yTrans=this.xTrans=0;this.navCenter=this.center=null;this.cameraY=this.cameraX=this.cameraDepth=this.navDepth=this.yNav=this.xNav=NaN;this.navigationMode=this.windowCenteredFlag=!1;this.vwr=this.pymolView=this.moveToText=null;v(this,arguments)},JM,"Orientation",null);P(b,function(){this.rotationMatrix=new JU.M3;this.center=new JU.P3;this.navCenter=new JU.P3});A(b,function(a,b,c){this.vwr=a;null!=c?(this.pymolView=c,this.moveToText="moveTo -1.0 PyMOL "+
JU.Escape.eAF(c)):(a.finalizeTransformParameters(),b?(b=a.ms.getInfoM("defaultOrientationMatrix"),null==b?this.rotationMatrix.setScale(1):this.rotationMatrix.setM3(b)):a.tm.getRotation(this.rotationMatrix),this.xTrans=a.tm.getTranslationXPercent(),this.yTrans=a.tm.getTranslationYPercent(),this.zoom=a.tm.getZoomSetting(),this.center.setT(a.tm.fixedRotationCenter),this.windowCenteredFlag=a.tm.isWindowCentered(),this.rotationRadius=a.getFloat(570425388),this.navigationMode=a.getBoolean(603979889),this.moveToText=
a.tm.getMoveToText(-1,!1),this.navigationMode&&(this.xNav=a.tm.getNavigationOffsetPercent("X"),this.yNav=a.tm.getNavigationOffsetPercent("Y"),this.navDepth=a.tm.navigationDepthPercent,this.navCenter=JU.P3.newP(a.tm.navigationCenter)),0!=a.tm.camera.z&&(this.cameraDepth=a.tm.getCameraDepth(),this.cameraX=a.tm.camera.x,this.cameraY=a.tm.camera.y))},"JV.Viewer,~B,~A");j(b,"toString",function(){return"[Orientation "+this.saveName+" "+this.rotationRadius+"]"});c(b,"getMoveToText",function(a){return a?
"   "+this.moveToText+"\n  save orientation "+JU.PT.esc(this.saveName.substring(12))+";\n":this.moveToText},"~B");c(b,"restore",function(a,b){b?(this.vwr.setBooleanProperty("windowCentered",this.windowCenteredFlag),this.vwr.setBooleanProperty("navigationMode",this.navigationMode),null==this.pymolView?this.vwr.moveTo(null,a,this.center,null,NaN,this.rotationMatrix,this.zoom,this.xTrans,this.yTrans,this.rotationRadius,this.navCenter,this.xNav,this.yNav,this.navDepth,this.cameraDepth,this.cameraX,this.cameraY):
this.vwr.tm.moveToPyMOL(this.vwr.eval,a,this.pymolView)):this.vwr.tm.setRotation(this.rotationMatrix);return!0},"~N,~B")});s("JM");B(null,"JM.StateScript",["JU.SB","JU.BSUtil","$.Escape"],function(){var b=n(function(){this.modelIndex=0;this.script2=this.script1=this.bsAtoms2=this.bsAtoms1=this.bsBonds=null;this.inDefinedStateBlock=!1;v(this,arguments)},JM,"StateScript",null);A(b,function(a,b,c,l,e,f,h){this.modelIndex=a;this.script1=b;this.bsBonds=JU.BSUtil.copy(c);this.bsAtoms1=JU.BSUtil.copy(l);
this.bsAtoms2=JU.BSUtil.copy(e);this.script2=f;this.inDefinedStateBlock=h},"~N,~S,JU.BS,JU.BS,JU.BS,~S,~B");c(b,"isValid",function(){return null!=this.script1&&0<this.script1.length&&(null==this.bsBonds||0<=this.bsBonds.nextSetBit(0))&&(null==this.bsAtoms1||0<=this.bsAtoms1.nextSetBit(0))&&(null==this.bsAtoms2||0<=this.bsAtoms2.nextSetBit(0))});j(b,"toString",function(){if(!this.isValid())return"";var a=JU.SB.newS(this.script1);null!=this.bsBonds&&a.append(" ").append(JU.Escape.eBond(this.bsBonds));
null!=this.bsAtoms1&&a.append(" ").append(JU.Escape.eBS(this.bsAtoms1));null!=this.bsAtoms2&&a.append(" ").append(JU.Escape.eBS(this.bsAtoms2));null!=this.script2&&a.append(" ").append(this.script2);a=a.toString();a.endsWith(";")||(a+=";");return a});c(b,"isConnect",function(){return 0<=this.script1.indexOf("connect")});c(b,"deleteAtoms",function(a,b,c){if(a==this.modelIndex)return!1;if(a>this.modelIndex)return!0;JU.BSUtil.deleteBits(this.bsBonds,b);JU.BSUtil.deleteBits(this.bsAtoms1,c);JU.BSUtil.deleteBits(this.bsAtoms2,
c);return this.isValid()},"~N,JU.BS,JU.BS");c(b,"setModelIndex",function(a){this.modelIndex=a},"~N")});s("JM");O(JM,"Structure");s("JM");z=n(function(){this.id="";this.type=" ";this.scale=this.tickLabelFormats=this.ticks=null;this.first=0;this.signFactor=1;this.reference=null;v(this,arguments)},JM,"TickInfo",null);A(z,function(b){this.ticks=b},"JU.P3");s("JU");B(["JU.P3","$.V3"],"JU.BoxInfo",["java.util.Hashtable","JU.Measure","$.P4","JU.Point3fi"],function(){var b=n(function(){this.bbVertices=this.bbVector=
this.bbCenter=this.bbCorner1=this.bbCorner0=null;this.isScaleSet=!1;this.margin=0;v(this,arguments)},JU,"BoxInfo",null);P(b,function(){this.bbCorner0=new JU.P3;this.bbCorner1=new JU.P3;this.bbCenter=new JU.P3;this.bbVector=new JU.V3;this.bbVertices=Array(8);for(var a=0;8>a;a++)JU.BoxInfo.unitBboxPoints[a]=JU.P3.new3(-1,-1,-1),JU.BoxInfo.unitBboxPoints[a].scaleAdd2(2,JU.BoxInfo.unitCubePoints[a],JU.BoxInfo.unitBboxPoints[a])});A(b,function(){for(var a=8;0<=--a;)this.bbVertices[a]=new JU.Point3fi;this.reset()});
c(b,"reset",function(){this.isScaleSet=!1;this.bbCorner0.set(3.4028235E38,3.4028235E38,3.4028235E38);this.bbCorner1.set(-3.4028235E38,-3.4028235E38,-3.4028235E38)});b.scaleBox=c(b,"scaleBox",function(a,b){if(!(0==b||1==b)){for(var c=new JU.P3,l=new JU.V3,e=0;8>e;e++)c.add(a[e]);c.scale(0.125);for(e=0;8>e;e++)l.sub2(a[e],c),l.scale(b),a[e].add2(c,l)}},"~A,~N");b.getVerticesFromOABC=c(b,"getVerticesFromOABC",function(a){for(var b=Array(8),c=0;7>=c;c++)b[c]=JU.P3.newP(a[0]),4==(c&4)&&b[c].add(a[1]),
2==(c&2)&&b[c].add(a[2]),1==(c&1)&&b[c].add(a[3]);return b},"~A");b.getCanonicalCopy=c(b,"getCanonicalCopy",function(a,b){for(var c=Array(8),l=0;8>l;l++)c[JU.BoxInfo.toCanonical[l]]=JU.P3.newP(a[l]);JU.BoxInfo.scaleBox(c,b);return c},"~A,~N");b.toOABC=c(b,"toOABC",function(a,b){var c=JU.P3.newP(a[0]),l=JU.P3.newP(a[4]),e=JU.P3.newP(a[2]),f=JU.P3.newP(a[1]);l.sub(c);e.sub(c);f.sub(c);null!=b&&c.add(b);return x(-1,[c,l,e,f])},"~A,JU.T3");c(b,"getBoundBoxCenter",function(){this.isScaleSet||this.setBbcage(1);
return this.bbCenter});c(b,"getBoundBoxCornerVector",function(){this.isScaleSet||this.setBbcage(1);return this.bbVector});c(b,"getBoundBoxPoints",function(a){this.isScaleSet||this.setBbcage(1);return a?x(-1,[this.bbCenter,JU.P3.newP(this.bbVector),this.bbCorner0,this.bbCorner1]):x(-1,[this.bbCorner0,this.bbCorner1])},"~B");c(b,"getBoundBoxVertices",function(){this.isScaleSet||this.setBbcage(1);return this.bbVertices});c(b,"setBoundBoxFromOABC",function(a){for(var b=JU.P3.newP(a[0]),c=new JU.P3,l=
0;4>l;l++)c.add(a[l]);this.setBoundBox(b,c,!0,1)},"~A");c(b,"setBoundBox",function(a,b,c,l){if(null!=a){if(0==l)return;if(c){if(0==a.distance(b))return;this.bbCorner0.set(Math.min(a.x,b.x),Math.min(a.y,b.y),Math.min(a.z,b.z));this.bbCorner1.set(Math.max(a.x,b.x),Math.max(a.y,b.y),Math.max(a.z,b.z))}else{if(0==b.x||0==b.y&&0==b.z)return;this.bbCorner0.set(a.x-b.x,a.y-b.y,a.z-b.z);this.bbCorner1.set(a.x+b.x,a.y+b.y,a.z+b.z)}}this.setBbcage(l)},"JU.T3,JU.T3,~B,~N");c(b,"setMargin",function(a){this.margin=
a},"~N");c(b,"addBoundBoxPoint",function(a){this.isScaleSet=!1;JU.BoxInfo.addPoint(a,this.bbCorner0,this.bbCorner1,this.margin)},"JU.T3");b.addPoint=c(b,"addPoint",function(a,b,c,l){a.x-l<b.x&&(b.x=a.x-l);a.x+l>c.x&&(c.x=a.x+l);a.y-l<b.y&&(b.y=a.y-l);a.y+l>c.y&&(c.y=a.y+l);a.z-l<b.z&&(b.z=a.z-l);a.z+l>c.z&&(c.z=a.z+l)},"JU.T3,JU.T3,JU.T3,~N");b.addPointXYZ=c(b,"addPointXYZ",function(a,b,c,l,e,f){a-f<l.x&&(l.x=a-f);a+f>e.x&&(e.x=a+f);b-f<l.y&&(l.y=b-f);b+f>e.y&&(e.y=b+f);c-f<l.z&&(l.z=c-f);c+f>e.z&&
(e.z=c+f)},"~N,~N,~N,JU.P3,JU.P3,~N");c(b,"setBbcage",function(a){this.isScaleSet=!0;this.bbCenter.add2(this.bbCorner0,this.bbCorner1);this.bbCenter.scale(0.5);this.bbVector.sub2(this.bbCorner1,this.bbCenter);0<a?this.bbVector.scale(a):(this.bbVector.x-=a/2,this.bbVector.y-=a/2,this.bbVector.z-=a/2);for(var b=8;0<=--b;){var c=this.bbVertices[b];c.setT(JU.BoxInfo.unitBboxPoints[b]);c.x*=this.bbVector.x;c.y*=this.bbVector.y;c.z*=this.bbVector.z;c.add(this.bbCenter)}1!=a&&(this.bbCorner0.setT(this.bbVertices[0]),
this.bbCorner1.setT(this.bbVertices[7]))},"~N");c(b,"isWithin",function(a){this.isScaleSet||this.setBbcage(1);return a.x>=this.bbCorner0.x&&a.x<=this.bbCorner1.x&&a.y>=this.bbCorner0.y&&a.y<=this.bbCorner1.y&&a.z>=this.bbCorner0.z&&a.z<=this.bbCorner1.z},"JU.P3");c(b,"getMaxDim",function(){return 2*this.bbVector.length()});c(b,"getInfo",function(a){var b=Double.$valueOf(Math.abs(8*this.bbVector.x*this.bbVector.y*this.bbVector.z));if("volume".equals(a))return b;var c=JU.P3.newP(this.bbCenter);return"center".equals(a)?
c:null==a||"info".equals(a)?(a=new java.util.Hashtable,a.put("center",c),c=JU.V3.newVsub(this.bbCorner1,this.bbCorner0),a.put("dimensions",c),a.put("girth",Double.$valueOf(c.x+c.y+c.z)),a.put("area",Double.$valueOf(2*(c.x*c.y+c.x*c.z+c.z*c.y))),a.put("volume",b),a):null},"~S");j(b,"toString",function(){return""+this.bbCorner0+this.bbCorner1});b.getBoxFacesFromOABC=c(b,"getBoxFacesFromOABC",function(a){var b=Array(6),c=new JU.V3,l=new JU.V3,e=new JU.P3,f=new JU.P3,h=new JU.P3;a=null==a?JU.BoxInfo.unitCubePoints:
JU.BoxInfo.getVerticesFromOABC(a);for(var k=0;6>k;k++)e.setT(a[JU.BoxInfo.facePoints[k][0]]),f.setT(a[JU.BoxInfo.facePoints[k][1]]),h.setT(a[JU.BoxInfo.facePoints[k][2]]),b[k]=JU.Measure.getPlaneThroughPoints(e,f,h,c,l,new JU.P4);return b},"~A");b.bbcageTickEdges=Y(-1,"z\x00\x00yx\x00\x00\x00\x00\x00\x00\x00".split(""));b.uccageTickEdges=Y(-1,"zyx\x00\x00\x00\x00\x00\x00\x00\x00\x00".split(""));b.edges=Q(-1,[0,1,0,2,0,4,1,3,1,5,2,3,2,6,3,7,4,5,4,6,5,7,6,7]);b.faceOrder=F(-1,[0,3,5,2,1,4]);b.facePoints=
x(-1,[F(-1,[4,0,6]),F(-1,[4,6,5]),F(-1,[5,7,1]),F(-1,[1,3,0]),F(-1,[6,2,7]),F(-1,[1,0,5]),F(-1,[0,2,6]),F(-1,[6,7,5]),F(-1,[7,3,1]),F(-1,[3,2,0]),F(-1,[2,3,7]),F(-1,[0,4,5])]);b.unitCubePoints=x(-1,[JU.P3.new3(0,0,0),JU.P3.new3(0,0,1),JU.P3.new3(0,1,0),JU.P3.new3(0,1,1),JU.P3.new3(1,0,0),JU.P3.new3(1,0,1),JU.P3.new3(1,1,0),JU.P3.new3(1,1,1)]);b.toCanonical=F(-1,[0,3,4,7,1,2,5,6]);b.unitBboxPoints=Array(8)});s("JU");B(["JU.BS"],"JU.BSUtil",null,function(){var b=I(JU,"BSUtil",null);b.newAndSetBit=c(b,
"newAndSetBit",function(a){var b=JU.BS.newN(a+1);b.set(a);return b},"~N");b.areEqual=c(b,"areEqual",function(a,b){return null==a||null==b?null==a&&null==b:a.equals(b)},"JU.BS,JU.BS");b.haveCommon=c(b,"haveCommon",function(a,b){return null==a||null==b?!1:a.intersects(b)},"JU.BS,JU.BS");b.cardinalityOf=c(b,"cardinalityOf",function(a){return null==a?0:a.cardinality()},"JU.BS");b.newBitSet2=c(b,"newBitSet2",function(a,b){var c=JU.BS.newN(b);c.setBits(a,b);return c},"~N,~N");b.setAll=c(b,"setAll",function(a){var b=
JU.BS.newN(a);b.setBits(0,a);return b},"~N");b.andNot=c(b,"andNot",function(a,b){null!=b&&null!=a&&a.andNot(b);return a},"JU.BS,JU.BS");b.copy=c(b,"copy",function(a){return null==a?null:a.clone()},"JU.BS");b.copy2=c(b,"copy2",function(a,b){if(null==a||null==b)return null;b.clearAll();b.or(a);return b},"JU.BS,JU.BS");b.copyInvert=c(b,"copyInvert",function(a,b){return null==a?null:JU.BSUtil.andNot(JU.BSUtil.setAll(b),a)},"JU.BS,~N");b.invertInPlace=c(b,"invertInPlace",function(a,b){return JU.BSUtil.copy2(JU.BSUtil.copyInvert(a,
b),a)},"JU.BS,~N");b.toggleInPlace=c(b,"toggleInPlace",function(a,b){a.equals(b)?a.clearAll():0==JU.BSUtil.andNot(JU.BSUtil.copy(b),a).length()?JU.BSUtil.andNot(a,b):a.or(b);return a},"JU.BS,JU.BS");b.deleteBits=c(b,"deleteBits",function(a,b){if(null==a||null==b)return a;var c=b.nextSetBit(0);if(0>c)return a;var l=a.length(),e=Math.min(l,b.length()),f;for(f=b.nextClearBit(c);f<e&&0<=f;f=b.nextClearBit(f+1))a.setBitTo(c++,a.get(f));for(f=e;f<l;f++)a.setBitTo(c++,a.get(f));c<l&&a.clearBits(c,l);return a},
"JU.BS,JU.BS");b.shiftBits=c(b,"shiftBits",function(a,b,c,l){if(!(null==a||null==b)){for(var e=b.length(),f=JU.BS.newN(e),h=!1,k=!1,j=c,E=0,p=0;E<e&&p<l;E++)b.get(E)?(k&&f.set(E),j=c,h=!1):a.get(p++)?(f.set(E),j&&(j=!1,k=h=!0)):j&&!h&&(k=!1);a.clearAll();a.or(f)}},"JU.BS,JU.BS,~B,~N");b.offset=c(b,"offset",function(a,b,c){if(null!=a){for(var l=JU.BS.newN(a.length()+c),e=a.nextSetBit(0);e>=b;e=a.nextSetBit(e+1))l.set(e+c);JU.BSUtil.copy2(l,a)}},"JU.BS,~N,~N");b.setMapBitSet=c(b,"setMapBitSet",function(a,
b,c,l){var e;a.containsKey(l)?e=a.get(l):a.put(l,e=new JU.BS);e.setBits(b,c+1)},"java.util.Map,~N,~N,~S");b.emptySet=new JU.BS});s("JU");B(["JU.Int2IntHash"],"JU.C","JU.AU $.CU $.PT $.SB J.c.PAL JU.Escape $.Logger".split(" "),function(){var b=I(JU,"C",null);b.getColix=c(b,"getColix",function(a){if(0==a)return 0;a|=4278190080;var b=JU.C.colixHash.get(a);return(0<b?b:JU.C.allocateColix(a,!1))|0},"~N");b.allocateColix=c(b,"allocateColix",function(a,b){var c;if(b)c=2047;else{if(-74566==a)return 3;for(c=
JU.C.colixMax;4<=--c;)if((a&16777215)==(JU.C.argbs[c]&16777215))return c;c=JU.C.colixMax}if(c>=JU.C.argbs.length){var e=b?c+1:2*JU.C.colixMax;2048<e&&(e=2048);JU.C.argbs=JU.AU.arrayCopyI(JU.C.argbs,e);null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale=JU.AU.arrayCopyI(JU.C.argbsGreyscale,e))}JU.C.argbs[c]=a;null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale[c]=JU.CU.toFFGGGfromRGB(a));JU.C.colixHash.put(a,c);return 2047>c?JU.C.colixMax++:JU.C.colixMax},"~N,~B");b.setLastGrey=c(b,"setLastGrey",function(a){JU.C.calcArgbsGreyscale();
JU.C.argbsGreyscale[2047]=JU.CU.toFFGGGfromRGB(a)},"~N");b.calcArgbsGreyscale=c(b,"calcArgbsGreyscale",function(){if(null==JU.C.argbsGreyscale){for(var a=F(JU.C.argbs.length,0),b=JU.C.argbs.length;4<=--b;)a[b]=JU.CU.toFFGGGfromRGB(JU.C.argbs[b]);JU.C.argbsGreyscale=a}});b.getArgbGreyscale=c(b,"getArgbGreyscale",function(a){null==JU.C.argbsGreyscale&&JU.C.calcArgbsGreyscale();return JU.C.argbsGreyscale[a&-30721]},"~N");b.getColixO=c(b,"getColixO",function(a){if(null==a)return 0;if(y(a,"J.c.PAL"))return a===
J.c.PAL.NONE?0:2;if(y(a,Integer))return JU.C.getColix(a.intValue());if("string"==typeof a)return JU.C.getColixS(a);if(y(a,Byte))return 0==a.byteValue()?0:2;JU.Logger.debugging&&JU.Logger.debug("?? getColix("+a+")");return 22},"~O");b.getTranslucentFlag=c(b,"getTranslucentFlag",function(a){return 0==a?0:0>a?30720:Float.isNaN(a)||255<=a||1==a?16384:(w(Math.floor(1>a?256*a:15<=a?a:9>=a?w(Math.floor(a-1))<<5:256))>>5&15)<<11},"~N");b.isColixLastAvailable=c(b,"isColixLastAvailable",function(a){return 0<
a&&2047==(a&2047)},"~N");b.getArgb=c(b,"getArgb",function(a){return JU.C.argbs[a&-30721]},"~N");b.isColixColorInherited=c(b,"isColixColorInherited",function(a){switch(a){case 0:case 1:return!0;default:return 1==(a&-30721)}},"~N");b.getColixInherited=c(b,"getColixInherited",function(a,b){switch(a){case 0:return b;case 1:return b&-30721;default:return 1==(a&-30721)?b&-30721|a&30720:a}},"~N,~N");b.renderPass2=c(b,"renderPass2",function(a){a&=30720;return 0!=a&&30720!=a},"~N");b.isColixTranslucent=c(b,
"isColixTranslucent",function(a){return 0!=(a&30720)},"~N");b.getChangeableColixIndex=c(b,"getChangeableColixIndex",function(a){return 0<=a?-1:a&2047},"~N");b.getColixTranslucent3=c(b,"getColixTranslucent3",function(a,b,c){a&=-30721;0==a&&(a=1);return b?a|JU.C.getTranslucentFlag(c):a},"~N,~B,~N");b.copyColixTranslucency=c(b,"copyColixTranslucency",function(a,b){return JU.C.getColixTranslucent3(b,JU.C.isColixTranslucent(a),JU.C.getColixTranslucencyLevel(a))},"~N,~N");b.getColixTranslucencyFractional=
c(b,"getColixTranslucencyFractional",function(a){a=JU.C.getColixTranslucencyLevel(a);return-1==a?0.5:0==a?0:255==a?1:a/256},"~N");b.getColixTranslucencyLabel=c(b,"getColixTranslucencyLabel",function(a){return"translucent "+(30720==(a&30720)?-1:JU.C.getColixTranslucencyFractional(a))},"~N");b.getColixTranslucencyLevel=c(b,"getColixTranslucencyLevel",function(a){a=a>>11&15;switch(a){case 0:return 0;case 1:case 2:case 3:case 4:case 5:case 6:case 7:return a<<5;case 15:return-1;default:return 255}},"~N");
b.isTransparent=c(b,"isTransparent",function(a){return 16384==(a&30720)},"~N");b.getColixS=c(b,"getColixS",function(a){var b=JU.CU.getArgbFromString(a);return 0!=b?JU.C.getColix(b):"none".equalsIgnoreCase(a)?0:"opaque".equalsIgnoreCase(a)?1:2},"~S");b.getColixArray=c(b,"getColixArray",function(a){if(null==a||0==a.length)return null;a=JU.PT.getTokens(a);for(var b=V(a.length,0),c=0;c<a.length;c++)if(b[c]=JU.C.getColix(JU.CU.getArgbFromString(a[c])),0==b[c])return null;return b},"~S");b.getHexCode=c(b,
"getHexCode",function(a){return JU.Escape.escapeColor(JU.C.getArgb(a))},"~N");b.getHexCodes=c(b,"getHexCodes",function(a){if(null==a)return null;for(var b=new JU.SB,c=0;c<a.length;c++)b.append(0==c?"":" ").append(JU.C.getHexCode(a[c]));return b.toString()},"~A");b.getColixTranslucent=c(b,"getColixTranslucent",function(a){var b=a>>24&255;return 255==b?JU.C.getColix(a):JU.C.getColixTranslucent3(JU.C.getColix(a),!0,b/255)},"~N");b.getBgContrast=c(b,"getBgContrast",function(a){return 128>(JU.CU.toFFGGGfromRGB(a)&
255)?8:4},"~N");b.getColixShadedRGB=c(b,"getColixShadedRGB",function(a){return JU.C.getShadedRGB(JU.C.getArgb(a),JU.C.getColixTranslucencyFractional(a))},"~N");b.getShadedRGB=c(b,"getShadedRGB",function(a,b){return 0==b?a:JU.C.getShade(a,b)},"~N,~N");b.getShade=c(b,"getShade",function(a,b){var c=1-b;return JU.C.shade(a,16,c)|JU.C.shade(a,8,c)|JU.C.shade(a,0,c)},"~N,~N");b.shade=c(b,"shade",function(a,b,c){return Math.max(0,Math.min(w(((a>>b&255)-255)*c+255),255))<<b},"~N,~N,~N");b.colixMax=4;b.argbs=
F(128,0);JU.C.argbs[3]=-74566;b.argbsGreyscale=null;b.colixHash=new JU.Int2IntHash(256);for(var b=F(-1,[4278190080,4294944E3,4294951115,4278190335,4294967295,4278255615,4294901760,4278222848,4286611584,4290822336,4278255360,4286578688,4278190208,4286611456,4286578816,4278222976,4294902015,4294967040,4294928820,4294956800]),a=0;a<b.length;++a)JU.C.getColix(b[a])});s("JU");B(null,"JU.ColorEncoder","java.util.Hashtable JU.AU $.CU $.Lst $.PT $.Rdr J.c.PAL JU.C $.Escape $.Logger JV.FileManager $.JC".split(" "),
function(){var b=n(function(){this.argbsNucleic=this.argbsAmino=this.argbsShapely=this.argbsRwb=this.argbsRoygb=this.argbsCpk=this.paletteFriendly=this.paletteWB=this.paletteBW=this.vwr=null;this.ihalf=0;this.schemes=null;this.currentPalette=0;this.currentSegmentCount=1;this.isTranslucent=!1;this.hi=this.lo=0;this.isReversed=!1;this.thisScale=this.userScale=null;this.thisName="scheme";this.isColorIndex=!1;this.ce=null;v(this,arguments)},JU,"ColorEncoder",null);P(b,function(){this.userScale=F(-1,[-8355712]);
this.thisScale=F(-1,[-8355712])});A(b,function(a,b){null==a?(this.vwr=b,this.schemes=new java.util.Hashtable,this.argbsCpk=J.c.PAL.argbsCpk,this.argbsRoygb=JV.JC.argbsRoygbScale,this.argbsRwb=JV.JC.argbsRwbScale,this.argbsAmino=this.argbsNucleic=this.argbsShapely=null,this.ihalf=w(JV.JC.argbsRoygbScale.length/3),this.ce=this):(this.ce=a,this.vwr=a.vwr,this.schemes=a.schemes)},"JU.ColorEncoder,JV.Viewer");c(b,"clearCache",function(){this.schemes.clear()});b.getSchemeIndex=c(b,"getSchemeIndex",function(a){for(var b=
0;b<JU.ColorEncoder.colorSchemes.length;b++)if(JU.ColorEncoder.colorSchemes[b].equalsIgnoreCase(a))return 16<=b?b-16:13>b?b:-b;return-1},"~S");b.fixName=c(b,"fixName",function(a){if(a.equalsIgnoreCase("byelement"))return"byelement_jmol";var b=JU.ColorEncoder.getSchemeIndex(a);return 0<=b?JU.ColorEncoder.colorSchemes[b]:0<=a.indexOf("/")?a:a.toLowerCase()},"~S");c(b,"makeColorScheme",function(a,b,c){a=JU.ColorEncoder.fixName(a);if(null==b){this.schemes.remove(a);a=this.createColorScheme(a,!1,c);if(c)switch(a){case 2147483647:return 0;
case 12:this.paletteFriendly=this.getPaletteAC();break;case 10:this.paletteBW=this.getPaletteBW();break;case 11:this.paletteWB=this.getPaletteWB();break;case 0:case 1:this.argbsRoygb=JV.JC.argbsRoygbScale;break;case 6:case 7:this.argbsRwb=JV.JC.argbsRwbScale;break;case 2:this.argbsCpk=J.c.PAL.argbsCpk;break;case 3:JU.ColorEncoder.getRasmolScale();break;case 17:this.getNucleic();break;case 5:this.getAmino();break;case 4:this.getShapely()}return a}this.schemes.put(a,b);this.setThisScheme(a,b);a=this.createColorScheme(a,
!1,c);if(c)switch(a){case 10:this.paletteBW=this.thisScale;break;case 11:this.paletteWB=this.thisScale;break;case 0:case 1:this.argbsRoygb=this.thisScale;this.ihalf=w(this.argbsRoygb.length/3);break;case 6:case 7:this.argbsRwb=this.thisScale;break;case 2:this.argbsCpk=this.thisScale;break;case 5:this.argbsAmino=this.thisScale;break;case 17:this.argbsNucleic=this.thisScale;break;case 4:this.argbsShapely=this.thisScale}return-1},"~S,~A,~B");c(b,"getShapely",function(){return null==this.argbsShapely?
this.argbsShapely=this.vwr.getJBR().getArgbs(1073742144):this.argbsShapely});c(b,"getAmino",function(){return null==this.argbsAmino?this.argbsAmino=this.vwr.getJBR().getArgbs(2097154):this.argbsAmino});c(b,"getNucleic",function(){return null==this.argbsNucleic?this.argbsNucleic=this.vwr.getJBR().getArgbs(2097166):this.argbsNucleic});c(b,"createColorScheme",function(a,b,c){if(a.equalsIgnoreCase("inherit"))return 15;var l=a.lastIndexOf("="),e=a.indexOf("/"),f=Math.max(l,a.indexOf("[")),l=JU.ColorEncoder.fixName(a),
h=JU.ColorEncoder.getSchemeIndex(l);if(-1==h&&(0>f||0<e)){c=a;e=this.schemes.get(l);if(null==e)try{var k="~"==c.charAt(1);k&&(c=c.substring(1));for(l=null;;){if(0>c.indexOf("/")){0>c.indexOf(".")&&(c+=".lut.txt");var j=Array(1);try{JU.Logger.info("ColorEncoder opening colorschemes/"+c),JU.Rdr.readAllAsString(JV.FileManager.getBufferedReaderForResource(this.vwr,JU.C,"JU/","colorschemes/"+c),-1,!1,j,0)}catch(E){if(H(E,"java.io.IOException")){JU.Logger.info("ColorEncoder "+E);break}else throw E;}c=j[0]}else{c=
JU.PT.rep(c," ","%20");JU.Logger.info("ColorEncoder opening "+c);var p=this.vwr.fm.getFileAsBytes(c,null);if("string"==typeof p){JU.Logger.info("ColorEncoder "+p);break}l=p;JU.Logger.info("ColorEncoder read "+l.length+" bytes");var j=0,q=l.length;if(800==q||802==q)j=32;if(768==q-j||770==q-j)for(var e=F(256,0),q=256+j,r=0;256>r;r++)e[r]=JU.CU.rgb(l[r+j]&255,l[r+j+256]&255,l[r+j+512]&255);else c=String.instantialize(l)}if(null==e)for(var u=JU.PT.split(c.trim(),"\n"),q=u.length,e=F(q,0),n=0<q&&0>u[0].indexOf("."),
r=0;r<q;r++){var s=JU.PT.getTokens(u[r]);if(3>s.length){e=null;break}var v=s.length;e[r]=n?JU.CU.rgb(JU.PT.parseInt(s[v-3]),JU.PT.parseInt(s[v-2]),JU.PT.parseInt(s[v-1])):JU.CU.colorTriadToFFRGB(JU.PT.parseFloat(s[v-3]),JU.PT.parseFloat(s[v-2]),JU.PT.parseFloat(s[v-1]))}if(null!=e&&k){r=0;q=e.length-1;for(k=q+1>>1;r<k;r++){var w=e[r];e[r]=e[q-r];e[q-r]=w}}break}}catch(x){if(H(x,Exception))JU.Logger.info("ColorEncoder "+x),e=null;else throw x;}null==e&&(e=F(-1,[-1]));this.schemes.put(a,e);this.setThisScheme(a,
e);return-1}if(0<=f){a=a.toLowerCase();l=JU.PT.replaceAllCharacters(a.substring(0,f)," =","");0<l.length&&(c=!0);q=0;a.length>f+1&&!a.contains("[")&&(a="["+a.substring(f+1).trim()+"]",a=JU.PT.rep(a.$replace("\n"," "),"  "," "),a=JU.PT.rep(a,", ",",").$replace(" ",","),a=JU.PT.rep(a,",","]["));for(f=-1;0<=(f=a.indexOf("[",f+1));)q++;if(0==q)return this.makeColorScheme(l,null,c);e=F(q,0);for(q=0;0<=(f=a.indexOf("[",f+1));){r=a.indexOf("]",f);0>r&&(r=a.length-1);w=JU.CU.getArgbFromString(a.substring(f,
r+1));0==w&&(w=JU.CU.getArgbFromString(a.substring(f+1,r).trim()));if(0==w)return JU.Logger.error("error in color value: "+a.substring(f,r+1)),0;e[q++]=w}return l.equals("user")?(this.setUserScale(e),-13):this.makeColorScheme(l,e,c)}e=this.schemes.get(l);return null!=e?(this.setThisScheme(l,e),h):-1!=h?h:b?0:2147483647},"~S,~B,~B");c(b,"setUserScale",function(a){this.ce.userScale=a;this.makeColorScheme("user",a,!1)},"~A");c(b,"getColorSchemeArray",function(a){switch(a){case -1:return this.thisScale;
case 0:return this.ce.argbsRoygb;case 1:return JU.AU.arrayCopyRangeRevI(this.ce.argbsRoygb,0,-1);case 8:return JU.AU.arrayCopyRangeI(this.ce.argbsRoygb,0,this.ce.ihalf);case 9:var b=JU.AU.arrayCopyRangeI(this.ce.argbsRoygb,this.ce.argbsRoygb.length-2*this.ce.ihalf,-1);a=F(this.ce.ihalf,0);for(var c=a.length,l=b.length;0<=--c&&0<=--l;)a[c]=b[l--];return a;case 12:return this.getPaletteAC();case 10:return this.getPaletteBW();case 11:return this.getPaletteWB();case 6:return this.ce.argbsRwb;case 7:return JU.AU.arrayCopyRangeRevI(this.ce.argbsRwb,
0,-1);case 2:return this.ce.argbsCpk;case 3:return JU.ColorEncoder.getRasmolScale();case 4:return this.ce.getShapely();case 17:return this.ce.getNucleic();case 5:return this.ce.getAmino();case -13:return this.ce.userScale;case -14:return JU.AU.arrayCopyRangeRevI(this.ce.userScale,0,-1);default:return null}},"~N");c(b,"getColorIndexFromPalette",function(a,b,c,l,e){l=JU.C.getColix(this.getArgbFromPalette(a,b,c,l));e&&(a=(c-a)/(c-b),1<a?a=1:0.125>a&&(a=0.125),l=JU.C.getColixTranslucent3(l,!0,a));return l},
"~N,~N,~N,~N,~B");c(b,"getPaletteColorCount",function(a){switch(a){case -1:return this.thisScale.length;case 10:case 11:return this.getPaletteBW().length;case 0:case 1:return this.ce.argbsRoygb.length;case 8:case 9:return this.ce.ihalf;case 6:case 7:return this.ce.argbsRwb.length;case -13:case -14:return this.ce.userScale.length;case 2:return this.ce.argbsCpk.length;case 3:return JU.ColorEncoder.getRasmolScale().length;case 4:return this.ce.getShapely().length;case 17:return this.ce.getNucleic().length;
case 5:return this.ce.getAmino().length;case 12:return this.getPaletteAC().length;default:return 0}},"~N");c(b,"getArgbFromPalette",function(a,b,c,l){if(Float.isNaN(a))return-8355712;var e=this.getPaletteColorCount(l);switch(l){case -1:return this.isColorIndex&&(b=0,c=this.thisScale.length),this.thisScale[JU.ColorEncoder.quantize4(a,b,c,e)];case 10:return this.getPaletteBW()[JU.ColorEncoder.quantize4(a,b,c,e)];case 11:return this.getPaletteWB()[JU.ColorEncoder.quantize4(a,b,c,e)];case 0:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,
b,c,e)];case 1:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(-a,-c,-b,e)];case 8:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,b,c,e)];case 9:return this.ce.argbsRoygb[this.ce.ihalf+2*JU.ColorEncoder.quantize4(a,b,c,e)];case 6:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(a,b,c,e)];case 7:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(-a,-c,-b,e)];case -13:return 0==this.ce.userScale.length?-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(a,b,c,e)];case -14:return 0==this.ce.userScale.length?
-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(-a,-c,-b,e)];case 2:return this.ce.argbsCpk[JU.ColorEncoder.colorIndex(a,e)];case 3:return JU.ColorEncoder.getRasmolScale()[JU.ColorEncoder.colorIndex(a,e)];case 4:return this.ce.getShapely()[JU.ColorEncoder.colorIndex(a,e)];case 5:return this.ce.getAmino()[JU.ColorEncoder.colorIndex(a,e)];case 17:return this.ce.getNucleic()[JU.ColorEncoder.colorIndex(a-24+2,e)];case 12:return this.getPaletteAC()[JU.ColorEncoder.colorIndexRepeat(a,e)];default:return-8355712}},
"~N,~N,~N,~N");c(b,"setThisScheme",function(a,b){this.thisName=a;this.thisScale=b;a.equals("user")&&(this.userScale=b);this.isColorIndex=0==a.indexOf("byelement")||0==a.indexOf("byresidue")},"~S,~A");c(b,"getArgb",function(a){return this.isReversed?this.getArgbFromPalette(-a,-this.hi,-this.lo,this.currentPalette):this.getArgbFromPalette(a,this.lo,this.hi,this.currentPalette)},"~N");c(b,"getArgbMinMax",function(a,b,c){return this.isReversed?this.getArgbFromPalette(-a,-c,-b,this.currentPalette):this.getArgbFromPalette(a,
b,c,this.currentPalette)},"~N,~N,~N");c(b,"getColorIndex",function(a){return this.isReversed?this.getColorIndexFromPalette(-a,-this.hi,-this.lo,this.currentPalette,this.isTranslucent):this.getColorIndexFromPalette(a,this.lo,this.hi,this.currentPalette,this.isTranslucent)},"~N");c(b,"getColorKey",function(){for(var a=new java.util.Hashtable,b=this.getPaletteColorCount(this.currentPalette),c=new JU.Lst,l=L(b+1,0),e=(this.hi-this.lo)/b,f=e*(this.isReversed?-0.5:0.5),h=0;h<b;h++)l[h]=this.isReversed?
this.hi-h*e:this.lo+h*e,c.addLast(JU.CU.colorPtFromInt(this.getArgb(l[h]+f),null));l[b]=this.isReversed?this.lo:this.hi;a.put("values",l);a.put("colors",c);a.put("min",Float.$valueOf(this.lo));a.put("max",Float.$valueOf(this.hi));a.put("reversed",Boolean.$valueOf(this.isReversed));a.put("name",this.getCurrentColorSchemeName());return a});c(b,"getColorScheme",function(){return(this.isTranslucent?"translucent ":"")+(0>this.currentPalette?JU.ColorEncoder.getColorSchemeList(this.getColorSchemeArray(this.currentPalette)):
this.getColorSchemeName(this.currentPalette))});c(b,"setColorScheme",function(a,b){this.isTranslucent=b;null!=a&&(this.currentPalette=this.createColorScheme(a,!0,!1))},"~S,~B");c(b,"setRange",function(a,b,c){3.4028235E38==b&&(a=1,b=this.getPaletteColorCount(this.currentPalette)+1);this.lo=Math.min(a,b);this.hi=Math.max(a,b);this.isReversed=c},"~N,~N,~B");c(b,"getCurrentColorSchemeName",function(){return this.getColorSchemeName(this.currentPalette)});c(b,"getColorSchemeName",function(a){var b=Math.abs(a);
return-1==a?this.thisName:b<JU.ColorEncoder.colorSchemes.length&&0<=b?JU.ColorEncoder.colorSchemes[b]:null},"~N");b.getColorSchemeList=c(b,"getColorSchemeList",function(a){if(null==a)return"";for(var b="",c=0;c<a.length;c++)b+=(0==c?"":" ")+JU.Escape.escapeColor(a[c]);return b},"~A");b.getRasmolScale=c(b,"getRasmolScale",function(){if(null!=JU.ColorEncoder.rasmolScale)return JU.ColorEncoder.rasmolScale;JU.ColorEncoder.rasmolScale=F(J.c.PAL.argbsCpk.length,0);for(var a=J.c.PAL.argbsCpkRasmol[0]|4278190080,
b=JU.ColorEncoder.rasmolScale.length;0<=--b;)JU.ColorEncoder.rasmolScale[b]=a;for(b=J.c.PAL.argbsCpkRasmol.length;0<=--b;)a=J.c.PAL.argbsCpkRasmol[b],JU.ColorEncoder.rasmolScale[a>>24]=a|4278190080;return JU.ColorEncoder.rasmolScale});c(b,"getPaletteAC",function(){return null==this.ce.paletteFriendly?this.ce.paletteFriendly=F(-1,[8421504,1067945,11141282,13235712,16753152,2640510,8331387,10467374,12553008,339310,7209065,8626176,10906112,4488148,13907405,14219839,16759360,6984660,13918415,14809713,
16764019]):this.ce.paletteFriendly});c(b,"getPaletteWB",function(){if(null!=this.ce.paletteWB)return this.ce.paletteWB;for(var a=F(JV.JC.argbsRoygbScale.length,0),b=0;b<a.length;b++){var c=1/a.length*(a.length-b);a[b]=JU.CU.colorTriadToFFRGB(c,c,c)}return this.ce.paletteWB=a});b.getPaletteAtoB=c(b,"getPaletteAtoB",function(a,b,c){2>c&&(c=JV.JC.argbsRoygbScale.length);var l=F(c,0),e=L(3,0),f=L(3,0);JU.CU.toRGB3f(a,e);JU.CU.toRGB3f(b,f);a=(f[0]-e[0])/(c-1);b=(f[1]-e[1])/(c-1);for(var f=(f[2]-e[2])/
(c-1),h=0;h<c;h++)l[h]=JU.CU.colorTriadToFFRGB(e[0]+a*h,e[1]+b*h,e[2]+f*h);return l},"~N,~N,~N");c(b,"getPaletteBW",function(){if(null!=this.ce.paletteBW)return this.ce.paletteBW;for(var a=F(JV.JC.argbsRoygbScale.length,0),b=0;b<a.length;b++){var c=1/a.length*b;a[b]=JU.CU.colorTriadToFFRGB(c,c,c)}return this.ce.paletteBW=a});c(b,"quantize",function(a,b){var c=this.getPaletteColorCount(this.currentPalette);a=(D(a*c)+(b?0:1))/c;return 0>=a?this.lo:1<=a?this.hi:this.lo+(this.hi-this.lo)*a},"~N,~B");
b.quantize4=c(b,"quantize4",function(a,b,c,l){c-=b;if(0>=c||Float.isNaN(a))return w(l/2);a-=b;if(0>=a)return 0;a=D(a/(c/l)+1E-4);a>=l&&(a=l-1);return a},"~N,~N,~N,~N");b.colorIndex=c(b,"colorIndex",function(a,b){return w(Math.floor(0>=a||a>=b?0:a))},"~N,~N");b.colorIndexRepeat=c(b,"colorIndexRepeat",function(a,b){return w(Math.floor(0>=a?0:a))%b},"~N,~N");b.colorSchemes=x(-1,"roygb bgyor byelement_jmol byelement_rasmol byresidue_shapely byresidue_amino rwb bwr low high bw wb friendly user resu inherit rgb bgr jmol rasmol byresidue byresidue_nucleic".split(" "));
b.rasmolScale=null;b.argbsChainAtom=null;b.argbsChainHetero=null});s("JU");B(null,"JU.CommandHistory",["JU.Lst"],function(){var b=n(function(){this.commandList=null;this.maxSize=100;this.cursorPos=this.nextCommand=0;this.isOn=!0;this.lstStates=null;v(this,arguments)},JU,"CommandHistory",null);A(b,function(){this.reset(100)});c(b,"clear",function(){this.reset(this.maxSize)});c(b,"reset",function(a){this.maxSize=a;this.commandList=new JU.Lst;this.nextCommand=0;this.commandList.addLast("");this.cursorPos=
0},"~N");c(b,"setMaxSize",function(a){if(a!=this.maxSize){for(2>a&&(a=2);this.nextCommand>a;)this.commandList.removeItemAt(0),this.nextCommand--;this.nextCommand>a&&(this.nextCommand=a-1);this.cursorPos=this.nextCommand;this.maxSize=a}},"~N");c(b,"getCommandUp",function(){if(0>=this.cursorPos)return null;this.cursorPos--;var a=this.getCommand();a.endsWith("#??")&&this.removeCommand(this.cursorPos--);0>this.cursorPos&&(this.cursorPos=0);return a});c(b,"getCommandDown",function(){if(this.cursorPos>=
this.nextCommand)return null;this.cursorPos++;return this.getCommand()});c(b,"getCommand",function(){return this.commandList.get(this.cursorPos)});c(b,"addCommand",function(a){if((this.isOn||a.endsWith("#??"))&&!a.endsWith("#----")){for(var b;0<=(b=a.indexOf("\n"));){var c=a.substring(0,b);0<c.length&&this.addCommandLine(c);a=a.substring(b+1)}0<a.length&&this.addCommandLine(a)}},"~S");c(b,"getSetHistory",function(a){this.isOn=-2==a?this.isOn:!0;switch(a){case 0:return this.isOn=!1,this.clear(),"";
case -2147483648:case -2:return this.clear(),"";case -1:return this.getCommandUp();case 1:return this.getCommandDown();default:if(0>a)return this.setMaxSize(-2-a),"";a=Math.max(this.nextCommand-a,0)}for(var b="";a<this.nextCommand;a++)this.commandList.get(a).toUpperCase().startsWith("WRITE HISTORY")||(b+=this.commandList.get(a)+"\n");return b},"~N");c(b,"find",function(a,b){for(var c=this.cursorPos,l=a;null!=l;){l=this.getSetHistory(b);if(null==l)break;if(l.startsWith(a))return l}this.cursorPos=c;
return null},"~S,~N");c(b,"removeCommand",function(){return this.removeCommand(this.nextCommand-1)});c(b,"removeCommand",function(a){if(0>a||a>=this.nextCommand)return"";a=this.commandList.removeItemAt(a);this.nextCommand--;return a},"~N");c(b,"addCommandLine",function(a){if(!(null==a||0==a.length)&&!a.endsWith("#--"))0<this.nextCommand&&a.equals(this.commandList.get(this.nextCommand-1))?this.cursorPos=this.nextCommand:(this.nextCommand>=this.maxSize&&(this.commandList.removeItemAt(0),this.nextCommand=
this.maxSize-1),this.commandList.add(this.nextCommand,a),this.nextCommand++,this.cursorPos=this.nextCommand,this.commandList.add(this.nextCommand,""))},"~S");c(b,"pushState",function(a){null==this.lstStates&&(this.lstStates=new JU.Lst);this.lstStates.addLast(a)},"~S");c(b,"popState",function(){return null==this.lstStates||0==this.lstStates.size()?null:this.lstStates.removeItemAt(this.lstStates.size()-1)})});s("JU");B(["JU.LoggerInterface"],"JU.DefaultLogger",["JU.Logger"],function(){var b=I(JU,"DefaultLogger",
null,JU.LoggerInterface);c(b,"log",function(a,b,c,l){a===System.err&&System.out.flush();if(null!=a&&(null!=c||null!=l))if(c=(JU.Logger.logLevel()?"["+JU.Logger.getLevel(b)+"] ":"")+(null!=c?c:"")+(null!=l?": "+l.toString():""),a.println(c),null!=l&&(b=l.getStackTrace(),null!=b))for(l=0;l<b.length;l++)a.println(b[l].getClassName()+" - "+b[l].getLineNumber()+" - "+b[l].getMethodName());a===System.err&&System.err.flush();return c},"java.io.PrintStream,~N,~S,Throwable");j(b,"debug",function(a){this.log(System.out,
5,a,null)},"~S");j(b,"info",function(a){this.log(System.out,4,a,null)},"~S");j(b,"warn",function(a){this.log(System.out,3,a,null)},"~S");j(b,"warnEx",function(a,b){this.log(System.out,3,a,b)},"~S,Throwable");j(b,"error",function(a){this.log(System.err,2,a,null)},"~S");j(b,"errorEx",function(a,b){this.log(System.err,2,a,b)},"~S,Throwable");j(b,"fatal",function(a){this.log(System.err,1,a,null)},"~S");j(b,"fatalEx",function(a,b){this.log(System.err,1,a,b)},"~S,Throwable")});s("JU");B(["JU.BS"],"JU.Elements",
["java.util.Hashtable","JU.PT","JU.Logger"],function(){var b=I(JU,"Elements",null);b.getNaturalIsotope=c(b,"getNaturalIsotope",function(a){return JU.Elements.isotopeMass[a&127]},"~N");b.getAtomicMass=c(b,"getAtomicMass",function(a){return 1>a||a>=JU.Elements.atomicMass.length?0:JU.Elements.atomicMass[a]},"~N");b.elementNumberFromSymbol=c(b,"elementNumberFromSymbol",function(a,b){if(null==JU.Elements.htElementMap){for(var c=new java.util.Hashtable,e=JU.Elements.elementNumberMax;0<=--e;){var f=JU.Elements.elementSymbols[e],
h=Integer.$valueOf(e);c.put(f,h);2==f.length&&c.put(f.toUpperCase(),h)}for(e=JU.Elements.altElementMax;4<=--e;)f=JU.Elements.altElementSymbols[e],h=Integer.$valueOf(JU.Elements.altElementNumbers[e]),c.put(f,h),2==f.length&&c.put(f.toUpperCase(),h);c.put("Z",Integer.$valueOf(0));JU.Elements.htElementMap=c}if(null==a)return 0;c=JU.Elements.htElementMap.get(a);if(null!=c)return c.intValue();if(JU.PT.isDigit(a.charAt(0))&&(f=a.length-2,0<=f&&JU.PT.isDigit(a.charAt(f))&&f++,c=0<f?JU.PT.parseInt(a.substring(0,
f)):0,0<c&&(f=JU.Elements.elementNumberFromSymbol(a.substring(f),!0),0<f)))return c=JU.Elements.getAtomicAndIsotopeNumber(f,c),JU.Elements.htElementMap.put(a.toUpperCase(),Integer.$valueOf(c)),c;b||JU.Logger.error("'"+a+"' is not a recognized symbol");return 0},"~S,~B");b.elementSymbolFromNumber=c(b,"elementSymbolFromNumber",function(a){var b=0;if(a>=JU.Elements.elementNumberMax){for(b=JU.Elements.altElementMax;0<=--b;)if(a==JU.Elements.altElementNumbers[b])return JU.Elements.altElementSymbols[b];
b=JU.Elements.getIsotopeNumber(a);return""+b+JU.Elements.getElementSymbol(a&127)}return JU.Elements.getElementSymbol(a)},"~N");b.getElementSymbol=c(b,"getElementSymbol",function(a){if(0>a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementSymbols[a]},"~N");b.elementNameFromNumber=c(b,"elementNameFromNumber",function(a){if(a>=JU.Elements.elementNumberMax){for(var b=JU.Elements.altElementMax;0<=--b;)if(a==JU.Elements.altElementNumbers[b])return JU.Elements.altElementNames[b];a%=128}if(0>
a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementNames[a]},"~N");b.elementNumberFromName=c(b,"elementNumberFromName",function(a){for(var b=1;b<JU.Elements.elementNumberMax;b++)if(JU.Elements.elementNames[b].equalsIgnoreCase(a))return b;return-1},"~S");b.altElementNameFromIndex=c(b,"altElementNameFromIndex",function(a){return JU.Elements.altElementNames[a]},"~N");b.altElementNumberFromIndex=c(b,"altElementNumberFromIndex",function(a){return JU.Elements.altElementNumbers[a]},"~N");b.altElementSymbolFromIndex=
c(b,"altElementSymbolFromIndex",function(a){return JU.Elements.altElementSymbols[a]},"~N");b.altIsotopeSymbolFromIndex=c(b,"altIsotopeSymbolFromIndex",function(a){a=JU.Elements.altElementNumbers[a];return(a>>7)+JU.Elements.elementSymbolFromNumber(a&127)},"~N");b.altIsotopeSymbolFromIndex2=c(b,"altIsotopeSymbolFromIndex2",function(a){a=JU.Elements.altElementNumbers[a];return JU.Elements.elementSymbolFromNumber(a&127)+(a>>7)},"~N");b.getElementNumber=c(b,"getElementNumber",function(a){return a&127},
"~N");b.getIsotopeNumber=c(b,"getIsotopeNumber",function(a){return(a&32640)>>7},"~N");b.getAtomicAndIsotopeNumber=c(b,"getAtomicAndIsotopeNumber",function(a,b){return(0>a?0:a)+(0>=b?0:b<<7)},"~N,~N");b.altElementIndexFromNumber=c(b,"altElementIndexFromNumber",function(a){for(var b=0;b<JU.Elements.altElementMax;b++)if(JU.Elements.altElementNumbers[b]==a)return b;return 0},"~N");b.getCommonNMRIsotope=c(b,"getCommonNMRIsotope",function(a){if(JU.PT.isDigit(a.charAt(0)))return a;if(a.equals("D"))return"2H";
var b=JU.Elements.commonNmrIsotopes.indexOf(a+",");return 0>b?a:JU.Elements.commonNmrIsotopes.substring(b-2,b+a.length).trim()},"~S");b.getNmrNucleusFromName=c(b,"getNmrNucleusFromName",function(a){return JU.Elements.getCommonNMRIsotope(JU.Elements.elementSymbolFromNumber(JU.Elements.elementNumberFromName(a)))},"~S");b.isNaturalIsotope=c(b,"isNaturalIsotope",function(a){return 0<="1H,12C,14N".indexOf(a+",")},"~S");b.getBondingRadius=c(b,"getBondingRadius",function(a,b){var c=a&127;return 0<b&&JU.Elements.bsCations.get(c)?
JU.Elements.getBondingRadFromTable(c,b,JU.Elements.cationLookupTable):0>b&&JU.Elements.bsAnions.get(c)?JU.Elements.getBondingRadFromTable(c,b,JU.Elements.anionLookupTable):JU.Elements.defaultBondingMars[(c<<1)+JU.Elements.bondingVersion]/1E3},"~N,~N");b.getCovalentRadius=c(b,"getCovalentRadius",function(a){return JU.Elements.defaultBondingMars[((a&127)<<1)+JU.Elements.covalentVersion]/1E3},"~N");b.getBondingRadFromTable=c(b,"getBondingRadFromTable",function(a,b,c){b=(a<<4)+(b+4);for(var e=0,f=0,h=
0,k=w(c.length/2);h!=k;)if(f=w((h+k)/2),e=c[f<<1],e>b)k=f;else if(e<b)h=f+1;else return c[(f<<1)+1]/1E3;e>b&&f--;e=c[f<<1];a!=e>>4&&f++;return c[(f<<1)+1]/1E3},"~N,~N,~A");b.getVanderwaalsMar=c(b,"getVanderwaalsMar",function(a,b){return JU.Elements.vanderwaalsMars[((a&127)<<2)+b.pt%4]},"~N,J.c.VDW");b.getHydrophobicity=c(b,"getHydrophobicity",function(a){return 1>a||a>=JU.Elements.hydrophobicities.length?0:JU.Elements.hydrophobicities[a]},"~N");b.getAllredRochowElectroNeg=c(b,"getAllredRochowElectroNeg",
function(a){return 0<a&&a<JU.Elements.electroNegativities.length?JU.Elements.electroNegativities[a]:0},"~N");b.isElement=c(b,"isElement",function(a,b){return(a&127)==b},"~N,~N");b.elementSymbols=x(-1,"Xx H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr Rf Db Sg Bh Hs Mt".split(" "));
b.atomicMass=L(-1,[0,1.008,4.002,6.9675,9.012,10.8135,12.0106,14.006,15.999,18.998,20.1797,22.989,24.307,26.981,28.084,30.973,32.059,35.4515,39.948,39.0983,40.078,44.955,47.867,50.9415,51.9961,54.938,55.845,58.933,58.6934,63.546,65.38,69.723,72.63,74.921,78.971,79.904,83.798,85.4678,87.62,88.905,91.224,92.906,95.95,98.91,101.07,102.905,106.42,107.8682,112.414,114.818,118.71,121.76,127.6,126.904,131.293,132.905,137.327,138.905,140.116,140.907,144.242,144.9,150.36,151.964,157.25,158.925,162.5,164.93,
167.259,168.934,173.054,174.9668,178.49,180.947,183.84,186.207,190.23,192.217,195.084,196.966,200.592,204.3835,207.2,208.98,210,210,222,223,226.03,227.03,232.0377,231.035,238.028,237.05,239.1,243.1,247.1,247.1,252.1,252.1,257.1,256.1,259.1,260.1,261,262,263,262,265,268]);b.isotopeMass=F(-1,[0,1,4,7,9,11,12,14,16,19,20,23,24,27,28,31,32,35,40,39,40,45,48,51,52,55,56,59,59,64,65,70,73,75,79,80,84,85,88,89,91,93,96,98,101,103,106,108,112,115,119,122,128,127,131,133,137,139,140,141,144,145,150,152,157,
159,163,165,167,169,173,175,179,181,184,186,190,192,195,197,201,204,207,209,209,210,222,223,226,227,232,231,238,237,244,243,247,247,251,252,257,258,259,260,261,262,263,262,265,268]);b.elementNumberMax=JU.Elements.elementSymbols.length;b.htElementMap=null;b.elementNames=x(-1,"unknown hydrogen helium lithium beryllium boron carbon nitrogen oxygen fluorine neon sodium magnesium aluminum silicon phosphorus sulfur chlorine argon potassium calcium scandium titanium vanadium chromium manganese iron cobalt nickel copper zinc gallium germanium arsenic selenium bromine krypton rubidium strontium yttrium zirconium niobium molybdenum technetium ruthenium rhodium palladium silver cadmium indium tin antimony tellurium iodine xenon cesium barium lanthanum cerium praseodymium neodymium promethium samarium europium gadolinium terbium dysprosium holmium erbium thulium ytterbium lutetium hafnium tantalum tungsten rhenium osmium iridium platinum gold mercury thallium lead bismuth polonium astatine radon francium radium actinium thorium protactinium uranium neptunium plutonium americium curium berkelium californium einsteinium fermium mendelevium nobelium lawrencium rutherfordium dubnium seaborgium bohrium hassium meitnerium".split(" "));
b.commonNmrIsotopes=", 1H, 2H, 6Li, 7Li,10B,13C,15N,17O,19F,";b.altElementNumbers=F(-1,[0,13,16,55,257,385,1414,1670,1798,1927]);b.altElementMax=JU.Elements.altElementNumbers.length;b.altElementSymbols=x(-1,"Xx Al S Cs D T 11C 13C 14C 15N".split(" "));b.altElementNames=x(-1,"dummy aluminium sulphur caesium deuterium tritium    ".split(" "));b.vanderwaalsMars=V(-1,[1E3,1E3,1E3,1E3,1200,1100,1100,1200,1400,1400,2200,1400,1820,1810,1220,2200,1700,1530,628,1900,2080,1920,1548,1800,1950,1700,1548,1700,
1850,1550,1400,1600,1700,1520,1348,1550,1730,1470,1300,1500,1540,1540,2020,1540,2270,2270,2200,2400,1730,1730,1500,2200,2050,1840,1500,2100,2100,2100,2200,2100,2080,1800,1880,1950,2E3,1800,1808,1800,1970,1750,1748,1800,1880,1880,2768,1880,2750,2750,2388,2800,1973,2310,1948,2400,1700,2300,1320,2300,1700,2150,1948,2150,1700,2050,1060,2050,1700,2050,1128,2050,1700,2050,1188,2050,1700,2050,1948,2050,1700,2E3,1128,2E3,1630,2E3,1240,2E3,1400,2E3,1148,2E3,1390,2100,1148,2100,1870,1870,1548,2100,1700,2110,
3996,2100,1850,1850,828,2050,1900,1900,900,1900,2100,1830,1748,1900,2020,2020,1900,2020,1700,3030,2648,2900,1700,2490,2020,2550,1700,2400,1608,2400,1700,2300,1420,2300,1700,2150,1328,2150,1700,2100,1748,2100,1700,2050,1800,2050,1700,2050,1200,2050,1700,2E3,1220,2E3,1630,2050,1440,2050,1720,2100,1548,2100,1580,2200,1748,2200,1930,2200,1448,2200,2170,1930,1668,2250,2200,2170,1120,2200,2060,2060,1260,2100,2150,1980,1748,2100,2160,2160,2100,2160,1700,3430,3008,3E3,1700,2680,2408,2700,1700,2500,1828,2500,
1700,2480,1860,2480,1700,2470,1620,2470,1700,2450,1788,2450,1700,2430,1760,2430,1700,2420,1740,2420,1700,2400,1960,2400,1700,2380,1688,2380,1700,2370,1660,2370,1700,2350,1628,2350,1700,2330,1608,2330,1700,2320,1588,2320,1700,2300,1568,2300,1700,2280,1540,2280,1700,2270,1528,2270,1700,2250,1400,2250,1700,2200,1220,2200,1700,2100,1260,2100,1700,2050,1300,2050,1700,2E3,1580,2E3,1700,2E3,1220,2E3,1720,2050,1548,2050,1660,2100,1448,2100,1550,2050,1980,2050,1960,1960,1708,2200,2020,2020,2160,2300,1700,
2070,1728,2300,1700,1970,1208,2E3,1700,2020,1120,2E3,1700,2200,2300,2E3,1700,3480,3240,2E3,1700,2830,2568,2E3,1700,2E3,2120,2E3,1700,2400,1840,2400,1700,2E3,1600,2E3,1860,2300,1748,2300,1700,2E3,1708,2E3,1700,2E3,1668,2E3,1700,2E3,1660,2E3,1700,2E3,1648,2E3,1700,2E3,1640,2E3,1700,2E3,1628,2E3,1700,2E3,1620,2E3,1700,2E3,1608,2E3,1700,2E3,1600,2E3,1700,2E3,1588,2E3,1700,2E3,1580,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3]);b.covalentVersion=
1;b.bondingVersion=0;b.defaultBondingMars=V(-1,[0,0,230,320,930,460,680,1330,350,1020,830,850,680,750,680,710,680,630,640,640,1120,670,970,1550,1100,1390,1350,1260,1200,1160,750,1110,1020,1030,990,990,1570,960,1330,1960,990,1710,1440,1480,1470,1360,1330,1340,1350,1220,1350,1190,1340,1160,1330,1110,1500,1100,1520,1120,1450,1180,1220,1240,1170,1210,1210,1210,1220,1160,1210,1140,1910,1170,1470,2100,1120,1850,1780,1630,1560,1540,1480,1470,1470,1380,1350,1280,1400,1250,1450,1250,1500,1200,1590,1280,1690,
1360,1630,1420,1460,1400,1460,1400,1470,1360,1400,1330,1980,1310,1670,2320,1340,1960,1870,1800,1830,1630,1820,1760,1810,1740,1800,1730,1800,1720,1990,1680,1790,1690,1760,1680,1750,1670,1740,1660,1730,1650,1720,1640,1940,1700,1720,1620,1570,1520,1430,1460,1370,1370,1350,1310,1370,1290,1320,1220,1500,1230,1500,1240,1700,1330,1550,1440,1540,1440,1540,1510,1680,1450,1700,1470,2400,1420,2E3,2230,1900,2010,1880,1860,1790,1750,1610,1690,1580,1700,1550,1710,1530,1720,1510,1660,1500,1660,1500,1680,1500,1680,
1500,1650,1500,1670,1500,1730,1500,1760,1500,1610,1600,1570,1600,1490,1600,1430,1600,1410,1600,1340,1600,1290]);b.cationLookupTable=V(-1,[53,680,69,440,70,350,85,350,87,230,104,160,117,680,119,160,121,130,133,220,138,90,155,80,165,1120,181,970,197,820,198,660,215,510,229,650,232,420,247,440,249,350,262,2190,264,370,266,300,281,340,283,270,293,1540,309,1330,325,1180,326,990,343,732,357,960,358,940,359,760,360,680,374,880,375,740,376,630,377,590,389,810,390,890,391,630,394,520,406,800,407,660,408,600,
411,460,422,740,423,640,438,720,439,630,454,690,469,960,470,720,485,880,486,740,501,810,503,620,518,730,520,530,535,580,537,460,549,660,552,500,554,420,569,470,571,390,597,1470,614,1120,631,893,645,1090,648,790,661,1E3,664,740,665,690,677,930,680,700,682,620,699,979,712,670,727,680,742,800,744,650,757,1260,758,890,773,1140,774,970,791,810,806,930,808,710,823,760,825,620,837,820,840,700,842,560,857,620,859,500,885,1670,901,1530,902,1340,917,1390,919,1016,933,1270,935,1034,936,920,951,1013,952,900,
967,995,983,979,999,964,1014,1090,1015,950,1031,938,1047,923,1048,840,1063,908,1079,894,1095,881,1111,870,1126,930,1127,858,1143,850,1160,780,1177,680,1192,700,1194,620,1208,720,1211,560,1224,880,1226,690,1240,680,1254,800,1256,650,1269,1370,1271,850,1285,1270,1286,1100,1301,1470,1303,950,1318,1200,1320,840,1333,980,1335,960,1337,740,1354,670,1371,620,1397,1800,1414,1430,1431,1180,1448,1020,1463,1130,1464,980,1465,890,1480,970,1482,800,1495,1100,1496,950,1499,710,1511,1080,1512,930,1527,1070,1528,
920]);b.anionLookupTable=V(-1,[19,1540,96,2600,113,1710,130,1360,131,680,147,1330,241,2120,258,1840,275,1810,512,2720,529,2220,546,1980,563,1960,800,2940,803,3700,817,2450,834,2110,835,2500,851,2200]);b.bsCations=new JU.BS;b.bsAnions=new JU.BS;for(var a=0;a<JU.Elements.anionLookupTable.length;a+=2)JU.Elements.bsAnions.set(JU.Elements.anionLookupTable[a]>>4);for(a=0;a<JU.Elements.cationLookupTable.length;a+=2)JU.Elements.bsCations.set(JU.Elements.cationLookupTable[a]>>4);b.hydrophobicities=L(-1,[0,
0.62,-2.53,-0.78,-0.9,0.29,-0.85,-0.74,0.48,-0.4,1.38,1.06,-1.5,0.64,1.19,0.12,-0.18,-0.05,0.81,0.26,1.08]);(JU.Elements.elementNames.length!=JU.Elements.elementNumberMax||JU.Elements.vanderwaalsMars.length>>2!=JU.Elements.elementNumberMax||JU.Elements.defaultBondingMars.length>>1!=JU.Elements.elementNumberMax)&&JU.Logger.error("ERROR!!! Element table length mismatch:\n elementSymbols.length="+JU.Elements.elementSymbols.length+"\n elementNames.length="+JU.Elements.elementNames.length+"\n vanderwaalsMars.length="+
JU.Elements.vanderwaalsMars.length+"\n covalentMars.length="+JU.Elements.defaultBondingMars.length);b.electroNegativities=L(-1,[0,2.2,0,0.97,1.47,2.01,2.5,3.07,3.5,4.1,0,1.01,1.23,1.47,1.74,2.06,2.44,2.83,0,0.91,1.04,1.2,1.32,1.45,1.56,1.6,1.64,1.7,1.75,1.75,1.66,1.82,2.02,2.2,2.48,2.74,0,0.89,0.99,1.11,1.22,1.23,1.3,1.36,1.42,1.45,1.35,1.42,1.46,1.49,1.72,1.82,2.01,2.21])});s("JU");B(null,"JU.Escape","JU.AU $.BS $.Lst $.M3 $.M4 $.P3 $.P4 $.PT $.SB $.V3 JS.SV".split(" "),function(){var b=I(JU,"Escape",
null);b.escapeColor=c(b,"escapeColor",function(a){return 0==a?null:"[x"+JU.Escape.getHexColorFromRGB(a)+"]"},"~N");b.getHexColorFromRGB=c(b,"getHexColorFromRGB",function(a){if(0==a)return null;var b="00"+Integer.toHexString(a>>16&255),b=b.substring(b.length-2),c="00"+Integer.toHexString(a>>8&255),c=c.substring(c.length-2);a="00"+Integer.toHexString(a&255);a=a.substring(a.length-2);return b+c+a},"~N");b.eP=c(b,"eP",function(a){return null==a?"null":"{"+a.x+" "+a.y+" "+a.z+"}"},"JU.T3");b.matrixToScript=
c(b,"matrixToScript",function(a){return JU.PT.replaceAllCharacters(a.toString(),"\n\r ","").$replace("\t"," ")},"~O");b.eP4=c(b,"eP4",function(a){return"{"+a.x+" "+a.y+" "+a.z+" "+a.w+"}"},"JU.P4");b.drawQuat=c(b,"drawQuat",function(a,b,c,l,e){l=" VECTOR "+JU.Escape.eP(l)+" ";0==e&&(e=1);return"draw "+b+"x"+c+l+JU.Escape.eP(a.getVectorScaled(0,e))+" color red\ndraw "+b+"y"+c+l+JU.Escape.eP(a.getVectorScaled(1,e))+" color green\ndraw "+b+"z"+c+l+JU.Escape.eP(a.getVectorScaled(2,e))+" color blue\n"},
"JU.Quat,~S,~S,JU.P3,~N");b.e=c(b,"e",function(a){if(null==a)return"null";if(JU.PT.isNonStringPrimitive(a))return a.toString();if("string"==typeof a)return JU.PT.esc(a);if(y(a,"JU.Lst"))return JU.Escape.eV(a);if(y(a,"java.util.Map"))return JU.Escape.escapeMap(a);if(y(a,"JU.BS"))return JU.Escape.eBS(a);if(y(a,"JU.P4"))return JU.Escape.eP4(a);if(y(a,"JU.T3"))return JU.Escape.eP(a);if(JU.AU.isAP(a))return JU.Escape.eAP(a);if(JU.AU.isAS(a))return JU.Escape.eAS(a,!0);if(y(a,"JU.M34"))return JU.PT.rep(JU.PT.rep(a.toString(),
"[\n  ","["),"] ]","]]");if(JU.AU.isAFF(a)){for(var b=(new JU.SB).append("["),c="",l=0;l<a.length;l++)b.append(c).append(JU.Escape.eAF(a[l])),c=",";b.append("]");return b.toString()}if(y(a,"JU.A4"))return"{"+a.x+" "+a.y+" "+a.z+" "+180*a.angle/3.141592653589793+"}";if(y(a,"JU.Quat"))return a.toString();b=JU.PT.nonArrayString(a);return null==b?JU.PT.toJSON(null,a):b},"~O");b.eV=c(b,"eV",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var c=0;c<a.size();c++)0<c&&b.append(", "),
b.append(JU.Escape.escapeNice(a.get(c).asString()));b.append("]");return b.toString()},"JU.Lst");b.escapeMap=c(b,"escapeMap",function(a){var b=new JU.SB;b.append("{ ");var c="",l;for(a=a.entrySet().iterator();a.hasNext()&&((l=a.next())||1);){var e=l.getKey();b.append(c).append(JU.PT.esc(e)).appendC(":");c=l.getValue();y(c,"JS.SV")||(c=JS.SV.getVariable(c));b.append(c.escape());c=","}b.append(" }");return b.toString()},"java.util.Map");b.escapeFloatA=c(b,"escapeFloatA",function(a,b){if(b)return JU.PT.toJSON(null,
a);for(var c=new JU.SB,l=0;l<a.length;l++)0<l&&c.appendC("\n"),c.appendF(a[l]);return c.toString()},"~A,~B");b.escapeFloatAA=c(b,"escapeFloatAA",function(a,b){for(var c=new JU.SB,l=b?";\n":"\n",e=0;e<a.length;e++)if(null!=a[e]){0<e&&c.append(l);for(var f=0;f<a[e].length;f++)c.appendF(a[e][f]).appendC("\t")}return c.toString()},"~A,~B");b.escapeFloatAAA=c(b,"escapeFloatAAA",function(a,b){var c=new JU.SB,l=b?";\n":"\n";if(null==a[0]||null==a[0][0])return"0 0 0"+l;c.appendI(a.length).append(" ").appendI(a[0].length).append(" ").appendI(a[0][0].length);
for(var e=0;e<a.length;e++)if(null!=a[e]){c.append(l);for(var f=0;f<a[e].length;f++)if(null!=a[e][f]){c.append(l);for(var h=0;h<a[e][f].length;h++)c.appendF(a[e][f][h]).appendC("\t")}}return c.toString()},"~A,~B");b.eAS=c(b,"eAS",function(a,b){if(null==a)return JU.PT.esc("");var c=new JU.SB;c.append("[");for(var l=0;l<a.length;l++)0<l&&c.append(", "),c.append(b?JU.Escape.escapeNice(a[l]):JU.PT.esc(a[l]));c.append("]");return c.toString()},"~A,~B");b.eAI=c(b,"eAI",function(a){if(null==a)return JU.PT.esc("");
var b=new JU.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.appendI(a[c]);return b.append("]").toString()},"~A");b.eAD=c(b,"eAD",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.appendD(a[c]);return b.append("]").toString()},"~A");b.eAF=c(b,"eAF",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.appendF(a[c]);return b.append("]").toString()},
"~A");b.eAP=c(b,"eAP",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.append(JU.Escape.eP(a[c]));return b.append("]").toString()},"~A");b.escapeNice=c(b,"escapeNice",function(a){if(null==a)return"null";var b=JU.PT.parseFloatStrict(a);return Float.isNaN(b)?JU.PT.esc(a):a},"~S");b.uABsM=c(b,"uABsM",function(a){return"{"==a.charAt(0)?JU.Escape.uP(a):(JU.Escape.isStringArray(a)||a.startsWith("[{")&&a.indexOf("[{")==a.lastIndexOf("[{"))&&
0>a.indexOf(",")&&0>a.indexOf(".")&&0>a.indexOf("-")?JU.BS.unescape(a):a.startsWith("[[")?JU.Escape.unescapeMatrix(a):a},"~S");b.isStringArray=c(b,"isStringArray",function(a){return a.startsWith("({")&&0==a.lastIndexOf("({")&&a.indexOf("})")==a.length-2},"~S");b.uP=c(b,"uP",function(a){if(null==a||0==a.length)return a;var b=a.$replace("\n"," ").trim();if("{"!=b.charAt(0)||"}"!=b.charAt(b.length-1))return a;for(var c=L(5,0),l=0,b=b.substring(1,b.length-1),e=F(1,0);5>l;l++)if(c[l]=JU.PT.parseFloatNext(b,
e),Float.isNaN(c[l])){if(e[0]>=b.length||","!=b.charAt(e[0]))break;e[0]++;l--}return 3==l?JU.P3.new3(c[0],c[1],c[2]):4==l?JU.P4.new4(c[0],c[1],c[2],c[3]):a},"~S");b.unescapeMatrix=c(b,"unescapeMatrix",function(a){if(null==a||0==a.length)return a;var b=a.$replace("\n"," ").trim();if(0!=b.lastIndexOf("[[")||b.indexOf("]]")!=b.length-2)return a;for(var c=L(16,0),b=b.substring(2,b.length-2).$replace("["," ").$replace("]"," ").$replace(","," "),l=F(1,0),e=0;16>e&&!(c[e]=JU.PT.parseFloatNext(b,l),Float.isNaN(c[e]));e++);
return!Float.isNaN(JU.PT.parseFloatNext(b,l))?a:9==e?JU.M3.newA9(c):16==e?JU.M4.newA16(c):a},"~S");b.eBS=c(b,"eBS",function(a){return JU.BS.escape(a,"(",")")},"JU.BS");b.eBond=c(b,"eBond",function(a){return JU.BS.escape(a,"[","]")},"JU.BS");b.toReadable=c(b,"toReadable",function(a,b){var c=new JU.SB,l="";if(null==b)return"null";if(JU.PT.isNonStringPrimitive(b))return JU.Escape.packageReadable(a,null,b.toString());if("string"==typeof b)return JU.Escape.packageReadable(a,null,JU.PT.esc(b));if(y(b,"JS.SV"))return JU.Escape.packageReadable(a,
null,b.escape());if(JU.AU.isAS(b)){c.append("[");for(var e=b.length,f=0;f<e;f++)c.append(l).append(JU.Escape.toReadable(null,b[f])),l=",";c.append("]");return JU.Escape.packageReadableSb(a,"String["+e+"]",c)}if(JU.AU.isAI(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(l).appendI(b[f]),l=",";c.append("]");return JU.Escape.packageReadableSb(a,"int["+e+"]",c)}if(JU.AU.isAF(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(l).appendF(b[f]),l=",";c.append("]");return JU.Escape.packageReadableSb(a,
"float["+e+"]",c)}if(JU.AU.isAD(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(l).appendD(b[f]),l=",";c.append("]");return JU.Escape.packageReadableSb(a,"double["+e+"]",c)}if(JU.AU.isAP(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(l).append(JU.Escape.eP(b[f])),l=",";c.append("]");return JU.Escape.packageReadableSb(a,"point3f["+e+"]",c)}if(JU.AU.isASS(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(l).append(JU.Escape.toReadable(null,b[f])),l=",\n";c.append("]");return JU.Escape.packageReadableSb(a,
"String["+e+"][]",c)}if(JU.AU.isAII(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(l).append(JU.Escape.toReadable(null,b[f])),l=",";c.append("]");return JU.Escape.packageReadableSb(a,"int["+e+"][]",c)}if(JU.AU.isAFF(b)){c.append("[\n");e=b.length;for(f=0;f<e;f++)c.append(l).append(JU.Escape.toReadable(null,b[f])),l=",\n";c.append("]");return JU.Escape.packageReadableSb(a,"float[][]",c)}if(JU.AU.isADD(b)){c.append("[\n");e=b.length;for(f=0;f<e;f++)c.append(l).append(JU.Escape.toReadable(null,
b[f])),l=",\n";c.append("]");return JU.Escape.packageReadableSb(a,"double[][]",c)}if(y(b,"JU.Lst")){e=b.size();for(f=0;f<e;f++)c.append(JU.Escape.toReadable(a+"["+(f+1)+"]",b.get(f)));return JU.Escape.packageReadableSb(a,"List["+e+"]",c)}if(y(b,"JU.M34")||y(b,"JU.T3")||y(b,"JU.P4")||y(b,"JU.A4"))return c.append(JU.Escape.e(b)),JU.Escape.packageReadableSb(a,null,c);if(y(b,"java.util.Map")){for(l=b.keySet().iterator();l.hasNext();)e=l.next(),c.append(JU.Escape.toReadable((null==a?"":a+".")+e,b.get(e)));
return c.toString()}return JU.Escape.packageReadable(a,null,JU.PT.toJSON(null,b))},"~S,~O");b.packageReadableSb=c(b,"packageReadableSb",function(a,b,c){return JU.Escape.packageReadable(a,b,c.toString())},"~S,~S,JU.SB");b.packageReadable=c(b,"packageReadable",function(a,b,c){return null==a?(null==b?"":b+"\t")+c:"\n"+a+"\t"+(null==b?"":"*"+b+"\t")+c},"~S,~S,~S");b.escapeModelFileNumber=c(b,"escapeModelFileNumber",function(a){return""+w(a/1E6)+"."+a%1E6},"~N");b.encapsulateData=c(b,"encapsulateData",
function(a,b,c){switch(c){case 1:b=JU.Escape.escapeFloatA(b,!1)+";\n";break;case 2:b=JU.Escape.escapeFloatAA(b,!0)+";\n";break;case 3:b=JU.Escape.escapeFloatAAA(b,!0)+";\n";break;default:b=b.toString()}return'  DATA "'+a+'"\n'+b+'    END "'+a+'";\n'},"~S,~O,~N");b.unescapeUnicode=c(b,"unescapeUnicode",function(a){for(var b=a.length,c=JU.SB.newN(b),l=0;l<b;){var e=a.charAt(l++);if("\\"==e&&l<b)switch(e=a.charAt(l++),e.charCodeAt(0)){case 117:if(l<b){for(var e=0,f=4;0<=--f&&l<b;){var h=a.charAt(l),
h=JU.Escape.getHexitValue(h);if(0>h)break;e<<=4;e+=h;++l}e=String.fromCharCode(e)}}c.appendC(e)}return c.toString()},"~S");b.getHexitValue=c(b,"getHexitValue",function(a){return 48<=a.charCodeAt(0)&&57>=a.charCodeAt(0)?a.charCodeAt(0)-48:97<=a.charCodeAt(0)&&102>=a.charCodeAt(0)?10+a.charCodeAt(0)-97:65<=a.charCodeAt(0)&&70>=a.charCodeAt(0)?10+a.charCodeAt(0)-65:-1},"~S");b.unescapeStringArray=c(b,"unescapeStringArray",function(a){if(null==a||!a.startsWith("[")||!a.endsWith("]"))return null;var b=
new JU.Lst,c=F(1,0);for(c[0]=1;c[0]<a.length;){var l=JU.PT.getQuotedStringNext(a,c);if(null==l)return null;for(b.addLast(JU.PT.rep(l,'\\"','"'));c[0]<a.length&&'"'!=a.charAt(c[0]);)c[0]++}return b.toArray(Array(b.size()))},"~S");b.isAV=c(b,"isAV",function(a){return y(a[0],JS.SV)},"~O");b.escapeHelical=c(b,"escapeHelical",function(a,b,c,l,e){switch(b){case 134217751:return null==e?new JU.P3:e[0];case 1073741854:case 1665140738:return null==e?new JU.V3:e[1073741854==b?1:2];case 134217729:return Float.$valueOf(null==
e?NaN:e[3].x);case 135176:return null==e?"":'draw ID "'+a+'" VECTOR '+JU.Escape.eP(e[0])+" "+JU.Escape.eP(e[1])+" color "+(0>e[3].x?"{255.0 200.0 0.0}":"{255.0 0.0 128.0}");case 1745489939:return(null==e?"":"measure "+JU.Escape.eP(c)+JU.Escape.eP(e[0])+JU.Escape.eP(e[4]))+JU.Escape.eP(l);default:return null==e?[]:e}},"~S,~N,JU.P3,JU.P3,~A")});s("JU");B(["J.api.JmolGraphicsInterface","JU.Normix"],"JU.GData","JU.AU $.P3 $.V3 JU.C $.Font $.Shader".split(" "),function(){var b=n(function(){this.apiPlatform=
null;this.antialiasEnabled=this.currentlyRendering=this.translucentCoverOnly=!1;this.displayMaxY2=this.displayMinY2=this.displayMaxX2=this.displayMinX2=this.displayMaxY=this.displayMinY=this.displayMaxX=this.displayMinX=this.windowHeight=this.windowWidth=0;this.inGreyscaleMode=this.antialiasThisFrame=!1;this.backgroundImage=this.changeableColixMap=null;this.newWindowHeight=this.newWindowWidth=0;this.newAntialiasing=!1;this.ht3=this.argbCurrent=this.colixCurrent=this.ambientOcclusion=this.height=this.width=
this.depth=this.slab=this.yLast=this.xLast=this.contrastColix=this.bgcolor=0;this.isPass2=!1;this.bufferSize=this.textY=0;this.currentFont=this.graphicsForMetrics=this.vwr=this.shader=null;this.argbNoisyDn=this.argbNoisyUp=0;this.transformedVectors=null;v(this,arguments)},JU,"GData",null,J.api.JmolGraphicsInterface);P(b,function(){this.changeableColixMap=V(16,0);this.transformedVectors=Array(JU.GData.normixCount)});A(b,function(){this.shader=new JU.Shader});c(b,"initialize",function(a,b){this.vwr=
a;this.apiPlatform=b},"JV.Viewer,J.api.GenericPlatform");c(b,"setDepth",function(a){this.depth=0>a?0:a},"~N");j(b,"setSlab",function(a){this.slab=Math.max(0,a)},"~N");j(b,"setSlabAndZShade",function(a,b){this.setSlab(a);this.setDepth(b)},"~N,~N,~N,~N,~N");c(b,"setAmbientOcclusion",function(a){this.ambientOcclusion=a},"~N");j(b,"isAntialiased",function(){return this.antialiasThisFrame});c(b,"getChangeableColix",function(a,b){a>=this.changeableColixMap.length&&(this.changeableColixMap=JU.AU.arrayCopyShort(this.changeableColixMap,
a+16));0==this.changeableColixMap[a]&&(this.changeableColixMap[a]=JU.C.getColix(b));return a|-32768},"~N,~N");c(b,"changeColixArgb",function(a,b){a<this.changeableColixMap.length&&0!=this.changeableColixMap[a]&&(this.changeableColixMap[a]=JU.C.getColix(b))},"~N,~N");c(b,"getColorArgbOrGray",function(a){if(3==a)return JU.C.getArgb(this.contrastColix);0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?JU.C.getArgbGreyscale(a):JU.C.getArgb(a)},"~N");c(b,"fixChangeableColix",function(a){return 0<=
a?a:this.changeableColixMap[a&2047]|a&30720},"~N");c(b,"getShades",function(a){0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?this.shader.getShadesG(a):this.shader.getShades(a)},"~N");c(b,"setGreyscaleMode",function(a){this.inGreyscaleMode=a},"~B");c(b,"getSpecularPower",function(){return this.shader.specularPower});c(b,"setSpecularPower",function(a){0>a?this.setSpecularExponent(-a):this.shader.specularPower!=a&&(this.shader.specularPower=a,this.shader.intenseFraction=a/100,
this.shader.flushCaches())},"~N");c(b,"getSpecularPercent",function(){return this.shader.specularPercent});c(b,"setSpecularPercent",function(a){this.shader.specularPercent!=a&&(this.shader.specularPercent=a,this.shader.specularFactor=a/100,this.shader.flushCaches())},"~N");c(b,"getSpecularExponent",function(){return this.shader.specularExponent});c(b,"setSpecularExponent",function(a){this.shader.specularExponent!=a&&(this.shader.specularExponent=a,this.shader.phongExponent=w(Math.pow(2,a)),this.shader.usePhongExponent=
!1,this.shader.flushCaches())},"~N");c(b,"getPhongExponent",function(){return this.shader.phongExponent});c(b,"setPhongExponent",function(a){this.shader.phongExponent==a&&this.shader.usePhongExponent||(this.shader.phongExponent=a,a=Math.log(a)/Math.log(2),this.shader.usePhongExponent=a!=D(a),this.shader.usePhongExponent||(this.shader.specularExponent=D(a)),this.shader.flushCaches())},"~N");c(b,"getDiffusePercent",function(){return this.shader.diffusePercent});c(b,"setDiffusePercent",function(a){this.shader.diffusePercent!=
a&&(this.shader.diffusePercent=a,this.shader.diffuseFactor=a/100,this.shader.flushCaches())},"~N");c(b,"getAmbientPercent",function(){return this.shader.ambientPercent});c(b,"setAmbientPercent",function(a){this.shader.ambientPercent!=a&&(this.shader.ambientPercent=a,this.shader.ambientFraction=a/100,this.shader.flushCaches())},"~N");c(b,"getSpecular",function(){return this.shader.specularOn});c(b,"setSpecular",function(a){this.shader.specularOn!=a&&(this.shader.specularOn=a,this.shader.flushCaches())},
"~B");c(b,"setCel",function(a){this.shader.setCel(a,this.shader.celPower,this.bgcolor)},"~B");c(b,"getCel",function(){return this.shader.celOn});c(b,"getCelPower",function(){return this.shader.celPower});c(b,"setCelPower",function(a){this.shader.setCel(this.shader.celOn||0==this.shader.celPower,a,this.bgcolor)},"~N");c(b,"getLightSource",function(){return this.shader.lightSource});c(b,"isClipped3",function(a,b,c){return 0>a||a>=this.width||0>b||b>=this.height||c<this.slab||c>this.depth},"~N,~N,~N");
c(b,"isClipped",function(a,b){return 0>a||a>=this.width||0>b||b>=this.height},"~N,~N");j(b,"isInDisplayRange",function(a,b){return a>=this.displayMinX&&a<this.displayMaxX&&b>=this.displayMinY&&b<this.displayMaxY},"~N,~N");j(b,"isClippedXY",function(a,b,c){a=a+1>>1;return b<-a||b>=this.width+a||c<-a||c>=this.height+a},"~N,~N,~N");c(b,"isClippedZ",function(a){return-2147483648!=a&&(a<this.slab||a>this.depth)},"~N");c(b,"clipCode3",function(a,b,c){var l=0;0>a?l|=a<this.displayMinX2?-1:8:a>=this.width&&
(l|=a>this.displayMaxX2?-1:4);0>b?l|=b<this.displayMinY2?-1:2:b>=this.height&&(l|=b>this.displayMaxY2?-1:1);c<this.slab?l|=32:c>this.depth&&(l|=16);return l},"~N,~N,~N");c(b,"clipCode",function(a){var b=0;a<this.slab?b|=32:a>this.depth&&(b|=16);return b},"~N");c(b,"getFont3D",function(a){return JU.Font.createFont3D(0,0,a,a,0,this.apiPlatform,this.graphicsForMetrics)},"~N");c(b,"getFont3DFS",function(a,b){return JU.Font.createFont3D(JU.Font.getFontFaceID(a),0,b,b,0,this.apiPlatform,this.graphicsForMetrics)},
"~S,~N");c(b,"getFontFidFS",function(a,b){return this.getFont3DFSS(a,"Bold",b).fid},"~S,~N");c(b,"getFont3DFSS",function(a,b,c){b=JU.Font.getFontStyleID(b);0>b&&(b=0);return JU.Font.createFont3D(JU.Font.getFontFaceID(a),b,c,c,0,this.apiPlatform,this.graphicsForMetrics)},"~S,~S,~N");c(b,"getFont3DScaled",function(a,b){var c=a.fontSizeNominal*b;return c==a.fontSize?a:JU.Font.createFont3D(a.idFontFace,a.idFontStyle,c,a.fontSizeNominal,a.fontSizeAngstroms,this.apiPlatform,this.graphicsForMetrics)},"JU.Font,~N");
c(b,"getFontFidI",function(a){return this.getFont3D(a).fid},"~N");c(b,"getFont3DCurrent",function(){return this.currentFont});c(b,"setFont",function(){},"JU.Font");c(b,"setFontBold",function(a,b){this.setFont(this.getFont3DFSS(a,"Bold",b))},"~S,~N");c(b,"setBackgroundTransparent",function(){},"~B");c(b,"setBackgroundArgb",function(a){this.bgcolor=a;this.setCel(this.shader.celOn)},"~N");c(b,"setBackgroundImage",function(a){this.backgroundImage=a},"~O");c(b,"setWindowParameters",function(a,b,c){this.setWinParams(a,
b,c)},"~N,~N,~B");c(b,"setWinParams",function(a,b,c){this.newWindowWidth=a;this.newWindowHeight=b;this.newAntialiasing=c},"~N,~N,~B");c(b,"setNewWindowParametersForExport",function(){this.windowWidth=this.newWindowWidth;this.windowHeight=this.newWindowHeight;this.setWidthHeight(!1)});c(b,"setWidthHeight",function(a){this.width=this.windowWidth;this.height=this.windowHeight;a&&(this.width<<=1,this.height<<=1);this.xLast=this.width-1;this.yLast=this.height-1;this.displayMinX=-(this.width>>1);this.displayMaxX=
this.width-this.displayMinX;this.displayMinY=-(this.height>>1);this.displayMaxY=this.height-this.displayMinY;this.displayMinX2=this.displayMinX<<2;this.displayMaxX2=this.displayMaxX<<2;this.displayMinY2=this.displayMinY<<2;this.displayMaxY2=this.displayMaxY<<2;this.ht3=3*this.height;this.bufferSize=this.width*this.height},"~B");c(b,"beginRendering",function(){},"JU.M3,~B,~B,~B");c(b,"endRendering",function(){});c(b,"snapshotAnaglyphChannelBytes",function(){});c(b,"getScreenImage",function(){return null},
"~B");c(b,"releaseScreenImage",function(){});c(b,"applyAnaglygh",function(){},"J.c.STER,~A");c(b,"setPass2",function(){return!1},"~B");c(b,"destroy",function(){});c(b,"clearFontCache",function(){});c(b,"drawQuadrilateralBits",function(a,b,c,l,e,f){a.drawLineBits(b,b,c,l);a.drawLineBits(b,b,l,e);a.drawLineBits(b,b,e,f);a.drawLineBits(b,b,f,c)},"J.api.JmolRendererInterface,~N,JU.P3,JU.P3,JU.P3,JU.P3");c(b,"drawTriangleBits",function(a,b,c,l,e,f,h,k){1==(k&1)&&a.drawLineBits(c,e,b,l);2==(k&2)&&a.drawLineBits(e,
h,l,f);4==(k&4)&&a.drawLineBits(h,c,f,b)},"J.api.JmolRendererInterface,JU.P3,~N,JU.P3,~N,JU.P3,~N,~N");c(b,"plotImage",function(){},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");c(b,"plotText",function(){},"~N,~N,~N,~N,~N,~S,JU.Font,J.api.JmolRendererInterface");c(b,"renderBackground",function(){},"J.api.JmolRendererInterface");c(b,"setColor",function(a){this.argbCurrent=this.argbNoisyUp=this.argbNoisyDn=a},"~N");c(b,"setC",function(){return!0},"~N");c(b,"isDirectedTowardsCamera",function(a){return 0>
a||0<this.transformedVectors[a].z},"~N");b.roundInt=c(b,"roundInt",function(a){return a},"~N");c(b,"clear",function(){});j(b,"renderAllStrings",function(){},"~O");c(b,"addRenderer",function(){},"~N");b.getHermiteList=c(b,"getHermiteList",function(a,b,c,l,e,f,h,k,j,E){var p=j+1;j-=1;var q=c.x,r=c.y,u=c.z,n=l.x,s=l.y;l=l.z;var v=(n-b.x)*a/8,w=(s-b.y)*a/8;b=(l-b.z)*a/8;var x=(e.x-q)*a/8,y=(e.y-r)*a/8,z=(e.z-u)*a/8,A=(f.x-n)*a/8,B=(f.y-s)*a/8;a=(f.z-l)*a/8;h[k]=c;for(c=0;c<p;c++){var D=c/j;c==p-1&&(q=
n,r=s,u=l,n=e.x,s=e.y,l=e.z,v=x,w=y,b=z,x=A,y=B,z=a,D-=1);var F=D*D,H=F*D;f=2*H-3*F+1;var I=-2*H+3*F,D=H-2*F+D,K=H-F,F=f*q+I*n+D*v+K*x,H=f*r+I*s+D*w+K*y;f=f*u+I*l+D*b+K*z;h[k+c]=E?JU.P3.new3(F,H,f):JU.V3.new3(F,H,f)}},"~N,JU.T3,JU.T3,JU.T3,JU.T3,JU.T3,~A,~N,~N,~B");c(b,"setTextPosition",function(a){this.textY=a},"~N");c(b,"getTextPosition",function(){return this.textY});c(b,"getTransformedVertexVectors",function(){return this.transformedVectors});j(b,"drawLinePixels",function(){},"JU.P3i,JU.P3i,~N,~N");
b.getSlabObjectType=c(b,"getSlabObjectType",function(a,b,c,l){return x(-1,[Integer.$valueOf(a),b,Boolean.$valueOf(c),l])},"~N,~O,~B,~O");b.getSlabWithinRange=c(b,"getSlabWithinRange",function(a,b){return x(-1,[Integer.$valueOf(1073742114),x(-1,[Float.$valueOf(a),Float.$valueOf(b)]),Boolean.FALSE,null])},"~N,~N");b.normixCount=JU.Normix.getNormixCount()});s("JU");B(["javajs.api.JSInterface","J.api.JmolAppletInterface","$.JmolStatusListener"],"JU.GenericApplet","java.net.URL java.util.Hashtable JU.Lst $.PT $.SB J.awtjs2d.Platform J.c.CBK J.i18n.GT JU.Logger $.Parser JV.JC $.Viewer".split(" "),
function(){var b=n(function(){this.documentBase=this.codeBase=null;this.isSigned=!1;this.language=null;this.doTranslate=!0;this.mayScript=this.isStereoSlave=this.haveDocumentAccess=!1;this.vwrOptions=this.b$=this.viewer=this.gRight=this.statusTextarea=this.statusText=this.statusForm=this.fullName=this.htmlName=null;this.haveNotifiedError=!1;this.appletObject=null;this.loading=!1;this.htParams=this.outputBuffer=this.syncId=null;v(this,arguments)},JU,"GenericApplet",null,[javajs.api.JSInterface,J.api.JmolAppletInterface,
J.api.JmolStatusListener]);c(b,"setStereoGraphics",function(a){return a?vwr.apiPlatform.context:null},"~B");j(b,"processMouseEvent",function(a,b,c,l,e){return this.viewer.processMouseEvent(a,b,c,l,e)},"~N,~N,~N,~N,~N");j(b,"processKeyEvent",function(a){this.viewer.processKeyEvent(a)},"~O");j(b,"setDisplay",function(a){this.viewer.setDisplay(a)},"~O");j(b,"setStatusDragDropped",function(a,b,c,l,e){return this.viewer.setStatusDragDropped(a,b,c,l,e)},"~N,~N,~N,~S,~A");j(b,"startHoverWatcher",function(a){this.viewer.startHoverWatcher(a)},
"~B");j(b,"update",function(){this.viewer.updateJS()});j(b,"openFileAsyncSpecial",function(a,b){this.viewer.openFileAsyncSpecial(a,b)},"~S,~N");j(b,"openFileAsyncSpecialType",function(a,b,c){this.viewer.openFileAsyncSpecialType(a,b,c)},"~S,~N,~S");j(b,"processTwoPointGesture",function(a){this.viewer.processTwoPointGesture(a)},"~A");j(b,"setScreenDimension",function(a,b){this.viewer.setScreenDimension(a,b)},"~N,~N");c(b,"resizeDisplay",function(a,b){J.awtjs2d.Platform.Jmol().resizeApplet(this.viewer.html5Applet,
F(-1,[a,b]))},"~N,~N");c(b,"init",function(a){this.b$=new java.util.Hashtable;null==JU.GenericApplet.htRegistry&&(JU.GenericApplet.htRegistry=new java.util.Hashtable);this.appletObject=a;this.htmlName=JU.PT.split(""+this.getJmolParameter("name"),"_object")[0];this.syncId=this.getJmolParameter("syncId");this.fullName=this.htmlName+"__"+this.syncId+"__";System.out.println("Jmol JavaScript applet "+this.fullName+" initializing");a=this.getValue("logLevel",this.getBooleanValue("debug",!1)?"5":"4").charAt(0).charCodeAt(0)-
48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');JU.Logger.setLogLevel(a);J.i18n.GT.ignoreApplicationBundle();this.initOptions();JU.GenericApplet.checkIn(this.fullName,this.appletObject);this.initApplication()},"~O");c(b,"initApplication",function(){this.vwrOptions.put("applet",Boolean.TRUE);null==this.getJmolParameter("statusListener")&&this.vwrOptions.put("statusListener",this);this.language=this.getJmolParameter("language");null!=this.language&&
this.vwrOptions.put("language",this.language);this.viewer=new JV.Viewer(this.vwrOptions);this.viewer.pushHoldRepaint();var a=this.getValueLowerCase("emulate","jmol");this.setStringProperty("defaults",a.equals("chime")?"RasMol":"Jmol");this.setStringProperty("backgroundColor",this.getValue("bgcolor",this.getValue("boxbgcolor","black")));this.viewer.setBooleanProperty("frank",!0);this.loading=!0;for(var b,a=0,c=J.c.CBK.values();a<c.length&&((b=c[a])||1);a++){var l=b.name(),e=this.getValue(l+"Callback",
null);if(null!=e)if("string"==typeof e)this.setStringProperty(l+"Callback",e);else{var f=null,f="Info."+e.name;this.setStringProperty(l+"Callback",f);this.setCallback(l,e)}}this.loading=!1;null!=this.language&&System.out.print("requested language="+this.language+"; ");this.doTranslate=!"none".equals(this.language)&&this.getBooleanValue("doTranslate",!0);this.language=J.i18n.GT.getLanguage();System.out.println("language="+this.language);if(null==this.b$.get(J.c.CBK.SCRIPT)&&null==this.b$.get(J.c.CBK.ERROR)&&
(null!=this.b$.get(J.c.CBK.MESSAGE)||null!=this.statusForm||null!=this.statusText))this.doTranslate&&null==this.getValue("doTranslate",null)&&(this.doTranslate=!1,JU.Logger.warn("Note -- Presence of message callback disables disable translation; to enable message translation use jmolSetTranslation(true) prior to jmolApplet()")),this.doTranslate&&JU.Logger.warn("Note -- Automatic language translation may affect parsing of message callbacks messages; use scriptCallback or errorCallback to process errors");
this.doTranslate||(J.i18n.GT.setDoTranslate(!1),JU.Logger.warn("Note -- language translation disabled"));this.getBooleanValue("popupMenu",!0)||this.viewer.getProperty("DATA_API","disablePopupMenu",null);b=this.getJmolParameter("menuFile");null!=b&&this.viewer.setMenu(b,!0);b=this.getValue("script","");a=this.getValue("loadInline",null);if(null==a){if(null!=(a=this.getValue("load",null)))b='load "'+a+'";'+b;a=null}this.viewer.popHoldRepaint("applet init");null!=a&&null!=this.viewer.loadInline(a)&&
(b="");0<b.length&&this.scriptProcessor(b,null,1);this.viewer.notifyStatusReady(!0)});j(b,"destroy",function(){this.gRight=null;this.viewer.notifyStatusReady(!1);this.viewer=null;JU.GenericApplet.checkOut(this.fullName)});c(b,"getBooleanValue",function(a,b){var c=this.getValue(a,b?"true":"");return c.equalsIgnoreCase("true")||c.equalsIgnoreCase("on")||c.equalsIgnoreCase("yes")},"~S,~B");c(b,"getValue",function(a,b){var c=this.getJmolParameter(a);System.out.println("Jmol getValue "+a+" "+c);return null==
c?b:c},"~S,~S");c(b,"getValueLowerCase",function(a,b){var c=this.getValue(a,b);null!=c&&(c=c.trim().toLowerCase(),0==c.length&&(c=null));return c},"~S,~S");c(b,"setStringProperty",function(a,b){null!=b&&(JU.Logger.info(a+' = "'+b+'"'),this.viewer.setStringProperty(a,b))},"~S,~S");c(b,"scriptProcessor",function(a,b,c){if(null==a||0==a.length)return"";switch(c){case 0:return a=this.viewer.scriptCheck(a),"string"==typeof a?a:"";case 1:return null!=b?this.viewer.scriptWaitStatus(a,b).toString():this.viewer.scriptWait(a);
default:return this.viewer.script(a)}},"~S,~S,~N");j(b,"register",function(a,b){JU.GenericApplet.checkIn(a,b)},"~S,J.api.JmolSyncInterface");c(b,"syncScript",function(a){this.viewer.syncScript(a,"~",0)},"~S");j(b,"handleEvent",function(a){return null==this.viewer?!1:this.viewer.processMouseEvent(a.id,a.x,a.y,a.modifiers,a.when)},"java.awt.Event");j(b,"getAppletInfo",function(){return J.i18n.GT.o(J.i18n.GT.$("Jmol Applet version {0} {1}.\n\nAn OpenScience project.\n\nSee http://www.jmol.org for more information"),
x(-1,[JV.JC.version,JV.JC.date]))+"\nhtmlName = "+JU.PT.esc(this.htmlName)+"\nsyncId = "+JU.PT.esc(this.syncId)+"\ndocumentBase = "+JU.PT.esc(this.documentBase)+"\ncodeBase = "+JU.PT.esc(this.codeBase)});j(b,"script",function(a){this.scriptNoWait(a)},"~S");j(b,"scriptCheck",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,0)},"~S");j(b,"scriptNoWait",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,2)},"~S");c(b,"scriptWait",function(a){return this.scriptWait(a,
null)},"~S");c(b,"scriptWait",function(a,b){if(null==a||0==a.length)return"";this.outputBuffer=null;return this.scriptProcessor(a,b,1)},"~S,~S");j(b,"scriptWaitOutput",function(a){if(null==a||0==a.length)return"";this.outputBuffer=new JU.SB;this.viewer.scriptWaitStatus(a,"");a=null==this.outputBuffer?"":this.outputBuffer.toString();this.outputBuffer=null;return a},"~S");j(b,"getModelIndexFromId",function(a){return this.viewer.getModelIndexFromId(a)},"~S");c(b,"getProperty",function(a){return this.viewer.getProperty(null,
a,"")},"~S");c(b,"getProperty",function(a,b){b||(b="");return this.viewer.getProperty(null,a,b)},"~S,~S");c(b,"getPropertyAsString",function(a){return this.viewer.getProperty("readable",a,"").toString()},"~S");c(b,"getPropertyAsString",function(a,b){b||(b="");return this.viewer.getProperty("readable",a,b).toString()},"~S,~S");c(b,"getPropertyAsJSON",function(a){return this.viewer.getProperty("JSON",a,"").toString()},"~S");c(b,"getPropertyAsJSON",function(a,b){b||(b="");return this.viewer.getProperty("JSON",
a,b).toString()},"~S,~S");j(b,"loadInlineString",function(a,b,c){a=this.viewer.loadInlineAppend(a,c);null==a&&this.script(b);return a},"~S,~S,~B");j(b,"loadInlineArray",function(a,b,c){if(null==a||0==a.length)return null;a=this.viewer.loadInline(a,c);null==a&&this.script(b);return a},"~A,~S,~B");j(b,"loadDOMNode",function(a){return this.viewer.openDOM(a)},"~O");c(b,"loadInline",function(a){return this.loadInlineString(a,"",!1)},"~S");c(b,"loadInline",function(a,b){return this.loadInlineString(a,b,
!1)},"~S,~S");c(b,"loadInline",function(a){return this.loadInlineArray(a,"",!1)},"~A");c(b,"loadInline",function(a,b){return this.loadInlineArray(a,b,!1)},"~A,~S");c(b,"output",function(a){null!=this.outputBuffer&&null!=a&&this.outputBuffer.append(a).appendC("\n")},"~S");j(b,"setCallback",function(a,b){this.viewer.sm.setCallbackFunction(a,b)},"~S,~O");j(b,"setCallbackFunction",function(a,b){if(a.equalsIgnoreCase("language"))this.consoleMessage(""),this.consoleMessage(null);else{var c=J.c.CBK.getCallback(a);
null!=c&&(this.loading||c!==J.c.CBK.EVAL)?null==b?this.b$.remove(c):this.b$.put(c,b):this.consoleMessage("Available callbacks include: "+J.c.CBK.getNameList().$replace(";"," ").trim())}},"~S,~S");c(b,"consoleMessage",function(a){this.notifyCallback(J.c.CBK.ECHO,x(-1,["",a]))},"~S");j(b,"notifyEnabled",function(a){switch(a){case J.c.CBK.SYNC:if(!JU.GenericApplet.isJS)return!1;case J.c.CBK.ANIMFRAME:case J.c.CBK.DRAGDROP:case J.c.CBK.ECHO:case J.c.CBK.ERROR:case J.c.CBK.EVAL:case J.c.CBK.IMAGE:case J.c.CBK.LOADSTRUCT:case J.c.CBK.MEASURE:case J.c.CBK.MESSAGE:case J.c.CBK.PICK:case J.c.CBK.SCRIPT:return!0}return null!=
this.b$.get(a)},"J.c.CBK");c(b,"notifyCallback",function(a,b){var c=null==a?null:this.b$.get(a),l=null==a||null!=c&&(null==b||null==b[0]),e=!1;null!=b&&(b[0]=this.htmlName);var f=null==b||null==b[1]?null:b[1].toString();if(null!=a)switch(a){case J.c.CBK.APPLETREADY:b[3]=this.appletObject;break;case J.c.CBK.CLICK:"alert".equals(c)&&(f="x="+b[1]+" y="+b[2]+" action="+b[3]+" clickCount="+b[4]);break;case J.c.CBK.ANIMFRAME:var h=b[1],k=h[0],j=h[1],E=h[2],p=h[3],h=h[4],q=-2>=k,r=0>p?-1:1,u=0>h?-1:1;l&&
(b=x(-1,[this.htmlName,Integer.$valueOf(Math.max(k,-2-k)),Integer.$valueOf(j),Integer.$valueOf(E),Integer.$valueOf(Math.abs(p)),Integer.$valueOf(Math.abs(h)),Integer.$valueOf(q?1:0),Integer.$valueOf(r),Integer.$valueOf(u),b[2],b[3]]));break;case J.c.CBK.ECHO:j=(k=2==b.length)||1==b[2].intValue();l||(j&&(e=!0),l=!k&&null!=(c=this.b$.get(a=J.c.CBK.MESSAGE)));e||this.output(f);break;case J.c.CBK.LOADSTRUCT:k=b[4];if(null!=k){k=(0<=k.indexOf("NOTE:")?"":J.i18n.GT.$("File Error:"))+k;this.doShowStatus(k);
this.notifyCallback(J.c.CBK.MESSAGE,x(-1,["",k]));return}break;case J.c.CBK.MEASURE:l||(l=null!=(c=this.b$.get(a=J.c.CBK.MESSAGE)));k=b[3];0<=k.indexOf("Picked")||0<=k.indexOf("Sequence")?(this.doShowStatus(f),e=!0):0<=k.indexOf("Completed")&&(f=k+": "+f,e=!0);break;case J.c.CBK.MESSAGE:e=!l;l=(new Boolean(l&null!=f)).valueOf();e||this.output(f);break;case J.c.CBK.PICK:this.doShowStatus(f);e=!0;break;case J.c.CBK.SCRIPT:!(0<b[3].intValue())&&!l&&(l=null!=(c=this.b$.get(a=J.c.CBK.MESSAGE)));this.output(f);
this.doShowStatus(f);break;case J.c.CBK.SYNC:this.sendScript(f,b[2],!0,l);return}e&&(e=this.viewer.getProperty("DATA_API","getAppConsole",null),null!=e&&(e.notifyCallback(a,b),this.output(f)));if(l&&this.mayScript)try{this.doSendCallback(a,c,b,f)}catch(n){if(H(n,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug(a.name()+"Callback call error to "+c+": "+n),this.haveNotifiedError=!0;else throw n;}},"J.c.CBK,~A");c(b,"sendScript",function(a,b,c,l){if(!JU.GenericApplet.isJS||l&&
(a=this.notifySync(a,b),null==a||0==a.length||a.equals("0")))return"";var e=new JU.Lst;JU.GenericApplet.findApplets(b,this.syncId,this.fullName,e);var f=e.size();if(0==f)return!l&&!b.equals("*")&&JU.Logger.error(this.fullName+" couldn't find applet "+b),"";b=c?null:new JU.SB;l=c&&a.equals("GET_GRAPHICS");var h=c&&a.equals("SET_GRAPHICS_OFF");l&&this.viewer.setStereo(!1,this.gRight=null);for(var k=0;k<f;k++){var j=e.get(k),E=JU.GenericApplet.htRegistry.get(j);JU.Logger.debugging&&JU.Logger.debug(this.fullName+
" sending to "+j+": "+a);try{if(l||h)return this.viewer.setStereo(this.isStereoSlave=l,this.gRight=E.setStereoGraphics(l)),"";c?E.syncScript(a):b.append(E.scriptWait(a,"output")).append("\n")}catch(p){if(H(p,Exception))j=this.htmlName+" couldn't send to "+j+": "+a+": "+p,JU.Logger.error(j),c||b.append(j);else throw p;}}return c?"":b.toString()},"~S,~S,~B,~B");c(b,"notifySync",function(a,b){var c=this.b$.get(J.c.CBK.SYNC);if(!this.mayScript||null==c)return a;try{return this.doSendCallback(J.c.CBK.SYNC,
c,x(-1,[this.fullName,a,b]),null)}catch(l){if(H(l,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug("syncCallback call error to "+c+": "+l),this.haveNotifiedError=!0;else throw l;}return a},"~S,~S");j(b,"eval",function(a){var b=a.indexOf("\u0001");return 0<=b?this.sendScript(a.substring(b+1),a.substring(0,b),!1,!1):!this.haveDocumentAccess?"NO EVAL ALLOWED":null!=this.b$.get(J.c.CBK.EVAL)?(this.notifyCallback(J.c.CBK.EVAL,x(-1,[null,a])),""):this.doEval(a)},"~S");j(b,"createImage",
function(){return null},"~S,~S,~O,~N");j(b,"getRegistryInfo",function(){JU.GenericApplet.checkIn(null,null);return JU.GenericApplet.htRegistry});j(b,"showUrl",function(a){JU.Logger.debugging&&JU.Logger.debug("showUrl("+a+")");if(null!=a&&0<a.length)try{this.doShowDocument(new java.net.URL(ca("java.net.URL"),a,null))}catch(b){if(H(b,"java.net.MalformedURLException"))this.consoleMessage("Malformed URL:"+a);else throw b;}},"~S");j(b,"resizeInnerPanel",function(a){var b=L(2,0);JU.Parser.parseStringInfestedFloatArray(a,
null,b);this.resizeDisplay(D(b[0]),D(b[1]));return F(-1,[D(b[0]),D(b[1])])},"~S");b.checkIn=c(b,"checkIn",function(a,b){null!=a&&(JU.Logger.info("AppletRegistry.checkIn("+a+")"),JU.GenericApplet.htRegistry.put(a,b));if(JU.Logger.debugging)for(var c,l=JU.GenericApplet.htRegistry.entrySet().iterator();l.hasNext()&&((c=l.next())||1);){var e=c.getKey();JU.Logger.debug(e+" "+c.getValue())}},"~S,~O");b.checkOut=c(b,"checkOut",function(a){JU.GenericApplet.htRegistry.remove(a)},"~S");b.findApplets=c(b,"findApplets",
function(a,b,c,l){if(null!=a&&0<=a.indexOf(",")){var e=JU.PT.split(a,",");for(a=0;a<e.length;a++)JU.GenericApplet.findApplets(e[a],b,c,l)}else if(b="__"+b+"__",null==a||a.equals("*")||a.equals(">"))for(a=JU.GenericApplet.htRegistry.keySet().iterator();a.hasNext()&&((e=a.next())||1);)!e.equals(c)&&0<e.indexOf(b)&&l.addLast(e);else 0<=c.indexOf("_object")&&0>a.indexOf("_object")&&(a+="_object"),0>a.indexOf("__")&&(a+=b),JU.GenericApplet.htRegistry.containsKey(a)||(a="jmolApplet"+a),!a.equals(c)&&JU.GenericApplet.htRegistry.containsKey(a)&&
l.addLast(a)},"~S,~S,~S,JU.Lst");j(b,"notifyAudioEnded",function(a){a.put("jsEvent","TRUE");this.viewer.sm.notifyAudioStatus(a);a.remove("jsEvent")},"~O");c(b,"setJSOptions",function(a){this.htParams=new java.util.Hashtable;null==a&&(a=new java.util.Hashtable);this.vwrOptions=a;for(var b,c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)this.htParams.put(b.getKey().toLowerCase(),b.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath")},"java.util.Map");c(b,
"initOptions",function(){this.vwrOptions.remove("debug");this.vwrOptions.put("fullName",this.fullName);this.haveDocumentAccess="true".equalsIgnoreCase(""+this.getValue("allowjavascript","true"));this.mayScript=!0});c(b,"getJmolParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:""+a},"~S");j(b,"functionXY",function(a,b,c){var l=L(Math.abs(b),Math.abs(c),0);if(!this.mayScript||!this.haveDocumentAccess||0==b||0==c)return l;try{if(0<b&&0<c)for(var e=0;e<b;e++)for(var f=0;f<
c;f++)l[e][f]=window.eval(a)(this.htmlName,e,f);else if(0<c){var h;h=window.eval(a)(this.htmlName,b,c);b=Math.abs(b);var k=L(b*c,0);JU.Parser.parseStringInfestedFloatArray(h,null,k);for(a=e=0;e<b;e++)for(f=0;f<c;f++,a++)l[e][f]=k[a]}else window.eval(a)(this.htmlName,b,c,l)}catch(j){if(H(j,Exception))JU.Logger.error("Exception "+j+" with nX, nY: "+b+" "+c);else throw j;}return l},"~S,~N,~N");j(b,"functionXYZ",function(a,b,c,l){var e=L(Math.abs(b),Math.abs(c),Math.abs(l),0);if(!this.mayScript||!this.haveDocumentAccess||
0==b||0==c||0==l)return e;try{window.eval(a)(this.htmlName,b,c,l,e)}catch(f){if(H(f,Exception))JU.Logger.error("Exception "+f+" for "+a+" with nX, nY, nZ: "+b+" "+c+" "+l);else throw f;}return e},"~S,~N,~N,~N");c(b,"doShowDocument",function(a){var b=JU.PT.split(a.toString(),"?POST?");if(1==b.length)window.open(b[0]);else{a="<form id=f method=POST action='"+b[0]+"'>";a+="<input type='hidden' name='name' value='nmr-1h-prediction' id='name'><input type='submit' value='working...'>";for(var b=b[1].$plit("&"),
c=0;c<b.length;c++){var l=b[c],e=l.indexOf("="),f=l.substring(0,e),l=l.substring(e);a=0<=l.indexOf("\n")?a+("<textarea style='display:none' name="+f+">"+l+"</textarea>"):a+("<input type=hidden name="+f+' value="'+l+'">')}a+="</form>";b=window.open("");b.document.write(a);b.document.getElementById("f").submit()}},"java.net.URL");c(b,"doSendCallback",function(a,b,c,l){var e="string"==typeof b;if(!(null==b||e&&0==b.length)){if(e&&"alert".equals(b))return alert(l),"";l=e?JU.PT.split(b,"."):null;try{var f;
if(e){f=window[l[0]];for(var h=1;h<l.length;h++)f=f[l[h]]}else f=b;for(h=0;h<c.length;h++)c[h]&&c[h].booleanValue&&(c[h]=c[h].booleanValue()),c[h]instanceof Number&&(c[h]=+c[h]);return f.apply(this,c)}catch(k){System.out.println("callback "+a+" failed "+k)}}return""},"J.c.CBK,~O,~A,~S");c(b,"doEval",function(a){try{return window.eval(a)}catch(b){JU.Logger.error("# error evaluating "+a+":"+b.toString())}return""},"~S");c(b,"doShowStatus",function(a){try{System.out.println(a)}catch(b){if(!H(b,Exception))throw b;
}},"~S");c(b,"getGLmolView",function(){return this.viewer.getGLmolView()});c(b,"openFile",function(a){return this.viewer.openFile(a)},"~S");j(b,"cacheFileByName",function(a,b){return this.viewer.cacheFileByName(a,b)},"~S,~B");j(b,"cachePut",function(a,b){this.viewer.cachePut(a,b)},"~S,~O");j(b,"getFullName",function(){return this.fullName});j(b,"processPluginRequest",function(){return null},"~S,~S,~O");b.htRegistry=null;b.isJS=!1});s("JU");B(["JU.AU"],"JU.Geodesic",["java.util.Hashtable","JU.V3"],
function(){var b=I(JU,"Geodesic",null);b.getNeighborVertexesArrays=c(b,"getNeighborVertexesArrays",function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.neighborVertexesArrays});b.getVertexCount=c(b,"getVertexCount",function(a){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexCounts[a]},"~N");b.getVertexVectors=c(b,"getVertexVectors",function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexVectors});
b.getVertexVector=c(b,"getVertexVector",function(a){return JU.Geodesic.vertexVectors[a]},"~N");b.getFaceVertexes=c(b,"getFaceVertexes",function(a){return JU.Geodesic.faceVertexesArrays[a]},"~N");b.createGeodesic=c(b,"createGeodesic",function(a){if(!(a<=JU.Geodesic.currentLevel)){JU.Geodesic.currentLevel=a;var b=V(a+1,0);JU.Geodesic.neighborVertexesArrays=JU.AU.newShort2(a+1);JU.Geodesic.faceVertexesArrays=JU.AU.newShort2(a+1);JU.Geodesic.vertexVectors=Array(12);JU.Geodesic.vertexVectors[0]=JU.V3.new3(0,
0,JU.Geodesic.halfRoot5);for(var c=0;5>c;++c)JU.Geodesic.vertexVectors[c+1]=JU.V3.new3(Math.cos(1.2566370614359172*c),Math.sin(1.2566370614359172*c),0.5),JU.Geodesic.vertexVectors[c+6]=JU.V3.new3(Math.cos(1.2566370614359172*c+0.6283185307179586),Math.sin(1.2566370614359172*c+0.6283185307179586),-0.5);JU.Geodesic.vertexVectors[11]=JU.V3.new3(0,0,-JU.Geodesic.halfRoot5);for(c=12;0<=--c;)JU.Geodesic.vertexVectors[c].normalize();JU.Geodesic.faceVertexesArrays[0]=JU.Geodesic.faceVertexesIcosahedron;JU.Geodesic.neighborVertexesArrays[0]=
JU.Geodesic.neighborVertexesIcosahedron;b[0]=12;for(c=0;c<a;++c)JU.Geodesic.quadruple(c,b);JU.Geodesic.vertexCounts=b}},"~N");b.quadruple=c(b,"quadruple",function(a,b){JU.Geodesic.htVertex=new java.util.Hashtable;var c=JU.Geodesic.vertexVectors.length,l=JU.Geodesic.faceVertexesArrays[a],e=l.length,f=w(e/3),h=c+(c+f-2),f=4*f;JU.Geodesic.vertexVectors=JU.AU.arrayCopyObject(JU.Geodesic.vertexVectors,h);f=V(3*f,0);JU.Geodesic.faceVertexesArrays[a+1]=f;var k=V(6*h,0);JU.Geodesic.neighborVertexesArrays[a+
1]=k;for(var j=k.length;0<=--j;)k[j]=-1;b[a+1]=h;JU.Geodesic.vertexNext=c;for(j=c=0;j<e;){var E=l[j++],p=l[j++],q=l[j++],r=JU.Geodesic.getVertex(E,p),u=JU.Geodesic.getVertex(p,q),n=JU.Geodesic.getVertex(q,E);f[c++]=E;f[c++]=r;f[c++]=n;f[c++]=p;f[c++]=u;f[c++]=r;f[c++]=q;f[c++]=n;f[c++]=u;f[c++]=n;f[c++]=r;f[c++]=u;JU.Geodesic.addNeighboringVertexes(k,r,E);JU.Geodesic.addNeighboringVertexes(k,r,n);JU.Geodesic.addNeighboringVertexes(k,r,u);JU.Geodesic.addNeighboringVertexes(k,r,p);JU.Geodesic.addNeighboringVertexes(k,
u,p);JU.Geodesic.addNeighboringVertexes(k,u,n);JU.Geodesic.addNeighboringVertexes(k,u,q);JU.Geodesic.addNeighboringVertexes(k,n,q);JU.Geodesic.addNeighboringVertexes(k,n,E)}e=JU.Geodesic.vertexVectors.length;if(c!=f.length)throw new NullPointerException;if(JU.Geodesic.vertexNext!=h)throw new NullPointerException;for(j=0;12>j;++j)for(l=0;5>l;++l){c=k[6*j+l];if(0>c)throw new NullPointerException;if(c>=e)throw new NullPointerException;if(-1!=k[6*j+5])throw new NullPointerException;}for(j=72;j<k.length;++j){c=
k[j];if(0>c)throw new NullPointerException;if(c>=e)throw new NullPointerException;}for(j=0;j<h;++j){e=0;for(l=k.length;0<=--l;)k[l]==j&&++e;if(12>j&&5!=e||12<=j&&6!=e)throw new NullPointerException;e=0;for(l=f.length;0<=--l;)f[l]==j&&++e;if(12>j&&5!=e||12<=j&&6!=e)throw new NullPointerException;}JU.Geodesic.htVertex=null},"~N,~A");b.addNeighboringVertexes=c(b,"addNeighboringVertexes",function(a,b,c){for(var l=6*b,e=l+6;l<e;++l){if(a[l]==c)return;if(0>a[l]){a[l]=c;for(var f=6*c,h=f+6;f<h;++f){if(a[f]==
b)return;if(0>a[f]){a[f]=b;return}}}}throw new NullPointerException;},"~A,~N,~N");b.getVertex=c(b,"getVertex",function(a,b){if(a>b){var c=a;a=b;b=c}var c=Integer.$valueOf((a<<16)+b),l=JU.Geodesic.htVertex.get(c);if(null!=l)return l.shortValue();l=JU.Geodesic.vertexVectors[JU.Geodesic.vertexNext]=new JU.V3;l.add2(JU.Geodesic.vertexVectors[a],JU.Geodesic.vertexVectors[b]);l.normalize();JU.Geodesic.htVertex.put(c,Short.$valueOf(JU.Geodesic.vertexNext));return JU.Geodesic.vertexNext++},"~N,~N");b.halfRoot5=
0.5*Math.sqrt(5);b.faceVertexesIcosahedron=V(-1,[0,1,2,0,2,3,0,3,4,0,4,5,0,5,1,1,6,2,2,7,3,3,8,4,4,9,5,5,10,1,6,1,10,7,2,6,8,3,7,9,4,8,10,5,9,11,6,10,11,7,6,11,8,7,11,9,8,11,10,9]);b.neighborVertexesIcosahedron=V(-1,[1,2,3,4,5,-1,0,5,10,6,2,-1,0,1,6,7,3,-1,0,2,7,8,4,-1,0,3,8,9,5,-1,0,4,9,10,1,-1,1,10,11,7,2,-1,2,6,11,8,3,-1,3,7,11,9,4,-1,4,8,11,10,5,-1,5,9,11,6,1,-1,6,7,8,9,10,-1]);b.vertexCounts=null;b.vertexVectors=null;b.faceVertexesArrays=null;b.neighborVertexesArrays=null;b.currentLevel=0;b.vertexNext=
0;b.htVertex=null});s("JU");z=n(function(){this.entryCount=0;this.entries=null;v(this,arguments)},JU,"Int2IntHash",null);A(z,function(b){this.entries=Array(b)},"~N");c(z,"get",function(b){for(var a=this.entries,a=a[(b&2147483647)%a.length];null!=a;a=a.next)if(a.key==b)return a.value;return-2147483648},"~N");c(z,"put",function(b,a){for(var d=this.entries,c=d.length,l=(b&2147483647)%c,e=d[l];null!=e;e=e.next)if(e.key==b){e.value=a;return}if(this.entryCount>c){for(var l=c,c=c+(c+1),f=Array(c),h=l;0<=
--h;)for(e=d[h];null!=e;){var k=e,e=e.next,l=(k.key&2147483647)%c;k.next=f[l];f[l]=k}d=this.entries=f;l=(b&2147483647)%c}d[l]=new JU.Int2IntHashEntry(b,a,d[l]);++this.entryCount},"~N,~N");z=n(function(){this.value=this.key=0;this.next=null;v(this,arguments)},JU,"Int2IntHashEntry",null);A(z,function(b,a,d){this.key=b;this.value=a;this.next=d},"~N,~N,JU.Int2IntHashEntry");s("JU");B(null,"JU.JSJSONParser",["java.util.Hashtable","JU.JSONException","$.Lst","$.SB"],function(){var b=n(function(){this.str=
null;this.len=this.index=0;this.asHashTable=!1;v(this,arguments)},JU,"JSJSONParser",null);c(b,"parseMap",function(a,b){this.index=0;this.asHashTable=b;this.str=a;this.len=a.length;if("{"!=this.getChar())return null;this.returnChar();return this.getValue(!1)},"~S,~B");c(b,"parse",function(a,b){this.index=0;this.asHashTable=b;this.str=a;this.len=a.length;return this.getValue(!1)},"~S,~B");c(b,"next",function(){return this.index<this.len?this.str.charAt(this.index++):"\x00"});c(b,"returnChar",function(){this.index--});
c(b,"getChar",function(){for(;;){var a=this.next();if(0==a.charCodeAt(0)||" "<a)return a}});c(b,"getValue",function(a){var b=this.index,c=this.getChar();switch(c.charCodeAt(0)){case 0:return null;case 34:case 39:return this.getString(c);case 123:if(!a)return this.getObject();c=String.fromCharCode(0);break;case 91:if(!a)return this.getArray();c=String.fromCharCode(0);break;default:for(this.returnChar();" "<=c&&0>"[,]{:}'\"".indexOf(c);)c=this.next();this.returnChar();a&&":"!=c&&(c=String.fromCharCode(0))}if(a&&
0==c.charCodeAt(0))throw new JU.JSONException("invalid key");b=this.str.substring(b,this.index).trim();if(!a){if(b.equals("true"))return Boolean.TRUE;if(b.equals("false"))return Boolean.FALSE;if(b.equals("null"))return this.asHashTable?b:null}c=b.charAt(0);if("0"<=c&&"9">=c||"-"==c)try{if(0>b.indexOf(".")&&0>b.indexOf("e")&&0>b.indexOf("E"))return new Integer(b);var l=Float.$valueOf(b);if(!l.isInfinite()&&!l.isNaN())return l}catch(e){if(!H(e,Exception))throw e;}System.out.println("JSON parser cannot parse "+
b);throw new JU.JSONException("invalid value");},"~B");c(b,"getString",function(a){for(var b,c=null,l=this.index;;){var e=this.index;switch((b=this.next()).charCodeAt(0)){case 0:case 10:case 13:throw this.syntaxError("Unterminated string");case 92:switch((b=this.next()).charCodeAt(0)){case 34:case 39:case 92:case 47:break;case 98:b="\b";break;case 116:b="\t";break;case 110:b="\n";break;case 102:b="\f";break;case 114:b="\r";break;case 117:var f=this.index;this.index+=4;try{b=String.fromCharCode(Integer.parseInt(this.str.substring(f,
this.index),16))}catch(h){if(H(h,Exception))throw this.syntaxError("Substring bounds error");throw h;}break;default:throw this.syntaxError("Illegal escape.");}break;default:if(b==a)return null==c?this.str.substring(l,e):c.toString()}this.index>e+1&&null==c&&(c=new JU.SB,c.append(this.str.substring(l,e)));null!=c&&c.appendC(b)}},"~S");c(b,"getObject",function(){var a=this.asHashTable?new java.util.Hashtable:new java.util.HashMap,b=null;switch(this.getChar().charCodeAt(0)){case 125:return a;case 0:throw new JU.JSONException("invalid object");
}this.returnChar();for(var c=!1;;)switch(!0==(c=!c)?b=this.getValue(!0).toString():a.put(b,this.getValue(!1)),this.getChar().charCodeAt(0)){case 125:return a;case 58:if(c)continue;c=!0;case 44:if(!c)continue;default:throw this.syntaxError("Expected ',' or ':' or '}'");}});c(b,"getArray",function(){var a=new JU.Lst;switch(this.getChar().charCodeAt(0)){case 93:return a;case 0:throw new JU.JSONException("invalid array");}this.returnChar();for(var b=!1;;)switch(b?(a.addLast(null),b=!1):a.addLast(this.getValue(!1)),
this.getChar().charCodeAt(0)){case 44:switch(this.getChar().charCodeAt(0)){case 93:return a;case 44:b=!0;default:this.returnChar()}continue;case 93:return a;default:throw this.syntaxError("Expected ',' or ']'");}});c(b,"syntaxError",function(a){return new JU.JSONException(a+" for "+this.str.substring(0,Math.min(this.index,this.len)))},"~S")});s("JU");B(["java.lang.RuntimeException"],"JU.JSONException",null,function(){I(JU,"JSONException",RuntimeException)});s("JU");B(["java.util.Hashtable","JU.DefaultLogger"],
"JU.Logger",null,function(){var b=I(JU,"Logger",null);b.getProperty=c(b,"getProperty",function(a,b){try{var c=System.getProperty("jmol.logger."+a,null);if(null!=c)return c.equalsIgnoreCase("true")}catch(l){if(!H(l,Exception))throw l;}return b},"~S,~B");b.setLogger=c(b,"setLogger",function(a){JU.Logger._logger=a;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"JU.LoggerInterface");b.isActiveLevel=c(b,
"isActiveLevel",function(a){return null!=JU.Logger._logger&&0<=a&&7>a&&JU.Logger._activeLevels[a]},"~N");b.setActiveLevel=c(b,"setActiveLevel",function(a,b){0>a&&(a=0);7<=a&&(a=6);JU.Logger._activeLevels[a]=b;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"~N,~B");b.setLogLevel=c(b,"setLogLevel",function(a){for(var b=7;0<=--b;)JU.Logger.setActiveLevel(b,b<=a)},"~N");b.getLevel=c(b,"getLevel",function(a){switch(a){case 6:return"DEBUGHIGH";
case 5:return"DEBUG";case 4:return"INFO";case 3:return"WARN";case 2:return"ERROR";case 1:return"FATAL"}return"????"},"~N");b.logLevel=c(b,"logLevel",function(){return JU.Logger._logLevel});b.doLogLevel=c(b,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");b.debug=c(b,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(b){}},"~S");b.info=c(b,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(b){}},"~S");b.warn=c(b,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&
JU.Logger._logger.warn(a)}catch(b){}},"~S");b.warnEx=c(b,"warnEx",function(a,b){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,b)}catch(c){}},"~S,Throwable");b.error=c(b,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(b){}},"~S");b.errorEx=c(b,"errorEx",function(a,b){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.errorEx(a,b)}catch(c){}},"~S,Throwable");b.getLogLevel=c(b,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;
return 0});b.fatal=c(b,"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(b){}},"~S");b.fatalEx=c(b,"fatalEx",function(a,b){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,b)}catch(c){}},"~S,Throwable");b.startTimer=c(b,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");b.getTimerMsg=c(b,"getTimerMsg",function(a,b){0==b&&(b=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+b+" ms"},"~S,~N");b.getTimeFrom=
c(b,"getTimeFrom",function(a){var b;return null==a||null==(b=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-b.longValue()},"~S");b.checkTimer=c(b,"checkTimer",function(a,b){var c=JU.Logger.getTimeFrom(a);0<=c&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,c));b&&JU.Logger.startTimer(a);return c},"~S,~B");b.checkMemory=c(b,"checkMemory",function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});b._logger=new JU.DefaultLogger;b._activeLevels=ga(7,!1);b._logLevel=
!1;b.debugging=!1;b.debuggingHigh=!1;JU.Logger._activeLevels[6]=JU.Logger.getProperty("debugHigh",!1);JU.Logger._activeLevels[5]=JU.Logger.getProperty("debug",!1);JU.Logger._activeLevels[4]=JU.Logger.getProperty("info",!0);JU.Logger._activeLevels[3]=JU.Logger.getProperty("warn",!0);JU.Logger._activeLevels[2]=JU.Logger.getProperty("error",!0);JU.Logger._activeLevels[1]=JU.Logger.getProperty("fatal",!0);JU.Logger._logLevel=JU.Logger.getProperty("logLevel",!1);JU.Logger.debugging=null!=JU.Logger._logger&&
(JU.Logger._activeLevels[5]||JU.Logger._activeLevels[6]);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6];b.htTiming=new java.util.Hashtable});s("JU");O(JU,"LoggerInterface");s("JU");O(JU,"SimpleNode");s("JU");O(JU,"SimpleEdge");s("JU");O(JU,"Node",JU.SimpleNode);s("JU");B(["java.lang.Enum","JU.SimpleEdge"],"JU.Edge",["JU.PT"],function(){var b=n(function(){this.index=-1;this.order=0;v(this,arguments)},JU,"Edge",null,JU.SimpleEdge);c(b,"isPartial",function(){return!this.isPymolMultiple()&&
0!=(this.order&224)&&!this.isStereo()&&!this.isPymolMultiple()});c(b,"isPymolMultiple",function(){return 98304==(this.order&98304)});c(b,"isStereo",function(){return 0!=(this.order&1024)});b.getArgbHbondType=c(b,"getArgbHbondType",function(a){return JU.Edge.argbsHbondType[(a&30720)>>11]},"~N");b.getBondOrderNumberFromOrder=c(b,"getBondOrderNumberFromOrder",function(a){a&=131071;switch(a){case 131071:case 65535:return"0";case 1025:case 1041:return"1";case 32768:break;default:0!=(a&98304)&&(a&=3)}return JU.Edge.isOrderH(a)||
JU.Edge.isAtropism(a)||0!=(a&256)?"1":0!=(a&224)?(a>>5)+"."+(a&31):JU.Edge.EnumBondOrder.getNumberFromCode(a)},"~N");b.getCmlBondOrder=c(b,"getCmlBondOrder",function(a){a=JU.Edge.getBondOrderNameFromOrder(a);switch(a.charAt(0).charCodeAt(0)){case 115:case 100:case 116:return""+a.toUpperCase().charAt(0);case 97:return 0<=a.indexOf("Double")?"D":0<=a.indexOf("Single")?"S":"aromatic";case 112:return 0<=a.indexOf(" ")?a.substring(a.indexOf(" ")+1):"partial12"}return null},"~N");b.getBondOrderNameFromOrder=
c(b,"getBondOrderNameFromOrder",function(a){a&=131071;switch(a){case 65535:case 131071:return"";case 1025:return"near";case 1041:return"far";case 32768:return JU.Edge.EnumBondOrder.STRUT.$$name;case 1:return JU.Edge.EnumBondOrder.SINGLE.$$name;case 2:return JU.Edge.EnumBondOrder.DOUBLE.$$name;default:0!=(a&98304)&&(a&=3)}return 0!=(a&224)?"partial "+JU.Edge.getBondOrderNumberFromOrder(a):JU.Edge.isOrderH(a)?JU.Edge.EnumBondOrder.H_REGULAR.$$name:65537==(a&65537)?(a=JU.Edge.getAtropismCode(a),"atropisomer_"+
w(a/4)+a%4):0!=(a&256)?JU.Edge.EnumBondOrder.SINGLE.$$name:JU.Edge.EnumBondOrder.getNameFromCode(a)},"~N");b.getAtropismOrder=c(b,"getAtropismOrder",function(a,b){return JU.Edge.getAtropismOrder12((a<<2)+b)},"~N,~N");b.getAtropismOrder12=c(b,"getAtropismOrder12",function(a){return a<<11|65537},"~N");b.getAtropismCode=c(b,"getAtropismCode",function(a){return a>>11&15},"~N");b.getAtropismNode=c(b,"getAtropismNode",function(a,b,c){a=a>>11+(c?0:2)&3;return b.getEdges()[a-1].getOtherNode(b)},"~N,JU.Node,~B");
b.isAtropism=c(b,"isAtropism",function(a){return 65537==(a&65537)},"~N");b.isOrderH=c(b,"isOrderH",function(a){return 0!=(a&30720)&&0==(a&65537)},"~N");b.getPartialBondDotted=c(b,"getPartialBondDotted",function(a){return a&31},"~N");b.getPartialBondOrder=c(b,"getPartialBondOrder",function(a){return 0!=(a&1024)?1:(a&131071)>>5},"~N");b.getCovalentBondOrder=c(b,"getCovalentBondOrder",function(a){if(0!=(a&1024))return 1;if(0==(a&1023))return 0;a&=131071;if(0!=(a&224))return JU.Edge.getPartialBondOrder(a);
0!=(a&256)&&(a&=-257);0!=(a&248)&&(a=1);return a&7},"~N");b.getBondOrderFromFloat=c(b,"getBondOrderFromFloat",function(a){switch(D(10*a)){case 10:return 1;case 5:case -10:return 33;case 15:return 515;case -15:return 66;case 20:return 2;case 25:return 97;case -25:return 100;case 30:return 3;case 40:return 4;case 50:return 5;case 60:return 6}return 131071},"~N");b.getBondOrderFromString=c(b,"getBondOrderFromString",function(a){if(0>a.indexOf(" "))if(0<=a.indexOf("."))a="partial "+a;else{if(JU.PT.isOneOf(a,
";1;2;3;4;5;6;"))return a.charAt(0).charCodeAt(0)-48;var b=JU.Edge.EnumBondOrder.getCodeFromName(a);if(131071!=b||!a.toLowerCase().startsWith("atropisomer_")||14!=a.length)return b;try{b=JU.Edge.getAtropismOrder(Integer.parseInt(a.substring(12,13)),Integer.parseInt(a.substring(13,14)))}catch(c){if(!H(c,"NumberFormatException"))throw c;}return b}if(0!=a.toLowerCase().indexOf("partial "))return 131071;a=a.substring(8).trim();return JU.Edge.getPartialBondOrderFromFloatEncodedInt(JU.Edge.getFloatEncodedInt(a))},
"~S");b.getPartialBondOrderFromFloatEncodedInt=c(b,"getPartialBondOrderFromFloatEncodedInt",function(a){return(w(a/1E6)%7<<5)+(a%1E6&31)},"~N");b.getFloatEncodedInt=c(b,"getFloatEncodedInt",function(a){var b=a.indexOf(".");if(1>b||"-"==a.charAt(0)||a.endsWith(".")||a.contains(".0"))return 2147483647;var c=0,e=0;if(0<b)try{c=Integer.parseInt(a.substring(0,b)),0>c&&(c=-c)}catch(f){if(H(f,"NumberFormatException"))c=-1;else throw f;}var h=a.length;if(b<h-1)try{var k=b+Math.min(6,h-b),e=Integer.parseInt(a.substring(b+
1,k))}catch(j){if(!H(j,"NumberFormatException"))throw j;}c=1E6*c+e;return 0>c||2147483647<c?2147483647:c},"~S");j(b,"getBondType",function(){return this.order&131071});c(b,"setCIPChirality",function(){},"~N");c(b,"getCIPChirality",function(){return""},"~B");var a=n(function(){this.code=0;this.$$name=this.number=null;v(this,arguments)},JU.Edge,"EnumBondOrder",Enum);A(a,function(a,b,c){this.code=a;this.number=b;this.$$name=c},"~N,~S,~S");a.getCodeFromName=c(a,"getCodeFromName",function(a){for(var b,
c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.$$name.equalsIgnoreCase(a))return b.code;return 131071},"~S");a.getNameFromCode=c(a,"getNameFromCode",function(a){for(var b,c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.code==a)return b.$$name;return"?"},"~N");a.getNumberFromCode=c(a,"getNumberFromCode",function(a){for(var b,c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.code==a)return b.number;return"?"},"~N");K(a,"SINGLE",
0,[1,"1","single"]);K(a,"DOUBLE",1,[2,"2","double"]);K(a,"TRIPLE",2,[3,"3","triple"]);K(a,"QUADRUPLE",3,[4,"4","quadruple"]);K(a,"QUINTUPLE",4,[5,"5","quintuple"]);K(a,"sextuple",5,[6,"6","sextuple"]);K(a,"AROMATIC",6,[515,"1.5","aromatic"]);K(a,"STRUT",7,[32768,"1","struts"]);K(a,"H_REGULAR",8,[2048,"1","hbond"]);K(a,"PARTIAL01",9,[33,"0.5","partial"]);K(a,"PARTIAL12",10,[66,"1.5","partialDouble"]);K(a,"PARTIAL23",11,[97,"2.5","partialTriple"]);K(a,"PARTIAL32",12,[100,"2.5","partialTriple2"]);K(a,
"AROMATIC_SINGLE",13,[513,"1","aromaticSingle"]);K(a,"AROMATIC_DOUBLE",14,[514,"2","aromaticDouble"]);K(a,"ATROPISOMER",15,[65537,"1","atropisomer"]);K(a,"UNSPECIFIED",16,[17,"1","unspecified"]);b.argbsHbondType=F(-1,[4294928820,4294967040,4294967040,4294967295,4294902015,4294901760,4294944E3,4278255615,4278255360,4294934656])});s("JU");B(["JU.Elements"],"JU.JmolMolecule",["java.util.Hashtable","JU.AU","$.BS","$.PT"],function(){var b=n(function(){this.nodes=null;this.nElements=this.ac=this.firstAtomIndex=
this.indexInModel=this.modelIndex=this.moleculeIndex=0;this.altElementCounts=this.elementCounts=null;this.altElementMax=this.elementNumberMax=0;this.atNos=this.atomList=this.mf=null;v(this,arguments)},JU,"JmolMolecule",null);P(b,function(){this.elementCounts=F(JU.Elements.elementNumberMax,0);this.altElementCounts=F(JU.Elements.altElementMax,0)});A(b,function(){});b.getMolecules=c(b,"getMolecules",function(a,b,c,l){var e=null,f=new JU.BS,h=-1,k=0,j=0,E=Array(4);null==l&&(l=new JU.BS);for(var p=0;p<
a.length;p++)if(!l.get(p)&&!f.get(p)){var q=a[p];null==q||q.isDeleted()?l.set(p):(q=q.getModelIndex(),q!=h&&(h=q,k=0,e=b[q]),f=JU.JmolMolecule.getBranchBitSet(a,p,e,c,-1,!0,!0),0<=f.nextSetBit(0)&&(E=JU.JmolMolecule.addMolecule(E,j++,a,p,f,q,k++,l)))}return JU.JmolMolecule.allocateArray(E,j)},"~A,~A,JU.Lst,JU.BS");b.getBranchBitSet=c(b,"getBranchBitSet",function(a,b,c,l,e,f,h){var k=JU.BS.newN(a.length);if(0>b)return k;0<=e&&c.clear(e);return JU.JmolMolecule.getCovalentlyConnectedBitSet(a,a[b],c,
f,h,l,k,null,null)?k:new JU.BS},"~A,~N,JU.BS,JU.Lst,~N,~B,~B");b.addMolecule=c(b,"addMolecule",function(a,b,c,l,e,f,h,k){k.or(e);b==a.length&&(a=JU.JmolMolecule.allocateArray(a,2*b+1));a[b]=JU.JmolMolecule.initialize(c,b,l,e,f,h);return a},"~A,~N,~A,~N,JU.BS,~N,~N,JU.BS");b.getMolecularFormulaAtoms=c(b,"getMolecularFormulaAtoms",function(a,b,c,l){var e=new JU.JmolMolecule;e.nodes=a;e.atomList=b;return e.getMolecularFormula(!1,c,l)},"~A,JU.BS,~A,~B");c(b,"getMolecularFormula",function(a,b,c){this.getMFArray(a,
b,c);if(0>this.elementCounts[0])return"?";b=a="";for(var l=1;l<=this.elementNumberMax;l++)c=this.elementCounts[l],0!=c&&(a+=b+JU.Elements.elementSymbolFromNumber(l)+" "+c,b=" ");return a},"~B,~A,~B");c(b,"getMFArray",function(a,b,c){null==this.atomList&&(this.atomList=new JU.BS,this.atomList.setBits(0,null==this.atNos?this.nodes.length:this.atNos.length));this.elementCounts=F(JU.Elements.elementNumberMax,0);this.altElementCounts=F(JU.Elements.altElementMax,0);this.ac=this.atomList.cardinality();for(var l=
this.nElements=0,e=this.atomList.nextSetBit(0);0<=e;e=this.atomList.nextSetBit(e+1),l++){var f,h=null;if(null==this.atNos){h=this.nodes[e];if(null==h)continue;f=h.getAtomicAndIsotopeNumber()}else f=this.atNos[e];var k=null==b?1:D(8*b[l]);f<JU.Elements.elementNumberMax?(0==this.elementCounts[f]&&this.nElements++,this.elementCounts[f]+=k,this.elementNumberMax=Math.max(this.elementNumberMax,f)):(f=JU.Elements.altElementIndexFromNumber(f),0==this.altElementCounts[f]&&this.nElements++,this.altElementCounts[f]+=
k,this.altElementMax=Math.max(this.altElementMax,f));a&&(f=Math.max(0,h.getImplicitHydrogenCount())+Math.max(h.getExplicitHydrogenCount(),0),0<f&&(0==this.elementCounts[1]&&this.nElements++,this.elementCounts[1]+=f*k,this.elementNumberMax=Math.max(this.elementNumberMax,1)))}if(null!=b)for(e=1;e<=this.elementNumberMax;e++){var j=w(this.elementCounts[e]/8);if(8*j!=this.elementCounts[e])return this.elementCounts[0]=-1,this.elementCounts;this.elementCounts[e]=j}if(c){b=2;for(a=!0;a;){b=1E5;for(e=1;e<=
this.elementNumberMax;e++)if(0<(j=this.elementCounts[e])&&j<b)b=j;if(1==b)break;for(;1<b;b--){a=!0;for(e=1;e<=this.elementNumberMax&&a;e++)if(w((j=this.elementCounts[e])/b)*b!=j)a=!1;if(a){for(e=1;e<=this.elementNumberMax;e++)this.elementCounts[e]/=b;break}}}}return this.elementCounts},"~B,~A,~B");b.initialize=c(b,"initialize",function(a,b,c,l,e,f){var h=new JU.JmolMolecule;h.nodes=a;h.firstAtomIndex=c;h.atomList=l;h.ac=l.cardinality();h.moleculeIndex=b;h.modelIndex=e;h.indexInModel=f;return h},"~A,~N,~N,JU.BS,~N,~N");
b.getCovalentlyConnectedBitSet=c(b,"getCovalentlyConnectedBitSet",function(a,b,c,l,e,f,h,k,j){var E=b.getIndex();if(!c.get(E)||!e&&0<b.getBioStructureTypeName().length)return l;c.clear(E);if(null!=f&&!h.get(E))for(var p=f.size();0<=--p;){var q=f.get(p);if(q.get(E)){h.or(q);c.andNot(q);for(p=q.nextSetBit(0);0<=p;p=q.nextSetBit(p+1)){var r=a[p];null!=r&&(c.set(p),JU.JmolMolecule.getCovalentlyConnectedBitSet(a,r,c,l,e,f,h,k,b),c.clear(p))}break}}h.set(E);E=b.getEdges();if(null==E)return!0;for(p=E.length;0<=
--p;)if(q=E[p],null!=q&&q.isCovalent()&&(q=q.getOtherNode(b),q!==j&&(q===k||!JU.JmolMolecule.getCovalentlyConnectedBitSet(a,q,c,l,e,f,h,k,b))))return!1;return!0},"~A,JU.Node,JU.BS,~B,~B,JU.Lst,JU.BS,JU.Node,JU.Node");b.allocateArray=c(b,"allocateArray",function(a,b){return b==a.length?a:JU.AU.arrayCopyObject(a,b)},"~A,~N");b.getBitSetForMF=c(b,"getBitSetForMF",function(a,b,c){var l=new java.util.Hashtable,e,f;c=JU.PT.rep(JU.PT.clean(c+"Z")," ","");for(var h=0,k=0,j=0,E=c.length;h<E;h++)if((f=Character.isDigit(e=
c.charAt(h)))||0<h&&Character.isUpperCase(e)){var j=h,p=c.substring(k,j).trim();if(f)for(;h<E&&Character.isDigit(c.charAt(h));)h++;k=h;l.put(p,F(-1,[f?JU.PT.parseInt(c.substring(j,k)):1]))}c=new JU.BS;for(h=b.nextSetBit(0);0<=h;h=b.nextSetBit(h+1))e=a[h].getElementSymbol(),e=l.get(e),null==e||1>e[0]--||c.set(h);var q;for(a=l.values().iterator();a.hasNext()&&((q=a.next())||1);)if(0<q[0])return new JU.BS;return c},"~A,JU.BS,~S");b.getBranchesForInversion=c(b,"getBranchesForInversion",function(a,b,c){for(var l=
new JU.BS,e=a[b],f=e.getEdges(),h=e.getBondCount();0<=--h;)1==f[h].getBondType()&&l.set(f[h].getOtherNode(e).getIndex());if(2>l.cardinality())l.clearAll();else for(h=l.nextSetBit(0);0<=h;h=l.nextSetBit(h+1))1!=a[h].getCovalentBondCount()&&(e=JU.BS.copy(c),e.clear(b),f=JU.BS.newN(a.length),JU.JmolMolecule.getCovalentlyConnectedBitSet(a,a[h],e,!0,!0,null,f,a[b],a[b])||l.clear(h));return l},"~A,~N,JU.BS")});s("JU");B(["java.util.Hashtable","JU.DefaultLogger"],"JU.Logger",null,function(){var b=I(JU,"Logger",
null);b.getProperty=c(b,"getProperty",function(a,b){try{var c=System.getProperty("jmol.logger."+a,null);if(null!=c)return c.equalsIgnoreCase("true")}catch(l){if(!H(l,Exception))throw l;}return b},"~S,~B");b.setLogger=c(b,"setLogger",function(a){JU.Logger._logger=a;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"JU.LoggerInterface");b.isActiveLevel=c(b,"isActiveLevel",function(a){return null!=JU.Logger._logger&&
0<=a&&7>a&&JU.Logger._activeLevels[a]},"~N");b.setActiveLevel=c(b,"setActiveLevel",function(a,b){0>a&&(a=0);7<=a&&(a=6);JU.Logger._activeLevels[a]=b;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"~N,~B");b.setLogLevel=c(b,"setLogLevel",function(a){for(var b=7;0<=--b;)JU.Logger.setActiveLevel(b,b<=a)},"~N");b.getLevel=c(b,"getLevel",function(a){switch(a){case 6:return"DEBUGHIGH";case 5:return"DEBUG";
case 4:return"INFO";case 3:return"WARN";case 2:return"ERROR";case 1:return"FATAL"}return"????"},"~N");b.logLevel=c(b,"logLevel",function(){return JU.Logger._logLevel});b.doLogLevel=c(b,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");b.debug=c(b,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(b){}},"~S");b.info=c(b,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(b){}},"~S");b.warn=c(b,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&
JU.Logger._logger.warn(a)}catch(b){}},"~S");b.warnEx=c(b,"warnEx",function(a,b){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,b)}catch(c){}},"~S,Throwable");b.error=c(b,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(b){}},"~S");b.errorEx=c(b,"errorEx",function(a,b){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.errorEx(a,b)}catch(c){}},"~S,Throwable");b.getLogLevel=c(b,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;
return 0});b.fatal=c(b,"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(b){}},"~S");b.fatalEx=c(b,"fatalEx",function(a,b){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,b)}catch(c){}},"~S,Throwable");b.startTimer=c(b,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");b.getTimerMsg=c(b,"getTimerMsg",function(a,b){0==b&&(b=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+b+" ms"},"~S,~N");b.getTimeFrom=
c(b,"getTimeFrom",function(a){var b;return null==a||null==(b=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-b.longValue()},"~S");b.checkTimer=c(b,"checkTimer",function(a,b){var c=JU.Logger.getTimeFrom(a);0<=c&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,c));b&&JU.Logger.startTimer(a);return c},"~S,~B");b.checkMemory=c(b,"checkMemory",function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});b._logger=new JU.DefaultLogger;b._activeLevels=ga(7,!1);b._logLevel=
!1;b.debugging=!1;b.debuggingHigh=!1;JU.Logger._activeLevels[6]=JU.Logger.getProperty("debugHigh",!1);JU.Logger._activeLevels[5]=JU.Logger.getProperty("debug",!1);JU.Logger._activeLevels[4]=JU.Logger.getProperty("info",!0);JU.Logger._activeLevels[3]=JU.Logger.getProperty("warn",!0);JU.Logger._activeLevels[2]=JU.Logger.getProperty("error",!0);JU.Logger._activeLevels[1]=JU.Logger.getProperty("fatal",!0);JU.Logger._logLevel=JU.Logger.getProperty("logLevel",!1);JU.Logger.debugging=null!=JU.Logger._logger&&
(JU.Logger._activeLevels[5]||JU.Logger._activeLevels[6]);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6];b.htTiming=new java.util.Hashtable});s("JU");O(JU,"LoggerInterface");s("JU");B(["JU.V3"],"JU.Measure","javajs.api.Interface JU.Lst $.M3 $.P3 $.P4 $.Quat".split(" "),function(){var b=I(JU,"Measure",null);b.computeAngle=c(b,"computeAngle",function(a,b,c,l,e,f){l.sub2(a,b);e.sub2(c,b);a=l.angle(e);return f?a/0.017453292:a},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,~B");b.computeAngleABC=
c(b,"computeAngleABC",function(a,b,c,l){var e=new JU.V3,f=new JU.V3;return JU.Measure.computeAngle(a,b,c,e,f,l)},"JU.T3,JU.T3,JU.T3,~B");b.computeTorsion=c(b,"computeTorsion",function(a,b,c,l,e){if(1E-10>a.distanceSquared(b))return 0;var f=a.x-b.x,h=a.y-b.y;a=a.z-b.z;var k=c.x-b.x,j=c.y-b.y,E=c.z-b.z,p=c.x-l.x,q=c.y-l.y,r=c.z-l.z;l=h*E-a*j;b=a*k-f*E;var u=f*j-h*k;c=j*r-E*q;E=E*p-k*r;k=k*q-j*p;p=1/(c*c+E*E+k*k);j=Math.sqrt(1/(l*l+b*b+u*u));p=Math.sqrt(p);l=(l*c+b*E+u*k)*j*p;1<l&&(l=1);-1>l&&(l=-1);
l=Math.acos(l);f=f*c+h*E+a*k;h=Math.abs(f);l=0<f/h?l:-l;return e?l/0.017453292:l},"JU.T3,JU.T3,JU.T3,JU.T3,~B");b.getPlaneThroughPoints=c(b,"getPlaneThroughPoints",function(a,b,c,l,e,f){null==l&&(l=new JU.V3);null==e&&(e=new JU.V3);a=JU.Measure.getNormalThroughPoints(a,b,c,l,e);f.set4(l.x,l.y,l.z,a);return f},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,JU.P4");b.getPlaneThroughPoint=c(b,"getPlaneThroughPoint",function(a,b,c){c.set4(b.x,b.y,b.z,-b.dot(a))},"JU.T3,JU.V3,JU.P4");b.distanceToPlane=c(b,"distanceToPlane",
function(a,b){return null==a?NaN:(a.dot(b)+a.w)/Math.sqrt(a.dot(a))},"JU.P4,JU.T3");b.directedDistanceToPlane=c(b,"directedDistanceToPlane",function(a,b,c){a=b.dot(a)+b.w;c=b.dot(c)+b.w;return Math.signum(c)*a/Math.sqrt(b.dot(b))},"JU.P3,JU.P4,JU.P3");b.distanceToPlaneD=c(b,"distanceToPlaneD",function(a,b,c){return null==a?NaN:(a.dot(c)+a.w)/b},"JU.P4,~N,JU.P3");b.distanceToPlaneV=c(b,"distanceToPlaneV",function(a,b,c){return null==a?NaN:(a.dot(c)+b)/Math.sqrt(a.dot(a))},"JU.V3,~N,JU.P3");b.calcNormalizedNormal=
c(b,"calcNormalizedNormal",function(a,b,c,l,e){e.sub2(b,a);l.sub2(c,a);l.cross(e,l);l.normalize()},"JU.T3,JU.T3,JU.T3,JU.T3,JU.T3");b.getDirectedNormalThroughPoints=c(b,"getDirectedNormalThroughPoints",function(a,b,c,l,e,f){b=JU.Measure.getNormalThroughPoints(a,b,c,e,f);null!=l&&(c=JU.P3.newP(a),c.add(e),f=c.distance(l),c.sub2(a,e),f>c.distance(l)&&(e.scale(-1),b=-b));return b},"JU.T3,JU.T3,JU.T3,JU.T3,JU.V3,JU.V3");b.getNormalThroughPoints=c(b,"getNormalThroughPoints",function(a,b,c,l,e){JU.Measure.calcNormalizedNormal(a,
b,c,l,e);e.setT(a);return-e.dot(l)},"JU.T3,JU.T3,JU.T3,JU.T3,JU.T3");b.getPlaneProjection=c(b,"getPlaneProjection",function(a,b,c,l){var e=JU.Measure.distanceToPlane(b,a);l.set(b.x,b.y,b.z);l.normalize();0<e&&l.scale(-1);c.scaleAdd2(Math.abs(e),l,a);return e},"JU.T3,JU.P4,JU.T3,JU.V3");b.getNormalFromCenter=c(b,"getNormalFromCenter",function(a,b,c,l,e,f,h){b=JU.Measure.getNormalThroughPoints(b,c,l,f,h);a=0<JU.Measure.distanceToPlaneV(f,b,a);a==e&&f.scale(-1);return!a},"JU.P3,JU.P3,JU.P3,JU.P3,~B,JU.V3,JU.V3");
b.getNormalToLine=c(b,"getNormalToLine",function(a,b,c){c.sub2(a,b);c.cross(c,JU.Measure.axisY);c.normalize();Float.isNaN(c.x)&&c.set(1,0,0)},"JU.P3,JU.P3,JU.V3");b.getBisectingPlane=c(b,"getBisectingPlane",function(a,b,c,l,e){c.scaleAdd2(0.5,b,a);l.setT(b);l.normalize();JU.Measure.getPlaneThroughPoint(c,l,e)},"JU.P3,JU.V3,JU.T3,JU.V3,JU.P4");b.projectOntoAxis=c(b,"projectOntoAxis",function(a,b,c,l){l.sub2(a,b);var e=l.dot(c);a.scaleAdd2(e,c,b);l.sub2(a,b);return e},"JU.P3,JU.P3,JU.V3,JU.V3");b.calcBestAxisThroughPoints=
c(b,"calcBestAxisThroughPoints",function(a,b,c,l,e,f){c.setT(a[0]);l.sub2(a[b-1],c);l.normalize();JU.Measure.calcAveragePointN(a,b,c);for(var h=0;h++<f&&0.001<JU.Measure.findAxis(a,b,c,l,e););a=JU.P3.newP(a[0]);JU.Measure.projectOntoAxis(a,c,l,e);c.setT(a)},"~A,~N,JU.P3,JU.V3,JU.V3,~N");b.findAxis=c(b,"findAxis",function(a,b,c,l,e){for(var f=new JU.V3,h=new JU.V3,k=new JU.P3,j=new JU.P3,E=JU.V3.newV(l),p=0;0<=--b;)k.setT(a[b]),j.setT(k),JU.Measure.projectOntoAxis(j,c,l,e),h.sub2(k,j),h.cross(e,h),
f.add(h),p+=e.lengthSquared();a=JU.V3.newV(f);a.scale(1/p);h.cross(a,l);l.add(h);l.normalize();h.sub2(l,E);return h.length()},"~A,~N,JU.P3,JU.V3,JU.V3");b.calcAveragePoint=c(b,"calcAveragePoint",function(a,b,c){c.set((a.x+b.x)/2,(a.y+b.y)/2,(a.z+b.z)/2)},"JU.P3,JU.P3,JU.P3");b.calcAveragePointN=c(b,"calcAveragePointN",function(a,b,c){c.setT(a[0]);for(var l=1;l<b;l++)c.add(a[l]);c.scale(1/b)},"~A,~N,JU.P3");b.transformPoints=c(b,"transformPoints",function(a,b,c){for(var l=new JU.Lst,e=0;e<a.size();e++){var f=
JU.P3.newP(a.get(e));f.sub(c);b.rotTrans(f);f.add(c);l.addLast(f)}return l},"JU.Lst,JU.M4,JU.P3");b.isInTetrahedron=c(b,"isInTetrahedron",function(a,b,c,l,e,f,h,k,j){var E=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(l,e,b,h,k,f),a);if(E!=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(b,e,c,h,k,f),a)||E!=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(c,e,l,h,k,f),a))return!1;a=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(b,c,l,h,k,f),
a);if(j)return E==0<=a;e=JU.Measure.distanceToPlane(f,e);return 0>=e*a||Math.abs(e)>Math.abs(a)},"JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P4,JU.V3,JU.V3,~B");b.getIntersectionPP=c(b,"getIntersectionPP",function(a,b){var c=a.x,l=a.y,e=a.z,f=a.w,h=b.x,k=b.y,j=b.z,E=b.w,p=JU.V3.new3(c,l,e),q=JU.V3.new3(h,k,j),r=new JU.V3;r.cross(p,q);var p=Math.abs(r.x),q=Math.abs(r.y),u=Math.abs(r.z);switch(p>q?p>u?1:3:q>u?2:3){case 1:p=0;q=l*j-k*e;if(0.01>Math.abs(q))return null;e=(e*E-j*f)/q;c=(k*f-E*l)/q;break;case 2:q=
c*j-h*e;if(0.01>Math.abs(q))return null;p=(e*E-j*f)/q;e=0;c=(h*f-E*c)/q;break;default:q=c*k-h*l;if(0.01>Math.abs(q))return null;p=(l*E-k*f)/q;e=(h*f-E*c)/q;c=0}l=new JU.Lst;l.addLast(JU.P3.new3(p,e,c));r.normalize();l.addLast(r);return l},"JU.P4,JU.P4");b.getIntersection=c(b,"getIntersection",function(a,b,c,l,e,f){JU.Measure.getPlaneProjection(a,c,l,e);e.set(c.x,c.y,c.z);e.normalize();null==b&&(b=JU.V3.newV(e));c=b.dot(e);if(0.01>Math.abs(c))return null;f.sub2(l,a);l.scaleAdd2(f.dot(e)/c,b,a);return l},
"JU.P3,JU.V3,JU.P4,JU.P3,JU.V3,JU.V3");b.calculateQuaternionRotation=c(b,"calculateQuaternionRotation",function(a,b){b[1]=NaN;var c=new JU.Quat,l=a[0],e=a[1],f=l.length-1;if(2>f||l.length!=e.length)return c;for(var h=0,k=0,j=0,E=0,p=0,q=0,r=0,u=0,n=0,s=new JU.P3,v=new JU.P3,w=l[0],x=e[0],f=f+1;1<=--f;)s.sub2(l[f],w),v.sub2(e[f],x),h+=s.x*v.x,k+=s.x*v.y,j+=s.x*v.z,E+=s.y*v.x,p+=s.y*v.y,q+=s.y*v.z,r+=s.z*v.x,u+=s.z*v.y,n+=s.z*v.z;b[0]=JU.Measure.getRmsd(a,c);c=R(4,4,0);c[0][0]=h+p+n;c[0][1]=c[1][0]=
q-u;c[0][2]=c[2][0]=r-j;c[0][3]=c[3][0]=k-E;c[1][1]=h-p-n;c[1][2]=c[2][1]=k+E;c[1][3]=c[3][1]=r+j;c[2][2]=-h+p-n;c[2][3]=c[3][2]=q+u;c[3][3]=-h-p+n;h=javajs.api.Interface.getInterface("JU.Eigen").setM(c).getEigenvectorsFloatTransposed()[3];c=JU.Quat.newP4(JU.P4.new4(h[1],h[2],h[3],h[0]));b[1]=JU.Measure.getRmsd(a,c);return c},"~A,~A");b.getTransformMatrix4=c(b,"getTransformMatrix4",function(a,b,c,l){a=JU.Measure.getCenterAndPoints(a);var e=JU.Measure.getCenterAndPoints(b);b=L(2,0);var f=JU.Measure.calculateQuaternionRotation(x(-1,
[a,e]),b).getMatrix();null==l?f.rotate(a[0]):l.setT(a[0]);l=JU.V3.newVsub(e[0],a[0]);c.setMV(f,l);return b[1]},"JU.Lst,JU.Lst,JU.M4,JU.P3");b.getCenterAndPoints=c(b,"getCenterAndPoints",function(a){var b=a.size(),c=Array(b+1);c[0]=new JU.P3;if(0<b){for(var l=0;l<b;l++)c[0].add(c[l+1]=a.get(l));c[0].scale(1/b)}return c},"JU.Lst");b.getRmsd=c(b,"getRmsd",function(a,b){for(var c=0,l=a[0],e=a[1],f=l[0],h=e[0],k=l.length-1,j=new JU.P3,n=k+1;1<=--n;)j.sub2(l[n],f),b.transform2(j,j).add(h),c+=j.distanceSquared(e[n]);
return Math.sqrt(c/k)},"~A,JU.Quat");b.getBestLineThroughPoints=c(b,"getBestLineThroughPoints",function(a,b){0>=b&&(b=a.length);if(2>=b)return a;var c=new JU.P3,l=new JU.V3,e=new JU.V3;JU.Measure.calcBestAxisThroughPoints(a,b,c,l,e,8);return JU.Measure.getProjectedLineSegment(a,b,c,l,e)},"~A,~N");b.getProjectedLineSegment=c(b,"getProjectedLineSegment",function(a,b,c,l,e){null==e&&(e=new JU.V3);for(var f=b=null,h,k=3.4028235E38,j=-3.4028235E38,n=0;n<a.length;n++){JU.Measure.projectOntoAxis(h=JU.P3.newP(a[n]),
c,l,e);var p=l.dot(e);p<k&&(k=p,b=h);p>j&&(j=p,f=h)}return x(-1,[b,f])},"~A,~N,JU.P3,JU.V3,JU.V3");b.isInTriangle=c(b,"isInTriangle",function(a,b,c,l,e,f,h){e.sub2(l,b);f.sub2(c,b);h.sub2(a,b);a=e.dot(e);b=e.dot(f);e=e.dot(h);c=f.dot(f);f=f.dot(h);h=1/(a*c-b*b);c=(c*e-b*f)*h;f=(a*f-b*e)*h;return 0<=c&&0<=f&&1>=c+f},"JU.P3,JU.P3,JU.P3,JU.P3,JU.V3,JU.V3,JU.V3");b.calcBestPlaneThroughPoints=c(b,"calcBestPlaneThroughPoints",function(a,b,c){0>=b&&(b=a.length);if(3==b)return JU.Measure.getPlaneThroughPoints(a[0],
a[1],a[2],null,null,c),0;var l=c,e=new JU.P4,f=JU.Measure.calcPlaneForMode(a,b,c,"z");if(1E-6>f)return f;var h=JU.Measure.calcPlaneForMode(a,b,e,"y");h<f&&(f=h,l=e,e=c);1E-6<=f&&(h=JU.Measure.calcPlaneForMode(a,b,e,"x"),h<f&&(f=h,l=e));l!==c&&(c.setT(l),c.w=l.w);return f},"~A,~N,JU.P4");b.calcPlaneForMode=c(b,"calcPlaneForMode",function(a,b,c,l){for(var e=R(b,3,0),f=R(3,b,0),h=R(3,b,0),k=R(3,3,0),j=R(b,0),n=b;0<=--n;){var p=a[n];e[n][0]=f[0][n]="x"==l?p.z:p.x;e[n][1]=f[1][n]="y"==l?p.z:p.y;e[n][2]=
f[2][n]=1;j[n]=-("y"==l?p.y:"x"==l?p.x:p.z)}for(var q=new JU.M3,n=3;0<=--n;)for(p=3;0<=--p;){for(var r=0,u=b;0<=--u;)r+=f[n][u]*e[u][p];q.set33(n,p,r)}q.invert();for(n=3;0<=--n;)for(p=3;0<=--p;)k[n][p]=q.get33(n,p);for(n=3;0<=--n;)for(u=b;0<=--u;){r=0;for(p=3;0<=--p;)r+=k[n][p]*f[p][u];h[n][u]=r}switch(l.charCodeAt(0)){case 120:c.x=1;break;case 121:c.y=1;break;case 122:c.z=1}n=1;for(p=3;0<=--p;){e=0;for(u=b;0<=--u;)e+=h[p][u]*j[u];switch(p){case 0:n+=e*e;"x"==l?c.z=e:c.x=e;break;case 1:n+=e*e;"y"==
l?c.z=e:c.y=e;break;case 2:c.w=e}}l=Math.sqrt(n);c.scale4((0<1/c.w?1:-1)/l);for(n=l=0;n<b;n++)r=JU.Measure.distanceToPlane(c,a[n]),l+=r*r;return Math.sqrt(l/b)},"~A,~N,JU.P4,~S");b.rndPt=c(b,"rndPt",function(){return JU.P3.new3(20*Math.random(),20*Math.random(),20*Math.random())});b.testRnd=c(b,"testRnd",function(){var a=JU.P4.new4(20*Math.random(),20*Math.random(),20*Math.random(),20*Math.random());a.scale4(1/a.length());System.out.println("\n==========\n ");System.out.println("plane is "+a);for(var b=
new JU.P3,c=new JU.V3,l=Array(4),e=0;e<l.length;e++){l[e]=new JU.P3;var f=JU.Measure.rndPt();JU.Measure.getPlaneProjection(f,a,b,c);l[e].setT(b);f=0.1*Math.random();l[e].scaleAdd2(f,c,b);System.out.println(l[e]+" d="+f)}a=new JU.P4;l=JU.Measure.calcBestPlaneThroughPoints(l,-1,a);System.out.println("found "+a+" rmsd = "+l)});b.test=c(b,"test",function(){for(var a=0;10>a;a++)JU.Measure.testRnd();System.exit(0)});b.getPointsOnPlane=c(b,"getPointsOnPlane",function(a,b){for(var c=new JU.Lst,l=a.length;0<=
--l;)0.001>Math.abs(JU.Measure.distanceToPlane(b,a[l]))&&c.addLast(a[l]);return c},"~A,JU.P4");b.getLatticePoints=c(b,"getLatticePoints",function(a,b,c,l){a.addLast(new JU.P3);b=0==b?1:Math.abs(b);c=0==c?1:Math.abs(c);l=0==l?1:Math.abs(l);for(var e=a.size(),f=-b;f<=b;f++)for(var h=-c;h<=c;h++)for(var k=-l;k<=l;k++)for(var j=0;j<e;j++){var n=JU.P3.new3(f,h,k);n.add(a.get(j));a.addLast(n)}for(j=e;0<=--j;)a.removeItemAt(0);return a},"JU.Lst,~N,~N,~N");b.computeHelicalAxis=c(b,"computeHelicalAxis",function(a,
b,c){var l=new JU.V3;l.sub2(b,a);var e=c.getTheta(),f=c.getNormal(),h=l.dot(f);1E-4>Math.abs(h)&&(h=0);var k=new JU.V3;k.cross(l,f);0!=k.dot(k)&&k.normalize();var j=new JU.V3,n=JU.V3.newV(f);0==h&&(h=1.4E-45);n.scale(h);j.sub2(n,l);j.scale(0.5);k.scale(0==e?0:j.length()/Math.tan(3.141592653589793*(e/2/180)));l=JU.V3.newV(k);0!=e&&l.add(j);j=JU.P3.newP(a);j.sub(l);1.4E-45!=h&&f.scale(h);k=JU.P3.newP(j);k.add(f);e=JU.Measure.computeTorsion(a,j,k,b,!0);if(Float.isNaN(e)||1E-4>l.length())e=c.getThetaDirectedV(f);
a=Math.abs(0==e?0:360/e);h=Math.abs(1.4E-45==h?0:f.length()*(0==e?1:360/e));return x(-1,[j,f,l,JU.P3.new3(e,h,a),k])},"JU.P3,JU.P3,JU.Quat");b.axisY=JU.V3.new3(0,1,0)});s("JU");B(null,"JU.MeshSurface","JU.AU $.P3 J.api.Interface JU.BoxInfo $.C $.GData $.Geodesic".split(" "),function(){var b=n(function(){this.meshType=this.oabc=this.slicer=this.vwr=null;this.vc=0;this.surfaceAtoms=this.vertexSource=this.vvs=this.vs=null;this.pc=0;this.pis=null;this.haveQuads=this.isDrawPolygon=this.colorsExplicit=
!1;this.colixBack=this.colix=0;this.isColorSolid=!0;this.normalsTemp=this.normals=this.vcs=this.pcs=this.altVertices=this.offset=null;this.normixCount=this.normalCount=0;this.vertexSets=this.surfaceSet=this.mat4=this.bsPolygons=null;this.nSets=0;this.dataOnly=!1;this.vertexCount0=this.polygonCount0=this.iC=this.iB=this.iA=this.lastColix=this.lastColor=0;this.bsSlabGhost=this.bsSlabDisplay=null;this.slabColix=this.slabMeshType=0;this.slabOptions=this.bsDisplay=null;this.mergePolygonCount0=this.mergeVertexCount0=
0;this.isMerged=!1;v(this,arguments)},JU,"MeshSurface",null);c(b,"getMeshSlicer",function(){return null==this.slicer?this.slicer=J.api.Interface.getInterface("JU.MeshSlicer",this.vwr,"script").set(this):this.slicer});b.newMesh=c(b,"newMesh",function(a,b,c,l,e,f){var h=new JU.MeshSurface;h.pis=l;a?h.altVertices=b:h.vs=b;h.vc=0==c?b.length:c;h.normals=e;h.normalCount=0==f&&null!=e?e.length:f;return h},"~B,~A,~N,~A,~A,~N");c(b,"getVertices",function(){return null==this.altVertices?this.vs:this.altVertices});
c(b,"getFaces",function(){return this.pis});c(b,"setColix",function(a){this.colix=a},"~N");c(b,"setColixBack",function(a){this.colixBack=a},"~N");c(b,"addV",function(a,b){0==this.vc?this.vs=Array(25):this.vc==this.vs.length&&(this.vs=JU.AU.doubleLength(this.vs));this.vs[this.vc]=b?JU.P3.newP(a):a;return this.vc++},"JU.T3,~B");c(b,"addTriangle",function(a,b,c){this.addPolygon(F(-1,[a,b,c]),null)},"~N,~N,~N");c(b,"addQuad",function(a,b,c,l){this.haveQuads=!0;this.addPolygon(F(-1,[a,b,c,l]),null)},"~N,~N,~N,~N");
c(b,"setPolygonCount",function(a){this.pc=a;if(!(0>a)&&(null==this.pis||a>this.pis.length))this.pis=JU.AU.newInt2(a)},"~N");c(b,"addVCVal",function(a,b,c){0==this.vc?this.vvs=L(25,0):this.vc>=this.vvs.length&&(this.vvs=JU.AU.doubleLengthF(this.vvs));this.vvs[this.vc]=b;return this.addV(a,c)},"JU.T3,~N,~B");c(b,"addTriangleCheck",function(a,b,c,l,e,f){return null==this.vs||null!=this.vvs&&(Float.isNaN(this.vvs[a])||Float.isNaN(this.vvs[b])||Float.isNaN(this.vvs[c]))||Float.isNaN(this.vs[a].x)||Float.isNaN(this.vs[b].x)||
Float.isNaN(this.vs[c].x)?-1:this.addPolygonV3(a,b,c,l,e,f,null)},"~N,~N,~N,~N,~N,~N");c(b,"addPolygonV3",function(a,b,c,l,e,f,h){return this.dataOnly?this.addPolygon(F(-1,[a,b,c,l]),h):this.addPolygonC(F(-1,[a,b,c,l,e]),f,h,0>e)},"~N,~N,~N,~N,~N,~N,JU.BS");c(b,"addPolygonC",function(a,b,c,l){if(0!=b){if(null==this.pcs||0==this.pc)this.lastColor=0;l?this.colorsExplicit=!0:(null==this.pcs?this.pcs=V(25,0):this.pc>=this.pcs.length&&(this.pcs=JU.AU.doubleLengthShort(this.pcs)),this.pcs[this.pc]=l?2047:
b==this.lastColor?this.lastColix:this.lastColix=JU.C.getColix(this.lastColor=b))}return this.addPolygon(a,c)},"~A,~N,JU.BS,~B");c(b,"addPolygon",function(a,b){var c=this.pc;0==c?this.pis=JU.AU.newInt2(25):c==this.pis.length&&(this.pis=JU.AU.doubleLength(this.pis));null!=b&&b.set(c);this.pis[this.pc++]=a;return c},"~A,JU.BS");c(b,"invalidatePolygons",function(){for(var a=this.pc;--a>=this.mergePolygonCount0;)if((null==this.bsSlabDisplay||this.bsSlabDisplay.get(a))&&null==this.setABC(a))this.pis[a]=
null});c(b,"setABC",function(a){if(null!=this.bsSlabDisplay&&!this.bsSlabDisplay.get(a)&&(null==this.bsSlabGhost||!this.bsSlabGhost.get(a)))return null;a=this.pis[a];if(null==a||3>a.length)return null;this.iA=a[0];this.iB=a[1];this.iC=a[2];return null==this.vvs||!Float.isNaN(this.vvs[this.iA])&&!Float.isNaN(this.vvs[this.iB])&&!Float.isNaN(this.vvs[this.iC])?a:null},"~N");c(b,"setTranslucentVertices",function(){},"JU.BS");c(b,"getSlabColor",function(){return null==this.bsSlabGhost?null:JU.C.getHexCode(this.slabColix)});
c(b,"getSlabType",function(){return null!=this.bsSlabGhost&&1073742018==this.slabMeshType?"mesh":null});c(b,"resetSlab",function(){null!=this.slicer&&this.slicer.slabPolygons(JU.GData.getSlabObjectType(1073742333,null,!1,null),!1)});c(b,"slabPolygonsList",function(a,b){this.getMeshSlicer();for(var c=0;c<a.size()&&this.slicer.slabPolygons(a.get(c),b);c++);},"JU.Lst,~B");c(b,"slabBrillouin",function(){},"~A");c(b,"getResolution",function(){return 0});b.getSphereData=c(b,"getSphereData",function(a){JU.Geodesic.createGeodesic(a);
var b=JU.Geodesic.getVertexCount(a),c=JU.Geodesic.getFaceVertexes(a),l=w(c.length/3);a=JU.AU.newInt2(l);for(var e=0,f=0;e<l;e++)a[e]=F(-1,[c[f++],c[f++],c[f++]]);c=Array(b);for(e=0;e<b;e++)c[e]=JU.Geodesic.getVertexVector(e);return JU.MeshSurface.newMesh(!0,c,0,a,c,0)},"~N");c(b,"setBox",function(a,b){a.set(3.4028235E38,3.4028235E38,3.4028235E38);b.set(-3.4028235E38,-3.4028235E38,-3.4028235E38);for(var c=0;c<this.vc;c++){var l=this.vs[c];Float.isNaN(l.x)||JU.BoxInfo.addPoint(l,a,b,0)}},"JU.P3,JU.P3");
c(b,"setBoundingBox",function(){},"~A");b.getSphericalInterpolationFraction=c(b,"getSphericalInterpolationFraction",function(a,b,c,l){b=Math.abs(a+b)/l;c=Math.abs(a+c)/l;a/=l;l=b*b;var e=l-c*c+1;return(e+(b<c?1:-1)*Math.sqrt(e*e+4*(a*a-l)))/2},"~N,~N,~N,~N")});s("JU");B(["JU.Geodesic"],"JU.Normix",["JU.BS"],function(){var b=I(JU,"Normix",null);b.getNormixCount=c(b,"getNormixCount",function(){return 1<JU.Normix.normixCount?JU.Normix.normixCount:JU.Normix.normixCount=JU.Geodesic.getVertexCount(3)});
b.newVertexBitSet=c(b,"newVertexBitSet",function(){return JU.BS.newN(JU.Normix.getNormixCount())});b.getVertexVectors=c(b,"getVertexVectors",function(){null==JU.Normix.vertexVectors&&(JU.Normix.vertexVectors=JU.Geodesic.getVertexVectors());return JU.Normix.vertexVectors});b.setInverseNormixes=c(b,"setInverseNormixes",function(){if(null==JU.Normix.inverseNormixes){JU.Normix.getNormixCount();JU.Normix.getVertexVectors();JU.Normix.inverseNormixes=V(JU.Normix.normixCount,0);for(var a=new JU.BS,b=JU.Normix.normixCount;0<=
--b;){var c=JU.Normix.vertexVectors[b];JU.Normix.inverseNormixes[b]=JU.Normix.getNormix(-c.x,-c.y,-c.z,3,a)}}});b.getInverseNormix=c(b,"getInverseNormix",function(a){return JU.Normix.inverseNormixes[a]},"~N");b.getNeighborVertexArrays=c(b,"getNeighborVertexArrays",function(){null==JU.Normix.neighborVertexesArrays&&(JU.Normix.neighborVertexesArrays=JU.Geodesic.getNeighborVertexesArrays());return JU.Normix.neighborVertexesArrays});b.getNormixV=c(b,"getNormixV",function(a,b){return JU.Normix.getNormix(a.x,
a.y,a.z,3,b)},"JU.V3,JU.BS");b.get2SidedNormix=c(b,"get2SidedNormix",function(a,b){return~JU.Normix.getNormixV(a,b)},"JU.V3,JU.BS");b.getNormix=c(b,"getNormix",function(a,b,c,l,e){var f,h;0<=c?(f=0,h=c-1):(f=11,h=c- -1);e.clearAll();e.set(f);JU.Normix.getVertexVectors();JU.Normix.getNeighborVertexArrays();h=a*a+b*b+h*h;for(var k=0;k<=l;++k)for(var j=JU.Normix.neighborVertexesArrays[k],n=6*f,p=n+(12>f?5:6);--p>=n;){var q=j[p];if(!e.get(q)){e.set(q);var r=JU.Normix.vertexVectors[q],u;u=r.x-a;var s=
u*u;s>=h||(u=r.y-b,s+=u*u,s>=h||(u=r.z-c,s+=u*u,s>=h||(f=q,h=s)))}}return f},"~N,~N,~N,~N,JU.BS");b.normixCount=0;b.vertexVectors=null;b.inverseNormixes=null;b.neighborVertexesArrays=null});s("JU");B(null,"JU.Parser",["JU.PT"],function(){var b=I(JU,"Parser",null);b.parseStringInfestedFloatArray=c(b,"parseStringInfestedFloatArray",function(a,b,c){return JU.Parser.parseFloatArrayBsData(JU.PT.getTokens(a),b,c)},"~S,JU.BS,~A");b.parseStringInfestedIntArray=c(b,"parseStringInfestedIntArray",function(a,
b){for(var c=L(b.length,0),l=JU.Parser.parseStringInfestedFloatArray(a,null,c),e=b.length;0<=--e;)b[e]=D(c[e]);return l},"~S,~A");b.parseFloatArrayBsData=c(b,"parseFloatArrayBsData",function(a,b,c){for(var l=c.length,e=a.length,f=0,h=0,k=null!=b,j=k?b.nextSetBit(0):0;0<=j&&j<l&&f<e;j=k?b.nextSetBit(j+1):j+1){for(var n;Float.isNaN(n=JU.PT.parseFloat(a[f++]))&&f<e;);Float.isNaN(n)||(c[h=j]=n);if(f==e)break}return h+1},"~A,JU.BS,~A");b.parseFloatArrayFromMatchAndField=c(b,"parseFloatArrayFromMatchAndField",
function(a,b,c,l,e,f,h,k,j){var n,p=-1,q=null!=e,r=JU.Parser.markLines(a,0<=a.indexOf("\n")?"\n":";");j=1>=j||j>=r.length?0:j-1;var u=0==j?0:r[j-1],s=r.length;null==k&&(k=L(s-j,0));for(var v=k.length,w=0>=h?Math.max(f,c):Math.max(f+h,c+l)-1,x=null!=b;j<s;j++){var y=a.substring(u,r[j]).trim(),u=r[j],z=0>=h?JU.PT.getTokens(y):null;if(0>=h){if(z.length<w||Float.isNaN(n=JU.PT.parseFloat(z[f-1])))continue}else if(y.length<w||Float.isNaN(n=JU.PT.parseFloat(y.substring(f-1,f+h-1))))continue;if(q){y=JU.PT.parseInt(null==
z?y.substring(c-1,c+l-1):z[c-1]);if(-2147483648==y||0>y||y>=v||0>(y=e[y]))continue;x&&b.set(y)}else{x?p=b.nextSetBit(p+1):p++;if(0>p||p>=v)break;y=p}k[y]=n}return k},"~S,JU.BS,~N,~N,~A,~N,~N,~A,~N");b.fixDataString=c(b,"fixDataString",function(a){a=a.$replace(";",0>a.indexOf("\n")?"\n":" ");a=JU.PT.trim(a,"\n \t");a=JU.PT.rep(a,"\n ","\n");return a=JU.PT.rep(a,"\n\n","\n")},"~S");b.markLines=c(b,"markLines",function(a,b){for(var c=0,l=a.length;0<=--l;)a.charAt(l)==b&&c++;for(var l=F(c+1,0),e=c=0;0<=
(e=a.indexOf(b,e));)l[c++]=++e;l[c]=a.length;return l},"~S,~S")});s("JU");B(["JU.P3"],"JU.Point3fi",null,function(){var b=n(function(){this.mi=-1;this.sZ=this.sY=this.sX=this.i=0;this.sD=-1;v(this,arguments)},JU,"Point3fi",JU.P3,Cloneable);b.newPF=c(b,"newPF",function(a,b){var c=new JU.Point3fi;c.setT(a);c.i=b;return c},"JU.T3,~N");b.new4=c(b,"new4",function(a,b,c,l){var e=new JU.Point3fi;e.set(a,b,c);e.i=l;return e},"~N,~N,~N,~N");c(b,"copy",function(){try{return this.clone()}catch(a){if(H(a,"CloneNotSupportedException"))return null;
throw a;}});c(b,"setPF",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.i=a.i},"JU.Point3fi")});s("JU");z=n(function(){this.height=this.width=this.y=this.x=0;v(this,arguments)},JU,"Rectangle",null);c(z,"contains",function(b,a){return b>=this.x&&a>=this.y&&b-this.x<this.width&&a-this.y<this.height},"~N,~N");s("JU");B(null,"JU.Rgb16",["JU.SB"],function(){var b=n(function(){this.b=this.g=this.r=0;v(this,arguments)},JU,"Rgb16",null);b.newI=c(b,"newI",function(a){var b=new JU.Rgb16;b.setInt(a);return b},
"~N");c(b,"setInt",function(a){this.r=a>>8&65280|128;this.g=a&65280|128;this.b=a<<8&65280|128},"~N");c(b,"setRgb",function(a){this.r=a.r;this.g=a.g;this.b=a.b},"JU.Rgb16");c(b,"diffDiv",function(a,b,c){this.r=w((a.r-b.r)/c);this.g=w((a.g-b.g)/c);this.b=w((a.b-b.b)/c)},"JU.Rgb16,JU.Rgb16,~N");c(b,"setAndIncrement",function(a,b){this.r=a.r;a.r+=b.r;this.g=a.g;a.g+=b.g;this.b=a.b;a.b+=b.b},"JU.Rgb16,JU.Rgb16");c(b,"getArgb",function(){return 4278190080|this.r<<8&16711680|this.g&65280|this.b>>8});j(b,
"toString",function(){return(new JU.SB).append("Rgb16(").appendI(this.r).appendC(",").appendI(this.g).appendC(",").appendI(this.b).append(" -> ").appendI(this.r>>8&255).appendC(",").appendI(this.g>>8&255).appendC(",").appendI(this.b>>8&255).appendC(")").toString()})});s("JU");B(["JU.AU","$.V3"],"JU.Shader",["JU.CU","JU.C"],function(){var b=n(function(){this.zLight=this.yLight=this.xLight=0;this.lightSource=null;this.specularOn=!0;this.usePhongExponent=!1;this.ambientPercent=45;this.diffusePercent=
84;this.specularExponent=6;this.specularPercent=22;this.specularPower=40;this.phongExponent=64;this.specularFactor=this.intenseFraction=this.diffuseFactor=this.ambientFraction=0;this.ashadesGreyscale=this.ashades=null;this.celOn=!1;this.celPower=10;this.celZ=this.celRGB=0;this.useLight=!1;this.sphereShadeIndexes=null;this.seed=305419897;this.ellipsoidShades=this.sphereShapeCache=null;this.nIn=this.nOut=0;v(this,arguments)},JU,"Shader",null);P(b,function(){this.lightSource=new JU.V3;this.ambientFraction=
this.ambientPercent/100;this.diffuseFactor=this.diffusePercent/100;this.intenseFraction=this.specularPower/100;this.specularFactor=this.specularPercent/100;this.ashades=JU.AU.newInt2(128);this.sphereShadeIndexes=Q(65536,0);this.sphereShapeCache=JU.AU.newInt2(128)});A(b,function(){this.setLightSource(-1,-1,2.5)});c(b,"setLightSource",function(a,b,c){this.lightSource.set(a,b,c);this.lightSource.normalize();this.xLight=this.lightSource.x;this.yLight=this.lightSource.y;this.zLight=this.lightSource.z},
"~N,~N,~N");c(b,"setCel",function(a,b,c){a=a&&0!=b;c=JU.C.getArgb(JU.C.getBgContrast(c));c=4278190080==c?4278453252:-1==c?-2:c+1;this.celOn==a&&this.celRGB==c&&this.celPower==b||(this.celOn=a,this.celPower=b,this.useLight=!this.celOn||0<b,this.celZ=1-Math.pow(2,-Math.abs(b)/10),this.celRGB=c,this.flushCaches())},"~B,~N,~N");c(b,"flushCaches",function(){this.checkShades(JU.C.colixMax);for(var a=JU.C.colixMax;0<=--a;)this.ashades[a]=null;this.calcSphereShading();for(a=128;0<=--a;)this.sphereShapeCache[a]=
null;this.ellipsoidShades=null});c(b,"setLastColix",function(a,b){JU.C.allocateColix(a,!0);this.checkShades(2047);b&&JU.C.setLastGrey(a);this.ashades[2047]=this.getShades2(a,!1)},"~N,~B");c(b,"getShades",function(a){this.checkShades(JU.C.colixMax);a&=-30721;var b=this.ashades[a];null==b&&(b=this.ashades[a]=this.getShades2(JU.C.argbs[a],!1));return b},"~N");c(b,"getShadesG",function(a){this.checkShades(JU.C.colixMax);a&=-30721;null==this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.newInt2(this.ashades.length));
var b=this.ashadesGreyscale[a];null==b&&(b=this.ashadesGreyscale[a]=this.getShades2(JU.C.argbs[a],!0));return b},"~N");c(b,"checkShades",function(a){null!=this.ashades&&this.ashades.length>=a||(2047==a&&a++,this.ashades=JU.AU.arrayCopyII(this.ashades,a),null!=this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.arrayCopyII(this.ashadesGreyscale,a)))},"~N");c(b,"getShades2",function(a,b){var c=F(64,0);if(0==a)return c;for(var l=a>>16&255,e=a>>8&255,f=a&255,h=0,k=0,j=0,n=this.ambientFraction;;)if(h=
l*n+0.5,k=e*n+0.5,j=f*n+0.5,0<n&&4>h&&4>k&&4>j)l++,e++,f++,0.1>n&&(n+=0.1),a=JU.CU.rgb(w(Math.floor(l)),w(Math.floor(e)),w(Math.floor(f)));else break;var p=0,n=(1-n)/52,l=l*n,e=e*n,f=f*n;if(this.celOn){n=JU.CU.rgb(w(Math.floor(h)),w(Math.floor(k)),w(Math.floor(j)));if(0<=this.celPower)for(;32>p;++p)c[p]=n;k+=32*e;j+=32*f;for(n=JU.CU.rgb(w(Math.floor(h+32*l)),w(Math.floor(k)),w(Math.floor(j)));64>p;p++)c[p]=n;c[0]=c[1]=this.celRGB}else{for(;52>p;++p)c[p]=JU.CU.rgb(w(Math.floor(h)),w(Math.floor(k)),
w(Math.floor(j))),h+=l,k+=e,j+=f;c[p++]=a;n=this.intenseFraction/(64-p);l=(255.5-h)*n;e=(255.5-k)*n;for(f=(255.5-j)*n;64>p;p++)h+=l,k+=e,j+=f,c[p]=JU.CU.rgb(w(Math.floor(h)),w(Math.floor(k)),w(Math.floor(j)))}if(b)for(;0<=--p;)c[p]=JU.CU.toFFGGGfromRGB(c[p]);return c},"~N,~B");c(b,"getShadeIndex",function(a,b,c){var l=Math.sqrt(a*a+b*b+c*c);return Math.round(63*this.getShadeF(a/l,b/l,c/l))},"~N,~N,~N");c(b,"getShadeB",function(a,b,c){return Math.round(63*this.getShadeF(a,b,c))},"~N,~N,~N");c(b,"getShadeFp8",
function(a,b,c){var l=Math.sqrt(a*a+b*b+c*c);return w(Math.floor(16128*this.getShadeF(a/l,b/l,c/l)))},"~N,~N,~N");c(b,"getShadeF",function(a,b,c){b=this.useLight?a*this.xLight+b*this.yLight+c*this.zLight:c;if(0>=b)return 0;a=b*this.diffuseFactor;if(this.specularOn&&(b=2*b*c-this.zLight,0<b)){if(this.usePhongExponent)b=Math.pow(b,this.phongExponent);else for(var l=this.specularExponent;0<=--l&&1E-4<b;)b*=b;a+=b*this.specularFactor}return this.celOn&&c<this.celZ?0:1<a?1:a},"~N,~N,~N");c(b,"getShadeN",
function(a,b,c,l){b=w(Math.floor(16128*this.getShadeF(a/l,b/l,c/l)));a=b>>8;if(!this.useLight)return a;(b&255)>this.nextRandom8Bit()&&++a;b=this.seed&65535;21845>b&&0<a?--a:43690<b&&63>a&&++a;return a},"~N,~N,~N,~N");c(b,"calcSphereShading",function(){for(var a=-127.5,b=0;256>b;++a,++b)for(var c=-127.5,l=a*a,e=0;256>e;++c,++e){var f=0,h=16900-l-c*c;0<h&&(f=Math.sqrt(h),f=this.getShadeN(a,c,f,130));this.sphereShadeIndexes[(e<<8)+b]=f}});c(b,"nextRandom8Bit",function(){var a=this.seed;this.seed=a=(a<<
16)+(a<<1)+a&2147483647;return a>>23});c(b,"getEllipsoidShade",function(a,b,c,l,e){var f=e.m00*a+e.m01*b+e.m02*c+e.m03,h=e.m10*a+e.m11*b+e.m12*c+e.m13;a=e.m20*a+e.m21*b+e.m22*c+e.m23;l=Math.min(l/2,45)/Math.sqrt(f*f+h*h+a*a);f=D(-f*l);h=D(-h*l);l=D(a*l);if(a=-20>f||20<=f||-20>h||20<=h||0>l||40<=l){for(;0==f%2&&0==h%2&&0==l%2&&0<f+h+l;)f>>=1,h>>=1,l>>=1;a=-20>f||20<=f||-20>h||20<=h||0>l||40<=l}a?this.nOut++:this.nIn++;return a?this.getShadeIndex(f,h,l):this.ellipsoidShades[f+20][h+20][l]},"~N,~N,~N,~N,JU.M4");
c(b,"createEllipsoidShades",function(){this.ellipsoidShades=Q(40,40,40,0);for(var a=0;40>a;a++)for(var b=0;40>b;b++)for(var c=0;40>c;c++)this.ellipsoidShades[a][b][c]=this.getShadeIndex(a-20,b-20,c)})});s("JU");B(["JV.Viewer"],"JU.SimpleUnitCell","JU.AU $.M4 $.P3 $.P4 $.PT $.V3 JU.Escape".split(" "),function(){var b=n(function(){this.unitCellParams=null;this.slop=0;this.matrixFtoCNoOffset=this.matrixCtoFNoOffset=this.matrixFractionalToCartesian=this.matrixCartesianToFractional=null;this.volume=0;
this.dimension=3;this.dimensionType=7;this.fractionalOrigin=null;this.c_=this.b_=this.a_=this.cB_=this.cA_=this.sinGamma=this.cosGamma=this.sinBeta=this.cosBeta=this.sinAlpha=this.cosAlpha=this.gamma=this.beta=this.alpha=this.c=this.b=this.a=this.nc=this.nb=this.na=0;v(this,arguments)},JU,"SimpleUnitCell",null);P(b,function(){this.slop=JV.Viewer.isHighPrecision?1E-12:1E-4});A(b,function(){this.fractionalOrigin=new JU.P3});c(b,"getPrecision",function(){return this.slop});c(b,"setPrecision",function(a){this.unitCellParams[26]=
this.slop=!Float.isNaN(a)?a:!Float.isNaN(this.unitCellParams[26])?this.unitCellParams[26]:JV.Viewer.isHighPrecision?1E-12:1E-4},"~N");c(b,"isSupercell",function(){return 1<this.na||1<this.nb||1<this.nc});b.isValid=c(b,"isValid",function(a){return null!=a&&(0<a[0]||14<a.length&&!Float.isNaN(a[14]))},"~A");b.newA=c(b,"newA",function(a){var b=new JU.SimpleUnitCell;b.init(a);return b},"~A");b.getDimensionFromParams=c(b,"getDimensionFromParams",function(a){return 0>=a[0]?3:0>a[1]?1:0>a[2]?2:3},"~A");c(b,
"init",function(a){null==a&&(a=L(-1,[1,1,1,90,90,90]));if(JU.SimpleUnitCell.isValid(a)){this.unitCellParams=JU.SimpleUnitCell.newParams(a,NaN);var b=!1;this.dimension=JU.SimpleUnitCell.getDimensionFromParams(a);switch(this.dimension){case 1:this.dimensionType=1;break;case 2:this.dimensionType=3;break;case 3:this.dimensionType=7}this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=a[4];this.gamma=a[5];-1==this.gamma&&0<this.c&&(b=!0,this.gamma=120);26<a.length&&(Float.isNaN(a[26])?a[26]=this.slop:
this.slop=a[26]);var c=this.na=Math.max(1,24<a.length&&!Float.isNaN(a[22])?D(a[22]):1),l=this.nb=Math.max(1,24<a.length&&!Float.isNaN(a[23])?D(a[23]):1),e=this.nc=Math.max(1,24<a.length&&!Float.isNaN(a[24])?D(a[24]):1);if(25<a.length&&!Float.isNaN(a[25])){var f=a[25];0<f&&(c*=f,l*=f,e*=f)}else c=l=e=1;if(0>=this.a&&0>=this.c){var f=JU.SimpleUnitCell.newV(a,6),h=JU.SimpleUnitCell.newV(a,9),k=JU.SimpleUnitCell.newV(a,12);this.setABC(f,h,k);0>this.c&&(a=JU.AU.arrayCopyF(a,-1),0>this.b&&(h.set(0,0,1),
h.cross(h,f),0.001>h.length()&&h.set(0,1,0),h.normalize(),a[9]=h.x,a[10]=h.y,a[11]=h.z),0>this.c&&(k.cross(f,h),k.normalize(),a[12]=k.x,a[13]=k.y,a[14]=k.z))}this.a*=c;0>=this.b?this.b=this.c=1:0>=this.c?(this.c=1,this.b*=l):(this.b*=l,this.c*=e);this.setCellParams();if(21<a.length&&!Float.isNaN(a[21])){b=L(16,0);for(f=0;16>f;f++){switch(f%4){case 0:h=c;break;case 1:h=l;break;case 2:h=e;break;default:h=1}b[f]=a[6+f]*h}this.matrixCartesianToFractional=JU.M4.newA16(b);this.matrixCartesianToFractional.getTranslation(this.fractionalOrigin);
this.matrixFractionalToCartesian=JU.M4.newM4(this.matrixCartesianToFractional).invert();1==a[0]&&this.setParamsFromMatrix()}else 14<a.length&&!Float.isNaN(a[14])?(f=this.matrixFractionalToCartesian=new JU.M4,f.setColumn4(0,a[6]*c,a[7]*c,a[8]*c,0),f.setColumn4(1,a[9]*l,a[10]*l,a[11]*l,0),f.setColumn4(2,a[12]*e,a[13]*e,a[14]*e,0),17<a.length&&!Float.isNaN(a[17])?f.setColumn4(3,a[15],a[16],a[17],1):f.setColumn4(3,0,0,0,1)):(f=this.matrixFractionalToCartesian=new JU.M4,b?(f.setColumn4(0,-this.b*this.cosGamma,
-this.b*this.sinGamma,0,0),f.setColumn4(1,-this.b*this.cosGamma,this.b*this.sinGamma,0,0)):(f.setColumn4(0,this.a,0,0,0),f.setColumn4(1,this.b*this.cosGamma,this.b*this.sinGamma,0,0)),f.setColumn4(2,this.c*this.cosBeta,this.c*(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma,this.volume/(this.a*this.b*this.sinGamma),0),f.setColumn4(3,0,0,0,1)),this.matrixCartesianToFractional=JU.M4.newM4(this.matrixFractionalToCartesian).invert();this.matrixCtoFNoOffset=this.matrixCartesianToFractional;this.matrixFtoCNoOffset=
this.matrixFractionalToCartesian}},"~A");b.newV=c(b,"newV",function(a,b){return JU.V3.new3(a[b++],a[b++],a[b])},"~A,~N");b.newParams=c(b,"newParams",function(a,b){for(var c=L(27,0),l=a.length,e=0;27>e;e++)c[e]=e<l?a[e]:NaN;27>l&&(c[26]=b);return c},"~A,~N");b.addVectors=c(b,"addVectors",function(a){for(var b=JU.SimpleUnitCell.newA(a).matrixFractionalToCartesian,c=0;9>c;c++)a[6+c]=b.getElement(c%3,w(c/3))},"~A");c(b,"setParamsFromMatrix",function(){var a=JU.V3.new3(1,0,0),b=JU.V3.new3(0,1,0),c=JU.V3.new3(0,
0,1);this.matrixFractionalToCartesian.rotate(a);this.matrixFractionalToCartesian.rotate(b);this.matrixFractionalToCartesian.rotate(c);this.setABC(a,b,c);this.setCellParams()});c(b,"setABC",function(a,b,c){JU.SimpleUnitCell.fillParams(a,b,c,this.unitCellParams);a=this.unitCellParams;this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=a[4];this.gamma=a[5]},"JU.V3,JU.V3,JU.V3");b.fillParams=c(b,"fillParams",function(a,b,c,l){null==a&&(a=JU.SimpleUnitCell.newV(l,6),b=JU.SimpleUnitCell.newV(l,
9),c=JU.SimpleUnitCell.newV(l,12));var e=a.length(),f=b.length(),h=c.length();0!=e&&(0==f?f=h=-1:0==h&&(h=-1),l[0]=e,l[1]=f,l[2]=h,l[3]=0>f||0>h?90:b.angle(c)/0.017453292519943295,l[4]=0>h?90:a.angle(c)/0.017453292519943295,l[5]=0>f?90:a.angle(b)/0.017453292519943295)},"JU.V3,JU.V3,JU.V3,~A");c(b,"setCellParams",function(){this.cosAlpha=Math.cos(0.017453292519943295*this.alpha);this.sinAlpha=Math.sin(0.017453292519943295*this.alpha);this.cosBeta=Math.cos(0.017453292519943295*this.beta);this.sinBeta=
Math.sin(0.017453292519943295*this.beta);this.cosGamma=Math.cos(0.017453292519943295*this.gamma);this.sinGamma=Math.sin(0.017453292519943295*this.gamma);var a=Math.sqrt(this.sinAlpha*this.sinAlpha+this.sinBeta*this.sinBeta+this.sinGamma*this.sinGamma+2*this.cosAlpha*this.cosBeta*this.cosGamma-2);this.volume=this.a*this.b*this.c*a;this.cA_=(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma;this.cB_=a/this.sinGamma;this.a_=this.b*this.c*this.sinAlpha/this.volume;this.b_=this.a*this.c*this.sinBeta/
this.volume;this.c_=this.a*this.b*this.sinGamma/this.volume});c(b,"getFractionalOrigin",function(){return this.fractionalOrigin});c(b,"toSupercell",function(a){a.x/=this.na;a.y/=this.nb;a.z/=this.nc;return a},"JU.P3");c(b,"toCartesian",function(a,b){null!=this.matrixFractionalToCartesian&&(b?this.matrixFtoCNoOffset:this.matrixFractionalToCartesian).rotTrans(a)},"JU.T3,~B");c(b,"toFractionalM",function(a){null!=this.matrixCartesianToFractional&&(a.mul(this.matrixFractionalToCartesian),a.mul2(this.matrixCartesianToFractional,
a))},"JU.M4");c(b,"toFractional",function(a,b){null!=this.matrixCartesianToFractional&&(b?this.matrixCtoFNoOffset:this.matrixCartesianToFractional).rotTrans(a)},"JU.T3,~B");c(b,"isPolymer",function(){return 1==this.dimension});c(b,"isSlab",function(){return 2==this.dimension});c(b,"getUnitCellParams",function(){return this.unitCellParams});c(b,"getUnitCellAsArray",function(a){var b=this.matrixFractionalToCartesian;return a?L(-1,[b.m00,b.m10,b.m20,b.m01,b.m11,b.m21,b.m02,b.m12,b.m22]):L(-1,[this.a,
this.b,this.c,this.alpha,this.beta,this.gamma,b.m00,b.m10,b.m20,b.m01,b.m11,b.m21,b.m02,b.m12,b.m22,this.dimension,this.dimensionType,this.volume])},"~B");c(b,"getInfoStr",function(a){switch(a.toLowerCase()){case "a":a=0;break;case "b":a=1;break;case "c":a=2;break;case "alpha":a=3;break;case "beta":a=4;break;case "gamma":a=5;break;case "dim":a=6;break;case "dimtype":a=7;break;case "volume":a=10;break;default:a=-1}return 0>a?NaN:this.getInfo(a)},"~S");c(b,"getInfo",function(a){switch(a){case 0:return this.a;
case 1:return this.b;case 2:return this.c;case 3:return this.alpha;case 4:return this.beta;case 5:return this.gamma;case 6:return this.dimension;case 7:return this.dimensionType;case 8:return JU.SimpleUnitCell.isHexagonal(this.unitCellParams)?1:0;case 9:return JU.SimpleUnitCell.isRhombohedral(this.unitCellParams)?1:0;case 10:return this.volume}return NaN},"~N");b.getReciprocal=c(b,"getReciprocal",function(a,b,c){var l=4==a.length?1:0,e=Array(4);e[0]=1==l?JU.P3.newP(a[0]):new JU.P3;0==c&&(c=6.283185307179586);
for(var f=0;3>f;f++){var h=e[f+1]=new JU.P3;h.cross(a[(f+1)%3+l],a[(f+2)%3+l]);var k=a[f+l].dot(h);-1==c&&(c=Math.sqrt(k));h.scale(c/k)}if(null==b)return e;for(f=0;4>f;f++)b[f]=e[f];return b},"~A,~A,~N");b.setAbc=c(b,"setAbc",function(a,b,c){if(null!=a&&(null==b&&(b=L(6,0)),a=JU.PT.split(a.$replace(",","="),"="),12<=a.length))for(var l=0;6>l;l++)b[l]=JU.PT.parseFloat(a[2*l+1]);return null==c?null:JU.SimpleUnitCell.setAbcFromParams(b,c)},"~S,~A,~A");b.setAbcFromParams=c(b,"setAbcFromParams",function(a,
b){var c=JU.SimpleUnitCell.newA(a).getUnitCellAsArray(!0);if(null==b[0])for(var l=4;0<=--l;)b[l]=new JU.P3;b[1].set(c[0],c[1],c[2]);b[2].set(c[3],c[4],c[5]);b[3].set(c[6],c[7],c[8]);return b},"~A,~A");c(b,"unitizeDim",function(a,b){switch(a){case 3:b.z=JU.SimpleUnitCell.unitizeX(b.z,this.slop);case 2:b.y=JU.SimpleUnitCell.unitizeX(b.y,this.slop);case 1:b.x=JU.SimpleUnitCell.unitizeX(b.x,this.slop)}},"~N,JU.T3");b.unitizeDimRnd=c(b,"unitizeDimRnd",function(a,b,c){switch(a){case 3:b.z=JU.SimpleUnitCell.unitizeXRnd(b.z,
c);case 2:b.y=JU.SimpleUnitCell.unitizeXRnd(b.y,c);case 1:b.x=JU.SimpleUnitCell.unitizeXRnd(b.x,c)}},"~N,JU.T3,~N");b.unitizeX=c(b,"unitizeX",function(a,b){a-=Math.floor(a);if(a>1-b||a<b)a=0;return a},"~N,~N");b.unitizeXRnd=c(b,"unitizeXRnd",function(a,b){a-=Math.floor(a);if(a>1-b||a<b)a=0;return a},"~N,~N");c(b,"twelfthsOf",function(a){if(0==a)return 0;a=Math.abs(12*a);var b=Math.round(a);return 12>=b&&Math.abs(a-b)<12*this.slop?b:-1},"~N");c(b,"twelfthify",function(a){switch(this.dimension){case 3:a.z=
this.setTwelfths(a.z);case 2:a.y=this.setTwelfths(a.y);case 1:a.x=this.setTwelfths(a.x)}},"JU.P3");c(b,"setTwelfths",function(a){var b=this.twelfthsOf(a);return 0<=b?b/12*(0>a?-1:1):a},"~N");b.ijkToPoint3f=c(b,"ijkToPoint3f",function(a,b,c,l){var e=1E9<a?1E3:1E6<a?100:10,f=e*e;c-=0<=c?w(5*e/10):c;b.x=w(a/f)%e+c;b.y=w(a%f/e)+c;b.z=(0==l?a%e:(-500==c?w(l/e):l)%e)+c},"~N,JU.P3,~N,~N");b.ptToIJK=c(b,"ptToIJK",function(a,b){return 5>=a.x&&5>=a.y&&5>=a.z?JU.P4.new4(555,100*(a.x+4)+10*(a.y+4)+a.z+4,b,0):
JU.P4.new4(1500500500,1500500500+1E6*a.x+1E3*a.y+a.z,b,1500500+a.z)},"JU.T3,~N");b.escapeMultiplier=c(b,"escapeMultiplier",function(a){if(y(a,"JU.P4")){var b=1E3*w(Math.floor(a.x/1E3))+w(Math.floor(a.w/1E3))-1E3,c=1E3*w(Math.floor(a.y/1E3))+w(Math.floor(a.w))%1E3;return"{"+b+" "+c+" "+a.z+"}"}return JU.Escape.eP(a)},"JU.T3");b.setMinMaxLatticeParameters=c(b,"setMinMaxLatticeParameters",function(a,b,c,l){if(c.x<=c.y&&555<=c.y){var e=new JU.P3;JU.SimpleUnitCell.ijkToPoint3f(c.x,e,0,l);b.x=D(e.x);b.y=
D(e.y);b.z=D(e.z);JU.SimpleUnitCell.ijkToPoint3f(c.y,e,1,l);c.x=D(e.x);c.y=D(e.y);c.z=D(e.z)}switch(a){case 1:b.y=0,c.y=1;case 2:b.z=0,c.z=1}},"~N,JU.P3i,JU.P3i,~N");b.isHexagonal=c(b,"isHexagonal",function(a){return JU.SimpleUnitCell.approx0(a[0]-a[1])&&JU.SimpleUnitCell.approx0(a[3]-90)&&JU.SimpleUnitCell.approx0(a[4]-90)&&(JU.SimpleUnitCell.approx0(a[5]-120)||-1==a[5])},"~A");b.isRhombohedral=c(b,"isRhombohedral",function(a){return JU.SimpleUnitCell.approx0(a[0]-a[1])&&JU.SimpleUnitCell.approx0(a[1]-
a[2])&&!JU.SimpleUnitCell.approx0(a[3]-90)&&JU.SimpleUnitCell.approx0(a[3]-a[4])&&JU.SimpleUnitCell.approx0(a[4]-a[5])},"~A");b.approx0=c(b,"approx0",function(a){return 0.001>Math.abs(a)},"~N");b.getCellRange=c(b,"getCellRange",function(a,b){var c=y(a,"JU.T4")?D(a.w):0;JU.SimpleUnitCell.ijkToPoint3f(D(a.x),b[0],0,c);JU.SimpleUnitCell.ijkToPoint3f(D(a.y),b[1],1,c);0>a.z&&(b[0].scale(-1/a.z),b[1].scale(-1/a.z));return c},"JU.T3,~A");b.parseCalc=c(b,"parseCalc",function(a,b){return JU.SimpleUnitCell.parseCalcFunctions(a,
JU.SimpleUnitCell.functions,b)},"JV.Viewer,~S");b.parseCalcFunctions=c(b,"parseCalcFunctions",function(a,b,c){var l;c.startsWith("+")&&(c=c.substring(1));l=JU.PT.parseFloatStrict(c);if(!Float.isNaN(l))return l;c=c.toLowerCase();if(null!=b&&0<=c.indexOf("(")){l=JU.PT.split(c,"(");for(var e=l.length-1;0<=--e;){var f=l[e];if(0!=f.length){for(var h=null,k=b.length;0<=--k;)if(f.endsWith(b[k])){h=b[k];break}null==h&&(System.err.println("Unrecognized function "+c),l[e]+="?")}}c=JU.PT.join(l,"(",0)}if(0<=
c.indexOf("/")){l=JU.PT.split(c,"/");for(e=l.length-1;0<=--e;){f=l[e];c=b=!1;for(k=f.length;0<=--k;){h=f.charAt(k);if("."==h){b=!0;break}else if(")"==h){if(c)return NaN;l[e]+="*1.0";break}if("."==h){b=!0;break}if(!JU.PT.isDigit(h))break;c=!0}c&&!b&&(l[e]+=".0")}c=JU.PT.join(l,"/",0)}return a.evaluateExpressionAsVariable(c).asFloat()},"JV.Viewer,~A,~S");b.parseSimpleMath=c(b,"parseSimpleMath",function(a,b){b=JU.PT.rep(b.toLowerCase()," ","");if(0>b.indexOf("("))return b;var c=b.startsWith("!");c&&
(b=b.substring(1));0<=b.indexOf("pi")&&(b=JU.PT.rep(b,"pi","(180)"));b=JU.PT.rep(b,")(",")*(");for(var l=b.$replace('"'," ").$replace("'"," ").$plit(","),e=0;e<l.length;e++){var f=l[e].trim();if(!(0>f.indexOf("("))){for(var f=","+f,h=f.length,k=h;0<=--h;)switch(f.charAt(h).charCodeAt(0)){case 110:case 111:h--;default:continue;case 93:case 91:case 44:case 97:case 98:case 99:case 117:case 118:case 119:case 120:case 121:case 122:if(k>h+1){var j=f.substring(h+1,k),n=j.lastIndexOf("(");if(0<n){for(;0<
n;){for(;0<=--n;){var p=j.charAt(n);if("0">p)break;if("9">=p){j=j.substring(0,n+1)+"*"+j.substring(n+1);break}}n=j.lastIndexOf("(",n)}j=JU.SimpleUnitCell.parseCalc(a,j);n=1<h&&0<=j?"+":"";f=f.substring(0,h+1)+n+j+f.substring(k)}}k=h}l[e]=f.substring(1)}}return(c?"!":"")+JU.PT.join(l,",",0)},"JV.Viewer,~S");j(b,"toString",function(){return"["+this.a+" "+this.b+" "+this.c+" "+this.alpha+" "+this.beta+" "+this.gamma+"]"});b.functions=x(-1,"sqrt sin cos tan + - * /".split(" "))});s("JU");B(null,"JU.TempArray",
["JU.P3","$.P3i"],function(){var b=n(function(){this.freeEnum=this.lengthsFreeEnum=this.freeScreens=this.lengthsFreeScreens=this.freePoints=this.lengthsFreePoints=null;v(this,arguments)},JU,"TempArray",null);P(b,function(){this.lengthsFreePoints=F(6,0);this.freePoints=Array(6);this.lengthsFreeScreens=F(6,0);this.freeScreens=Array(6);this.lengthsFreeEnum=F(2,0);this.freeEnum=Array(2)});A(b,function(){});c(b,"clear",function(){this.clearTempPoints();this.clearTempScreens()});b.findBestFit=c(b,"findBestFit",
function(a,b){for(var c=-1,l=2147483647,e=b.length;0<=--e;){var f=b[e];f>=a&&f<l&&(l=f,c=e)}0<=c&&(b[c]=0);return c},"~N,~A");b.findShorter=c(b,"findShorter",function(a,b){for(var c=b.length;0<=--c;)if(0==b[c])return b[c]=a,c;for(var l=0,e=b[0],c=b.length;0<--c;)b[c]<e&&(e=b[c],l=c);return e<a?(b[l]=a,l):-1},"~N,~A");c(b,"clearTempPoints",function(){for(var a=0;6>a;a++)this.lengthsFreePoints[a]=0,this.freePoints[a]=null});c(b,"allocTempPoints",function(a){var b;b=JU.TempArray.findBestFit(a,this.lengthsFreePoints);
if(0<b)b=this.freePoints[b];else for(b=Array(a);0<=--a;)b[a]=new JU.P3;return b},"~N");c(b,"freeTempPoints",function(a){for(var b=0;b<this.freePoints.length;b++)if(this.freePoints[b]===a){this.lengthsFreePoints[b]=a.length;return}b=JU.TempArray.findShorter(a.length,this.lengthsFreePoints);0<=b&&(this.freePoints[b]=a)},"~A");c(b,"clearTempScreens",function(){for(var a=0;6>a;a++)this.lengthsFreeScreens[a]=0,this.freeScreens[a]=null});c(b,"allocTempScreens",function(a){var b;b=JU.TempArray.findBestFit(a,
this.lengthsFreeScreens);if(0<b)b=this.freeScreens[b];else for(b=Array(a);0<=--a;)b[a]=new JU.P3i;return b},"~N");c(b,"freeTempScreens",function(a){for(var b=0;b<this.freeScreens.length;b++)if(this.freeScreens[b]===a){this.lengthsFreeScreens[b]=a.length;return}b=JU.TempArray.findShorter(a.length,this.lengthsFreeScreens);0<=b&&(this.freeScreens[b]=a)},"~A");c(b,"allocTempEnum",function(a){var b=JU.TempArray.findBestFit(a,this.lengthsFreeEnum);return 0<b?this.freeEnum[b]:Array(a)},"~N");c(b,"freeTempEnum",
function(a){for(var b=0;b<this.freeEnum.length;b++)if(this.freeEnum[b]===a){this.lengthsFreeEnum[b]=a.length;return}b=JU.TempArray.findShorter(a.length,this.lengthsFreeEnum);0<=b&&(this.freeEnum[b]=a)},"~A")});s("JU");I(JU,"Txt",null);s("JU");B(["JU.V3","$.M3"],"JU.Vibration",["JU.P3","$.Quat","JU.BSUtil"],function(){var b=n(function(){this.modDim=-1;this.modScale=NaN;this.magMoment=0;this.isFractional=this.showTrace=!1;this.v0=null;this.tracePt=0;this.symmform=this.trace=null;this.spin=0;this.isFrom000=
!1;this.matInv=this.matTemp=null;v(this,arguments)},JU,"Vibration",JU.V3);P(b,function(){this.matTemp=new JU.M3;this.matInv=new JU.M3});c(b,"setCalcPoint",function(a,b,c){switch(this.modDim){case -2:case -3:break;default:a.scaleAdd2(Math.cos(6.283185307179586*b.x)*c,this,a)}return a},"JU.T3,JU.T3,~N,~N");c(b,"getInfo",function(a){a.put("vibVector",JU.V3.newV(this));a.put("vibType",-2==this.modDim?"spin":-1==this.modDim?"vib":"mod")},"java.util.Map");j(b,"clone",function(){var a=new JU.Vibration;a.setT(this);
a.modDim=this.modDim;a.magMoment=this.magMoment;a.v0=this.v0;return a});c(b,"setXYZ",function(a){this.setT(a)},"JU.T3");c(b,"setV0",function(){this.v0=JU.V3.newV(this)});c(b,"setType",function(a){this.modDim=a;return this},"~N");c(b,"isNonzero",function(){return 0!=this.x||0!=this.y||0!=this.z});c(b,"getOccupancy100",function(){return-2147483648},"~B");c(b,"startTrace",function(a){this.trace=Array(a);this.tracePt=a},"~N");c(b,"addTracePt",function(a,b){(null==this.trace||0==a||a!=this.trace.length)&&
this.startTrace(a);if(null!=b&&2<a){if(0>=--this.tracePt){for(var c=this.trace[this.trace.length-1],l=this.trace.length;1<=--l;)this.trace[l]=this.trace[l-1];this.trace[1]=c;this.tracePt=1}c=this.trace[this.tracePt];null==c&&(c=this.trace[this.tracePt]=new JU.P3);c.setT(b)}return this.trace},"~N,JU.Point3fi");c(b,"getApproxString100",function(){return Math.round(100*this.x)+","+Math.round(100*this.y)+","+Math.round(100*this.z)});c(b,"rotateSpin",function(a,b,c,l){JU.Vibration.rot(a,b,c,this);this.isFrom000&&
JU.Vibration.rot(a,b,c,l)},"JU.M3,JU.M3,JU.M3,JM.Atom");b.rot=c(b,"rot",function(a,b,c,l){null==a?c.rotate(l):(a.rotate(l),b.rotate(l))},"JU.M3,JU.M3,JU.M3,JU.T3");c(b,"rotateModelSpinVectors",function(a,b,c,l){if(0>b||b>=a.mc||null==a.vibrations)return-1;var e=a.vwr,f=a.am[b];f.isJmolDataFrame&&(b=f.dataSourceFrame);var h=a.getModelAuxiliaryInfo(b);if(null==c&&(c=h.get("spinFrameRotationMatrix"),null==c))return-1;var k=(f=Double.isNaN(c.getElement(0,0)))&&1==c.getElement(2,2),j=f||k?c.getElement(1,
1):0;f&&0!=j&&(c.setElement(1,1,0),this.rotateModelSpinVectors(a,b,c,!1),c.setElement(1,1,j));var n=h.get("spinFrameRotationMatrix"),p=h.get("spinRotationMatrixApplied");null==p&&null==n&&(n=JU.M3.newM3(null),h.put("spinFrameRotationMatrix",n));null==p&&(p=n);f&&(k?(c=JU.P3.new3(0,0,100),f=JU.P3.new3(0,0,200),e.tm.unTransformPoint(c,c),e.tm.unTransformPoint(f,f),c=JU.V3.newVsub(c,f)):c=JU.Quat.newM(p).getNormal(),c=JU.Quat.newVA(c,j).getMatrix());f=JU.BSUtil.newAndSetBit(b);a.includeAllRelatedFrames(f,
!0);j=JU.BSUtil.copy(f);f=e.getModelUndeletedAtomsBitSetBs(f);e=this.matTemp;l?(e.setM3(c),c.mul2(c,p),k=null):(k=this.matInv,k.setM3(p),k.invert());for(l=f.nextSetBit(0);0<=l&&!(l>=a.vibrations.length);l=f.nextSetBit(l+1))p=a.vibrations[l],null==p||!p.isFrom000&&0==p.magMoment||p.rotateSpin(k,c,e,a.at[l]);e=JU.Quat.newM(c).toAxisAngle4f();p=JU.M3.newM3(c);h.put("spinRotationMatrixApplied",p);c=-1;for(l=j.nextSetBit(0);0<=l;l=j.nextSetBit(l+1))f=a.am[l],null!=f.uvw0&&(c=l,p.rotate2(f.uvw0[0],f.uvw[0]),
p.rotate2(f.uvw0[1],f.uvw[1]),p.rotate2(f.uvw0[2],f.uvw[2]));h.put("spinRotationAxisAngleApplied",e);null!=a.unitCells[b]&&a.unitCells[b].setSpinAxisAngle(e);return c},"JM.ModelSet,~N,JU.M3,~B");b.find=c(b,"find",function(a,b,c){if(null!=c)for(var l=b.nextSetBit(0);0<=l;l=b.nextSetBit(l+1)){var e=a.getVibration(l,!1);if(null!=e&&0.1>e.distance(c))return a.at[l]}return null},"JM.ModelSet,JU.BS,JU.Vibration");c(b,"resetMoment",function(){if(0!=this.magMoment){var a=this.lengthSquared();0!=a&&this.scale(this.magMoment/
Math.sqrt(a))}})});s("JV");B(["J.api.EventManager","JU.Rectangle"],["JV.MotionPoint","$.ActionManager","$.Gesture"],"JU.AU $.PT J.api.Interface J.i18n.GT JS.SV $.ScriptEval J.thread.HoverWatcherThread JU.BSUtil $.Escape $.Logger $.Point3fi JV.MouseState $.Viewer JV.binding.Binding $.JmolBinding".split(" "),function(){var b=n(function(){this.vwr=null;this.isMultiTouch=this.haveMultiTouchInput=!1;this.predragBinding=this.rasmolBinding=this.dragBinding=this.pfaatBinding=this.jmolBinding=this.b=null;
this.LEFT_DRAGGED=0;this.dragged=this.pressed=this.clicked=this.moved=this.current=null;this.hoverable=!1;this.dragGesture=this.hoverWatcherThread=null;this.apm=1;this.pickingStyleSelect=this.pickingStyle=this.bondPickingMode=0;this.pickingStyleMeasure=5;this.rootPickingStyle=0;this.mouseDragFactor=this.gestureSwipeFactor=1;this.mouseWheelFactor=1.15;this.clickedCount=this.pressedCount=0;this.dragSelectedMode=this.labelMode=this.drawMode=!1;this.measuresEnabled=!0;this.hoverActive=this.haveSelection=
!1;this.mp=null;this.dragAtomIndex=-1;this.rubberbandSelectionMode=this.mkBondPressed=!1;this.rectRubber=null;this.isAltKeyReleased=!0;this.isMultiTouchServer=this.isMultiTouchClient=this.keyProcessing=!1;this.clickAction=this.dragAction=this.pressAction=0;this.measurementQueued=null;this.selectionWorking=this.zoomTrigger=!1;v(this,arguments)},JV,"ActionManager",null,J.api.EventManager);P(b,function(){this.rectRubber=new JU.Rectangle});c(b,"setViewer",function(a){this.vwr=a;this.current=new JV.MouseState("current");
this.moved=new JV.MouseState("moved");this.clicked=new JV.MouseState("clicked");this.pressed=new JV.MouseState("pressed");this.dragged=new JV.MouseState("dragged");JV.Viewer.isJS||this.createActions();this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.LEFT_DRAGGED=JV.binding.Binding.getMouseAction(1,16,1);this.dragGesture=new JV.Gesture(20,a)},"JV.Viewer,~S");c(b,"isHoverable",function(){return this.hoverable});c(b,"checkHover",function(){if(this.zoomTrigger)this.zoomTrigger=!1,8==
this.vwr.currentCursor&&this.vwr.setCursor(0),this.vwr.setInMotion(!1);else if(!this.vwr.getInMotion(!0)&&!this.vwr.tm.spinOn&&!this.vwr.tm.navOn&&!this.vwr.checkObjectHovered(this.current.x,this.current.y)){var a=this.vwr.findNearestAtomIndex(this.current.x,this.current.y);if(!(0>a)){var b=2==this.apm&&this.bnd(JV.binding.Binding.getMouseAction(this.clickedCount,this.moved.modifiers,1),[10]);this.vwr.hoverOn(a,b)}}});c(b,"processMultitouchEvent",function(){},"~N,~N,~N,~N,JU.P3,~N");c(b,"bind",function(a,
b){var c=JV.ActionManager.getActionFromName(b),l=JV.binding.Binding.getMouseActionStr(a);0!=l&&(0<=c?this.b.bindAction(l,c):this.b.bindName(l,b))},"~S,~S");c(b,"clearBindings",function(){this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.rasmolBinding=this.dragBinding=this.pfaatBinding=null});c(b,"unbindAction",function(a,b){if(null==a&&null==b)this.clearBindings();else{var c=JV.ActionManager.getActionFromName(b),l=JV.binding.Binding.getMouseActionStr(a);0<=c?this.b.unbindAction(l,
c):0!=l&&this.b.unbindName(l,b);null==b&&this.b.unbindUserAction(a)}},"~S,~S");b.newAction=c(b,"newAction",function(a,b,c){JV.ActionManager.actionInfo[a]=c;JV.ActionManager.actionNames[a]=b},"~N,~S,~S");c(b,"createActions",function(){null==JV.ActionManager.actionInfo[0]&&(JV.ActionManager.newAction(0,"_assignNew",J.i18n.GT.o(J.i18n.GT.$("assign/new atom or bond (requires {0})"),"set picking assignAtom_??/assignBond_?")),JV.ActionManager.newAction(1,"_center",J.i18n.GT.$("center")),JV.ActionManager.newAction(2,
"_clickFrank",J.i18n.GT.$("pop up recent context menu (click on Jmol frank)")),JV.ActionManager.newAction(4,"_deleteAtom",J.i18n.GT.o(J.i18n.GT.$("delete atom (requires {0})"),"set picking DELETE ATOM")),JV.ActionManager.newAction(5,"_deleteBond",J.i18n.GT.o(J.i18n.GT.$("delete bond (requires {0})"),"set picking DELETE BOND")),JV.ActionManager.newAction(6,"_depth",J.i18n.GT.o(J.i18n.GT.$("adjust depth (back plane; requires {0})"),"SLAB ON")),JV.ActionManager.newAction(7,"_dragAtom",J.i18n.GT.o(J.i18n.GT.$("move atom (requires {0})"),
"set picking DRAGATOM")),JV.ActionManager.newAction(8,"_dragDrawObject",J.i18n.GT.o(J.i18n.GT.$("move whole DRAW object (requires {0})"),"set picking DRAW")),JV.ActionManager.newAction(9,"_dragDrawPoint",J.i18n.GT.o(J.i18n.GT.$("move specific DRAW point (requires {0})"),"set picking DRAW")),JV.ActionManager.newAction(10,"_dragLabel",J.i18n.GT.o(J.i18n.GT.$("move label (requires {0})"),"set picking LABEL")),JV.ActionManager.newAction(11,"_dragMinimize",J.i18n.GT.o(J.i18n.GT.$("move atom and minimize molecule (requires {0})"),
"set picking DRAGMINIMIZE")),JV.ActionManager.newAction(12,"_dragMinimizeMolecule",J.i18n.GT.o(J.i18n.GT.$("move and minimize molecule (requires {0})"),"set picking DRAGMINIMIZEMOLECULE")),JV.ActionManager.newAction(13,"_dragSelected",J.i18n.GT.o(J.i18n.GT.$("move selected atoms (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(14,"_dragZ",J.i18n.GT.o(J.i18n.GT.$("drag atoms in Z direction (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(15,"_multiTouchSimulation",J.i18n.GT.$("simulate multi-touch using the mouse)")),
JV.ActionManager.newAction(16,"_navTranslate",J.i18n.GT.o(J.i18n.GT.$("translate navigation point (requires {0} and {1})"),x(-1,["set NAVIGATIONMODE","set picking NAVIGATE"]))),JV.ActionManager.newAction(17,"_pickAtom",J.i18n.GT.$("pick an atom")),JV.ActionManager.newAction(3,"_pickConnect",J.i18n.GT.o(J.i18n.GT.$("connect atoms (requires {0})"),"set picking CONNECT")),JV.ActionManager.newAction(18,"_pickIsosurface",J.i18n.GT.o(J.i18n.GT.$("pick an ISOSURFACE point (requires {0}"),"set DRAWPICKING")),
JV.ActionManager.newAction(19,"_pickLabel",J.i18n.GT.o(J.i18n.GT.$("pick a label to toggle it hidden/displayed (requires {0})"),"set picking LABEL")),JV.ActionManager.newAction(20,"_pickMeasure",J.i18n.GT.o(J.i18n.GT.$("pick an atom to include it in a measurement (after starting a measurement or after {0})"),"set picking DISTANCE/ANGLE/TORSION")),JV.ActionManager.newAction(21,"_pickNavigate",J.i18n.GT.o(J.i18n.GT.$("pick a point or atom to navigate to (requires {0})"),"set NAVIGATIONMODE")),JV.ActionManager.newAction(22,
"_pickPoint",J.i18n.GT.o(J.i18n.GT.$("pick a DRAW point (for measurements) (requires {0}"),"set DRAWPICKING")),JV.ActionManager.newAction(23,"_popupMenu",J.i18n.GT.$("pop up the full context menu")),JV.ActionManager.newAction(24,"_reset",J.i18n.GT.$("reset (when clicked off the model)")),JV.ActionManager.newAction(25,"_rotate",J.i18n.GT.$("rotate")),JV.ActionManager.newAction(26,"_rotateBranch",J.i18n.GT.o(J.i18n.GT.$("rotate branch around bond (requires {0})"),"set picking ROTATEBOND")),JV.ActionManager.newAction(27,
"_rotateSelected",J.i18n.GT.o(J.i18n.GT.$("rotate selected atoms (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(28,"_rotateZ",J.i18n.GT.$("rotate Z")),JV.ActionManager.newAction(29,"_rotateZorZoom",J.i18n.GT.$("rotate Z (horizontal motion of mouse) or zoom (vertical motion of mouse)")),JV.ActionManager.newAction(30,"_select",J.i18n.GT.o(J.i18n.GT.$("select an atom (requires {0})"),"set pickingStyle EXTENDEDSELECT")),JV.ActionManager.newAction(31,"_selectAndDrag",J.i18n.GT.o(J.i18n.GT.$("select and drag atoms (requires {0})"),
"set DRAGSELECTED")),JV.ActionManager.newAction(32,"_selectAndNot",J.i18n.GT.o(J.i18n.GT.$("unselect this group of atoms (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT")),JV.ActionManager.newAction(33,"_selectNone",J.i18n.GT.o(J.i18n.GT.$("select NONE (requires {0})"),"set pickingStyle EXTENDEDSELECT")),JV.ActionManager.newAction(34,"_selectOr",J.i18n.GT.o(J.i18n.GT.$("add this group of atoms to the set of selected atoms (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT")),JV.ActionManager.newAction(35,
"_selectToggle",J.i18n.GT.o(J.i18n.GT.$("toggle selection (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT/RASMOL")),JV.ActionManager.newAction(36,"_selectToggleOr",J.i18n.GT.o(J.i18n.GT.$("if all are selected, unselect all, otherwise add this group of atoms to the set of selected atoms (requires {0})"),"set pickingStyle DRAG")),JV.ActionManager.newAction(37,"_setMeasure",J.i18n.GT.$("pick an atom to initiate or conclude a measurement")),JV.ActionManager.newAction(38,"_slab",J.i18n.GT.o(J.i18n.GT.$("adjust slab (front plane; requires {0})"),
"SLAB ON")),JV.ActionManager.newAction(39,"_slabAndDepth",J.i18n.GT.o(J.i18n.GT.$("move slab/depth window (both planes; requires {0})"),"SLAB ON")),JV.ActionManager.newAction(40,"_slideZoom",J.i18n.GT.$("zoom (along right edge of window)")),JV.ActionManager.newAction(41,"_spinDrawObjectCCW",J.i18n.GT.o(J.i18n.GT.$("click on two points to spin around axis counterclockwise (requires {0})"),"set picking SPIN")),JV.ActionManager.newAction(42,"_spinDrawObjectCW",J.i18n.GT.o(J.i18n.GT.$("click on two points to spin around axis clockwise (requires {0})"),
"set picking SPIN")),JV.ActionManager.newAction(43,"_stopMotion",J.i18n.GT.o(J.i18n.GT.$("stop motion (requires {0})"),"set waitForMoveTo FALSE")),JV.ActionManager.newAction(44,"_swipe",J.i18n.GT.$("spin model (swipe and release button and stop motion simultaneously)")),JV.ActionManager.newAction(45,"_translate",J.i18n.GT.$("translate")),JV.ActionManager.newAction(46,"_wheelZoom",J.i18n.GT.$("zoom")))});b.getActionName=c(b,"getActionName",function(a){return a<JV.ActionManager.actionNames.length?JV.ActionManager.actionNames[a]:
null},"~N");b.getActionFromName=c(b,"getActionFromName",function(a){for(var b=0;b<JV.ActionManager.actionNames.length;b++)if(JV.ActionManager.actionNames[b].equalsIgnoreCase(a))return b;return-1},"~S");c(b,"getBindingInfo",function(a){return this.b.getBindingInfo(JV.ActionManager.actionInfo,JV.ActionManager.actionNames,a)},"~S");c(b,"setBinding",function(a){this.b=a},"JV.binding.Binding");c(b,"bnd",function(a,b){for(var c=b.length;0<=--c;)if(this.b.isBound(a,b[c]))return!0;return!1},"~N,~A");c(b,
"isDrawOrLabelAction",function(a){return this.drawMode&&this.bnd(a,[8,9])||this.labelMode&&this.bnd(a,[10])},"~N");c(b,"getBondPickingMode",function(){return this.bondPickingMode});b.getPickingModeName=c(b,"getPickingModeName",function(a){return 0>a||a>=JV.ActionManager.pickingModeNames.length?"off":JV.ActionManager.pickingModeNames[a]},"~N");b.getPickingMode=c(b,"getPickingMode",function(a){for(var b=JV.ActionManager.pickingModeNames.length;0<=--b;)if(a.equalsIgnoreCase(JV.ActionManager.pickingModeNames[b]))return 38==
b&&(b=6),b;return-1},"~S");b.getPickingStyleName=c(b,"getPickingStyleName",function(a){return 0>a||a>=JV.ActionManager.pickingStyleNames.length?"toggle":JV.ActionManager.pickingStyleNames[a]},"~N");b.getPickingStyleIndex=c(b,"getPickingStyleIndex",function(a){for(var b=JV.ActionManager.pickingStyleNames.length;0<=--b;)if(a.equalsIgnoreCase(JV.ActionManager.pickingStyleNames[b]))return b;return-1},"~S");c(b,"getAtomPickingMode",function(){return this.apm});c(b,"setPickingMode",function(a){var b=!1;
switch(a){case -1:b=!0;this.bondPickingMode=35;a=1;this.vwr.setStringProperty("pickingStyle","toggle");this.vwr.setBooleanProperty("bondPicking",!1);break;case 34:case 33:case 8:this.vwr.getModelkit(!1);case 35:this.vwr.setBooleanProperty("bondPicking",!0);this.bondPickingMode=a;this.resetMeasurement();return}b=(new Boolean(b|this.apm!=a)).valueOf();this.apm=a;b&&this.resetMeasurement()},"~N");c(b,"getPickingState",function(){var a=";set modelkitMode "+this.vwr.getBoolean(603983903)+";set picking "+
JV.ActionManager.getPickingModeName(this.apm);32==this.apm&&(a+="_"+this.vwr.getModelkitPropertySafely("atomtype"));a+=";";0!=this.bondPickingMode&&(a+="set picking "+JV.ActionManager.getPickingModeName(this.bondPickingMode));33==this.bondPickingMode&&(a+="_"+this.vwr.getModelkitPropertySafely("bondtype"));return a+";"});c(b,"getPickingStyle",function(){return this.pickingStyle});c(b,"setPickingStyle",function(a){this.pickingStyle=a;4<=a?(this.pickingStyleMeasure=a,this.resetMeasurement()):(3>a&&
(this.rootPickingStyle=a),this.pickingStyleSelect=a);this.rubberbandSelectionMode=!1;switch(this.pickingStyleSelect){case 2:this.b.name.equals("extendedSelect")||this.setBinding(null==this.pfaatBinding?this.pfaatBinding=JV.binding.Binding.newBinding(this.vwr,"Pfaat"):this.pfaatBinding);break;case 3:this.b.name.equals("drag")||this.setBinding(null==this.dragBinding?this.dragBinding=JV.binding.Binding.newBinding(this.vwr,"Drag"):this.dragBinding);this.rubberbandSelectionMode=!0;break;case 1:this.b.name.equals("selectOrToggle")||
this.setBinding(null==this.rasmolBinding?this.rasmolBinding=JV.binding.Binding.newBinding(this.vwr,"Rasmol"):this.rasmolBinding);break;default:this.b!==this.jmolBinding&&this.setBinding(this.jmolBinding)}this.b.name.equals("drag")||(this.predragBinding=this.b)},"~N");c(b,"setGestureSwipeFactor",function(a){this.gestureSwipeFactor=a},"~N");c(b,"setMouseDragFactor",function(a){this.mouseDragFactor=a},"~N");c(b,"setMouseWheelFactor",function(a){this.mouseWheelFactor=a},"~N");c(b,"setCurrent",function(a,
b,c,l){this.vwr.hoverOff();this.current.set(a,b,c,l)},"~N,~N,~N,~N");c(b,"getCurrentX",function(){return this.current.x});c(b,"getCurrentY",function(){return this.current.y});c(b,"setMouseMode",function(){this.drawMode=this.labelMode=!1;this.dragSelectedMode=this.vwr.getDragSelected();this.measuresEnabled=!this.dragSelectedMode;if(!this.dragSelectedMode)switch(this.apm){default:return;case 32:this.measuresEnabled=!this.vwr.getModelkit(!1).isPickAtomAssignCharge();return;case 4:this.drawMode=!0;this.measuresEnabled=
!1;break;case 2:this.labelMode=!0;this.measuresEnabled=!1;break;case 9:this.measuresEnabled=!1;break;case 19:case 22:case 20:case 21:this.measuresEnabled=!1;return}this.exitMeasurementMode(null)});c(b,"clearMouseInfo",function(){this.pressedCount=this.clickedCount=0;this.dragGesture.setAction(0,0);this.exitMeasurementMode(null)});c(b,"setDragAtomIndex",function(a){this.dragAtomIndex=a;this.setAtomsPicked(JU.BSUtil.newAndSetBit(a),"Label picked for atomIndex = "+a)},"~N");c(b,"isMTClient",function(){return this.isMultiTouchClient});
c(b,"isMTServer",function(){return this.isMultiTouchServer});c(b,"dispose",function(){this.clear()});c(b,"clear",function(){this.startHoverWatcher(!1);null!=this.predragBinding&&(this.b=this.predragBinding);this.vwr.setPickingStyle(null,this.rootPickingStyle);this.isAltKeyReleased=!0});c(b,"startHoverWatcher",function(a){if(!this.vwr.isPreviewOnly)try{a?null==this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread=new J.thread.HoverWatcherThread(this,this.current,this.moved,this.vwr)):
null!=this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread.interrupt(),this.hoverWatcherThread=null)}catch(b){if(!H(b,Exception))throw b;}},"~B");c(b,"setModeMouse",function(a){-1==a&&this.startHoverWatcher(!1)},"~N");j(b,"keyPressed",function(a,b){if(this.keyProcessing)return!1;this.keyProcessing=!0;switch(a){case 18:this.dragSelectedMode&&this.isAltKeyReleased&&this.vwr.moveSelectedXY(-2147483648,0,b);this.isAltKeyReleased=!1;this.moved.modifiers|=8;break;case 16:this.moved.keybuf=
0;this.dragged.modifiers|=1;this.moved.modifiers|=1;break;case 17:this.moved.modifiers|=2;break;case 27:this.vwr.hoverOff();this.exitMeasurementMode("escape");break;default:this.vwr.hoverOff()}var c=8464|this.moved.modifiers;!this.labelMode&&!this.b.isUserAction(c)&&this.checkMotionRotateZoom(c,this.current.x,0,0,!1);if(this.vwr.getBoolean(603979889))switch(a){case 38:case 40:case 37:case 39:case 32:case 46:this.vwr.navigate(a,b)}this.keyProcessing=!1;return!0},"~N,~N");j(b,"keyTyped",function(){return!1},
"~N,~N");j(b,"keyReleased",function(a){switch(a){case 18:this.moved.modifiers&=-9;this.dragSelectedMode&&this.vwr.moveSelectedXY(2147483647,0,this.moved.modifiers);this.isAltKeyReleased=!0;break;case 16:this.moved.modifiers&=-2;0<this.moved.keybuf&&this.vwr.isModelKitOpen()&&this.checkKeyBuf(0);break;case 17:this.moved.modifiers&=-3}0==this.moved.modifiers&&this.vwr.setCursor(0);if(65<=a&&this.vwr.isModelKitOpen()&&(this.dragAtomIndex=this.vwr.findNearestAtomIndex(this.current.x,this.current.y),0<=
this.dragAtomIndex)){this.checkKeyBuf(a);return}if(this.vwr.getBoolean(603979889))switch(a){case 38:case 40:case 37:case 39:this.vwr.navigate(0,0)}this.moved.keybuf=0},"~N");c(b,"checkKeyBuf",function(a){var b=0!=(this.moved.modifiers&1);if(0!=a)if(0==this.moved.keybuf){if(this.moved.keybuf=a,b)return}else this.moved.keybuf+=a<<8;0<this.moved.keybuf&&(this.assignNew(this.moved.keybuf),this.moved.keybuf=0)},"~N");j(b,"mouseEnterExit",function(a,b,c,l){b=this.vwr.tm.stereoDoubleDTI?b<<1:this.vwr.am.splitFrame?
this.vwr.am.setSplitFrameMouse(b):b;this.setCurrent(a,b,c,0);l&&this.exitMeasurementMode("mouseExit")},"~N,~N,~N,~B");c(b,"setMouseActions",function(a,b,c){this.pressAction=JV.binding.Binding.getMouseAction(a,b,c?5:4);this.dragAction=JV.binding.Binding.getMouseAction(a,b,1);this.clickAction=JV.binding.Binding.getMouseAction(a,b,2)},"~N,~N,~B");j(b,"mouseAction",function(a,b,c,l,e,f){if(this.vwr.getMouseEnabled())switch(JU.Logger.debuggingHigh&&(0!=a&&this.vwr.getBoolean(603979960))&&this.vwr.showString("mouse action: "+
a+" "+f+" "+JV.binding.Binding.getMouseActionName(JV.binding.Binding.getMouseAction(e,f,a),!1),!1),a){case 0:this.hoverable||(JU.Logger.info("ActionManager: mouse move detected"),this.hoverable=!0);this.setCurrent(b,c,l,f);this.moved.setCurrent(this.current,0);this.moved.keybuf=0;if(null!=this.mp||this.hoverActive){this.clickAction=JV.binding.Binding.getMouseAction(this.clickedCount,f,0);this.checkClickAction(c,l,b,0);break}if(this.isZoomArea(c)){this.checkMotionRotateZoom(this.LEFT_DRAGGED,0,0,0,
!1);break}8==this.vwr.currentCursor&&this.vwr.setCursor(0);break;case 4:this.setMouseMode();this.pressedCount=this.pressed.check(20,c,l,f,b,700)?this.pressedCount+1:1;1==this.pressedCount&&(this.vwr.checkInMotion(1),this.setCurrent(b,c,l,f));this.pressAction=JV.binding.Binding.getMouseAction(this.pressedCount,f,4);this.vwr.setCursor(12);this.pressed.setCurrent(this.current,1);this.vwr.am.setSplitFrameMouse(c);this.pressed.setModelIndex(this.vwr.am.getCurrentSplitModelIndex());this.dragged.setCurrent(this.current,
1);this.vwr.setFocus();this.dragGesture.setAction(this.dragAction,b);this.checkPressedAction(c,l,b);break;case 1:this.setMouseMode();this.setMouseActions(this.pressedCount,f,!1);a=c-this.dragged.x;e=l-this.dragged.y;this.setCurrent(b,c,l,f);this.dragged.setCurrent(this.current,-1);this.dragGesture.add(this.dragAction,c,l,b);this.checkDragWheelAction(this.dragAction,c,l,a,e,b,1);break;case 5:this.pressed.setModelIndex(-1);this.setMouseActions(this.pressedCount,f,!0);this.setCurrent(b,c,l,f);this.vwr.spinXYBy(0,
0,0);f=!this.pressed.check(10,c,l,f,b,9223372036854775E3);this.checkReleaseAction(c,l,b,f);break;case 3:if(this.vwr.isApplet&&!this.vwr.hasFocus())break;this.setCurrent(b,this.current.x,this.current.y,f);this.checkDragWheelAction(JV.binding.Binding.getMouseAction(0,f,3),this.current.x,this.current.y,0,l,b,3);break;case 2:this.setMouseMode();this.clickedCount=1<e?e:this.clicked.check(10,0,0,f,b,700)?this.clickedCount+1:1;1==this.clickedCount&&this.setCurrent(b,c,l,f);this.setMouseActions(this.clickedCount,
f,!1);this.clicked.setCurrent(this.current,this.clickedCount);this.vwr.setFocus();if(9!=this.apm&&this.bnd(JV.binding.Binding.getMouseAction(1,f,4),[31]))break;this.clickAction=JV.binding.Binding.getMouseAction(this.clickedCount,f,2);this.checkClickAction(c,l,b,this.clickedCount)}},"~N,~N,~N,~N,~N,~N");c(b,"checkPressedAction",function(a,b,c){var l=JV.binding.Binding.getButtonMods(this.pressAction),e=this.bnd(JV.binding.Binding.getMouseAction(1,l,4),[31]);if(0!=l){this.pressAction=this.vwr.notifyMouseClicked(a,
b,this.pressAction,4);if(0==this.pressAction)return;l=JV.binding.Binding.getButtonMods(this.pressAction)}this.setMouseActions(this.pressedCount,l,!1);JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.pressAction,!1));if(!this.isDrawOrLabelAction(this.dragAction)||!this.vwr.checkObjectDragged(-2147483648,0,a,b,this.dragAction)){this.checkUserAction(this.pressAction,a,b,0,0,c,4);c=!1;switch(this.apm){case 32:c=this.bnd(this.clickAction,
[0]);break;case 28:c=this.bnd(this.dragAction,[7,14]);break;case 26:case 36:case 37:case 27:case 40:c=this.bnd(this.dragAction,[7,14,27]);break;case 29:c=this.bnd(this.dragAction,[11,14]);break;case 30:c=this.bnd(this.dragAction,[11,14,27]);break;default:c=34==this.bondPickingMode}if(c){this.dragAtomIndex=this.vwr.findNearestAtomIndexMovable(a,b,!0);a=34==this.bondPickingMode?this.vwr.getModelkit(!1).getRotateBondIndex():-1;if(0<=this.dragAtomIndex&&(0<=a||32==this.apm||31==this.apm))this.enterMeasurementMode(this.dragAtomIndex),
this.mp.addPoint(this.dragAtomIndex,null,!1),0<=a&&this.updateModelkitBranch(a,!0);a=this.vwr.getModelkitPropertySafely("screenxy");this.mkBondPressed=null!=a&&this.pressed.inRange(10,a[0],a[1])}else this.bnd(this.pressAction,[23])?this.doPopup(a,b):this.dragSelectedMode?(this.haveSelection=!e||0<=this.vwr.findNearestAtomIndexMovable(a,b,!0))&&this.bnd(this.dragAction,[13,14])&&this.vwr.moveSelectedXY(-2147483648,0,l):this.checkMotionRotateZoom(this.dragAction,a,0,0,!0)}},"~N,~N,~N");c(b,"checkDragWheelAction",
function(a,b,c,l,e,f,h){var k=JV.binding.Binding.getButtonMods(a);if(0!=k){var j=this.vwr.notifyMouseClicked(b,c,JV.binding.Binding.getMouseAction(this.pressedCount,k,h),h);if(0==j)return;0<j&&(a=j)}if(this.isRubberBandSelect(a))this.calcRectRubberBand(),this.vwr.refresh(3,"rubberBand selection");else if(!this.checkUserAction(a,b,c,l,e,f,h))if(f=34==this.bondPickingMode?this.vwr.getModelkit(!1).getRotateBondIndex():-1,0<=f&&(0<=this.dragAtomIndex||this.mkBondPressed||this.bnd(a,[26])))0<=this.dragAtomIndex&&
this.updateModelkitBranch(f,!1),this.vwr.moveSelected(l,e,-2147483648,b,c,null,null,null,!1,!1,0<=this.dragAtomIndex?0:16);else{if(40==this.apm||this.vwr.am.splitFrame&&this.vwr.ms.isJmolDataFrame(this.pressed.modelIndex)){if(40==this.apm||this.bnd(a,[29])){this.vwr.rotateSpins(l,e);return}if(40==this.apm)return}f=null;if(0<=this.dragAtomIndex&&2!=this.apm)switch(this.apm){case 26:this.dragSelected(a,l,e,!0);return;case 36:case 37:case 27:case 30:f=this.vwr.ms.getAtoms(37==this.apm?1094717454:1094713360,
JU.BSUtil.newAndSetBit(this.dragAtomIndex)),36==this.apm&&f.and(this.vwr.getAtomBitSet("ligand"));case 28:case 29:1==this.dragGesture.getPointCount()&&this.vwr.undoMoveActionClear(this.dragAtomIndex,2,!0);this.setMotion(13,!0);if(this.bnd(a,[27]))this.vwr.rotateSelected(this.getDegrees(l,!0),this.getDegrees(e,!1),f);else{switch(this.apm){case 36:case 37:case 27:case 30:this.vwr.selectStatus(f,!1,0,!0,!0)}this.vwr.moveAtomWithHydrogens(this.dragAtomIndex,l,e,this.bnd(a,[14])?-e:-2147483648,null,f);
this.vwr.checkCoordinatesChanged(null)}return}if(0<=this.dragAtomIndex&&1==h&&this.bnd(this.clickAction,[0])&&32==this.apm)a=this.vwr.findNearestAtomIndexMovable(b,c,!1),0<=a?(null!=this.mp?this.mp.setCount(1):this.measuresEnabled&&this.enterMeasurementMode(a),this.addToMeasurement(a,null,!0),this.mp.colix=20):null!=this.mp&&(this.mp.setCount(1),this.mp.colix=23),null!=this.mp&&(this.vwr.antialiased&&(b<<=1,c<<=1),this.mp.traceX=b,this.mp.traceY=c,this.vwr.refresh(3,"assignNew"));else if(!this.drawMode&&
!this.labelMode&&this.bnd(a,[45]))this.vwr.translateXYBy(l,e);else if(this.dragSelectedMode&&this.haveSelection&&this.bnd(a,[13,27]))b=this.vwr.bsA().nextSetBit(0),0>b||(1==this.dragGesture.getPointCount()?this.vwr.undoMoveActionClear(b,2,!0):this.vwr.moveSelected(2147483647,0,-2147483648,-2147483648,-2147483648,null,null,null,!1,!1,k),this.dragSelected(a,l,e,!1));else{if(this.isDrawOrLabelAction(a)&&(this.setMotion(13,!0),this.vwr.checkObjectDragged(this.dragged.x,this.dragged.y,b,c,a)))return;if(this.checkMotionRotateZoom(a,
b,l,e,!0))this.vwr.tm.slabEnabled&&this.bnd(a,[39])?this.vwr.slabDepthByPixels(e):this.vwr.zoomBy(e);else if(this.bnd(a,[25]))this.vwr.rotateXYBy(this.getDegrees(l,!0),this.getDegrees(e,!1));else if(this.bnd(a,[29]))0==l&&1<Math.abs(e)?(this.setMotion(8,!0),this.vwr.zoomBy(e+(0<e?-1:1))):0==e&&1<Math.abs(l)&&(this.setMotion(13,!0),this.vwr.rotateZBy(-l+(0<l?1:-1),2147483647,2147483647));else{if(this.vwr.tm.slabEnabled){if(this.bnd(a,[6])){this.vwr.depthByPixels(e);return}if(this.bnd(a,[38])){this.vwr.slabByPixels(e);
return}if(this.bnd(a,[39])){this.vwr.slabDepthByPixels(e);return}}this.bnd(a,[46])?this.zoomByFactor(e,2147483647,2147483647):this.bnd(a,[28])&&(this.setMotion(13,!0),this.vwr.rotateZBy(-l,2147483647,2147483647))}}}},"~N,~N,~N,~N,~N,~N,~N");c(b,"updateModelkitBranch",function(a,b){this.vwr.setModelkitPropertySafely(b?"branchatomclicked":"branchatomdragged",Integer.$valueOf(this.dragAtomIndex));null==this.measurementQueued||0==this.measurementQueued.numSet||null==this.mp?this.vwr.setPendingMeasurement(this.vwr.getModelkit(!1).setBondMeasure(a,
this.measurementQueued=this.mp=this.getMP())):this.measurementQueued.refresh(null)},"~N,~B");c(b,"dragSelected",function(a,b,c,l){this.setMotion(13,!0);this.bnd(a,[27])&&this.vwr.getBoolean(603979785)?this.vwr.rotateSelected(this.getDegrees(b,!0),this.getDegrees(c,!1),null):this.vwr.moveSelected(b,c,l&&this.bnd(a,[14])?-c:-2147483648,-2147483648,-2147483648,null,null,null,!0,!1,this.dragged.modifiers)},"~N,~N,~N,~B");c(b,"checkReleaseAction",function(a,b,c,l){JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&
JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.pressAction,!1));this.vwr.checkInMotion(0);this.vwr.setInMotion(!1);this.vwr.setCursor(0);this.dragGesture.add(this.dragAction,a,b,c);0<=this.dragAtomIndex&&!this.vwr.isModelkitPickingRotateBond()&&(29==this.apm||30==this.apm)&&this.minimize(!0);if(32==this.apm&&this.bnd(this.clickAction,[0]))null==this.mp||0>this.dragAtomIndex?this.exitMeasurementMode(null):34==this.bondPickingMode?(this.vwr.setModelkitPropertySafely("rotatebond",Integer.$valueOf(this.dragAtomIndex)),
this.exitMeasurementMode(null)):this.assignNew(-1);else if(this.dragAtomIndex=-1,this.mkBondPressed=!1,this.isRubberBandSelect(this.dragAction)&&this.selectRb(this.clickAction),this.rubberbandSelectionMode=this.b.name.equals("drag"),this.rectRubber.x=2147483647,l&&this.vwr.notifyMouseClicked(a,b,JV.binding.Binding.getMouseAction(this.pressedCount,0,5),5),this.isDrawOrLabelAction(this.dragAction))this.vwr.checkObjectDragged(2147483647,0,a,b,this.dragAction);else if(this.haveSelection&&(this.dragSelectedMode&&
this.bnd(this.dragAction,[13]))&&this.vwr.moveSelectedXY(2147483647,0,this.dragged.modifiers),(!l||!this.checkUserAction(this.pressAction,a,b,0,0,c,5))&&this.vwr.getBoolean(603979780)&&this.bnd(this.dragAction,[44]))a=this.getExitRate(),0<a&&this.vwr.spinXYBy(this.dragGesture.getDX(4,2),this.dragGesture.getDY(4,2),30*a*this.gestureSwipeFactor),this.vwr.g.logGestures&&this.vwr.log("$NOW$ swipe "+this.dragGesture+" "+a)},"~N,~N,~N,~B");c(b,"checkClickAction",function(a,b,c,l){if(1<l&&(5==this.apm||
6==this.apm))this.resetMeasurement(),this.runScript("draw ID sym* delete;spin off;");else{if(0<l){if(this.checkUserAction(this.clickAction,a,b,0,0,c,32768))return;this.clickAction=this.vwr.notifyMouseClicked(a,b,this.clickAction,32768);if(0==this.clickAction)return}JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.clickAction,!1));if(this.bnd(this.clickAction,[2])){if(this.vwr.frankClicked(a,b)){this.vwr.popupMenu(-a,b,"j");return}if(this.vwr.frankClickedModelKit(a,
b)){this.vwr.popupMenu(10,0,"m");return}}c=null;var e=!1,f=!1,h=null;if(!this.drawMode&&(h=this.vwr.checkObjectClicked(a,b,this.clickAction),null!=h)){if(this.labelMode){this.pickLabel(h.get("atomIndex").intValue());return}e="bond".equals(h.get("type"));f="isosurface".equals(h.get("type"));c=this.getPoint(h);e&&this.vwr.isModelkitPickingRotateBond()&&this.vwr.highlightBond(h.get("index").intValue(),-1,a,b)}e&&(l=1);if(!(null!=c&&Float.isNaN(c.x))){var k=this.findNearestAtom(a,b,c,0<l);if(this.bnd(this.clickAction,
[23]))this.doPopup(a,b);else if(0==l&&32!=this.apm&&!this.vwr.isModelkitPickingRotateBond()){if(null!=this.mp){if(null!=c||0==this.mp.getIndexOf(k))try{this.mp.addPoint(k,c,!1)}catch(j){if(H(j,Exception)){this.exitMeasurementMode(null);return}throw j;}this.mp.haveModified&&this.vwr.setPendingMeasurement(this.mp);this.vwr.refresh(3,"measurementPending")}}else if(this.setMouseMode(),this.bnd(this.clickAction,[43])&&this.vwr.tm.stopMotion(),this.vwr.getBoolean(603979889)&&23==this.apm&&this.bnd(this.clickAction,
[21]))this.vwr.navTranslatePercent(100*a/this.vwr.getScreenWidth()-50,100*b/this.vwr.getScreenHeight()-50);else{if(e){if(this.bnd(this.clickAction,[34==this.bondPickingMode||33==this.bondPickingMode?0:5])){this.bondPicked(h.get("index").intValue());this.vwr.refresh(1,"bondpicked");return}}else{if(f)return;if(32!=this.apm&&null!=this.mp&&this.bnd(this.clickAction,[20])){this.atomOrPointPicked(k,c);4==this.addToMeasurement(k,c,!1)&&this.toggleMeasurement();return}if(this.bnd(this.clickAction,[37])){null!=
this.mp?(this.addToMeasurement(k,c,!0),this.toggleMeasurement()):!this.drawMode&&(!this.labelMode&&!this.dragSelectedMode&&this.measuresEnabled)&&(this.enterMeasurementMode(k),this.addToMeasurement(k,c,!0));this.atomOrPointPicked(k,c);return}}this.isSelectAction(this.clickAction)?f||this.atomOrPointPicked(k,c):this.bnd(this.clickAction,[24])&&0>k&&this.reset()}}}},"~N,~N,~N,~N");c(b,"doPopup",function(a,b){this.vwr.popupMenu(a,b,this.vwr.isModelKitOpen()?"m":"j")},"~N,~N");c(b,"pickLabel",function(a){var b=
this.vwr.ms.at[a].atomPropertyString(this.vwr,1825200146);2==this.pressedCount?(b=this.vwr.prompt("Set label for atomIndex="+a,b,!1),null!=b&&(this.vwr.shm.setAtomLabel(b,a),this.vwr.refresh(1,"label atom"))):this.setAtomsPicked(JU.BSUtil.newAndSetBit(a),"Label picked for atomIndex = "+a+": "+b)},"~N");c(b,"checkUserAction",function(a,b,c,l,e,f,h){if(!this.b.isUserAction(a))return!1;for(var k=!1,j,n=this.b.getBindings(),p=a+"\t",q,r=n.keySet().iterator();r.hasNext()&&((q=r.next())||1);)if(0==q.indexOf(p)&&
JU.AU.isAS(j=n.get(q))){var u=j[1],s=null;if(0<=u.indexOf("_ATOM")){var v=this.findNearestAtom(b,c,null,!0),u=JU.PT.rep(u,"_ATOM","({"+(0<=v?""+v:"")+"})");0<=v&&(u=JU.PT.rep(u,"_POINT",JU.Escape.eP(this.vwr.ms.at[v])))}if(!this.drawMode&&(0<=u.indexOf("_POINT")||0<=u.indexOf("_OBJECT")||0<=u.indexOf("_BOND"))){v=this.vwr.checkObjectClicked(b,c,a);if(null!=v&&null!=(s=v.get("pt")))v.get("type").equals("bond")&&(u=JU.PT.rep(u,"_BOND","[{"+v.get("index")+"}]")),u=JU.PT.rep(u,"_POINT",JU.Escape.eP(s)),
u=JU.PT.rep(u,"_OBJECT",JU.Escape.escapeMap(v));u=JU.PT.rep(u,"_BOND","[{}]");u=JU.PT.rep(u,"_OBJECT","{}")}u=JU.PT.rep(u,"_POINT","{}");u=JU.PT.rep(u,"_ACTION",""+a);u=JU.PT.rep(u,"_X",""+b);u=JU.PT.rep(u,"_Y",""+(this.vwr.getScreenHeight()-c));u=JU.PT.rep(u,"_DELTAX",""+l);u=JU.PT.rep(u,"_DELTAY",""+e);u=JU.PT.rep(u,"_TIME",""+f);u=JU.PT.rep(u,"_MODE",""+h);u.startsWith("+:")&&(k=!0,u=u.substring(2));this.vwr.evalStringQuiet(u)}return!k},"~N,~N,~N,~N,~N,~N,~N");c(b,"checkMotionRotateZoom",function(a,
b,c,l,e){b=this.bnd(a,[40])&&this.isZoomArea(this.pressed.x);var f=this.bnd(a,[25]),h=this.bnd(a,[29]);if(!b&&!f&&!h)return!1;a=(c=h&&(0==c||Math.abs(l)>5*Math.abs(c)))||this.isZoomArea(this.moved.x)||this.bnd(a,[46])?8:f||h?13:this.bnd(a,[1])?12:0;this.setMotion(a,e);return c||b},"~N,~N,~N,~N,~B");c(b,"getExitRate",function(){var a=this.dragGesture.getTimeDifference(2);return this.isMultiTouch?80<a?0:this.dragGesture.getSpeedPixelsPerMillisecond(2,1):10<a?0:this.dragGesture.getSpeedPixelsPerMillisecond(4,
2)});c(b,"isRubberBandSelect",function(a){return this.rubberbandSelectionMode&&this.bnd(a&-8193|32768,[35,34,32])},"~N");c(b,"getRubberBand",function(){return this.rubberbandSelectionMode&&2147483647!=this.rectRubber.x?this.rectRubber:null});c(b,"calcRectRubberBand",function(){var a=this.vwr.antialiased?2:1;this.current.x<this.pressed.x?(this.rectRubber.x=this.current.x*a,this.rectRubber.width=(this.pressed.x-this.current.x)*a):(this.rectRubber.x=this.pressed.x*a,this.rectRubber.width=(this.current.x-
this.pressed.x)*a);this.current.y<this.pressed.y?(this.rectRubber.y=this.current.y*a,this.rectRubber.height=(this.pressed.y-this.current.y)*a):(this.rectRubber.y=this.pressed.y*a,this.rectRubber.height=(this.current.y-this.pressed.y)*a)});c(b,"getDegrees",function(a,b){return 180*(a/Math.min(500,b?this.vwr.getScreenWidth():this.vwr.getScreenHeight()))*this.mouseDragFactor},"~N,~B");c(b,"isZoomArea",function(a){return a>98*this.vwr.getScreenWidth()*(this.vwr.haveTwoImages()?2:1)/100},"~N");c(b,"getPoint",
function(a){var b=JU.Point3fi.newPF(a.get("pt"),0);b.mi=a.get("modelIndex").intValue();return b},"java.util.Map");c(b,"findNearestAtom",function(a,b,c,l){a=this.drawMode||null!=c?-1:this.vwr.findNearestAtomIndexMovable(a,b,!1);return 0<=a&&(l||null==this.mp)&&!this.vwr.slm.isInSelectionSubset(a)?-1:a},"~N,~N,JU.Point3fi,~B");c(b,"isSelectAction",function(a){return this.bnd(a,[17])||!this.drawMode&&!this.labelMode&&1==this.apm&&this.bnd(a,[1])||this.dragSelectedMode&&this.bnd(this.dragAction,[27,13])||
this.bnd(a,[22,35,32,34,36,30])},"~N");c(b,"enterMeasurementMode",function(a){this.vwr.setPicked(a,!0);this.vwr.setCursor(1);this.vwr.setPendingMeasurement(this.mp=this.getMP());0<=a&&this.mp.setModelIndex(this.vwr.ms.at[a].mi);this.measurementQueued=this.mp},"~N");c(b,"getMP",function(){return J.api.Interface.getInterface("JM.MeasurementPending",this.vwr,"mouse").set(this.vwr.ms)});c(b,"addToMeasurement",function(a,b,c){if(-1==a&&null==b||null==this.mp)return this.exitMeasurementMode(null),0;var l=
this.mp.count;-2147483648!=this.mp.traceX&&2==l&&this.mp.setCount(l=1);return 4==l&&!c?l:this.mp.addPoint(a,b,!0)},"~N,JU.Point3fi,~B");c(b,"resetMeasurement",function(){this.exitMeasurementMode(null);this.measurementQueued=this.getMP()});c(b,"exitMeasurementMode",function(a){null!=this.mp&&(this.vwr.setPendingMeasurement(this.mp=null),this.vwr.setCursor(0),null!=a&&this.vwr.refresh(3,a))},"~S");c(b,"getSequence",function(){var a=this.measurementQueued.getAtomIndex(1),b=this.measurementQueued.getAtomIndex(2);
if(!(0>a||0>b))try{var c=this.vwr.getSmilesOpt(null,a,b,1048576,null);this.vwr.setStatusMeasuring("measureSequence",-2,c,0)}catch(l){if(H(l,Exception))JU.Logger.error(l.toString());else throw l;}});c(b,"minimize",function(a){var b=this.dragAtomIndex;a&&(this.dragAtomIndex=-1,this.mkBondPressed=!1);this.vwr.dragMinimizeAtom(b)},"~B");c(b,"queueAtom",function(a,b){var c=this.measurementQueued.addPoint(a,b,!0);0<=a&&this.vwr.setStatusAtomPicked(a,"Atom #"+c+":"+this.vwr.getAtomInfo(a),null,!1);return c},
"~N,JU.Point3fi");c(b,"setMotion",function(a,b){switch(this.vwr.currentCursor){case 3:break;default:this.vwr.setCursor(a)}b&&this.vwr.setInMotion(!0)},"~N,~B");c(b,"zoomByFactor",function(a,b,c){0!=a&&(this.setMotion(8,!0),this.vwr.zoomByFactor(Math.pow(this.mouseWheelFactor,a),b,c),this.moved.setCurrent(this.current,0),this.vwr.setInMotion(!0),this.zoomTrigger=!0,this.startHoverWatcher(!0))},"~N,~N,~N");c(b,"runScript",function(a){this.vwr.evalStringGUI(a)},"~S");c(b,"atomOrPointPicked",function(a,
b){if(0>a){this.resetMeasurement();if(this.bnd(this.clickAction,[33])){this.runScript("select none");return}if(5!=this.apm&&6!=this.apm)return}var c=2;switch(this.apm){case 28:case 29:return;case 0:return;case 25:case 24:case 8:var c=8==this.apm,l=25==this.apm;if(!this.bnd(this.clickAction,[c?5:3]))return;if(null==this.measurementQueued||0==this.measurementQueued.count||2<this.measurementQueued.count)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,b,!0);if(2!=this.queueAtom(a,
b))return;c=c||this.measurementQueued.isConnected(this.vwr.ms.at,2)?" DELETE":l?"STRUTS":"";this.runScript("connect "+this.measurementQueued.getMeasurementScript(" ",!0)+c);this.resetMeasurement();return;case 21:c++;case 20:c++;case 18:case 19:case 22:if(!this.bnd(this.clickAction,[20]))return;if(null==this.measurementQueued||0==this.measurementQueued.count||this.measurementQueued.count>c)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,b,!0);this.queueAtom(a,b);l=this.measurementQueued.count;
1==l&&this.vwr.setPicked(a,!0);if(l<c)return;22==this.apm?this.getSequence():(this.vwr.setStatusMeasuring("measurePicked",c,this.measurementQueued.getStringDetail(),this.measurementQueued.value),(18==this.apm||4==this.pickingStyleMeasure)&&this.runScript("measure "+this.measurementQueued.getMeasurementScript(" ",!0)));this.resetMeasurement();return}c=null!=this.mp&&1!=this.apm?1:this.apm;switch(c){case 3:if(!this.bnd(this.clickAction,[17]))return;null==b?this.zoomTo(a):this.runScript("zoomTo "+JU.Escape.eP(b));
return;case 5:case 6:if(this.bnd(this.clickAction,[17])){this.checkTwoAtomAction(b,a);return}}if(null==b){switch(c){case 1:!this.drawMode&&!this.labelMode&&this.bnd(this.clickAction,[1])?this.zoomTo(a):this.bnd(this.clickAction,[17])&&this.vwr.setStatusAtomPicked(a,null,null,!1);return;case 2:this.bnd(this.clickAction,[19])&&(this.runScript("set labeltoggle {atomindex="+a+"}"),this.pickLabel(a));return;case 31:this.bnd(this.clickAction,[0])&&(this.vwr.invertAtomCoord(null,null,null,a,!0),this.vwr.setStatusAtomPicked(a,
"invert stereo for atomIndex="+a,null,!1));return;case 7:this.bnd(this.clickAction,[4])&&(c=JU.BSUtil.newAndSetBit(a),this.vwr.deleteAtoms(c,!1),this.vwr.setStatusAtomPicked(a,"deleted: "+JU.Escape.eBS(c),null,!1));return}c="atomindex="+a;switch(this.apm){default:return;case 9:this.selectAtoms(c);break;case 10:this.selectAtoms("within(group, "+c+")");break;case 11:this.selectAtoms("within(chain, "+c+")");break;case 13:this.selectAtoms("within(polymer, "+c+")");break;case 14:this.selectAtoms("within(structure, "+
c+")");break;case 12:this.selectAtoms("within(molecule, "+c+")");break;case 16:this.selectAtoms("within(model, "+c+")");break;case 17:this.selectAtoms("visible and within(element, "+c+")");break;case 15:this.selectAtoms("visible and within(site, "+c+")");break;case 39:this.selectAtoms("visible and within(vxyz, "+c+")")}this.vwr.clearClickCount();this.vwr.setStatusAtomPicked(a,null,null,!1)}},"~N,JU.Point3fi");c(b,"assignNew",function(a){0>a?this.vwr.getModelkit(!1).handleAssignNew(this.pressed,this.dragged,
this.mp,this.dragAtomIndex,a)||this.exitMeasurementMode("bond dropped"):this.vwr.getModelkit(!1).handleAssignNew(this.current,this.current,null,this.dragAtomIndex,a);this.exitMeasurementMode(null)},"~N");c(b,"bondPicked",function(a){switch(this.bondPickingMode){case 33:this.vwr.undoMoveActionClear(-1,4146,!0);this.vwr.getModelkit(!1).setProperty("assignbond",Integer.$valueOf(a));break;case 8:this.vwr.deleteBonds(JU.BSUtil.newAndSetBit(a))}},"~N");c(b,"checkTwoAtomAction",function(a,b){var c=5==this.apm,
l=6==this.apm;if(c||l)if(this.vwr.tm.spinOn||this.vwr.tm.navOn||null!=this.vwr.getPendingMeasurement())this.resetMeasurement(),this.vwr.tm.spinOn&&this.runScript("spin off");else{2<=this.measurementQueued.count&&this.resetMeasurement();var e=this.measurementQueued.count;if(1==e)if(null==a){if(this.measurementQueued.getAtomIndex(1)==b)return}else if(0==this.measurementQueued.getAtom(1).distance(a))return;if(c||l){if(0<=b||null!=a)e=this.queueAtom(b,a);2>e?c?this.vwr.scriptStatus(1==e?J.i18n.GT.$("pick one more atom in order to spin the model around an axis"):
J.i18n.GT.$("pick two atoms in order to spin the model around an axis")):this.vwr.scriptStatus(1==e?J.i18n.GT.$("pick one more atom in order to display the symmetry relationship"):J.i18n.GT.$("pick two atoms in order to display the symmetry relationship between them")):c?(c=this.measurementQueued.getMeasurementScript(" ",!1),this.resetMeasurement(),this.runScript("spin"+c+" "+this.vwr.getInt(553648157))):(c=this.measurementQueued.getAtomIndex(1),l=this.measurementQueued.getAtomIndex(2),this.resetMeasurement(),
this.vwr.getModelkit(!1).drawSymop(c,l))}}},"JU.Point3fi,~N");c(b,"reset",function(){this.runScript("!reset")});c(b,"selectAtoms",function(a){if(!(null!=this.mp||this.selectionWorking)){this.selectionWorking=!0;var b=this.rubberbandSelectionMode||this.bnd(this.clickAction,[35])?"selected and not ("+a+") or (not selected) and ":this.bnd(this.clickAction,[32])?"selected and not ":this.bnd(this.clickAction,[34])?"selected or ":0==this.clickAction||this.bnd(this.clickAction,[36])?"selected tog ":this.bnd(this.clickAction,
[30])?"":null;if(null!=b)try{var c=this.vwr.getAtomBitSetEval(null,b+("("+a+")"));this.setAtomsPicked(c,"selected: "+JU.Escape.eBS(c));this.vwr.refresh(3,"selections set")}catch(l){if(!H(l,Exception))throw l;}this.selectionWorking=!1}},"~S");c(b,"setAtomsPicked",function(a,b){this.vwr.selectStatus(a,!1,0,!1,!0);this.vwr.setStatusAtomPicked(-1,b,null,!1)},"JU.BS,~S");c(b,"selectRb",function(a){var b=this.vwr.ms.findAtomsInRectangle(this.rectRubber);0<b.length()&&(b=JU.Escape.eBS(b),this.bnd(a,[34])?
this.runScript("selectionHalos on;select selected or "+b):this.bnd(a,[32])?this.runScript("selectionHalos on;select selected and not "+b):this.runScript("selectionHalos on;select selected tog "+b));this.vwr.refresh(3,"mouseReleased")},"~N");c(b,"toggleMeasurement",function(){if(null!=this.mp){var a=this.mp.count;2<=a&&4>=a&&this.runScript("!measure "+this.mp.getMeasurementScript(" ",!0));this.exitMeasurementMode(null)}});c(b,"zoomTo",function(a){this.runScript("zoomTo (atomindex="+a+")");this.vwr.setStatusAtomPicked(a,
null,null,!1)},"~N");c(b,"userActionEnabled",function(a){return this.vwr.isFunction(JV.ActionManager.getActionName(a).toLowerCase())},"~N");c(b,"userAction",function(a,b){if(!this.userActionEnabled(a))return!1;var c=JS.ScriptEval.runUserAction(JV.ActionManager.getActionName(a),b,this.vwr);return!JS.SV.vF.equals(c)},"~N,~A");b.actionInfo=Array(47);b.actionNames=Array(47);JV.ActionManager.pickingModeNames="off identify label center draw spin symmetry deleteatom deletebond atom group chain molecule polymer structure site model element measure distance angle torsion sequence navigate connect struts dragselected dragmolecule dragatom dragminimize dragminimizemolecule invertstereo assignatom assignbond rotatebond identifybond dragligand dragmodel symop vxyz dragspin".$plit(" ");
JV.ActionManager.pickingStyleNames="toggle selectOrToggle extendedSelect drag measure measureoff".$plit(" ");b=n(function(){this.time=this.y=this.x=this.index=0;v(this,arguments)},JV,"MotionPoint",null);c(b,"set",function(a,b,c,l){this.index=a;this.x=b;this.y=c;this.time=l},"~N,~N,~N,~N");j(b,"toString",function(){return"[x = "+this.x+" y = "+this.y+" time = "+this.time+" ]"});b=n(function(){this.action=0;this.nodes=null;this.time0=this.ptNext=0;this.vwr=null;v(this,arguments)},JV,"Gesture",null);
A(b,function(a,b){this.vwr=b;this.nodes=Array(a);for(var c=0;c<a;c++)this.nodes[c]=new JV.MotionPoint},"~N,JV.Viewer");c(b,"setAction",function(a,b){this.action=a;this.ptNext=0;this.time0=b;for(var c=0;c<this.nodes.length;c++)this.nodes[c].index=-1},"~N,~N");c(b,"add",function(a,b,c,l){this.action=a;this.getNode(this.ptNext).set(this.ptNext,b,c,l-this.time0);this.ptNext++;return this.ptNext},"~N,~N,~N,~N");c(b,"getTimeDifference",function(a){a=this.getPointCount2(a,0);if(2>a)return 0;var b=this.getNode(this.ptNext-
1);a=this.getNode(this.ptNext-a);return b.time-a.time},"~N");c(b,"getSpeedPixelsPerMillisecond",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),l=this.getNode(this.ptNext-a-b),e=360*((c.x-l.x)/this.vwr.getScreenWidth()),f=360*((c.y-l.y)/this.vwr.getScreenHeight());return Math.sqrt(e*e+f*f)/(c.time-l.time)},"~N,~N");c(b,"getDX",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),l=this.getNode(this.ptNext-a-b);return c.x-
l.x},"~N,~N");c(b,"getDY",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),l=this.getNode(this.ptNext-a-b);return c.y-l.y},"~N,~N");c(b,"getPointCount",function(){return this.ptNext});c(b,"getPointCount2",function(a,b){a>this.nodes.length-b&&(a=this.nodes.length-b);for(var c=a+1;0<=--c&&!(0<=this.getNode(this.ptNext-c-b).index););return c},"~N,~N");c(b,"getNode",function(a){return this.nodes[(a+this.nodes.length+this.nodes.length)%this.nodes.length]},"~N");
j(b,"toString",function(){return 0==this.nodes.length?""+this:JV.binding.Binding.getMouseActionName(this.action,!1)+" nPoints = "+this.ptNext+" "+this.nodes[0]})});s("JV");B(["JU.BS"],"JV.AnimationManager",["J.api.Interface","JU.BSUtil"],function(){var b=n(function(){this.vwr=this.animationThread=null;this.animationOn=!1;this.lastFrameDelayMs=this.firstFrameDelayMs=this.animationFps=0;this.bsVisibleModels=null;this.animationReplayMode=1073742070;this.animationFrames=this.bsDisplay=null;this.animationPaused=
this.isMovie=!1;this.morphCount=this.caf=this.cmi=0;this.currentDirection=this.animationDirection=1;this.frameStep=this.lastFrameIndex=this.firstFrameIndex=0;this.backgroundModelIndex=-1;this.firstFrameDelay=this.currentMorphModel=0;this.lastFrameDelay=1;this.intAnimThread=this.lastModelPainted=this.lastFramePainted=0;this.cai=-1;this.splitFrame=!1;this.splitFrameOffsetX=0;this.currentSplitFrame=-1;S("JV.AnimationManager.SplitFrame")||JV.AnimationManager.$AnimationManager$SplitFrame$();this.splitFrames=
null;v(this,arguments)},JV,"AnimationManager",null);P(b,function(){this.bsVisibleModels=new JU.BS});A(b,function(a){this.vwr=a},"JV.Viewer");c(b,"setAnimationOn",function(a){a!=this.animationOn&&(!a||this.vwr.headless?this.stopThread(!1):(this.vwr.tm.spinOn||this.vwr.refresh(3,"Anim:setAnimationOn"),this.setAnimationRange(-1,-1),this.resumeAnimation()))},"~B");c(b,"stopThread",function(a){var b=!1;null!=this.animationThread&&(this.animationThread.interrupt(),this.animationThread=null,b=!0);this.animationPaused=
a;b&&!this.vwr.tm.spinOn&&this.vwr.refresh(3,"Viewer:setAnimationOff");this.animation(!1);this.vwr.setStatusFrameChanged(!1,!1)},"~B");c(b,"setAnimationNext",function(){return this.setAnimationRelative(this.animationDirection)});c(b,"currentIsLast",function(){return this.isMovie?this.lastFramePainted==this.caf:this.lastModelPainted==this.cmi});c(b,"currentFrameIs",function(a){var b=this.cmi;return 0==this.morphCount?b==a:0.001>Math.abs(this.currentMorphModel-a)},"~N");c(b,"clear",function(){this.setMovie(null);
this.initializePointers(0);this.setAnimationOn(!1);this.setModel(0,!0);this.currentDirection=1;this.cai=-1;this.setAnimationDirection(1);this.setAnimationFps(10);this.setAnimationReplayMode(1073742070,0,0);this.initializePointers(0);this.setSplitFrame(-1,-1)});c(b,"getModelSpecial",function(a){switch(a){case -1:if(null!=this.animationFrames)return"1";a=this.firstFrameIndex;break;case 0:if(0<this.morphCount)return"-"+(1+this.currentMorphModel);a=this.cmi;break;case 1:if(null!=this.animationFrames)return""+
this.animationFrames.length;a=this.lastFrameIndex}return this.vwr.getModelNumberDotted(a)},"~N");c(b,"setDisplay",function(a){this.bsDisplay=null==a||a.isEmpty()?null:JU.BSUtil.copy(a)},"JU.BS");c(b,"setMorphCount",function(a){this.morphCount=this.isMovie?0:a},"~N");c(b,"morph",function(a){var b=D(a);0.001>Math.abs(b-a)?a=b:0.999<Math.abs(b-a)&&(a=b+=1);a-=b;b-=1;if(0==a)this.currentMorphModel=b,this.setModel(b,!0);else{var c;this.setModel(b,!0);c=b+1;this.currentMorphModel=b+a;c==b||(0>c||0>b)||
this.vwr.ms.morphTrajectories(b,c,a)}},"~N");c(b,"setModel",function(a,b){0>a&&this.stopThread(!1);var c=this.cmi,l=this.vwr.ms,e=null==l?0:l.mc;if(1==e)this.cmi=a=0;else if(0>a||a>=e)a=-1;var l=null,f=!1;if(this.cmi!=a){if(0<e){var e=this.vwr.ms,h=e.isJmolDataFrame(a),k=e.isJmolDataFrame(this.cmi);-1!=this.cmi&&this.vwr.saveModelOrientation(this.cmi);if(k||h)l=e.getJmolFrameType(a)+" "+a+" <--  "+this.cmi+" "+e.getJmolFrameType(this.cmi),f=e.getJmolDataSourceFrame(a)==e.getJmolDataSourceFrame(this.cmi)}this.cmi=
a;null!=l&&(0<=a&&this.vwr.restoreModelOrientation(a),f&&(0<=l.indexOf("quaternion")||0<=l.indexOf("spin")||0>l.indexOf("plot")&&0>l.indexOf("ramachandran")&&0>l.indexOf(" property "))&&this.vwr.restoreModelRotationOnly(c))}this.setViewer(b)},"~N,~B");c(b,"setBackgroundModelIndex",function(a){var b=this.vwr.ms;if(null==b||0>a||a>=b.mc)a=-1;this.backgroundModelIndex=a;0<=a&&this.vwr.ms.setTrajectory(a);this.vwr.setTainted(!0);this.setFrameRangeVisible()},"~N");c(b,"initializePointers",function(a){this.firstFrameIndex=
0;this.lastFrameIndex=(0==a?0:this.getFrameCount())-1;this.frameStep=a;this.vwr.setFrameVariables()},"~N");c(b,"setAnimationDirection",function(a){this.animationDirection=a},"~N");c(b,"setAnimationFps",function(a){1>a&&(a=1);50<a&&(a=50);this.animationFps=a;this.vwr.setFrameVariables()},"~N");c(b,"setAnimationReplayMode",function(a,b,c){this.firstFrameDelay=0<b?b:0;this.firstFrameDelayMs=D(1E3*this.firstFrameDelay);this.lastFrameDelay=0<c?c:0;this.lastFrameDelayMs=D(1E3*this.lastFrameDelay);this.animationReplayMode=
a;this.vwr.setFrameVariables()},"~N,~N,~N");c(b,"setAnimationRange",function(a,b){var c=this.getFrameCount();0>a&&(a=0);0>b&&(b=c);a>=c&&(a=c-1);b>=c&&(b=c-1);this.currentMorphModel=this.firstFrameIndex=a;this.lastFrameIndex=b;this.frameStep=b<a?-1:1;this.rewindAnimation()},"~N,~N");c(b,"pauseAnimation",function(){this.stopThread(!0)});c(b,"reverseAnimation",function(){this.currentDirection=-this.currentDirection;this.animationOn||this.resumeAnimation()});c(b,"repaintDone",function(){this.lastModelPainted=
this.cmi;this.lastFramePainted=this.caf});c(b,"resumeAnimation",function(){0>this.cmi&&this.setAnimationRange(this.firstFrameIndex,this.lastFrameIndex);1>=this.getFrameCount()?this.animation(!1):(this.animation(!0),this.animationPaused=!1,null==this.animationThread&&(this.intAnimThread++,this.animationThread=J.api.Interface.getOption("thread.AnimationThread",this.vwr,"script"),this.animationThread.setManager(this,this.vwr,F(-1,[this.firstFrameIndex,this.lastFrameIndex,this.intAnimThread])),this.animationThread.start()))});
c(b,"setAnimationLast",function(){this.setFrame(0<this.animationDirection?this.lastFrameIndex:this.firstFrameIndex)});c(b,"rewindAnimation",function(){this.setFrame(0<this.animationDirection?this.firstFrameIndex:this.lastFrameIndex);this.currentDirection=1;this.vwr.setFrameVariables()});c(b,"setAnimationPrevious",function(){return this.setAnimationRelative(-this.animationDirection)});c(b,"getAnimRunTimeSeconds",function(){var a=this.getFrameCount();if(this.firstFrameIndex==this.lastFrameIndex||0>
this.lastFrameIndex||0>this.firstFrameIndex||this.lastFrameIndex>=a||this.firstFrameIndex>=a)return 0;for(var b=Math.min(this.firstFrameIndex,this.lastFrameIndex),a=Math.max(this.firstFrameIndex,this.lastFrameIndex),c=1*(a-b)/this.animationFps+this.firstFrameDelay+this.lastFrameDelay;b<=a;b++)c+=this.vwr.ms.getFrameDelayMs(this.modelIndexForFrame(b))/1E3;return c});c(b,"setMovie",function(a){if(this.isMovie=null!=a&&null==a.get("scripts")){this.animationFrames=a.get("frames");if(null==this.animationFrames||
0==this.animationFrames.length)this.isMovie=!1;else if(this.caf=a.get("currentFrame").intValue(),0>this.caf||this.caf>=this.animationFrames.length)this.caf=0;this.setFrame(this.caf)}this.isMovie||(this.animationFrames=null);this.vwr.setBooleanProperty("_ismovie",this.isMovie);this.bsDisplay=null;this.currentMorphModel=this.morphCount=0;this.vwr.setFrameVariables()},"java.util.Map");c(b,"modelIndexForFrame",function(a){return this.isMovie?this.animationFrames[a]-1:a},"~N");c(b,"getFrameCount",function(){return this.isMovie?
this.animationFrames.length:this.vwr.ms.mc});c(b,"setFrame",function(a){try{if(this.isMovie){var b=this.modelIndexForFrame(a);this.caf=a;a=b}else this.caf=a;this.setModel(a,!0)}catch(c){if(!H(c,Exception))throw c;}},"~N");c(b,"getUnitCellAtomIndex",function(){return this.cai});c(b,"setUnitCellAtomIndex",function(a){this.cai=a},"~N");c(b,"setViewer",function(a){this.vwr.ms.setTrajectory(this.cmi);this.vwr.tm.setFrameOffset(this.cmi);-1==this.cmi&&a&&this.setBackgroundModelIndex(-1);this.vwr.setTainted(!0);
a=this.setFrameRangeVisible();1!=this.vwr.tm.splitFrameCurrentlyRendering&&this.vwr.setStatusFrameChanged(!1,!1);this.vwr.g.selectAllModels||this.setSelectAllSubset(2>a)},"~B");c(b,"setSelectAllSubset",function(a){null!=this.vwr.ms&&this.vwr.slm.setSelectionSubset(a?this.vwr.ms.getModelAtomBitSetIncludingDeleted(this.cmi,!0):this.vwr.ms.getModelAtomBitSetIncludingDeletedBs(this.bsVisibleModels))},"~B");c(b,"setFrameRangeVisible",function(){var a=0;this.bsVisibleModels.clearAll();0<=this.backgroundModelIndex&&
(this.bsVisibleModels.set(this.backgroundModelIndex),a=1);if(0<=this.cmi)return this.bsVisibleModels.set(this.cmi),++a;if(0==this.frameStep)return a;for(var b=0,a=0,c=this.firstFrameIndex;c!=this.lastFrameIndex;c+=this.frameStep){var l=this.modelIndexForFrame(c);this.vwr.ms.isJmolDataFrame(l)||(this.bsVisibleModels.set(l),a++,b=c)}l=this.modelIndexForFrame(this.lastFrameIndex);if(this.firstFrameIndex==this.lastFrameIndex||!this.vwr.ms.isJmolDataFrame(l)||0==a)this.bsVisibleModels.set(l),0==a&&(this.firstFrameIndex=
this.lastFrameIndex),a=0;1==a&&0>this.cmi&&this.setFrame(b);return a});c(b,"animation",function(a){this.animationOn=a;this.vwr.setBooleanProperty("_animating",a)},"~B");c(b,"setAnimationRelative",function(a){a=this.getFrameStep(a);var b=(this.isMovie?this.caf:this.cmi)+a,c=0,l=0,e;0<this.morphCount?(c=1/(this.morphCount+1),l=this.currentMorphModel+a*c,e=this.isNotInRange(l)):e=this.isNotInRange(b);if(e)switch(this.animationReplayMode){case 1073742070:return!1;case 528411:l=b=this.animationDirection==
this.currentDirection?this.firstFrameIndex:this.lastFrameIndex;break;case 1073742082:this.currentDirection=-this.currentDirection,b-=2*a,l-=2*a*c}if(1>this.morphCount){if(0>b||b>=this.getFrameCount())return!1;this.setFrame(b);return!0}this.morph(l+1);return!0},"~N");c(b,"isNotInRange",function(a){var b=a-0.001;return b>this.firstFrameIndex&&b>this.lastFrameIndex||(b=a+0.001)<this.firstFrameIndex&&b<this.lastFrameIndex},"~N");c(b,"getFrameStep",function(a){return this.frameStep*a*this.currentDirection},
"~N");c(b,"setSplitFrameOffsetX",function(a){this.splitFrames[1].offsetX=a},"~N");c(b,"setSplitFrame",function(a,b){this.splitFrames=(this.splitFrame=0<=a&&0<=b)?x(-1,[U(JV.AnimationManager.SplitFrame,this,null,0,a),U(JV.AnimationManager.SplitFrame,this,null,1,b)]):null},"~N,~N");c(b,"getSplitFrameModelIndex",function(a){return null==this.splitFrames?-1:this.splitFrames[a].modelIndex},"~N");c(b,"setSplitFrameMouse",function(a){if(!this.splitFrame)return this.currentSplitFrame=-1,a;this.currentSplitFrame=
a>=this.splitFrames[1].offsetX?1:0;return a-this.splitFrames[this.currentSplitFrame].offsetX},"~N");c(b,"getSplitFrameModel",function(){return 0>this.currentSplitFrame?this.cmi:this.splitFrames[this.currentSplitFrame].modelIndex});c(b,"isSplitFrameSelectable",function(a){var b=this.getSplitFrameModel();return 0>b||b==this.vwr.ms.at[a].mi},"~N");c(b,"getSplitFrameAtoms",function(a){return 0>this.currentSplitFrame?null:this.vwr.getModelUndeletedAtomsBitSet(this.splitFrames[a?this.currentSplitFrame:
1-this.currentSplitFrame].modelIndex)},"~B");c(b,"getCurrentSplitModelIndex",function(){return 0>this.currentSplitFrame?this.cmi:this.splitFrames[this.currentSplitFrame].modelIndex});c(b,"getSplitFrameModels",function(){if(!this.splitFrame)return null;var a=new JU.BS;a.set(this.splitFrames[0].modelIndex);a.set(this.splitFrames[1].modelIndex);this.bsVisibleModels.clearAll();this.bsVisibleModels.or(a);return a});b.$AnimationManager$SplitFrame$=function(){var a=n(function(){X(this,arguments);this.offsetX=
this.modelIndex=this.index=0;v(this,arguments)},JV.AnimationManager,"SplitFrame",null);A(a,function(a,b){this.index=a;this.modelIndex=b},"~N,~N")}});s("JV.binding");B(["java.util.Hashtable"],"JV.binding.Binding","java.util.Arrays JU.AU $.Lst $.PT $.SB J.api.Interface JU.Escape $.Logger".split(" "),function(){var b=n(function(){this.bindings=this.name=null;v(this,arguments)},JV.binding,"Binding",null);P(b,function(){this.bindings=new java.util.Hashtable});A(b,function(){});b.getMouseAction=c(b,"getMouseAction",
function(a,b,c){2<a&&(a=2);switch(a){case 0:break;case 1:a=256;break;default:a=512}switch(c){case 4:c=4096;break;case 1:c=8192;break;case 5:c=16384;break;case 2:c=32768;break;case 3:c=32}return b&63|a|c},"~N,~N,~N");b.getMouseActionStr=c(b,"getMouseActionStr",function(a){if(null==a)return 0;var b=0;a=a.toUpperCase();b=0<=a.indexOf("MIDDLE")?8:0<=a.indexOf("RIGHT")?4:0<=a.indexOf("WHEEL")?32:16;0<=a.indexOf("DOWN")?b|=4096:0<=a.indexOf("DRAG")?b|=8192:0<=a.indexOf("UP")?b|=16384:32!=b&&(b|=32768);
32!=b&&0<=a.indexOf("DOUBLE")?b|=512:0<b&&(b|=256);288!=b&&0<=a.indexOf("ALT")&&(b|=8);0<=a.indexOf("CTRL")&&(b|=2);0<=a.indexOf("SHIFT")&&(b|=1);return b},"~S");b.getButtonMods=c(b,"getButtonMods",function(a){return a&63},"~N");b.getClickCount=c(b,"getClickCount",function(a){return(a&768)>>8},"~N");b.getMouseActionName=c(b,"getMouseActionName",function(a,b){var c=new JU.SB;if(0==a)return"";var l=JV.binding.Binding.includes(a,8)&&!JV.binding.Binding.includes(a,16)&&!JV.binding.Binding.includes(a,
4),e="      ".toCharArray();JV.binding.Binding.includes(a,2)&&(c.append("CTRL+"),e[5]="C");!l&&JV.binding.Binding.includes(a,8)&&(c.append("ALT+"),e[4]="A");JV.binding.Binding.includes(a,1)&&(c.append("SHIFT+"),e[3]="S");JV.binding.Binding.includes(a,16)?(e[2]="L",c.append("LEFT")):JV.binding.Binding.includes(a,4)?(e[2]="R",c.append("RIGHT")):l?(e[2]="M",c.append("MIDDLE")):JV.binding.Binding.includes(a,32)&&(e[2]="W",c.append("WHEEL"));JV.binding.Binding.includes(a,512)&&(c.append("+double"),e[1]=
"2");JV.binding.Binding.includes(a,4096)?(c.append("+down"),e[0]="1"):JV.binding.Binding.includes(a,8192)?(c.append("+drag"),e[0]="2"):JV.binding.Binding.includes(a,16384)?(c.append("+up"),e[0]="3"):JV.binding.Binding.includes(a,32768)&&(c.append("+click"),e[0]="4");return b?String.instantialize(e)+":"+c.toString():c.toString()},"~N,~B");c(b,"getBindings",function(){return this.bindings});c(b,"bindAction",function(a,b){this.addBinding(a+"\t"+b,F(-1,[a,b]))},"~N,~N");c(b,"bindName",function(a,b){this.addBinding(a+
"\t",Boolean.TRUE);this.addBinding(a+"\t"+b,x(-1,[JV.binding.Binding.getMouseActionName(a,!1),b]))},"~N,~S");c(b,"unbindAction",function(a,b){0==a?this.unbindJmolAction(b):this.removeBinding(null,a+"\t"+b)},"~N,~N");c(b,"unbindName",function(a,b){null==b?this.unbindMouseAction(a):this.removeBinding(null,a+"\t"+b)},"~N,~S");c(b,"unbindJmolAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var c=b.next();c.endsWith(a)&&this.removeBinding(b,c)}},"~N");c(b,"addBinding",
function(a,b){JU.Logger.debugging&&JU.Logger.debug("adding binding "+a+"\t==\t"+JU.Escape.e(b));this.bindings.put(a,b)},"~S,~O");c(b,"removeBinding",function(a,b){JU.Logger.debugging&&JU.Logger.debug("removing binding "+b);null==a?this.bindings.remove(b):a.remove()},"java.util.Iterator,~S");c(b,"unbindUserAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var c=b.next();c.endsWith(a)&&this.removeBinding(b,c)}},"~S");c(b,"unbindMouseAction",function(a){var b=this.bindings.keySet().iterator();
for(a+="\t";b.hasNext();){var c=b.next();c.startsWith(a)&&this.removeBinding(b,c)}},"~N");c(b,"isBound",function(a,b){return this.bindings.containsKey(a+"\t"+b)},"~N,~N");c(b,"isUserAction",function(a){return this.bindings.containsKey(a+"\t")},"~N");c(b,"getBindingInfo",function(a,b,c){var l=new JU.SB;c=null==c||c.equalsIgnoreCase("all")?null:c.toLowerCase();for(var e=Array(a.length),f=new JU.Lst,h,k=this.bindings.values().iterator();k.hasNext()&&((h=k.next())||1);)if(!y(h,Boolean))if(JU.AU.isAS(h)){var j=
h[0],n=h[1];(null==c||0<=c.indexOf("user")||0<=j.indexOf(c)||0<=n.indexOf(c))&&f.addLast(h)}else n=h,j=n[1],null==e[j]&&(e[j]=new JU.Lst),n=JV.binding.Binding.getMouseActionName(n[0],!0),(null==c||0<=(b[j]+";"+a[j]+";"+n).toLowerCase().indexOf(c))&&e[j].addLast(n);for(j=0;j<a.length;j++){var p;null==e[j]||0==(p=e[j].size())||this.addInfo(l,e[j].toArray(Array(p)),b[j],a[j])}for(j=0;j<f.size();j++)n=f.get(j),this.addInfo(l,x(-1,["USER:::"+n[0]]),"user-defined",n[1]);return l.toString()},"~A,~A,~S");
c(b,"addInfo",function(a,b,c,l){java.util.Arrays.sort(b);JU.PT.leftJustify(a,"                      ",c);a.append("\t");c="";for(var e=a.length(),f=0;f<b.length;f++)a.append(c).append(b[f].substring(7)),c=", ";e=a.length()-e;20>e&&a.append("                 ".substring(0,20-e));a.append("\t").append(l).appendC("\n")},"JU.SB,~A,~S,~S");b.includes=c(b,"includes",function(a,b){return(a&b)==b},"~N,~N");b.newBinding=c(b,"newBinding",function(a,b){return J.api.Interface.getInterface("JV.binding."+b+"Binding",
a,"script")},"JV.Viewer,~S")});s("JV.binding");B(["JV.binding.JmolBinding"],"JV.binding.DragBinding",null,function(){var b=I(JV.binding,"DragBinding",JV.binding.JmolBinding);A(b,function(){M(this,JV.binding.DragBinding,[]);this.set("drag")});j(b,"setSelectBindings",function(){this.bindAction(33040,30);this.bindAction(33041,35);this.bindAction(33048,34);this.bindAction(33049,32);this.bindAction(4368,31);this.bindAction(8464,13);this.bindAction(33040,17)})});s("JV.binding");B(["JV.binding.Binding"],
"JV.binding.JmolBinding",null,function(){var b=I(JV.binding,"JmolBinding",JV.binding.Binding);A(b,function(){M(this,JV.binding.JmolBinding,[]);this.set("toggle")});c(b,"set",function(a){this.name=a;this.setGeneralBindings();this.setSelectBindings()},"~S");c(b,"setSelectBindings",function(){this.bindAction(33296,30);this.bindAction(33040,36)});c(b,"setGeneralBindings",function(){this.bindAction(8474,45);this.bindAction(8454,45);this.bindAction(8721,45);this.bindAction(8712,45);this.bindAction(8464,
25);this.bindAction(8720,25);this.bindAction(8472,28);this.bindAction(8453,28);this.bindAction(8465,29);this.bindAction(8456,29);this.bindAction(288,46);this.bindAction(8464,40);this.bindAction(8464,16);this.bindAction(4370,23);this.bindAction(4356,23);this.bindAction(33040,2);this.bindAction(8467,38);this.bindAction(8723,6);this.bindAction(8475,39);this.bindAction(290,46);this.bindAction(289,46);this.bindAction(291,46);this.bindAction(290,38);this.bindAction(289,6);this.bindAction(291,39);this.bindAction(8464,
44);this.bindAction(8464,41);this.bindAction(8465,42);this.bindAction(8473,13);this.bindAction(8465,14);this.bindAction(8472,27);this.bindAction(8465,26);this.bindAction(8464,10);this.bindAction(8472,9);this.bindAction(8465,8);this.bindAction(33297,24);this.bindAction(33288,24);this.bindAction(33296,43);this.bindAction(8464,7);this.bindAction(8464,11);this.bindAction(8464,12);this.bindAction(33040,17);this.bindAction(33040,22);this.bindAction(33040,19);this.bindAction(33040,20);this.bindAction(33296,
37);this.bindAction(33040,18);this.bindAction(33043,21);this.bindAction(33040,4);this.bindAction(33040,5);this.bindAction(33040,3);this.bindAction(33040,0);this.bindAction(33043,1)})});s("JV");B(null,"JV.ColorManager","JU.AU J.c.PAL JU.C $.ColorEncoder $.Elements $.Logger JV.JC".split(" "),function(){var b=n(function(){this.colorData=this.altArgbsCpk=this.argbsCpk=this.g3d=this.vwr=this.ce=null;this.isDefaultColorRasmol=!1;this.colixRubberband=22;this.colixBackgroundContrast=0;v(this,arguments)},
JV,"ColorManager",null);A(b,function(a,b){this.vwr=a;this.ce=new JU.ColorEncoder(null,a);this.g3d=b;this.argbsCpk=J.c.PAL.argbsCpk;this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1)},"JV.Viewer,JU.GData");c(b,"setDefaultColors",function(a){a?(this.isDefaultColorRasmol=!0,this.argbsCpk=JU.AU.arrayCopyI(JU.ColorEncoder.getRasmolScale(),-1)):(this.isDefaultColorRasmol=!1,this.argbsCpk=J.c.PAL.argbsCpk);this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1);this.ce.createColorScheme(a?
"Rasmol=":"Jmol=",!0,!0);for(a=J.c.PAL.argbsCpk.length;0<=--a;)this.g3d.changeColixArgb(a,this.argbsCpk[a]);for(a=JV.JC.altArgbsCpk.length;0<=--a;)this.g3d.changeColixArgb(JU.Elements.elementNumberMax+a,this.altArgbsCpk[a])},"~B");c(b,"setRubberbandArgb",function(a){this.colixRubberband=0==a?0:JU.C.getColix(a)},"~N");c(b,"setColixBackgroundContrast",function(a){this.colixBackgroundContrast=JU.C.getBgContrast(a)},"~N");c(b,"getColixBondPalette",function(a,b){switch(b){case 20:return this.ce.getColorIndexFromPalette(a.getEnergy(),
-2.5,-0.5,7,!1)}return 10},"JM.Bond,~N");c(b,"getColixAtomPalette",function(a,b){var c=0,l;l=this.vwr.ms;switch(b){case 85:return null==this.colorData||a.i>=this.colorData.length||Float.isNaN(this.colorData[a.i])?12:this.ce.getColorIndex(this.colorData[a.i]);case 0:case 1:var c=this.argbsCpk,e=l=a.getAtomicAndIsotopeNumber();e>=JU.Elements.elementNumberMax&&(l=JU.Elements.altElementIndexFromNumber(e),0<l?(e=l,l+=JU.Elements.elementNumberMax,c=this.altArgbsCpk):e=l=JU.Elements.getElementNumber(e));
return this.g3d.getChangeableColix(l,c[e]);case 2:return l=JU.ColorEncoder.quantize4(a.getPartialCharge(),-1,1,JV.JC.PARTIAL_CHARGE_RANGE_SIZE),this.g3d.getChangeableColix(JV.JC.PARTIAL_CHARGE_COLIX_RED+l,JV.JC.argbsRwbScale[l]);case 3:return l=a.getFormalCharge()- -4,this.g3d.getChangeableColix(JV.JC.FORMAL_CHARGE_COLIX_RED+l,JV.JC.argbsFormalCharge[l]);case 68:case 5:return 68==b?(l=this.vwr.ms.getBfactor100Lo(),c=this.vwr.ms.getBfactor100Hi()):(l=0,c=1E4),this.ce.getColorIndexFromPalette(a.getBfactor100(),
l,c,7,!1);case 87:return this.ce.getColorIndexFromPalette(a.group.getGroupParameter(1111490574),-1,1,7,!1);case 70:return c=this.vwr.ms.getSurfaceDistanceMax(),this.ce.getColorIndexFromPalette(a.getSurfaceDistance100(),0,c,7,!1);case 25:return l=a.group.groupID,42<=l&&(l=24+"PGCATU".indexOf(Character.toUpperCase(a.group.group1))-1),this.ce.getColorIndexFromPalette(l,0,0,17,!1);case 9:return this.ce.getColorIndexFromPalette(a.group.groupID,0,0,5,!1);case 10:return this.ce.getColorIndexFromPalette(a.group.groupID,
0,0,4,!1);case 76:return this.ce.getColorIndexFromPalette(a.group.selectedIndex,0,a.group.chain.selectedGroupCount-1,1,!1);case 88:return l=this.vwr.ms.am[a.mi],this.ce.getColorIndexFromPalette(a.group.getBioPolymerIndexInModel(),0,(l.isBioModel?l.getBioPolymerCount():0)-1,1,!1);case 77:return this.ce.getColorIndexFromPalette(a.group.getSelectedMonomerIndex(),0,a.group.getSelectedMonomerCount()-1,1,!1);case 78:return this.ce.getColorIndexFromPalette(l.getMoleculeIndex(a.i,!0),0,l.getMoleculeCountInModel(a.mi)-
1,0,!1);case 15:return c=a.mi,this.ce.getColorIndexFromPalette(l.getAltLocIndexInModel(c,a.altloc),0,l.getAltLocCountInModel(c),0,!1);case 16:return c=a.mi,this.ce.getColorIndexFromPalette(l.getInsertionCodeIndexInModel(c,a.group.getInsertionCode()),0,l.getInsertionCountInModel(c),0,!1);case 17:l=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(l,1073741991);break;case 18:l=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(l,1073742116);break;case 7:c=a.group.getBioStructureSubType(1111490651).getColor();
break;case 11:l=a.getChainID(),null==JU.ColorEncoder.argbsChainAtom&&(JU.ColorEncoder.argbsChainAtom=this.getArgbs(1153433601),JU.ColorEncoder.argbsChainHetero=this.getArgbs(1612709894)),l=((0>l?0:256<=l?l-256:l)&31)%JU.ColorEncoder.argbsChainAtom.length,c=(a.isHetero()?JU.ColorEncoder.argbsChainHetero:JU.ColorEncoder.argbsChainAtom)[l]}return 0==c?22:JU.C.getColix(c)},"JM.Atom,~N");c(b,"getArgbs",function(a){return this.vwr.getJBR().getArgbs(a)},"~N");c(b,"getJmolOrRasmolArgb",function(a,b){switch(b){case 1073741991:if(a>=
JU.Elements.elementNumberMax)break;return this.ce.getArgbFromPalette(a,0,0,2);case 1073742116:if(a>=JU.Elements.elementNumberMax)break;return this.ce.getArgbFromPalette(a,0,0,3);default:return b}return JV.JC.altArgbsCpk[JU.Elements.altElementIndexFromNumber(a)]},"~N,~N");c(b,"getElementColix",function(a){var b=this.argbsCpk;if(a>JU.Elements.elementNumberMax){var c=JU.Elements.altElementIndexFromNumber(a);0<c?(a=c,b=this.altArgbsCpk):a=JU.Elements.getElementNumber(a)}return JU.C.getColix(b[a])},"~N");
c(b,"setElementArgb",function(a,b){if(!(1073741991==b&&this.argbsCpk===J.c.PAL.argbsCpk)){b=this.getJmolOrRasmolArgb(a,b);this.argbsCpk===J.c.PAL.argbsCpk&&(this.argbsCpk=JU.AU.arrayCopyRangeI(J.c.PAL.argbsCpk,0,-1),this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1));var c=a;c<JU.Elements.elementNumberMax?this.argbsCpk[c]=b:(c=JU.Elements.altElementIndexFromNumber(a),this.altArgbsCpk[c]=b,c+=JU.Elements.elementNumberMax);this.g3d.changeColixArgb(c,b);this.vwr.setModelkitPropertySafely("updatemodelkeys",
null)}},"~N,~N");c(b,"getPropertyColorRange",function(){return this.ce.isReversed?L(-1,[this.ce.hi,this.ce.lo]):L(-1,[this.ce.lo,this.ce.hi])});c(b,"setPropertyColorRangeData",function(a,b){this.colorData=a;this.ce.currentPalette=this.ce.createColorScheme(this.vwr.g.propertyColorScheme,!0,!1);this.ce.hi=-3.4028235E38;this.ce.lo=3.4028235E38;if(null!=a){for(var c=null==b,l,e=c?a.length-1:b.nextSetBit(0);0<=e;e=c?e-1:b.nextSetBit(e+1))if(!(e>=a.length||Float.isNaN(l=a[e])))this.ce.hi=Math.max(this.ce.hi,
l),this.ce.lo=Math.min(this.ce.lo,l);this.setPropertyColorRange(this.ce.lo,this.ce.hi)}},"~A,JU.BS");c(b,"setPropertyColorRange",function(a,b){this.ce.setRange(a,b,a>b);JU.Logger.debugging&&JU.Logger.debug('ColorManager: color "'+this.ce.getCurrentColorSchemeName()+'" range '+a+" "+b)},"~N,~N");c(b,"setPropertyColorScheme",function(a,b,c){var l=0==a.length;l&&(a="=");var e=this.getPropertyColorRange();this.ce.currentPalette=this.ce.createColorScheme(a,!0,c);l||this.setPropertyColorRange(e[0],e[1]);
this.ce.isTranslucent=b},"~S,~B,~B");c(b,"getColorSchemeList",function(a){a=null==a||0==a.length?this.ce.currentPalette:this.ce.createColorScheme(a,!0,!1);return JU.ColorEncoder.getColorSchemeList(this.ce.getColorSchemeArray(a))},"~S");c(b,"getColorEncoder",function(a){if(null==a||0==a.length)return this.ce;var b=new JU.ColorEncoder(this.ce,this.vwr);b.currentPalette=b.createColorScheme(a,!1,!0);return 2147483647==b.currentPalette?null:b},"~S")});s("JV");B(["javajs.api.BytePoster","java.util.Hashtable"],
"JV.FileManager","java.net.URL $.URLEncoder JU.AU $.Base64 $.LimitedLineReader $.Lst $.OC $.PT $.Rdr $.SB J.adapter.smarter.Resolver J.api.Interface J.i18n.GT J.io.FileReader JU.Escape $.Logger JV.JC $.JmolAsyncException $.Viewer".split(" "),function(){var b=n(function(){this.jzu=this.spartanDoc=this.vwr=null;this.pathForAllFiles="";this.nameAsGiven="zapped";this.lastFullPathName=this.fullPathName=null;this.lastNameAsGiven="zapped";this.staticJmolDataReader=this.spardirCache=this.pngjCache=this.cache=
this.appletProxy=this.appletDocumentBaseURL=this.lastFileType=this.fileName=null;v(this,arguments)},JV,"FileManager",null,javajs.api.BytePoster);P(b,function(){this.cache=new java.util.Hashtable});A(b,function(a){this.vwr=a;this.clear()},"JV.Viewer");c(b,"spartanUtil",function(){return null==this.spartanDoc?this.spartanDoc=J.api.Interface.getInterface("J.adapter.readers.spartan.SpartanUtil",this.vwr,"fm getSpartanUtil()").set(this):this.spartanDoc});c(b,"getJzu",function(){return null==this.jzu?this.jzu=
J.api.Interface.getOption("io.JmolUtil",this.vwr,"file"):this.jzu});c(b,"clear",function(){this.setFileInfo(x(-1,[this.vwr.getZapName()]));this.spardirCache=null});c(b,"setLoadState",function(a){this.vwr.getPreserveState()&&a.put("loadState",this.vwr.g.getLoadState(a))},"java.util.Map");c(b,"getPathForAllFiles",function(){return this.pathForAllFiles});c(b,"setPathForAllFiles",function(a){0<a.length&&(!a.endsWith("/")&&!a.endsWith("|"))&&(a+="/");return this.pathForAllFiles=a},"~S");c(b,"setFileInfo",
function(a){null==a?(this.fullPathName=this.lastFullPathName,this.nameAsGiven=this.lastNameAsGiven):(this.fullPathName=a[0],this.fileName=a[Math.min(1,a.length-1)],this.nameAsGiven=a[Math.min(2,a.length-1)],this.nameAsGiven.equals("zapped")||(this.lastNameAsGiven=this.nameAsGiven,this.lastFullPathName=this.fullPathName))},"~A");c(b,"getFileInfo",function(){return x(-1,[this.fullPathName,this.fileName,this.nameAsGiven])});c(b,"getFullPathName",function(a){var b=null!=this.fullPathName?this.fullPathName:
this.nameAsGiven;return!a||!b.equals("zapped")&&!b.equals("string")?b:null!=this.lastFullPathName?this.lastFullPathName:this.lastNameAsGiven},"~B");c(b,"getLastReadFileType",function(){return this.lastFileType});c(b,"setFileType",function(a){"JmolData".equals(a)||(this.lastFileType=a)},"~S");c(b,"getFileName",function(){return null!=this.fileName?this.fileName:this.nameAsGiven});c(b,"getAppletDocumentBase",function(){return null==this.appletDocumentBaseURL?"":this.appletDocumentBaseURL.toString()});
c(b,"setAppletContext",function(a){try{System.out.println('setting document base to "'+a+'"'),this.appletDocumentBaseURL=0==a.length?null:new java.net.URL(ca("java.net.URL"),a,null)}catch(b){if(H(b,"java.net.MalformedURLException"))System.out.println("error setting document base to "+a);else throw b;}},"~S");c(b,"setAppletProxy",function(a){this.appletProxy=null==a||0==a.length?null:a},"~S");c(b,"createAtomSetCollectionFromFile",function(a,b,c){null==b.get("atomDataOnly")&&this.setLoadState(b);var l=
a,e=a.indexOf("::");0>e&&(a=this.vwr.resolveDatabaseFormat(a));!l.equals(a)&&(0>l.indexOf("/")&&JV.Viewer.hasDatabasePrefix(l))&&b.put("dbName",l);a.endsWith("%2D%")&&(l=b.get("filter"),b.put("filter",(null==l?"":l)+"2D"),a=a.substring(0,a.length-4));l=0<=e?a.substring(e+2):a;e=0<=e?a.substring(0,e):null;JU.Logger.info("\nFileManager.getAtomSetCollectionFromFile("+l+")"+(a.equals(l)?"":" //"+a));var f=this.getClassifiedName(l,!0);if(1==f.length)return f[0];a=f[0];f=f[1];this.setFileType(e);b.put("fullPathName",
(null==e?"":e+"::")+JV.FileManager.fixDOSName(a));this.vwr.getBoolean(603979879)&&this.vwr.getBoolean(603979825)&&this.vwr.getChimeMessenger().update(a);b=new J.io.FileReader(this.vwr,f,a,l,e,null,b,c);b.run();return b.getAtomSetCollection()},"~S,java.util.Map,~B");c(b,"createAtomSetCollectionFromFiles",function(a,b,c){this.setLoadState(b);for(var l=Array(a.length),e=Array(a.length),f=Array(a.length),h=0;h<a.length;h++){var k=a[h].indexOf("::"),j=0<=k?a[h].substring(k+2):a[h],k=0<=k?a[h].substring(0,
k):null,n=this.getClassifiedName(j,!0);if(1==n.length)return n[0];l[h]=n[0];a[h]=JV.FileManager.fixDOSName(n[0]);f[h]=k;e[h]=j}b.put("fullPathNames",l);b.put("fileTypes",f);a=this.newFilesReader(l,e,f,null,b,c);a.run();return a.getAtomSetCollection()},"~A,java.util.Map,~B");c(b,"createAtomSetCollectionFromString",function(a,b,c){this.setLoadState(b);var l=0<=a.indexOf("Viewer.AddHydrogens")?this.getFileInfo():null;b=new J.io.FileReader(this.vwr,"string",null,null,null,a.startsWith(";base64,")?JU.Base64.decodeBase64(a):
JU.Rdr.getBR(a),b,c);b.run();null!=l&&this.setFileInfo(l);!c&&"string"!=typeof b.getAtomSetCollection()&&this.setFileInfo(x(-1,["5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63"===a?"Jmol Model Kit":"string"]));return b.getAtomSetCollection()},"~S,java.util.Map,~B");c(b,"createAtomSeCollectionFromStrings",function(a,b,c,l){if(!c.containsKey("isData")){var e='"'+this.vwr.getDataSeparator()+'"',f='"'+(l?"append":"model")+' inline"',h=new JU.SB;h.append('set dataSeparator "~~~next file~~~";\ndata ').append(f);
for(var k=0;k<a.length;k++)0<k&&h.append("~~~next file~~~"),h.append(a[k]);h.append("end ").append(f).append(";set dataSeparator ").append(e);b.appendSB(h)}this.setLoadState(c);JU.Logger.info("FileManager.getAtomSetCollectionFromStrings(string[])");b=Array(a.length);e=Array(a.length);for(k=0;k<a.length;k++)b[k]="string["+k+"]",e[k]=JV.FileManager.newDataReader(this.vwr,a[k]);a=this.newFilesReader(b,b,null,e,c,l);a.run();return a.getAtomSetCollection()},"~A,JU.SB,java.util.Map,~B");c(b,"createAtomSeCollectionFromArrayData",
function(a,b,c){JU.Logger.info("FileManager.getAtomSetCollectionFromArrayData(Vector)");for(var l=a.size(),e=Array(l),f=Array(l),h=0;h<l;h++)e[h]="String["+h+"]",f[h]=JV.FileManager.newDataReader(this.vwr,a.get(h));a=this.newFilesReader(e,e,null,f,b,c);a.run();return a.getAtomSetCollection()},"JU.Lst,java.util.Map,~B");b.newDataReader=c(b,"newDataReader",function(a,b){var c="string"==typeof b?"String":JU.AU.isAS(b)?"Array":y(b,"JU.Lst")?"List":null;return null==c?null:J.api.Interface.getInterface("JU."+
c+"DataReader",a,"file").setData(b)},"JV.Viewer,~O");c(b,"newFilesReader",function(a,b,c,l,e,f){var h=J.api.Interface.getOption("io.FilesReader",this.vwr,"file");h.set(this,this.vwr,a,b,c,l,e,f);return h},"~A,~A,~A,~A,java.util.Map,~B");c(b,"createAtomSetCollectionFromReader",function(a,b,c,l){a=new J.io.FileReader(this.vwr,b,a,null,null,c,l,!1);a.run();return a.getAtomSetCollection()},"~S,~S,~O,java.util.Map");c(b,"getBufferedInputStream",function(a){a=this.getBufferedReaderOrErrorMessageFromName(a,
Array(2),!0,!0);return y(a,"java.io.BufferedInputStream")?a:null},"~S");c(b,"getBufferedInputStreamOrErrorMessageFromName",function(a,b,c,l,e,f,h){var k=null,j=null;b=(h=h||a.startsWith("cache://"))&&null==e?b=this.getPngjOrDroppedBytes(b,a):null;try{h&&(0<=a.indexOf(".png")&&null==this.pngjCache&&!this.vwr.getBoolean(603979960))&&(this.pngjCache=new java.util.Hashtable);if(null==b){var n=0<=a.indexOf("?POST?_PNGJBIN_"),p=n||0<=a.indexOf("?POST?_PNGJ_");if(0<a.indexOf("?POST?_PNG_")||p){var q=Array(1),
r=this.vwr.getImageAsBytes(p?"PNGJ":"PNG",0,0,-1,q);if(null!=q[0])return q[0];n?(e=r,a=JU.PT.rep(a,"?_","=_")):a=(new JU.SB).append(a).append("=").appendSB(JU.Base64.getBase64(r)).toString()}var u=JU.OC.urlTypeIndex(a),n=0<=u,p=null;if(n&&0<=(u=a.indexOf("?POST?")))p=a.substring(u+6),a=a.substring(0,u);var s=null!=this.appletDocumentBaseURL;if(s||n){s&&(n&&null!=this.appletProxy)&&(a=this.appletProxy+"?url="+this.urlEncode(a));var v=s?new java.net.URL(this.appletDocumentBaseURL,a,null):new java.net.URL(ca("java.net.URL"),
a,null);if(l)return null;a=v.toString();c&&0>a.toLowerCase().indexOf("password")&&JU.Logger.info("FileManager opening url "+a);j=this.vwr.apiPlatform.getURLContents(v,e,p,!1);r=null;if(y(j,"JU.SB")){a=j;if(f&&!JU.Rdr.isBase64(a))return JU.Rdr.getBR(a.toString());r=JU.Rdr.getBytesFromSB(a)}else JU.AU.isAB(j)&&(r=j);null!=r&&(j=JU.Rdr.getBIS(r))}else if(!h||null==(b=this.cacheGet(a,!0)))c&&JU.Logger.info("FileManager opening file "+a),j=this.vwr.apiPlatform.getBufferedFileInputStream(a);if("string"==
typeof j)return j}k=null==b?j:JU.Rdr.getBIS(b);l&&(k.close(),k=null);return k}catch(w){if(H(w,Exception))try{null!=k&&k.close()}catch(x){if(!H(x,"java.io.IOException"))throw x;}else throw w;}return""+w},"~S,~S,~B,~B,~A,~B,~B");b.getBufferedReaderForResource=c(b,"getBufferedReaderForResource",function(a,b,c,l){l=a.vwrOptions.get("codePath")+c+l;if(a.async){a=a.fm.cacheGet(l,!1);if(null==a)throw new JV.JmolAsyncException(l);return JU.Rdr.getBufferedReader(JU.Rdr.getBIS(a),null)}return a.fm.getBufferedReaderOrErrorMessageFromName(l,
x(-1,[null,null]),!1,!0)},"JV.Viewer,Class,~S,~S");c(b,"urlEncode",function(a){try{return java.net.URLEncoder.encode(a,"utf-8")}catch(b){if(H(b,"java.io.UnsupportedEncodingException"))return a;throw b;}},"~S");c(b,"getFullPathNameOrError",function(a,b,c){var l=this.getClassifiedName(JV.JC.fixProtocol(a),!0);if(null==l||null==l[0]||2>l.length)return x(-1,[null,"cannot read file name: "+a]);a=l[0];l=JV.FileManager.fixDOSName(l[0]);a=JU.Rdr.getZipRoot(a);a.endsWith("#_DOCACHE_")&&(a=a.substring(0,a.length-
10));b=this.getBufferedInputStreamOrErrorMessageFromName(a,l,!1,!b,null,!1,!b);c[0]=l;"string"==typeof b&&(c[1]=b);return b},"~S,~B,~A");c(b,"getBufferedReaderOrErrorMessageFromName",function(a,b,c,l){a=JV.JC.fixProtocol(a);var e=this.cacheGet(a,!1),f=JU.AU.isAB(e),h=f?e:null;if(a.startsWith("cache://")){if(null==e)return"cannot read "+a;if(f)h=e;else return JU.Rdr.getBR(e)}e=this.getClassifiedName(a,!0);if(null==e)return"cannot read file name: "+a;null!=b&&(b[0]=JV.FileManager.fixDOSName(e[0]));
return this.getUnzippedReaderOrStreamFromName(e[0],h,!1,c,!1,l,null)},"~S,~A,~B,~B");c(b,"getUnzippedReaderOrStreamFromName",function(a,b,c,l,e,f,h){if(f&&null==b){var k=a.endsWith(".spt")?x(-1,[null,null,null]):0>a.indexOf(".spardir")?null:this.spartanUtil().getFileList(a,e);if(null!=k)return k}a=JV.JC.fixProtocol(a);null==b&&(null!=(b=this.getCachedPngjBytes(a))&&null!=h)&&h.put("sourcePNGJ",Boolean.TRUE);f=a=a.$replace("#_DOCACHE_","");e=null;0<=a.indexOf("|")&&(e=JU.PT.split(a.$replace("\\","/"),
"|"),null==b&&JU.Logger.info("FileManager opening zip "+a),a=e[0]);a=null==b?this.getBufferedInputStreamOrErrorMessageFromName(a,f,!0,!1,null,!l,!0):JU.AU.isAB(b)?JU.Rdr.getBIS(b):b;try{if("string"==typeof a||y(a,"java.io.BufferedReader"))return a;JU.Rdr.isGzipS(a)?a=JU.Rdr.getUnzippedInputStream(this.vwr.getJzt(),a):JU.Rdr.isBZip2S(a)&&(a=JU.Rdr.getUnzippedInputStreamBZip2(this.vwr.getJzt(),a));if(l&&null==e)return a;if(JU.Rdr.isCompoundDocumentS(a)){var j=J.api.Interface.getInterface("JU.CompoundDocument",
this.vwr,"file");j.setDocStream(this.vwr.getJzt(),a);var n=j.getAllDataFiles("Molecule","Input").toString();return l?JU.Rdr.getBIS(n.getBytes()):JU.Rdr.getBR(n)}if(JU.Rdr.isMessagePackS(a)||JU.Rdr.isPickleS(a))return a;a=JU.Rdr.getPngZipStream(a,!0);k=null;if(JU.Rdr.isZipS(a)){if(c)return this.vwr.getJzt().newZipInputStream(a);k=this.vwr.getJzt().getZipFileDirectory(a,e,1,l)}else if(JU.Rdr.isTar(a))k=this.vwr.getJzt().getZipFileDirectory(a,e,1,l);else if(JU.Rdr.isBinary(a,32))return a;if(null!=k){if(!y(k,
"java.io.BufferedInputStream"))return"string"==typeof k?JU.Rdr.getBR(k):k;a=JU.Rdr.getUnzippedInputStream(this.vwr.getJzt(),k)}return l?a:JU.Rdr.getBufferedReader(a,null)}catch(p){if(H(p,Exception))return p.toString();throw p;}},"~S,~O,~B,~B,~B,~B,java.util.Map");c(b,"getZipDirectory",function(a,b,c){a=this.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,c);return this.vwr.getJzt().getZipDirectoryAndClose(a,b?"JmolManifest":null)},"~S,~B,~B");c(b,"getFileAsBytes",function(a,b){if(null==
a)return null;var c=a,l=null;0<=a.indexOf("|")&&(l=JU.PT.split(a,"|"),a=l[0]);var e=null!=l?null:this.getPngjOrDroppedBytes(c,a);if(null==e){c=this.getBufferedInputStreamOrErrorMessageFromName(a,c,!1,!1,null,!1,!0);if("string"==typeof c)return"Error:"+c;try{e=null!=b||null==l||1>=l.length||!JU.Rdr.isZipS(c)&&!JU.Rdr.isPngZipStream(c)&&!JU.Rdr.isTar(c)?JU.Rdr.getStreamAsBytes(c,b):this.vwr.getJzt().getZipFileContentsAsBytes(c,l,1),c.close()}catch(f){if(H(f,Exception))return f.toString();throw f;}}if(null==
b||!JU.AU.isAB(e))return e;b.write(e,0,-1);return e.length+" bytes"},"~S,JU.OC");c(b,"getFileAsMap",function(a,b,c){var l=c?null:new java.util.Hashtable,e;if(null==a){e=Array(1);b=this.vwr.getImageAsBytes(b,-1,-1,-1,e);if(null!=e[0]){if(c)return Q(0,0);l.put("_ERROR_",e[0]);return l}if(c)return b;e=JU.Rdr.getBIS(b)}else{b=Array(2);e=this.getFullPathNameOrError(a,!0,b);if("string"==typeof e){if(c)return Q(0,0);l.put("_ERROR_",e);return l}if(!this.checkSecurity(b[0])){if(c)return Q(0,0);l.put("_ERROR_",
"java.io. Security exception: cannot read file "+b[0]);return l}}try{if(c)return JU.Rdr.streamToBytes(e);this.vwr.getJzt().readFileAsMap(e,l,a)}catch(f){if(H(f,Exception)){if(c)return Q(0,0);l.clear();l.put("_ERROR_",""+f)}else throw f;}return l},"~S,~S,~B");c(b,"getFileDataAsString",function(a,b,c,l,e){a[1]="";var f=a[0];if(null==f)return!1;c=this.getBufferedReaderOrErrorMessageFromName(f,a,!1,c);if("string"==typeof c)return a[1]=c,!1;if(e&&!this.checkSecurity(a[0]))return a[1]="java.io. Security exception: cannot read file "+
a[0],!1;try{if(y(c,"java.io.BufferedInputStream")&&(f.toUpperCase().endsWith(".PNG")||JV.FileManager.isEmbeddable(f)))c=JU.Rdr.getBufferedReader(c,null);return JU.Rdr.readAllAsString(c,b,l,a,1)}catch(h){if(H(h,Exception))return!1;throw h;}},"~A,~N,~B,~B,~B");c(b,"checkSecurity",function(a){if(!a.startsWith("file:"))return!0;var b=a.lastIndexOf("/");return a.lastIndexOf(":/")==b-1||0<=a.indexOf("/.")||a.lastIndexOf(".")<a.lastIndexOf("/")?!1:!0},"~S");c(b,"loadImage",function(a,b,c){var l=null,e=null,
f=null,h=null!=b&&b.startsWith("\u0001");if(h){if(b.equals("\u0001closeall\u0001null"))return this.vwr.loadImageData(Boolean.TRUE,"\u0001closeall","\u0001closeall",null);if("\u0001close".equals(a))return this.vwr.loadImageData(Boolean.FALSE,"\u0001close",b,null)}y(a,"java.util.Map")&&(a=a.containsKey("_DATA_")?a.get("_DATA_"):a.get("_IMAGE_"));y(a,"JS.SV")&&(a=a.value);var k="string"==typeof a?a:null,j=!1;null!=k&&k.startsWith(";base64,")?f=JU.Base64.decodeBase64(k):y(a,"JU.BArray")?f=a.data:JU.AU.isAB(a)?
f=a:null==b||"string"==typeof a?(k=this.getClassifiedName(a,!0),e=null==k?"cannot read file name: "+a:JV.FileManager.fixDOSName(k[0]),null!=k&&(l=this.getImage(e,b,c)),j=null==l):l=a;null!=f&&(l=this.getImage(f,b,!0),j=!1);"string"==typeof l&&(e=l,l=null);!JV.Viewer.isJS&&(null!=l&&null!=f)&&(e=";base64,"+JU.Base64.getBase64(f).toString());return!JV.Viewer.isJS||h&&null==e||!h&&null!=l?this.vwr.loadImageData(l,e,b,null):j},"~O,~S,~B");c(b,"getImage",function(a,b,c){return this.getJzu().getImage(this.vwr,
a,b,c)},"~O,~S,~B");c(b,"getClassifiedName",function(a,b){if(null==a)return x(-1,[null]);var c=0<this.pathForAllFiles.length;if(a.startsWith("?")||a.startsWith("http://?")||a.startsWith("https://?")){if(!JV.Viewer.isJS&&null==(a=this.vwr.dialogAsk("Load",a,null)))return x(-1,[b?"#CANCELED#":null]);c=!1}var l=null,e=null,f=null;if(a.startsWith("cache://"))return f=Array(3),f[0]=f[2]=a,f[1]=JV.FileManager.stripPath(f[0]),f;a=this.vwr.resolveDatabaseFormat(a);if(null==a)return x(-1,[null]);a.startsWith("file:///")&&
9==a.indexOf("|")&&(a=a.substring(0,9)+":"+a.substring(10));0>a.indexOf(":")&&(0!=a.indexOf("/")&&0!=a.indexOf("\\"))&&(a=JV.FileManager.addDirectory(this.vwr.getDefaultDirectory(),a));if(null==this.appletDocumentBaseURL)if(0<=JU.OC.urlTypeIndex(a)||this.vwr.haveAccess(JV.Viewer.ACCESS.NONE)||this.vwr.haveAccess(JV.Viewer.ACCESS.READSPT)&&!a.endsWith(".spt")&&!a.endsWith("/")||!this.vwr.haveAccessInternal(a))try{e=new java.net.URL(ca("java.net.URL"),a,null)}catch(h){if(H(h,"java.net.MalformedURLException"))return x(-1,
[b?h.toString():null]);throw h;}else var l=this.vwr.apiPlatform.newFile(a),f=l.getFullPath(),k=l.getName(),f=x(-1,[null==f?k:f,k,null==f?k:"file:/"+f.$replace("\\","/")]);else try{if(1==a.indexOf(":\\")||1==a.indexOf(":/"))a="file:/"+a;e=new java.net.URL(this.appletDocumentBaseURL,a,null)}catch(j){if(H(j,"java.net.MalformedURLException"))return x(-1,[b?j.toString():null]);throw j;}null!=e&&(f=Array(3),f[0]=f[2]=e.toString(),f[1]=JV.FileManager.stripPath(f[0]));c&&(c=f[0],f[0]=this.pathForAllFiles+
f[1],JU.Logger.info("FileManager substituting "+c+" --\x3e "+f[0]));c=f[0];b&&(JU.OC.isLocal(c)&&!c.startsWith("file:/"))&&(null==l&&(c=JU.PT.trim(c.substring(c.indexOf(":")+1),"/")),l=c.length-f[1].length-1,0<l&&(c=c.substring(0,l).$replace("|",":"),JV.FileManager.setLocalPath(this.vwr,c,!0)));return f},"~S,~B");b.addDirectory=c(b,"addDirectory",function(a,b){if(0==a.length||a.equals("."))return b;var c=0<b.length?b.charAt(0):" ",l=a.toLowerCase();if((l.endsWith(".zip")||l.endsWith(".tar"))&&"|"!=
c&&"/"!=c)a+="|";return a+("/"==c||"/"==c||"|"==(c=a.charAt(a.length-1))||"/"==c?"":"/")+b},"~S,~S");c(b,"getDefaultDirectory",function(a){a=this.getClassifiedName(a,!0);if(null==a)return"";a=JV.FileManager.fixPath(a[0]);return null==a?"":a.substring(0,a.lastIndexOf("/"))},"~S");b.fixPath=c(b,"fixPath",function(a){a=JV.FileManager.fixDOSName(a);a=JU.PT.rep(a,"/./","/");var b=a.lastIndexOf("//")+1;1>b&&(b=a.indexOf(":/")+1);1>b&&(b=a.indexOf("/"));if(0>b)return null;var c=a.substring(0,b);for(a=a.substring(b);0<=
(b=a.lastIndexOf("/../"));){var l=a.substring(0,b).lastIndexOf("/");if(0>l)return JU.PT.rep(c+a,"/../","/");a=a.substring(0,l)+a.substring(b+3)}0==a.length&&(a="/");return c+a},"~S");c(b,"getFilePath",function(a,b,c){a=this.getClassifiedName(a,!1);return null==a||1==a.length?"":c?a[1]:b?a[2]:null==a[0]?"":JV.FileManager.fixDOSName(a[0])},"~S,~B,~B");b.getLocalDirectory=c(b,"getLocalDirectory",function(a,b){var c=a.getP(b?"currentLocalPath":"defaultDirectoryLocal");b&&0==c.length&&(c=a.getP("defaultDirectoryLocal"));
if(0==c.length)return JV.Viewer.isJS?null:a.apiPlatform.newFile(System.getProperty("user.dir","."));a.isApplet&&0==c.indexOf("file:/")&&(c=c.substring(6));c=a.apiPlatform.newFile(c);try{return c.isDirectory()?c:c.getParentAsFile()}catch(l){if(H(l,Exception))return null;throw l;}},"JV.Viewer,~B");b.setLocalPath=c(b,"setLocalPath",function(a,b,c){for(;b.endsWith("/")||b.endsWith("\\");)b=b.substring(0,b.length-1);a.setStringProperty("currentLocalPath",b);c||a.setStringProperty("defaultDirectoryLocal",
b)},"JV.Viewer,~S,~B");b.getLocalPathForWritingFile=c(b,"getLocalPathForWritingFile",function(a,b,c){if(b.startsWith("http://")||b.startsWith("https://"))return b;b=JU.PT.rep(b,"?","");if(0==b.indexOf("file:/"))return a=b.indexOf("|"),5<a&&10>a&&(b=b.substring(0,a)+":"+b.substring(a+1)),a=b.indexOf(":",5),b.substring(0<a?a-1:5);if(0==b.indexOf("/")||0==b.indexOf("\\")||0<=b.indexOf(":"))return b;var l=null;try{l=JV.FileManager.getLocalDirectory(a,c)}catch(e){if(!H(e,Exception))throw e;}return null==
l?b:JV.FileManager.fixPath(l.toString()+"/"+b)},"JV.Viewer,~S,~B");b.fixDOSName=c(b,"fixDOSName",function(a){return 0<=a.indexOf(":\\")?a.$replace("\\","/"):a},"~S");b.stripPath=c(b,"stripPath",function(a){var b=Math.max(a.lastIndexOf("|"),a.lastIndexOf("/"));return a.substring(b+1)},"~S");b.isScriptType=c(b,"isScriptType",function(a){return JU.PT.isOneOf(a.toLowerCase().substring(a.lastIndexOf(".")+1),";pse;spt;png;pngj;jmol;zip;")},"~S");b.determineSurfaceFileType=c(b,"determineSurfaceFileType",
function(a){var b=null;if(y(a,"JU.Rdr.StreamReader")){var c=a.getStream();if(c.markSupported())try{c.mark(300);var l=Q(300,0);c.read(l,0,300);c.reset();if(131==(l[0]&255))return J.adapter.smarter.Resolver.checkBCIF(l,!1)?"BCifDensity":null;if(80==l[0]&&77==l[1]&&1==l[2]&&0==l[3])return"Pmesh";if(77==l[208]&&65==l[209]&&80==l[210])return"Mrc";if(20==l[0]&&0==l[1]&&0==l[2]&&0==l[3])return"DelPhi";if(0==l[36]&&100==l[37])return"Dsn6"}catch(e){if(!H(e,"java.io.IOException"))throw e;}}c=null;try{c=new JU.LimitedLineReader(a,
16E3),b=c.getHeader(0)}catch(f){if(!H(f,Exception))throw f;}if(null==c||null==b||0==b.length)return null;if(0<=b.indexOf("\x00")){if(131==b.charAt(0).charCodeAt(0))return"D"==b.charAt(10)&&"e"==b.charAt(11)&&"n"==b.charAt(12)?"BCifDensity":null;if(0==b.indexOf("PM\u0001\x00"))return"Pmesh";if(208==b.indexOf("MAP "))return"Mrc";if(0==b.indexOf("\u0014\x00\x00\x00"))return"DelPhi";if(37<b.length&&(0==b.charAt(36).charCodeAt(0)&&100==b.charAt(37).charCodeAt(0)||0==b.charAt(36).charCodeAt(0)&&100==b.charAt(37).charCodeAt(0)))return"Dsn6"}switch(b.charAt(0).charCodeAt(0)){case 64:if(0==
b.indexOf("@text"))return"Kinemage";break;case 35:if(0<=b.indexOf(".obj"))return"Obj";if(0<=b.indexOf("MSMS"))return"Msms";if(0<=b.indexOf("Menu"))return"MENU";break;case 60:if(b.startsWith("<?xml")&&0<b.indexOf("<jvxl "))return"JvxlXml";if(0<=b.indexOf("<efvet "))return"Efvet";break;case 38:if(0==b.indexOf("&plot"))return"Jaguar";break;case 13:case 10:if(0<=b.indexOf("ZYX"))return"Xplor"}if(0<=b.indexOf("Here is your gzipped map"))return"UPPSALA"+b;if(b.startsWith("data_SERVER"))return"CifDensity";
if(b.startsWith("4MESHC"))return"Pmesh4";if(0<=b.indexOf("! nspins"))return"CastepDensity";if(0<=b.indexOf("#JVXL+"))return"Jvxl+";if(0<=b.indexOf("#JVXL"))return"Jvxl";if(0<=b.indexOf("#JmolPmesh"))return"Pmesh";if(0<=b.indexOf("#obj")||0<=b.indexOf("#pmesh")||0<=b.indexOf("usemtl"))return"Obj";if(0==b.indexOf("# object with"))return"Nff";if(0<=b.indexOf("PRIMVEC")||0<=b.indexOf("BEGIN_DATAGRID_3D")||0<=b.indexOf("BEGIN_BANDGRID_3D"))return"Xsf";if(0<=b.indexOf("tiles in x, y"))return"Ras3D";if(0<=
b.indexOf(" 0.00000e+00 0.00000e+00      0      0\n"))return"Uhbd";b=c.readLineWithNewline();if(0==b.indexOf("object 1 class gridpositions counts"))return"Apbs";a=JU.PT.getTokens(b);var h=c.readLineWithNewline();if(2==a.length&&(3==JU.PT.parseInt(a[0])&&-2147483648!=JU.PT.parseInt(a[1]))&&(a=JU.PT.getTokens(h),3==a.length&&-2147483648!=JU.PT.parseInt(a[0])&&-2147483648!=JU.PT.parseInt(a[1])&&-2147483648!=JU.PT.parseInt(a[2])))return"PltFormatted";l=c.readLineWithNewline();if(b.startsWith("v ")&&h.startsWith("v ")&&
l.startsWith("v "))return"Obj";h=JU.PT.parseInt(l);if(-2147483648==h)return 0==l.indexOf("+")?"Jvxl+":null;a=JU.PT.getTokens(l);if(0<a[0].indexOf("."))return 60<=l.length||3!=a.length?null:"VaspChgcar";if(0<=h)return 4==a.length||5==a.length&&a[4].equals("1")?"Cube":null;for(a=4+-h;0<=--a;)if(null==(b=c.readLineWithNewline()))return null;b=JU.PT.parseInt(b);return-2147483648==b?null:0>b?"Jvxl":"Cube"},"java.io.BufferedReader");b.getManifestScriptPath=c(b,"getManifestScriptPath",function(a){if(0<=
a.indexOf("$SCRIPT_PATH$"))return"";var b=0<=a.indexOf("\n")?"\n":"\r";if(0<=a.indexOf(".spt")){a=JU.PT.split(a,b);for(b=a.length;0<=--b;)if(0<=a[b].indexOf(".spt"))return"|"+JU.PT.trim(a[b],"\r\n \t")}return null},"~S");b.getFileReferences=c(b,"getFileReferences",function(a,b,c){for(var l=0;l<JV.FileManager.scriptFilePrefixes.length;l++)for(var e=JV.FileManager.scriptFilePrefixes[l],f=-1;0<=(f=a.indexOf(e,f+1));){var h=JU.PT.getQuotedStringAt(a,f);0<=h.indexOf("\\u")&&(h=JU.Escape.unescapeUnicode(h));
b.addLast(h);null!=c&&(0<=h.indexOf("\\u")&&(h=JU.Escape.unescapeUnicode(h)),c.addLast(h))}},"~S,JU.Lst,JU.Lst");b.setScriptFileReferences=c(b,"setScriptFileReferences",function(a,b,c,l){null!=b&&(a=JV.FileManager.setScriptFileRefs(a,b,!0));null!=c&&(a=JV.FileManager.setScriptFileRefs(a,c,!1));a=JU.PT.rep(a,'\u0001"','"');if(null!=l){for(;l.endsWith("/");)l=l.substring(0,l.length-1);for(b=0;b<JV.FileManager.scriptFilePrefixes.length;b++)c=JV.FileManager.scriptFilePrefixes[b],a=JU.PT.rep(a,c+".",c+
l)}return a},"~S,~S,~S,~S");b.setScriptFileRefs=c(b,"setScriptFileRefs",function(a,b,c){if(null==b)return a;var l=0==b.length,e=new JU.Lst;JV.FileManager.getFileReferences(a,e,null);for(var f=new JU.Lst,h=new JU.Lst,k=e.size(),j=0;j<k;j++){var n=e.get(j),p=n,q=p.indexOf("::"),r="";0<=q&&(r=p.substring(q+2),p=p.substring(q+2));c==JU.OC.isLocal(p)&&(q=l?-1:p.indexOf("/"+b+"/"),0<=q?p=p.substring(q+1):(q=p.lastIndexOf("/"),0>q&&!l&&(p="/"+p),(0>q||l)&&q++,p=b+p.substring(q)));p=r+p;JU.Logger.info("FileManager substituting "+
n+" --\x3e "+p);f.addLast('"'+n+'"');h.addLast('\u0001"'+p+'"')}return JU.PT.replaceStrings(a,f,h)},"~S,~S,~B");c(b,"cachePut",function(a,b){a=JV.FileManager.fixDOSName(a);JU.Logger.debugging&&JU.Logger.debug("cachePut "+a);null==b||"".equals(b)?this.cache.remove(a):(this.cache.put(a,b),this.getCachedPngjBytes(a))},"~S,~O");c(b,"cacheGet",function(a,b){a=JV.FileManager.fixDOSName(a);var c=a.indexOf("|");0<=c&&!a.endsWith("##JmolSurfaceInfo##")&&(a=a.substring(0,c));a=this.getFilePath(a,!0,!1);c=null;
(c=Jmol.Cache.get(a))||(c=this.cache.get(a));return b&&"string"==typeof c?null:c},"~S,~B");c(b,"cacheClear",function(){JU.Logger.info("cache cleared");this.cache.clear();null!=this.pngjCache&&(this.pngjCache=null,JU.Logger.info("PNGJ cache cleared"))});c(b,"cacheFileByNameAdd",function(a,b){if(null==a||!b&&a.equalsIgnoreCase(""))return this.cacheClear(),-1;var c;if(b){a=JV.JC.fixProtocol(this.vwr.resolveDatabaseFormat(a));c=this.getFileAsBytes(a,null);if("string"==typeof c)return 0;this.cachePut(a,
c)}else{if(a.endsWith("*"))return JU.AU.removeMapKeys(this.cache,a.substring(0,a.length-1));c=this.cache.remove(JV.FileManager.fixDOSName(a))}return null==c?0:c.length},"~S,~B");c(b,"cacheList",function(){for(var a=new java.util.Hashtable,b,c=this.cache.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)a.put(b.getKey(),Integer.$valueOf(JU.AU.isAB(b.getValue())?b.getValue().length:b.getValue().toString().length));return a});c(b,"getCanonicalName",function(a){var b=this.getClassifiedName(a,!0);
return null==b?a:b[2]},"~S");c(b,"recachePngjBytes",function(a,b){null!=this.pngjCache&&this.pngjCache.containsKey(a)&&(this.pngjCache.put(a,b),JU.Logger.info("PNGJ recaching "+a+" ("+b.length+")"))},"~S,~A");c(b,"getPngjOrDroppedBytes",function(a,b){var c=this.getCachedPngjBytes(a);return null==c?this.cacheGet(b,!0):c},"~S,~S");c(b,"getCachedPngjBytes",function(a){return null==a||null==this.pngjCache||0>a.indexOf(".png")?null:this.getJzu().getCachedPngjBytes(this,a)},"~S");j(b,"postByteArray",function(a,
b){if(a.startsWith("cache://"))return this.cachePut(a,b),"OK "+b.length+"cached";var c=this.getBufferedInputStreamOrErrorMessageFromName(a,null,!1,!1,b,!1,!0);if("string"==typeof c)return c;try{c=JU.Rdr.getStreamAsBytes(c,null)}catch(l){if(H(l,"java.io.IOException"))try{c.close()}catch(e){if(!H(e,"java.io.IOException"))throw e;}else throw l;}return null==c?"":JU.Rdr.fixUTF(c)},"~S,~A");b.isJmolType=c(b,"isJmolType",function(a){return a.equals("PNG")||a.equals("PNGJ")||a.equals("JMOL")||a.equals("ZIP")||
a.equals("ZIPALL")},"~S");b.isEmbeddable=c(b,"isEmbeddable",function(a){var b=a.lastIndexOf(".");0<=b&&(a=a.substring(b+1));a=a.toUpperCase();return JV.FileManager.isJmolType(a)||JU.PT.isOneOf(a,";JPG;JPEG;POV;IDTF;")},"~S");c(b,"getEmbeddedFileState",function(a,b,c){if(!JV.FileManager.isEmbeddable(a))return"";b=this.getZipDirectory(a,!1,b);if(0==b.length)return a=this.vwr.getFileAsString4(a,-1,!1,!0,!1,"file"),0>a.indexOf("**** Jmol Embedded Script ****")?"":JV.FileManager.getEmbeddedScript(a);for(var l=
0;l<b.length;l++)if(0<=b[l].indexOf(c))return a=x(-1,[a+"|"+b[l],null]),this.getFileDataAsString(a,-1,!1,!1,!1),a[1];return""},"~S,~B,~S");b.stripTypePrefix=c(b,"stripTypePrefix",function(a){var b=a.indexOf("::");return 0>b||20<=b?a:a.substring(b+2)},"~S");b.getEmbeddedScript=c(b,"getEmbeddedScript",function(a){if(null==a)return a;var b=a.indexOf("**** Jmol Embedded Script ****");if(0>b)return a;var c=a.lastIndexOf("/*",b),l=a.indexOf(("*"==a.charAt(c+2)?"*":"")+"*/",b);for(0<=c&&l>=b&&(a=a.substring(b+
30,l)+"\n");0<=(c=a.indexOf(" #Jmol...\x00"));)a=a.substring(0,c)+a.substring(c+10+4);JU.Logger.debugging&&JU.Logger.debug(a);return a},"~S");c(b,"isZipStream",function(a){return this.vwr.getJzt().isZipStream(a)},"~O");c(b,"openFileAsync",function(a,b,c){var l=0!=(b&32);!l&&(0!=(b&64)&&JV.FileManager.isEmbeddable(a))&&this.checkResize(a);var e=0!=(b&2),f=0!=(b&8),h=null;a=a.trim().$replace("\\","/");var k=a.startsWith("cache://");this.vwr.isApplet&&0>a.indexOf("://")&&(a="file://"+(a.startsWith("/")?
"":"/")+a);try{if(l)h="script "+JU.PT.esc(a);else if(a.endsWith(".pse"))h=(k?"":"zap;")+"load SYNC "+JU.PT.esc(a)+(this.vwr.isApplet?"":" filter 'DORESIZE'");else{if(a.endsWith(".jvxl"))h="isosurface ";else if(!a.toLowerCase().endsWith(".spt")){null==c?c=this.getDragDropFileTypeName(a):c.endsWith("::")||(c+="::");if(null==c){try{var j=this.vwr.getBufferedInputStream(a);c=JV.FileManager.determineSurfaceFileType(JU.Rdr.getBufferedReader(j,"ISO-8859-1"));if(null==c){h="script "+JU.PT.esc(a);return}}catch(n){if(H(n,
"java.io.IOException"))return;throw n;}h="MENU"===c?"load MENU "+JU.PT.esc(a):"if (_filetype == 'Pdb') { isosurface sigma 1.0 within 2.0 {*} "+JU.PT.esc(a)+" mesh nofill }; else; { isosurface "+JU.PT.esc(a)+"}";return}if(c.equals("spt::")){h="script "+JU.PT.esc(a.startsWith("spt::")?a.substring(5):a);return}if(c.equals("dssr"))h="model {visible} property dssr ";else if(c.equals("Jmol"))h="script ";else if(c.equals("Cube::"))h=0==this.vwr.ms.ac?"load "+JU.PT.esc(a)+";":"",h+="isosurface sign red blue ";
else if(!c.equals("spt")){if(0!=(b&16))switch(b=b&-17|1,0==this.vwr.ms.ac?0:this.vwr.confirm(J.i18n.GT.$("Would you like to replace the current model with the selected model?"),J.i18n.GT.$("Would you like to append?"))){case 2:return;case 0:break;default:b|=4}l=0!=(b&4);b=0!=(b&1)&&!l;if(c.endsWith("::")){var p=c.indexOf("|");0<=p&&(a+=c.substring(p,c.length-2),c="");a=c+a}h=this.vwr.g.defaultDropScript;if(h.equals("zap; load SYNC \"%FILE\";if (%ALLOWCARTOONS && _loadScript == '' && defaultLoadScript == '' && _filetype == 'Pdb') {if ({(protein or nucleic)&*/1.1} && {*/1.1}[1].groupindex != {*/1.1}[0].groupindex){select protein or nucleic;cartoons only;}if ({visible && cartoons > 0}){color structure}else{wireframe -0.1};if (!{visible}){select !visible;wireframe 0.15;color none;select !visible;spacefill 23%};select *}")&&
(!JV.JC.isLikelyPDB(c)||!b))p=h.indexOf("if ("),0<=p&&(h=h.substring(0,p).trim());h=JU.PT.rep(h,"%FILE",a);h=JU.PT.rep(h,"%ALLOWCARTOONS",""+b);if(h.toLowerCase().startsWith("zap")&&(k||l))h=h.substring(3);l&&(h=JU.PT.rep(h,"load SYNC","load append"));return}}null==h&&!e&&this.vwr.scriptEditorVisible?this.vwr.showEditor(x(-1,[a,this.vwr.getFileAsString3(a,!0,null)])):h=(null==h?"script ":h)+JU.PT.esc(a)}}finally{null!=h&&this.vwr.evalString(h+(f?"#!NOAUTOPLAY":""))}},"~S,~N,~S");c(b,"getDragDropFileTypeName",
function(a){var b=a.indexOf("::");if(0<=b)return a.substring(0,b+2);if(a.startsWith("="))return"pdb";if(a.endsWith(".dssr"))return"dssr";var b=this.getUnzippedReaderOrStreamFromName(a,null,!0,!1,!0,!0,null),c=null;if(this.isZipStream(b)){a=this.vwr.getZipDirectoryAsString(a);if(0<=a.indexOf("JmolManifest"))return"Jmol";c=this.getFileTypeName(JU.Rdr.getBR(a))}else if(y(b,"java.io.BufferedReader")||y(b,"java.io.BufferedInputStream"))c=this.getFileTypeName(b);return null!=c?c+"::":JU.AU.isAS(b)?b[0]:
null},"~S");c(b,"checkResize",function(a){try{var b=this.getEmbeddedFileState(a,!1,"state.spt");0<=b.indexOf("preferredWidthHeight")&&this.vwr.sm.resizeInnerPanelString(b)}catch(c){}},"~S");c(b,"getJmolDataReader",function(){null==this.staticJmolDataReader&&(this.staticJmolDataReader=J.adapter.smarter.Resolver.getReader("JmolData",null),this.staticJmolDataReader.vwr=this.vwr);return this.staticJmolDataReader});c(b,"readCifData",function(a,b){var c=null!=a&&0<=a.indexOf("#CIF"),l=null,e=null==a?-1:
a.indexOf(";keys=");0<=e&&(l=a.substring(e+6).$plit(","),a=a.substring(0,e));if(null==b&&null!=a&&0<=a.toUpperCase().indexOf("BCIF")){l=this.getBufferedInputStream(a);try{return J.api.Interface.getInterface("JU.MessagePackReader",this.vwr,"script").getMapForStream(l)}catch(f){if(H(f,Exception))return f.printStackTrace(),new java.util.Hashtable;throw f;}}c=c?a:null==a||0==a.length?this.vwr.getCurrentFileAsString("script"):this.getAsciiFileOrNull(a);if(null==c||2>c.length)return null;c=JU.Rdr.getBR(c);
null==b&&(b=this.getFileTypeName(c));return null==b?null:this.readCifDataKey(c,b,l)},"~S,~S");c(b,"readCifDataKey",function(a,b,c){a=y(a,"java.io.BufferedReader")?a:JU.Rdr.getBR(a);return JU.Rdr.readCifData(J.api.Interface.getInterface("Cif2".equals(b)?"J.adapter.readers.cif.Cif2DataParser":"JU.CifDataParser",this.vwr,"script"),a,c)},"~O,~S,~A");c(b,"getAsciiFileOrNull",function(a){a=x(-1,[a,null]);return this.getFileDataAsString(a,-1,!1,!1,!1)?a[1]:null},"~S");c(b,"getFileTypeName",function(a){return this.vwr.getModelAdapter().getFileTypeName(a)},
"~O");b.SIMULATION_PROTOCOL="http://SIMULATION/";b.scriptFilePrefixes=x(-1,['/*file*/"','FILE0="','FILE1="'])});s("JV");B(["java.util.Hashtable","JU.P3","J.c.CBK"],"JV.GlobalSettings","JU.DF $.PT $.SB J.c.STR JS.SV JU.Escape $.Logger JV.JC $.StateManager $.Viewer".split(" "),function(){var b=n(function(){this.htUserVariables=this.htPropertyFlagsRemoved=this.htBooleanParameterFlags=this.htNonbooleanParameterValues=this.vwr=null;this.zDepth=0;this.zShadePower=3;this.zSlab=50;this.slabByAtom=this.slabByMolecule=
!1;this.appendNew=this.allowEmbeddedScripts=!0;this.appletProxy="";this.applySymmetryToBonds=!1;this.atomTypes="";this.autoBond=!0;this.axesOrientationRasmol=!1;this.bondRadiusMilliAngstroms=150;this.bondTolerance=0.45;this.defaultDirectory="";this.defaultStructureDSSP=!0;this.ptDefaultLattice=null;this.defaultLoadFilter=this.defaultLoadScript="";this.defaultDropScript="zap; load SYNC \"%FILE\";if (%ALLOWCARTOONS && _loadScript == '' && defaultLoadScript == '' && _filetype == 'Pdb') {if ({(protein or nucleic)&*/1.1} && {*/1.1}[1].groupindex != {*/1.1}[0].groupindex){select protein or nucleic;cartoons only;}if ({visible && cartoons > 0}){color structure}else{wireframe -0.1};if (!{visible}){select !visible;wireframe 0.15;color none;select !visible;spacefill 23%};select *}";
this.forceAutoBond=!1;this.fractionalRelative=!0;this.inlineNewlineChar="|";this.resolverResolver=this.macroDirectory=this.pubChemFormat=this.nihResolverFormat=this.smilesUrlFormat=this.nmrPredictFormat=this.nmrUrlFormat=this.pdbLoadLigandFormat=this.pdbLoadFormat=this.loadFormat=null;this.checkCIR=!1;this.minBondDistance=0.4;this.minPixelSelRadius=6;this.pdbSequential=this.pdbGetHeader=this.pdbAddHydrogens=!1;this.percentVdwAtom=23;this.smallMoleculeMaxAtoms=4E4;this.smartAromatic=!0;this.doublePrecision=
this.legacyJavaFloat=this.legacyHAddition=this.legacyAutoBonding=this.zeroBasedXyzRasmol=!1;this.modulateOccupancy=this.jmolInJSpecView=!0;this.dotSolvent=this.allowMoveAtoms=this.allowRotateSelected=!1;this.defaultTorsionLabel=this.defaultDistanceLabel=this.defaultAngleLabel="%VALUE %UNITS";this.measureAllModels=this.justifyMeasurements=!1;this.minimizationSteps=100;this.minimizationRefresh=!0;this.minimizationSilent=!1;this.minimizationCriterion=0.001;this.minimizationMaxAtoms=200;this.minimizationReportSteps=
10;this.infoFontSize=20;this.antialiasDisplay=!1;this.displayCellParameters=this.antialiasTranslucent=this.imageState=this.antialiasImages=!0;this.dotsSelectedOnly=!1;this.dotSurface=!0;this.dotDensity=3;this.meshScale=this.dotScale=1;this.isosurfaceKey=this.greyscaleRendering=this.mode2d=!1;this.isosurfacePropertySmoothing=!0;this.isosurfacePropertySmoothingPower=7;this.platformSpeed=10;this.repaintWaitMs=1E3;this.showHiddenSelectionHalos=!1;this.showMeasurements=this.showKeyStrokes=!0;this.showTiming=
!1;this.zoomLarge=!0;this.zoomHeight=!1;this.backgroundImageFileName=null;this.occupancyThreshold=50;this.hbondsBackbone=this.bondModeOr=this.partialDots=!1;this.hbondsAngleMinimum=90;this.hbondNODistanceMaximum=3.25;this.hbondHXDistanceMaximum=2.5;this.hbondsRasmol=!0;this.hbondsSolid=!1;this.modeMultipleBond=2;this.showMultipleBonds=this.showHydrogens=!0;this.ssbondsBackbone=!1;this.multipleBondSpacing=-1;this.multipleBondRadiusFactor=0;this.multipleBondBananas=!1;this.nboCharges=!0;this.cartoonRockets=
this.cartoonBaseEdges=!1;this.cartoonBlockHeight=0.5;this.cipRule6Full=this.chainCaseSensitive=this.cartoonRibose=this.cartoonLadders=this.cartoonFancy=this.cartoonSteps=this.cartoonBlocks=!1;this.hermiteLevel=0;this.rangeSelected=this.highResolutionFlag=!1;this.rasmolHeteroSetting=this.rasmolHydrogenSetting=!0;this.ribbonAspectRatio=16;this.rocketBarrels=this.ribbonBorder=!1;this.sheetSmoothing=1;this.translucent=this.traceAlpha=!0;this.twistedSheets=!1;this.allowAudio=this.autoplayMovie=!0;this.allowGestures=
!1;this.allowMultiTouch=this.allowModelkit=!0;this.hiddenLinesDashed=this.allowKeyStrokes=!1;this.animationFps=10;this.atomPicking=!0;this.autoFps=!1;this.axesMode=603979809;this.axesScale=2;this.axesOffset=0;this.starWidth=0.05;this.bondPicking=!1;this.dataSeparator="~~~";this.debugScript=!1;this.defaultDrawArrowScale=0.5;this.defaultLabelXYZ="%a";this.defaultLabelPDB="%m%r";this.defaultTranslucent=0.5;this.delayMaximumMs=0;this.dipoleScale=1;this.drawFontSize=16;this.drawPicking=this.drawHover=
this.dragSelected=this.disablePopupMenu=!1;this.dsspCalcHydrogen=!0;this.labelKey=this.elementKey=!1;this.energyUnits="kJ";this.exportScale=0;this.helpPath="https://chemapps.stolaf.edu/jmol/docs/index.htm";this.fontScaling=!1;this.fontCaching=!0;this.forceField="MMFF";this.helixStep=1;this.hideNameInPopup=!1;this.hoverDelayMs=500;this.labelPointerWidth=2;this.loadAtomDataTolerance=0.01;this.logGestures=this.logCommands=!1;this.measureDistanceUnits="nanometers";this.measurementLabels=!0;this.monitorEnergy=
this.messageStyleChime=!1;this.modulationScale=1;this.multiProcessor=!0;this.particleRadius=20;this.pickingSpinRate=10;this.pickLabel="";this.pointGroupDistanceTolerance=0.2;this.pointGroupLinearTolerance=8;this.preserveState=!0;this.propertyColorScheme="roygb";this.quaternionFrame="p";this.saveProteinStructureState=!0;this.showModVecs=!1;this.showUnitCellDetails=!0;this.solventProbeRadius=1.2;this.scriptDelay=0;this.statusReporting=this.selectAllModels=!0;this.strandCountForStrands=5;this.strandCountForMeshRibbon=
7;this.strutSpacing=6;this.strutLengthMaximum=7;this.strutDefaultRadius=0.3;this.symmetryHermannMauguin=this.strutsMultiple=!1;this.waitForMoveTo=this.useScriptQueue=this.useNumberLocalization=this.useMinimizationThread=!0;this.noDelay=!1;this.vectorScale=1;this.vectorsCentered=this.vectorSymmetry=!1;this.vectorTrail=0;this.vibrationScale=this.vibrationPeriod=1;this.navigationPeriodic=this.navigationMode=this.hideNavigationPoint=this.wireframeRotation=!1;this.navigationSpeed=5;this.showNavigationPointAlways=
!1;this.stereoState=null;this.modelKitMode=!1;this.objMad10=this.objStateOn=this.objColors=null;this.ellipsoidFill=this.ellipsoidArrows=this.ellipsoidArcs=this.ellipsoidDots=this.ellipsoidAxes=!1;this.ellipsoidBall=!0;this.ellipsoidDotCount=200;this.ellipsoidAxisDiameter=0.02;this.testFlag4=this.testFlag3=this.testFlag2=this.testFlag1=!1;this.structureList=null;this.haveSetStructureList=!1;this.bondingVersion=0;v(this,arguments)},JV,"GlobalSettings",null);P(b,function(){this.htUserVariables=new java.util.Hashtable;
this.ptDefaultLattice=new JU.P3;this.objColors=F(7,0);this.objStateOn=ga(7,!1);this.objMad10=F(7,0);this.structureList=new java.util.Hashtable;this.structureList.put(J.c.STR.TURN,L(-1,[30,90,-15,95]));this.structureList.put(J.c.STR.SHEET,L(-1,[-180,-10,70,180,-180,-45,-180,-130,140,180,90,180]));this.structureList.put(J.c.STR.HELIX,L(-1,[-160,0,-100,45]))});A(b,function(a,b,c){this.vwr=a;this.htNonbooleanParameterValues=new java.util.Hashtable;this.htBooleanParameterFlags=new java.util.Hashtable;
this.htPropertyFlagsRemoved=new java.util.Hashtable;this.loadFormat=this.pdbLoadFormat=JV.JC.databases.get("pdb");this.pdbLoadLigandFormat=JV.JC.databases.get("ligand");this.nmrUrlFormat=JV.JC.databases.get("nmr");this.nmrPredictFormat=JV.JC.databases.get("nmrdb");this.pubChemFormat=JV.JC.databases.get("pubchem");this.resolverResolver=JV.JC.databases.get("resolverresolver");this.macroDirectory="https://chemapps.stolaf.edu/jmol/macros";null==b?this.setB("undoAuto",!a.isApplet):(this.setB("undoAuto",
a.getBooleanProperty("undoAuto")),c||(this.setO("_pngjFile",b.getParameter("_pngjFile",!1)),this.htUserVariables=b.htUserVariables),this.debugScript=b.debugScript,this.disablePopupMenu=b.disablePopupMenu,this.messageStyleChime=b.messageStyleChime,this.measureDistanceUnits=b.measureDistanceUnits,this.defaultDirectory=b.defaultDirectory,this.autoplayMovie=b.autoplayMovie,this.allowAudio=b.allowAudio,this.allowGestures=b.allowGestures,this.allowModelkit=b.allowModelkit,this.allowMultiTouch=b.allowMultiTouch,
this.allowKeyStrokes=b.allowKeyStrokes,this.legacyAutoBonding=b.legacyAutoBonding,this.legacyHAddition=b.legacyHAddition,this.legacyJavaFloat=b.legacyJavaFloat,this.minimizationReportSteps=b.minimizationReportSteps,this.doublePrecision=b.doublePrecision,this.bondingVersion=b.bondingVersion,this.platformSpeed=b.platformSpeed,this.useScriptQueue=b.useScriptQueue,this.showTiming=b.showTiming,this.wireframeRotation=b.wireframeRotation,this.testFlag1=b.testFlag1,this.testFlag2=b.testFlag2,this.testFlag3=
b.testFlag3,this.testFlag4=b.testFlag4,this.nihResolverFormat=b.nihResolverFormat);null==this.nihResolverFormat&&(this.nihResolverFormat=JV.JC.databases.get("nci"));this.setCIR(this.nihResolverFormat,!1);var l;c=0;for(var e=J.c.CBK.values();c<e.length&&((l=e[c])||1);c++)this.resetValue(l.name()+"Callback",b);this.setF("cameraDepth",3);this.setI("undoMax",a.stm.getUndoMax());this.setI("contextDepthMax",100);this.setI("depth",0);this.setF("gestureSwipeFactor",1);this.setB("hideNotSelected",!1);this.setI("historyLevel",
0);this.setO("hoverLabel","");this.setB("isKiosk",a.isKiosk());this.setO("logFile",a.getLogFileName());this.setI("logLevel",JU.Logger.getLogLevel());this.setF("mouseWheelFactor",1.15);this.setF("mouseDragFactor",1);this.setI("navFps",10);this.setI("navigationDepth",0);this.setI("navigationSlab",0);this.setI("navX",0);this.setI("navY",0);this.setI("navZ",0);this.setO("pathForAllFiles","");this.setB("perspectiveDepth",!0);this.setI("perspectiveModel",11);this.setO("picking","identify");this.setO("pickingStyle",
"toggle");this.setB("refreshing",!0);this.setI("rotationRadius",0);this.setI("scaleAngstromsPerInch",0);this.setI("scriptReportingLevel",0);this.setB("selectionHalos",!1);this.setB("showaxes",!1);this.setB("showboundbox",!1);this.setB("showfrank",!1);this.setB("showUnitcell",!1);this.setI("slab",100);this.setB("slabEnabled",!1);this.setF("slabrange",0);this.setI("spinX",0);this.setI("spinY",30);this.setI("spinZ",0);this.setI("spinFps",30);this.setF("visualRange",5);this.setI("stereoDegrees",-5);this.setB("syncScript",
a.sm.syncingScripts);this.setB("syncMouse",a.sm.syncingMouse);this.setB("syncStereo",a.sm.stereoSync);this.setB("windowCentered",!0);this.setB("zoomEnabled",!0);this.setI("_version",JV.JC.versionInt);this.setO("_versionDate",JV.Viewer.getJmolVersion());this.setB("axesWindow",!0);this.setB("axesMolecular",!1);this.setB("axesPosition",!1);this.setB("axesUnitcell",!1);this.setI("backgroundModel",0);this.setB("colorRasmol",!1);this.setO("currentLocalPath","");this.setO("defaultLattice","{0 0 0}");this.setO("defaultColorScheme",
"Jmol");this.setO("defaultDirectoryLocal","");this.setO("defaults","Jmol");this.setO("defaultVDW","Jmol");this.setO("exportDrivers","Idtf;Maya;Povray;Vrml;X3d;Stl;Tachyon;Obj");this.setI("propertyAtomNumberColumnCount",0);this.setI("propertyAtomNumberField",0);this.setI("propertyDataColumnCount",0);this.setI("propertyDataField",0);this.setI("undoMax",a.stm.getUndoMax());this.setB("allowEmbeddedScripts",this.allowEmbeddedScripts);this.setB("allowGestures",this.allowGestures);this.setB("allowKeyStrokes",
this.allowKeyStrokes);this.setB("allowModelkit",this.allowModelkit);this.setB("allowMultiTouch",this.allowMultiTouch);this.setB("allowRotateSelected",this.allowRotateSelected);this.setB("allowMoveAtoms",this.allowMoveAtoms);this.setI("animationFps",this.animationFps);this.setB("antialiasImages",this.antialiasImages);this.setB("antialiasDisplay",this.antialiasDisplay);this.setB("antialiasTranslucent",this.antialiasTranslucent);this.setB("appendNew",this.appendNew);this.setO("appletProxy",this.appletProxy);
this.setB("applySymmetryToBonds",this.applySymmetryToBonds);this.setB("atomPicking",this.atomPicking);this.setO("atomTypes",this.atomTypes);this.setB("autoBond",this.autoBond);this.setB("autoFps",this.autoFps);this.setI("axesMode",603979808==this.axesMode?2:603979804==this.axesMode?1:0);this.setF("axesScale",this.axesScale);this.setF("axesOffset",this.axesOffset);this.setB("axesOrientationRasmol",this.axesOrientationRasmol);this.setF("cartoonBlockHeight",this.cartoonBlockHeight);this.setB("cartoonBlocks",
this.cartoonBlocks);this.setB("cartoonSteps",this.cartoonSteps);this.setB("bondModeOr",this.bondModeOr);this.setB("bondPicking",this.bondPicking);this.setI("bondRadiusMilliAngstroms",this.bondRadiusMilliAngstroms);this.setF("bondTolerance",this.bondTolerance);this.setB("cartoonBaseEdges",this.cartoonBaseEdges);this.setB("cartoonFancy",this.cartoonFancy);this.setB("cartoonLadders",this.cartoonLadders);this.setB("cartoonLadders",this.cartoonRibose);this.setB("cartoonRockets",this.cartoonRockets);this.setB("chainCaseSensitive",
this.chainCaseSensitive);this.setB("cipRule6Full",this.cipRule6Full);this.setI("bondingVersion",this.bondingVersion);this.setO("dataSeparator",this.dataSeparator);this.setB("debugScript",this.debugScript);this.setO("defaultAngleLabel",this.defaultAngleLabel);this.setF("defaultDrawArrowScale",this.defaultDrawArrowScale);this.setO("defaultDirectory",this.defaultDirectory);this.setO("defaultDistanceLabel",this.defaultDistanceLabel);this.setO("defaultDropScript",this.defaultDropScript);this.setO("defaultLabelPDB",
this.defaultLabelPDB);this.setO("defaultLabelXYZ",this.defaultLabelXYZ);this.setO("defaultLoadFilter",this.defaultLoadFilter);this.setO("defaultLoadScript",this.defaultLoadScript);this.setB("defaultStructureDSSP",this.defaultStructureDSSP);this.setO("defaultTorsionLabel",this.defaultTorsionLabel);this.setF("defaultTranslucent",this.defaultTranslucent);this.setI("delayMaximumMs",this.delayMaximumMs);this.setF("dipoleScale",this.dipoleScale);this.setB("disablePopupMenu",this.disablePopupMenu);this.setB("displayCellParameters",
this.displayCellParameters);this.setI("dotDensity",this.dotDensity);this.setI("dotScale",this.dotScale);this.setB("dotsSelectedOnly",this.dotsSelectedOnly);this.setB("dotSurface",this.dotSurface);this.setB("dragSelected",this.dragSelected);this.setB("drawHover",this.drawHover);this.setF("drawFontSize",this.drawFontSize);this.setB("drawPicking",this.drawPicking);this.setB("dsspCalculateHydrogenAlways",this.dsspCalcHydrogen);this.setB("elementkey",this.elementKey);this.setB("labelkey",this.labelKey);
this.setB("ellipsoidArcs",this.ellipsoidArcs);this.setB("ellipsoidArrows",this.ellipsoidArrows);this.setB("ellipsoidAxes",this.ellipsoidAxes);this.setF("ellipsoidAxisDiameter",this.ellipsoidAxisDiameter);this.setB("ellipsoidBall",this.ellipsoidBall);this.setI("ellipsoidDotCount",this.ellipsoidDotCount);this.setB("ellipsoidDots",this.ellipsoidDots);this.setB("ellipsoidFill",this.ellipsoidFill);this.setO("energyUnits",this.energyUnits);this.setF("exportScale",this.exportScale);this.setB("doublePrecision",
this.doublePrecision);this.setB("fontScaling",this.fontScaling);this.setB("fontCaching",this.fontCaching);this.setB("forceAutoBond",this.forceAutoBond);this.setO("forceField",this.forceField);this.setB("fractionalRelative",this.fractionalRelative);this.setF("particleRadius",this.particleRadius);this.setB("greyscaleRendering",this.greyscaleRendering);this.setF("hbondsAngleMinimum",this.hbondsAngleMinimum);this.setF("hbondHXDistanceMaximum",this.hbondHXDistanceMaximum);this.setF("hbondsDistanceMaximum",
this.hbondNODistanceMaximum);this.setB("hbondsBackbone",this.hbondsBackbone);this.setB("hbondsRasmol",this.hbondsRasmol);this.setB("hbondsSolid",this.hbondsSolid);this.setI("helixStep",this.helixStep);this.setO("helpPath",this.helpPath);this.setI("hermiteLevel",this.hermiteLevel);this.setB("hideNameInPopup",this.hideNameInPopup);this.setB("hideNavigationPoint",this.hideNavigationPoint);this.setB("hiddenLinesDashed",this.hiddenLinesDashed);this.setB("highResolution",this.highResolutionFlag);this.setF("hoverDelay",
this.hoverDelayMs/1E3);this.setB("imageState",this.imageState);this.setI("infoFontSize",this.infoFontSize);this.setB("isosurfaceKey",this.isosurfaceKey);this.setB("isosurfacePropertySmoothing",this.isosurfacePropertySmoothing);this.setI("isosurfacePropertySmoothingPower",this.isosurfacePropertySmoothingPower);this.setB("jmolInJSpecView",this.jmolInJSpecView);this.setI("labelPointerWidth",this.labelPointerWidth);this.setB("justifyMeasurements",this.justifyMeasurements);this.setB("legacyAutoBonding",
this.legacyAutoBonding);this.setB("legacyHAddition",this.legacyHAddition);this.setB("legacyJavaFloat",this.legacyJavaFloat);this.setF("loadAtomDataTolerance",this.loadAtomDataTolerance);this.setO("loadFormat",this.loadFormat);this.setO("loadLigandFormat",this.pdbLoadLigandFormat);this.setB("logCommands",this.logCommands);this.setB("logGestures",this.logGestures);this.setB("measureAllModels",this.measureAllModels);this.setB("measurementLabels",this.measurementLabels);this.setO("measurementUnits",this.measureDistanceUnits);
this.setI("meshScale",this.meshScale);this.setB("messageStyleChime",this.messageStyleChime);this.setF("minBondDistance",this.minBondDistance);this.setI("minPixelSelRadius",this.minPixelSelRadius);this.setI("minimizationReportSteps",this.minimizationReportSteps);this.setI("minimizationSteps",this.minimizationSteps);this.setB("minimizationRefresh",this.minimizationRefresh);this.setB("minimizationSilent",this.minimizationSilent);this.setF("minimizationCriterion",this.minimizationCriterion);this.setB("mode2d",
this.mode2d);this.setB("modelKitMode",this.modelKitMode);this.setF("modulationScale",this.modulationScale);this.setB("monitorEnergy",this.monitorEnergy);this.setF("multipleBondRadiusFactor",this.multipleBondRadiusFactor);this.setB("multipleBondBananas",this.multipleBondBananas);this.setF("multipleBondSpacing",this.multipleBondSpacing);this.setB("multiProcessor",this.multiProcessor&&1<JV.Viewer.nProcessors);this.setB("navigationMode",this.navigationMode);this.setB("navigationPeriodic",this.navigationPeriodic);
this.setF("navigationSpeed",this.navigationSpeed);this.setB("nboCharges",this.nboCharges);this.setB("noDelay",this.noDelay);this.setO("nmrPredictFormat",this.nmrPredictFormat);this.setO("nmrUrlFormat",this.nmrUrlFormat);this.setI("occupancyThreshold",this.occupancyThreshold);this.setB("partialDots",this.partialDots);this.setB("pdbAddHydrogens",this.pdbAddHydrogens);this.setB("pdbGetHeader",this.pdbGetHeader);this.setB("pdbSequential",this.pdbSequential);this.setI("percentVdwAtom",this.percentVdwAtom);
this.setI("pickingSpinRate",this.pickingSpinRate);this.setO("pickLabel",this.pickLabel);this.setI("platformSpeed",this.platformSpeed);this.setF("pointGroupLinearTolerance",this.pointGroupLinearTolerance);this.setF("pointGroupDistanceTolerance",this.pointGroupDistanceTolerance);this.setB("preserveState",this.preserveState);this.setO("propertyColorScheme",this.propertyColorScheme);this.setO("quaternionFrame",this.quaternionFrame);this.setB("rangeSelected",this.rangeSelected);this.setI("repaintWaitMs",
this.repaintWaitMs);this.setI("ribbonAspectRatio",this.ribbonAspectRatio);this.setB("ribbonBorder",this.ribbonBorder);this.setB("rocketBarrels",this.rocketBarrels);this.setB("saveProteinStructureState",this.saveProteinStructureState);this.setB("scriptqueue",this.useScriptQueue);this.setB("selectAllModels",this.selectAllModels);this.setB("selectHetero",this.rasmolHeteroSetting);this.setB("selectHydrogen",this.rasmolHydrogenSetting);this.setF("sheetSmoothing",this.sheetSmoothing);this.setB("showHiddenSelectionHalos",
this.showHiddenSelectionHalos);this.setB("showHydrogens",this.showHydrogens);this.setB("showKeyStrokes",this.showKeyStrokes);this.setB("showMeasurements",this.showMeasurements);this.setB("showModulationVectors",this.showModVecs);this.setB("showMultipleBonds",this.showMultipleBonds);this.setB("showNavigationPointAlways",this.showNavigationPointAlways);this.setI("showScript",this.scriptDelay);this.setB("showtiming",this.showTiming);this.setB("slabByMolecule",this.slabByMolecule);this.setB("slabByAtom",
this.slabByAtom);this.setB("smartAromatic",this.smartAromatic);this.setI("minimizationMaxAtoms",this.minimizationMaxAtoms);this.setI("smallMoleculeMaxAtoms",this.smallMoleculeMaxAtoms);this.setO("smilesUrlFormat",this.smilesUrlFormat);this.setO("macroDirectory",this.macroDirectory);this.setO("nihResolverFormat",this.nihResolverFormat);this.setO("pubChemFormat",this.pubChemFormat);this.setB("showUnitCellDetails",this.showUnitCellDetails);this.setB("solventProbe",this.dotSolvent);this.setF("solventProbeRadius",
this.solventProbeRadius);this.setB("ssbondsBackbone",this.ssbondsBackbone);this.setF("starWidth",this.starWidth);this.setB("statusReporting",this.statusReporting);this.setI("strandCount",this.strandCountForStrands);this.setI("strandCountForStrands",this.strandCountForStrands);this.setI("strandCountForMeshRibbon",this.strandCountForMeshRibbon);this.setF("strutDefaultRadius",this.strutDefaultRadius);this.setF("strutLengthMaximum",this.strutLengthMaximum);this.setI("strutSpacing",this.strutSpacing);
this.setB("strutsMultiple",this.strutsMultiple);this.setB("symmetryhermannmauguin",this.symmetryHermannMauguin);this.setB("testFlag1",this.testFlag1);this.setB("testFlag2",this.testFlag2);this.setB("testFlag3",this.testFlag3);this.setB("testFlag4",this.testFlag4);this.setB("traceAlpha",this.traceAlpha);this.setB("translucent",this.translucent);this.setB("twistedSheets",this.twistedSheets);this.setB("useMinimizationThread",this.useMinimizationThread);this.setB("useNumberLocalization",this.useNumberLocalization);
this.setB("vectorsCentered",this.vectorsCentered);this.setF("vectorScale",this.vectorScale);this.setB("vectorSymmetry",this.vectorSymmetry);this.setI("vectorTrail",this.vectorTrail);this.setF("vibrationPeriod",this.vibrationPeriod);this.setF("vibrationScale",this.vibrationScale);this.setB("waitForMoveTo",this.waitForMoveTo);this.setB("wireframeRotation",this.wireframeRotation);this.setI("zDepth",this.zDepth);this.setB("zeroBasedXyzRasmol",this.zeroBasedXyzRasmol);this.setB("zoomHeight",this.zoomHeight);
this.setB("zoomLarge",this.zoomLarge);this.setI("zShadePower",this.zShadePower);this.setI("zSlab",this.zSlab)},"JV.Viewer,JV.GlobalSettings,~B");c(b,"clear",function(){for(var a=this.htUserVariables.keySet().iterator();a.hasNext();){var b=a.next();("@"==b.charAt(0)||b.startsWith("site_"))&&a.remove()}this.vwr.setPicked(-1,!1);this.setI("_atomhovered",-1);this.setO("_pickinfo","");this.setB("selectionhalos",!1);this.setB("hidenotselected",!1);this.setB("measurementlabels",this.measurementLabels=!0);
this.setB("drawHover",this.drawHover=!1);this.vwr.stm.saveScene("DELETE",null)});c(b,"setUnits",function(a){var b=this.measureDistanceUnits,c=this.energyUnits;a.equalsIgnoreCase("angstroms")?this.measureDistanceUnits="angstroms":a.equalsIgnoreCase("nanometers")||a.equalsIgnoreCase("nm")?this.measureDistanceUnits="nanometers":a.equalsIgnoreCase("picometers")||a.equalsIgnoreCase("pm")?this.measureDistanceUnits="picometers":a.equalsIgnoreCase("bohr")||a.equalsIgnoreCase("au")?this.measureDistanceUnits=
"au":a.equalsIgnoreCase("vanderwaals")||a.equalsIgnoreCase("vdw")?this.measureDistanceUnits="vdw":a.toLowerCase().endsWith("hz")||a.toLowerCase().endsWith("khz")?this.measureDistanceUnits=a.toLowerCase():a.equalsIgnoreCase("kj")?this.energyUnits="kJ":a.equalsIgnoreCase("kcal")&&(this.energyUnits="kcal");b.equalsIgnoreCase(this.measureDistanceUnits)?c.equalsIgnoreCase(this.energyUnits)||this.setO("energyUnits",this.energyUnits):this.setO("measurementUnits",this.measureDistanceUnits)},"~S");c(b,"isJmolVariable",
function(a){return"_"==a.charAt(0)||this.htNonbooleanParameterValues.containsKey(a=a.toLowerCase())||this.htBooleanParameterFlags.containsKey(a)||0<=JV.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");c(b,"resetValue",function(a,b){this.setO(a,null==b?"":b.getParameter(a,!0))},"~S,JV.GlobalSettings");c(b,"setB",function(a,b){a=a.toLowerCase();this.htNonbooleanParameterValues.containsKey(a)||this.htBooleanParameterFlags.put(a,b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(b,"setI",function(a,
b){2147483647!=b&&this.setO(a,Integer.$valueOf(b))},"~S,~N");c(b,"setF",function(a,b){Float.isNaN(b)||this.setO(a,Float.$valueOf(b))},"~S,~N");c(b,"setOrRemoveO",function(a,b){null==b?this.removeParam(a):this.setO(a,b)},"~S,~O");c(b,"setO",function(a,b){a=a.toLowerCase();null==b||this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,b)},"~S,~O");c(b,"removeParam",function(a){a=a.toLowerCase();this.htBooleanParameterFlags.containsKey(a)?(this.htBooleanParameterFlags.remove(a),
this.htPropertyFlagsRemoved.containsKey(a)||this.htPropertyFlagsRemoved.put(a,Boolean.FALSE)):this.htNonbooleanParameterValues.containsKey(a)&&this.htNonbooleanParameterValues.remove(a)},"~S");c(b,"setUserVariable",function(a,b){null!=b&&(a=a.toLowerCase(),this.htUserVariables.put(a,b.setName(a)));return b},"~S,JS.SV");c(b,"unsetUserVariable",function(a){a.equals("all")||a.equals("variables")?(this.htUserVariables.clear(),JU.Logger.info("all user-defined variables deleted")):this.htUserVariables.containsKey(a)&&
(JU.Logger.info("variable "+a+" deleted"),this.htUserVariables.remove(a))},"~S");c(b,"removeUserVariable",function(a){this.htUserVariables.remove(a)},"~S");c(b,"getUserVariable",function(a){if(null==a)return null;a=a.toLowerCase();return this.htUserVariables.get(a)},"~S");c(b,"getParameterEscaped",function(a,b){a=a.toLowerCase();if(this.htNonbooleanParameterValues.containsKey(a)){var c=this.htNonbooleanParameterValues.get(a);return JV.StateManager.varClip(a,JU.Escape.e(c),b)}return this.htBooleanParameterFlags.containsKey(a)?
this.htBooleanParameterFlags.get(a).toString():this.htUserVariables.containsKey(a)?this.htUserVariables.get(a).escape():this.htPropertyFlagsRemoved.containsKey(a)?"false":"<not defined>"},"~S,~N");c(b,"getParameter",function(a,b){var c=this.getParam(a,!1);return null==c&&b?"":c},"~S,~B");c(b,"getAndSetNewVariable",function(a,b){if(null==a||0==a.length)a="x";var c=this.getParam(a,!0);return null==c&&b&&"_"!=a.charAt(0)?this.setUserVariable(a,JS.SV.newV(4,"")):JS.SV.getVariable(c)},"~S,~B");c(b,"getParam",
function(a,b){a=a.toLowerCase();if(a.equals("_memory")){var c=JU.DF.formatDecimal(0,1)+"/"+JU.DF.formatDecimal(0,1);this.htNonbooleanParameterValues.put("_memory",c)}return this.htNonbooleanParameterValues.containsKey(a)?this.htNonbooleanParameterValues.get(a):this.htBooleanParameterFlags.containsKey(a)?this.htBooleanParameterFlags.get(a):this.htPropertyFlagsRemoved.containsKey(a)?Boolean.FALSE:this.htUserVariables.containsKey(a)?(c=this.htUserVariables.get(a),b?c:JS.SV.oValue(c)):null},"~S,~B");
c(b,"getVariableList",function(){return JV.StateManager.getVariableList(this.htUserVariables,0,!0,!1)});c(b,"setStructureList",function(a,b){this.haveSetStructureList=!0;this.structureList.put(b,a)},"~A,J.c.STR");c(b,"getStructureList",function(){return this.structureList});b.doReportProperty=c(b,"doReportProperty",function(a){return"_"!=a.charAt(0)&&0>JV.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");c(b,"getAllVariables",function(){var a=new java.util.Hashtable;a.putAll(this.htBooleanParameterFlags);
a.putAll(this.htNonbooleanParameterValues);a.putAll(this.htUserVariables);return a});c(b,"getLoadState",function(a){var b=new JU.SB;this.app(b,"set allowEmbeddedScripts false");this.allowEmbeddedScripts&&this.setB("allowEmbeddedScripts",!0);this.app(b,"set appendNew "+this.appendNew);this.app(b,"set appletProxy "+JU.PT.esc(this.appletProxy));this.app(b,"set applySymmetryToBonds "+this.applySymmetryToBonds);0<this.atomTypes.length&&this.app(b,"set atomTypes "+JU.PT.esc(this.atomTypes));this.app(b,
"set autoBond "+this.autoBond);this.axesOrientationRasmol&&this.app(b,"set axesOrientationRasmol true");this.app(b,"set bondRadiusMilliAngstroms "+this.bondRadiusMilliAngstroms);this.app(b,"set bondTolerance "+this.bondTolerance);this.app(b,"set defaultLattice "+JU.Escape.eP(this.ptDefaultLattice));this.app(b,"set defaultLoadFilter "+JU.PT.esc(this.defaultLoadFilter));this.app(b,'set defaultLoadScript ""');0<this.defaultLoadScript.length&&this.setO("defaultLoadScript",this.defaultLoadScript);this.app(b,
"set defaultStructureDssp "+this.defaultStructureDSSP);var c=this.vwr.getDefaultVdwNameOrData(-2147483648,null,null);this.app(b,"set defaultVDW "+c);c.equals("User")&&this.app(b,this.vwr.getDefaultVdwNameOrData(2147483647,null,null));this.app(b,"set forceAutoBond "+this.forceAutoBond);this.app(b,"#set defaultDirectory "+JU.PT.esc(this.defaultDirectory));this.app(b,"#set loadFormat "+JU.PT.esc(this.loadFormat));this.app(b,"#set loadLigandFormat "+JU.PT.esc(this.pdbLoadLigandFormat));this.app(b,"#set smilesUrlFormat "+
JU.PT.esc(this.smilesUrlFormat));this.app(b,"#set nihResolverFormat "+JU.PT.esc(this.nihResolverFormat));this.app(b,"#set pubChemFormat "+JU.PT.esc(this.pubChemFormat));this.app(b,"set bondingVersion "+this.bondingVersion);this.app(b,"set legacyAutoBonding "+this.legacyAutoBonding);this.app(b,"set legacyAutoBonding "+this.legacyAutoBonding);this.app(b,"set legacyHAddition "+this.legacyHAddition);this.app(b,"set legacyJavaFloat "+this.legacyJavaFloat);this.app(b,"set minBondDistance "+this.minBondDistance);
this.app(b,"set minimizationCriterion  "+this.minimizationCriterion);this.app(b,"set minimizationSteps  "+this.minimizationSteps);this.app(b,"set multipleBondBananas false");this.app(b,"set pdbAddHydrogens "+(null!=a&&a.get("pdbNoHydrogens")!==Boolean.TRUE?this.pdbAddHydrogens:!1));this.app(b,"set pdbGetHeader "+this.pdbGetHeader);this.app(b,"set pdbSequential "+this.pdbSequential);this.app(b,"set percentVdwAtom "+this.percentVdwAtom);this.app(b,"set smallMoleculeMaxAtoms "+this.smallMoleculeMaxAtoms);
this.app(b,"set smartAromatic "+this.smartAromatic);this.zeroBasedXyzRasmol&&this.app(b,"set zeroBasedXyzRasmol true");return b.toString()},"java.util.Map");c(b,"app",function(a,b){0!=b.length&&a.append("  ").append(b).append(";\n")},"JU.SB,~S");c(b,"setCIR",function(a,b){if(!(null==a||a.equals(this.nihResolverFormat)&&null!=this.smilesUrlFormat)){var c=a.indexOf("/structure");0<c&&(this.nihResolverFormat=a.substring(0,c+10),this.smilesUrlFormat=this.nihResolverFormat+"/%FILE/file?format=sdf&get3d=true",
b&&JU.Logger.info("CIR resolver set to "+this.nihResolverFormat+" template="+a))}},"~S,~B");b.unreportedProperties=(";ambientpercent;animationfps;antialiasdisplay;antialiasimages;antialiastranslucent;appendnew;axescolor;axesposition;axesmolecular;axesorientationrasmol;axesunitcell;axeswindow;axis1color;axis2color;axis3color;backgroundcolor;backgroundmodel;bondsymmetryatoms;boundboxcolor;cameradepth;bondingversion;ciprule6full;contextdepthmax;debug;debugscript;defaultlatttice;defaults;defaultdropscript;diffusepercent;;exportdrivers;exportscale;_filecaching;_filecache;fontcaching;fontscaling;forcefield;language;hbondsDistanceMaximum;hbondsangleminimum;jmolinJSV;legacyautobonding;legacyhaddition;legacyjavafloat;loglevel;logfile;loggestures;logcommands;measurestylechime;loadformat;loadligandformat;macrodirectory;mkaddhydrogens;minimizationmaxatoms;smilesurlformat;pubchemformat;nihresolverformat;edsurlformat;edsurlcutoff;multiprocessor;navigationmode;;nodelay;pathforallfiles;perspectivedepth;phongexponent;perspectivemodel;platformspeed;preservestate;refreshing;repaintwaitms;rotationradius;selectallmodels;showaxes;showaxis1;showaxis2;showaxis3;showboundbox;showfrank;showtiming;showunitcell;slabenabled;slab;slabrange;depth;zshade;zshadepower;specular;specularexponent;specularpercent;celshading;celshadingpower;specularpower;stateversion;statusreporting;stereo;stereostate;vibrationperiod;unitcellcolor;visualrange;windowcentered;zerobasedxyzrasmol;zoomenabled;mousedragfactor;mousewheelfactor;scriptqueue;scriptreportinglevel;syncscript;syncmouse;syncstereo;defaultdirectory;currentlocalpath;defaultdirectorylocal;ambient;bonds;colorrasmol;diffuse;fractionalrelative;frank;hetero;hidenotselected;hoverlabel;hydrogen;languagetranslation;measurementunits;navigationdepth;navigationslab;picking;pickingstyle;propertycolorscheme;radius;rgbblue;rgbgreen;rgbred;scaleangstromsperinch;selectionhalos;showscript;showselections;solvent;strandcount;spinx;spiny;spinz;spinfps;navx;navy;navz;navfps;"+
J.c.CBK.getNameList()+";undo;undoauto;undomax;atompicking;drawpicking;bondpicking;pickspinrate;picklabel;modelkitmode;autoplaymovie;allowaudio;allowgestures;allowkeystrokes;allowmultitouch;allowmodelkit;dodrop;hovered;historylevel;imagestate;iskiosk;useminimizationthread;checkcir;resolverresolver;showkeystrokes;saveproteinstructurestate;testflag1;testflag2;testflag3;testflag4;selecthetero;selecthydrogen;pointgrouplineartolerance;pointgroupdistancetolerance;minimizationreportsteps;labelkey;elementkey;symmetryhermannmauguin;mode2d;percentVdwAtom;").toLowerCase()});
s("JV");B(["java.util.Hashtable","JU.SB","$.V3","JU.Elements"],"JV.JC",["JU.PT","J.i18n.GT","JU.Logger"],function(){var b=I(JV,"JC",null);b.getNBOTypeFromName=c(b,"getNBOTypeFromName",function(a){a=";AO;;;;PNAO;;NAO;;;PNHO;;NHO;;;PNBO;;NBO;;;PNLMO;NLMO;;MO;;;;NO;;;;;;;;;;PRNBO;RNBO;;;;;;;;".indexOf(";"+a+";");return 0>a?a:w(a/6)+31},"~S");b.getCIPChiralityName=c(b,"getCIPChiralityName",function(a){switch(a){case 13:return"Z";case 5:return"z";case 14:return"E";case 6:return"e";case 17:return"M";case 18:return"P";
case 1:return"R";case 2:return"S";case 9:return"r";case 10:return"s";case 25:return"m";case 26:return"p";case 7:return"?";default:return""}},"~N");b.getCIPRuleName=c(b,"getCIPRuleName",function(a){return JV.JC.ruleNames[a]},"~N");b.getCIPChiralityCode=c(b,"getCIPChiralityCode",function(a){switch(a.charCodeAt(0)){case 90:return 13;case 122:return 5;case 69:return 14;case 101:return 6;case 82:return 1;case 83:return 2;case 114:return 9;case 115:return 10;case 63:return 7;default:return 0}},"~S");b.isLikelyPDB=
c(b,"isLikelyPDB",function(a){var b=a.indexOf(":");0<b&&(a=a.substring(0,b));return JU.PT.isOneOf(a,";MMCif;MMTF;BCIF;Pdb;Pqr;P2n;JmolData;PyMOL;")},"~S");b.fixOptimadeCall=c(b,"fixOptimadeCall",function(a){var b=a.indexOf("response_fields=")+16;if(16>b)b=a.indexOf("?"),a+=(0>b?"?":"&")+"response_fields=chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species";else{for(var c=","+a.substring(b,(a+"&").indexOf("&",b))+",",d=c.length,g=0,e=0;0<=g;g=
e){e=",chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species,".indexOf(",",g+1);if(0>e)break;g=",chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species,".substring(g,e+1);0>c.indexOf(g)&&(c+=g.substring(1))}a=a.substring(0,b)+c.substring(1,c.length-1)+a.substring(b+d-2)}return a},"~S");b.resolveDataBase=c(b,"resolveDataBase",function(a,b,c){if(null==c){if(null==(c=JV.JC.databases.get(a.toLowerCase())))return null;
var d=b.indexOf("/");0>d&&(a.equals("pubchem")?b="name/"+b:a.equals("nci")&&(b+="/file?format=sdf&get3d=true"));c.startsWith("'")&&(d=b.indexOf("."),a=0<d?JU.PT.parseInt(b.substring(d+1)):0,0<d&&(b=b.substring(0,d)),c=JU.PT.rep(c,"%n",""+a))}else 0<=b.indexOf(".")&&0<=c.indexOf("%FILE.")&&(c=c.substring(0,c.indexOf("%FILE")));if(0<=c.indexOf("%c")){d=1;for(a=b.length;d<=a;d++)0<=c.indexOf("%c"+d)&&(c=JU.PT.rep(c,"%c"+d,b.substring(d-1,d).toLowerCase()))}return 0<=c.indexOf("%FILE")?JU.PT.rep(c,"%FILE",
b):0<=c.indexOf("%file")?JU.PT.rep(c,"%file",b.toLowerCase()):c+b},"~S,~S,~S");b.fixProtocol=c(b,"fixProtocol",function(a){var b=null!=a&&0<=a.indexOf("http"),b=null==a||!b?a:0==a.indexOf("http://www.rcsb.org/pdb/files/")?JV.JC.resolveDataBase(0<=a.indexOf("/ligand/")?"ligand":"pdb",a.substring(a.lastIndexOf("/")+1),null):0==a.indexOf("http://www.ebi")||0==a.indexOf("http://rruff")||0==a.indexOf("http://pubchem")||0==a.indexOf("http://cactus")||0==a.indexOf("http://www.materialsproject")?"https://"+
a.substring(7):0<a.indexOf("optimade")?JV.JC.fixOptimadeCall(a):a;b!==a&&JU.Logger.info("JC.fixProtocol "+a+" --\x3e "+b);return b},"~S");b.embedScript=c(b,"embedScript",function(a){return"\n/****** Jmol Embedded Script **** \n"+a+"\n**/"},"~S");b.getShapeVisibilityFlag=c(b,"getShapeVisibilityFlag",function(a){return 16<<Math.min(a,26)},"~N");b.shapeTokenIndex=c(b,"shapeTokenIndex",function(a){switch(a){case 1153433601:case 1073741859:return 0;case 1677721602:case 659488:return 1;case 1613238294:return 2;
case 1611141176:return 3;case 659482:return 4;case 1825200146:return 5;case 1745489939:case 537006096:return 6;case 1112152076:return 7;case 1112152070:return 8;case 1114249217:return 9;case 1112152078:return 10;case 1112152066:return 11;case 1649022989:return 12;case 1112152071:return 13;case 1112152073:return 14;case 1112152074:return 15;case 1112150019:return 16;case 135175:return 17;case 135198:return 18;case 1112150021:return 19;case 1112150020:return 20;case 1275203608:return 21;case 135174:return 23;
case 135176:return 22;case 135180:return 24;case 134353926:return 25;case 135182:return 26;case 1073877010:return 27;case 1073877011:return 28;case 135188:return 29;case 135190:return 30;case 537022465:return 31;case 1611272194:return 34;case 1812599299:return 32;case 1814695966:return 33;case 544771:return 35;case 1611272202:return 36}return-1},"~N");b.getShapeClassName=c(b,"getShapeClassName",function(a,b){return 0>a?JV.JC.shapeClassBases[~a]:"J."+(b?"render":"shape")+(9<=a&&16>a?"bio.":16<=a&&
23>a?"special.":24<=a&&30>a?"surface.":23==a?"cgo.":".")+JV.JC.shapeClassBases[a]},"~N,~B");b.getEchoName=c(b,"getEchoName",function(a){return JV.JC.echoNames[a]},"~N");b.setZPosition=c(b,"setZPosition",function(a,b){return a&-49|b},"~N,~N");b.setPointer=c(b,"setPointer",function(a,b){return a&-4|b},"~N,~N");b.getPointer=c(b,"getPointer",function(a){return a&3},"~N");b.getPointerName=c(b,"getPointerName",function(a){return 0==(a&1)?"":0<(a&2)?"background":"on"},"~N");b.isOffsetAbsolute=c(b,"isOffsetAbsolute",
function(a){return 0!=(a&64)},"~N");b.getOffset=c(b,"getOffset",function(a,b,c){a=Math.min(Math.max(a,-500),500);b=Math.min(Math.max(b,-500),500);var d=(a&1023)<<21|(b&1023)<<11|(c?64:0);if(8396800==d)d=0;else if(!c&&(0==a||0==b))d|=256;return d},"~N,~N,~B");b.getXOffset=c(b,"getXOffset",function(a){if(0==a)return 4;a=a>>21&1023;return 500<a?a-1023-1:a},"~N");b.getYOffset=c(b,"getYOffset",function(a){if(0==a)return 4;a=a>>11&1023;return 500<a?a-1023-1:a},"~N");b.getAlignment=c(b,"getAlignment",function(a){return a&
12},"~N");b.setHorizAlignment=c(b,"setHorizAlignment",function(a,b){return a&-13|b},"~N,~N");b.getHorizAlignmentName=c(b,"getHorizAlignmentName",function(a){return JV.JC.hAlignNames[a>>2&3]},"~N");b.isSmilesCanonical=c(b,"isSmilesCanonical",function(a){return null!=a&&JU.PT.isOneOf(a.toLowerCase(),";/cactvs///;/cactus///;/nci///;/canonical///;")},"~S");b.getServiceCommand=c(b,"getServiceCommand",function(a){return 7>a.length?-1:"JSPECVIPEAKS: SELECT:JSVSTR:H1SIMULC13SIMUNBO:MODNBO:RUNNBO:VIENBO:SEANBO:CONNONESIM".indexOf(a.substring(0,
7).toUpperCase())},"~S");b.getUnitIDFlags=c(b,"getUnitIDFlags",function(a){var b=14;0==a.indexOf("-")&&(0<a.indexOf("m")&&(b|=1),0>a.indexOf("a")&&(b^=4),0<a.indexOf("t")&&(b|=16));return b},"~S");b.getBoolName=c(b,"getBoolName",function(a){return JV.JC.globalBooleans[a]},"~N");b.isSpaceGroupInfoKey=c(b,"isSpaceGroupInfoKey",function(a){a=a.toLowerCase();return 0<=a.indexOf("nitcell")||a.equals("coordinatesarerractional")||a.startsWith("spacegroup")||a.startsWith("ssg")||0<=a.indexOf("ymmet")||a.startsWith("f2c")||
a.startsWith("lattice")||a.startsWith("intltable")},"~S");b.getMenuScript=c(b,"getMenuScript",function(a){return"openPDB"===a?"var x__id__ = _modelTitle; if (x__id__.length != 4) { x__id__ = '1crn'};x__id__ = prompt('"+J.i18n.GT.$('Enter a four-digit PDB model ID or "=" and a three-digit ligand ID')+"',x__id__);if (!x__id__ || x__id__=='null') { quit }; load @{'=' + x__id__}":"openMOL"===a?"var x__id__ = _smilesString; if (!x__id__) { x__id__ = 'tylenol'};x__id__ = prompt('"+J.i18n.GT.$('Enter the name or identifier (SMILES, InChI, CAS) of a compound. Preface with ":" to load from PubChem; otherwise Jmol will use the NCI/NIH Resolver.')+
"',x__id__);if (!x__id__ || x__id__=='null') { quit }; load @{(x__id__[1]==':' ? x__id__ : '$' + x__id__)}":null},"~S");b.axisLabels=x(-1,["+X","+Y","+Z",null,null,null,"a","b","c","X","Y","Z",null,null,null,"X",null,"Z",null,"(Y)",null,"u","v","w"]);b.axesTypes=x(-1,"abcxyzuvw".split(""));b.ruleNames=x(-1," 1a 1b 2 3 4a 4b 4c 5 6".split(" "));b.databaseArray=x(-1,"itatable;https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-getgen?gnum=%FILE&what=gp&list=Standard%2FDefault+Setting;itadiagramita;https://onlinelibrary.wiley.com/iucr/itc/Ac/ch2o3v0001/sgtable2o3o%FILE;itadiagram;http://img.chem.ucl.ac.uk/sgp/large/%FILEaz1.htm;aflowbin;http://aflowlib.mems.duke.edu/users/jmolers/binary_new/%FILE.aflow_binary;aflowlib;https://raw.githubusercontent.com/aflow-org/aflow_prototype_encyclopedia/refs/heads/main/data/%FILE/aflow.cif;aflowpro;$aflowlib;ams;'https://www.rruff.net/AMS/jsmol_search.php?'+(0+'%file'==0? 'mineral':'id')+'=%file&filetype=cif#_DOCACHE_';dssr;https://jmol.x3dna-dssr.org/report.php?id=%FILE;dssrModel;https://jmol.x3dna-dssr.org/report.php?POST?&model=;iucr;http://scripts.iucr.org/cgi-bin/sendcif_yard?%FILE;cod;http://www.crystallography.net/cod/cif/%c1/%c2%c3/%c4%c5/%FILE.cif;nmr;https://www.nmrdb.org/new_predictor?POST?molfile=;nmrdb;https://www.nmrdb.org/service/predictor?POST?molfile=;nmrdb13;https://www.nmrdb.org/service/jsmol13c?POST?molfile=;magndata;http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif;rna3d;http://rna.bgsu.edu/rna3dhub/%TYPE/download/%FILE;mmtf;https://mmtf.rcsb.org/v1.0/full/%FILE;bcif;https://models.rcsb.org/%file.bcif;chebi;https://www.ebi.ac.uk/chebi/saveStructure.do?defaultImage=true&chebiId=%file%2D%;ligand;https://files.rcsb.org/ligands/download/%FILE.cif;nci;https://cactus.nci.nih.gov/chemical/structure/;pdb;https://files.rcsb.org/download/%FILE.pdb;pdb0;https://files.rcsb.org/download/%FILE.pdb;pdbe;https://www.ebi.ac.uk/pdbe/entry-files/download/%file.cif;pdbe2;https://www.ebi.ac.uk/pdbe/static/entry/%file_updated.cif;pubchem;https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d;map;https://www.ebi.ac.uk/pdbe/api/%TYPE/%FILE?pretty=false&metadata=true;pdbemap;https://www.ebi.ac.uk/pdbe/coordinates/files/%file.ccp4;pdbemapdiff;https://www.ebi.ac.uk/pdbe/coordinates/files/%file_diff.ccp4;pdbemapserver;https://www.ebi.ac.uk/pdbe/volume-server/x-ray/%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif;pdbemapdiffserver;https://www.ebi.ac.uk/pdbe/volume-server/x-ray/%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif&diff=1;emdbmap;https://www.ebi.ac.uk/pdbe/volume-server/emd/emd-%file/cell?detail=6&space=cartesian&encoding=bcif;emdbquery;https://www.ebi.ac.uk/emdb/api/search/fitted_pdbs:%file?fl=emdb_id,map_contour_level_value&wt=csv;emdbmapserver;https://www.ebi.ac.uk/pdbe/volume-server/emd/emd-%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif;xxxresolverResolver;https://chemapps.stolaf.edu/resolver;smiles2d;https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&operator=remove_hydrogens;smiles3d;https://cactus.nci.nih.gov/chemical/structure//%FILE/file?format=sdf&get3d=true".split(";"));
b.databases=new java.util.Hashtable;for(var a=0;a<JV.JC.databaseArray.length;a+=2){var d=JV.JC.databaseArray[a+1];"$"==d.charAt(0)&&(d=JV.JC.databases.get(d.substring(1)));JV.JC.databases.put(JV.JC.databaseArray[a].toLowerCase(),d)}var g=d=b.majorVersion=null,d=Jmol.___JmolVersion,g=Jmol.___JmolDate;null!=g&&(g=g.substring(7,23));JV.JC.version=null!=d?d:"(Unknown_version)";JV.JC.majorVersion=null!=d?d:"(Unknown_version)";JV.JC.date=null!=g?g:"(Unknown_date)";d=-1;try{var l=JV.JC.version,g="",a=l.indexOf(".");
0>a&&(d=1E5*Integer.parseInt(l),l=null);if(null!=l&&(d=1E5*Integer.parseInt(g=l.substring(0,a)),l=l.substring(a+1),a=l.indexOf("."),0>a&&(d+=1E3*Integer.parseInt(l),l=null),null!=l)){var e=l.substring(0,a);JV.JC.majorVersion=g+("."+e);d+=1E3*Integer.parseInt(e);l=l.substring(a+1);a=l.indexOf("_");0<=a&&(l=l.substring(0,a));a=l.indexOf(" ");0<=a&&(l=l.substring(0,a));d+=Integer.parseInt(l)}}catch(f){if(!H(f,"NumberFormatException"))throw f;}JV.JC.versionInt=d;b.center=JU.V3.new3(0,0,0);b.axisX=JU.V3.new3(1,
0,0);b.axisY=JU.V3.new3(0,1,0);b.axisZ=JU.V3.new3(0,0,1);b.axisNX=JU.V3.new3(-1,0,0);b.axisNY=JU.V3.new3(0,-1,0);b.axisNZ=JU.V3.new3(0,0,-1);b.unitAxisVectors=x(-1,[JV.JC.axisX,JV.JC.axisY,JV.JC.axisZ,JV.JC.axisNX,JV.JC.axisNY,JV.JC.axisNZ]);b.altArgbsCpk=F(-1,[4294907027,4290750118,4294967088,4283897743,4294967232,4294967200,4292401368,4283453520,4282400832,4279259216]);b.FORMAL_CHARGE_COLIX_RED=JU.Elements.elementSymbols.length+JV.JC.altArgbsCpk.length;b.argbsFormalCharge=F(-1,[4294901760,4294918208,
4294934656,4294951104,4294967295,4292401407,4290032895,4287664383,4285295871,4282927359,4280558847,4278190335]);b.PARTIAL_CHARGE_COLIX_RED=JV.JC.FORMAL_CHARGE_COLIX_RED+JV.JC.argbsFormalCharge.length;b.argbsRwbScale=F(-1,[4294901760,4294905872,4294909984,4294914096,4294918208,4294922320,4294926432,4294930544,4294934656,4294938768,4294942880,4294946992,4294951104,4294955216,4294959328,4294967295,4292927743,4291875071,4290822399,4289769727,4288717055,4287664383,4286611711,4285559039,4284506367,4283453695,
4282401023,4281348351,4280295679,4279243007,4278190335]);b.PARTIAL_CHARGE_RANGE_SIZE=JV.JC.argbsRwbScale.length;b.argbsRoygbScale=F(-1,[4294901760,4294909952,4294918144,4294926336,4294934528,4294942720,4294950912,4294959104,4294963200,4294967040,4293980160,4292935424,4290838272,4288741120,4286643968,4284546816,4282449664,4280352512,4278255360,4278255392,4278255424,4278255456,4278255488,4278255520,4278255552,4278255584,4278255615,4278247679,4278239487,4278231295,4278223103,4278214911,4278206719,4278198527,
4278190335]);b.predefinedVariable=x(-1,"@_1H _H & !(_2H,_3H);@_12C _C & !(_13C,_14C);@_14N _N & !(_15N);@solvent water, (_g>=45 & _g<48);@ligand _g=0|!(_g<46,protein,nucleic,water);@turn structure=1;@sheet structure=2;@helix structure=3;@helix310 substructure=7;@helixalpha substructure=8;@helixpi substructure=9;@magnetic vxyz>0;@bulges within(dssr,'bulges');@coaxStacks within(dssr,'coaxStacks');@hairpins within(dssr,'hairpins');@hbonds within(dssr,'hbonds');@helices within(dssr,'helices');@iloops within(dssr,'iloops');@isoCanonPairs within(dssr,'isoCanonPairs');@junctions within(dssr,'junctions');@kissingLoops within(dssr,'kissingLoops');@multiplets within(dssr,'multiplets');@nonStack within(dssr,'nonStack');@nts within(dssr,'nts');@pairs within(dssr,'pairs');@ssSegments within(dssr,'ssSegments');@stacks within(dssr,'stacks');@stems within(dssr,'stems')".split(";"));
b.predefinedStatic=x(-1,"@amino _g>0 & _g<=23;@acidic asp,glu;@basic arg,his,lys;@charged acidic,basic;@negative acidic;@positive basic;@neutral amino&!(acidic,basic);@polar amino&!hydrophobic;@peptide protein&within(chain,monomer>1)&!within(chain,monomer>12);@cyclic his,phe,pro,trp,tyr;@acyclic amino&!cyclic;@aliphatic ala,gly,ile,leu,val;@aromatic his,phe,trp,tyr;@cystine within(group,(cys,cyx)&atomname=sg&connected((cys,cyx)&atomname=sg));@buried ala,cys,ile,leu,met,phe,trp,val;@surface amino&!buried;@hydrophobic ala,gly,ile,leu,met,phe,pro,trp,tyr,val;@mainchain backbone;@small ala,gly,ser;@medium asn,asp,cys,pro,thr,val;@large arg,glu,gln,his,ile,leu,lys,met,phe,trp,tyr;@c nucleic & ([C] or [DC] or within(group,_a=42));@g nucleic & ([G] or [DG] or within(group,_a=43));@cg c,g;@a nucleic & ([A] or [DA] or within(group,_a=44));@t nucleic & ([T] or [DT] or within(group,_a=45 | _a=49));@at a,t;@i nucleic & ([I] or [DI] or within(group,_a=46) & !g);@u nucleic & ([U] or [DU] or within(group,_a=47) & !t);@tu nucleic & within(group,_a=48);@ions _g>=46&_g<48;@alpha _a=2;@_bb protein&(_a>=1&_a<6|_a=64) | nucleic&(_a>=6&_a<14|_a>=73&&_a<=79||_a==99||_a=100);@backbone _bb | _H && connected(single, _bb);@spine protein&_a>=1&_a<4|nucleic&(_a>=6&_a<11|_a=13);@sidechain (protein,nucleic) & !backbone;@base nucleic & !backbone;@dynamic_flatring search('[a]');@nonmetal _H,_He,_B,_C,_N,_O,_F,_Ne,_Si,_P,_S,_Cl,_Ar,_As,_Se,_Br,_Kr,_Te,_I,_Xe,_At,_Rn;@metal !nonmetal && !_Xx;@alkaliMetal _Li,_Na,_K,_Rb,_Cs,_Fr;@alkalineEarth _Be,_Mg,_Ca,_Sr,_Ba,_Ra;@nobleGas _He,_Ne,_Ar,_Kr,_Xe,_Rn;@metalloid _B,_Si,_Ge,_As,_Sb,_Te;@transitionMetal elemno>=21&elemno<=30|elemno=57|elemno=89|elemno>=39&elemno<=48|elemno>=72&elemno<=80|elemno>=104&elemno<=112;@lanthanide elemno>57&elemno<=71;@actinide elemno>89&elemno<=103".split(";"));
b.shapeClassBases=x(-1,"Balls Sticks Hsticks Sssticks Struts Labels Measures Stars Halos Backbone Trace Cartoon Strands MeshRibbon Ribbons Rockets Dots Dipoles Vectors GeoSurface Ellipsoids Polyhedra Draw CGO Isosurface Contact LcaoCartoon MolecularOrbital NBO Pmesh Plot3D Echo Bbcage Uccage Axes Hover Frank".split(" "));b.echoNames=x(-1,["top","bottom","middle","xy","xyz"]);b.hAlignNames=x(-1,["","left","center","right"]);b.globalBooleans=x(-1,"someModelsHaveFractionalCoordinates someModelsHaveSymmetry someModelsHaveUnitcells someModelsHaveCONECT isPDB someModelsHaveDomains someModelsHaveValidations isSupercell someModelsHaveAromaticBonds someModelsAreModulated".split(" "))});
s("JV");B(["java.io.IOException"],"JV.JmolAsyncException",null,function(){var b=n(function(){this.fileName=null;v(this,arguments)},JV,"JmolAsyncException",java.io.IOException);A(b,function(a){M(this,JV.JmolAsyncException,[]);this.fileName=a},"~S");c(b,"getFileName",function(){return this.fileName})});s("JV");B(null,"JV.ModelManager",["JM.ModelLoader"],function(){var b=n(function(){this.fileName=this.modelSetPathName=this.modelSet=this.vwr=null;v(this,arguments)},JV,"ModelManager",null);A(b,function(a){this.vwr=
a},"JV.Viewer");c(b,"zap",function(){this.modelSetPathName=this.fileName=null;new JM.ModelLoader(this.vwr,this.vwr.getZapName(),null,null,null,null)});c(b,"createModelSet",function(a,b,c,l,e,f){var h=null;f?(h=this.modelSet.modelSetName,h.equals("zapped")?h=null:0>h.indexOf(" (modified)")&&(h+=" (modified)")):null==l?this.zap():(this.modelSetPathName=a,this.fileName=b);null!=l&&(null==h&&(h=this.vwr.getModelAdapter().getAtomSetCollectionName(l),null!=h&&(h=h.trim(),0==h.length&&(h=null)),null==h&&
(h=JV.ModelManager.reduceFilename(b))),new JM.ModelLoader(this.vwr,h,c,l,f?this.modelSet:null,e));0==this.modelSet.ac&&!this.modelSet.getMSInfoB("isPyMOL")&&this.zap()},"~S,~S,JU.SB,~O,JU.BS,~B");b.reduceFilename=c(b,"reduceFilename",function(a){if(null==a)return null;var b=a.indexOf(".");0<b&&(a=a.substring(0,b));24<a.length&&(a=a.substring(0,20)+" ...");return a},"~S");c(b,"createAtomDataSet",function(a,b){return JM.ModelLoader.createAtomDataSet(this.vwr,this.modelSet,b,a,this.vwr.bsA())},"~O,~N")});
s("JV");z=n(function(){this.y=this.x=-1E3;this.modifiers=0;this.time=-1;this.modelIndex=0;this.name=null;this.keybuf=0;v(this,arguments)},JV,"MouseState",null);A(z,function(b){this.name=b},"~S");c(z,"setModelIndex",function(b){this.modelIndex=b},"~N");c(z,"set",function(b,a,c,g){this.time=b;this.x=a;this.y=c;this.modifiers=g},"~N,~N,~N,~N");c(z,"setCurrent",function(b,a){this.time=b.time;2>a&&(this.x=b.x,this.y=b.y);this.modifiers=b.modifiers},"JV.MouseState,~N");c(z,"inRange",function(b,a,c){return Math.abs(this.x-
a)<=b&&Math.abs(this.y-c)<=b},"~N,~N,~N");c(z,"check",function(b,a,c,g,l,e){return this.modifiers==g&&(2147483647<=e?this.inRange(b,a,c):l-this.time<e&&20<l-this.time)},"~N,~N,~N,~N,~N,~N");c(z,"is",function(b){return b.x==this.x&&b.y==this.y&&b.time==this.time},"JV.MouseState");s("JV");B(["J.api.JmolSelectionListener","JU.BS"],"JV.SelectionManager","JU.AU J.c.PAL J.i18n.GT JU.BSUtil $.C $.Escape".split(" "),function(){var b=n(function(){this.bsSelection=this.listeners=this.vwr=this.bsFixed=this.bsHidden=
this.noneSelected=this.bsDeleted=this.bsSubset=null;this.empty=1;this.hideNotSelected=!1;this.colorer=this.bsTemp=null;v(this,arguments)},JV,"SelectionManager",null);P(b,function(){this.bsHidden=new JU.BS;this.bsFixed=new JU.BS;this.bsSelection=new JU.BS;this.bsTemp=new JU.BS});A(b,function(a){this.vwr=a;this.listeners=[];this.colorer=new JV.SelectionManager.SelectionColorer(a);this.addListener(this.colorer)},"JV.Viewer");c(b,"processDeletedModelAtoms",function(a){JU.BSUtil.deleteBits(this.bsDeleted,
a);JU.BSUtil.deleteBits(this.bsSubset,a);JU.BSUtil.deleteBits(this.bsFixed,a);JU.BSUtil.deleteBits(this.bsHidden,a);var b=JU.BSUtil.copy(this.bsSelection);JU.BSUtil.deleteBits(b,a);this.setSelectionSet(b,0);this.selectionChanged(!1)},"JU.BS");c(b,"clear",function(){this.clearSelection(!0);this.setSelectionSubset(null);this.hide(null,null,0,!0);this.bsDeleted=null;this.setMotionFixedAtoms(null)});c(b,"display",function(a,b,c,l){switch(c){default:c=null==this.bsSubset?null:JU.BSUtil.andNot(JU.BSUtil.copy(this.bsHidden),
this.bsSubset);var e=a.getModelAtomBitSetIncludingDeleted(-1,!1);this.bsHidden.or(e);null!=c&&(this.bsHidden.and(this.bsSubset),this.bsHidden.or(c));case 1275069441:null!=b&&this.bsHidden.andNot(b);break;case 1073742119:null!=b&&this.bsHidden.or(b)}JU.BSUtil.andNot(this.bsHidden,this.bsDeleted);a.setBsHidden(this.bsHidden);l||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms hidden"),this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(b,"hide",function(a,b,c,l){var e=0==c||null==
this.bsSubset?null:JU.BSUtil.andNot(JU.BSUtil.copy(this.bsHidden),this.bsSubset);JV.SelectionManager.setBitSet(this.bsHidden,b,c);null!=e&&this.bsHidden.or(e);null!=a&&a.setBsHidden(this.bsHidden);l||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms hidden"),this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(b,"setSelectionSet",function(a,b){JV.SelectionManager.setBitSet(this.bsSelection,a,b);this.empty=-1},"JU.BS,~N");b.setBitSet=c(b,"setBitSet",function(a,b,c){switch(c){default:a.clearAll();
case 1275069441:null!=b&&a.or(b);break;case 1073742119:null!=b&&a.andNot(b)}},"JU.BS,JU.BS,~N");c(b,"getHiddenSet",function(){return this.bsHidden});c(b,"getHideNotSelected",function(){return this.hideNotSelected});c(b,"setHideNotSelected",function(a){(this.hideNotSelected=a)&&this.selectionChanged(!1)},"~B");c(b,"isSelected",function(a){return 0<=a&&this.bsSelection.get(a)},"~N");c(b,"select",function(a,b,c){null==a?this.selectAll(!0):this.setSelectionSet(a,b);this.vwr.getBoolean(1612709900)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1612709900,
null));this.vwr.getBoolean(1612709894)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1612709894,null));this.selectionChanged(!1);if((a=this.vwr.getBoolean(603979879))||!c)b=this.getSelectionCount(),a?this.vwr.getChimeMessenger().reportSelection(b):c||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms selected"),b))},"JU.BS,~N,~B");c(b,"selectAll",function(a){var b=this.vwr.ms.ac;for(this.empty=0==b?1:0;0<=--b;)this.bsSelection.set(b);JU.BSUtil.andNot(this.bsSelection,this.bsDeleted);this.selectionChanged(a)},
"~B");c(b,"clearSelection",function(a){this.setHideNotSelected(!1);this.bsSelection.clearAll();this.empty=1;this.selectionChanged(a)},"~B");c(b,"isAtomSelected",function(a){return((null==this.bsSubset||this.bsSubset.get(a))&&null==this.bsDeleted||!this.bsDeleted.get(a))&&this.bsSelection.get(a)},"~N");c(b,"setSelectedAtom",function(a,b){0>a?this.selectionChanged(!0):null!=this.bsSubset&&!this.bsSubset.get(a)||null!=this.bsDeleted&&this.bsDeleted.get(a)||(this.bsSelection.setBitTo(a,b),this.empty=
b?0:-1)},"~N,~B");c(b,"setSelectionSubset",function(a){this.bsSubset=a},"JU.BS");c(b,"isInSelectionSubset",function(a){return 0>a||this.vwr.am.splitFrame&&!this.vwr.am.isSplitFrameSelectable(a)||null==this.bsSubset||this.bsSubset.get(a)},"~N");c(b,"invertSelection",function(){JU.BSUtil.invertInPlace(this.bsSelection,this.vwr.ms.ac);this.empty=0<this.bsSelection.length()?0:1;this.selectionChanged(!1)});c(b,"excludeSelectionSet",function(a){null==a||1==this.empty||(this.bsSelection.andNot(a),this.empty=
-1)},"JU.BS");c(b,"getSelectionCount",function(){if(1==this.empty)return 0;this.empty=1;var a;null==this.bsSubset?a=this.bsSelection:(this.bsTemp.clearAll(),this.bsTemp.or(this.bsSubset),this.bsTemp.and(this.bsSelection),a=this.bsTemp);a=a.cardinality();0<a&&(this.empty=0);return a});c(b,"addListener",function(a){for(var b=this.listeners.length;0<=--b;)if(this.listeners[b]===a){this.listeners[b]=null;break}for(var c=this.listeners.length,b=c;0<=--b;)if(null==this.listeners[b]){this.listeners[b]=a;
return}this.listeners=0==this.listeners.length?Array(1):JU.AU.doubleLength(this.listeners);this.listeners[c]=a},"J.api.JmolSelectionListener");c(b,"selectionChanged",function(a){this.hideNotSelected&&this.hide(this.vwr.ms,JU.BSUtil.copyInvert(this.bsSelection,this.vwr.ms.ac),0,a);if(!(a||0==this.listeners.length))for(a=this.listeners.length;0<=--a;)null!=this.listeners[a]&&this.listeners[a].selectionChanged(this.bsSelection)},"~B");c(b,"deleteAtoms",function(a){var b=JU.BSUtil.copy(a);null==this.bsDeleted?
this.bsDeleted=b:(b.andNot(this.bsDeleted),this.bsDeleted.or(a));this.bsHidden.andNot(this.bsDeleted);this.bsSelection.andNot(this.bsDeleted);return b.cardinality()},"JU.BS");c(b,"getSelectedAtoms",function(a){a=a||null!=this.bsSubset?JU.BSUtil.copy(this.bsSelection):this.bsSelection;if(null==this.bsSubset)return a;a.and(this.bsSubset);return a},"~B");c(b,"getSelectedAtomsNoSubset",function(){return JU.BSUtil.copy(this.bsSelection)});c(b,"excludeAtoms",function(a,b){null!=this.bsDeleted&&a.andNot(this.bsDeleted);
!b&&null!=this.bsSubset&&(a=JU.BSUtil.copy(a)).and(this.bsSubset);return a},"JU.BS,~B");c(b,"setMotionFixedAtoms",function(a){this.bsFixed.clearAll();null!=a&&this.bsFixed.or(a)},"JU.BS");c(b,"getMotionFixedAtoms",function(){return this.bsFixed});c(b,"setSelectionColors",function(a,b,c,l){this.colorer.set(a,b,c,l);this.vwr.selectStatus(this.getSelectedAtoms(!0),!1,0,!1,!0);this.colorer.enabled=null!=a||null!=b},"Integer,Integer,~S,~N");c(b,"getSelectionColors",function(){return this.colorer.enabled?
this.colorer.toString():"NULL NULL"});b=n(function(){this.enabled=!1;this.vwr=this.translucentLevel=this.translucency=this.bsColorUnselected=this.bsColorSelected=this.colorUnselected=this.colorSelected=null;v(this,arguments)},JV.SelectionManager,"SelectionColorer",null,J.api.JmolSelectionListener);A(b,function(a){this.vwr=a},"JV.Viewer");j(b,"selectionChanged",function(a){if(this.enabled){var b=this.vwr.getAllAtoms();JU.BSUtil.copy2(a,this.bsColorSelected);JU.BSUtil.copy2(b,this.bsColorUnselected);
this.bsColorUnselected.andNot(this.bsColorSelected);this.vwr.shm.setShapePropertyBs(0,"color",this.colorSelected,this.bsColorSelected);this.vwr.shm.setShapePropertyBs(0,"color",this.colorUnselected,this.bsColorUnselected);null!=this.translucency&&(this.vwr.shm.setShapePropertyBs(0,"translucency",this.translucency,this.bsColorUnselected),this.vwr.shm.setShapePropertyBs(0,"translucentLevel",this.translucentLevel,this.bsColorUnselected))}},"JU.BS");c(b,"colorString",function(a,b){if(null==a||a===J.c.PAL.NONE)return"NULL";
var c=JU.C.getShadedRGB(a.intValue(),b?this.translucentLevel.doubleValue():0);return"#"+JU.Escape.getHexColorFromRGB(c)},"~O,~B");c(b,"set",function(a,b,c,l){null==this.bsColorSelected&&(this.bsColorSelected=new JU.BS,this.bsColorUnselected=new JU.BS);this.colorSelected=null==a?J.c.PAL.NONE:a;this.colorUnselected=null==b?J.c.PAL.NONE:b;1.7976931348623157E308==l?this.translucency=null:(this.translucency=c,this.translucentLevel=Double.$valueOf(l));this.enabled=!0},"Integer,Integer,~S,~N");j(b,"toString",
function(){return this.colorString(this.colorSelected,!1)+" "+this.colorString(this.colorUnselected,null!=this.translucency)})});s("JV");B(null,"JV.ShapeManager","JU.BS $.P3 J.api.Interface J.c.PAL $.VDW J.shape.Shape JU.BSUtil $.C JV.JC".split(" "),function(){var b=n(function(){this.navMinMax=this.bsSlabbedInternal=this.bsRenderableAtoms=this.scaleText=this.vwr=this.shapes=this.ms=null;v(this,arguments)},JV,"ShapeManager",null);P(b,function(){this.navMinMax=F(4,0)});A(b,function(a){this.vwr=a;this.bsRenderableAtoms=
new JU.BS;this.bsSlabbedInternal=new JU.BS},"JV.Viewer");c(b,"findNearestShapeAtomIndex",function(a,b,c,l){if(null!=this.shapes)for(var e=0;e<this.shapes.length&&null==c[0];++e)null!=this.shapes[e]&&this.shapes[e].findNearestAtomIndex(a,b,c,l)},"~N,~N,~A,JU.BS");c(b,"getShapePropertyIndex",function(a,b,c){if(null==this.shapes||null==this.shapes[a])return null;this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getProperty(b,c);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~N");c(b,"getShapePropertyData",
function(a,b,c){if(null==this.shapes||null==this.shapes[a])return!1;this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getPropertyData(b,c);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~A");c(b,"getShapeIdFromObjectName",function(a){if(null!=this.shapes)for(var b=16;30>b;++b)if(null!=this.shapes[b]&&0<=this.shapes[b].getIndexFromName(a))return b;return null!=this.shapes[6]&&0<=this.shapes[6].getIndexFromName(a)?6:-1},"~S");c(b,"loadDefaultShapes",function(a){this.ms=a;if(null!=this.shapes)for(var b=
0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].setModelSet(a);this.loadShape(0);this.loadShape(1)},"JM.ModelSet");c(b,"loadShape",function(a){if(null==this.shapes)return null;if(null!=this.shapes[a])return this.shapes[a];if(2==a||3==a||4==a)return null;var b=JV.JC.getShapeClassName(a,!1);if(null==(b=J.api.Interface.getInterface(b,this.vwr,"shape")))return null;this.vwr.setShapeErrorState(a,"allocate");b.initializeShape(this.vwr,this.ms,a);this.vwr.setShapeErrorState(-1,null);return this.shapes[a]=
b},"~N");c(b,"notifyAtomPositionsChanged",function(a,b,c){var l=Integer.$valueOf(a);a=this.vwr.getModelUndeletedAtomsBitSet(a);for(var e=0;37>e;e++)null!=this.shapes[e]&&this.setShapePropertyBs(e,"refreshTrajectories",x(-1,[l,b,c]),a)},"~N,JU.BS,JU.M4");c(b,"releaseShape",function(a){null!=this.shapes&&(this.shapes[a]=null)},"~N");c(b,"setScale",function(){null!=this.scaleText&&(this.loadShape(31),this.setShapePropertyBs(31,"%SCALE",this.scaleText,null),this.scaleText=null)});c(b,"resetShapes",function(a){a&&
(a=Array(1),this.getShapePropertyData(31,"%SCALE",a),this.scaleText=a[0]);this.shapes=Array(37)},"~B");c(b,"setShapeProperties",function(a,b){this.vwr.setShapeErrorState(a,"set properties");this.loadShape(a).setProperties(b);this.vwr.setShapeErrorState(-1,null)},"~N,~A");c(b,"setShapeSizeBs",function(a,b,c,l){if(null!=this.shapes){if(null==l&&(1!=a||2147483647!=b))l=this.vwr.bsA();null!=c&&(0!=c.value&&c.vdwType===J.c.VDW.TEMP)&&this.ms.getBfactor100Lo();this.vwr.setShapeErrorState(a,"set size");
(null==c?0!=b:0!=c.value)&&this.loadShape(a);null!=this.shapes[a]&&this.shapes[a].setShapeSizeRD(b,c,l);this.vwr.setShapeErrorState(-1,null)}},"~N,~N,J.atomdata.RadiusData,JU.BS");c(b,"setLabel",function(a,b){if(null==a){if(null==this.shapes[5])return}else this.loadShape(5),this.setShapeSizeBs(5,0,null,b);this.setShapePropertyBs(5,"label",a,b)},"~O,JU.BS");c(b,"setShapePropertyBs",function(a,b,c,l){null==this.shapes||null==this.shapes[a]||(null==l&&(l=this.vwr.bsA()),this.vwr.setShapeErrorState(a,
"set "+b),this.shapes[a].setProperty(b.intern(),c,l),this.vwr.setShapeErrorState(-1,null))},"~N,~S,~O,JU.BS");c(b,"checkFrankclicked",function(a,b){var c=this.shapes[36];return null!=c&&c.wasClicked(a,b)},"~N,~N");c(b,"checkObjectClicked",function(a,b,c,l,e){var f,h=null;if(2==this.vwr.getPickingMode())return null==this.shapes[5]?null:this.shapes[5].checkObjectClicked(a,b,c,l,!1);if(0!=c&&this.vwr.getBondsPickable()&&null!=(h=this.shapes[1].checkObjectClicked(a,b,c,l,!1)))return h;for(var j=0;j<JV.ShapeManager.clickableMax;j++)if(null!=
(f=this.shapes[JV.ShapeManager.hoverable[j]])&&null!=(h=f.checkObjectClicked(a,b,c,l,e)))return h;return null},"~N,~N,~N,JU.BS,~B");c(b,"checkObjectDragged",function(a,b,c,l,e,f,h){for(var j=!1,m=0<h?h+1:37;!j&&h<m;++h)null!=this.shapes[h]&&(j=this.shapes[h].checkObjectDragged(a,b,c,l,e,f));return j},"~N,~N,~N,~N,~N,JU.BS,~N");c(b,"checkObjectHovered",function(a,b,c,l){var e=this.shapes[1];if(l&&null!=e&&e.checkObjectHovered(a,b,c))return!0;for(l=0;l<JV.ShapeManager.hoverable.length;l++)if(e=this.shapes[JV.ShapeManager.hoverable[l]],
null!=e&&e.checkObjectHovered(a,b,c))return!0;return!1},"~N,~N,JU.BS,~B");c(b,"deleteShapeAtoms",function(a,b){if(null!=this.shapes)for(var c=0;37>c;c++)null!=this.shapes[c]&&this.setShapePropertyBs(c,"deleteModelAtoms",a,b)},"~A,JU.BS");c(b,"deleteVdwDependentShapes",function(a){null==a&&(a=this.vwr.bsA());this.setShapeAtomsSafely(24,"deleteVdw",a);this.setShapeAtomsSafely(25,"deleteVdw",a)},"JU.BS");c(b,"setShapeAtomsSafely",function(a,b,c){null!=this.shapes[a]&&this.shapes[a].setProperty(b,null,
c)},"~N,~S,JU.BS");c(b,"notifyAtoms",function(a,b){switch(a){case "atomslabeled":this.vwr.setModelkitPropertySafely("updatemodelkeys",b);break;case "atomsDeleted":this.setShapeAtomsSafely(6,a,b[0]);this.vwr.setModelkitPropertySafely("updatemodelkeys",b);break;case "atomsMoved":null!=this.getShape(22)&&this.vwr.setModelkitPropertySafely(a,b[0])}},"~S,~A");c(b,"getAtomShapeValue",function(a,b,c){a=JV.JC.shapeTokenIndex(a);if(0>a||null==this.shapes[a])return 0;c=this.shapes[a].getSize(c);if(0==c){if(0==
(b.shapeVisibilityFlags&this.shapes[a].vf))return 0;c=this.shapes[a].getSizeG(b)}return c/2E3},"~N,JM.Group,~N");c(b,"replaceGroup",function(a,b){if(null!=this.shapes)for(var c=9;16>c;c++)null!=this.shapes[c]&&this.shapes[c].replaceGroup(a,b)},"JM.Group,JM.Group");c(b,"getObjectMap",function(a,b){if(null!=this.shapes)for(var c=Boolean.$valueOf(b),l=16;30>l;++l)this.getShapePropertyData(l,"getNames",x(-1,[a,c]))},"java.util.Map,~B");c(b,"getProperty",function(a){return a.equals("getShapes")?this.shapes:
null},"~O");c(b,"getShape",function(a){return null==this.shapes?null:this.shapes[a]},"~N");c(b,"resetBioshapes",function(a){if(null!=this.shapes)for(var b=0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].isBioShape&&(this.shapes[b].setModelSet(this.ms),this.shapes[b].setShapeSizeRD(0,null,a),this.shapes[b].setProperty("color",J.c.PAL.NONE,a))},"JU.BS");c(b,"setAtomLabel",function(a,b){null!=this.shapes&&(this.shapes[5].setProperty("label:"+a,Integer.$valueOf(b),null),this.vwr.getModelkitPropertySafely(null)===
Boolean.TRUE&&this.notifyAtoms("atomslabeled",x(-1,[null,JU.BSUtil.newAndSetBit(this.vwr.ms.at[b].mi)])))},"~S,~N");c(b,"setModelVisibility",function(a){var b=this.shapes;if(!(null==b||null==b[0])){null==a&&(a=this.vwr.getVisibleFramesBitSet());null!=b[8]&&b[8].setProperty("highlight",null,null);for(var c=8;33>c;c++)null!=b[c]&&b[c].setModelVisibilityFlags(a);var b=this.vwr.getBoolean(603979922),l=this.vwr.slm.bsDeleted,e=this.ms.at;this.ms.clearVisibleSets();if(0<e.length)for(c=this.ms.ac;0<=--c;){var f=
e[c];null!=f&&(f.shapeVisibilityFlags&=-64);if(!(null!=l&&l.get(c))&&a.get(f.mi)){var h=1;if(!this.ms.isAtomHidden(c)&&(b||1!=f.getElementNumber()))h|=8,0!=f.madAtom&&(h|=16),f.setShapeVisibility(h,!0)}}this.setShapeVis()}},"JU.BS");c(b,"setShapeVis",function(){for(var a=0;37>a;++a){var b=this.shapes[a];null!=b&&b.setAtomClickability()}});c(b,"finalizeAtoms",function(a,b){var c=this.vwr,l=c.tm;b&&c.finalizeTransformParameters();if(null!=a){var e=this.ms.getAtomSetCenter(a),f=new JU.P3;l.transformPt3fSafe(e,
f);f.add(l.ptOffset);l.unTransformPoint(f,f);f.sub(e);c.setAtomCoordsRelative(f,a);l.ptOffset.set(0,0,0);l.bsSelectedAtoms=null}e=this.bsRenderableAtoms;this.ms.getAtomsInFrame(e);var h=this.ms.vibrations,j=null!=h&&l.vibrationOn,m=null!=this.ms.bsModulated&&null!=this.ms.occupancies,n=this.ms.at,p,q=c.getInt(553648159),r=!1,u=this.bsSlabbedInternal;u.clearAll();for(var s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1)){var f=n[s],v=j&&f.hasVibration()?l.transformPtVibSafe(f,h[s]):l.transformPtSafe(f);1==
v.z&&(l.internalSlab&&l.xyzIsSlabbedInternal(f))&&u.set(s);f.sX=v.x;f.sY=v.y;f.sZ=v.z;var x=Math.abs(f.madAtom);32200==x&&(x=D(2E3*c.getFloat(1153433601)));f.sD=D(c.tm.scaleToScreen(v.z,x));if(m&&null!=h[s]&&-2147483648!=(p=h[s].getOccupancy100(j)))r=!0,f.setShapeVisibility(2,!1),0<=p&&p<q?f.setShapeVisibility(24,!1):f.setShapeVisibility(8|(0<f.madAtom?16:0),!0),this.ms.occupancies[f.i]=Math.abs(p)}r&&this.setShapeVis();p=c.gdata;if(l.slabEnabled){s=c.getBoolean(603979940);l=c.getBoolean(603979939);
h=p.slab;j=p.depth;if(s){m=this.ms.getMolecules();q=this.ms.getMoleculeCountInModel(-1);for(s=0;s<q;s++)if(r=m[s],u=0,f=r.firstAtomIndex,e.get(f)){for(;u<r.ac&&!p.isClippedZ(n[f].sZ-(n[f].sD>>1));u++,f++);if(u!=r.ac){f=r.firstAtomIndex;for(u=0;u<r.ac;u++)e.clear(f),n[f++].sZ=0}}}for(s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1))if(f=n[s],p.isClippedZ(f.sZ-(l?n[s].sD>>1:0)))f.setClickable(0),m=w((l?-1:1)*f.sD/2),(f.sZ+m<h||f.sZ-m>j||!p.isInDisplayRange(f.sX,f.sY))&&e.clear(s)}if(0==this.ms.ac||!c.getShowNavigationPoint())return null;
c=2147483647;l=-2147483648;p=2147483647;h=-2147483648;for(s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1))f=n[s],f.sX<c&&(c=f.sX),f.sX>l&&(l=f.sX),f.sY<p&&(p=f.sY),f.sY>h&&(h=f.sY);this.navMinMax[0]=c;this.navMinMax[1]=l;this.navMinMax[2]=p;this.navMinMax[3]=h;return this.navMinMax},"JU.BS,~B");c(b,"setModelSet",function(a){this.ms=a},"JM.ModelSet");c(b,"checkInheritedShapes",function(){null!=this.shapes[24]&&this.setShapePropertyBs(24,"remapInherited",null,null)});c(b,"restrictSelected",function(a,b){var c=
this.vwr.slm.getSelectedAtomsNoSubset();if(b){this.vwr.slm.invertSelection();var l=this.vwr.slm.bsSubset;null!=l&&(c=this.vwr.slm.getSelectedAtomsNoSubset(),c.and(l),this.vwr.selectStatus(c,!1,0,!0,!1),JU.BSUtil.invertInPlace(c,this.vwr.ms.ac),c.and(l))}JU.BSUtil.andNot(c,this.vwr.slm.bsDeleted);l=this.vwr.getBoolean(603979812);a||this.vwr.setBooleanProperty("bondModeOr",!0);this.setShapeSizeBs(1,0,null,null);this.setShapePropertyBs(1,"type",Integer.$valueOf(32768),null);this.setShapeSizeBs(1,0,null,
null);this.setShapePropertyBs(1,"type",Integer.$valueOf(1023),null);for(var e=this.vwr.bsA(),f=21;0<=--f;)6!=f&&null!=this.getShape(f)&&this.setShapeSizeBs(f,0,null,e);null!=this.getShape(21)&&this.setShapePropertyBs(21,"off",e,null);this.setLabel(null,e);a||this.vwr.setBooleanProperty("bondModeOr",l);this.vwr.selectStatus(c,!1,0,!0,!1)},"~B,~B");c(b,"getAtomColorRGBShaded",function(a,b){var c=J.shape.Shape.getColix(a,b.i,b);0>c&&(c=this.vwr.gdata.fixChangeableColix(c));return JU.C.getColixShadedRGB(c)},
"~A,JM.Atom");b.hoverable=F(-1,[31,20,25,24,22,23,36]);b.clickableMax=JV.ShapeManager.hoverable.length-1});s("JV");B(["java.util.Hashtable"],["JV.Connection","$.Scene","$.StateManager","$.Connections"],"java.util.Arrays JU.BS $.Lst $.SB JM.Orientation JU.BSUtil $.Escape".split(" "),function(){var b=n(function(){this.maxUndo=20;this.saved=this.vwr=null;this.lastUnitcell=this.lastCoordinates=this.lastShape=this.lastState=this.lastSelected=this.lastScene=this.lastConnections=this.lastContext=this.lastOrientation=
"";this.redoStateStack=this.undoStateStack=null;v(this,arguments)},JV,"StateManager",null);P(b,function(){this.saved=new java.util.Hashtable});A(b,function(a){this.vwr=a},"JV.Viewer");b.getVariableList=c(b,"getVariableList",function(a,b,c,l){var e=new JU.SB,f=0,h=Array(a.size()),j;for(a=a.entrySet().iterator();a.hasNext()&&((j=a.next())||1);){var m=j.getKey(),n=j.getValue();if((c||!m.startsWith("site_"))&&(!l||"@"==m.charAt(0)))h[f++]=m+("@"==m.charAt(0)?" "+n.asString():" = "+JV.StateManager.varClip(m,
n.escape(),b))}java.util.Arrays.sort(h,0,f);for(b=0;b<f;b++)null!=h[b]&&e.append("  ").append(h[b]).append(";\n");0==f&&!l&&e.append("# --no global user variables defined--;\n");return e.toString()},"java.util.Map,~N,~B,~B");b.getObjectIdFromName=c(b,"getObjectIdFromName",function(a){if(null==a)return-1;a="background axis1      axis2      axis3      boundbox   unitcell   frank      ".indexOf(a.toLowerCase());return 0>a?a:w(a/11)},"~S");b.getObjectNameFromId=c(b,"getObjectNameFromId",function(a){return 0>
a||7<=a?null:"background axis1      axis2      axis3      boundbox   unitcell   frank      ".substring(11*a,11*a+11).trim()},"~N");c(b,"clear",function(a){this.vwr.setShowAxes(!1);this.vwr.setShowBbcage(!1);this.vwr.setShowUnitCell(!1);a.clear()},"JV.GlobalSettings");c(b,"resetLighting",function(){this.vwr.setIntProperty("ambientPercent",45);this.vwr.setIntProperty("celShadingPower",10);this.vwr.setIntProperty("diffusePercent",84);this.vwr.setIntProperty("phongExponent",64);this.vwr.setIntProperty("specularExponent",
6);this.vwr.setIntProperty("specularPercent",22);this.vwr.setIntProperty("specularPower",40);this.vwr.setIntProperty("zDepth",0);this.vwr.setIntProperty("zShadePower",3);this.vwr.setIntProperty("zSlab",50);this.vwr.setBooleanProperty("specular",!0);this.vwr.setBooleanProperty("celShading",!1);this.vwr.setBooleanProperty("zshade",!1)});c(b,"setCrystallographicDefaults",function(){this.vwr.setAxesMode(603979808);this.vwr.setShowAxes(!0);this.vwr.setShowUnitCell(!0);this.vwr.setBooleanProperty("perspectiveDepth",
!1)});c(b,"setCommonDefaults",function(){this.vwr.setBooleanProperty("perspectiveDepth",!0);this.vwr.setFloatProperty("bondTolerance",0.45);this.vwr.setFloatProperty("minBondDistance",0.4);this.vwr.setIntProperty("bondingVersion",0);this.vwr.setBooleanProperty("translucent",!0)});c(b,"setJmolDefaults",function(){this.setCommonDefaults();this.vwr.setStringProperty("defaultColorScheme","Jmol");this.vwr.setBooleanProperty("axesOrientationRasmol",!1);this.vwr.setBooleanProperty("zeroBasedXyzRasmol",!1);
this.vwr.setIntProperty("percentVdwAtom",23);this.vwr.setIntProperty("bondRadiusMilliAngstroms",150);this.vwr.setVdwStr("auto")});c(b,"setRasMolDefaults",function(){this.setCommonDefaults();this.vwr.setStringProperty("defaultColorScheme","RasMol");this.vwr.setBooleanProperty("axesOrientationRasmol",!0);this.vwr.setBooleanProperty("zeroBasedXyzRasmol",!0);this.vwr.setIntProperty("percentVdwAtom",0);this.vwr.setIntProperty("bondRadiusMilliAngstroms",1);this.vwr.setVdwStr("Rasmol")});c(b,"setPyMOLDefaults",
function(){this.setCommonDefaults();this.vwr.setStringProperty("measurementUnits","ANGSTROMS");this.vwr.setBooleanProperty("zoomHeight",!0)});b.getNoCase=c(b,"getNoCase",function(a,b){for(var c,l=a.entrySet().iterator();l.hasNext()&&((c=l.next())||1);)if(c.getKey().equalsIgnoreCase(b))return c.getValue();return null},"java.util.Map,~S");c(b,"listSavedStates",function(){for(var a="",b,c=this.saved.keySet().iterator();c.hasNext()&&((b=c.next())||1);)a+="\n"+b;return a});c(b,"deleteSavedType",function(a){for(var b=
this.saved.keySet().iterator();b.hasNext();)b.next().startsWith(a)&&b.remove()},"~S");c(b,"deleteSaved",function(a){for(var b=this.saved.keySet().iterator();b.hasNext();){var c=b.next();(c.startsWith(a)||c.endsWith("_"+a)&&c.indexOf("_")==c.lastIndexOf("_"+a))&&b.remove()}},"~S");c(b,"saveSelection",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Selected_"):(a=this.lastSelected="Selected_"+a,this.saved.put(a,JU.BSUtil.copy(b)))},"~S,JU.BS");c(b,"restoreSelection",function(a){a=JV.StateManager.getNoCase(this.saved,
0<a.length?"Selected_"+a:this.lastSelected);if(null==a)return this.vwr.selectStatus(new JU.BS,!1,0,!1,!1),!1;this.vwr.selectStatus(a,!1,0,!1,!1);return!0},"~S");c(b,"saveUnitCell",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("unitcell_");else{a=this.lastUnitcell="unitcell_"+a;var b=this.vwr.getCurrentUnitCell();null!=b&&(b="UNITCELL "+JU.Escape.e(b.getUnitCellVectors()),this.saved.put(a,"unitcell reset;"+b))}},"~S");c(b,"getSavedUnitCell",function(a){return JV.StateManager.getNoCase(this.saved,
0<a.length?"unitcell_"+a:this.lastUnitcell)},"~S");c(b,"restoreUnitCell",function(a){a=this.getSavedUnitCell(a);if(null==a)return this.vwr.ms.setModelCagePts(-1,null,null),!1;this.vwr.runScript(a);return!0},"~S");c(b,"saveState",function(a){a.equalsIgnoreCase("DELETE")?(this.deleteSavedType("State_"),this.clearStateStack()):0==a.length?(this.vwr.setBooleanProperty("undoAuto",!1),this.appendState(this.getStack(603984065)),this.redoStateStack.clear()):(a=this.lastState="State_"+a,this.saved.put(a,this.vwr.getStateInfo()))},
"~S");c(b,"getSavedState",function(a){if(0==a.length)return a=this.getStack(603984065),0<a.size()?a.get(a.size()-1):null;a=JV.StateManager.getNoCase(this.saved,0<a.length?"State_"+a:this.lastState);return null==a?"":a},"~S");c(b,"popStack",function(a){var b=this.getStack(a),b=0<b.size()?b.removeItemAt(b.size()-1):null;null!=b&&this.appendState(this.getStack(603984065==a?4139:603984065));this.checkStack(this.getStack(603984065));return b},"~N");c(b,"appendState",function(a){this.checkStack(a);0<this.maxUndo&&
a.addLast(this.vwr.getStateInfo())},"JU.Lst");c(b,"checkStack",function(a){for(;a.size()>this.maxUndo;)a.removeItemAt(0)},"JU.Lst");c(b,"getStack",function(a){null==this.undoStateStack&&(this.undoStateStack=new JU.Lst,this.redoStateStack=new JU.Lst);return 603984065==a?this.undoStateStack:this.redoStateStack},"~N");c(b,"clearStateStack",function(){null!=this.undoStateStack&&(this.undoStateStack.clear(),this.redoStateStack.clear())});c(b,"saveStructure",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Shape_"):
(a=this.lastShape="Shape_"+a,this.saved.put(a,this.vwr.getStructureState()))},"~S");c(b,"getSavedStructure",function(a){a=JV.StateManager.getNoCase(this.saved,0<a.length?"Shape_"+a:this.lastShape);return null==a?"":a},"~S");c(b,"saveCoordinates",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Coordinates_"):(a=this.lastCoordinates="Coordinates_"+a,this.saved.put(a,this.vwr.getCoordinateState(b)))},"~S,JU.BS");c(b,"getSavedCoordinates",function(a){a=JV.StateManager.getNoCase(this.saved,
0<a.length?"Coordinates_"+a:this.lastCoordinates);return null==a?"":a},"~S");c(b,"getOrientation",function(){return new JM.Orientation(this.vwr,!1,null)});c(b,"getSavedOrientationText",function(a){var b;if(null!=a)return b=this.getOrientationFor(a),null==b?"":b.getMoveToText(!0);a=new JU.SB;for(var c=this.saved.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)b.getKey().startsWith("Orientation_")&&a.append(b.getValue().getMoveToText(!0));return a.toString()},"~S");c(b,"saveScene",function(a,
b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Scene_");else{var c=new JV.Scene(b);c.saveName=this.lastScene="Scene_"+a;this.saved.put(c.saveName,c)}},"~S,java.util.Map");c(b,"restoreScene",function(a,b){var c=JV.StateManager.getNoCase(this.saved,0<a.length?"Scene_"+a:this.lastScene);return null!=c&&c.restore(this.vwr,b)},"~S,~N");c(b,"saveOrientation",function(a,b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Orientation_");else{var c=new JM.Orientation(this.vwr,a.equalsIgnoreCase("default"),
b);c.saveName=this.lastOrientation="Orientation_"+a;this.saved.put(c.saveName,c)}},"~S,~A");c(b,"restoreOrientation",function(a,b,c){a=this.getOrientationFor(a);return null!=a&&a.restore(b,c)},"~S,~N,~B");c(b,"getOrientationFor",function(a){return JV.StateManager.getNoCase(this.saved,0<a.length?"Orientation_"+a:this.lastOrientation)},"~S");c(b,"saveContext",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Context_"):this.saved.put(this.lastContext="Context_"+a,b)},"~S,~O");c(b,"getContext",
function(a){return this.saved.get(0==a.length?this.lastContext:"Context_"+a)},"~S");c(b,"saveBonds",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Bonds_");else{var b=new JV.Connections(this.vwr);b.saveName=this.lastConnections="Bonds_"+a;this.saved.put(b.saveName,b)}},"~S");c(b,"restoreBonds",function(a){this.vwr.clearModelDependentObjects();a=JV.StateManager.getNoCase(this.saved,0<a.length?"Bonds_"+a:this.lastConnections);return null!=a&&a.restore()},"~S");b.varClip=c(b,"varClip",
function(a,b,c){0<c&&b.length>c&&(b=b.substring(0,c)+" #...more ("+b.length+" bytes -- use SHOW "+a+" or MESSAGE @"+a+" to view)");return b},"~S,~S,~N");c(b,"getUndoMax",function(){return this.maxUndo});c(b,"setUndoMax",function(a){this.maxUndo=Math.max(a,0);this.checkStack(this.getStack(603984065));this.checkStack(this.getStack(4139))},"~N");c(b,"getUndoRedoState",function(a){return this.popStack(a)},"~N");c(b,"canDo",function(a){return 0<this.maxUndo&&this.vwr.getBoolean(603979898)&&!this.getStack(a).isEmpty()},
"~N");c(b,"getUndoInfo",function(){var a=this.vwr.getBooleanProperty("undoAuto");return this.vwr.getBoolean(603979898)?"undoAuto="+a+(!a?"; user stack sizes: UNDO="+this.getStack(603984065).size()+", REDO="+this.getStack(4139).size():""):"SET preserveState = FALSE -- undo/redo is disabled"});b=n(function(){this.scene=this.saveName=null;v(this,arguments)},JV,"Scene",null);A(b,function(a){this.scene=a},"java.util.Map");c(b,"restore",function(a,b){var c=this.scene.get("generator");null!=c&&c.generateScene(this.scene);
c=this.scene.get("pymolView");return null!=c&&a.tm.moveToPyMOL(a.eval,b,c)},"JV.Viewer,~N");b=n(function(){this.saveName=null;this.bondCount=0;this.vwr=this.connections=null;v(this,arguments)},JV,"Connections",null);A(b,function(a){var b=a.ms;if(null!=b){this.vwr=a;this.bondCount=b.bondCount;this.connections=Array(this.bondCount+1);a=b.bo;for(b=this.bondCount;0<=--b;){var c=a[b];null!=c&&(this.connections[b]=new JV.Connection(c.atom1.i,c.atom2.i,c.mad,c.colix,c.order,c.getEnergy(),c.shapeVisibilityFlags))}}},
"JV.Viewer");c(b,"restore",function(){var a=this.vwr.ms;if(null==a)return!1;a.deleteAllBonds();for(var b=this.bondCount;0<=--b;){var c=this.connections[b],l=a.ac;c.atomIndex1>=l||c.atomIndex2>=l||(l=a.bondAtoms(a.at[c.atomIndex1],a.at[c.atomIndex2],c.order,c.mad,null,c.energy,!1,!0),l.colix=c.colix,l.shapeVisibilityFlags=c.shapeVisibilityFlags)}c=a.bo;for(b=a.bondCount;0<=--b;)null!=c[b]&&(c[b].index=b);this.vwr.setShapeProperty(1,"reportAll",null);return!0});b=n(function(){this.shapeVisibilityFlags=
this.energy=this.order=this.colix=this.mad=this.atomIndex2=this.atomIndex1=0;v(this,arguments)},JV,"Connection",null);A(b,function(a,b,c,l,e,f,h){this.atomIndex1=a;this.atomIndex2=b;this.mad=c;this.colix=l;this.order=e;this.energy=f;this.shapeVisibilityFlags=h},"~N,~N,~N,~N,~N,~N,~N")});s("JV");B(["java.util.Hashtable"],"JV.StatusManager","JU.Lst $.PT J.api.Interface J.c.CBK JS.SV JU.BSUtil $.Logger JV.JC".split(" "),function(){var b=n(function(){this.cbl=this.jsl=this.vwr=null;this.statusList="";
this.allowStatusReporting=!1;this.messageQueue=null;this.statusPtr=0;this.imageMap=this.jmolScriptCallbacks=null;this.echoing=!1;this.minSyncRepeatMs=100;this.stereoSync=this.syncDisabled=this.isSynced=this.drivingSync=this.syncingMouse=this.syncingScripts=!1;this.qualityPNG=this.qualityJPG=-1;this.audios=this.imageType=null;v(this,arguments)},JV,"StatusManager",null);P(b,function(){this.messageQueue=new java.util.Hashtable;this.jmolScriptCallbacks=new java.util.Hashtable});A(b,function(a){this.vwr=
a},"JV.Viewer");c(b,"recordStatus",function(a){return this.allowStatusReporting&&0<this.statusList.length&&(this.statusList.equals("all")||0<=this.statusList.indexOf(a))},"~S");c(b,"setStatusChanged",function(a,b,c,l){if(this.recordStatus(a)){var e=new JU.Lst;e.addLast(Integer.$valueOf(++this.statusPtr));e.addLast(a);e.addLast(Integer.$valueOf(b));e.addLast(c);b=l?null:this.messageQueue.get(a);null==b?this.messageQueue.put(a,b=new JU.Lst):b.size()==JV.StatusManager.MAXIMUM_QUEUE_LENGTH&&b.removeItemAt(0);
b.addLast(e)}},"~S,~N,~O,~B");c(b,"getStatusChanged",function(a){var b=0<a.length&&"-"==a.charAt(0),c=0<a.length&&"+"==a.charAt(0),l=!1;b?this.statusList=JU.PT.rep(this.statusList,a.substring(1,a.length),""):(a=JU.PT.rep(a,"+",""),this.statusList.equals(a)||c&&0<=this.statusList.indexOf(a)?l=!0:(c||(this.statusList=""),this.statusList+=a,JU.Logger.debugging&&JU.Logger.debug("StatusManager messageQueue = "+this.statusList)));a=new JU.Lst;if(l)for(var e,l=this.messageQueue.entrySet().iterator();l.hasNext()&&
((e=l.next())||1);)a.addLast(e.getValue());this.messageQueue.clear();this.statusPtr=0;return a},"~S");c(b,"setCallbackFunction",function(a,b){var c=J.c.CBK.getCallback(a),l="string"==typeof b?b:null;if(null!=c)if(c=J.c.CBK.getCallback(a).name(),JU.Logger.info("StatusManager "+c+"callback set f="+l),null!=l&&l.startsWith("SYNC:"))if(l.toLowerCase().trim().equals("sync:off"))this.jmolScriptCallbacks.remove("SYNC:"+c),JU.Logger.info("SYNC callback for "+c+" deactivated");else{this.jmolScriptCallbacks.put("SYNC:"+
c,"_");JU.Logger.info("SYNC callback for "+c+" activated");return}else{var e="",f=null==l?0:(e=l.toLowerCase()).startsWith("script:")?7:e.startsWith("jmolscript:")?11:0;if(0==f)null==b&&this.jmolScriptCallbacks.remove(c);else{this.jmolScriptCallbacks.put(c,l.substring(f).trim());return}}null!=this.cbl&&this.cbl.setCallbackFunction(a,b)},"~S,~O");c(b,"notifyEnabled",function(a){return null!=this.cbl&&this.cbl.notifyEnabled(a)},"J.c.CBK");c(b,"getJmolScriptCallback",function(a){return this.jmolScriptCallbacks.get(a.name())},
"J.c.CBK");c(b,"fireJmolScriptCallback",function(a,b,c,l){var e=b.name();if(null!=c[0]){var f=Array(c.length);System.arraycopy(c,0,f,0,c.length);var h="try{\n"+f[0]+"\n}";f[0]=e;this.vwr.evalCallback(h,f,l)}this.jmolScriptCallbacks.containsKey("SYNC:"+b.name())&&(c[0]="SYNC");a&&this.cbl.notifyCallback(b,c)},"~B,J.c.CBK,~A,~B");c(b,"setStatusAppletReady",function(a,b){var c=b?this.getJmolScriptCallback(J.c.CBK.APPLETREADY):null,l=this.notifyEnabled(J.c.CBK.APPLETREADY);(l||null!=c)&&this.fireJmolScriptCallback(l,
J.c.CBK.APPLETREADY,x(-1,[c,a,Boolean.$valueOf(b),null]),!0)},"~S,~B");c(b,"setStatusAtomMoved",function(a){var b=this.getJmolScriptCallback(J.c.CBK.ATOMMOVED);this.setStatusChanged("atomMoved",-1,a,!1);var c=this.notifyEnabled(J.c.CBK.ATOMMOVED);(c||null!=b)&&this.fireJmolScriptCallback(c,J.c.CBK.ATOMMOVED,x(-1,[b,a,Integer.$valueOf(a.cardinality())]),!0)},"JU.BS");c(b,"notifyCalculation",function(a,b,c){var l=this.getJmolScriptCallback(J.c.CBK.CALCULATION),e=this.notifyEnabled(J.c.CBK.CALCULATION);
(e||null!=l)&&this.fireJmolScriptCallback(e,J.c.CBK.CALCULATION,x(-1,[l,b,a,c]),!0)},"~S,JU.BS,~S");c(b,"setStatusSelect",function(a){var b=this.getJmolScriptCallback(J.c.CBK.SELECT);this.setStatusChanged("select",-1,a,!1);var c=this.notifyEnabled(J.c.CBK.SELECT);(c||null!=b)&&this.fireJmolScriptCallback(c,J.c.CBK.SELECT,x(-1,[b,a,Integer.$valueOf(a.cardinality()),Integer.$valueOf(a.nextSetBit(0)),Integer.$valueOf(a.length()),this.vwr.slm.getSelectionColors()]),!0)},"JU.BS");c(b,"setStatusStructureModified",
function(a,b,c,l,e,f){null==f&&(f=0<=a?JU.BSUtil.newAndSetBit(a):this.vwr.bsA());var h=this.getJmolScriptCallback(J.c.CBK.STRUCTUREMODIFIED),j=this.notifyEnabled(J.c.CBK.STRUCTUREMODIFIED);(j||null!=h)&&this.fireJmolScriptCallback(j,J.c.CBK.STRUCTUREMODIFIED,x(-1,[h,Integer.$valueOf(c),Integer.$valueOf(a),Integer.$valueOf(b),l,Integer.$valueOf(e),f]),!0)},"~N,~N,~N,~S,~N,JU.BS");c(b,"setStatusAtomPicked",function(a,b,c){var l=this.getJmolScriptCallback(J.c.CBK.PICK);JU.Logger.info("setStatusAtomPicked("+
a+","+b+")");this.setStatusChanged("atomPicked",a,b,!1);var e=this.notifyEnabled(J.c.CBK.PICK);(e||null!=l)&&this.fireJmolScriptCallback(e,J.c.CBK.PICK,x(-1,[l,b,Integer.$valueOf(a),c]),!0)},"~N,~S,java.util.Map");c(b,"setStatusClicked",function(a,b,c,l,e){var f=this.getJmolScriptCallback(J.c.CBK.CLICK);e=F(-1,[c,e]);var h=this.notifyEnabled(J.c.CBK.CLICK);(h||null!=f)&&this.fireJmolScriptCallback(h,J.c.CBK.CLICK,x(-1,[f,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(c),Integer.$valueOf(l),
e]),!0);return e[0]},"~N,~N,~N,~N,~N");c(b,"setStatusResized",function(a,b){var c=this.getJmolScriptCallback(J.c.CBK.RESIZE),l=this.notifyEnabled(J.c.CBK.RESIZE);(l||null!=c)&&this.fireJmolScriptCallback(l,J.c.CBK.RESIZE,x(-1,[c,Integer.$valueOf(a),Integer.$valueOf(b)]),!0)},"~N,~N");c(b,"haveHoverCallback",function(){return this.jmolScriptCallbacks.containsKey(J.c.CBK.HOVER.name())||this.notifyEnabled(J.c.CBK.HOVER)});c(b,"setStatusAtomHovered",function(a,b){var c=this.getJmolScriptCallback(J.c.CBK.HOVER),
l=this.notifyEnabled(J.c.CBK.HOVER);(l||null!=c)&&this.fireJmolScriptCallback(l,J.c.CBK.HOVER,x(-1,[c,b,Integer.$valueOf(a)]),!0)},"~N,~S");c(b,"setStatusObjectHovered",function(a,b,c){var l=this.getJmolScriptCallback(J.c.CBK.HOVER),e=this.notifyEnabled(J.c.CBK.HOVER);(e||null!=l)&&this.fireJmolScriptCallback(e,J.c.CBK.HOVER,x(-1,[l,b,Integer.$valueOf(-1),a,Float.$valueOf(c.x),Float.$valueOf(c.y),Float.$valueOf(c.z)]),!0)},"~S,~S,JU.T3");c(b,"showImage",function(a,b){var c=JU.PT.split(a,"\u0001");
a=2>c.length?"Jmol":3>c.length||c[2].equals("null")?c[1].substring(c[1].lastIndexOf("/")+1):c[2];var c=this.getJmolScriptCallback(J.c.CBK.IMAGE),l=this.notifyEnabled(J.c.CBK.IMAGE);(l||null!=c)&&this.fireJmolScriptCallback(l,J.c.CBK.IMAGE,x(-1,[c,a,b]),!0);if(Boolean.TRUE.equals(b)){if(null!=this.imageMap){for(var c=new JU.Lst,e,l=this.imageMap.keySet().iterator();l.hasNext()&&((e=l.next())||1);)c.addLast(e);for(e=c.size();0<=--e;)this.imageMap.get(c.get(e)).closeMe()}}else null==this.imageMap&&(this.imageMap=
new java.util.Hashtable),e=this.imageMap.get(a),Boolean.FALSE.equals(b)?null!=e&&e.closeMe():(null==e&&null!=b&&(e=this.vwr.apiPlatform.getImageDialog(a,this.imageMap)),null!=e&&(null==b?e.closeMe():e.setImage(b)))},"~S,~O");c(b,"setFileLoadStatus",function(a,b,c,l,e,f,h){null==a&&"resetUndo".equals(b)&&(b=this.vwr.getProperty("DATA_API","getAppConsole",null),null!=b&&b.zap(),b=this.vwr.getZapName());this.setStatusChanged("fileLoaded",e,a,!1);null!=l&&this.setStatusChanged("fileLoadError",e,l,!1);
var j=this.getJmolScriptCallback(J.c.CBK.LOADSTRUCT);if((f=f&&this.notifyEnabled(J.c.CBK.LOADSTRUCT))||null!=j){var m=this.vwr.getP("_smilesString");0!=m.length&&(b=m);this.fireJmolScriptCallback(f,J.c.CBK.LOADSTRUCT,x(-1,[j,a,b,c,l,Integer.$valueOf(e),this.vwr.getP("_modelNumber"),this.vwr.getModelNumberDotted(this.vwr.ms.mc-1),h]),!0)}},"~S,~S,~S,~S,~N,~B,Boolean");c(b,"setStatusModelKit",function(a){var b=1==a?"ON":"OFF";this.setStatusChanged("modelkit",a,b,!1);a=this.getJmolScriptCallback(J.c.CBK.MODELKIT);
var c=this.notifyEnabled(J.c.CBK.MODELKIT);(c||null!=a)&&this.fireJmolScriptCallback(c,J.c.CBK.MODELKIT,x(-1,[a,b]),!0)},"~N");c(b,"setStatusFrameChanged",function(a,b,c,l,e,f,h){if(null!=this.vwr.ms){var j=this.vwr.am.animationOn,m=j?-2-e:e;this.setStatusChanged("frameChanged",m,0<=e?this.vwr.getModelNumberDotted(e):"",!1);var n=this.getJmolScriptCallback(J.c.CBK.ANIMFRAME),p=this.notifyEnabled(J.c.CBK.ANIMFRAME);(p||null!=n)&&this.fireJmolScriptCallback(p,J.c.CBK.ANIMFRAME,x(-1,[n,F(-1,[m,a,b,c,
l,e]),h,Float.$valueOf(f)]),!1);!j&&!this.vwr.isJSNoAWT&&this.vwr.checkMenuUpdate()}},"~N,~N,~N,~N,~N,~N,~S");c(b,"setStatusDragDropped",function(a,b,c,l,e){this.setStatusChanged("dragDrop",0,"",!1);var f=this.getJmolScriptCallback(J.c.CBK.DRAGDROP),h=this.notifyEnabled(J.c.CBK.DRAGDROP);if(h||null!=f)this.fireJmolScriptCallback(h,J.c.CBK.DRAGDROP,x(-1,[f,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(c),l,null==e?Array(1):e]),!0);return h},"~N,~N,~N,~S,~A");c(b,"setScriptEcho",function(a,
b){if(!(null==a||this.echoing)){this.echoing=!0;this.setStatusChanged("scriptEcho",0,a,!1);var c=this.getJmolScriptCallback(J.c.CBK.ECHO),l=this.notifyEnabled(J.c.CBK.ECHO);if(l||null!=c)this.fireJmolScriptCallback(l,J.c.CBK.ECHO,x(-1,[c,a,Integer.$valueOf(b?1:0)]),!0);this.echoing=!1}},"~S,~B");c(b,"setStatusMeasuring",function(a,b,c,l){this.setStatusChanged(a,b,c,!1);var e=null;a.equals("measureCompleted")?(JU.Logger.info("measurement["+b+"] = "+c),e=this.getJmolScriptCallback(J.c.CBK.MEASURE)):
a.equals("measurePicked")&&(this.setStatusChanged("measurePicked",b,c,!1),JU.Logger.info("measurePicked "+b+" "+c));var f=this.notifyEnabled(J.c.CBK.MEASURE);(f||null!=e)&&this.fireJmolScriptCallback(f,J.c.CBK.MEASURE,x(-1,[e,c,Integer.$valueOf(b),a,Float.$valueOf(l)]),!0)},"~S,~N,~S,~N");c(b,"notifyError",function(a,b,c){var l=this.getJmolScriptCallback(J.c.CBK.ERROR),e=this.notifyEnabled(J.c.CBK.ERROR);(e||null!=l)&&this.fireJmolScriptCallback(e,J.c.CBK.ERROR,x(-1,[l,a,b,this.vwr.getShapeErrorState(),
c]),!0)},"~S,~S,~S");c(b,"notifyMinimizationStatus",function(a,b,c,l,e){var f=this.getJmolScriptCallback(J.c.CBK.MINIMIZATION),h=this.notifyEnabled(J.c.CBK.MINIMIZATION);(h||null!=f)&&this.fireJmolScriptCallback(h,J.c.CBK.MINIMIZATION,x(-1,[f,a,b,c,l,e]),!0)},"~S,Integer,Float,Float,~S");c(b,"setScriptStatus",function(a,b,c,l){if(-1>c){var e=-2-c;this.setStatusChanged("scriptStarted",e,b,!1);a="script "+e+" started"}else if(null==a)return;var e=0==c?this.getJmolScriptCallback(J.c.CBK.SCRIPT):null,
f="Script completed"===a;if(this.recordStatus("script")){var h=null!=l;this.setStatusChanged(h?"scriptError":"scriptStatus",0,a,!1);if(h||f)this.setStatusChanged("scriptTerminated",1,"Jmol script terminated"+(h?" unsuccessfully: "+a:" successfully"),!1)}f&&(this.vwr.getBoolean(603979879)&&this.vwr.getBoolean(603979825))&&(a=this.vwr.getChimeMessenger().scriptCompleted(this,b,l));b=x(-1,[e,a,b,Integer.$valueOf(f?-1:c),l]);((c=this.notifyEnabled(J.c.CBK.SCRIPT))||null!=e)&&this.fireJmolScriptCallback(c,
J.c.CBK.SCRIPT,b,!0);this.processScript(b)},"~S,~S,~N,~S");c(b,"processScript",function(a){var b=a[3].intValue();this.vwr.notifyScriptEditor(b,a);0==b&&this.vwr.sendConsoleMessage(null==a[1]?null:a[1].toString())},"~A");c(b,"doSync",function(){return this.isSynced&&this.drivingSync&&!this.syncDisabled});c(b,"setSync",function(a){if(this.syncingMouse){if(null!=a){var b=this.getJmolScriptCallback(J.c.CBK.SYNC);null!=b&&this.fireJmolScriptCallback(!1,J.c.CBK.SYNC,x(-1,[b,a,"sending mouseSync"]),!0);
this.syncSend(a,"*",0)}}else this.syncingScripts||this.syncSend("!"+this.vwr.tm.getMoveToText(this.minSyncRepeatMs/1E3,!1),"*",0)},"~S");c(b,"setSyncDriver",function(a){this.stereoSync&&4!=a&&(this.syncSend("SET_GRAPHICS_OFF","*",0),this.stereoSync=!1);switch(a){case 4:if(!this.syncDisabled)return;this.syncDisabled=!1;break;case 3:this.syncDisabled=!0;break;case 5:this.stereoSync=this.isSynced=this.drivingSync=!0;break;case 1:this.isSynced=this.drivingSync=!0;break;case 2:this.drivingSync=!1;this.isSynced=
!0;break;default:this.isSynced=this.drivingSync=!1}JU.Logger.debugging&&JU.Logger.debug(this.vwr.appletName+" sync mode="+a+"; synced? "+this.isSynced+"; driving? "+this.drivingSync+"; disabled? "+this.syncDisabled)},"~N");c(b,"syncSend",function(a,b,c){if(0==c&&!this.notifyEnabled(J.c.CBK.SYNC))return null;a=x(-1,[null,a,b,Integer.$valueOf(c)]);null!=this.cbl&&this.cbl.notifyCallback(J.c.CBK.SYNC,a);return a[0]},"~S,~O,~N");c(b,"processService",function(a){var b=a.get("service");if(null==b||!this.notifyEnabled(J.c.CBK.SERVICE))return null;
if(y(b,"JS.SV")){var b=new java.util.Hashtable,c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)b.put(c.getKey(),JS.SV.oValue(c.getValue()));a=b}this.cbl.notifyCallback(J.c.CBK.SERVICE,x(-1,[null,a]));return a},"java.util.Map");c(b,"getSyncMode",function(){return!this.isSynced?0:this.drivingSync?1:2});c(b,"showUrl",function(a){null!=this.jsl&&this.jsl.showUrl(a)},"~S");c(b,"clearConsole",function(){this.vwr.sendConsoleMessage(null);null!=this.jsl&&this.cbl.notifyCallback(J.c.CBK.MESSAGE,
null)});c(b,"functionXY",function(a,b,c){return null==this.jsl?L(Math.abs(b),Math.abs(c),0):this.jsl.functionXY(a,b,c)},"~S,~N,~N");c(b,"functionXYZ",function(a,b,c,l){return null==this.jsl?L(Math.abs(b),Math.abs(c),Math.abs(c),0):this.jsl.functionXYZ(a,b,c,l)},"~S,~N,~N,~N");c(b,"jsEval",function(a){return null==this.jsl?"":this.jsl.eval(a)},"~S");c(b,"createImage",function(a,b,c,l,e){return null==this.jsl?null:this.jsl.createImage(a,b,null==c?l:c,e)},"~S,~S,~S,~A,~N");c(b,"getRegistryInfo",function(){return null==
this.jsl?null:this.jsl.getRegistryInfo()});c(b,"dialogAsk",function(a,b,c){var l=a.equals("Save Image"),e=J.api.Interface.getOption("dialog.Dialog",this.vwr,"status");if(null==e)return null;e.setupUI(!1);l&&e.setImageInfo(this.qualityJPG,this.qualityPNG,this.imageType);a=e.getFileNameFromDialog(this.vwr,a,b);l&&null!=a&&(this.qualityJPG=e.getQuality("JPG"),this.qualityPNG=e.getQuality("PNG"),l=e.getType(),null!=c&&(c.put("qualityJPG",Integer.$valueOf(this.qualityJPG)),c.put("qualityPNG",Integer.$valueOf(this.qualityPNG)),
null!=l&&c.put("dialogImageType",l)),null!=l&&(this.imageType=l));return a},"~S,~S,java.util.Map");c(b,"resizeInnerPanel",function(a,b){return null==this.jsl||a==this.vwr.getScreenWidth()&&b==this.vwr.getScreenHeight()?F(-1,[a,b]):this.jsl.resizeInnerPanel("preferredWidthHeight "+a+" "+b+";")},"~N,~N");c(b,"resizeInnerPanelString",function(a){null!=this.jsl&&this.jsl.resizeInnerPanel(a)},"~S");c(b,"registerAudio",function(a,b){this.stopAudio(a);null==this.audios&&(this.audios=new java.util.Hashtable);
null==b?this.audios.remove(a):this.audios.put(a,b.get("audioPlayer"))},"~S,java.util.Map");c(b,"stopAudio",function(a){null!=this.audios&&(null==a?this.closeAllAudio():(a=this.audios.get(a),null!=a&&a.action("kill")))},"~S");c(b,"playAudio",function(a){if(this.vwr.getBoolean(603979797))try{var b=null==a?"close":a.get("action"),c=null==a?null:a.get("id");if(null!=b&&0<b.length){if(null==c||0==c.length){if(null==this.audios||this.audios.isEmpty())return;b.equals("close")&&this.closeAllAudio();return}var l=
null==this.audios?null:this.audios.get(c);if(null!=l){l.action(b);return}}try{J.api.Interface.getInterface("JU.JmolAudio",this.vwr,"script").playAudio(this.vwr,a)}catch(e){if(H(e,Exception))JU.Logger.info(e.getMessage());else throw e;}}catch(f){}else null!=a&&(a.put("status","close"),JU.Logger.info("allowAudio is set false"),this.notifyAudioStatus(a))},"java.util.Map");c(b,"closeAllAudio",function(){for(var a,b=this.audios.keySet().iterator();b.hasNext()&&((a=b.next())||1);)System.out.println("AUDIO "+
a),this.audios.get(a).action("close");this.audios.clear()});c(b,"notifyAudioStatus",function(a){var b=a.get("status"),c=a.get(b);null!=c&&this.vwr.script(c);var c=this.getJmolScriptCallback(J.c.CBK.AUDIO),l=this.notifyEnabled(J.c.CBK.AUDIO);(l||null!=c)&&this.fireJmolScriptCallback(l,J.c.CBK.AUDIO,x(-1,[c,a,b]),!0);"ended"===b&&a.get("autoclose")!==Boolean.FALSE&&this.registerAudio(a.get("id"),null)},"java.util.Map");c(b,"syncScriptErr",function(a){return this.syncScript(a,"?",0)},"~S");c(b,"syncScript",
function(a,b,c){if("GET_GRAPHICS".equalsIgnoreCase(a))return this.setSyncDriver(5),this.syncSend(a,b,0),this.vwr.setBooleanProperty("_syncMouse",!1),this.vwr.setBooleanProperty("_syncScript",!1),null;"=".equals(b)&&(b="~",this.setSyncDriver(2));var l="~".equals(b);if(0<c||!l&&!".".equals(b)){var e=this.syncSend(a,b,c);if(!"*".equals(b)||a.startsWith("{"))return"?".equals(b)?e:null}switch(a.toLowerCase()){case "on":case "true":return this.setSyncDriver(1),null;case "off":case "false":return this.setSyncDriver(0),
null;case "slave":return this.setSyncDriver(2),null}b=this.getSyncMode();if(0==b)return null;1!=b&&(l=!1);JU.Logger.debugging&&JU.Logger.debug(this.vwr.htmlName+" syncing with script: "+a);l&&this.setSyncDriver(3);if(0!=a.indexOf("Mouse: ")){b=JV.JC.getServiceCommand(a);switch(b){case 70:case 42:case 49:case 56:case 63:return this.syncSend(a,".",c),null;case 0:case 77:case 28:case 35:if(l)return null;case 21:case 7:case 14:if(null==(a=this.vwr.getJSV().processSync(a,b)))return null}this.vwr.evalStringQuietSync(a,
!0,!1);return null}this.mouseScript(a);l&&this.vwr.setSyncDriver(4);return null},"~S,~S,~N");c(b,"mouseScript",function(a){var b=JU.PT.getTokens(a),c=b[1];try{switch(c=(c.toLowerCase()+"...............").substring(0,15),"zoombyfactor...zoomby.........rotatezby......rotatexyby.....translatexyby..rotatemolecule.spinxyby.......rotatearcball..".indexOf(c)){case 0:switch(b.length){case 3:this.vwr.zoomByFactor(JU.PT.parseFloat(b[2]),2147483647,2147483647);return;case 5:this.vwr.zoomByFactor(JU.PT.parseFloat(b[2]),
JU.PT.parseInt(b[3]),JU.PT.parseInt(b[4]));return}break;case 15:switch(b.length){case 3:this.vwr.zoomBy(JU.PT.parseInt(b[2]));return}break;case 30:switch(b.length){case 3:this.vwr.rotateZBy(JU.PT.parseInt(b[2]),2147483647,2147483647);return;case 5:this.vwr.rotateZBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]),JU.PT.parseInt(b[4]))}break;case 45:this.vwr.rotateXYBy(JU.PT.parseFloat(b[2]),JU.PT.parseFloat(b[3]));return;case 60:this.vwr.translateXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]));return;case 75:this.vwr.rotateSelected(JU.PT.parseFloat(b[2]),
JU.PT.parseFloat(b[3]),null);return;case 90:this.vwr.spinXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]),JU.PT.parseFloat(b[4]));return;case 105:this.vwr.rotateXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]));return}}catch(l){if(!H(l,Exception))throw l;}this.vwr.showString("error reading SYNC command: "+a,!1)},"~S");c(b,"processPluginRequest",function(a,b,c){return null==this.jsl?null:this.jsl.processPluginRequest(a,b,c)},"~S,~S,~O");b.MAXIMUM_QUEUE_LENGTH=16});s("JV");B("JU.A4 $.M3 $.M4 $.P3 $.P3i $.V3 J.c.STER JU.Point3fi".split(" "),
"JV.TransformManager","java.util.Hashtable JU.P4 $.Quat $.SB J.api.Interface JU.Escape $.Logger".split(" "),function(){var b=n(function(){this.spinThread=this.vibrationThread=this.movetoThread=this.vwr=null;this.perspectiveModel=11;this.modelRadiusPixels=this.modelRadius=this.modelCenterOffset=this.cameraDistanceFromCenter=this.aperatureAngle=this.referencePlaneOffset=this.cameraScaleFactor=0;this.navigationShiftXY=this.navigationOffset=this.navigationCenter=null;this.navigationDepthPercent=0;this.vectorTemp=
this.matrixTemp=null;this.splitFrameCurrentlyRendering=-1;this.haveNotifiedNaN=!1;this.spinX=0;this.spinY=30;this.spinZ=0;this.spinFps=30;this.navZ=this.navY=this.navX=0;this.navFps=NaN;this.doTransform4D=this.isSpinSelected=this.isSpinFixed=this.isSpinInternal=!1;this.rotationCenterDefault=this.perspectiveShiftXY=this.perspectiveOffset=this.fixedRotationCenter=this.fixedRotationOffset=null;this.rotationRadiusDefault=0;this.internalRotationCenter=this.internalTranslation=this.internalRotationAxis=
this.fixedRotationAxis=null;this.internalRotationAngle=0;this.rotationAxis=this.pointT2=this.vectorT2=this.vectorT=this.axisangleT=this.matrixTemp4=this.matrixTemp3=this.matrixRotate=null;this.rotationRate=0;this.cameraSetting=this.camera=this.fixedTranslation=null;this.yTranslationFraction=this.xTranslationFraction=0.5;this.previousY=this.previousX=this.prevZoomSetting=0;this.zoomEnabled=!0;this.zmPctSet=this.zmPct=100;this.zoomRatio=0;this.internalSlab=this.zShadeEnabled=this.slabEnabled=!1;this.depthValue=
this.slabValue=this.depthPercentSetting=this.slabPercentSetting=0;this.zSlabPercentSetting=50;this.zDepthPercentSetting=0;this.zSlabPoint=null;this.slabRange=this.zDepthValue=this.zSlabValue=0;this.depthPlane=this.slabPlane=null;this.perspectiveDepth=!0;this.scale3D=!1;this.cameraDepthSetting=this.cameraDepth=3;this.visualRangeAngstroms=0;this.cameraDistance=1E3;this.scale3DAngstromsPerInch=this.scaleDefaultPixelsPerAngstrom=this.scalePixelsPerAngstrom=this.screenPixelCount=this.height=this.width=
0;this.zoomHeight=this.useZoomLarge=this.antialias=!1;this.screenHeight=this.screenWidth=0;this.ptVibTempSafe=this.iScrPtSafe=this.fScrPt=this.ptVibTemp=this.iScrPt=this.fScrPtSafe=this.matrixTransformInv=this.matrixTransform=null;this.navigating=!1;this.defaultMode=this.mode=0;this.matrixTest=this.aaTest1=this.ptTest3=this.ptTest2=this.ptTest1=this.untransformedPoint=null;this.vibrationOn=this.spinIsGesture=this.navOn=this.vectorSpinOnly=this.spinOn=!1;this.vibrationScale=this.vibrationPeriodMs=
this.vibrationPeriod=0;this.stereoColors=this.stereoMode=this.vibrationT=null;this.stereoDoubleDTI=this.stereoDoubleFull=!1;this.stereoDegrees=NaN;this.stereoRadians=0;this.stereoFrame=!1;this.matrixStereo=null;this.windowCentered=!1;this.ptOffset=this.bsSelectedAtoms=this.bsFrameOffsets=this.frameOffsets=this.frameOffset=null;this.navMode=1;this.zoomFactor=3.4028235E38;this.navigationSlabOffset=0;this.nav=null;v(this,arguments)},JV,"TransformManager",null);P(b,function(){this.navigationCenter=new JU.P3;
this.navigationOffset=new JU.P3;this.navigationShiftXY=new JU.P3;this.matrixTemp=new JU.M4;this.vectorTemp=new JU.V3;this.fixedRotationOffset=new JU.P3;this.fixedRotationCenter=new JU.P3;this.perspectiveOffset=new JU.P3;this.perspectiveShiftXY=new JU.P3;this.rotationCenterDefault=new JU.P3;this.fixedRotationAxis=new JU.A4;this.internalRotationAxis=new JU.A4;this.internalRotationCenter=JU.P3.new3(0,0,0);this.matrixRotate=new JU.M3;this.matrixTemp3=new JU.M3;this.matrixTemp4=new JU.M4;this.axisangleT=
new JU.A4;this.vectorT=new JU.V3;this.vectorT2=new JU.V3;this.pointT2=new JU.P3;this.rotationAxis=new JU.V3;this.fixedTranslation=new JU.P3;this.camera=new JU.P3;this.cameraSetting=new JU.P3;this.matrixTransform=new JU.M4;this.matrixTransformInv=new JU.M4;this.fScrPtSafe=new JU.P3;this.iScrPt=new JU.P3i;this.ptVibTemp=new JU.Point3fi;this.fScrPt=new JU.P3;this.iScrPtSafe=new JU.P3i;this.ptVibTempSafe=new JU.Point3fi;this.untransformedPoint=new JU.P3;this.ptTest1=new JU.P3;this.ptTest2=new JU.P3;this.ptTest3=
new JU.P3;this.aaTest1=new JU.A4;this.matrixTest=new JU.M3;this.vibrationT=new JU.P3;this.stereoMode=J.c.STER.NONE;this.matrixStereo=new JU.M3;this.frameOffset=new JU.P3;this.ptOffset=new JU.P3});A(b,function(){});b.getTransformManager=c(b,"getTransformManager",function(a,b,c,l){l=l?J.api.Interface.getInterface("JV.TransformManager4D",a,"tm"):new JV.TransformManager;l.vwr=a;l.setScreenParameters(b,c,!0,!1,!0,!0);return l},"JV.Viewer,~N,~N,~B");c(b,"setDefaultPerspective",function(){this.setCameraDepthPercent(3,
!0);this.setPerspectiveDepth(!0);this.setStereoDegrees(-5);this.visualRangeAngstroms=5;this.setSpinOff();this.setVibrationPeriod(0)});c(b,"homePosition",function(a){a&&this.setSpinOff();this.setNavOn(!1);this.navFps=10;this.navX=this.navY=this.navZ=0;this.rotationCenterDefault.setT(this.vwr.getBoundBoxCenter());this.setFixedRotationCenter(this.rotationCenterDefault);this.rotationRadiusDefault=this.setRotationRadius(0,!0);this.windowCentered=!0;this.setRotationCenterAndRadiusXYZ(null,!0);this.resetRotation();
a=this.vwr.ms.getInfoM("defaultOrientationMatrix");null!=a&&this.setRotation(a);this.setZoomEnabled(!0);this.zoomToPercent(this.vwr.g.modelKitMode?50:100);this.zmPct=this.zmPctSet;this.slabReset();this.resetFitToScreen(!0);this.vwr.isJmolDataFrame()?this.fixedRotationCenter.set(0,0,0):this.vwr.g.axesOrientationRasmol&&this.matrixRotate.setAsXRotation(3.141592653589793);this.vwr.stm.saveOrientation("default",null);1==this.mode&&this.setNavigationMode(!0)},"~B");c(b,"setRotation",function(a){a.isRotation()?
this.matrixRotate.setM3(a):this.resetRotation()},"JU.M3");c(b,"resetRotation",function(){this.matrixRotate.setScale(1)});c(b,"clearThreads",function(){this.clearVibration();this.clearSpin();this.setNavOn(!1);this.stopMotion()});c(b,"clear",function(){this.fixedRotationCenter.set(0,0,0);this.navigating=!1;this.zSlabPoint=this.depthPlane=this.slabPlane=null;this.resetNavigationPoint(!0)});c(b,"setFixedRotationCenter",function(a){null!=a&&this.fixedRotationCenter.setT(a)},"JU.T3");c(b,"setRotationPointXY",
function(a){a=this.transformPtSafe(a);this.fixedTranslation.set(a.x,a.y,0)},"JU.P3");c(b,"spinXYBy",function(a,b,c){if(0==a&&0==b)null!=this.spinThread&&this.spinIsGesture&&this.clearSpin();else{this.clearSpin();var l=JU.P3.newP(this.fixedRotationCenter),e=new JU.P3;this.transformPt3fSafe(l,e);a=JU.P3.new3(-b,a,0);a.add(e);this.unTransformPoint(a,a);this.vwr.setInMotion(!1);this.rotateAboutPointsInternal(null,a,l,10*c,NaN,!1,!0,null,!0,null,null,null,null,null,!1,null)}},"~N,~N,~N");c(b,"rotateXYBy",
function(a,b,c){this.vwr.is2D()||this.rotate3DBall(a,b,c)},"~N,~N,JU.BS");c(b,"rotateZBy",function(a,b,c){2147483647!=b&&2147483647!=c&&this.resetXYCenter(b,c);this.rotateZRadians(a/57.29577951308232)},"~N,~N,~N");c(b,"applyRotation",function(a,b,c,l,e,f,h){null==c?this.matrixRotate.mul2(a,this.matrixRotate):(this.vwr.moveAtoms(f,a,this.matrixRotate,l,this.internalRotationCenter,b,c,e,h),null!=l&&this.internalRotationCenter.add(l))},"JU.M3,~B,JU.BS,JU.V3,~B,JU.M4,~B");c(b,"rotate3DBall",function(a,
b,c){this.matrixTemp3.setAsBallRotation(0.017453292519943295,-b,-a)&&this.applyRotation(this.matrixTemp3,!1,c,null,!1,null,!0)},"~N,~N,JU.BS");c(b,"rotateXRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsXRotation(a),!1,b,null,!1,null,!1)},"~N,JU.BS");c(b,"rotateYRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsYRotation(a),!1,b,null,!1,null,!1)},"~N,JU.BS");c(b,"rotateZRadians",function(a){this.applyRotation(this.matrixTemp3.setAsZRotation(a),!1,null,null,!1,null,!1)},
"~N");c(b,"rotateAxisAngle",function(a,b){this.axisangleT.setVA(a,b);this.rotateAxisAngle2(this.axisangleT,null)},"JU.V3,~N");c(b,"rotateAxisAngle2",function(a,b){this.applyRotation(this.matrixTemp3.setAA(a),!1,b,null,!1,null,!1)},"JU.A4,JU.BS");c(b,"rotateAxisAngleAtCenter",function(a,b,c,l,e,f,h){null!=b&&this.moveRotationCenter(b,!0);f&&this.setSpinOff();this.setNavOn(!1);if(this.vwr.headless){if(f&&3.4028235E38==e)return!1;f=!1}if(Float.isNaN(l)||0==l||0==e)return!1;null!=b&&this.setRotationPointXY(b);
this.setFixedRotationCenter(b);this.rotationAxis.setT(c);this.rotationRate=l;if(f)return this.fixedRotationAxis.setVA(c,0.017453292519943295*l),this.isSpinInternal=!1,this.isSpinFixed=!0,this.isSpinSelected=null!=h,this.setSpin(a,!0,e,null,null,null,h,!1,null,-1),3.4028235E38!=e;a=0.017453292519943295*e;this.fixedRotationAxis.setVA(c,e);this.rotateAxisAngleRadiansFixed(a,h);return!0},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(b,"rotateAxisAngleRadiansFixed",function(a,b){this.axisangleT.setAA(this.fixedRotationAxis);
this.axisangleT.angle=a;this.rotateAxisAngle2(this.axisangleT,b)},"~N,JU.BS");c(b,"rotateAboutPointsInternal",function(a,b,c,l,e,f,h,j,m,n,p,q,r,s,v,x){h&&this.setSpinOff();this.setNavOn(!1);if(null==r&&null==q&&null==x&&(null==n||0.001>n.length())&&(h?Float.isNaN(l)||0==l:0==e))return!1;var y=null;null==q&&null==r&&(y=JU.V3.newVsub(c,b),f&&y.scale(-1),this.internalRotationCenter.setT(b),this.rotationAxis.setT(y),this.internalTranslation=null==n?null:JU.V3.newV(n));b=null!=j;c=-1;if(h)return null==
q&&null==r?(0==e&&(e=NaN),Float.isNaN(e)?this.rotationRate=l:(c=w(Math.abs(e)/Math.abs(l)*this.spinFps+0.5),this.rotationRate=e/c*this.spinFps,null!=n&&this.internalTranslation.scale(1/c)),this.internalRotationAxis.setVA(y,0.017453292519943295*(Float.isNaN(this.rotationRate)?0:this.rotationRate)),this.isSpinInternal=!0,this.isSpinFixed=!1,this.isSpinSelected=b):e=l,this.setSpin(a,!0,e,p,q,r,j,m,x,null==x?-1:c),!Float.isNaN(e);a=0.017453292519943295*e;this.internalRotationAxis.setVA(y,a);this.rotateAxisAngleRadiansInternal(a,
j,s,v);return!1},"J.api.JmolScriptEvaluator,JU.T3,JU.T3,~N,~N,~B,~B,JU.BS,~B,JU.V3,JU.Lst,~A,JU.M3,JU.M4,~B,~A");c(b,"rotateAxisAngleRadiansInternal",function(a,b,c,l){this.internalRotationAngle=a;this.vectorT.set(this.internalRotationAxis.x,this.internalRotationAxis.y,this.internalRotationAxis.z);this.matrixRotate.rotate2(this.vectorT,this.vectorT2);this.axisangleT.setVA(this.vectorT2,a);this.applyRotation(this.matrixTemp3.setAA(this.axisangleT),!0,b,this.internalTranslation,1E6<a,c,l);null==b&&
this.getNewFixedRotationCenter()},"~N,JU.BS,JU.M4,~B");c(b,"getNewFixedRotationCenter",function(){this.axisangleT.setAA(this.internalRotationAxis);this.axisangleT.angle=-this.internalRotationAngle;this.matrixTemp4.setToAA(this.axisangleT);this.vectorT.setT(this.internalRotationCenter);this.pointT2.sub2(this.fixedRotationCenter,this.vectorT);var a=this.matrixTemp4.rotTrans2(this.pointT2,new JU.P3);a.add(this.vectorT);this.setRotationCenterAndRadiusXYZ(a,!1)});c(b,"setTranslationFractions",function(){this.xTranslationFraction=
this.fixedTranslation.x/this.width;this.yTranslationFraction=this.fixedTranslation.y/this.height});c(b,"centerAt",function(a,b,c){null==c?this.translateXYBy(a,b):(this.windowCentered&&this.vwr.setBooleanProperty("windowCentered",!1),this.fixedTranslation.x=a,this.fixedTranslation.y=b,this.setFixedRotationCenter(c))},"~N,~N,JU.P3");c(b,"percentToPixels",function(a,b){switch(a.charCodeAt(0)){case 120:return w(Math.floor(b/100*this.width));case 121:return w(Math.floor(b/100*this.height));case 122:return w(Math.floor(b/
100*this.screenPixelCount))}return 0},"~S,~N");c(b,"angstromsToPixels",function(a){return this.scalePixelsPerAngstrom*a},"~N");c(b,"translateXYBy",function(a,b){this.fixedTranslation.x+=a;this.fixedTranslation.y+=b;this.setTranslationFractions()},"~N,~N");c(b,"setCamera",function(a,b){this.cameraSetting.set(a,b,0==a&&0==b?0:1)},"~N,~N");c(b,"translateToPercent",function(a,b){switch(a.charCodeAt(0)){case 120:this.xTranslationFraction=0.5+b/100;this.fixedTranslation.x=this.width*this.xTranslationFraction;
break;case 121:this.yTranslationFraction=0.5+b/100;this.fixedTranslation.y=this.height*this.yTranslationFraction;break;case 122:1==this.mode&&this.setNavigationDepthPercent(b)}},"~S,~N");c(b,"getTranslationXPercent",function(){return 0==this.width?0:100*(this.fixedTranslation.x-this.width/2)/this.width});c(b,"getTranslationYPercent",function(){return 0==this.height?0:100*(this.fixedTranslation.y-this.height/2)/this.height});c(b,"getTranslationScript",function(){var a="",b=this.getTranslationXPercent();
0!=b&&(a+="translate x "+b+";");b=this.getTranslationYPercent();0!=b&&(a+="translate y "+b+";");return a});c(b,"getOrientationText",function(a,b){switch(a){case 4129:return this.getMoveToText(1,!1);case 1073742132:var c=this.getRotationQ();b&&(c=c.inv());return c.toString();case 1073742178:var c=new JU.SB,l=this.getTranslationXPercent();JV.TransformManager.truncate2(c,b?-l:l);l=this.getTranslationYPercent();JV.TransformManager.truncate2(c,b?-l:l);return c.toString();default:return this.getMoveToText(1,
!0)+"\n#OR\n"+this.getRotateZyzText(!0)}},"~N,~B");c(b,"getRotationQ",function(){return JU.Quat.newM(this.matrixRotate)});c(b,"getOrientationInfo",function(){var a=new java.util.Hashtable;a.put("moveTo",this.getMoveToText(1,!1));a.put("center","center "+this.getCenterText());a.put("centerPt",this.fixedRotationCenter);var b=new JU.A4;b.setM(this.matrixRotate);a.put("axisAngle",b);a.put("quaternion",this.getRotationQ().toPoint4f());a.put("rotationMatrix",this.matrixRotate);a.put("rotateZYZ",this.getRotateZyzText(!1));
a.put("rotateXYZ",this.getRotateXyzText());a.put("transXPercent",Float.$valueOf(this.getTranslationXPercent()));a.put("transYPercent",Float.$valueOf(this.getTranslationYPercent()));a.put("zoom",Float.$valueOf(this.zmPct));a.put("modelRadius",Float.$valueOf(this.modelRadius));1==this.mode&&(a.put("navigationCenter","navigate center "+JU.Escape.eP(this.navigationCenter)),a.put("navigationOffsetXPercent",Float.$valueOf(this.getNavigationOffsetPercent("X"))),a.put("navigationOffsetYPercent",Float.$valueOf(this.getNavigationOffsetPercent("Y"))),
a.put("navigationDepthPercent",Float.$valueOf(this.navigationDepthPercent)));return a});c(b,"getRotation",function(a){a.setM3(this.matrixRotate)},"JU.M3");c(b,"setZoomHeight",function(a,b){this.zoomHeight=a;this.scaleFitToScreen(!1,b,!1,!0)},"~B,~B");c(b,"zoomBy",function(a){20<a?a=20:-20>a&&(a=-20);var b=a*this.zmPctSet/50;0==b&&(b=0<a?1:0>b?-1:0);this.zoomRatio=(b+this.zmPctSet)/this.zmPctSet;this.zmPctSet+=b},"~N");c(b,"zoomByFactor",function(a,b,c){!(0>=a)&&this.zoomEnabled&&(1!=this.mode?(this.zoomRatio=
a,this.zmPctSet*=a,this.resetXYCenter(b,c)):this.getNav()&&this.nav.zoomByFactor(a,b,c))},"~N,~N,~N");c(b,"zoomToPercent",function(a){this.zmPctSet=a;this.zoomRatio=0},"~N");c(b,"translateZBy",function(a){a>=this.screenPixelCount||(a=this.scalePixelsPerAngstrom/(1-1*a/this.screenPixelCount),a>=this.screenPixelCount||(a=100*(a/this.scaleDefaultPixelsPerAngstrom),this.zoomRatio=a/this.zmPctSet,this.zmPctSet=a))},"~N");c(b,"resetXYCenter",function(a,b){if(!(2147483647==a||2147483647==b)){this.windowCentered&&
this.vwr.setBooleanProperty("windowCentered",!1);var c=new JU.P3;this.transformPt3fSafe(this.fixedRotationCenter,c);c.set(a,b,c.z);this.unTransformPoint(c,c);this.fixedTranslation.set(a,b,0);this.setFixedRotationCenter(c)}},"~N,~N");c(b,"zoomByPercent",function(a){var b=a*this.zmPctSet/100;0==b&&(b=0>a?-1:1);this.zoomRatio=(b+this.zmPctSet)/this.zmPctSet;this.zmPctSet+=b},"~N");c(b,"setScaleAngstromsPerInch",function(a){if(this.scale3D=0<a)this.scale3DAngstromsPerInch=a;this.perspectiveDepth=!this.scale3D},
"~N");c(b,"setSlabRange",function(a){this.slabRange=a},"~N");c(b,"setSlabEnabled",function(a){this.vwr.g.setB("slabEnabled",this.slabEnabled=a)},"~B");c(b,"setZShadeEnabled",function(a){this.zShadeEnabled=a;this.vwr.g.setB("zShade",a)},"~B");c(b,"setZoomEnabled",function(a){this.zoomEnabled=a;this.vwr.g.setB("zoomEnabled",a)},"~B");c(b,"slabReset",function(){this.slabToPercent(100);this.depthToPercent(0);this.slabPlane=this.depthPlane=null;this.setSlabEnabled(!1);this.setZShadeEnabled(!1);this.slabDepthChanged()});
c(b,"getSlabPercentSetting",function(){return this.slabPercentSetting});c(b,"slabDepthChanged",function(){this.vwr.g.setI("slab",this.slabPercentSetting);this.vwr.g.setI("depth",this.depthPercentSetting);this.finalizeTransformParameters()});c(b,"slabByPercentagePoints",function(a){this.slabPlane=null;if(!(0>a?this.slabPercentSetting<=Math.max(0,this.depthPercentSetting):100<=this.slabPercentSetting))this.slabPercentSetting+=a,this.slabDepthChanged(),this.depthPercentSetting>=this.slabPercentSetting&&
(this.depthPercentSetting=this.slabPercentSetting-1)},"~N");c(b,"depthByPercentagePoints",function(a){this.depthPlane=null;if(!(0>a?0>=this.depthPercentSetting:this.depthPercentSetting>=Math.min(100,this.slabPercentSetting)))this.depthPercentSetting+=a,this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1),this.slabDepthChanged()},"~N");c(b,"slabDepthByPercentagePoints",function(a){this.depthPlane=this.slabPlane=null;if(!(0>a?this.slabPercentSetting<=
Math.max(0,this.depthPercentSetting):this.depthPercentSetting>=Math.min(100,this.slabPercentSetting)))this.slabPercentSetting+=a,this.depthPercentSetting+=a,this.slabDepthChanged()},"~N");c(b,"slabToPercent",function(a){this.slabPlane=null;this.vwr.setFloatProperty("slabRange",0);this.slabPercentSetting=a;this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1);this.slabDepthChanged()},"~N");c(b,"depthToPercent",function(a){this.depthPlane=null;this.vwr.g.setI("depth",
a);this.depthPercentSetting=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1);this.slabDepthChanged()},"~N");c(b,"zSlabToPercent",function(a){this.zSlabPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zDepthPercentSetting=a)},"~N");c(b,"zDepthToPercent",function(a){this.zDepthPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zSlabPercentSetting=a)},"~N");c(b,"slabInternal",function(a,b){b?(this.depthPlane=
a,this.depthPercentSetting=0):(this.slabPlane=a,this.slabPercentSetting=100);this.slabDepthChanged()},"JU.P4,~B");c(b,"setSlabDepthInternal",function(a){a?this.depthPlane=null:this.slabPlane=null;this.finalizeTransformParameters();this.slabInternal(this.getSlabDepthPlane(a),a)},"~B");c(b,"getSlabDepthPlane",function(a){if(a){if(null!=this.depthPlane)return this.depthPlane}else if(null!=this.slabPlane)return this.slabPlane;var b=this.matrixTransform;return JU.P4.new4(-b.m20,-b.m21,-b.m22,-b.m23+(a?
this.depthValue:this.slabValue))},"~B");c(b,"getCameraFactors",function(){this.aperatureAngle=360*Math.atan2(this.screenPixelCount/2,this.referencePlaneOffset)/3.141592653589793;this.cameraDistanceFromCenter=this.referencePlaneOffset/this.scalePixelsPerAngstrom;var a=JU.P3.new3(w(this.screenWidth/2),w(this.screenHeight/2),this.referencePlaneOffset);this.unTransformPoint(a,a);var b=JU.P3.new3(w(this.screenWidth/2),w(this.screenHeight/2),0);this.unTransformPoint(b,b);b.sub(this.fixedRotationCenter);
var c=JU.P3.new3(w(this.screenWidth/2),w(this.screenHeight/2),this.cameraDistanceFromCenter*this.scalePixelsPerAngstrom);this.unTransformPoint(c,c);c.sub(this.fixedRotationCenter);b.add(c);return x(-1,[a,b,this.fixedRotationCenter,JU.P3.new3(this.cameraDistanceFromCenter,this.aperatureAngle,this.scalePixelsPerAngstrom)])});c(b,"setPerspectiveDepth",function(a){this.perspectiveDepth!=a&&(this.perspectiveDepth=a,this.vwr.g.setB("perspectiveDepth",a),this.resetFitToScreen(!1))},"~B");c(b,"getPerspectiveDepth",
function(){return this.perspectiveDepth});c(b,"setCameraDepthPercent",function(a,b){this.resetNavigationPoint(b);var c=0>a?-a/100:a;0!=c&&(this.cameraDepthSetting=c,this.vwr.g.setF("cameraDepth",this.cameraDepthSetting),this.cameraDepth=NaN)},"~N,~B");c(b,"getCameraDepth",function(){return this.cameraDepthSetting});c(b,"setScreenParameters0",function(a,b,c,l,e,f){2147483647!=a&&(this.screenWidth=a,this.screenHeight=b,this.useZoomLarge=c,this.width=(this.antialias=l)?2*a:a,this.height=l?2*b:b,this.scaleFitToScreen(!1,
c,e,f))},"~N,~N,~B,~B,~B,~B");c(b,"setAntialias",function(a){var b=this.antialias!=a;this.width=(this.antialias=a)?2*this.screenWidth:this.screenWidth;this.height=this.antialias?2*this.screenHeight:this.screenHeight;b&&this.scaleFitToScreen(!1,this.useZoomLarge,!1,!1)},"~B");c(b,"defaultScaleToScreen",function(a){return this.screenPixelCount/2/a},"~N");c(b,"resetFitToScreen",function(a){this.scaleFitToScreen(a,this.vwr.g.zoomLarge,!0,!0)},"~B");c(b,"scaleFitToScreen",function(a,b,c,l){0==this.width||
0==this.height?this.screenPixelCount=1:(this.fixedTranslation.set(this.width*(a?0.5:this.xTranslationFraction),this.height*(a?0.5:this.yTranslationFraction),0),this.setTranslationFractions(),a&&this.camera.set(0,0,0),l&&this.resetNavigationPoint(c),this.zoomHeight&&(b=this.height>this.width),this.screenPixelCount=b==this.height>this.width?this.height:this.width);2<this.screenPixelCount&&(this.screenPixelCount-=2);this.scaleDefaultPixelsPerAngstrom=this.defaultScaleToScreen(this.modelRadius)},"~B,~B,~B,~B");
c(b,"scaleToScreen",function(a,b){if(0==b||2>a)return 0;var c=this.scaleToPerspective(a,b*this.scalePixelsPerAngstrom/1E3);return 0<c?c:1},"~N,~N");c(b,"unscaleToScreen",function(a,b){var c=b/this.scalePixelsPerAngstrom;return this.perspectiveDepth?c/this.getPerspectiveFactor(a):c},"~N,~N");c(b,"scaleToPerspective",function(a,b){return this.perspectiveDepth?b*this.getPerspectiveFactor(a):b},"~N,~N");c(b,"setNavigationMode",function(a){var b=this.mode;this.mode=a?1:this.defaultMode;this.resetNavigationPoint(a||
1==b)},"~B");c(b,"isNavigating",function(){return this.navigating||this.navOn});c(b,"finalizeTransformParameters",function(){this.haveNotifiedNaN=!1;this.fixedRotationOffset.setT(this.fixedTranslation);this.camera.setT(this.cameraSetting);this.internalSlab=this.slabEnabled&&(null!=this.slabPlane||null!=this.depthPlane);var a=this.getZoomSetting();this.zmPct!=a&&(this.zmPct=a,this.vwr.g.fontCaching||this.vwr.gdata.clearFontCache());this.calcCameraFactors();this.calcTransformMatrix();1==this.mode?this.calcNavigationPoint():
this.calcSlabAndDepthValues()});c(b,"getZoomSetting",function(){5>this.zmPctSet&&(this.zmPctSet=5);2E5<this.zmPctSet&&(this.zmPctSet=2E5);return this.zoomEnabled||1==this.mode?this.zmPctSet:100});c(b,"calcSlabAndDepthValues",function(){this.slabValue=1>this.slabRange?this.zValueFromPercent(this.slabPercentSetting):w(Math.floor(this.modelCenterOffset*this.slabRange/(2*this.modelRadius)*(this.zmPctSet/100)));this.depthValue=this.zValueFromPercent(this.depthPercentSetting);this.zSlabPercentSetting==
this.zDepthPercentSetting?(this.zSlabValue=this.slabValue,this.zDepthValue=this.depthValue):(this.zSlabValue=this.zValueFromPercent(this.zSlabPercentSetting),this.zDepthValue=this.zValueFromPercent(this.zDepthPercentSetting));if(null!=this.zSlabPoint)try{this.transformPt3fSafe(this.zSlabPoint,this.pointT2),this.zSlabValue=D(this.pointT2.z)}catch(a){if(!H(a,Exception))throw a;}this.vwr.g.setO("_slabPlane",JU.Escape.eP4(this.getSlabDepthPlane(!1)));this.vwr.g.setO("_depthPlane",JU.Escape.eP4(this.getSlabDepthPlane(!0)));
this.slabEnabled||(this.slabValue=0,this.depthValue=2147483647)});c(b,"zValueFromPercent",function(a){return w(Math.floor((1-a/50)*this.modelRadiusPixels+this.modelCenterOffset))},"~N");c(b,"calcTransformMatrix",function(){this.matrixTransform.setIdentity();this.vectorTemp.sub2(this.frameOffset,this.fixedRotationCenter);this.matrixTransform.setTranslation(this.vectorTemp);this.matrixTemp.setToM3(this.stereoFrame?this.matrixStereo:this.matrixRotate);this.matrixTransform.mul2(this.matrixTemp,this.matrixTransform);
this.matrixTemp.setIdentity();this.matrixTemp.m00=this.matrixTemp.m11=this.matrixTemp.m22=this.scalePixelsPerAngstrom;this.matrixTemp.m11=this.matrixTemp.m22=-this.scalePixelsPerAngstrom;this.matrixTransform.mul2(this.matrixTemp,this.matrixTransform);this.matrixTransform.m23+=this.modelCenterOffset;try{this.matrixTransformInv.setM4(this.matrixTransform).invert()}catch(a){if(H(a,Exception))System.out.println("ERROR INVERTING matrixTransform!");else throw a;}});c(b,"rotatePoint",function(a,b){this.matrixRotate.rotate2(a,
b);b.y=-b.y},"JU.T3,JU.T3");c(b,"getScreenTemp",function(a,b){this.matrixTransform.rotTrans2(a,b)},"JU.T3,JU.P3");c(b,"transformPtScr",function(a,b){b.setT(this.transformPt(a))},"JU.T3,JU.P3i");c(b,"transformPtScrSafe",function(a,b){b.setT(this.transformPtSafe(a))},"JU.T3,JU.P3i");c(b,"transformPtScrT3",function(a,b){this.transformPt(a);b.setT(this.fScrPtSafe)},"JU.T3,JU.T3");c(b,"transformPt3f",function(a,b){this.applyPerspective(a,a,this.fScrPtSafe,null);b.setT(this.fScrPtSafe)},"JU.T3,JU.P3");
c(b,"transformPt3fSafe",function(a,b){this.applyPerspective(a,a,this.fScrPt,null);b.setT(this.fScrPt)},"JU.T3,JU.P3");c(b,"transformPtNoClip",function(a,b){this.applyPerspective(a,null,this.fScrPtSafe,null);b.setT(this.fScrPtSafe)},"JU.T3,JU.T3");c(b,"transformPt",function(a){return this.applyPerspective(a,this.internalSlab?a:null,this.fScrPtSafe,this.iScrPt)},"JU.T3");c(b,"transformPtSafe",function(a){return this.applyPerspective(a,this.internalSlab?a:null,this.fScrPt,this.iScrPtSafe)},"JU.T3");
c(b,"transformPtVib",function(a,b){return this.applyPerspective(this.getVibrationPoint(b,this.ptVibTemp.setP(a),NaN),a,this.fScrPtSafe,this.iScrPt)},"JU.P3,JU.Vibration");c(b,"transformPtVibSafe",function(a,b){return this.applyPerspective(this.getVibrationPoint(b,this.ptVibTempSafe.setP(a),NaN),a,this.fScrPt,this.iScrPtSafe)},"JU.P3,JU.Vibration");c(b,"getVibrationPoint",function(a,b,c){return a.setCalcPoint(b,this.vibrationT,Float.isNaN(c)?this.vibrationScale:c,this.vwr.g.modulationScale)},"JU.Vibration,JU.T3,~N");
c(b,"transformPt2D",function(a){-3.4028235E38==a.z?(this.iScrPt.x=w(Math.floor(a.x/100*this.screenWidth)),this.iScrPt.y=w(Math.floor((1-a.y/100)*this.screenHeight))):(this.iScrPt.x=D(a.x),this.iScrPt.y=this.screenHeight-D(a.y));this.antialias&&(this.iScrPt.x<<=1,this.iScrPt.y<<=1);this.matrixTransform.rotTrans2(this.fixedRotationCenter,this.fScrPtSafe);this.iScrPt.z=D(this.fScrPtSafe.z);return this.iScrPt},"JU.T3");c(b,"applyPerspective",function(a,b,c,l){this.getScreenTemp(a,c);a=c.z;Float.isNaN(a)?
(!this.haveNotifiedNaN&&JU.Logger.debugging&&JU.Logger.debug("NaN seen in TransformPoint"),this.haveNotifiedNaN=!0,a=c.z=1):0>=a&&(a=c.z=1);switch(this.mode){case 1:c.x-=this.navigationShiftXY.x;c.y-=this.navigationShiftXY.y;break;case 2:c.x+=this.perspectiveShiftXY.x,c.y+=this.perspectiveShiftXY.y}this.perspectiveDepth&&(a=this.getPerspectiveFactor(a),c.x*=a,c.y*=a);switch(this.mode){case 1:c.x+=this.navigationOffset.x;c.y+=this.navigationOffset.y;break;case 2:c.x-=this.perspectiveShiftXY.x,c.y-=
this.perspectiveShiftXY.y;case 0:c.x+=this.fixedRotationOffset.x,c.y+=this.fixedRotationOffset.y}Float.isNaN(c.x)&&!this.haveNotifiedNaN&&(JU.Logger.debugging&&JU.Logger.debug("NaN found in transformPoint "),this.haveNotifiedNaN=!0);if(b=null!=b&&this.xyzIsSlabbedInternal(b))c.z=1;null!=l&&l.set(D(c.x),D(c.y),b?1:D(c.z));return l},"JU.T3,JU.T3,JU.P3,JU.P3i");c(b,"xyzIsSlabbedInternal",function(a){return null!=this.slabPlane&&0<a.x*this.slabPlane.x+a.y*this.slabPlane.y+a.z*this.slabPlane.z+this.slabPlane.w||
null!=this.depthPlane&&0>a.x*this.depthPlane.x+a.y*this.depthPlane.y+a.z*this.depthPlane.z+this.depthPlane.w},"JU.T3");c(b,"move",function(a,b,c,l,e,f,h){this.movetoThread=J.api.Interface.getOption("thread.MoveToThread",this.vwr,"tm");this.movetoThread.setManager(this,this.vwr,x(-1,[b,l,L(-1,[c,e,f,h])]));0<f&&this.movetoThread.setEval(a);this.movetoThread.run()},"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(b,"isInPosition",function(a,b){if(Float.isNaN(b))return!0;this.aaTest1.setVA(a,b/
57.29577951308232);this.ptTest1.set(4.321,1.23456,3.14159);this.getRotation(this.matrixTest);this.matrixTest.rotate2(this.ptTest1,this.ptTest2);this.matrixTest.setAA(this.aaTest1).rotate2(this.ptTest1,this.ptTest3);return 0.1>this.ptTest3.distance(this.ptTest2)},"JU.V3,~N");c(b,"moveToPyMOL",function(a,b,c){var l=JU.M3.newA9(c);l.invert();var e=c[9],f=-c[10],h=-c[11],j=JU.P3.new3(c[12],c[13],c[14]),m=c[15],n=c[16],p=c[17];this.setPerspectiveDepth(!(0<=p));var p=Math.abs(p)/2,q=Math.tan(3.141592653589793*
p/180),p=h*q,q=0.5/q-0.5,r=50/p;0<m&&(m=50+D((h-m)*r),h=50+D((h-n)*r),this.setSlabEnabled(!0),this.slabToPercent(m),this.depthToPercent(h),21==c.length&&(n=0!=c[18],r=0!=c[19],c=c[20],this.setZShadeEnabled(n),n&&(r?this.vwr.setIntProperty("zSlab",D(Math.min(100,m+c*(h-m)))):this.vwr.setIntProperty("zSlab",D((m+h)/2)),this.vwr.setIntProperty("zDepth",h))));this.moveTo(a,b,j,null,0,l,100,NaN,NaN,p,null,NaN,NaN,NaN,q,e,f);return!0},"J.api.JmolScriptEvaluator,~N,~A");c(b,"moveTo",function(a,b,c,l,e,f,
h,j,m,n,p,q,r,s,v,w,y){if(null==f)if(f=new JU.M3,l=JU.V3.newV(l),Float.isNaN(e))f.m00=NaN;else if(0.01>e&&-0.01<e)f.setScale(1);else{if(0==l.x&&0==l.y&&0==l.z)return;var z=new JU.A4;z.setVA(l,e/57.29577951308232);f.setAA(z)}w==this.cameraSetting.x&&(w=NaN);y==this.cameraSetting.y&&(y=NaN);v==this.cameraDepth&&(v=NaN);Float.isNaN(w)||(j=50*w/n/this.width*this.screenPixelCount);Float.isNaN(y)||(m=50*y/n/this.height*this.screenPixelCount);e=null==c?this.scaleDefaultPixelsPerAngstrom:this.defaultScaleToScreen(n);
if(0>=b)this.setAll(c,f,p,h,j,m,n,e,s,q,r,v,w,y),this.vwr.moveUpdate(b),this.vwr.finalizeTransformParameters();else try{null==this.movetoThread&&(this.movetoThread=J.api.Interface.getOption("thread.MoveToThread",this.vwr,"tm"));var A=this.movetoThread.setManager(this,this.vwr,x(-1,[c,f,p,L(-1,[b,h,j,m,n,e,s,q,r,v,w,y])]));0>=A||this.vwr.g.waitForMoveTo?(0<A&&this.movetoThread.setEval(null==a?this.vwr.eval:a),this.movetoThread.run(),this.vwr.isSingleThreaded||(this.movetoThread=null)):this.movetoThread.start()}catch(B){if(!H(B,
Exception))throw B;}},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.T3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(b,"setAll",function(a,b,c,l,e,f,h,j,m,n,p,q,r,s){Float.isNaN(b.m00)||this.setRotation(b);null!=a&&this.moveRotationCenter(a,!this.windowCentered);null!=c&&1==this.mode&&this.navigationCenter.setT(c);Float.isNaN(q)||this.setCameraDepthPercent(q,!1);!Float.isNaN(r)&&!Float.isNaN(s)&&this.setCamera(r,s);Float.isNaN(l)||this.zoomToPercent(l);Float.isNaN(h)||(this.modelRadius=h);Float.isNaN(j)||
(this.scaleDefaultPixelsPerAngstrom=j);!Float.isNaN(e)&&!Float.isNaN(f)&&(this.translateToPercent("x",e),this.translateToPercent("y",f));1==this.mode&&(!Float.isNaN(n)&&!Float.isNaN(p)&&this.navTranslatePercentOrTo(0,n,p),Float.isNaN(m)||this.setNavigationDepthPercent(m))},"JU.P3,JU.M3,JU.P3,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"stopMotion",function(){this.movetoThread=null});c(b,"getRotationText",function(){this.axisangleT.setM(this.matrixRotate);var a=57.29577951308232*this.axisangleT.angle,b=
new JU.SB;this.vectorT.set(this.axisangleT.x,this.axisangleT.y,this.axisangleT.z);if(0.01>a)return"{0 0 1 0}";this.vectorT.normalize();this.vectorT.scale(1E3);b.append("{");JV.TransformManager.truncate0(b,this.vectorT.x);JV.TransformManager.truncate0(b,this.vectorT.y);JV.TransformManager.truncate0(b,this.vectorT.z);JV.TransformManager.truncate2(b,a);b.append("}");return b.toString()});c(b,"getMoveToText",function(a,b){this.finalizeTransformParameters();var c=new JU.SB;c.append("moveto ");b&&c.append("/* time, axisAngle */ ");
c.appendF(a);c.append(" ").append(this.getRotationText());b&&c.append(" /* zoom, translation */ ");JV.TransformManager.truncate2(c,this.zmPctSet);JV.TransformManager.truncate2(c,this.getTranslationXPercent());JV.TransformManager.truncate2(c,this.getTranslationYPercent());c.append(" ");b&&c.append(" /* center, rotationRadius */ ");c.append(this.getCenterText());c.append(" ").appendF(this.modelRadius);c.append(this.getNavigationText(b));b&&c.append(" /* cameraDepth, cameraX, cameraY */ ");JV.TransformManager.truncate2(c,
this.cameraDepth);JV.TransformManager.truncate2(c,this.cameraSetting.x);JV.TransformManager.truncate2(c,this.cameraSetting.y);c.append(";");return c.toString()},"~N,~B");c(b,"getCenterText",function(){return JU.Escape.eP(this.fixedRotationCenter)});c(b,"getRotateXyzText",function(){var a=new JU.SB,b=this.matrixRotate.m20,c=-(57.29577951308232*Math.asin(b)),l;0.999<b||-0.999>b?(b=-(57.29577951308232*Math.atan2(this.matrixRotate.m12,this.matrixRotate.m11)),l=0):(b=57.29577951308232*Math.atan2(this.matrixRotate.m21,
this.matrixRotate.m22),l=57.29577951308232*Math.atan2(this.matrixRotate.m10,this.matrixRotate.m00));a.append("reset");a.append(";center ").append(this.getCenterText());0!=b&&(a.append("; rotate x"),JV.TransformManager.truncate2(a,b));0!=c&&(a.append("; rotate y"),JV.TransformManager.truncate2(a,c));0!=l&&(a.append("; rotate z"),JV.TransformManager.truncate2(a,l));a.append(";");this.addZoomTranslationNavigationText(a);return a.toString()});c(b,"addZoomTranslationNavigationText",function(a){100!=this.zmPct&&
(a.append(" zoom"),JV.TransformManager.truncate2(a,this.zmPct),a.append(";"));var b=this.getTranslationXPercent();0!=b&&(a.append(" translate x"),JV.TransformManager.truncate2(a,b),a.append(";"));b=this.getTranslationYPercent();0!=b&&(a.append(" translate y"),JV.TransformManager.truncate2(a,b),a.append(";"));if(this.modelRadius!=this.rotationRadiusDefault||10==this.modelRadius)a.append(" set rotationRadius"),JV.TransformManager.truncate2(a,this.modelRadius),a.append(";");1==this.mode&&(a.append("navigate 0 center ").append(JU.Escape.eP(this.navigationCenter)),
a.append(";navigate 0 translate"),JV.TransformManager.truncate2(a,this.getNavigationOffsetPercent("X")),JV.TransformManager.truncate2(a,this.getNavigationOffsetPercent("Y")),a.append(";navigate 0 depth "),JV.TransformManager.truncate2(a,this.navigationDepthPercent),a.append(";"))},"JU.SB");c(b,"getRotateZyzText",function(a){var b=new JU.SB,c=this.vwr.ms.getInfoM("defaultOrientationMatrix");null==c?c=this.matrixRotate:(c=JU.M3.newM3(c),c.invert(),c.mul2(this.matrixRotate,c));var l=c.m22,e=57.29577951308232*
Math.acos(l);0.999<l||-0.999>l?(l=57.29577951308232*Math.atan2(c.m10,c.m11),c=0):(l=57.29577951308232*Math.atan2(c.m21,-c.m20),c=57.29577951308232*Math.atan2(c.m12,c.m02));0!=l&&(0!=e&&0!=c&&a)&&b.append("#Follows Z-Y-Z convention for Euler angles\n");b.append("reset");b.append(";center ").append(this.getCenterText());0!=l&&(b.append("; rotate z"),JV.TransformManager.truncate2(b,l));0!=e&&(b.append("; rotate y"),JV.TransformManager.truncate2(b,e));0!=c&&(b.append("; rotate z"),JV.TransformManager.truncate2(b,
c));b.append(";");this.addZoomTranslationNavigationText(b);return b.toString()},"~B");b.truncate0=c(b,"truncate0",function(a,b){a.appendC(" ");a.appendI(Math.round(b))},"JU.SB,~N");b.truncate2=c(b,"truncate2",function(a,b){a.appendC(" ");a.appendF(Math.round(100*b)/100)},"JU.SB,~N");c(b,"setSpinXYZ",function(a,b,c){Float.isNaN(a)||(this.spinX=a);Float.isNaN(b)||(this.spinY=b);Float.isNaN(c)||(this.spinZ=c);(this.isSpinInternal||this.isSpinFixed)&&this.clearSpin()},"~N,~N,~N");c(b,"setSpinFps",function(a){0>=
a?a=1:50<a&&(a=50);this.spinFps=a},"~N");c(b,"setNavXYZ",function(a,b,c){Float.isNaN(a)||(this.navX=a);Float.isNaN(b)||(this.navY=b);Float.isNaN(c)||(this.navZ=c)},"~N,~N,~N");c(b,"clearSpin",function(){this.setSpinOff();this.setNavOn(!1);this.vectorSpinOnly=this.isSpinFixed=this.isSpinInternal=!1});c(b,"setSpinOn",function(){this.setSpin(null,!0,3.4028235E38,null,null,null,null,!1,null,-1)});c(b,"setSpinOff",function(){this.setSpin(null,!1,3.4028235E38,null,null,null,null,!1,null,-1)});c(b,"setSpin",
function(a,b,c,l,e,f,h,j,m,n){this.navOn&&b&&this.setNavOn(!1);this.spinOn!=b&&(this.spinOn=b,this.vectorSpinOnly=null!=f,this.vwr.g.setB("_spinning",b),b?null==this.spinThread&&(this.spinThread=J.api.Interface.getOption("thread.SpinThread",this.vwr,"tm"),this.spinThread.setManager(this,this.vwr,x(-1,[Float.$valueOf(c),l,e,f,h,j?Boolean.TRUE:null,m,Integer.$valueOf(n)])),this.spinIsGesture=j,null!=f||Float.isNaN(c)||3.4028235E38==c||!this.vwr.g.waitForMoveTo?this.spinThread.start():(this.spinThread.setEval(a),
this.spinThread.run())):null!=this.spinThread&&(this.spinThread.reset(),this.spinThread=null))},"J.api.JmolScriptEvaluator,~B,~N,JU.Lst,~A,JU.M3,JU.BS,~B,~A,~N");c(b,"setNavOn",function(a){if(!Float.isNaN(this.navFps)){var b=this.navOn;a&&this.spinOn&&this.setSpin(null,!1,0,null,null,null,null,!1,null,-1);this.navOn=a;this.vwr.g.setB("_navigating",a);a||this.navInterrupt();a?(0==this.navX&&(0==this.navY&&0==this.navZ)&&(this.navZ=1),0==this.navFps&&(this.navFps=10),null==this.spinThread&&(this.spinThread=
J.api.Interface.getOption("thread.SpinThread",this.vwr,"tm"),this.spinThread.setManager(this,this.vwr,null),this.spinThread.start())):b&&null!=this.spinThread&&(this.spinThread.interrupt(),this.spinThread=null)}},"~B");c(b,"setVibrationScale",function(a){this.vibrationScale=a},"~N");c(b,"setVibrationPeriod",function(a){if(Float.isNaN(a))a=this.vibrationPeriod;else if(0==a)this.vibrationPeriodMs=this.vibrationPeriod=0;else{this.vibrationPeriod=Math.abs(a);this.vibrationPeriodMs=D(1E3*this.vibrationPeriod);
if(0<a)return;a=-a}this.setVibrationOn(0<a&&0<=this.vwr.ms.getLastVibrationVector(this.vwr.am.cmi,0))},"~N");c(b,"setVibrationT",function(a){this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=a;0==this.vibrationScale&&(this.vibrationScale=this.vwr.g.vibrationScale)},"~N");c(b,"isVibrationOn",function(){return this.vibrationOn});c(b,"setVibrationOn",function(a){a?1>this.vwr.ms.mc?(this.vibrationOn=!1,this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=0):(null==this.vibrationThread&&(this.vibrationThread=
J.api.Interface.getOption("thread.VibrationThread",this.vwr,"tm"),this.vibrationThread.setManager(this,this.vwr,null),this.vibrationThread.start()),this.vibrationOn=!0):(null!=this.vibrationThread&&(this.vibrationThread.interrupt(),this.vibrationThread=null),this.vibrationOn=!1,this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=0)},"~B");c(b,"clearVibration",function(){this.setVibrationOn(!1);this.vibrationScale=0});c(b,"setStereoMode2",function(a){this.stereoMode=J.c.STER.CUSTOM;this.stereoColors=
a},"~A");c(b,"setStereoMode",function(a){this.stereoColors=null;this.stereoMode=a;this.stereoDoubleDTI=a===J.c.STER.DTI;this.stereoDoubleFull=a===J.c.STER.DOUBLE},"J.c.STER");c(b,"setStereoDegrees",function(a){this.stereoDegrees=a;this.stereoRadians=0.017453292519943295*a},"~N");c(b,"getStereoRotationMatrix",function(a){this.stereoFrame=a;if(!a)return this.matrixRotate;this.matrixTemp3.setAsYRotation(-this.stereoRadians);this.matrixStereo.mul2(this.matrixTemp3,this.matrixRotate);return this.matrixStereo},
"~B");c(b,"isWindowCentered",function(){return this.windowCentered});c(b,"setWindowCentered",function(a){this.windowCentered=a;this.resetNavigationPoint(!0)},"~B");c(b,"setRotationRadius",function(a,b){a=this.modelRadius=0>=a?this.vwr.ms.calcRotationRadius(this.vwr.am.cmi,this.fixedRotationCenter,!0):a;b&&this.vwr.setRotationRadius(a,!1);return a},"~N,~B");c(b,"setRotationCenterAndRadiusXYZ",function(a,b){this.resetNavigationPoint(!1);null==a?(this.setFixedRotationCenter(this.rotationCenterDefault),
this.modelRadius=this.rotationRadiusDefault):(this.setFixedRotationCenter(a),b&&this.windowCentered&&(this.modelRadius=this.vwr.ms.calcRotationRadius(this.vwr.am.cmi,this.fixedRotationCenter,!0)))},"JU.T3,~B");c(b,"setNewRotationCenter",function(a,b){null==a&&(a=this.rotationCenterDefault);this.windowCentered?(this.translateToPercent("x",0),this.translateToPercent("y",0),this.setRotationCenterAndRadiusXYZ(a,!0),b&&this.resetFitToScreen(!0)):this.moveRotationCenter(a,!0)},"JU.P3,~B");c(b,"moveRotationCenter",
function(a,b){this.setRotationCenterAndRadiusXYZ(a,!1);b&&this.setRotationPointXY(this.fixedRotationCenter)},"JU.P3,~B");c(b,"setCenter",function(){this.setRotationCenterAndRadiusXYZ(this.fixedRotationCenter,!0)});c(b,"setCenterAt",function(a,b){var c=JU.P3.newP(b);switch(a){case 1073741826:break;case 96:c.add(this.vwr.ms.getAverageAtomPoint());break;case 1812599299:c.add(this.vwr.getBoundBoxCenter());break;default:c.setT(this.rotationCenterDefault)}this.setRotationCenterAndRadiusXYZ(c,!0);this.resetFitToScreen(!0)},
"~N,JU.P3");c(b,"setFrameOffset",function(a){null==this.frameOffsets||0>a||a>=this.frameOffsets.length?this.frameOffset.set(0,0,0):this.frameOffset.setT(this.frameOffsets[a])},"~N");c(b,"setSelectedTranslation",function(a,b,c,l){if(this.perspectiveDepth)switch(this.bsSelectedAtoms=a,b.charCodeAt(0)){case 88:case 120:this.ptOffset.x+=c;break;case 89:case 121:this.ptOffset.y+=c;break;case 90:case 122:this.ptOffset.z+=c}else{c=new JU.V3;switch(b.charCodeAt(0)){case 88:case 120:c.set(l,0,0);break;case 89:case 121:c.set(0,
l,0);break;case 90:case 122:c.set(0,0,l)}this.vwr.moveAtoms(null,null,this.matrixRotate,c,this.internalRotationCenter,!1,a,!0,!1)}},"JU.BS,~S,~N,~N");c(b,"setNavFps",function(a){this.navFps=a},"~N");c(b,"calcCameraFactors",function(){Float.isNaN(this.cameraDepth)&&(this.cameraDepth=this.cameraDepthSetting,this.zoomFactor=3.4028235E38);this.cameraDistance=this.cameraDepth*this.screenPixelCount;this.referencePlaneOffset=this.cameraDistance+this.screenPixelCount/2;this.scalePixelsPerAngstrom=this.scale3D&&
!this.perspectiveDepth&&1!=this.mode?72/this.scale3DAngstromsPerInch*(this.antialias?2:1):this.screenPixelCount/this.visualRangeAngstroms;1!=this.mode&&(this.mode=0==this.camera.z?0:2);this.perspectiveShiftXY.set(0==this.camera.z?0:100*(this.camera.x*this.scalePixelsPerAngstrom/this.screenWidth),0==this.camera.z?0:100*(this.camera.y*this.scalePixelsPerAngstrom/this.screenHeight),0);this.modelRadiusPixels=this.modelRadius*this.scalePixelsPerAngstrom;var a=2*this.modelRadius/this.visualRangeAngstroms*
this.referencePlaneOffset;if(1==this.mode)this.calcNavCameraFactors(a);else{this.zoomFactor=3.4028235E38;this.modelCenterOffset=this.referencePlaneOffset;if(!this.scale3D||this.perspectiveDepth)this.scalePixelsPerAngstrom*=this.modelCenterOffset/a*this.zmPct/100;this.modelRadiusPixels=this.modelRadius*this.scalePixelsPerAngstrom}});c(b,"calcNavCameraFactors",function(a){3.4028235E38==this.zoomFactor?(1E4<this.zmPct&&(this.zmPct=1E4),this.modelCenterOffset=100*a/this.zmPct):this.prevZoomSetting!=this.zmPctSet&&
(this.modelCenterOffset=0==this.zoomRatio?100*a/this.zmPctSet:this.modelCenterOffset+(1-this.zoomRatio)*this.referencePlaneOffset,this.navMode=-1);this.prevZoomSetting=this.zmPctSet;this.zoomFactor=this.modelCenterOffset/this.referencePlaneOffset;this.zmPct=0==this.zoomFactor?1E4:100*(a/this.modelCenterOffset)},"~N");c(b,"getPerspectiveFactor",function(a){return 0>=a?this.referencePlaneOffset:this.referencePlaneOffset/a},"~N");c(b,"unTransformPoint",function(a,b){this.untransformedPoint.setT(a);switch(this.mode){case 1:this.untransformedPoint.x-=
this.navigationOffset.x;this.untransformedPoint.y-=this.navigationOffset.y;break;case 2:this.fScrPtSafe.x+=this.perspectiveShiftXY.x,this.fScrPtSafe.y+=this.perspectiveShiftXY.y;case 0:this.untransformedPoint.x-=this.fixedRotationOffset.x,this.untransformedPoint.y-=this.fixedRotationOffset.y}if(this.perspectiveDepth){var c=this.getPerspectiveFactor(this.untransformedPoint.z);this.untransformedPoint.x/=c;this.untransformedPoint.y/=c}switch(this.mode){case 1:this.untransformedPoint.x+=this.navigationShiftXY.x;
this.untransformedPoint.y+=this.navigationShiftXY.y;break;case 2:this.untransformedPoint.x-=this.perspectiveShiftXY.x,this.untransformedPoint.y-=this.perspectiveShiftXY.y}this.matrixTransformInv.rotTrans2(this.untransformedPoint,b)},"JU.T3,JU.T3");c(b,"resetNavigationPoint",function(a){5>this.zmPct&&1!=this.mode?(this.perspectiveDepth=!0,this.mode=1):(1==this.mode?(this.navMode=1,this.slabPercentSetting=0,this.perspectiveDepth=!0):a&&(this.slabPercentSetting=100),this.vwr.setFloatProperty("slabRange",
0),a&&this.setSlabEnabled(1==this.mode),this.zoomFactor=3.4028235E38,this.zmPctSet=this.zmPct)},"~B");c(b,"setNavigatePt",function(a){this.navigationCenter.setT(a);this.navMode=3;this.navigating=!0;this.finalizeTransformParameters();this.navigating=!1},"JU.P3");c(b,"setNavigationSlabOffsetPercent",function(a){this.vwr.g.setF("navigationSlab",a);this.calcCameraFactors();this.navigationSlabOffset=a/50*this.modelRadiusPixels},"~N");c(b,"getNavigationOffset",function(){this.transformPt3fSafe(this.navigationCenter,
this.navigationOffset);return this.navigationOffset});c(b,"getNavPtHeight",function(){return this.height/2});c(b,"getNavigationOffsetPercent",function(a){this.getNavigationOffset();return 0==this.width||0==this.height?0:"X"==a?100*(this.navigationOffset.x-this.width/2)/this.width:100*(this.navigationOffset.y-this.getNavPtHeight())/this.height},"~S");c(b,"getNavigationText",function(a){a=a?" /* navigation center, translation, depth */ ":" ";if(1!=this.mode)return a+"{0 0 0} 0 0 0";this.getNavigationOffset();
return a+JU.Escape.eP(this.navigationCenter)+" "+this.getNavigationOffsetPercent("X")+" "+this.getNavigationOffsetPercent("Y")+" "+this.navigationDepthPercent},"~B");c(b,"setScreenParameters",function(a,b,c,l,e,f){var h=1==this.mode?JU.P3.newP(this.navigationCenter):null,j=JU.P3.newP(this.navigationOffset);j.x/=this.width;j.y/=this.height;this.setScreenParameters0(a,b,c,l,e,f);null!=h&&(this.navigationCenter.setT(h),this.navTranslatePercentOrTo(-1,j.x*this.width,j.y*this.height),this.setNavigatePt(h))},
"~N,~N,~B,~B,~B,~B");c(b,"navInterrupt",function(){null!=this.nav&&this.nav.interrupt()});c(b,"getNav",function(){if(null!=this.nav)return!0;this.nav=J.api.Interface.getOption("navigate.Navigator",this.vwr,"tm");if(null==this.nav)return!1;this.nav.set(this,this.vwr);return!0});c(b,"navigateList",function(a,b){this.getNav()&&this.nav.navigateList(a,b)},"J.api.JmolScriptEvaluator,JU.Lst");c(b,"navigateAxis",function(a,b){this.getNav()&&this.nav.navigateAxis(a,b)},"JU.V3,~N");c(b,"setNavigationOffsetRelative",
function(){this.getNav()&&this.nav.setNavigationOffsetRelative()});c(b,"navigateKey",function(a,b){this.getNav()&&this.nav.navigateKey(a,b)},"~N,~N");c(b,"setNavigationDepthPercent",function(a){this.getNav()&&this.nav.setNavigationDepthPercent(a)},"~N");c(b,"navTranslatePercentOrTo",function(a,b,c){this.getNav()&&this.nav.navTranslatePercentOrTo(a,b,c)},"~N,~N,~N");c(b,"calcNavigationPoint",function(){this.getNav()&&this.nav.calcNavigationPoint()});c(b,"getNavigationState",function(){return 1==this.mode&&
this.getNav()?this.nav.getNavigationState():""})});s("JV");B("java.lang.Enum J.api.JmolViewer $.PlatformViewer J.atomdata.AtomDataServer java.util.Hashtable JU.P3".split(" "),"JV.Viewer","java.util.Arrays JU.AU $.BS $.Base64 $.CU $.DF $.Lst $.M3 $.P3i $.PT $.Quat $.Rdr $.SB J.adapter.smarter.SmarterJmolAdapter J.api.Interface J.atomdata.RadiusData J.c.FIL $.STER $.VDW J.i18n.GT JM.Measurement $.ModelSet JS.SV $.T J.thread.TimeoutThread JU.BSUtil $.C $.CommandHistory $.Elements $.Escape $.GData $.JmolMolecule $.Logger $.Parser $.TempArray JV.ActionManager $.AnimationManager $.ColorManager $.FileManager $.GlobalSettings $.JC $.ModelManager $.SelectionManager $.ShapeManager $.StateManager $.StatusManager $.TransformManager JV.binding.Binding".split(" "),
function(){var b=n(function(){this.queueOnHold=this.isSingleThreaded=this.isWebGL=this.isJSNoAWT=this.haveDisplay=this.autoExit=this.testAsync=!1;this.fullName="";this.fm=this.ms=this.definedAtomSets=this.compiler=null;this.mustRender=this.listCommands=this.isSyntaxCheck=this.isSyntaxAndFileCheck=this.isJNLP=this.isApplet=!1;this.appletName=this.htmlName="";this.tryPt=0;this.insertedCommand="";this.tm=this.sm=this.g=this.rm=this.slm=this.shm=this.dm=this.cm=this.am=this.acm=this.html5Applet=this.gdata=
null;this.logFilePath=this.syncId="";this.useCommandThread=this.noGraphicsAllowed=this.multiTouch=this.isSilent=this.isSignedAppletLocal=this.isSignedApplet=this.isPrintOnly=this.allowScripting=!1;this.tempArray=this.eval=this.scm=this.stm=this.mm=this.commandHistory=this.internalAccessPath=this.access=this.access0=this.modelAdapter=this.display=this.vwrOptions=this.commandOptions=null;this.async=!1;this.executor=null;this.screenHeight=this.screenWidth=0;this.errorMessageUntranslated=this.errorMessage=
this.chainList=this.chainMap=this.rd=this.defaultVdw=null;this.privateKey=0;this.dataOnly=!1;this.maximumSize=2147483647;this.gRight=null;this.isStereoSlave=!1;this.imageFontScaling=1;this.antialiased=!1;this.prevFrame=-2147483648;this.prevMorphModel=0;this.haveJSV=!1;this.jsv=null;this.systemInfoShown=!1;this.jzt=this.outputManager=null;this.headless=this.isPreviewOnly=!1;this.movableBitSet=null;this.hasSelected=!1;this.lastData=this.jsc=this.smilesMatcher=this.minimizer=this.dssrParser=this.annotationParser=
this.ligandModelSet=this.ligandModels=this.mouse=null;this.motionEventNumber=0;this.inMotion=!1;this.refreshing=!0;this.axesAreTainted=!1;this.jsParams=this.captureParams=null;this.cirChecked=!1;this.hoverAtomIndex=-1;this.hoverText=null;this.hoverLabel="%U";this.hoverEnabled=!0;this.currentCursor=0;this.ptTemp=null;this.selectionHalosEnabled=!1;this.noFrankEcho=this.frankOn=!0;this.scriptEditorVisible=!1;this.pm=this.headlessImageParams=this.modelkit=this.jmolpopup=this.scriptEditor=this.appConsole=
null;this.isTainted=!0;this.showSelected=this.movingSelected=!1;this.ptNew=this.ptScreenNew=this.ptScreen=null;this.atomHighlighted=-1;this.creatingImage=!1;this.userVdwMars=this.userVdws=this.bsUserVdws=null;this.currentShapeID=-1;this.localFunctions=this.currentShapeState=null;this.$isKiosk=!1;this.displayLoadErrors=!0;this.$isParallel=!1;this.stateScriptVersionInt=2147483647;this.timeouts=this.jsExporter3D=null;this.chainCaseSpecified=!1;this.macros=this.nboParser=this.triangulator=this.symStatic=
this.jsonParser=this.jcm=this.jbr=this.logFileName=this.nmrCalculation=null;this.consoleFontScale=1;v(this,arguments)},JV,"Viewer",J.api.JmolViewer,[J.atomdata.AtomDataServer,J.api.PlatformViewer]);P(b,function(){this.ptScreen=new JU.P3;this.ptScreenNew=new JU.P3;this.ptNew=new JU.P3});A(b,function(){M(this,JV.Viewer,[])});A(b,function(a){M(this,JV.Viewer,[]);this.setOptions(a)},"java.util.Map");c(b,"finalize",function(){JU.Logger.debugging&&JU.Logger.debug("vwr finalize "+this);Z(this,JV.Viewer,
"finalize",[])});c(b,"setInsertedCommand",function(a){this.insertedCommand=a},"~S");b.getJmolVersion=j(b,"getJmolVersion",function(){return null==JV.Viewer.version_date?JV.Viewer.version_date=(JV.JC.version+"  "+JV.JC.date+"").trim():JV.Viewer.version_date});b.allocateViewer=c(b,"allocateViewer",function(a,b,c,e,f,h,j,m){var n=new java.util.Hashtable;n.put("display",a);n.put("adapter",b);n.put("statusListener",j);n.put("platform",m);n.put("options",h);n.put("fullName",c);n.put("documentBase",e);n.put("codeBase",
f);return new JV.Viewer(n)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.GenericPlatform");c(b,"haveAccess",function(a){return this.access===a},"JV.Viewer.ACCESS");j(b,"getModelAdapter",function(){return null==this.modelAdapter?this.modelAdapter=new J.adapter.smarter.SmarterJmolAdapter:this.modelAdapter});j(b,"getSmartsMatch",function(a,b){null==b&&(b=this.bsA());return this.getSmilesMatcher().getSubstructureSet(a,this.ms.at,this.ms.ac,b,2)},"~S,JU.BS");c(b,
"isSubstructure",function(a,b){try{var c=this.getSmilesMatcher().find(a,b,10);return null!=c&&0<c.length}catch(e){if(H(e,Exception))return!1;throw e;}},"~S,~S");c(b,"hasStructure",function(a,b,c){try{return 1==this.getSmilesMatcher().hasStructure(a,x(-1,[b]),(c?2:1)|8)[0]}catch(e){if(H(e,Exception))return!1;throw e;}},"~S,~S,~B");c(b,"getSmartsMatchForNodes",function(a,b){return this.getSmilesMatcher().getSubstructureSet(a,b,b.length,null,2)},"~S,~A");c(b,"getSmartsMap",function(a,b,c){null==b&&(b=
this.bsA());0==c&&(c=2);return this.getSmilesMatcher().getCorrelationMaps(a,this.ms.at,this.ms.ac,b,c)},"~S,JU.BS,~N");c(b,"setOptions",function(a){this.commandHistory=new JU.CommandHistory;this.rd=new J.atomdata.RadiusData(null,0,null,null);this.defaultVdw=J.c.VDW.JMOL;this.localFunctions=new java.util.Hashtable;this.privateKey=Math.random();this.chainMap=new java.util.Hashtable;this.chainList=new JU.Lst;this.vwrOptions=a;JU.Logger.debugging&&JU.Logger.debug("Viewer constructor "+this);this.modelAdapter=
a.get("adapter");var b=a.get("statusListener");this.fullName=a.get("fullName");null==this.fullName&&(this.fullName="");var c=a.get("codePath");null==c&&(c="../java/");JV.Viewer.appletCodeBase=c.toString();JV.Viewer.appletIdiomaBase=JV.Viewer.appletCodeBase.substring(0,JV.Viewer.appletCodeBase.lastIndexOf("/",JV.Viewer.appletCodeBase.length-2)+1)+"idioma";c=a.get("documentBase");JV.Viewer.appletDocumentBase=null==c?"":c.toString();c=a.get("options");this.commandOptions=null==c?"":c.toString();(a.containsKey("debug")||
0<=this.commandOptions.indexOf("-debug"))&&JU.Logger.setLogLevel(5);this.isApplet&&a.containsKey("maximumSize")&&this.setMaximumSize(a.get("maximumSize").intValue());(this.isJNLP=this.checkOption2("isJNLP","-jnlp"))&&JU.Logger.info("setting JNLP mode TRUE");this.isApplet=(this.isSignedApplet=this.isJNLP||this.checkOption2("signedApplet","-signed"))||this.checkOption2("applet","-applet");this.allowScripting=!this.checkOption2("noscripting","-noscripting");var e=this.fullName.indexOf("__");this.htmlName=
0>e?this.fullName:this.fullName.substring(0,e);this.appletName=JU.PT.split(this.htmlName+"_","_")[0];this.syncId=0>e?"":this.fullName.substring(e+2,this.fullName.length-2);this.access=this.access0=this.checkOption2("access:READSPT","-r")?JV.Viewer.ACCESS.READSPT:this.checkOption2("access:NONE","-R")?JV.Viewer.ACCESS.NONE:JV.Viewer.ACCESS.ALL;(this.isPreviewOnly=a.containsKey("previewOnly"))&&a.remove("previewOnly");this.isPrintOnly=this.checkOption2("printOnly","-p");this.dataOnly=this.checkOption2("isDataOnly",
"\x00");this.autoExit=this.checkOption2("exit","-x");c=a.get("platform");e="unknown";null==c&&(c=this.commandOptions.contains("platform=")?this.commandOptions.substring(this.commandOptions.indexOf("platform=")+9):"J.awt.Platform");if("string"==typeof c){e=c;this.isWebGL=0<=e.indexOf(".awtjs.");JV.Viewer.isJS=this.isJSNoAWT=this.isWebGL||0<=e.indexOf(".awtjs2d.");this.async=!this.dataOnly&&!this.autoExit&&(this.testAsync||JV.Viewer.isJS&&a.containsKey("async"));var f=c=null,h="?";self.Jmol&&(f=Jmol,
c=Jmol._applets[this.htmlName.split("_object")[0]],h=Jmol._version);null!=h&&(this.html5Applet=c,JV.Viewer.jmolObject=f,JV.Viewer.strJavaVersion=h,JV.Viewer.strJavaVendor="Java2Script "+(this.isWebGL?"(WebGL)":"(HTML5)"));c=J.api.Interface.getInterface(e,this,"setOptions")}this.apiPlatform=c;this.display=a.get("display");this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.noGraphicsAllowed=this.checkOption2("noDisplay","-n");this.headless=this.apiPlatform.isHeadless();this.haveDisplay=
this.isWebGL||null!=this.display&&!this.noGraphicsAllowed&&!this.headless&&!this.dataOnly;this.noGraphicsAllowed=(new Boolean(this.noGraphicsAllowed&null==this.display)).valueOf();this.headless=(new Boolean(this.headless|this.noGraphicsAllowed)).valueOf();this.haveDisplay?(this.mustRender=!0,this.multiTouch=this.checkOption2("multiTouch","-multitouch"),this.isWebGL||(this.display=document.getElementById(this.display))):this.display=null;this.apiPlatform.setViewer(this,this.display);c=a.get("graphicsAdapter");
null==c&&!this.isWebGL&&(c=J.api.Interface.getOption("g3d.Graphics3D",this,"setOptions"));this.gdata=null==c&&(this.isWebGL||!JV.Viewer.isJS)?new JU.GData:c;this.gdata.initialize(this,this.apiPlatform);this.stm=new JV.StateManager(this);this.cm=new JV.ColorManager(this,this.gdata);this.sm=new JV.StatusManager(this);e=a.containsKey("4DMouse");this.tm=JV.TransformManager.getTransformManager(this,2147483647,0,e);this.slm=new JV.SelectionManager(this);this.haveDisplay&&(this.acm=this.multiTouch?J.api.Interface.getOption("multitouch.ActionManagerMT",
null,null):new JV.ActionManager,this.acm.setViewer(this,this.commandOptions+"-multitouch-"+a.get("multiTouch")),this.mouse=this.apiPlatform.getMouseManager(this.privateKey,this.display),this.multiTouch&&!this.checkOption2("-simulated","-simulated")&&this.apiPlatform.setTransparentCursor(this.display));this.mm=new JV.ModelManager(this);this.shm=new JV.ShapeManager(this);this.am=new JV.AnimationManager(this);this.tempArray=new JU.TempArray;c=a.get("repaintManager");if(!"NONE".equals(c)&&(null==c&&(c=
J.api.Interface.getOption("render.RepaintManager",this,"setOptions")),JV.Viewer.isJS||null!=c&&!c.equals("")))(this.rm=c).set(this,this.shm);this.ms=new JM.ModelSet(this,null);this.initialize(!0,!1);this.fm=new JV.FileManager(this);this.definedAtomSets=new java.util.Hashtable;this.setJmolStatusListener(b);this.isApplet?(JU.Logger.info("vwrOptions: \n"+JU.Escape.escapeMap(this.vwrOptions)),b=this.vwrOptions.get("documentLocation"),!JV.Viewer.isJS&&(null!=b&&b.startsWith("file:/"))&&(b=b.substring(0,
b.substring(0,(b+"?").indexOf("?")).lastIndexOf("/")),JU.Logger.info("setting current directory to "+b),this.cd(b)),b=JV.Viewer.appletDocumentBase,e=b.indexOf("#"),0<=e&&(b=b.substring(0,e)),e=b.lastIndexOf("?"),0<=e&&(b=b.substring(0,e)),e=b.lastIndexOf("/"),0<=e&&(b=b.substring(0,e)),JV.Viewer.jsDocumentBase=b,this.fm.setAppletContext(JV.Viewer.appletDocumentBase),b=a.get("appletProxy"),null!=b&&this.setStringProperty("appletProxy",b),this.isSignedApplet?(this.showSystemInfo(),this.logFilePath=
JU.PT.rep(JV.Viewer.appletCodeBase,"file://",""),this.logFilePath=JU.PT.rep(this.logFilePath,"file:/",""),0<=this.logFilePath.indexOf("//")?this.logFilePath=null:this.isSignedAppletLocal=!0):JV.Viewer.isJS||(this.logFilePath=null),new J.i18n.GT(this,a.get("language")),JV.Viewer.isJS&&this.haveDisplay&&this.acm.createActions()):(this.gdata.setBackgroundTransparent(this.checkOption2("backgroundTransparent","-b")),(this.isSilent=this.checkOption2("silent","-i"))?JU.Logger.setLogLevel(3):JU.Logger.info("Jmol version "+
JV.Viewer.getJmolVersion()),this.headless&&!this.isSilent&&JU.Logger.info("Operating headless display="+this.display+" nographicsallowed="+this.noGraphicsAllowed),this.isSyntaxCheck=(this.isSyntaxAndFileCheck=this.checkOption2("checkLoad","-C"))||this.checkOption2("check","-c"),this.listCommands=this.checkOption2("listCommands","-l"),this.cd("."),this.headless&&(this.headlessImageParams=a.get("headlessImage"),c=a.get("headlessMaxTimeMs"),null==c&&(c=Integer.$valueOf(6E4)),this.setTimeout(""+Math.random(),
c.intValue(),"exitJmol")));this.useCommandThread=!JV.Viewer.isJS&&!this.headless&&this.checkOption2("useCommandThread","-threaded");this.setStartupBooleans();this.setIntProperty("_nProcessors",JV.Viewer.nProcessors);this.zap(!1,!0,!1);this.g.setO("language",J.i18n.GT.getLanguage());this.g.setO("_hoverLabel",this.hoverLabel);this.stm.setJmolDefaults();JU.Elements.covalentVersion=1;this.allowScripting&&this.getScriptManager()},"java.util.Map");c(b,"setMaximumSize",function(a){this.maximumSize=Math.max(a,
100)},"~N");c(b,"setStereo",function(a,b){this.isStereoSlave=a;this.gRight=b},"~B,~O");c(b,"getMenu",function(a){this.getPopupMenu();return a.equals("\x00")?(this.popupMenu(this.screenWidth-120,0,"j"),"OK"):null==this.jmolpopup?"":this.jmolpopup.jpiGetMenuAsString("Jmol version "+JV.Viewer.getJmolVersion()+"|_GET_MENU|"+a)},"~S");j(b,"resizeInnerPanel",function(a,b){if(!this.autoExit&&this.haveDisplay)return this.sm.resizeInnerPanel(a,b);this.setScreenDimension(a,b);return F(-1,[this.screenWidth,
this.screenHeight])},"~N,~N");j(b,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);if(this.tm.stereoDoubleFull||this.am.splitFrame)a=w((a+1)/2);this.screenWidth==a&&this.screenHeight==b||this.resizeImage(a,b,!1,!1,!0)},"~N,~N");c(b,"resizeImage",function(a,b,c,e,f){if(c||!this.creatingImage){var h=this.antialiased;this.antialiased=f?this.g.antialiasDisplay&&this.checkMotionRendering(603979786):c&&!e?this.g.antialiasImages:!1;!e&&(!c&&(0<a||h!=this.antialiased))&&
this.setShapeProperty(5,"clearBoxes",null);this.imageFontScaling=(this.antialiased?2:1)*(f||this.tm.scale3D||0>=a?1:1*(this.g.zoomLarge==b>a?b:a)/this.getScreenDim());0<a?(this.screenWidth=a,this.screenHeight=b,c||(this.g.setI("_width",a),this.g.setI("_height",b))):(a=0==this.screenWidth?this.screenWidth=500:this.screenWidth,b=0==this.screenHeight?this.screenHeight=500:this.screenHeight);this.tm.setScreenParameters(a,b,c||f?this.g.zoomLarge:!1,this.antialiased,!1,!1);this.gdata.setWindowParameters(a,
b,this.antialiased);this.setModelkitPropertySafely("frameresized",null);0<a&&!c&&this.setStatusResized(a,b)}},"~N,~N,~B,~B,~B");j(b,"getScreenWidth",function(){return this.screenWidth});j(b,"getScreenHeight",function(){return this.screenHeight});c(b,"getScreenDim",function(){return this.g.zoomLarge==this.screenHeight>this.screenWidth?this.screenHeight:this.screenWidth});c(b,"setWidthHeightVar",function(){this.g.setI("_width",this.screenWidth);this.g.setI("_height",this.screenHeight)});c(b,"getBoundBoxCenterX",
function(){return w(this.screenWidth/2)});c(b,"getBoundBoxCenterY",function(){return w(this.screenHeight/2)});c(b,"updateWindow",function(a,b){if(!this.refreshing||this.creatingImage)return this.refreshing?!1:!JV.Viewer.isJS;(this.isTainted||this.tm.slabEnabled)&&this.setModelVisibility();this.isTainted=!1;null!=this.rm&&0!=a&&this.setScreenDimension(a,b);return!0},"~N,~N");c(b,"getRenderedImage",function(a,b){var c=null;try{this.beginRendering(a,b),this.render(),this.gdata.endRendering(),c=this.gdata.getScreenImage(b)}catch(e){if(H(e,
Error))this.gdata.getScreenImage(b),this.handleError(e,!1),this.setErrorMessage("Error during rendering: "+e,null);else if(H(e,Exception))System.out.println("render error"+e);else throw e;}return c},"~B,~B");c(b,"beginRendering",function(a,b){this.gdata.beginRendering(this.tm.getStereoRotationMatrix(a),this.g.translucent,b,!this.checkMotionRendering(1111490588))},"~B,~B");c(b,"render",function(){if(!(null==this.mm.modelSet||!this.mustRender||!this.refreshing&&!this.creatingImage||null==this.rm)){var a=
this.antialiased&&this.g.antialiasTranslucent,b=this.shm.finalizeAtoms(this.tm.bsSelectedAtoms,!0);this.isWebGL?(this.rm.renderExport(this.gdata,this.ms,this.jsParams),this.notifyViewerRepaintDone()):(this.rm.render(this.gdata,this.ms,!0,b),this.gdata.setPass2(a)&&(this.tm.setAntialias(a),this.rm.render(this.gdata,this.ms,!1,null),this.tm.setAntialias(this.antialiased)))}});c(b,"drawImage",function(a,b,c,e,f){null!=a&&null!=b&&this.apiPlatform.drawImage(a,b,c,e,this.screenWidth,this.screenHeight,
f);this.gdata.releaseScreenImage()},"~O,~O,~N,~N,~B");c(b,"getScreenImage",function(){return this.getScreenImageBuffer(null,!0)});j(b,"getScreenImageBuffer",function(a,b){if(this.isWebGL)return b?this.apiPlatform.allocateRgbImage(0,0,null,0,!1,!0):null;var c=this.haveTwoImages(),e=this.tm.stereoDoubleDTI,f=this.tm.stereoMode.isBiColor(),h=this.tm.stereoMode!==J.c.STER.NONE,j=null==a&&c;this.tm.splitFrameCurrentlyRendering=-1;f?(this.beginRendering(!0,b),this.render(),this.gdata.endRendering(),this.gdata.snapshotAnaglyphChannelBytes(),
this.beginRendering(!1,b),this.render(),this.gdata.endRendering(),this.gdata.applyAnaglygh(this.tm.stereoMode,this.tm.stereoColors),f=this.gdata.getScreenImage(b)):this.am.splitFrame?(this.setCurrentModelIndex(this.am.getSplitFrameModelIndex(0)),this.tm.splitFrameCurrentlyRendering=0,this.setModelVisibility(),f=this.getRenderedImage(!1,b)):f=this.getRenderedImage(h,b);var m=null;j&&(m=this.apiPlatform.newBufferedImage(f,e?this.screenWidth:this.screenWidth<<1,this.screenHeight),a=this.apiPlatform.getGraphics(m));
if(null==a)return f;e=0;c&&(this.tm.stereoMode===J.c.STER.DTI?(this.drawImage(a,f,this.screenWidth>>1,0,!0),f=this.getRenderedImage(!1,!1),this.drawImage(a,f,0,0,!0),a=null):this.am.splitFrame?(this.drawImage(a,f,0,0,!1),this.setCurrentModelIndex(this.am.getSplitFrameModelIndex(1)),this.tm.splitFrameCurrentlyRendering=1,this.setModelVisibility(),f=this.getRenderedImage(h,!1),this.setCurrentModelIndex(this.am.getSplitFrameModelIndex(0)),this.tm.splitFrameCurrentlyRendering=-1,this.shm.setModelVisibility(this.am.getSplitFrameModels()),
e=this.screenWidth,this.am.setSplitFrameOffsetX(e)):(this.drawImage(a,f,this.screenWidth,0,!1),f=this.getRenderedImage(!1,!1)));null!=a&&this.drawImage(a,f,e,0,!1);return j?m:f},"~O,~B");c(b,"haveTwoImages",function(){return this.tm.stereoDoubleFull||this.tm.stereoDoubleDTI||this.am.splitFrame});c(b,"evalStringWaitStatusQueued",function(a,b,c,e,f){return null==this.getScriptManager()?null:this.scm.evalStringWaitStatusQueued(a,b,c,e,f)},"~S,~S,~S,~B,~B");c(b,"popupMenu",function(a,b,c){if(this.haveDisplay&&
this.refreshing&&!this.isPreviewOnly&&!this.g.disablePopupMenu)switch(c.charCodeAt(0)){case 106:try{this.getPopupMenu(),this.jmolpopup.jpiShow(a,b)}catch(e){JU.Logger.info(e.toString()),this.g.disablePopupMenu=!0}break;case 97:case 98:case 109:if(null==this.getModelkit(!0))break;this.modelkit.showMenu(a,b)}},"~N,~N,~S");c(b,"getModelkit",function(a){null==this.modelkit?(this.modelkit=J.api.Interface.getInterface("J.modelkit.ModelKit",this,"script"),this.headless||!this.haveDisplay?this.modelkit.setProperty("headless",
this):this.modelkit.setMenu(this.apiPlatform.getMenuPopup(null,"m"))):a&&this.modelkit.updateMenu();return this.modelkit},"~B");c(b,"getPopupMenu",function(){if(this.g.disablePopupMenu)return null;if(null==this.jmolpopup&&(this.jmolpopup=this.allowScripting?this.apiPlatform.getMenuPopup(this.menuStructure,"j"):null,null==this.jmolpopup))return this.async||(this.g.disablePopupMenu=!0),null;this.isJSNoAWT&&this.checkMenuUpdate();return this.jmolpopup.jpiGetMenuAsObject()});j(b,"setMenu",function(a,
b){b&&JU.Logger.info("Setting menu "+(0==a.length?"to Jmol defaults":"from file "+a));0==a.length?a=null:b&&(a=this.getFileAsString3(a,!1,null));this.getProperty("DATA_API","setMenu",a);this.sm.setCallbackFunction("menu",a)},"~S,~B");c(b,"setStatusFrameChanged",function(a){a&&(this.prevFrame=-2147483648);this.tm.setVibrationPeriod(NaN);var b=this.am.firstFrameIndex,c=this.am.lastFrameIndex,e=this.am.isMovie;a=this.am.cmi;b==c&&!e&&(a=b);var f=this.getModelFileNumber(a),h=this.am.cmi,j=f,m=f%1E6,n=
e?b:this.getModelFileNumber(b),p=e?c:this.getModelFileNumber(c),q;e?q=""+(h+1):0==j?(q=this.getModelNumberDotted(b),b!=c&&(q+=" - "+this.getModelNumberDotted(c)),w(n/1E6)==w(p/1E6)&&(j=n)):q=this.getModelNumberDotted(a);0!=j&&(j=1E6>j?1:w(j/1E6));e||(this.g.setI("_currentFileNumber",j),this.g.setI("_currentModelNumberInFile",m));b=this.am.currentMorphModel;this.g.setI("_currentFrame",h);this.g.setI("_morphCount",this.am.morphCount);this.g.setF("_currentMorphFrame",b);this.g.setI("_frameID",f);this.g.setI("_modelIndex",
a);this.g.setOrRemoveO("_modelNumber",q);this.g.setOrRemoveO("_modelName",0>a?"":this.getModelName(a));f=0>a?"":this.ms.getModelTitle(a);this.g.setOrRemoveO("_modelTitle",null==f?"":f);this.g.setOrRemoveO("_modelFile",0>a?"":this.ms.getModelFileName(a));this.g.setOrRemoveO("_modelType",0>a?"":this.ms.getModelFileType(a));h==this.prevFrame&&b==this.prevMorphModel||(this.prevFrame=h,this.prevMorphModel=b,f=this.getModelName(h),e?f=""+(""===f?h+1:this.am.caf+1)+": "+f:(e=""+this.getModelNumberDotted(h),
e.equals(f)||(f=e+": "+f)),this.sm.setStatusFrameChanged(j,m,0>this.am.animationDirection?-n:n,0>this.am.currentDirection?-p:p,h,b,f),this.doHaveJSV()&&this.getJSV().setModel(a),JV.Viewer.isJS&&this.updateJSView(a,-1))},"~B,~B");c(b,"doHaveJSV",function(){return this.haveJSV||(this.haveJSV=this.getBooleanProperty("_JSV"))});c(b,"getJSV",function(){null==this.jsv&&(this.jsv=J.api.Interface.getOption("jsv.JSV",this,"script").setViewer(this));return this.jsv});c(b,"getJDXBaseModelIndex",function(a){return!this.doHaveJSV()?
a:this.getJSV().getBaseModelIndex(a)},"~N");c(b,"getJspecViewProperties",function(a){return this.pluginRequest("JSV","property",a)},"~S");c(b,"scriptEcho",function(a){JU.Logger.isActiveLevel(4)&&(JV.Viewer.isJS&&System.out.println(a),this.sm.setScriptEcho(a,this.isScriptQueued()),this.listCommands&&(null!=a&&0==a.indexOf("$["))&&JU.Logger.info(a))},"~S");c(b,"isScriptQueued",function(){return null!=this.scm&&this.scm.isScriptQueued()});c(b,"notifyError",function(a,b,c){this.g.setO("_errormessage",
c);this.sm.notifyError(a,b,c)},"~S,~S,~S");c(b,"jsEval",function(a){return""+this.sm.jsEval(a)},"~S");c(b,"jsEvalSV",function(a){return JS.SV.getVariable(JV.Viewer.isJS?this.sm.jsEval(a):this.jsEval(a))},"~S");c(b,"setFileLoadStatus",function(a,b,c,e,f,h){this.setErrorMessage(f,null);this.g.setI("_loadPoint",a.getCode());var j=a!==J.c.FIL.CREATING_MODELSET;j&&this.setStatusFrameChanged(!1,!1);this.sm.setFileLoadStatus(b,c,e,f,a.getCode(),j,h);j&&(this.doHaveJSV()&&this.getJSV().setModel(this.am.cmi),
JV.Viewer.isJS&&this.updateJSView(this.am.cmi,-2))},"J.c.FIL,~S,~S,~S,~S,Boolean");c(b,"getZapName",function(){return this.g.modelKitMode?"Jmol Model Kit":"zapped"});c(b,"setStatusMeasuring",function(a,b,c,e){this.sm.setStatusMeasuring(a,b,c,e)},"~S,~N,~S,~N");c(b,"notifyMinimizationStatus",function(){var a=this.getP("_minimizationStep"),b=this.getP("_minimizationForceField"),c=this.getP("_minimizationStatus"),e="starting".equals(c),f="done".equals(c)||"failed".equals(c),h=null!=this.minimizer&&(f||
e)?this.minimizer.bsAtoms:null,j=null==h?-1:h.nextSetBit(0),m=0<=j?this.getModelIndexForAtom(j):-1;e&&0<=j&&this.sm.setStatusStructureModified(j,m,3,"minimize:"+c,h.cardinality(),h);this.sm.notifyMinimizationStatus(c,"string"==typeof a?Integer.$valueOf(0):a,this.getP("_minimizationEnergy"),a.toString().equals("0")?Float.$valueOf(0):this.getP("_minimizationEnergyDiff"),b);f&&0<=j&&this.sm.setStatusStructureModified(j,m,-3,"minimize:"+c,h.cardinality(),h)});c(b,"notifyCalculation",function(a,b,c){this.sm.notifyCalculation(a,
b,c)},"~S,JU.BS,~S");c(b,"setStatusAtomPicked",function(a,b,c,e){e&&this.setSelectionSet(JU.BSUtil.newAndSetBit(a));null==b&&(b=this.g.pickLabel,b=0==b.length?this.getAtomInfoXYZ(a,this.g.messageStyleChime?4:2)+(null==this.getOperativeSymmetry()?"":" ("+this.getAtomInfoXYZ(a,3)+")"):this.ms.getAtomInfo(a,b,this.ptTemp));this.setPicked(a,!1);0>a&&(e=this.getPendingMeasurement(),null!=e&&(b=b.substring(0,b.length-1)+',"'+e.getString()+'"]'));this.g.setO("_pickinfo",b);this.sm.setStatusAtomPicked(a,
b,c);0>a||(1==this.sm.getSyncMode()&&this.doHaveJSV()&&this.getJSV().atomPicked(a),JV.Viewer.isJS&&this.updateJSView(this.ms.at[a].mi,a))},"~N,~S,java.util.Map,~B");j(b,"getProperty",function(a,b,c){if(!"DATA_API".equals(a))return this.getPropertyManager().getProperty(a,b,c);switch("scriptCheck.........consoleText.........scriptEditor........scriptEditorState...getAppConsole.......getScriptEditor.....setMenu.............spaceGroupInfo......disablePopupMenu....defaultDirectory....getPopupMenu........shapeManager........getPreference.......".indexOf(b)){case 0:return this.scriptCheckRet(c,
!0);case 20:return null==this.appConsole?"":this.appConsole.getText();case 40:return this.showEditor(c),null;case 60:return this.scriptEditorVisible=c.booleanValue(),null;case 80:return this.$isKiosk?this.appConsole=null:y(c,"J.api.JmolAppConsoleInterface")?this.appConsole=c:null!=c&&!c.booleanValue()?this.appConsole=null:null==this.appConsole&&(null!=c&&c.booleanValue())&&(JV.Viewer.isJS&&(this.appConsole=J.api.Interface.getOption("consolejs.AppletConsole",this,"script")),null!=this.appConsole&&
this.appConsole.start(this)),this.scriptEditor=JV.Viewer.isJS||null==this.appConsole?null:this.appConsole.getScriptEditor(),this.appConsole;case 100:return null==this.appConsole&&(null!=c&&c.booleanValue())&&(this.getProperty("DATA_API","getAppConsole",Boolean.TRUE),this.scriptEditor=null==this.appConsole?null:this.appConsole.getScriptEditor()),this.scriptEditor;case 120:return null!=this.jmolpopup&&this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.menuStructure=c;case 140:return this.getSymTemp().getSpaceGroupInfo(this.ms,
null,-1,!1,null);case 160:return this.g.disablePopupMenu=!0,null;case 180:return this.g.defaultDirectory;case 200:return"string"==typeof c?this.getMenu(c):this.getPopupMenu();case 220:return this.shm.getProperty(c);case 240:return this.sm.syncSend("getPreference",c,1)}JU.Logger.error("ERROR in getProperty DATA_API: "+b);return null},"~S,~S,~O");c(b,"showSystemInfo",function(){!this.isSilent&&!this.systemInfoShown&&JU.Logger.info("(C) 2015 Jmol Development\nJmol Version: "+JV.Viewer.getJmolVersion()+
"\njava.vendor: "+JV.Viewer.strJavaVendor+"\njava.version: "+JV.Viewer.strJavaVersion+"\nos: "+JV.Viewer.strOSName+" "+System.getProperty("os.arch","")+"\nAccess: "+this.access+"\nmemory: "+this.getP("_memory")+"\nprocessors available: "+JV.Viewer.nProcessors+"\nuseCommandThread: "+this.useCommandThread+(!this.isApplet?"":"\nappletId:"+this.htmlName+(this.isSignedApplet?" (signed)":"")))});c(b,"notifyMouseClicked",function(a,b,c,e){var f=JV.binding.Binding.getButtonMods(c),h=JV.binding.Binding.getClickCount(c);
this.g.setI("_mouseX",a);this.g.setI("_mouseY",this.screenHeight-b);this.g.setI("_mouseAction",c);this.g.setI("_mouseModifiers",f);this.g.setI("_clickCount",h);return this.sm.setStatusClicked(a,this.screenHeight-b,c,h,e)},"~N,~N,~N,~N");c(b,"getOutputManager",function(){return null!=this.outputManager?this.outputManager:(this.outputManager=J.api.Interface.getInterface("JV.OutputManager"+(JV.Viewer.isJS?"JS":"Awt"),this,"file")).setViewer(this,this.privateKey)});c(b,"getJzt",function(){return null==
this.jzt?this.jzt=J.api.Interface.getInterface("JU.ZipTools",this,"zip"):this.jzt});c(b,"readFileAsMap",function(a,b,c){this.getJzt().readFileAsMap(a,b,c)},"java.io.BufferedInputStream,java.util.Map,~S");c(b,"getZipDirectoryAsString",function(a){a=this.fm.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,!0);return this.getJzt().getZipDirectoryAsStringAndClose(a)},"~S");j(b,"getImageAsBytes",function(a,b,c,e,f){return this.getOutputManager().getImageAsBytes(a,b,c,e,f)},"~S,~N,~N,~N,~A");
j(b,"releaseScreenImage",function(){this.gdata.releaseScreenImage()});c(b,"setDisplay",function(a){this.display=a;this.apiPlatform.setViewer(this,a)},"~O");c(b,"newMeasurementData",function(a,b){return J.api.Interface.getInterface("JM.MeasurementData",this,"script").init(a,this,b)},"~S,JU.Lst");c(b,"getDataManager",function(){return null==this.dm?this.dm=J.api.Interface.getInterface("JV.DataManager",this,"script").set(this):this.dm});c(b,"getScriptManager",function(){if(this.allowScripting&&null==
this.scm){this.scm=J.api.Interface.getInterface("JS.ScriptManager",this,"setOptions");if(JV.Viewer.isJS&&null==this.scm)throw new NullPointerException;if(null==this.scm)return this.allowScripting=!1,null;this.eval=this.scm.setViewer(this);this.useCommandThread&&this.scm.startCommandWatcher(!0)}return this.scm});c(b,"checkOption2",function(a,b){return this.vwrOptions.containsKey(a)&&!this.vwrOptions.get(a).toString().equals("false")||0<=this.commandOptions.indexOf(b)},"~S,~S");c(b,"setStartupBooleans",
function(){this.setBooleanProperty("_applet",this.isApplet);this.setBooleanProperty("_JSV",!1);this.setBooleanProperty("_signedApplet",this.isSignedApplet);this.setBooleanProperty("_headless",this.headless);this.setStringProperty("_restrict",'"'+this.access+'"');this.setBooleanProperty("_useCommandThread",this.useCommandThread);this.setBooleanPropertyTok("doubleprecision",603979831,!1)});c(b,"getExportDriverList",function(){return this.haveAccess(JV.Viewer.ACCESS.ALL)?this.g.getParameter("exportDrivers",
!0):""});j(b,"dispose",function(){this.gRight=null;null!=this.mouse&&(this.acm.dispose(),this.mouse.dispose(),this.mouse=null);this.clearScriptQueue();this.clearThreads();this.haltScriptExecution();null!=this.scm&&this.scm.clear(!0);this.gdata.destroy();null!=this.jmolpopup&&this.jmolpopup.jpiDispose();null!=this.modelkit&&this.modelkit.dispose();try{null!=this.appConsole&&(this.appConsole.dispose(),this.appConsole=null),null!=this.scriptEditor&&(this.scriptEditor.dispose(),this.scriptEditor=null)}catch(a){if(!H(a,
Exception))throw a;}});c(b,"reset",function(a){this.ms.setBoundBox(null,null,!0,0);this.axesAreTainted=!0;this.tm.homePosition(a);this.ms.setCrystallographicDefaults()?(this.stm.setCrystallographicDefaults(),this.setNewRotationCenter(this.getUnitCellCenter())):this.setAxesMode(603979809);this.prevFrame=-2147483648;this.tm.spinOn||this.setSync()},"~B");j(b,"homePosition",function(){this.evalString("reset spin")});c(b,"initialize",function(a,b){this.g=new JV.GlobalSettings(this,this.g,a);this.setStartupBooleans();
this.setWidthHeightVar();this.haveDisplay&&(this.g.setB("_is2D",JV.Viewer.isJS&&!this.isWebGL),this.g.setB("_multiTouchClient",this.acm.isMTClient()),this.g.setB("_multiTouchServer",this.acm.isMTServer()));this.cm.setDefaultColors(!1);this.setObjectColor("background","black");this.setObjectColor("axis1","red");this.setObjectColor("axis2","green");this.setObjectColor("axis3","blue");this.am.setAnimationOn(!1);this.am.setAnimationFps(this.g.animationFps);this.sm.playAudio(null);this.sm.allowStatusReporting=
this.g.statusReporting;this.setBooleanPropertyTok("antialiasDisplay",603979786,b?!0:this.g.antialiasDisplay);this.stm.resetLighting();this.tm.setDefaultPerspective()},"~B,~B");c(b,"saveModelOrientation",function(a){this.ms.saveModelOrientation(a,this.stm.getOrientation())},"~N");c(b,"restoreModelOrientation",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,!0)},"~N");c(b,"restoreModelRotationOnly",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,!1)},"~N");c(b,
"getGLmolView",function(){var a=this.tm,b=a.fixedRotationCenter,c=a.getRotationQ();return{center:b,quaternion:c,xtrans:a.xTranslationFraction,ytrans:a.yTranslationFraction,scale:a.scalePixelsPerAngstrom,zoom:a.zmPctSet,cameraDistance:a.cameraDistance,pixelCount:a.screenPixelCount,perspective:a.perspectiveDepth,width:a.width,height:a.height}});c(b,"setRotationRadius",function(a,b){b&&(a=this.tm.setRotationRadius(a,!1));this.ms.setRotationRadius(this.am.cmi,a)&&this.g.setF("rotationRadius",a)},"~N,~B");
c(b,"setCenterBitSet",function(a,b){this.isJmolDataFrame()||this.tm.setNewRotationCenter(0<JU.BSUtil.cardinalityOf(a)?this.ms.getAtomSetCenter(a):null,b)},"JU.BS,~B");c(b,"setNewRotationCenter",function(a){this.isJmolDataFrame()||this.tm.setNewRotationCenter(a,!0)},"JU.P3");c(b,"navigate",function(a,b){this.isJmolDataFrame()||(this.tm.navigateKey(a,b),!this.tm.vibrationOn&&0!=a&&this.refresh(1,"Viewer:navigate()"))},"~N,~N");c(b,"move",function(a,b,c,e,f,h,j){this.tm.move(a,b,c,e,f,h,j);this.moveUpdate(h)},
"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(b,"moveTo",function(a,b,c,e,f,h,j,m,n,p,q,r,s,v,w,x,y){this.haveDisplay||(b=0);this.setTainted(!0);this.tm.moveTo(a,b,c,e,f,h,j,m,n,p,q,r,s,v,w,x,y)},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.V3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(b,"moveUpdate",function(a){0<a?this.requestRepaintAndWait("moveUpdate"):0==a&&this.setSync()},"~N");c(b,"navigatePt",function(a){this.tm.setNavigatePt(a);this.setSync()},"JU.P3");c(b,"navigateAxis",function(a,
b){this.tm.navigateAxis(a,b);this.setSync()},"JU.V3,~N");c(b,"navTranslatePercent",function(a,b){this.isJmolDataFrame()||(this.tm.navTranslatePercentOrTo(0,a,b),this.setSync())},"~N,~N");c(b,"zoomBy",function(a){this.tm.zoomBy(a);this.refresh(2,this.sm.syncingMouse?"Mouse: zoomBy "+a:"")},"~N");c(b,"zoomByFactor",function(a,b,c){this.tm.zoomByFactor(a,b,c);this.refresh(2,!this.sm.syncingMouse?"":"Mouse: zoomByFactor "+a+(2147483647==b?"":" "+b+" "+c))},"~N,~N,~N");c(b,"rotateXYBy",function(a,b){this.tm.rotateXYBy(a,
b,null);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateXYBy "+a+" "+b:"")},"~N,~N");c(b,"spinXYBy",function(a,b,c){this.tm.spinXYBy(a,b,c);0==a&&0==b||this.refresh(2,this.sm.syncingMouse?"Mouse: spinXYBy "+a+" "+b+" "+c:"")},"~N,~N,~N");c(b,"rotateZBy",function(a,b,c){this.tm.rotateZBy(a,b,c);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateZBy "+a+(2147483647==b?"":" "+b+" "+c):"")},"~N,~N,~N");c(b,"rotateSelected",function(a,b,c){this.isJmolDataFrame()||(this.tm.rotateXYBy(a,b,this.setMovableBitSet(c,
!0)),this.refreshMeasures(!0),this.refresh(2,this.sm.syncingMouse?"Mouse: rotateMolecule "+a+" "+b:""))},"~N,~N,JU.BS");c(b,"setMovableBitSet",function(a,b){null==a&&(a=this.bsA());a=JU.BSUtil.copy(a);JU.BSUtil.andNot(a,this.getMotionFixedAtoms(null,null));b&&!this.g.allowMoveAtoms&&(a=this.ms.getMoleculeBitSet(a));return this.movableBitSet=a},"JU.BS,~B");c(b,"translateXYBy",function(a,b){this.tm.translateXYBy(a,b);this.refresh(2,this.sm.syncingMouse?"Mouse: translateXYBy "+a+" "+b:"")},"~N,~N");
j(b,"rotateFront",function(){this.tm.resetRotation();this.refresh(1,"Viewer:rotateFront()")});c(b,"translate",function(a,b,c,e){var f="\x00"==c?b:"%"==c?this.tm.percentToPixels(a,b):this.tm.angstromsToPixels(b*("n"==c?10:1));if(null!=e){if(0==b)return;this.tm.setSelectedTranslation(e,a,f,b)}else switch(a.charCodeAt(0)){case 88:case 120:"\x00"==c?this.tm.translateToPercent("x",b):this.tm.translateXYBy(D(f),0);break;case 89:case 121:"\x00"==c?this.tm.translateToPercent("y",b):this.tm.translateXYBy(0,
D(f));break;case 90:case 122:"\x00"==c?this.tm.translateToPercent("z",b):this.tm.translateZBy(D(f))}this.refresh(1,"Viewer:translate()")},"~S,~N,~S,JU.BS");c(b,"slabByPixels",function(a){this.tm.slabByPercentagePoints(a);this.refresh(3,"slabByPixels")},"~N");c(b,"depthByPixels",function(a){this.tm.depthByPercentagePoints(a);this.refresh(3,"depthByPixels")},"~N");c(b,"slabDepthByPixels",function(a){this.tm.slabDepthByPercentagePoints(a);this.refresh(3,"slabDepthByPixels")},"~N");c(b,"finalizeTransformParameters",
function(){this.tm.finalizeTransformParameters();this.gdata.setSlabAndZShade(this.tm.slabValue,this.tm.depthValue,this.tm.zShadeEnabled?this.tm.zSlabValue:2147483647,this.tm.zDepthValue,this.g.zShadePower)});c(b,"getScalePixelsPerAngstrom",function(a){return this.tm.scalePixelsPerAngstrom*(a||!this.antialiased?1:0.5)},"~B");c(b,"setSpin",function(a,b){if(JU.PT.isOneOf(a,";x;y;z;fps;X;Y;Z;FPS;")){var c="x;y;z;fps;X;Y;Z;FPS".indexOf(a);switch(c){case 0:this.tm.setSpinXYZ(b,NaN,NaN);break;case 2:this.tm.setSpinXYZ(NaN,
b,NaN);break;case 4:this.tm.setSpinXYZ(NaN,NaN,b);break;default:this.tm.setSpinFps(b);break;case 10:this.tm.setNavXYZ(b,NaN,NaN);break;case 12:this.tm.setNavXYZ(NaN,b,NaN);break;case 14:this.tm.setNavXYZ(NaN,NaN,b);break;case 16:this.tm.setNavFps(b)}this.g.setI((10>c?"spin":"nav")+a,b)}},"~S,~N");c(b,"getSpinState",function(){return this.getStateCreator().getSpinState(!1)});c(b,"getOrientation",function(a,b,c,e){switch(a){case 1312817669:case 1814695966:case 1073741864:case 1111492629:case 1111492630:case 1111492631:case 134221850:null==
c&&(c=this.bsA());if(c.isEmpty())return 1312817669==a?"0":1814695966==a||1073741864==a?null:new JU.Quat;c=this.ms.getBoundBoxOrientation(a,c,e);return"best"===b&&1312817669!=a?c.div(this.tm.getRotationQ()):c;case 1073742034:return this.stm.getSavedOrientationText(b);default:return this.tm.getOrientationText(a,"best"===b)}},"~N,~S,JU.BS,~A");c(b,"getCurrentColorRange",function(){return this.cm.getPropertyColorRange()});c(b,"setDefaultColors",function(a){this.cm.setDefaultColors(a);this.g.setB("colorRasmol",
a);this.g.setO("defaultColorScheme",a?"rasmol":"jmol")},"~B");c(b,"setElementArgb",function(a,b){this.g.setO("=color "+JU.Elements.elementNameFromNumber(a),JU.Escape.escapeColor(b));this.cm.setElementArgb(a,b)},"~N,~N");j(b,"setVectorScale",function(a){this.g.setF("vectorScale",a);this.g.vectorScale=a},"~N");j(b,"setVibrationScale",function(a){this.tm.setVibrationScale(a);this.g.vibrationScale=a;this.g.setF("vibrationScale",a)},"~N");j(b,"setVibrationPeriod",function(a){Double.isNaN(a)&&(a=this.g.vibrationPeriod);
this.tm.setVibrationPeriod(a);a=Math.abs(a);this.g.vibrationPeriod=a;this.g.setF("vibrationPeriod",a)},"~N");c(b,"setObjectColor",function(a,b){null==b||0==b.length||this.setObjectArgb(a,JU.CU.getArgbFromString(b))},"~S,~S");c(b,"setObjectVisibility",function(a,b){var c=JV.StateManager.getObjectIdFromName(a);0<=c&&this.setShapeProperty(c,"display",b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(b,"setObjectArgb",function(a,b){var c=JV.StateManager.getObjectIdFromName(a);if(0>c)a.equalsIgnoreCase("axes")&&
(this.setObjectArgb("axis1",b),this.setObjectArgb("axis2",b),this.setObjectArgb("axis3",b));else{this.g.objColors[c]=b;switch(c){case 0:this.gdata.setBackgroundArgb(b),this.cm.setColixBackgroundContrast(b)}this.g.setO(a+"Color",JU.Escape.escapeColor(b))}},"~S,~N");c(b,"setBackgroundImage",function(a,b){this.g.backgroundImageFileName=a;this.gdata.setBackgroundImage(b)},"~S,~O");c(b,"getObjectColix",function(a){a=this.g.objColors[a];return 0==a?this.cm.colixBackgroundContrast:JU.C.getColix(a)},"~N");
j(b,"setColorBackground",function(a){this.setObjectColor("background",a)},"~S");j(b,"getBackgroundArgb",function(){return this.g.objColors[0]});c(b,"setObjectMad10",function(a,b,c){var e=JV.StateManager.getObjectIdFromName(b.equalsIgnoreCase("axes")?"axis":b);if(!(0>e)){if(-2==c||-4==c){var f=c+3;c=this.getObjectMad10(e);0==c&&(c=f)}this.g.setB("show"+b,0!=c);this.g.objStateOn[e]=0!=c;0!=c&&(this.g.objMad10[e]=c,this.setShapeSize(a,c,null))}},"~N,~S,~N");c(b,"getObjectMad10",function(a){return this.g.objStateOn[a]?
this.g.objMad10[a]:0},"~N");c(b,"setPropertyColorScheme",function(a,b,c){this.g.propertyColorScheme=a;a.startsWith("translucent ")&&(b=!0,a=a.substring(12).trim());this.cm.setPropertyColorScheme(a,b,c)},"~S,~B,~B");c(b,"getLightingState",function(){return this.getStateCreator().getLightingState(!0)});c(b,"getColorPointForPropertyValue",function(a){return JU.CU.colorPtFromInt(this.gdata.getColorArgbOrGray(this.cm.ce.getColorIndex(a)),null)},"~N");c(b,"select",function(a,b,c,e){b&&(a=this.getUndeletedGroupAtomBits(a));
this.slm.select(a,c,e);this.shm.setShapeSizeBs(1,2147483647,null,null);this.hasSelected=!0},"JU.BS,~B,~N,~B");j(b,"setSelectionSet",function(a){this.selectStatus(a,!1,0,!0,!0)},"JU.BS");c(b,"selectBonds",function(a){this.shm.setShapeSizeBs(1,2147483647,null,a)},"JU.BS");c(b,"displayAtoms",function(a,b,c,e,f){c&&(a=this.getUndeletedGroupAtomBits(a));b?this.slm.display(this.ms,a,e,f):this.slm.hide(this.ms,a,e,f)},"JU.BS,~B,~B,~N,~B");c(b,"getUndeletedGroupAtomBits",function(a){a=this.ms.getAtoms(1086324742,
a);JU.BSUtil.andNot(a,this.slm.bsDeleted);return a},"JU.BS");c(b,"reportSelection",function(a){this.selectionHalosEnabled&&this.setTainted(!0);(this.isScriptQueued()||this.g.debugScript)&&this.scriptStatus(a)},"~S");c(b,"clearAtomSets",function(){this.slm.setSelectionSubset(null);this.definedAtomSets.clear();this.haveDisplay&&this.acm.exitMeasurementMode("clearAtomSets")});c(b,"getDefinedAtomSet",function(a){a=this.definedAtomSets.get(a.toLowerCase());return y(a,"JU.BS")?a:new JU.BS},"~S");j(b,"selectAll",
function(){this.slm.selectAll(!1)});j(b,"clearSelection",function(){this.slm.clearSelection(!0);this.g.setB("hideNotSelected",!1)});c(b,"bsA",function(){return this.slm.getSelectedAtoms(!1)});j(b,"addSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");j(b,"removeSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");c(b,"getAtomBitSetEval",function(a,b){return this.allowScripting?this.getScriptManager().getAtomBitSetEval(a,b):new JU.BS},
"J.api.JmolScriptEvaluator,~O");c(b,"processTwoPointGesture",function(a){this.mouse.processTwoPointGesture(a)},"~A");c(b,"processMouseEvent",function(a,b,c,e,f){return this.mouse.processEvent(a,b,c,e,f)},"~N,~N,~N,~N,~N");c(b,"processKeyEvent",function(a){this.mouse.processKeyEvent(a)},"~O");c(b,"getRubberBandSelection",function(){return this.haveDisplay?this.acm.getRubberBand():null});c(b,"isBound",function(a,b){return this.haveDisplay&&this.acm.bnd(a,[b])},"~N,~N");c(b,"getCursorX",function(){return this.haveDisplay?
this.am.setSplitFrameMouse(this.acm.getCurrentX()):0});c(b,"getCursorY",function(){return this.haveDisplay?this.acm.getCurrentY():0});c(b,"getDefaultDirectory",function(){return this.g.defaultDirectory});c(b,"getLocalUrl",function(a){return this.apiPlatform.getLocalUrl(a)},"~S");c(b,"getFileAsString",function(a){return this.getAsciiFileOrNull(a)},"~S");j(b,"getBufferedInputStream",function(a){return this.fm.getBufferedInputStream(a)},"~S");c(b,"setLoadParameters",function(a,b){null==a&&(a=new java.util.Hashtable);
a.put("vwr",this);0<this.g.atomTypes.length&&a.put("atomTypes",this.g.atomTypes);a.containsKey("lattice")||a.put("lattice",this.g.ptDefaultLattice);this.g.applySymmetryToBonds&&a.put("applySymmetryToBonds",Boolean.TRUE);this.g.pdbGetHeader&&a.put("getHeader",Boolean.TRUE);this.g.pdbSequential&&a.put("isSequential",Boolean.TRUE);(this.g.legacyJavaFloat||this.g.doublePrecision)&&a.put("highPrecision",Boolean.TRUE);this.g.doublePrecision||a.put("lowPrecision",Boolean.TRUE);a.put("stateScriptVersionInt",
Integer.$valueOf(this.stateScriptVersionInt));if(!a.containsKey("filter")){var c=this.g.defaultLoadFilter;0<c.length&&a.put("filter",c)}c=b&&!this.g.appendNew&&0<this.ms.ac;a.put("baseAtomIndex",Integer.$valueOf(b?this.ms.ac:0));a.put("baseBondIndex",Integer.$valueOf(b?this.ms.bondCount:0));a.put("baseModelIndex",Integer.$valueOf(0==this.ms.ac?0:this.ms.mc+(c?-1:0)));c&&a.put("merging",Boolean.TRUE);return a},"java.util.Map,~B");j(b,"openFileAsyncSpecial",function(a,b){this.fm.openFileAsync(a,b,null)},
"~S,~N");j(b,"openFileAsyncSpecialType",function(a,b,c){this.fm.openFileAsync(a,b,c)},"~S,~N,~S");j(b,"openFile",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,a,null,null)},"~S");j(b,"openFiles",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,null,a,null)},"~A");c(b,"openReader",function(a,b,c){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(a,b,null,c)},"~S,~S,~O");j(b,"openDOM",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint("?",
"?",null,a)},"~O");c(b,"loadModelFromFileRepaint",function(a,b,c,e){a=this.loadModelFromFile(a,b,c,e,!1,null,null,null,0," ");this.refresh(1,"loadModelFromFileRepaint");return a},"~S,~S,~A,~O");c(b,"loadModelFromFile",function(a,b,c,e,f,h,j,m,n,p){null==h&&(h=this.setLoadParameters(null,f));0!=n&&h.put("dataType",JS.T.nameOf(n));" "!==p&&h.put("concatenate",Boolean.TRUE);var q=this.fm.getFileInfo();if(null!=c){if(null==j){j=(new JU.SB).append("load ").append(f?"append ":"").append("files");for(a=
0;a<c.length;a++)j.append(0==a||null==p?" ":p).append("/*file*/$FILENAME"+(a+1)+"$");0<m.length()&&j.append(" /*options*/ ").append(m.toString())}a=System.currentTimeMillis();m=this.fm.createAtomSetCollectionFromFiles(c,this.setLoadParameters(h,f),f);a=System.currentTimeMillis()-a;JU.Logger.info("openFiles("+c.length+") "+a+" ms");c=h.get("fullPathNames");p=h.get("fileTypes");j=j.toString();for(a=0;a<c.length;a++)b=c[a],null!=p&&null!=p[a]&&(b=p[a]+"::"+b),j=JU.PT.rep(j,"$FILENAME"+(a+1)+"$",JU.PT.esc(JV.FileManager.fixDOSName(b)));
j=(new JU.SB).append(j)}else if(null==e)null==j&&(j=(new JU.SB).append("load /*file*/$FILENAME$")),m=this.openFileFull(b,f,h,j);else if(y(e,"java.io.Reader")||y(e,"java.io.BufferedInputStream")||JU.AU.isAB(e))m=this.fm.createAtomSetCollectionFromReader(a,b,e,this.setLoadParameters(h,f));else return"ERROR - invalid reader";if(0!=n)return this.fm.setFileInfo(q),this.loadAtomDataAndReturnError(m,n);if(h.containsKey("isData"))return m;null!=j&&"string"!=typeof m&&(b=h.get("fullPathName"),null==b&&(b=
""),h.containsKey("loadScript")&&(j=h.get("loadScript")),h.put("loadScript",j=(new JU.SB).append(JU.PT.rep(j.toString(),"$FILENAME$",JU.PT.esc(JV.FileManager.fixDOSName(b))))));return this.createModelSetAndReturnError(m,f,j,h)},"~S,~S,~A,~O,~B,java.util.Map,JU.SB,JU.SB,~N,~S");c(b,"setLigandModel",function(a,b){null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);this.ligandModels.put(a,b)},"~S,~S");c(b,"getLigandModel",function(a,b,c,e){if(null==a){if(null!=this.ligandModelSet)for(a=
this.ligandModels.entrySet().iterator();a.hasNext();){var f=a.next();y(f.getValue(),Boolean)&&a.remove()}return null}a=a.$replace("\\","/");var h=b.equals("ligand_");a=0<=a.indexOf("/cif")?a:h?a.toUpperCase():a.substring(a.lastIndexOf("/")+1);null==this.ligandModelSet&&(this.ligandModelSet=new java.util.Hashtable);this.ligandModelSet.put(a,Boolean.TRUE);null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);var j=a.indexOf("|");0<=j&&(a=a.substring(a.indexOf("|")+1));var m=null==e?this.ligandModels.get(a):
null,f=null;if(y(m,Boolean))return null;if(null==m&&(null==e||0<=j))m=this.ligandModels.get(a+c);var j=!1,n=null==m;if(n){if(h){f=this.setLoadFormat(!1,"#"+a,"#",!1);if(0==f.length)return null;this.scriptEcho("fetching "+f);m=this.getFileAsString3(f,!1,null)}else this.scriptEcho("fetching "+b),m=this.getFileAsString3(b,!1,null),e=null==e?-1:m.indexOf(e),0<=e&&(m=m.substring(0,e));(j=0==m.indexOf("java."))||this.ligandModels.put(a+c,m)}if(!h)return n||this.scriptEcho(b+" loaded from cache"),m;!j&&
"string"==typeof m&&(b=m,0!=b.length&&(c=new java.util.Hashtable,c.put("modelOnly",Boolean.TRUE),m=this.getModelAdapter().getAtomSetCollectionReader("ligand",null,JU.Rdr.getBR(b),c),j="string"==typeof m,j||(m=this.getModelAdapter().getAtomSetCollection(m),j="string"==typeof m,null!=f&&!j&&this.scriptEcho(this.getModelAdapter().getAtomSetCollectionAuxiliaryInfo(m).get("modelLoadNote")))));return j?(this.scriptEcho(m.toString()),this.ligandModels.put(a,Boolean.FALSE),null):m},"~S,~S,~S,~S");c(b,"openFileFull",
function(a,b,c,e){if(null==a||a.equals("String[]"))return null;var f,h="openFile("+a+")";JU.Logger.startTimer(h);c=this.setLoadParameters(c,b);var j=a.startsWith("@"),m=c.containsKey("fileData");0==a.indexOf("$")&&c.put("smilesString",a.substring(1));var n=a.equals("string")||a.equals("Jmol Model Kit");f=null;if(m){if(f=c.get("fileData"),c.containsKey("isData"))return h=this.loadInlineScript(f,"\x00",b,c),this.lastData=this.g.preserveState?this.getDataManager().createFileData(f):null,h}else if(n){f=
this.ms.getInlineData(-1);if(null==f)if(this.g.modelKitMode)f="5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63";else return"cannot find string data";null!=e&&c.put("loadScript",e=(new JU.SB).append(JU.PT.rep(e.toString(),"/*file*/$FILENAME$",'/*data*/data "model inline"\n'+f+'end "model inline"')))}null!=f?(b||this.zap(!0,!1,!1),!j&&(!m||n)&&this.getStateCreator().getInlineData(e,f,b,c.get("appendToModelIndex"),this.g.defaultLoadFilter),f=this.fm.createAtomSetCollectionFromString(f,
c,b)):f=this.fm.createAtomSetCollectionFromFile(a,c,b);JU.Logger.checkTimer(h,!1);return f},"~S,~B,java.util.Map,JU.SB");j(b,"openStringInline",function(a){a=this.openStringInlineParamsAppend(a,null,!1);this.refresh(1,"openStringInline");return a},"~S");c(b,"loadInline",function(a){return this.loadInlineScriptRepaint(a,this.g.inlineNewlineChar,!1)},"~S");c(b,"loadInline",function(a,b){return this.loadInlineScriptRepaint(a,b,!1)},"~S,~S");j(b,"loadInlineAppend",function(a,b){return this.loadInlineScriptRepaint(a,
"\x00",b)},"~S,~B");c(b,"loadInlineScriptRepaint",function(a,b,c){a=this.loadInlineScript(a,b,c,null);this.refresh(1,"loadInlineScript");return a},"~S,~S,~B");c(b,"loadInline",function(a){return this.loadInline(a,!1)},"~A");c(b,"loadInline",function(a,b){if(null==a||0==a.length)return null;var c=this.openStringsInlineParamsAppend(a,new java.util.Hashtable,b);this.refresh(1,"loadInline String[]");return c},"~A,~B");c(b,"loadInline",function(a,b){if(null==a||0==a.size())return null;b||this.zap(!0,!1,
!1);for(var c=new JU.Lst,e=0;e<a.size();e++)c.addLast(a.get(e));c=this.fm.createAtomSeCollectionFromArrayData(c,this.setLoadParameters(null,b),b);c=this.createModelSetAndReturnError(c,b,null,new java.util.Hashtable);this.refresh(1,"loadInline");return c},"java.util.List,~B");c(b,"loadInlineScript",function(a,b,c,e){if(null==a||0==a.length)return null;if(!a.startsWith(";base64,")){a=JV.Viewer.fixInlineString(a,b);0!=b.charCodeAt(0)&&JU.Logger.info("loading model inline, "+a.length+" bytes, with newLine character "+
b.charCodeAt(0)+" isAppend="+c);JU.Logger.debugging&&JU.Logger.debug(a);b=this.getDataSeparator();var f;if(null!=b&&""!==b&&0<=(f=a.indexOf(b))&&0>a.indexOf("# Jmol state")){for(var h=2;0<=(f=a.indexOf(b,f+1));)h++;var j=Array(h),m=0,n=0;for(f=0;f<h;f++)m=a.indexOf(b,n),0>m&&(m=a.length),j[f]=a.substring(n,m),n=m+b.length;return this.openStringsInlineParamsAppend(j,e,c)}}return this.openStringInlineParamsAppend(a,e,c)},"~S,~S,~B,java.util.Map");b.fixInlineString=c(b,"fixInlineString",function(a,b){var c;
0<=a.indexOf("\\/n")&&(a=JU.PT.rep(a,"\n",""),a=JU.PT.rep(a,"\\/n","\n"),b=String.fromCharCode(0));if(0!=b.charCodeAt(0)&&"\n"!=b){var e=0<=a.indexOf("\n"),f=a.length;for(c=0;c<f&&" "==a.charAt(c);++c);c<f&&a.charAt(c)==b&&(a=a.substring(c+1));a=e?JU.PT.rep(a,""+b,""):a.$replace(b,"\n")}return a},"~S,~S");c(b,"openStringInlineParamsAppend",function(a,b,c){return this.openStringInlineParamsAppend0(a,b,c)},"~S,java.util.Map,~B");c(b,"openStringInlineParamsAppend0",function(a,b,c){b=this.setLoadParameters(b,
c);var e=b.get("loadScript"),f=b.containsKey("isData");if(!a.startsWith(";base64,")){var h=this.getModelAdapter().getFileTypeName(b.get("filter"));if(null==h&&null==(h=this.getModelAdapter().getFileTypeName(JU.Rdr.getBR(a))))return"unknown file type";if(h.equals("spt"))return"cannot open script inline"}null==e&&(e=new JU.SB);c||this.zap(!0,!1,!1);f||this.getStateCreator().getInlineData(e,a,c,b.get("appendToModelIndex"),this.g.defaultLoadFilter);a=this.fm.createAtomSetCollectionFromString(a,b,c);return this.createModelSetAndReturnError(a,
c,e,b)},"~S,java.util.Map,~B");c(b,"openStringsInlineParamsAppend",function(a,b,c){var e=new JU.SB;c||this.zap(!0,!1,!1);a=this.fm.createAtomSeCollectionFromStrings(a,e,this.setLoadParameters(b,c),c);return this.createModelSetAndReturnError(a,c,e,b)},"~A,java.util.Map,~B");c(b,"getInlineChar",function(){return this.g.inlineNewlineChar});c(b,"getDataSeparator",function(){return this.g.getParameter("dataseparator",!0)});c(b,"createModelSetAndReturnError",function(a,b,c,e){return this.createModelSetAndReturnError0(a,
b,c,e)},"~O,~B,JU.SB,java.util.Map");c(b,"createModelSetAndReturnError0",function(a,b,c,e){JU.Logger.startTimer("creating model");var f=this.fm.getFullPathName(!1),h=this.fm.getFileName();null==c&&(this.setBooleanPropertyTok("preserveState",603979898,!1),c=(new JU.SB).append('load "???"'));if("string"==typeof a)return this.setFileLoadStatus(J.c.FIL.NOT_LOADED,f,null,null,a,null),this.displayLoadErrors&&(!b&&!a.equals("#CANCELED#")&&!a.startsWith("File reader was not found:"))&&this.zapMsg(a),a;b?
this.clearAtomSets():this.g.modelKitMode&&!h.equals("Jmol Model Kit")&&this.setModelKitMode(!1);this.setFileLoadStatus(J.c.FIL.CREATING_MODELSET,f,h,null,null,null);this.pushHoldRepaintWhy("createModelSet");this.setErrorMessage(null,null);try{var j=new JU.BS;this.mm.createModelSet(f,h,c,a,j,b);if(!j.isEmpty()){var m=this.ms.getInfoM("jmolscript");if(this.ms.getMSInfoB("doMinimize"))try{var n=e.get("eval"),p=this.getAtomBitSet("_C & connected(3) & !connected(double)");p.and(j);0<=p.nextSetBit(0)&&
j.or(this.addHydrogens(p,41));this.minimize(n,2147483647,0,j,null,null,0,185)}catch(q){if(!H(q,Exception))throw q;}else this.addHydrogens(j,9);null!=m&&this.ms.msInfo.put("jmolscript",m)}this.initializeModel(b)}catch(r){if(H(r,Error))this.handleError(r,!0),a=this.getShapeErrorState(),a="ERROR creating model: "+r+(0==a.length?"":"|"+a),this.zapMsg(a),this.setErrorMessage(a,null);else throw r;}this.popHoldRepaint("createModelSet \u0001## REPAINT_IGNORE ##");a=this.getErrorMessage();this.setFileLoadStatus(J.c.FIL.CREATED,
f,h,this.ms.modelSetName,a,e.get("async"));b&&(this.selectAll(),this.setTainted(!0),this.axesAreTainted=!0);JU.Logger.checkTimer("creating model",!1);System.gc();return a},"~O,~B,JU.SB,java.util.Map");c(b,"loadAtomDataAndReturnError",function(a,b){if("string"==typeof a)return a;this.setErrorMessage(null,null);try{var c=this.mm.createAtomDataSet(a,b);switch(b){case 1145047049:null!=c&&this.runScriptCautiously(c);break;case 4166:this.setStatusFrameChanged(!0,!1);break;case 1648363544:this.shm.deleteVdwDependentShapes(null)}}catch(e){if(H(e,
Error))this.handleError(e,!0),c=this.getShapeErrorState(),c="ERROR adding atom data: "+e+(0==c.length?"":"|"+c),this.zapMsg(c),this.setErrorMessage(c,null),this.setParallel(!1);else throw e;}return this.getErrorMessage()},"~O,~N");c(b,"getCurrentFileAsString",function(a){var b=this.fm.getFullPathName(!1);return b.equals("string")||b.equals("Jmol Model Kit")?this.ms.getInlineData(this.am.cmi):b.equals("String[]")?b:"JSNode"===b?"<DOM NODE>":this.getFileAsString4(b,-1,!0,!1,!1,a)},"~S");c(b,"getFullPathNameOrError",
function(a){var b=Array(2);this.fm.getFullPathNameOrError(a,!1,b);return b},"~S");c(b,"getFileAsString3",function(a,b,c){return this.getFileAsString4(a,-1,!1,!1,b,c)},"~S,~B,~S");c(b,"getFileAsString4",function(a,b,c,e,f,h){if(null==a)return this.getCurrentFileAsString(h);a=x(-1,[a,null]);this.fm.getFileDataAsString(a,b,c,e,f);return a[1]},"~S,~N,~B,~B,~B,~S");c(b,"getAsciiFileOrNull",function(a){return this.fm.getAsciiFileOrNull(a)},"~S");c(b,"autoCalculate",function(a,b){switch(a){case 1111490575:this.ms.getSurfaceDistanceMax();
break;case 1111490574:this.ms.calculateStraightnessAll();break;case 1111490587:this.ms.calculateDssrProperty(b)}},"~N,~S");c(b,"calculateStraightness",function(){this.ms.haveStraightness=!1;this.ms.calculateStraightnessAll()});c(b,"calculateSurface",function(a,b){null==a&&(a=this.bsA());if(3.4028235E38==b||-1==b)this.ms.addStateScript("calculate surfaceDistance "+(3.4028235E38==b?"FROM":"WITHIN"),null,a,null,"",!1,!0);return this.ms.calculateSurface(a,b)},"JU.BS,~N");c(b,"getStructureList",function(){return this.g.getStructureList()});
c(b,"setStructureList",function(a,b){this.g.setStructureList(a,b);this.ms.setStructureList(this.getStructureList())},"~A,J.c.STR");c(b,"calculateStructures",function(a,b,c,e){null==a&&(a=this.bsA());return this.ms.calculateStructures(a,b,!this.am.animationOn,this.g.dsspCalcHydrogen,c,e)},"JU.BS,~B,~B,~N");c(b,"getAnnotationParserIfPresent",function(a){return 1111490587==a?this.dssrParser:this.annotationParser},"~N");c(b,"getAnnotationParser",function(a){return 1111490587==a?null==this.dssrParser?
this.dssrParser=J.api.Interface.getOption("dssx.DSSR1",this,"script"):this.dssrParser:null==this.annotationParser?this.annotationParser=J.api.Interface.getOption("dssx.AnnotationParser",this,"script"):this.annotationParser},"~N");j(b,"getSelectedAtomIterator",function(a,b,c,e){return this.ms.getSelectedAtomIterator(a,b,c,!1,e)},"JU.BS,~B,~B,~B");j(b,"setIteratorForAtom",function(a,b,c){this.ms.setIteratorForAtom(a,-1,b,c,null)},"J.api.AtomIndexIterator,~N,~N");j(b,"setIteratorForPoint",function(a,
b,c,e){this.ms.setIteratorForPoint(a,b,c,e)},"J.api.AtomIndexIterator,~N,JU.T3,~N");j(b,"fillAtomData",function(a,b){a.programInfo="Jmol Version "+JV.Viewer.getJmolVersion();a.fileName=this.fm.getFileName();this.ms.fillAtomData(a,b)},"J.atomdata.AtomData,~N");c(b,"addStateScript",function(a,b,c){return this.ms.addStateScript(a,null,null,null,null,b,c)},"~S,~B,~B");c(b,"getMinimizer",function(a){return null==this.minimizer&&a?(this.minimizer=J.api.Interface.getInterface("JM.Minimizer",this,"script")).setProperty("vwr",
this):this.minimizer},"~B");c(b,"getSmilesMatcher",function(){return null==this.smilesMatcher?this.smilesMatcher=J.api.Interface.getInterface("JS.SmilesMatcher",this,"script"):this.smilesMatcher});c(b,"clearModelDependentObjects",function(){this.setFrameOffsets(null,!1);this.stopMinimization();this.smilesMatcher=this.minimizer=null;null!=this.modelkit&&this.modelkit.clearAtomConstraints()});c(b,"zap",function(a,b,c){this.zap0(a,b,c)},"~B,~B,~B");c(b,"zap0",function(a,b,c){this.clearThreads();null==
this.mm.modelSet?this.mm.zap():(this.ligandModelSet=null,this.clearModelDependentObjects(),this.fm.clear(),this.clearRepaintManager(-1),this.am.clear(),this.tm.clear(),this.slm.clear(),this.hasSelected=!0,this.clearAllMeasurements(),this.clearMinimization(),this.gdata.clear(),this.mm.zap(),null!=this.scm&&this.scm.clear(!1),null!=this.nmrCalculation&&this.getNMRCalculation().setChemicalShiftReference(null,0),this.haveDisplay&&(this.mouse.clear(),this.clearTimeouts(),this.acm.clear()),this.stm.clear(this.g),
this.tempArray.clear(),this.chainMap.clear(),this.chainList.clear(),this.chainCaseSpecified=!1,this.definedAtomSets.clear(),this.lastData=null,null!=this.dm&&this.dm.clear(),!this.g.doublePrecision&&this.g.legacyJavaFloat&&this.setBooleanPropertyTok("legacyjavafloat",603979874,!1),b&&(c&&this.g.removeParam("_pngjFile"),c&&this.g.modelKitMode?this.loadDefaultModelKitModel(null):this.setPickingMode(null,1),this.undoMoveAction(4165,-2)),System.gc());this.initializeModel(!1);a&&this.setFileLoadStatus(J.c.FIL.ZAPPED,
null,b?"resetUndo":this.getZapName(),null,null,null);JU.Logger.debugging&&JU.Logger.checkMemory()},"~B,~B,~B");c(b,"loadDefaultModelKitModel",function(a){this.getModelkit(!1).isHidden()||null!=this.getOperativeSymmetry()||(this.openStringInlineParamsAppend(this.getModelkit(!1).getDefaultModel(),a,!0),this.setRotationRadius(5,!0),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking","assignBond_p"))},"java.util.Map");c(b,"zapMsg",function(a){this.zap(!0,!0,!1);this.echoMessage(a)},
"~S");c(b,"echoMessage",function(a){this.shm.loadShape(31);this.setShapeProperty(31,"font",this.getFont3D("SansSerif","Plain",20));this.setShapeProperty(31,"target","error");this.setShapeProperty(31,"text",a)},"~S");c(b,"initializeModel",function(a){this.clearThreads();a?this.am.initializePointers(1):(this.reset(!0),this.selectAll(),this.setModelkitPropertySafely("initializemodel",null),this.movingSelected=!1,this.slm.noneSelected=Boolean.FALSE,this.setHoverEnabled(!0),this.setSelectionHalosEnabled(!1),
this.tm.setCenter(),this.am.initializePointers(1),this.setBooleanPropertyTok("multipleBondBananas",603979886,!1),this.ms.getMSInfoB("isPyMOL")||(this.clearAtomSets(),this.setCurrentModelIndex(0)),this.setBackgroundModelIndex(-1),this.setFrankOn(this.getShowFrank()),this.shm.setScale(),this.startHoverWatcher(!0),this.setTainted(!0),this.finalizeTransformParameters())},"~B");c(b,"startHoverWatcher",function(a){a&&this.inMotion||(!this.haveDisplay||a&&(!this.hoverEnabled&&!this.sm.haveHoverCallback()||
this.am.animationOn))||this.acm.startHoverWatcher(a)},"~B");j(b,"getModelSetPathName",function(){return this.mm.modelSetPathName});j(b,"getModelSetFileName",function(){return null==this.mm.fileName?this.getZapName():this.mm.fileName});c(b,"getUnitCellInfoText",function(){var a=this.getCurrentUnitCell();return null==a?"not applicable":a.getUnitCellInfo(!0)});c(b,"getUnitCellInfo",function(a){var b=this.getCurrentUnitCell();return null==b?NaN:b.getUnitCellInfoType(a)},"~N");c(b,"getUnitCellInfoStr",
function(a){var b=this.getCurrentUnitCell();return null==b?NaN:b.getUnitCellInfoStr(a)},"~S");c(b,"getV0abc",function(a,b){var c=0>a?this.getCurrentUnitCell():this.getUnitCell(a);null==c&&(c=this.getSymTemp());return null==c?null:c.getV0abc(b,null)},"~N,~O");c(b,"getCurrentUnitCell",function(){var a=this.getUnitCell(this.am.cmi);if(null==a)return null;var b=a.getCartesianOffset(),c=this.am.getUnitCellAtomIndex();return 0<=c&&(null==b||0==b.length())?this.ms.getUnitCellForAtom(c):a});c(b,"getUnitCell",
function(a){if(0<=a)return this.ms.getUnitCell(a);a=this.getVisibleFramesBitSet();for(var b=null,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=this.ms.getUnitCell(c);if(null!=e)if(null==b)b=e;else if(!b.unitCellEquals(e))return null}return b},"~N");c(b,"getPolymerPointsAndVectors",function(a,b){this.ms.getPolymerPointsAndVectors(a,b,this.g.traceAlpha,this.g.sheetSmoothing)},"JU.BS,JU.Lst");c(b,"getHybridizationAndAxes",function(a,b,c,e){return this.ms.getHybridizationAndAxes(a,0,b,c,e,!0,!0,!1,
null)},"~N,JU.V3,JU.V3,~S");c(b,"getAllAtoms",function(){return this.getModelUndeletedAtomsBitSet(-1)});c(b,"getFrameAtoms",function(){return this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet())});c(b,"getVisibleFrameAtomsNoSplitData",function(){return this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSetNoJmolData())});j(b,"getVisibleFramesBitSet",function(){var a=JU.BSUtil.copy(this.am.bsVisibleModels);null!=this.ms.trajectory&&this.ms.trajectory.selectDisplayed(a);return a});
c(b,"getVisibleFramesBitSetNoJmolData",function(){var a=this.getVisibleFramesBitSet();if(this.am.splitFrame)for(var b=0;2>b;b++){var c=this.am.getSplitFrameModelIndex(b);this.ms.isJmolDataFrame(c)&&a.clear(c)}return a});c(b,"getModelUndeletedAtomsBitSet",function(a){return this.slm.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeleted(a,!0),!1)},"~N");c(b,"getModelUndeletedAtomsBitSetBs",function(a){return this.slm.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeletedBs(a),!1)},"JU.BS");j(b,"getBoundBoxCenter",
function(){return this.ms.getBoundBoxCenter(this.am.cmi)});c(b,"calcBoundBoxDimensions",function(a,b){this.ms.calcBoundBoxDimensions(a,b);this.axesAreTainted=!0},"JU.BS,~N");j(b,"getBoundBoxCornerVector",function(){return this.ms.getBoundBoxCornerVector()});j(b,"getModelSetProperties",function(){return this.ms.modelSetProperties});j(b,"getModelProperties",function(a){return this.ms.am[a].properties},"~N");c(b,"getModelForAtomIndex",function(a){return this.ms.am[this.ms.at[a].mi]},"~N");c(b,"getModelIndexForAtom",
function(a){return this.ms.at[a].mi},"~N");j(b,"getModelSetAuxiliaryInfo",function(){return this.ms.getModelSetAuxiliaryInfo(null)});j(b,"getModelNumber",function(a){return 0>a?a:this.ms.getModelNumber(a)},"~N");c(b,"getModelFileNumber",function(a){return 0>a?0:this.ms.modelFileNumbers[a]},"~N");j(b,"getModelNumberDotted",function(a){return 0>a?"0":this.ms.getModelNumberDotted(a)},"~N");j(b,"getModelName",function(a){return this.ms.getModelName(a)},"~N");c(b,"modelHasVibrationVectors",function(a){return 0<=
this.ms.getLastVibrationVector(a,4166)},"~N");c(b,"getBondsForSelectedAtoms",function(a){return this.ms.getBondsForSelectedAtoms(a,this.g.bondModeOr||1==JU.BSUtil.cardinalityOf(a))},"JU.BS");c(b,"frankClicked",function(a,b){return!this.g.disablePopupMenu&&this.getShowFrank()&&this.shm.checkFrankclicked(a,b)},"~N,~N");c(b,"frankClickedModelKit",function(a,b){return!this.g.disablePopupMenu&&this.isModelKitOpen()&&0<=a&&0<=b&&40>a&&104>b},"~N,~N");j(b,"findNearestAtomIndex",function(a,b){return this.findNearestAtomIndexMovable(a,
b,!1)},"~N,~N");c(b,"findNearestAtomIndexMovable",function(a,b,c){return!this.g.atomPicking?-1:this.ms.findNearestAtomIndex(a,b,c?this.slm.getMotionFixedAtoms():null,this.antialiased?this.g.minPixelSelRadius<<1:this.g.minPixelSelRadius)},"~N,~N,~B");c(b,"toCartesian",function(a,b){this.toCartesianUC(null,a,b)},"JU.T3,~B");c(b,"toCartesianUC",function(a,b,c){null==a&&(a=this.getCurrentUnitCell());null!=a&&(a.toCartesian(b,c),this.g.legacyJavaFloat||JU.PT.fixPtFloats(b,1E4))},"J.api.SymmetryInterface,JU.T3,~B");
c(b,"toFractional",function(a,b){this.toFractionalUC(null,a,b)},"JU.T3,~B");c(b,"toFractionalUC",function(a,b,c){null==a&&(a=this.getCurrentUnitCell());null!=a&&(a.toFractional(b,c),this.g.legacyJavaFloat||JU.PT.fixPtFloats(b,1E5))},"J.api.SymmetryInterface,JU.T3,~B");c(b,"toUnitCell",function(a,b){var c=this.getCurrentUnitCell();null!=c&&c.toUnitCell(a,b)},"JU.P3,JU.P3");c(b,"setCurrentCage",function(a){a=x(-1,[a,null]);this.shm.getShapePropertyData(24,"unitCell",a);this.ms.setModelCage(this.am.cmi,
a[1],!0)},"~S");c(b,"addUnitCellOffset",function(a){var b=this.getCurrentUnitCell();null!=b&&a.add(b.getCartesianOffset())},"JU.P3");c(b,"setAtomData",function(a,b,c,e){this.ms.setAtomData(a,b,c,e);2==a&&this.checkCoordinatesChanged(null);this.refreshMeasures(!0)},"~N,~S,~S,~B");j(b,"setCenterSelected",function(){this.setCenterBitSet(this.bsA(),!0)});c(b,"setApplySymmetryToBonds",function(a){this.g.applySymmetryToBonds=a},"~B");j(b,"setBondTolerance",function(a){this.g.setF("bondTolerance",a);this.g.bondTolerance=
a},"~N");j(b,"setMinBondDistance",function(a){this.g.setF("minBondDistance",a);this.g.minBondDistance=a},"~N");c(b,"getAtomsNearPt",function(a,b,c){null==c&&(c=new JU.BS);this.ms.getAtomsWithin(a,b,c,-1);return c},"~N,JU.P3,JU.BS");c(b,"getBranchBitSet",function(a,b,c){return 0>a||a>=this.ms.ac?new JU.BS:JU.JmolMolecule.getBranchBitSet(this.ms.at,a,this.getModelUndeletedAtomsBitSet(this.ms.at[a].mi),null,b,c,!0)},"~N,~N,~B");j(b,"getElementsPresentBitSet",function(a){return this.ms.getElementsPresentBitSet(a)},
"~N");c(b,"getFileHeader",function(){return this.ms.getFileHeader(this.am.cmi)});c(b,"getFileData",function(){return this.ms.getFileData(this.am.cmi)});c(b,"getCifData",function(a){return this.fm.readCifData(this.ms.getModelFileName(a),this.ms.getModelFileType(a).toUpperCase())},"~N");j(b,"readCifData",function(a,b,c){null==b&&(b=this.getAsciiFileOrNull(a));return this.fm.readCifDataKey(b,c,null)},"~S,~O,~S");c(b,"getStateCreator",function(){null==this.jsc&&(this.jsc=J.api.Interface.getInterface("JV.StateCreator",
this,"script")).setViewer(this);return this.jsc});c(b,"getWrappedStateScript",function(){return this.getOutputManager().getWrappedState(null,null,null,null)});j(b,"getStateInfo",function(){return this.getStateInfo3(null,0,0)});c(b,"getStateInfo3",function(a,b,c){return this.g.preserveState?this.getStateCreator().getStateScript(a,b,c):""},"~S,~N,~N");c(b,"getStructureState",function(){return this.getStateCreator().getModelState(null,!1,!0)});c(b,"getCoordinateState",function(a){return this.getStateCreator().getAtomicPropertyState(2,
a)},"JU.BS");c(b,"setCurrentColorRange",function(a){var b=this.getDataObj(a,null,1);a=null==b?null:this.getDataObj(a,null,-1)[2];null!=a&&this.g.rangeSelected&&a.and(this.bsA());this.cm.setPropertyColorRangeData(b,a)},"~S");c(b,"setData",function(a,b,c,e,f,h,j){this.getDataManager().setData(a,this.lastData=b,c,this.ms.ac,e,f,h,j)},"~S,~A,~N,~N,~N,~N,~N");c(b,"getDataObj",function(a,b,c){return 4==c?this.ms.getDSSRProperties(a):null==a&&-2==c?this.lastData:this.getDataManager().getData(a,b,c)},"~S,JU.BS,~N");
c(b,"autoHbond",function(a,b,c){null==a&&(a=b=this.bsA());return this.ms.autoHbond(a,b,c)},"JU.BS,JU.BS,~B");c(b,"getDefaultMeasurementLabel",function(a){switch(a){case 2:return this.g.defaultDistanceLabel;case 3:return this.g.defaultAngleLabel;default:return this.g.defaultTorsionLabel}},"~N");j(b,"getMeasurementCount",function(){var a=this.getShapePropertyAsInt(6,"count");return 0>=a?0:a});j(b,"getMeasurementStringValue",function(a){return""+this.shm.getShapePropertyIndex(6,"stringValue",a)},"~N");
c(b,"getMeasurementInfoAsString",function(){return this.getShapeProperty(6,"infostring")});j(b,"getMeasurementCountPlusIndices",function(a){return this.shm.getShapePropertyIndex(6,"countPlusIndices",a)},"~N");c(b,"setPendingMeasurement",function(a){this.shm.loadShape(6);this.setShapeProperty(6,"pending",a)},"JM.MeasurementPending");c(b,"getPendingMeasurement",function(){return this.getShapeProperty(6,"pending")});c(b,"clearAllMeasurements",function(){this.setShapeProperty(6,"clear",null)});j(b,"clearMeasurements",
function(){this.evalString("measures delete")});c(b,"setAnimation",function(a){switch(a){case 1073742098:this.am.reverseAnimation();case 1073742096:case 4143:this.am.animationOn||this.am.resumeAnimation();break;case 20487:this.am.animationOn&&!this.am.animationPaused&&this.am.pauseAnimation();break;case 1073742037:this.am.setAnimationNext();break;case 1073742108:this.am.setAnimationPrevious();break;case 1073741942:case 1073742125:this.am.rewindAnimation();break;case 1073741993:this.am.setAnimationLast()}},
"~N");j(b,"setAnimationFps",function(a){this.am.setAnimationFps(a)},"~N");c(b,"setAnimationMode",function(a){a.equalsIgnoreCase("once")?this.am.setAnimationReplayMode(1073742070,0,0):a.equalsIgnoreCase("loop")?this.am.setAnimationReplayMode(528411,1,1):a.startsWith("pal")&&this.am.setAnimationReplayMode(1073742082,1,1)},"~S");c(b,"setAnimationOn",function(a){a!=this.am.animationOn&&this.am.setAnimationOn(a)},"~B");c(b,"setAnimationRange",function(a,b){this.am.setAnimationRange(a,b)},"~N,~N");c(b,
"defineAtomSets",function(a){this.definedAtomSets.putAll(a)},"java.util.Map");c(b,"setAnimDisplay",function(a){this.am.setDisplay(a);this.am.animationOn||this.am.morph(this.am.currentMorphModel+1)},"JU.BS");c(b,"setCurrentModelIndex",function(a){-2147483648==a?(this.prevFrame=-2147483648,this.setCurrentModelIndexClear(this.am.cmi,!0)):this.am.setModel(a,!0)},"~N");c(b,"getTrajectoryState",function(){return null==this.ms.trajectory?"":this.ms.trajectory.getState()});c(b,"setFrameOffsets",function(a,
b){this.tm.bsFrameOffsets=null;b?this.clearModelDependentObjects():this.tm.bsFrameOffsets=a;this.tm.frameOffsets=this.ms.getFrameOffsets(a,b)},"JU.BS,~B");c(b,"setCurrentModelIndexClear",function(a,b){this.am.setModel(a,b)},"~N,~B");c(b,"haveFileSet",function(){return 1<this.ms.mc&&2E6<this.getModelNumber(2147483647)});c(b,"setBackgroundModelIndex",function(a){this.am.setBackgroundModelIndex(a);this.g.setO("backgroundModel",this.ms.getModelNumberDotted(a))},"~N");c(b,"setFrameVariables",function(){this.g.setO("animationMode",
JS.T.nameOf(this.am.animationReplayMode));this.g.setI("animationFps",this.am.animationFps);this.g.setO("_firstFrame",this.am.getModelSpecial(-1));this.g.setO("_lastFrame",this.am.getModelSpecial(1));this.g.setF("_animTimeSec",this.am.getAnimRunTimeSeconds());this.g.setB("_animMovie",this.am.isMovie)});c(b,"getInMotion",function(a){return this.inMotion||a&&this.am.animationOn},"~B");j(b,"getMotionEventNumber",function(){return this.motionEventNumber});j(b,"setInMotion",function(a){(new Boolean(this.inMotion^
a)).valueOf()&&(this.inMotion=a,this.resizeImage(0,0,!1,!1,!0),a?(this.startHoverWatcher(!1),++this.motionEventNumber):(this.startHoverWatcher(!0),this.refresh(3,"vwr setInMotion "+a)))},"~B");c(b,"setRefreshing",function(a){this.refreshing=a},"~B");c(b,"getRefreshing",function(){return this.refreshing});j(b,"pushHoldRepaint",function(){this.pushHoldRepaintWhy(null)});c(b,"pushHoldRepaintWhy",function(a){null!=this.rm&&this.rm.pushHoldRepaint(a)},"~S");j(b,"popHoldRepaint",function(a){null!=this.rm&&
this.rm.popHoldRepaint(0>a.indexOf("\u0001## REPAINT_IGNORE ##"),a)},"~S");j(b,"refresh",function(a,b){if(!(null==this.rm||!this.refreshing||6==a&&this.getInMotion(!0)||!this.isWebGL&&7==a)){if(this.isWebGL)switch(a){case 1:case 2:case 7:this.tm.finalizeTransformParameters();if(null==this.html5Applet)return;this.html5Applet._refresh();if(7==a)return}else this.rm.repaintIfReady("refresh "+a+" "+b);this.sm.doSync()&&this.sm.setSync(2==a?b:null)}},"~N,~S");c(b,"requestRepaintAndWait",function(a){null!=
this.rm&&(this.haveDisplay?(this.rm.requestRepaintAndWait(a),this.setSync()):(this.setModelVisibility(),this.shm.finalizeAtoms(null,!0)))},"~S");c(b,"clearShapeRenderers",function(){this.clearRepaintManager(-1)});c(b,"isRepaintPending",function(){return null==this.rm?!1:this.rm.isRepaintPending()});j(b,"notifyViewerRepaintDone",function(){null!=this.rm&&this.rm.repaintDone();this.am.repaintDone()});c(b,"areAxesTainted",function(){var a=this.axesAreTainted;this.axesAreTainted=!1;return a});j(b,"generateOutputForExport",
function(a){return this.noGraphicsAllowed||null==this.rm?null:this.getOutputManager().getOutputFromExport(a)},"java.util.Map");c(b,"clearRepaintManager",function(a){null!=this.rm&&this.rm.clear(a)},"~N");c(b,"renderScreenImage",function(a,b,c){this.renderScreenImageStereo(a,!1,b,c)},"~O,~N,~N");c(b,"renderScreenImageStereo",function(a,b,c,e){this.updateWindow(c,e)&&(!b||null==this.gRight?this.getScreenImageBuffer(a,!1):(this.drawImage(this.gRight,this.getRenderedImage(!0,!1),0,0,this.tm.stereoDoubleDTI),
this.drawImage(a,this.getRenderedImage(!1,!1),0,0,this.tm.stereoDoubleDTI)));this.isCapturing()&&this.doCapture();this.notifyViewerRepaintDone()},"~O,~B,~N,~N");c(b,"isCapturing",function(){return null!=this.captureParams&&Boolean.FALSE!==this.captureParams.get("captureEnabled")});c(b,"doCapture",function(){this.captureParams.remove("imagePixels");var a=this.captureParams.get("endTime").longValue();0<a&&System.currentTimeMillis()+50>a&&this.captureParams.put("captureMode","end");this.processWriteOrCapture(this.captureParams)});
c(b,"updateJS",function(){this.isWebGL?(null==this.jsParams&&(this.jsParams=new java.util.Hashtable,this.jsParams.put("type","JS")),this.updateWindow(0,0)&&this.render(),this.notifyViewerRepaintDone()):this.isStereoSlave||this.renderScreenImageStereo(this.apiPlatform.getGraphics(null),!0,0,0)});c(b,"updateJSView",function(a,b){if(null!=this.html5Applet){var c=this.html5Applet,e=!0;(e=null!=c&&null!=c._viewSet)&&this.html5Applet._atomPickedCallback(a,b)}},"~N,~N");j(b,"evalFile",function(a){return this.evalFileArgs(a,
null)},"~S");j(b,"evalFileArgs",function(a,b){return this.allowScripting&&null!=this.getScriptManager()?this.scm.evalFileArgs(a,b):null},"~S,~S");c(b,"getInsertedCommand",function(){var a=this.insertedCommand;this.insertedCommand="";JU.Logger.debugging&&""!==a&&JU.Logger.debug("inserting: "+a);return a});j(b,"script",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");j(b,"evalString",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");j(b,"evalStringQuiet",function(a){return this.evalStringQuietSync(a,
!0,!0)},"~S");c(b,"evalStringQuietSync",function(a,b,c){return null==this.getScriptManager()?null:this.scm.evalStringQuietSync(a,b,c)},"~S,~B,~B");c(b,"clearScriptQueue",function(){null!=this.scm&&this.scm.clearQueue()});c(b,"setScriptQueue",function(a){(this.g.useScriptQueue=a)||this.clearScriptQueue()},"~B");j(b,"checkHalt",function(a,b){return null!=this.scm&&this.scm.checkHalt(a,b)},"~S,~B");j(b,"scriptWait",function(a){return this.evalWait("JSON",a,"+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated")},
"~S");j(b,"scriptWaitStatus",function(a,b){return this.evalWait("object",a,b)},"~S,~S");c(b,"evalWait",function(a,b,c){if(null==this.getScriptManager())return null;this.scm.waitForQueue();var e=J.i18n.GT.setDoTranslate(!1);a=this.evalStringWaitStatusQueued(a,b,c,!1,!1);J.i18n.GT.setDoTranslate(e);return a},"~S,~S,~S");c(b,"exitJmol",function(){if(!this.isApplet||this.isJNLP){if(null!=this.headlessImageParams)try{this.headless&&this.outputToFile(this.headlessImageParams)}catch(a){if(!H(a,Exception))throw a;
}JU.Logger.debugging&&JU.Logger.debug("exitJmol -- exiting");System.out.flush();System.exit(0)}});c(b,"scriptCheckRet",function(a,b){return null==this.getScriptManager()?null:this.scm.scriptCheckRet(a,b)},"~S,~B");j(b,"scriptCheck",function(a){return this.scriptCheckRet(a,!1)},"~S");j(b,"isScriptExecuting",function(){return null!=this.eval&&this.eval.isExecuting()});j(b,"haltScriptExecution",function(){null!=this.eval&&(this.eval.haltExecution(),this.eval.stopScriptThreads());this.setStringPropertyTok("pathForAllFiles",
545259572,"");this.clearTimeouts()});c(b,"pauseScriptExecution",function(){null!=this.eval&&this.eval.pauseExecution(!0)});c(b,"resolveDatabaseFormat",function(a){return JV.Viewer.hasDatabasePrefix(a)||0<=a.indexOf("cactus.nci.nih.gov/chemical/structure")?this.setLoadFormat(!1,a,a.charAt(0),!1):a},"~S");b.hasDatabasePrefix=c(b,"hasDatabasePrefix",function(a){return 0!=a.length&&JV.Viewer.isDatabaseCode(a.charAt(0))},"~S");b.isDatabaseCode=c(b,"isDatabaseCode",function(a){return"*"==a||"$"==a||"="==
a||":"==a},"~S");c(b,"setLoadFormat",function(a,b,c,e){var f=null,h=b.substring(1),j="";b.endsWith("#_DOCACHE_")&&(j="#_DOCACHE_",b=b.substring(0,b.length-j.length),h=h.substring(0,h.length-j.length));switch(c.charCodeAt(0)){case 99:return b+j;case 104:return this.g.checkCIR&&this.checkCIR(!1),this.g.nihResolverFormat+b.substring(b.indexOf("/structure")+10)+j;case 61:if(b.startsWith("==")){if(h=h.substring(1),h.equals("?")&&null==(h=this.getDBID("chemical component from RCSB")))return null}else{if(h.equals("?")&&
null==(h=this.getDBID("PDB ID from RCSB")))return null;if(0<h.indexOf("/")){try{var m=h.indexOf("/"),n=h.substring(0,m),h=h.substring(m+1);n.equalsIgnoreCase("aflowlib")&&(c=1,m=h.indexOf("."),0<=m&&(c=JU.PT.parseInt(h.substring(m+1)),h=h.substring(0,m)),0>h.indexOf("_")&&(h=this.getSymTemp().getSpaceGroupJSON("AFLOWLIB",h,c)));h=JV.JC.resolveDataBase(n,h,null);null!=h&&h.startsWith("'")&&(h=this.evaluateExpression(h).toString());b=null==h||0==h.length?b:h}catch(p){if(!H(p,Exception))throw p;}return b+
j}b=null;!a&&h.endsWith(".bcif")&&(h=h.substring(0,h.indexOf(".bcif")),b=JV.JC.resolveDataBase("bcif",h.toLowerCase(),null));h.endsWith(".mmtf")&&(h=h.substring(0,h.indexOf(".mmtf")),b=JV.JC.resolveDataBase("mmtf",h.toUpperCase(),null));if(null!=b)return b+j;f=this.g.loadFormat}case 35:return null==f&&(f=this.g.pdbLoadLigandFormat),JV.JC.resolveDataBase(null,h,f)+j;case 42:if(h.equals("?")&&null==(h=this.getDBID("PDB ID from EBI")))return null;c=null;m=b.lastIndexOf("/");b.startsWith("*dom/")?(h=
b.substring(m+1),f=4<m?b.substring(5):"mappings",c=JU.PT.rep(JV.JC.resolveDataBase("map",h,null),"%TYPE",f)):b.startsWith("*val/")?(h=b.substring(m+1),f=4<m?b.substring(5):"validation/outliers/all",c=JU.PT.rep(JV.JC.resolveDataBase("map",h,null),"%TYPE",f)):b.startsWith("*rna3d/")?(h=b.substring(m+1),f=6<m?b.substring(6):"loops",c=JU.PT.rep(JV.JC.resolveDataBase("rna3d",h,null),"%TYPE",f)):b.startsWith("*dssr--")?(h=b.substring(m+1),h=JV.JC.resolveDataBase("dssr",h,null),c=h+"%20"+JU.PT.rep(b.substring(5,
m)," ","%20")):b.startsWith("*dssr/")?(h=b.substring(m+1),c=JV.JC.resolveDataBase("dssr",h,null)):b.startsWith("*dssr1/")&&(h=b.substring(m+1),c=JV.JC.resolveDataBase("dssr1",h,null));if(null!=c)return c+j;m="pdbe";5==h.length&&"*"==h.charAt(4)&&(m="pdbe2",h=h.substring(0,4));return JV.JC.resolveDataBase(m,h,null)+j;case 58:f=this.g.pubChemFormat;if(h.equals("?")&&null==(h=this.getDBID("structure from PubChem")))return null;if(""===h)try{h="smiles:"+this.getOpenSmiles(this.bsA())}catch(q){if(!H(q,
Exception))throw q;}m=h.toLowerCase();c=-2147483648;try{c=Integer.parseInt(h)}catch(r){if(!H(r,Exception))throw r;}-2147483648!=c?h="cid/"+c:m.startsWith("smiles:")?(f+="?POST?smiles="+h.substring(7),h="smiles"):h.startsWith("inchi:")?(f+="?POST?inchi="+h.substring(6),h="inchi"):h.startsWith("cid:")||h.startsWith("inchikey:")||h.startsWith("cas:")?h=h.$replace(":","/"):(m.startsWith("name:")&&(h=h.substring(5)),h="name/"+JU.PT.escapeUrl(h));return JU.PT.formatStringS(f,"FILE",h)+j;case 36:this.checkCIR(!1);
if(h.equals("?")&&null==(h=this.getDBID("structure from NCI/CADD")))return null;if(b.equals("$"))try{h=this.getOpenSmiles(this.bsA())}catch(s){if(!H(s,Exception))throw s;}else if(b.startsWith("$$")){h=h.substring(1);if(0==h.length)try{h=this.getOpenSmiles(this.bsA())}catch(v){if(!H(v,Exception))throw v;}h=JU.PT.escapeUrl(h);return JV.JC.resolveDataBase("smiles2d",h,null)+j}case 77:case 78:case 50:case 73:case 75:case 83:case 84:case 47:h=JU.PT.escapeUrl(h);switch(c.charCodeAt(0)){case 77:case 78:f=
this.g.nihResolverFormat+"/%FILE/names";break;case 50:f=this.g.nihResolverFormat+"/%FILE/image";break;case 73:case 84:f=this.g.nihResolverFormat+"/%FILE/file?format=stdinchi";break;case 75:case 83:f=this.g.nihResolverFormat+"/%FILE/stdinchikey";break;case 47:f=this.g.nihResolverFormat+"/%FILE/";break;default:f=this.g.smilesUrlFormat}return(e?"MOL3D::":"")+JU.PT.formatStringS(f,"FILE",h)+j;case 63:case 45:case 95:(b=h.startsWith("*")||h.startsWith("="))&&(h=h.substring(1));f=null;m=h.indexOf(".");
0<=m&&(f=h.substring(m+1),h=h.substring(0,m));(n=h.startsWith("density"))&&(h="em"+h.substring(7));if(h.equals("emdb")||h.equals("em"))h+="/";h.startsWith("em/")&&(h="emdb"+h.substring(2));if(h.startsWith("emdb/")){h=h.substring(5);0==h.length?h="=":h.startsWith("*")&&(h="="+h.substring(1));a="#-sigma=10";if(h.startsWith("=")){h=h.equals("=")?this.getPdbID():h.substring(1);if(null==h||"?"==c)return h;m=JV.JC.resolveDataBase("emdbquery",h,null);e=this.fm.cacheGet(m,!1);if(null==e){this.showString("retrieving "+
m,!1);e=this.getFileAsString(m);if(null==e){this.showString("EM retrieve failed for "+h,!1);if(!n)return null;e="FAILED"}else this.showString(e,!1);this.fm.cachePut(m,e)}m=e.indexOf("EMD-");if(0<=m)h=e.substring(m+4),m=h.indexOf("\n"),0<m&&(h=h.substring(0,m)),m=h.indexOf(","),0<m&&(a="#-cutoff="+h.substring(m+1),h=h.substring(0,m));else{if(!n)return null;a=null}}if(null!=a)return JV.JC.resolveDataBase("emdbmap"+("-"==c?"server":""),h,null)+a+j}h=JV.JC.resolveDataBase((b?"pdbemapdiff":"pdbemap")+
("-"==c?"server":""),h,null);"cif".equals(f)&&(h=h.$replace("bcif","cif"))}return h+j},"~B,~S,~S,~B");c(b,"getDBID",function(a){return this.prompt("load a "+a,"",!1)},"~S");c(b,"checkCIR",function(a){if(!(this.cirChecked&&!a||null==this.g.resolverResolver)){try{this.g.removeParam("_cirStatus");var b=this.getModelSetAuxiliaryInfo();b.remove("cirInfo");var c=this.parseJSONMap(this.getFileAsString(this.g.resolverResolver));b.put("cirInfo",c);this.ms.msInfo=b;var e=c.get("status");this.g.setO("_cirStatus",
e);this.g.setCIR(c.get("rfc6570Template"),!this.isSilent);this.isSilent||JU.Logger.info("Viewer.checkCIR _.cirInfo.status = "+e)}catch(f){System.out.println("Viewer.checkCIR failed at "+this.g.resolverResolver+": "+f)}this.cirChecked=!0}},"~B");c(b,"getStandardLabelFormat",function(a){switch(a){default:case 0:return"%[identify]";case 1:return this.g.defaultLabelXYZ;case 2:return this.g.defaultLabelPDB}},"~N");c(b,"getAdditionalHydrogens",function(a,b,c){null==a&&(a=this.bsA());var e=F(1,0);a=this.ms.calculateHydrogens(a,
e,b,c);e=Array(e[0]);for(c=b=0;b<a.length;b++)if(null!=a[b])for(var f=0;f<a[b].length;f++)e[c++]=a[b][f];return e},"JU.BS,JU.Lst,~N");j(b,"setMarBond",function(a){this.g.bondRadiusMilliAngstroms=a;this.g.setI("bondRadiusMilliAngstroms",a);this.setShapeSize(1,2*a,JU.BSUtil.setAll(this.ms.ac))},"~N");c(b,"setHoverLabel",function(a){this.shm.loadShape(35);this.setShapeProperty(35,"label",a);this.setHoverEnabled(null!=a);this.g.setO("_hoverLabel",this.hoverLabel=a);!this.hoverEnabled&&!this.sm.haveHoverCallback()&&
this.startHoverWatcher(!1)},"~S");c(b,"setHoverEnabled",function(a){this.hoverEnabled=a;this.g.setB("_hoverEnabled",a)},"~B");c(b,"hoverOn",function(a,b){this.hoverOnPtr(a,b,!1)},"~N,~B");c(b,"hoverOnPtr",function(a,b,c){if(0>a)this.hoverOff();else if(this.g.removeParam("_objecthovered"),this.g.setI("_atomhovered",a),this.g.setO("_hoverLabel",this.hoverLabel),this.g.setUserVariable("hovered",JS.SV.getVariable(JU.BSUtil.newAndSetBit(a))),this.sm.haveHoverCallback()&&this.sm.setStatusAtomHovered(a,
this.getAtomInfoXYZ(a,2)),this.hoverEnabled&&!(null!=this.eval&&this.isScriptExecuting()||a==this.hoverAtomIndex||0==this.g.hoverDelayMs||!this.slm.isInSelectionSubset(a))){var e=b?J.i18n.GT.$("Drag to move label"):this.isModelKitOpen()||this.isModelkitPickingActive()?this.getModelkit(!1).setProperty("hoverlabel",Integer.$valueOf(a)):null;this.shm.loadShape(35);null!=e&&(!b||this.ms.at[a].isVisible(512))&&this.setShapeProperty(35,"specialLabel",e);this.setShapeProperty(35,"pointer",Boolean.$valueOf(c));
this.setShapeProperty(35,"text",this.hoverText=null);this.setShapeProperty(35,"target",Integer.$valueOf(this.hoverAtomIndex=a));this.refresh(3,"hover on atom")}},"~N,~B,~B");c(b,"showHover",function(){return!this.tm.isNavigating()&&(!this.am.splitFrame||this.am.currentSplitFrame==this.tm.splitFrameCurrentlyRendering)});c(b,"isModelkitPickingActive",function(){if(32==this.acm.getAtomPickingMode())return!0;switch(this.acm.getBondPickingMode()){case 34:case 33:case 8:case 35:return this.g.bondPicking}return!1});
c(b,"isModelkitPickingRotateBond",function(){return null!=this.acm&&34==this.acm.getBondPickingMode()});c(b,"hoverOnPt",function(a,b,c,e,f){null!=this.eval&&this.isScriptExecuting()||(this.g.setO("_hoverLabel",c),null!=e&&null!=f&&(this.g.setO("_objecthovered",e),this.g.setI("_atomhovered",-1),this.g.setUserVariable("hovered",JS.SV.getVariable(f)),this.sm.haveHoverCallback()&&this.sm.setStatusObjectHovered(e,c,f)),this.hoverEnabled&&(this.shm.loadShape(35),this.gdata.antialiasEnabled&&(a<<=1,b<<=
1),this.setShapeProperty(35,"xy",JU.P3i.new3(a,b,0)),this.setShapeProperty(35,"target",null),this.setShapeProperty(35,"specialLabel",null),this.setShapeProperty(35,"text",c),this.hoverAtomIndex=-1,this.hoverText=c,this.refresh(3,"hover on point")))},"~N,~N,~S,~S,JU.T3");c(b,"hoverOff",function(){try{if((this.isModelKitOpen()||null!=this.modelkit&&this.modelkit.wasRotating())&&!this.isModelkitPickingRotateBond()&&this.highlight(null),this.hoverEnabled){var a=null!=this.hoverText||0<=this.hoverAtomIndex;
0<=this.hoverAtomIndex&&(this.setShapeProperty(35,"target",null),this.hoverAtomIndex=-1,this.sm.haveHoverCallback()&&this.sm.setStatusAtomHovered(-1,null));null!=this.hoverText&&(this.setShapeProperty(35,"text",null),this.hoverText=null);this.setShapeProperty(35,"specialLabel",null);a&&this.refresh(3,"hover off")}}catch(b){if(!H(b,Exception))throw b;}});j(b,"setDebugScript",function(a){this.g.debugScript=a;this.g.setB("debugScript",a);null!=this.eval&&this.eval.setDebugging()},"~B");c(b,"clearClickCount",
function(){this.setTainted(!0)});c(b,"setCursor",function(a){if(!this.$isKiosk&&!(this.currentCursor==a||this.multiTouch||!this.haveDisplay))this.apiPlatform.setCursor(this.currentCursor=a,this.display)},"~N");c(b,"setPickingMode",function(a,b){if(this.haveDisplay){var c=this.acm.getAtomPickingMode();this.showSelected=!1;var e=null;if(null!=a){var f=a.indexOf("_");0<=f&&(e=a.substring(f+1),a=a.substring(0,f));b=JV.ActionManager.getPickingMode(a)}0>b&&(b=1);this.acm.setPickingMode(b);f=JV.ActionManager.getPickingModeName(this.acm.getAtomPickingMode());
this.g.setO("picking",f);if(null!=this.modelkit)switch(this.modelkit.setProperty("atompickingmode",f),this.acm.setPickingMode(b),b){case 1:b!=c&&this.setModelKitMode(!1);break;case 8:case 35:this.modelkit.setProperty("bondpickingmode",a.toLowerCase())}if(!(null==e||0==e.length))switch(e=Character.toUpperCase(e.charAt(0))+(1==e.length?"":e.substring(1,2)),b){case 32:this.getModelkit(!1).setProperty("atomtype",e);break;case 33:this.setBooleanPropertyTok("bondPicking",603979814,!0);this.getModelkit(!1).setProperty("bondtype",
e);break;default:JU.Logger.error("Bad picking mode: "+a+"_"+e)}}},"~S,~N");c(b,"getPickingMode",function(){return this.haveDisplay?this.acm.getAtomPickingMode():0});c(b,"setPickingStyle",function(a,b){this.haveDisplay&&(null!=a&&(b=JV.ActionManager.getPickingStyleIndex(a)),0>b&&(b=0),this.acm.setPickingStyle(b),this.g.setO("pickingStyle",JV.ActionManager.getPickingStyleName(this.acm.getPickingStyle())))},"~S,~N");c(b,"getDrawHover",function(){return this.haveDisplay&&this.g.drawHover});c(b,"getAtomInfo",
function(a){null==this.ptTemp&&(this.ptTemp=new JU.P3);return 0<=a?this.ms.getAtomInfo(a,null,this.ptTemp):this.shm.getShapePropertyIndex(6,"pointInfo",-a)},"~N");c(b,"getAtomInfoXYZ",function(a,b){var c=this.ms.at[a];if(4==b)return this.getChimeMessenger().getInfoXYZ(c);null==this.ptTemp&&(this.ptTemp=new JU.P3);return c.getIdentityXYZ(this.ptTemp,b)},"~N,~N");c(b,"setSync",function(){this.sm.doSync()&&this.sm.setSync(null)});j(b,"setJmolCallbackListener",function(a){this.sm.cbl=a},"J.api.JmolCallbackListener");
j(b,"setJmolStatusListener",function(a){this.sm.cbl=this.sm.jsl=a},"J.api.JmolStatusListener");c(b,"getStatusChanged",function(a){return null==a?null:this.sm.getStatusChanged(a)},"~S");c(b,"menuEnabled",function(){return!this.g.disablePopupMenu&&null!=this.getPopupMenu()});c(b,"setStatusDragDropped",function(a,b,c,e,f){0==a&&(this.g.setO("_fileDropped",e),this.g.setUserVariable("doDrop",JS.SV.vT),this.g.setUserVariable("dropFileType",JS.SV.newS("")),this.g.setUserVariable("dropFileName",JS.SV.newS(e)));
a=this.sm.setStatusDragDropped(a,b,c,e,f);b=this.getP("dropFileType").toString();0<b.length&&null!=f&&(f[0]=b);return!a||this.getP("doDrop").toString().equals("true")},"~N,~N,~N,~S,~A");c(b,"setStatusResized",function(a,b){this.sm.setStatusResized(a,b)},"~N,~N");c(b,"scriptStatus",function(a){this.setScriptStatus(a,"",0,null)},"~S");c(b,"scriptStatusMsg",function(a,b){this.setScriptStatus(a,b,0,null)},"~S,~S");c(b,"setScriptStatus",function(a,b,c,e){this.sm.setScriptStatus(a,b,c,e)},"~S,~S,~N,~S");
j(b,"showUrl",function(a){if(null!=a){if(0>a.indexOf(":")){var b=this.fm.getAppletDocumentBase();""===b&&(b=this.fm.getFullPathName(!1));0<=b.indexOf("/")?b=b.substring(0,b.lastIndexOf("/")+1):0<=b.indexOf("\\")&&(b=b.substring(0,b.lastIndexOf("\\")+1));a=b+a}JU.Logger.info("showUrl:"+a);this.sm.showUrl(a)}},"~S");c(b,"setMeshCreator",function(a){this.shm.loadShape(24);this.setShapeProperty(24,"meshCreator",a)},"~O");c(b,"showConsole",function(a){if(this.haveDisplay)try{null==this.appConsole&&a&&
this.getConsole(),this.appConsole.setVisible(!0)}catch(b){}},"~B");c(b,"getConsole",function(){var a=null==this.sm.cbl&&null==this.appConsole;this.getProperty("DATA_API","getAppConsole",Boolean.TRUE);a&&y(this.appConsole,"J.api.JmolCallbackListener")&&this.setJmolCallbackListener(this.appConsole);return this.appConsole});j(b,"getParameter",function(a){return this.getP(a)},"~S");c(b,"getP",function(a){return this.g.getParameter(a,!0)},"~S");c(b,"getPOrNull",function(a){return this.g.getParameter(a,
!1)},"~S");c(b,"unsetProperty",function(a){a=a.toLowerCase();(a.equals("all")||a.equals("variables"))&&this.fm.setPathForAllFiles("");this.g.unsetUserVariable(a)},"~S");j(b,"notifyStatusReady",function(a){System.out.println("Jmol applet "+this.fullName+(a?" ready":" destroyed"));a||this.dispose();this.sm.setStatusAppletReady(this.fullName,a)},"~B");j(b,"getBooleanProperty",function(a){a=a.toLowerCase();if(this.g.htBooleanParameterFlags.containsKey(a))return this.g.htBooleanParameterFlags.get(a).booleanValue();
if(a.endsWith("p!")){if(null==this.acm)return!1;var b=this.acm.getPickingState().toLowerCase();a=a.substring(0,a.length-2)+";";return 0<=b.indexOf(a)}if(a.equalsIgnoreCase("executionPaused"))return null!=this.eval&&this.eval.isPaused();if(a.equalsIgnoreCase("executionStepping"))return null!=this.eval&&this.eval.isStepping();if(a.equalsIgnoreCase("haveBFactors"))return null!=this.ms.getBFactors();if(a.equalsIgnoreCase("colorRasmol"))return this.cm.isDefaultColorRasmol;if(a.equalsIgnoreCase("frank"))return this.getShowFrank();
if(a.equalsIgnoreCase("spinOn"))return this.tm.spinOn;if(a.equalsIgnoreCase("isNavigating"))return this.tm.isNavigating();if(a.equalsIgnoreCase("showSelections"))return this.selectionHalosEnabled;if(this.g.htUserVariables.containsKey(a)){b=this.g.getUserVariable(a);if(1073742335==b.tok)return!0;if(1073742334==b.tok)return!1}JU.Logger.error("vwr.getBooleanProperty("+a+") - unrecognized");return!1},"~S");j(b,"getInt",function(a){switch(a){case 553648159:return this.g.occupancyThreshold;case 553648132:return this.am.animationFps;
case 553648139:return this.g.dotDensity;case 553648140:return this.g.dotScale;case 553648142:return this.g.helixStep;case 553648145:return this.g.infoFontSize;case 553648147:return this.g.labelPointerWidth;case 553648149:return this.g.meshScale;case 553648150:return this.g.minimizationReportSteps;case 553648153:return this.g.minPixelSelRadius;case 553648154:return this.g.percentVdwAtom;case 553648157:return this.g.pickingSpinRate;case 553648166:return this.g.ribbonAspectRatio;case 536870922:return this.g.scriptDelay;
case 553648152:return this.g.minimizationMaxAtoms;case 553648170:return this.g.smallMoleculeMaxAtoms;case 553648183:return this.g.strutSpacing;case 553648184:return this.stm.getUndoMax();case 553648185:return this.g.vectorTrail}JU.Logger.error("viewer.getInt("+JS.T.nameOf(a)+") - not listed");return 0},"~N");c(b,"getDelayMaximumMs",function(){return this.haveDisplay?this.g.delayMaximumMs:1});c(b,"getHermiteLevel",function(){return this.tm.spinOn&&0<this.g.hermiteLevel?0:this.g.hermiteLevel});c(b,
"getHoverDelay",function(){return this.isModelKitOpen()||this.isModelkitPickingActive()||this.getDrawHover()?20:this.g.hoverDelayMs});j(b,"getBoolean",function(a){switch(a){case 603979970:return this.g.useMinimizationThread;case 603979891:return this.g.nboCharges;case 603979856:return this.g.hiddenLinesDashed;case 1073742086:return this.ms.getMSInfoB(JV.JC.getBoolName(4));case 603979802:return this.g.autoplayMovie;case 603979797:return!this.headless&&this.g.allowAudio;case 603979780:return this.g.allowGestures;
case 603979784:return this.g.allowMultiTouch;case 603979785:return this.g.allowRotateSelected;case 603979792:return this.g.appendNew;case 603979794:return this.g.applySymmetryToBonds;case 603979796:return this.g.atomPicking;case 603979798:return this.g.autoBond;case 603979800:return this.g.autoFps;case 603979806:return this.g.axesOrientationRasmol;case 603979811:return this.g.cartoonSteps;case 603979810:return this.g.cartoonBlocks;case 603979812:return this.g.bondModeOr;case 603979815:return this.g.cartoonBaseEdges;
case 603979816:return this.g.cartoonFancy;case 603979817:return this.g.cartoonLadders;case 603979818:return this.g.cartoonRibose;case 603979819:return this.g.cartoonRockets;case 603979822:return this.g.chainCaseSensitive||this.chainCaseSpecified;case 603979821:return this.g.checkCIR;case 603979823:return this.g.cipRule6Full;case 603979825:return this.g.debugScript;case 603979826:return this.g.defaultStructureDSSP;case 603979827:return this.g.disablePopupMenu;case 603979828:return this.g.displayCellParameters;
case 603979830:return this.g.dotSurface;case 603979829:return this.g.dotsSelectedOnly;case 603979831:return this.g.doublePrecision;case 603979834:return this.g.drawPicking;case 603979838:return this.g.elementKey;case 603979846:return this.g.fontCaching;case 603979847:return this.g.fontScaling;case 603979848:return this.g.forceAutoBond;case 603979849:return!1;case 603979850:return this.g.greyscaleRendering;case 603979852:return this.g.hbondsBackbone;case 603979853:return this.g.hbondsRasmol;case 603979854:return this.g.hbondsSolid;
case 1612709894:return this.g.rasmolHeteroSetting;case 603979858:return this.g.hideNameInPopup;case 603979863:return this.g.highResolutionFlag;case 1612709900:return this.g.rasmolHydrogenSetting;case 603979866:return this.g.isosurfaceKey;case 603979868:return this.g.jmolInJSpecView;case 603979869:return this.g.justifyMeasurements;case 603979872:return this.g.legacyAutoBonding;case 603979873:return this.g.legacyHAddition;case 603979874:return this.g.legacyJavaFloat;case 603979876:return this.g.logGestures;
case 603979877:return this.g.measureAllModels;case 603979878:return this.g.measurementLabels;case 603979879:return this.g.messageStyleChime;case 603979882:return this.g.mode2d;case 603983903:return this.g.modelKitMode;case 603979886:return this.g.multipleBondBananas;case 603979889:return this.g.navigationMode;case 603979890:return this.g.navigationPeriodic;case 603979893:return this.g.partialDots;case 603979894:return this.g.pdbAddHydrogens;case 603979896:return this.g.pdbSequential;case 603979898:return this.g.preserveState;
case 603979900:return this.refreshing;case 603979901:return this.g.ribbonBorder;case 603979902:return this.g.rocketBarrels;case 603979892:return this.g.noDelay;case 603979906:return this.g.selectAllModels;case 603979920:return this.g.showHiddenSelectionHalos;case 603979922:return this.g.showHydrogens;case 603979926:return this.g.showMeasurements;case 603979927:return this.g.showModVecs;case 603979928:return this.g.showMultipleBonds;case 603979934:return this.g.showTiming;case 603979937:return this.g.showUnitCellDetails;
case 603979939:return this.g.slabByAtom;case 603979940:return this.g.slabByMolecule;case 603979944:return this.g.smartAromatic;case 603979948:return this.g.dotSolvent;case 603979952:return this.g.ssbondsBackbone;case 603979955:return this.g.strutsMultiple;case 603979956:return this.g.symmetryHermannMauguin;case 603979960:return this.g.testFlag1;case 603979962:return this.g.testFlag2;case 603979964:return this.g.testFlag3;case 603979965:return this.g.testFlag4;case 603979966:return this.g.traceAlpha;
case 1111490588:return this.g.translucent;case 603979968:return this.g.twistedSheets;case 603979972:return this.g.vectorsCentered;case 603979973:return this.g.vectorSymmetry;case 603979975:return this.g.waitForMoveTo;case 603979978:return this.g.zeroBasedXyzRasmol}JU.Logger.error("viewer.getBoolean("+JS.T.nameOf(a)+") - not listed");return!1},"~N");c(b,"allowEmbeddedScripts",function(){return this.g.allowEmbeddedScripts&&!this.isPreviewOnly});c(b,"getDragSelected",function(){return this.g.dragSelected&&
!this.g.modelKitMode});c(b,"getBondsPickable",function(){return this.g.bondPicking||this.isModelkitPickingActive()||this.isModelKitOpen()&&this.getModelkitPropertySafely("ismolecular")===Boolean.TRUE});c(b,"isModelKitOpen",function(){return this.g.modelKitMode&&null!=this.modelkit&&!this.modelkit.isHidden()});c(b,"useMinimizationThread",function(){return this.g.useMinimizationThread&&!this.autoExit});j(b,"getFloat",function(a){switch(a){case 1153433601:return this.g.particleRadius;case 570425345:return this.g.axesOffset;
case 570425346:return this.g.axesScale;case 570425348:return this.g.bondTolerance;case 570425353:return this.g.defaultTranslucent;case 570425352:return this.g.defaultDrawArrowScale;case 570425354:return this.g.dipoleScale;case 570425355:return this.g.drawFontSize;case 570425357:return this.g.exportScale;case 570425359:return this.g.hbondsAngleMinimum;case 570425361:return this.g.hbondHXDistanceMaximum;case 570425360:return this.g.hbondNODistanceMaximum;case 570425363:return this.g.loadAtomDataTolerance;
case 570425364:return this.g.minBondDistance;case 1275072532:return this.g.modulationScale;case 570425370:return this.g.multipleBondSpacing;case 570425369:return this.g.multipleBondRadiusFactor;case 570425374:return this.g.navigationSpeed;case 570425382:return this.g.pointGroupDistanceTolerance;case 570425384:return this.g.pointGroupLinearTolerance;case 570425388:return this.tm.modelRadius;case 570425392:return this.g.sheetSmoothing;case 570425394:return this.g.solventProbeRadius;case 570425403:return this.g.starWidth;
case 570425406:return this.g.strutDefaultRadius;case 570425408:return this.g.strutLengthMaximum;case 1648361473:return this.g.vectorScale;case 570425412:return this.g.vibrationPeriod;case 570425347:return this.g.cartoonBlockHeight}JU.Logger.error("viewer.getFloat("+JS.T.nameOf(a)+") - not listed");return 0},"~N");j(b,"setStringProperty",function(a,b){if(!(null==b||null==a||0==a.length))if("_"==a.charAt(0))this.g.setO(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 603979776:this.setBooleanPropertyTok(a,
c,JS.SV.newV(4,b).asBoolean());break;case 553648128:this.setIntPropertyTok(a,c,JS.SV.newV(4,b).asInt());break;case 570425344:"NaN".equals(b)||this.setFloatPropertyTok(a,c,JU.PT.parseFloat(b));break;default:this.setStringPropertyTok(a,c,b)}}},"~S,~S");c(b,"setStringPropertyTok",function(a,b,c){switch(b){case 545259567:this.g.macroDirectory=c=null==c||0==c.length?"https://chemapps.stolaf.edu/jmol/macros":c;this.macros=null;break;case 545259570:this.g.nihResolverFormat=c;break;case 545259521:this.setAnimationMode(c);
return;case 545259569:this.g.nmrPredictFormat=c;break;case 545259548:this.g.defaultDropScript=c;break;case 545259572:c=this.fm.setPathForAllFiles(c);break;case 545259558:this.setUnits(c,!1);return;case 545259560:this.g.forceField.equals(c)||(this.g.forceField=c="UFF".equalsIgnoreCase(c)?"UFF":"UFF2D".equalsIgnoreCase(c)?"UFF2D":"MMFF2D".equalsIgnoreCase(c)?"MMFF2D":"MMFF",this.minimizer=null);break;case 545259571:this.g.nmrUrlFormat=c;break;case 545259568:this.setUnits(c,!0);return;case 545259565:this.g.pdbLoadLigandFormat=
c;break;case 545259543:this.g.defaultLabelPDB=c;break;case 545259544:this.g.defaultLabelXYZ=c;break;case 545259549:this.g.defaultLoadFilter=c;break;case 545259566:c=this.getOutputManager().setLogFile(c);if(null==c)return;break;case 545259559:break;case 545259524:this.g.atomTypes=c;break;case 545259538:break;case 545259576:this.g.pickLabel=c;break;case 545259580:this.g.quaternionFrame=2==c.length&&c.startsWith("R")?c.substring(0,2):""+(c.toLowerCase()+"p").charAt(0);JU.PT.isOneOf(this.g.quaternionFrame,
"RC;RP;a;b;c;n;p;q;x;")||(this.g.quaternionFrame="p");this.ms.haveStraightness=!1;break;case 545259555:this.setVdwStr(c);return;case 545259563:new J.i18n.GT(this,c);b=J.i18n.GT.getLanguage();this.modelkit=null;null!=this.jmolpopup&&(this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.getPopupMenu());this.sm.setCallbackFunction("language",b);c=J.i18n.GT.getLanguage();break;case 545259564:this.g.loadFormat=c;break;case 545259534:this.setObjectColor("background",c);return;case 545259528:this.setObjectColor("axis1",
c);return;case 545259530:this.setObjectColor("axis2",c);return;case 545259532:this.setObjectColor("axis3",c);return;case 545259536:this.setObjectColor("boundbox",c);return;case 545259586:this.setObjectColor("unitcell",c);return;case 545259578:this.setPropertyColorScheme(c,!1,!1);break;case 545259562:this.shm.loadShape(35);this.setShapeProperty(35,"atomLabel",c);break;case 545259547:this.g.defaultDistanceLabel=c;break;case 545259542:this.g.defaultAngleLabel=c;break;case 545259554:this.g.defaultTorsionLabel=
c;break;case 545259550:this.g.defaultLoadScript=c;break;case 545259522:this.fm.setAppletProxy(c);break;case 545259546:null==c&&(c="");c=c.$replace("\\","/");this.g.defaultDirectory=c;break;case 545259561:this.g.helpPath=c;break;case 545259552:!c.equalsIgnoreCase("RasMol")&&!c.equalsIgnoreCase("PyMOL")&&(c="Jmol");this.setDefaultsType(c);break;case 545259545:this.setDefaultColors(c.equalsIgnoreCase("rasmol"));return;case 545259573:this.setPickingMode(c,0);return;case 545259574:this.setPickingStyle(c,
0);return;case 545259540:break;default:if(a.toLowerCase().endsWith("callback")){this.sm.setCallbackFunction(a,0==c.length||c.equalsIgnoreCase("none")?null:c);break}if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.newV(4,c));return}}this.g.setO(a,c)},"~S,~N,~S");j(b,"setFloatProperty",function(a,b){if(!(null==a||0==a.length))if("_"==a.charAt(0))this.g.setF(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,
c,""+b);break;case 603979776:this.setBooleanPropertyTok(a,c,0!=b);break;case 553648128:this.setIntPropertyTok(a,c,D(b));break;case 570425344:if(Float.isNaN(b))break;default:this.setFloatPropertyTok(a,c,b)}}},"~S,~N");c(b,"setFloatPropertyTok",function(a,b,c){switch(b){case 570425347:this.g.cartoonBlockHeight=c;break;case 570425366:this.ms.setModulation(null,!1,null,!1);this.g.modulationScale=c=Math.max(0.1,c);this.ms.setModulation(null,!0,null,!1);break;case 570425381:this.g.particleRadius=Math.abs(c);
break;case 570425355:this.g.drawFontSize=c;this.shm.setShapePropertyBs(22,"font",null,null);break;case 570425357:this.g.exportScale=c;break;case 570425403:this.g.starWidth=c;break;case 570425369:this.g.multipleBondRadiusFactor=c;break;case 570425370:this.g.multipleBondSpacing=c;break;case 570425393:this.tm.setSlabRange(c);break;case 570425365:this.g.minimizationCriterion=c;break;case 570425358:this.haveDisplay&&this.acm.setGestureSwipeFactor(c);break;case 570425367:this.haveDisplay&&this.acm.setMouseDragFactor(c);
break;case 570425368:this.haveDisplay&&this.acm.setMouseWheelFactor(c);break;case 570425408:this.g.strutLengthMaximum=c;break;case 570425406:this.g.strutDefaultRadius=c;break;case 570425376:this.setSpin("X",D(c));break;case 570425378:this.setSpin("Y",D(c));break;case 570425380:this.setSpin("Z",D(c));break;case 570425371:if(Float.isNaN(c))return;this.setSpin("FPS",D(c));break;case 570425363:this.g.loadAtomDataTolerance=c;break;case 570425359:this.g.hbondsAngleMinimum=c;break;case 570425361:this.g.hbondHXDistanceMaximum=
c;break;case 570425360:this.g.hbondNODistanceMaximum=c;break;case 570425382:this.g.pointGroupDistanceTolerance=c;break;case 570425384:this.g.pointGroupLinearTolerance=c;break;case 570425356:this.g.ellipsoidAxisDiameter=c;break;case 570425398:this.setSpin("x",D(c));break;case 570425400:this.setSpin("y",D(c));break;case 570425402:this.setSpin("z",D(c));break;case 570425396:this.setSpin("fps",D(c));break;case 570425352:this.g.defaultDrawArrowScale=c;break;case 570425353:this.g.defaultTranslucent=c;break;
case 570425345:this.setAxesScale(b,c);break;case 570425346:this.setAxesScale(b,c);break;case 570425416:this.tm.visualRangeAngstroms=c;this.refresh(1,"set visualRange");break;case 570425372:this.setNavigationDepthPercent(c);break;case 570425374:this.g.navigationSpeed=c;break;case 570425373:this.tm.setNavigationSlabOffsetPercent(c);break;case 570425350:this.tm.setCameraDepthPercent(c,!1);this.refresh(1,"set cameraDepth");return;case 570425388:this.setRotationRadius(c,!0);return;case 570425362:this.g.hoverDelayMs=
D(1E3*c);break;case 570425392:this.g.sheetSmoothing=c;break;case 570425354:c=JV.Viewer.checkFloatRange(c,-10,10);this.g.dipoleScale=c;break;case 570425404:this.tm.setStereoDegrees(c);break;case 1648361473:this.setVectorScale(c);return;case 570425412:this.setVibrationPeriod(c);return;case 570425414:this.setVibrationScale(c);return;case 570425348:this.setBondTolerance(c);return;case 570425364:this.setMinBondDistance(c);return;case 570425390:this.tm.setScaleAngstromsPerInch(c);break;case 570425394:c=
JV.Viewer.checkFloatRange(c,0,10);this.g.solventProbeRadius=c;break;default:if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.newF(c));return}}this.g.setF(a,c)},"~S,~N,~N");j(b,"setIntProperty",function(a,b){if(!(-2147483648==b||null==a||0==a.length))if("_"==a.charAt(0))this.g.setI(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,""+b);break;case 603979776:this.setBooleanPropertyTok(a,
c,0!=b);break;case 570425344:this.setFloatPropertyTok(a,c,b);break;default:this.setIntPropertyTok(a,c,b)}}},"~S,~N");c(b,"setIntPropertyTok",function(a,b,c){switch(b){case 553648159:this.g.occupancyThreshold=c;break;case 553648150:this.g.minimizationReportSteps=Math.min(Math.max(c,1),20);break;case 553648184:this.stm.setUndoMax(c);break;case 553648147:this.g.labelPointerWidth=c;break;case 553648152:this.g.minimizationMaxAtoms=c;break;case 553648145:this.g.infoFontSize=Math.max(0,c);break;case 553648167:case 553648144:case 553648168:c=
this.eval.setStatic(b,c);break;case 553648185:this.g.vectorTrail=c;break;case 553648136:c=0==c?0:1;this.g.bondingVersion=JU.Elements.bondingVersion=c;break;case 553648135:this.gdata.setCelPower(c);break;case 553648129:this.gdata.setAmbientOcclusion(c);break;case 553648158:this.g.platformSpeed=Math.min(Math.max(c,0),10);break;case 553648149:this.g.meshScale=c;break;case 553648153:this.g.minPixelSelRadius=c;break;case 553648146:this.g.isosurfacePropertySmoothingPower=c;break;case 553648165:this.g.repaintWaitMs=
c;break;case 553648170:this.g.smallMoleculeMaxAtoms=c;break;case 553648151:this.g.minimizationSteps=c;break;case 553648183:this.g.strutSpacing=c;break;case 553648156:c=JV.Viewer.checkIntRange(c,0,1E3);this.gdata.setPhongExponent(c);break;case 553648142:this.g.helixStep=c;this.ms.haveStraightness=!1;break;case 553648140:this.g.dotScale=c;break;case 553648139:this.g.dotDensity=c;break;case 553648137:this.g.delayMaximumMs=c;break;case 553648148:JU.Logger.setLogLevel(c);JU.Logger.info("logging level set to "+
c);this.g.setI("logLevel",c);null!=this.eval&&this.eval.setDebugging();return;case 553648133:this.setAxesMode(2==c?603979808:1==c?603979804:603979809);return;case 553648178:this.setStrandCount(0,c);return;case 553648182:this.setStrandCount(12,c);return;case 553648180:this.setStrandCount(13,c);return;case 553648155:return;case 536870922:this.g.scriptDelay=c;break;case 553648176:c=0>c?JV.Viewer.checkIntRange(c,-10,-1):JV.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPower(c);break;case 553648172:c=
JV.Viewer.checkIntRange(-c,-10,-1);this.gdata.setSpecularPower(c);break;case 553648134:this.setMarBond(c);return;case 536870924:this.setBooleanPropertyTok(a,b,1==c);return;case 553648174:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPercent(c);break;case 553648138:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setDiffusePercent(c);break;case 553648130:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setAmbientPercent(c);break;case 553648186:this.tm.zDepthToPercent(c);break;case 553648188:this.tm.zSlabToPercent(c);
break;case 554176526:this.tm.depthToPercent(c);break;case 554176565:this.tm.slabToPercent(c);break;case 553648190:this.g.zShadePower=c=Math.max(c,0);break;case 553648166:this.g.ribbonAspectRatio=c;break;case 553648157:this.g.pickingSpinRate=1>c?1:c;break;case 553648132:this.setAnimationFps(c);return;case 553648154:this.setPercentVdwAtom(c);break;case 553648143:this.g.hermiteLevel=c;break;case 553648141:case 553648161:case 553648160:case 553648162:case 553648164:break;default:if(!this.g.htNonbooleanParameterValues.containsKey(a)){this.g.setUserVariable(a,
JS.SV.newI(c));return}}this.g.setI(a,c)},"~S,~N,~N");b.checkIntRange=c(b,"checkIntRange",function(a,b,c){return a<b?b:a>c?c:a},"~N,~N,~N");b.checkFloatRange=c(b,"checkFloatRange",function(a,b,c){return a<b?b:a>c?c:a},"~N,~N,~N");j(b,"setBooleanProperty",function(a,b){if(!(null==a||0==a.length))if("_"==a.charAt(0))this.g.setB(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,"");break;case 553648128:this.setIntPropertyTok(a,c,b?1:0);break;
case 570425344:this.setFloatPropertyTok(a,c,b?1:0);break;default:this.setBooleanPropertyTok(a,c,b)}}},"~S,~B");c(b,"setBooleanPropertyTok",function(a,b,c){var e=!0;switch(b){case 603979882:this.g.mode2d=c;break;case 603979870:if(this.g.labelKey=c)this.g.elementKey=!1;this.getModelkit(!1).setProperty("setlabelkey",Boolean.$valueOf(c));break;case 603979838:if(this.g.elementKey=c)this.g.labelKey=!1;this.getModelkit(!1).setProperty("setelementkey",Boolean.$valueOf(c));break;case 603979956:this.g.symmetryHermannMauguin=
c;break;case 603979831:c=(new Boolean(c&JV.Viewer.isJS)).valueOf();this.g.doublePrecision=c;JV.Viewer.isHighPrecision=this.g.doublePrecision;this.setBooleanPropertyTok("legacyJavaFloat",603979874,c);break;case 603979821:(this.g.checkCIR=c)&&this.checkCIR(!0);break;case 603979823:this.g.cipRule6Full=c;break;case 603979802:this.g.autoplayMovie=c;break;case 603979797:c=!1;this.g.allowAudio=c;break;case 603979892:this.g.noDelay=c;break;case 603979891:this.g.nboCharges=c;break;case 603979856:this.g.hiddenLinesDashed=
c;break;case 603979886:this.g.multipleBondBananas=c;break;case 603979884:this.g.modulateOccupancy=c;break;case 603979874:if(c||!this.g.doublePrecision)this.g.legacyJavaFloat=c;c=this.g.legacyJavaFloat;break;case 603979927:this.g.showModVecs=c;break;case 603979937:this.g.showUnitCellDetails=c;break;case 603979849:e=!1;break;case 603979972:this.g.vectorsCentered=c;break;case 603979810:this.g.cartoonBlocks=c;break;case 603979811:this.g.cartoonSteps=c;break;case 603979818:this.g.cartoonRibose=c;break;
case 603979840:this.g.ellipsoidArrows=c;break;case 1111490588:this.g.translucent=c;break;case 603979817:this.g.cartoonLadders=c;break;case 603979968:b=this.g.twistedSheets;this.g.twistedSheets=c;b!=c&&this.checkCoordinatesChanged(null);break;case 603979820:this.gdata.setCel(c);break;case 603979816:this.g.cartoonFancy=c;break;case 603979934:this.g.showTiming=c;break;case 603979973:this.g.vectorSymmetry=c;break;case 603979866:this.g.isosurfaceKey=c;break;case 603979893:this.g.partialDots=c;break;case 603979872:this.g.legacyAutoBonding=
c;break;case 603979826:this.g.defaultStructureDSSP=c;break;case 603979835:this.g.dsspCalcHydrogen=c;break;case 603979782:(this.g.allowModelkit=c)||this.setModelKitMode(!1);break;case 603983903:this.setModelKitMode(c);break;case 603979887:this.g.multiProcessor=c&&1<JV.Viewer.nProcessors;break;case 603979885:this.g.monitorEnergy=c;break;case 603979853:this.g.hbondsRasmol=c;break;case 603979880:this.g.minimizationRefresh=c;break;case 603979881:this.g.minimizationSilent=c;break;case 603979865:c&&(this.$isKiosk=
!0,this.g.disablePopupMenu=!0,null!=this.display&&this.apiPlatform.setTransparentCursor(this.display));break;case 603979975:this.g.waitForMoveTo=c;break;case 603979875:this.g.logCommands=!0;break;case 603979876:this.g.logGestures=!0;break;case 603979784:this.g.allowMultiTouch=c;break;case 603979898:this.g.preserveState=c;this.ms.setPreserveState(c);this.undoMoveAction(4165,-2);break;case 603979955:this.g.strutsMultiple=c;break;case 603979845:break;case 603979939:this.g.slabByAtom=c;break;case 603979940:this.g.slabByMolecule=
c;break;case 603979903:this.g.saveProteinStructureState=c;break;case 603979780:this.g.allowGestures=c;break;case 603979864:this.g.imageState=c;break;case 603979970:this.g.useMinimizationThread=c;break;case 603979781:this.g.allowKeyStrokes=c;break;case 603979832:this.g.dragSelected=c;this.showSelected=!1;break;case 603979924:this.g.showKeyStrokes=c;break;case 603979846:this.g.fontCaching=c;break;case 603979796:this.g.atomPicking=c;break;case 603979814:this.highlight(null);this.g.bondPicking=c;break;
case 603979906:(this.g.selectAllModels=c)?this.slm.setSelectionSubset(null):this.am.setSelectAllSubset(!1);break;case 603979879:this.g.messageStyleChime=c;break;case 603979896:this.g.pdbSequential=c;break;case 603979894:this.g.pdbAddHydrogens=c;break;case 603979895:this.g.pdbGetHeader=c;break;case 603979841:this.g.ellipsoidAxes=c;break;case 603979839:this.g.ellipsoidArcs=c;break;case 603979842:this.g.ellipsoidBall=c;break;case 603979843:this.g.ellipsoidDots=c;break;case 603979844:this.g.ellipsoidFill=
c;break;case 603979847:this.g.fontScaling=c;break;case 603979957:this.setSyncTarget(0,c);break;case 603979958:this.setSyncTarget(1,c);break;case 603979977:this.g.wireframeRotation=c;break;case 603979867:this.g.isosurfacePropertySmoothing=c;break;case 603979834:this.g.drawPicking=c;break;case 603979786:case 603979790:case 603979788:this.setAntialias(b,c);break;case 603979944:this.g.smartAromatic=c;break;case 603979794:this.setApplySymmetryToBonds(c);break;case 603979792:this.g.appendNew=c;break;case 603979800:this.g.autoFps=
c;break;case 603979971:JU.DF.setUseNumberLocalization(this.g.useNumberLocalization=c);break;case 603979918:case 1611272202:a="showFrank";this.setFrankOn(c);break;case 1612709912:a="solventProbe";this.g.dotSolvent=c;break;case 603979948:this.g.dotSolvent=c;break;case 603979785:this.g.allowRotateSelected=c;break;case 603979783:this.g.allowMoveAtoms=c;this.showSelected=!1;break;case 536870922:this.setIntPropertyTok("showScript",b,c?1:0);return;case 603979778:this.g.allowEmbeddedScripts=c;break;case 603979890:this.g.navigationPeriodic=
c;break;case 603979984:this.tm.setZShadeEnabled(c);return;case 603979833:this.haveDisplay&&(this.g.drawHover=c);break;case 603979889:this.setNavigationMode(c);break;case 603979860:this.g.hideNavigationPoint=c;break;case 603979930:this.g.showNavigationPointAlways=c;break;case 603979900:this.setRefreshing(c);break;case 603979868:this.g.jmolInJSpecView=c;break;case 603979869:this.g.justifyMeasurements=c;break;case 603979952:this.g.ssbondsBackbone=c;break;case 603979852:this.g.hbondsBackbone=c;break;
case 603979854:this.g.hbondsSolid=c;break;case 536870924:this.gdata.setSpecular(c);break;case 603979942:this.tm.setSlabEnabled(c);return;case 603979980:this.tm.setZoomEnabled(c);return;case 603979863:this.g.highResolutionFlag=c;break;case 603979966:this.g.traceAlpha=c;break;case 603979983:this.g.zoomLarge=c;this.tm.setZoomHeight(this.g.zoomHeight,c);break;case 603979982:this.g.zoomHeight=c;this.tm.setZoomHeight(c,this.g.zoomLarge);break;case 603979871:J.i18n.GT.setDoTranslate(c);break;case 603979862:this.slm.setHideNotSelected(c);
break;case 603979904:this.setScriptQueue(c);break;case 603979830:this.g.dotSurface=c;break;case 603979829:this.g.dotsSelectedOnly=c;break;case 1611141172:this.setSelectionHalosEnabled(c);break;case 603979910:this.g.rasmolHydrogenSetting=c;break;case 603979908:this.g.rasmolHeteroSetting=c;break;case 603979928:this.g.showMultipleBonds=c;break;case 603979920:this.g.showHiddenSelectionHalos=c;break;case 603979976:this.tm.setWindowCentered(c);break;case 603979828:this.g.displayCellParameters=c;break;case 603979960:this.g.testFlag1=
c;break;case 603979962:this.g.testFlag2=c;break;case 603979964:this.g.testFlag3=c;break;case 603979965:this.jmolTest();this.g.testFlag4=c;break;case 603979901:this.g.ribbonBorder=c;break;case 603979815:this.g.cartoonBaseEdges=c;break;case 603979819:this.g.cartoonRockets=c;break;case 603979902:this.g.rocketBarrels=c;break;case 603979850:this.gdata.setGreyscaleMode(this.g.greyscaleRendering=c);break;case 603979878:this.g.measurementLabels=c;break;case 603979809:case 603979804:case 603979808:this.setAxesMode(b);
return;case 603979806:this.setAxesOrientationRasmol(c);return;case 603979824:this.setStringPropertyTok("defaultcolorscheme",545259545,c?"rasmol":"jmol");return;case 603979825:this.setDebugScript(c);return;case 603979897:this.setPerspectiveDepth(c);return;case 603979798:this.setAutoBond(c);return;case 603979914:this.setShowAxes(c);return;case 603979916:this.setShowBbcage(c);return;case 603979922:this.setShowHydrogens(c);return;case 603979926:this.setShowMeasurements(c);return;case 603979936:this.setShowUnitCell(c);
return;case 603979812:e=!1;this.g.bondModeOr=c;break;case 603979978:e=!1;this.g.zeroBasedXyzRasmol=c;this.reset(!0);break;case 603979899:e=!1;this.g.rangeSelected=c;break;case 603979877:e=!1;this.g.measureAllModels=c;break;case 603979954:e=!1;this.sm.allowStatusReporting=c;break;case 603979822:e=!1;this.g.chainCaseSensitive=c;break;case 603979858:e=!1;this.g.hideNameInPopup=c;break;case 603979827:e=!1;this.g.disablePopupMenu=c;break;case 603979848:e=!1;this.g.forceAutoBond=c;break;default:if(!this.g.htBooleanParameterFlags.containsKey(a.toLowerCase())){this.g.setUserVariable(a,
JS.SV.getBoolean(c));return}}this.g.setB(a,c);e&&this.setTainted(!0)},"~S,~N,~B");c(b,"setModelKitMode",function(a){if(null!=this.acm&&this.allowScripting){if(a||this.g.modelKitMode)this.setPickingMode(null,a?33:1),this.setPickingMode(null,a?32:1);var b=this.g.modelKitMode!=a;this.g.modelKitMode=a;this.g.setB("modelkitmode",a);this.highlight(null);b&&this.setModelkitPropertySafely("constraint",null);a?(this.setNavigationMode(!1),this.selectAll(),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking",
"assignBond_p"),this.isApplet||this.popupMenu(10,0,"m"),b&&this.sm.setStatusModelKit(1),this.g.modelKitMode=!0,null==this.getOperativeSymmetry()&&(0==this.ms.ac?this.zap(!1,!0,!0):0<=this.am.cmi&&this.getModelUndeletedAtomsBitSet(this.am.cmi).isEmpty()&&(a=new java.util.Hashtable,a.put("appendToModelIndex",Integer.$valueOf(this.am.cmi)),this.loadDefaultModelKitModel(a)))):(this.acm.setPickingMode(-1),b?this.sm.setStatusModelKit(0):a||this.getModelkit(!1).setProperty("hidemenu",null))}},"~B");c(b,
"setSmilesString",function(a){null==a?this.g.removeParam("_smilesString"):this.g.setO("_smilesString",a)},"~S");c(b,"removeUserVariable",function(a){this.g.removeUserVariable(a);a.endsWith("callback")&&this.sm.setCallbackFunction(a,null)},"~S");c(b,"jmolTest",function(){});c(b,"showParameter",function(a,b,c){c=""+this.g.getParameterEscaped(a,c);(b||0>c.indexOf("<not defined>"))&&this.showString(a+" = "+c,!1)},"~S,~B,~N");c(b,"showString",function(a,b){!JV.Viewer.isJS&&(this.isScriptQueued()&&(!this.isSilent||
b)&&!"\x00".equals(a))&&JU.Logger.warn(a);this.scriptEcho(a)},"~S,~B");c(b,"getAllSettings",function(a){return this.getStateCreator().getAllSettings(a)},"~S");c(b,"getBindingInfo",function(a){return this.haveDisplay?this.acm.getBindingInfo(a):""},"~S");c(b,"getIsosurfacePropertySmoothing",function(a){return a?this.g.isosurfacePropertySmoothingPower:this.g.isosurfacePropertySmoothing?1:0},"~B");c(b,"setNavigationDepthPercent",function(a){this.tm.setNavigationDepthPercent(a);this.refresh(1,"set navigationDepth")},
"~N");c(b,"getShowNavigationPoint",function(){return!this.g.navigationMode?!1:this.tm.isNavigating()&&!this.g.hideNavigationPoint||this.g.showNavigationPointAlways||this.getInMotion(!0)});j(b,"setPerspectiveDepth",function(a){this.tm.setPerspectiveDepth(a)},"~B");j(b,"setAxesOrientationRasmol",function(a){this.g.setB("axesOrientationRasmol",a);this.g.axesOrientationRasmol=a;this.reset(!0)},"~B");c(b,"setAxesScale",function(a,b){b=JV.Viewer.checkFloatRange(b,-100,100);570425345==a?this.g.axesOffset=
b:this.g.axesScale=b;this.axesAreTainted=!0},"~N,~N");c(b,"setAxesMode",function(a){this.g.axesMode=a;this.axesAreTainted=!0;switch(a){case 603979808:this.g.removeParam("axesmolecular");this.g.removeParam("axeswindow");this.g.setB("axesUnitcell",!0);a=2;break;case 603979804:this.g.removeParam("axesunitcell");this.g.removeParam("axeswindow");this.g.setB("axesMolecular",!0);a=1;break;case 603979809:this.g.removeParam("axesunitcell"),this.g.removeParam("axesmolecular"),this.g.setB("axesWindow",!0),a=
0}this.g.setI("axesMode",a)},"~N");c(b,"getSelectionHalosEnabled",function(){return this.selectionHalosEnabled});c(b,"setSelectionHalosEnabled",function(a){this.selectionHalosEnabled!=a&&(this.g.setB("selectionHalos",a),this.shm.loadShape(8),this.selectionHalosEnabled=a)},"~B");c(b,"getShowSelectedOnce",function(){var a=this.showSelected;this.showSelected=!1;return a});c(b,"setStrandCount",function(a,b){b=JV.Viewer.checkIntRange(b,0,20);switch(a){case 12:this.g.strandCountForStrands=b;break;case 13:this.g.strandCountForMeshRibbon=
b;break;default:this.g.strandCountForStrands=b,this.g.strandCountForMeshRibbon=b}this.g.setI("strandCount",b);this.g.setI("strandCountForStrands",this.g.strandCountForStrands);this.g.setI("strandCountForMeshRibbon",this.g.strandCountForMeshRibbon)},"~N,~N");c(b,"getStrandCount",function(a){return 12==a?this.g.strandCountForStrands:this.g.strandCountForMeshRibbon},"~N");c(b,"setNavigationMode",function(a){this.g.navigationMode=a;this.tm.setNavigationMode(a)},"~B");j(b,"setAutoBond",function(a){this.g.setB("autobond",
a);this.g.autoBond=a},"~B");c(b,"makeConnections",function(a,b,c,e,f,h,j,m,n,p){this.clearModelDependentObjects();this.clearMinimization();return this.ms.makeConnections(a,b,c,e,f,h,j,m,n,p)},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");j(b,"rebond",function(){this.rebondState(!1)});c(b,"rebondState",function(a){this.clearModelDependentObjects();this.ms.deleteAllBonds();a=a&&this.g.legacyAutoBonding;this.ms.autoBondBs4(null,null,null,null,this.getMadBond(),a,null);this.addStateScript(a?"set legacyAutoBonding TRUE;connect;set legacyAutoBonding FALSE;":
"connect;",!1,!0)},"~B");j(b,"setPercentVdwAtom",function(a){this.g.setI("percentVdwAtom",a);this.g.percentVdwAtom=a;this.rd.value=a/100;this.rd.factorType=J.atomdata.RadiusData.EnumType.FACTOR;this.rd.vdwType=J.c.VDW.AUTO;this.shm.setShapeSizeBs(0,0,this.rd,null)},"~N");j(b,"getMadBond",function(){return 2*this.g.bondRadiusMilliAngstroms});j(b,"setShowHydrogens",function(a){this.g.setB("showHydrogens",a);this.g.showHydrogens=a},"~B");c(b,"setShowBbcage",function(a){this.setObjectMad10(32,"boundbox",
a?-4:0);this.g.setB("showBoundBox",a)},"~B");c(b,"getShowBbcage",function(){return 0!=this.getObjectMad10(4)});c(b,"setShowUnitCell",function(a){this.setObjectMad10(33,"unitcell",a?-2:0);this.g.setB("showUnitCell",a)},"~B");c(b,"getShowUnitCell",function(){return 0!=this.getObjectMad10(5)});c(b,"setShowAxes",function(a){this.setObjectMad10(34,"axes",a?-2:0);this.g.setB("showAxes",a)},"~B");c(b,"getShowAxes",function(){return 0!=this.getObjectMad10(1)});j(b,"setFrankOn",function(a){this.isPreviewOnly&&
(a=!1);this.frankOn=a;this.setObjectMad10(36,"frank",a?1:0)},"~B");c(b,"getShowFrank",function(){return this.isPreviewOnly||this.isApplet&&this.creatingImage?!1:this.isSignedApplet&&!this.isSignedAppletLocal&&!JV.Viewer.isJS||this.frankOn});j(b,"setShowMeasurements",function(a){this.g.setB("showMeasurements",a);this.g.showMeasurements=a},"~B");c(b,"setUnits",function(a,b){var c="default".equals(a);(!b||!c)&&this.g.setUnits(a);b&&this.setShapeProperty(6,"reformatDistances",a)},"~S,~B");j(b,"setRasmolDefaults",
function(){this.setDefaultsType("RasMol")});j(b,"setJmolDefaults",function(){this.setDefaultsType("Jmol")});c(b,"setDefaultsType",function(a){a.equalsIgnoreCase("RasMol")?this.stm.setRasMolDefaults():a.equalsIgnoreCase("PyMOL")?this.stm.setPyMOLDefaults():(this.stm.setJmolDefaults(),this.setIntProperty("bondingVersion",0),this.shm.setShapeSizeBs(0,0,this.rd,this.getAllAtoms()))},"~S");c(b,"setAntialias",function(a,b){var c=!1;switch(a){case 603979786:c=this.g.antialiasDisplay!=b;this.g.antialiasDisplay=
b;break;case 603979790:c=this.g.antialiasTranslucent!=b;this.g.antialiasTranslucent=b;break;case 603979788:this.g.antialiasImages=b;return}c&&(this.resizeImage(0,0,!1,!1,!0),this.refresh(3,"Viewer:setAntialias()"))},"~N,~B");c(b,"allocTempPoints",function(a){return this.tempArray.allocTempPoints(a)},"~N");c(b,"freeTempPoints",function(a){this.tempArray.freeTempPoints(a)},"~A");c(b,"allocTempScreens",function(a){return this.tempArray.allocTempScreens(a)},"~N");c(b,"freeTempScreens",function(a){this.tempArray.freeTempScreens(a)},
"~A");c(b,"allocTempEnum",function(a){return this.tempArray.allocTempEnum(a)},"~N");c(b,"freeTempEnum",function(a){this.tempArray.freeTempEnum(a)},"~A");c(b,"getFont3D",function(a,b,c){return this.gdata.getFont3DFSS(a,b,c)},"~S,~S,~N");c(b,"getAtomGroupQuaternions",function(a,b){return this.ms.getAtomGroupQuaternions(a,b,this.getQuaternionFrame())},"JU.BS,~N");c(b,"setStereoMode",function(a,b,c){this.setFloatProperty("stereoDegrees",c);this.setBooleanPropertyTok("greyscaleRendering",603979850,b.isBiColor());
if(null!=a)this.tm.setStereoMode2(a),this.am.setSplitFrame(-1,-1);else switch(this.tm.setStereoMode(b),b){case J.c.STER.REDBLUE:case J.c.STER.REDCYAN:case J.c.STER.REDGREEN:case J.c.STER.CUSTOM:this.am.setSplitFrame(-1,-1)}},"~A,J.c.STER,~N");c(b,"getChimeInfo",function(a){return this.getPropertyManager().getChimeInfo(a,this.bsA())},"~N");c(b,"getModelFileInfo",function(){return this.getPropertyManager().getModelFileInfo(this.getVisibleFramesBitSet())});c(b,"getModelFileInfoAll",function(){return this.getPropertyManager().getModelFileInfo(null)});
c(b,"showEditor",function(a){var b=this.getProperty("DATA_API","getScriptEditor",Boolean.TRUE);null!=b&&b.show(a)},"~A");c(b,"getPropertyManager",function(){null==this.pm&&(this.pm=J.api.Interface.getInterface("JV.PropertyManager",this,"prop")).setViewer(this);return this.pm});c(b,"setTainted",function(a){this.isTainted=this.axesAreTainted=a&&(this.refreshing||this.creatingImage)},"~B");c(b,"checkObjectClicked",function(a,b,c){return this.shm.checkObjectClicked(a,b,c,this.getVisibleFramesBitSet(),
this.g.drawPicking)},"~N,~N,~N");c(b,"checkObjectHovered",function(a,b){return 0<=a&&null!=this.shm&&this.shm.checkObjectHovered(a,b,this.getClickableFramesBitSet(a),this.getBondsPickable())},"~N,~N");c(b,"getClickableFramesBitSet",function(a){return this.am.splitFrame?JU.BSUtil.newAndSetBit(this.am.getSplitFrameModelIndex(a<this.screenWidth?0:1)):this.getVisibleFramesBitSet()},"~N");c(b,"checkObjectDragged",function(a,b,c,e,f){var h=0;switch(this.getPickingMode()){case 2:h=5;break;case 4:h=22}return this.shm.checkObjectDragged(a,
b,c,e,f,this.getVisibleFramesBitSet(),h)?(this.refresh(1,"checkObjectDragged"),22==h&&this.scriptEcho(this.getShapeProperty(22,"command")),!0):!1},"~N,~N,~N,~N,~N");c(b,"rotateAxisAngleAtCenter",function(a,b,c,e,f,h,j){(a=this.tm.rotateAxisAngleAtCenter(a,b,c,e,f,h,j))&&this.setSync();return a},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(b,"rotateAboutPointsInternal",function(a,b,c,e,f,h,j,m,n,p,q,r,s,v){null==a&&(a=this.eval);if(this.headless){if(h&&3.4028235E38==f)return!1;h=!1}(a=
this.tm.rotateAboutPointsInternal(a,b,c,e,f,!1,h,j,!1,m,n,p,q,r,s,v))&&this.setSync();return a},"J.api.JmolScriptEvaluator,JU.P3,JU.P3,~N,~N,~B,JU.BS,JU.V3,JU.Lst,~A,JU.M3,JU.M4,~B,~A");c(b,"startSpinningAxis",function(a,b,c){this.tm.spinOn||this.tm.navOn?(this.tm.setSpinOff(),this.tm.setNavOn(!1)):this.tm.rotateAboutPointsInternal(null,a,b,this.g.pickingSpinRate,3.4028235E38,c,!0,null,!1,null,null,null,null,null,!1,null)},"JU.T3,JU.T3,~B");c(b,"getModelDipole",function(){return this.ms.getModelDipole(this.am.cmi)});
c(b,"calculateMolecularDipole",function(a){try{return this.ms.calculateMolecularDipole(this.am.cmi,a)}catch(b){if(H(b,"JV.JmolAsyncException"))return null!=this.eval&&this.eval.loadFileResourceAsync(b.getFileName()),null;H(b,"RuntimeException");throw b;}},"JU.BS");c(b,"setDefaultLattice",function(a){Float.isNaN(a.x+a.y+a.z)||this.g.ptDefaultLattice.setT(a);this.g.setO("defaultLattice",JU.Escape.eP(a))},"JU.P3");c(b,"getDefaultLattice",function(){return this.g.ptDefaultLattice});c(b,"getModelExtract",
function(a,b,c,e){return this.getPropertyManager().getModelExtract(this.getAtomBitSet(a),b,c,e,!1)},"~O,~B,~B,~S");j(b,"getData",function(a,b){return this.getModelFileData(a,b,!0)},"~S,~S");c(b,"getModelFileData",function(a,b,c){return this.getPropertyManager().getAtomData(a,b,c)},"~S,~S,~B");c(b,"getModelCml",function(a,b,c,e){return this.getPropertyManager().getModelCml(a,b,c,e,!1)},"JU.BS,~N,~B,~B");c(b,"getPdbAtomData",function(a,b,c,e){return this.getPropertyManager().getPdbAtomData(null==a?
this.bsA():a,b,c,e,!1)},"JU.BS,JU.OC,~B,~B");c(b,"isJmolDataFrame",function(){return this.ms.isJmolDataFrame(this.am.cmi)});c(b,"getJmolDataSourceFrame",function(){return this.ms.getJmolDataSourceFrame(this.am.cmi)});c(b,"getJmolDataFrameTypeInt",function(){return this.ms.getJmolFrameTypeInt(this.am.cmi)});c(b,"setFrameTitle",function(a,b){this.ms.setFrameTitle(JU.BSUtil.newAndSetBit(a),b)},"~N,~S");c(b,"setFrameTitleObj",function(a){this.shm.loadShape(31);this.ms.setFrameTitle(this.getVisibleFramesBitSet(),
a)},"~O");c(b,"getFrameTitle",function(){return this.ms.getFrameTitle(this.am.cmi)});c(b,"setAtomProperty",function(a,b,c,e,f,h,j){1648363544==b&&this.shm.deleteVdwDependentShapes(a);this.clearMinimization();this.ms.setAtomProperty(a,b,c,e,f,h,j);switch(b){case 1086326789:this.setModelkitPropertySafely("updateatomkeys",a);case 1111492609:case 1111492610:case 1111492611:case 1111492612:case 1111492613:case 1111492614:case 1111490577:case 1111490578:case 1111490579:this.refreshMeasures(!0)}},"JU.BS,~N,~N,~N,~S,~A,~A");
c(b,"checkCoordinatesChanged",function(a){this.ms.recalculatePositionDependentQuantities(a,null);this.refreshMeasures(!0)},"JU.BS");c(b,"setAtomCoords",function(a,b,c){if(!a.isEmpty()){var e=this.ms.at[a.nextSetBit(0)],f=a.cardinality();this.sm.setStatusStructureModified(e.i,e.mi,3,"setAtomCoords",f,a);this.ms.setAtomCoords(a,b,c);this.setStatusAtomMoved(!0,a);this.sm.setStatusStructureModified(e.i,e.mi,-3,"OK",f,a)}},"JU.BS,~N,~O");c(b,"setAtomCoordsRelative",function(a,b){null==b&&(b=this.bsA());
if(!b.isEmpty()){var c=0!=a.lengthSquared(),e=this.ms.at[b.nextSetBit(0)],f=b.cardinality();c&&this.sm.setStatusStructureModified(e.i,e.mi,3,"setAtomCoords",f,b);this.ms.setAtomCoordsRelative(a,b);this.checkMinimization();c&&(this.setStatusAtomMoved(!1,b),this.sm.setStatusStructureModified(e.i,e.mi,-3,"OK",f,b))}},"JU.T3,JU.BS");c(b,"invertAtomCoord",function(a,b,c,e,f){if(0<=e){c=JU.JmolMolecule.getBranchesForInversion(this.ms.at,e,this.ms.getMoleculeBitSetForAtom(e));var h=c.cardinality();switch(h){case 0:case 1:return;
case 3:case 4:for(var j=F(h,0),m=F(h,0),n=0,p=c.nextSetBit(0);0<=p;p=c.nextSetBit(p+1),n++)j[n]=this.getBranchBitSet(p,e,!0).cardinality(),m[n]=p;for(n=0;n<h-2;n++){for(var q=-2147483648,r=0,p=0;p<h;p++)j[p]>=q&&c.get(m[p])&&(r=m[p],q=j[p]);c.clear(r)}}f&&!c.isEmpty()&&this.undoMoveActionClear(e,2,!0)}h=c.cardinality();0!=h&&(j=this.ms.at[c.nextSetBit(0)],this.sm.setStatusStructureModified(j.i,j.mi,3,"invertAtomCoords",h,c),this.ms.invertSelected(a,b,e,c),this.setStatusAtomMoved(!0,c),this.sm.setStatusStructureModified(j.i,
j.mi,-3,"OK",h,c),f&&this.setStatusAtomPicked(e,"inverted: "+JU.Escape.eBS(c),null,!1))},"JU.P3,JU.P4,JU.BS,~N,~B");c(b,"invertSelected",function(a,b,c,e){null==e&&(e=this.bsA());e.isEmpty()||(this.ms.invertSelected(a,b,c,e),this.setStatusAtomMoved(!0,e))},"JU.P3,JU.P4,~N,JU.BS");c(b,"moveAtoms",function(a,b,c,e,f,h,j,m,n){if(!j.isEmpty()){var p=this.getMotionFixedAtoms(null,null);if(!j.intersects(p)){n=n?this.getOperativeSymmetry():null;var q=null;null!=n&&(q=this.ms.saveAtomPositions());this.ms.moveAtoms(a,
b,c,e,j,f,h,m);null!=n&&this.getModelkit(!1).checkMovedAtoms(p,j,q);this.setStatusAtomMoved(!0,j)}}},"JU.M4,JU.M3,JU.M3,JU.V3,JU.P3,~B,JU.BS,~B,~B");c(b,"moveSelectedXY",function(a,b,c){this.moveSelected(a,b,-2147483648,-2147483648,-2147483648,null,null,null,!1,!1,c)},"~N,~N,~N");c(b,"moveSelected",function(a,b,c,e,f,h,j,m,n,p,q){if(0==c&&null==m||this.isJmolDataFrame())return 0;if(null==m){-2147483648==e&&null!=this.modelkit&&this.setModelkitPropertySafely("rotatebondindex",Integer.$valueOf(-2147483648));
if(-2147483648==a)return this.showSelected=!0,this.movableBitSet=this.setMovableBitSet(null,!p),this.shm.loadShape(8),this.refresh(6,"moveSelected"),0;if(2147483647==a){if(!this.showSelected)return 0;this.showSelected=!1;this.movableBitSet=null;this.refresh(6,"moveSelected");return 0}}if(this.movingSelected)return 0;this.movingSelected=!0;this.stopMinimization();if(null==m&&-2147483648!=e&&null!=this.modelkit&&null!=this.modelkit.getProperty("rotatebondindex"))this.modelkit.actionRotateBond(a,b,e,
f,0!=(q&16));else if(null==h&&(h=this.bsA()),e=h.nextSetBit(0),h=this.setMovableBitSet(h,!p),h.isEmpty())h.set(e),this.sm.setStatusStructureModified(e,this.getModelIndexForAtom(e),-3,"FAILED",1,h);else if(n){j=null==j?this.ms.getAtomSetCenter(h):j;if(null==m){this.tm.finalizeTransformParameters();m=this.g.antialiasDisplay?2:1;this.tm.transformPt3fSafe(j,this.ptScreen);n=this.getOperativeSymmetry();if(-2147483648!=c){if(null!=n)return 0;this.ptScreenNew.set(this.ptScreen.x,this.ptScreen.y,this.ptScreen.z+
c)}else this.ptScreenNew.set(this.ptScreen.x+a*m,this.ptScreen.y+b*m,this.ptScreen.z);this.tm.unTransformPoint(this.ptScreenNew,this.ptNew);m=this.ptNew;null!=n&&(m.sub(j),m.add(this.ms.at[e]),this.getModelkit(!1).cmdAssignMoveAtoms(h,e,m,null,!0,!p,!1))}Float.isNaN(m.x)||(m.sub(j),this.setAtomCoordsRelative(m,h))}else this.tm.rotateXYBy(a,b,h);this.refresh(2,"");this.movingSelected=!1;return null==h?0:h.cardinality()},"~N,~N,~N,~N,~N,JU.BS,JU.P3,JU.P3,~B,~B,~N");c(b,"warnAtom",function(a){0>a&&0>
this.atomHighlighted||(this.atomHighlighted=a,this.shm.loadShape(8),this.setShapeProperty(8,"warnAtom",0<=a?Integer.$valueOf(a):null))},"~N");c(b,"highlightBond",function(a,b,c,e){if(this.hoverEnabled){b=null;if(0<=a){var f=this.ms.bo[a];b=JU.BSUtil.newAndSetBit(f.atom2.i);b.set(f.atom1.i)}this.highlight(b);this.getModelkit(!1);this.setModelkitPropertySafely("screenxy",F(-1,[c,e]));this.setModelkitPropertySafely("bondindex",Integer.$valueOf(a));a=this.setModelkitPropertySafely("hoverlabel",Integer.$valueOf(-2-
a));null!=a&&this.hoverOnPt(c,e,a,null,null);this.refresh(3,"highlightBond")}},"~N,~N,~N,~N");c(b,"highlight",function(a){this.atomHighlighted=null!=a&&1==a.cardinality()?a.nextSetBit(0):-1;null==a?this.setCursor(0):(this.shm.loadShape(8),this.setCursor(12));this.setModelkitPropertySafely("highlight",a);this.setShapeProperty(8,"highlight",a)},"JU.BS");c(b,"refreshMeasures",function(a){this.setShapeProperty(6,"refresh",null);this.setStatusMeasuring("refreshed",-3,"",0);a&&this.stopMinimization()},
"~B");c(b,"functionXY",function(a,b,c){var e=null;if(0==a.indexOf("file:"))e=this.getFileAsString3(a.substring(5),!1,null);else if(0!=a.indexOf("data2d_"))return this.sm.functionXY(a,b,c);b=Math.abs(b);c=Math.abs(c);if(null==e){a=this.getDataObj(a,null,2);if(null!=a)return a;e=""}a=L(b,c,0);var f=L(b*c,0);JU.Parser.parseStringInfestedFloatArray(e,null,f);for(var h=e=0;e<b;e++)for(var j=0;j<c;j++)a[e][j]=f[h++];return a},"~S,~N,~N");c(b,"functionXYZ",function(a,b,c,e){var f=null;if(0==a.indexOf("file:"))f=
this.getFileAsString3(a.substring(5),!1,null);else if(0!=a.indexOf("data3d_"))return this.sm.functionXYZ(a,b,c,e);b=Math.abs(b);c=Math.abs(c);e=Math.abs(e);if(null==f){a=this.getDataObj(a,null,2);if(null!=a)return a;f=""}a=L(b,c,e,0);var h=L(b*c*e,0);JU.Parser.parseStringInfestedFloatArray(f,null,h);for(var j=f=0;f<b;f++)for(var m=0;m<c;m++)for(var n=0;n<e;n++)a[f][m][n]=h[j++];return a},"~S,~N,~N,~N");j(b,"extractMolData",function(a){if(null==a){a=this.am.cmi;if(0>a||0==this.ms.ac)return null;a=
this.getModelNumberDotted(a)}return this.getModelExtract(a,!0,!1,"V2000")},"~S");c(b,"getNMRPredict",function(a){a=a.toUpperCase();if(a.equals("H")||a.equals("1H")||a.equals(""))a="H1";else if(a.equals("C")||a.equals("13C"))a="C13";if(!a.equals("NONE")){if(!a.equals("C13")&&!a.equals("H1"))return"Type must be H1 or C13";var b=this.getModelExtract("selected",!0,!1,"V2000"),c=b.indexOf("\n");if(0>c)return null;b="Jmol "+JV.Viewer.version_date+b.substring(c);if(this.isApplet)return this.showUrl(this.g.nmrUrlFormat+
b),"opening "+this.g.nmrUrlFormat}this.syncScript("true","*",0);this.syncScript(a+"Simulate:",".",0);return"sending request to JSpecView"},"~S");c(b,"getHelp",function(a){0>this.g.helpPath.indexOf("?")?(0<a.length&&0!=a.indexOf("?")&&(a="?search="+JU.PT.rep(a," ","%20")),a+=(0==a.length?"?ver=":"&ver=")+JV.JC.majorVersion):a="&"+a;this.showUrl(this.g.helpPath+a)},"~S");c(b,"getChemicalInfo",function(a,b,c){b=b.toLowerCase();var e="/";switch(";inchi;inchikey;stdinchi;stdinchikey;name;image;drawing;names;".indexOf(";"+
b+";")){case 0:e="I";break;case 6:e="K";break;case 15:e="T";break;case 24:e="S";break;case 36:e="M";break;case 41:case 47:e="2";break;case 55:e="N"}var f=this.setLoadFormat(!1,"_"+a,e,!1);if("2"==e)return this.fm.loadImage(f,"\u0001"+a,!1),f;"/"==e&&(f=JU.PT.isOneOf(b,";alc;cdxml;cerius;charmm;cif;cml;ctx;gjf;gromacs;hyperchem;jme;maestro;mol;mol2;sybyl2;mrv;pdb;sdf;sdf3000;sln;smiles;xyz")?f+("file?format="+b):f+JU.PT.rep(b," ","%20"));f=this.getFileAsString4(f,-1,!1,!1,!1,"file");switch(e.charCodeAt(0)){case 73:case 84:0<
f.indexOf("\t")&&(f=f.substring(0,f.indexOf("\t")));break;case 75:case 77:f.startsWith("InChIKey=")&&(f=f.substring(9));0<f.indexOf("\n")&&(f=f.substring(0,f.indexOf("\n")));break;default:b.equals("jme")&&(f=this.getPropertyManager().fixJMEFormalCharges(c,f))}return f},"~S,~S,JU.BS");c(b,"addCommand",function(a){if(!this.autoExit&&this.haveDisplay&&this.getPreserveState()){if(a.startsWith("pause ")||a.equals("pause"))a="resume";this.commandHistory.addCommand(JU.PT.replaceAllCharacters(a,"\r\n\t",
" "))}},"~S");c(b,"pushState",function(){!this.autoExit&&(this.haveDisplay&&this.getPreserveState())&&this.commandHistory.pushState(this.getStateInfo())});c(b,"popState",function(){if(!this.autoExit&&this.haveDisplay&&this.getPreserveState()){var a=this.commandHistory.popState();null!=a&&this.evalStringQuiet(a)}});c(b,"removeCommand",function(){return this.commandHistory.removeCommand()});j(b,"getSetHistory",function(a){return this.commandHistory.getSetHistory(a)},"~N");c(b,"historyFind",function(a,
b){return this.commandHistory.find(a,b)},"~S,~N");c(b,"setHistory",function(a){this.commandHistory.getSetHistory(-2147483648);this.commandHistory.addCommand(this.getFileAsString4(a,-1,!1,!1,!0,null))},"~S");c(b,"getOutputChannel",function(a,b){return this.getOutputManager().getOutputChannel(a,b)},"~S,~A");j(b,"writeTextFile",function(a,b){return this.writeFile(a,b,"txt")},"~S,~S");c(b,"writeFile",function(a,b,c){var e=new java.util.Hashtable;e.put("fileName",a);e.put("type",c);e.put("string"==typeof b?
"text":"bytes",b);return this.outputToFile(e)},"~S,~O,~S");j(b,"clipImageOrPasteText",function(a){return!this.haveAccess(JV.Viewer.ACCESS.ALL)?"no":this.getOutputManager().clipImageOrPasteText(a)},"~S");j(b,"getClipboardText",function(){if(!this.haveAccess(JV.Viewer.ACCESS.ALL))return"no";try{return this.getOutputManager().getClipboardText()}catch(a){if(H(a,Error))return J.i18n.GT.$("clipboard is not accessible -- use signed applet");throw a;}});c(b,"processWriteOrCapture",function(a){return this.getOutputManager().processWriteOrCapture(a)},
"java.util.Map");c(b,"createZip",function(a,b,c){var e=this.getStateInfo(),f=c.get("data");null!=a&&c.put("fileName",a);c.put("type",b);c.put("text",e);y(f,Array)?c.put("scripts",f):y(f,"JU.Lst")&&c.put("imageData",f);return this.getOutputManager().outputToFile(c)},"~S,~S,java.util.Map");j(b,"outputToFile",function(a){return this.getOutputManager().outputToFile(a)},"java.util.Map");c(b,"setSyncTarget",function(a,b){switch(a){case 0:this.sm.syncingMouse=b;break;case 1:this.sm.syncingScripts=b;break;
case 2:this.sm.syncSend(b?"GET_GRAPHICS":"SET_GRAPHICS_OFF","*",0);Float.isNaN(this.tm.stereoDegrees)&&this.setFloatProperty("stereoDegrees",-5);b&&(this.setBooleanProperty("_syncMouse",!1),this.setBooleanProperty("_syncScript",!1));return}!this.sm.syncingScripts&&!this.sm.syncingMouse&&this.setSync()},"~N,~B");j(b,"syncScript",function(a,b,c){this.sm.syncScript(a,b,c)},"~S,~S,~N");c(b,"syncScriptErr",function(a){return this.sm.syncScriptErr(a)},"~S");j(b,"getModelIndexFromId",function(a){return this.ms.getModelIndexFromId(a)},
"~S");c(b,"setSyncDriver",function(a){this.sm.setSyncDriver(a)},"~N");c(b,"setProteinType",function(a,b){this.ms.setProteinType(null==b?this.bsA():b,a)},"J.c.STR,JU.BS");c(b,"getVanderwaalsMar",function(a){return this.defaultVdw===J.c.VDW.USER?this.userVdwMars[a]:JU.Elements.getVanderwaalsMar(a,this.defaultVdw)},"~N");c(b,"getVanderwaalsMarType",function(a,b){if(null==b)b=this.defaultVdw;else switch(b){case J.c.VDW.AUTO:case J.c.VDW.AUTO_BABEL:case J.c.VDW.AUTO_JMOL:case J.c.VDW.AUTO_RASMOL:this.defaultVdw!==
J.c.VDW.AUTO&&(b=this.defaultVdw)}b===J.c.VDW.USER&&null==this.bsUserVdws&&(b=J.c.VDW.JMOL);return b===J.c.VDW.USER?this.userVdwMars[a&127]:JU.Elements.getVanderwaalsMar(a,b)},"~N,J.c.VDW");c(b,"setVdwStr",function(a){a=J.c.VDW.getVdwType(a);null==a&&(a=J.c.VDW.AUTO);switch(a){case J.c.VDW.JMOL:case J.c.VDW.BABEL:case J.c.VDW.RASMOL:case J.c.VDW.AUTO:case J.c.VDW.USER:break;default:a=J.c.VDW.JMOL}a!==this.defaultVdw&&(a===J.c.VDW.USER&&null==this.bsUserVdws)&&this.setUserVdw(this.defaultVdw);this.defaultVdw=
a;this.g.setO("defaultVDW",a.getVdwLabel())},"~S");c(b,"setUserVdw",function(a){this.userVdwMars=F(JU.Elements.elementNumberMax,0);this.userVdws=L(JU.Elements.elementNumberMax,0);this.bsUserVdws=new JU.BS;a===J.c.VDW.USER&&(a=J.c.VDW.JMOL);for(var b=1;b<JU.Elements.elementNumberMax;b++)this.userVdwMars[b]=JU.Elements.getVanderwaalsMar(b,a),this.userVdws[b]=this.userVdwMars[b]/1E3},"J.c.VDW");c(b,"getDefaultVdwNameOrData",function(a,b,c){switch(a){case -2147483648:return this.defaultVdw.getVdwLabel();
case 2147483647:if(null==(c=this.bsUserVdws))return"";b=J.c.VDW.USER}if(null==b||b===J.c.VDW.AUTO)b=this.defaultVdw;b===J.c.VDW.USER&&null==this.bsUserVdws&&this.setUserVdw(this.defaultVdw);return this.getDataManager().getDefaultVdwNameOrData(b,c)},"~N,J.c.VDW,JU.BS");c(b,"deleteAtoms",function(a,b){var c=null==a?-1:a.nextSetBit(0);if(0>c)return 0;this.clearModelDependentObjects();var e=this.ms.at[c];if(null==e)return 0;var f=e.mi;if(b)return this.deleteModels(f,a);this.sm.setStatusStructureModified(c,
e.mi,4,"deleting atoms "+a,a.cardinality(),a);this.ms.deleteAtoms(a);e=this.slm.deleteAtoms(a);this.setTainted(!0);this.sm.setStatusStructureModified(c,f,-4,"OK",e,a);return e},"JU.BS,~B");c(b,"deleteModels",function(a,b){var c=null==b?JU.BSUtil.newAndSetBit(a):this.ms.getModelBS(b,!1);this.clearModelDependentObjects();b=this.getModelUndeletedAtomsBitSetBs(c);var e=b.cardinality(),f=this.am.cmi;this.setCurrentModelIndexClear(0,!1);this.am.setAnimationOn(!1);var h=JU.BSUtil.copy(this.slm.bsDeleted),
c=this.ms.deleteModels(c);if(null==c)return this.setCurrentModelIndexClear(f,!1),0;this.sm.setStatusStructureModified(-1,a,5,"deleting model "+this.getModelNumberDotted(a),e,b);this.slm.processDeletedModelAtoms(c);null!=this.eval&&this.eval.deleteAtomsInVariables(c);this.setAnimationRange(0,0);this.clearRepaintManager(-1);this.am.clear();this.am.initializePointers(1);this.setCurrentModelIndexClear(1<this.ms.mc?-1:0,1<this.ms.mc);this.hoverAtomIndex=-1;this.setFileLoadStatus(J.c.FIL.DELETED,null,null,
null,null,null);this.refreshMeasures(!0);null!=h&&c.andNot(h);e=JU.BSUtil.cardinalityOf(c);this.sm.setStatusStructureModified(-1,a,-5,"OK",e,c);return e},"~N,JU.BS");c(b,"deleteBonds",function(a){for(var b=this.ms.bondCount,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))(c>=b||null==this.ms.bo[c])&&a.clear(c);b=a.nextSetBit(0);0>b||(b=this.ms.bo[b].atom1.mi,this.sm.setStatusStructureModified(-1,b,2,"delete bonds "+JU.Escape.eBond(a),a.cardinality(),a),this.ms.deleteBonds(a,!1),this.sm.setStatusStructureModified(-1,
b,-2,"OK",a.cardinality(),a))},"JU.BS");c(b,"deleteModelAtoms",function(a,b,c,e){var f=e.cardinality();0!=f&&(this.sm.setStatusStructureModified(-1,a,7,"delete atoms "+JU.Escape.eBS(e),f,e),JU.BSUtil.deleteBits(this.tm.bsFrameOffsets,e),this.getDataManager().deleteModelAtoms(b,c,e),this.sm.setStatusStructureModified(-1,a,-7,"OK",f,e))},"~N,~N,~N,JU.BS");c(b,"getQuaternionFrame",function(){return this.g.quaternionFrame.charAt(2==this.g.quaternionFrame.length?1:0)});c(b,"loadImageData",function(a,b,
c,e){null==a&&null!=b&&this.scriptEcho(b);null==c?this.setBackgroundImage(null==a?null:b,a):c.startsWith("\u0001")?this.sm.showImage(c,a):c.startsWith("\x00")?null!=a&&this.setWindowDimensions(L(-1,[this.apiPlatform.getImageWidth(a),this.apiPlatform.getImageHeight(a)])):(this.shm.loadShape(31),this.setShapeProperty(31,"text",b),null!=a&&this.setShapeProperty(31,"image",a));JV.Viewer.isJS&&null!=e&&(e.mustResumeEval=!0,this.eval.resumeEval(e));return!1},"~O,~S,~S,~O");c(b,"cd",function(a){null==a?
a=".":0==a.length&&(this.setStringProperty("defaultDirectory",""),a=".");a=this.fm.getDefaultDirectory(a+(a.equals("=")?"":a.endsWith("/")?"X.spt":"/X.spt"));0<a.length&&this.setStringProperty("defaultDirectory",a);this.fm.getFilePath(a+"/",!0,!1).startsWith("file:/")&&JV.FileManager.setLocalPath(this,a,!1);return a},"~S");c(b,"setErrorMessage",function(a,b){this.errorMessageUntranslated=b;null!=a&&this.eval.stopScriptThreads();return this.errorMessage=a},"~S,~S");j(b,"getErrorMessage",function(){return this.errorMessage});
j(b,"getErrorMessageUn",function(){return null==this.errorMessageUntranslated?this.errorMessage:this.errorMessageUntranslated});c(b,"setShapeErrorState",function(a,b){this.currentShapeID=a;this.currentShapeState=b},"~N,~S");c(b,"getShapeErrorState",function(){if(0>this.currentShapeID)return"";this.shm.releaseShape(this.currentShapeID);this.clearRepaintManager(this.currentShapeID);return JV.JC.getShapeClassName(this.currentShapeID,!1)+" "+this.currentShapeState});c(b,"handleError",function(a,b){try{b&&
this.zapMsg(""+a),this.undoMoveAction(4165,-2),0==JU.Logger.getLogLevel()&&JU.Logger.setLogLevel(4),this.setCursor(0),this.setBooleanPropertyTok("refreshing",603979900,!0),this.fm.setPathForAllFiles(""),JU.Logger.error("vwr handling error condition: "+a+"  "),this.notifyError("Error","doClear="+b+"; "+a,""+a)}catch(c){try{JU.Logger.error("Could not notify error "+a+": due to "+c)}catch(e){}}},"Throwable,~B");c(b,"getFunctions",function(a){return a?JV.Viewer.staticFunctions:this.localFunctions},"~B");
c(b,"removeFunction",function(a){a=a.toLowerCase();null!=this.getFunction(a)&&(JV.Viewer.staticFunctions.remove(a),this.localFunctions.remove(a))},"~S");c(b,"getFunction",function(a){if(null==a)return null;a=(JV.Viewer.isStaticFunction(a)?JV.Viewer.staticFunctions:this.localFunctions).get(a);return null==a||null==a.geTokens()?null:a},"~S");b.isStaticFunction=c(b,"isStaticFunction",function(a){return a.startsWith("static_")},"~S");c(b,"isFunction",function(a){return(JV.Viewer.isStaticFunction(a)?JV.Viewer.staticFunctions:
this.localFunctions).containsKey(a)},"~S");c(b,"clearFunctions",function(){JV.Viewer.staticFunctions.clear();this.localFunctions.clear()});c(b,"addFunction",function(a){var b=a.getName();(JV.Viewer.isStaticFunction(b)?JV.Viewer.staticFunctions:this.localFunctions).put(b,a)},"J.api.JmolScriptFunction");c(b,"getFunctionCalls",function(a){return this.getStateCreator().getFunctionCalls(a)},"~S");c(b,"checkPrivateKey",function(a){return a==this.privateKey},"~N");c(b,"bindAction",function(a,b){this.haveDisplay&&
this.acm.bind(a,b)},"~S,~S");c(b,"unBindAction",function(a,b){this.haveDisplay&&this.acm.unbindAction(a,b)},"~S,~S");c(b,"calculateStruts",function(a,b){return this.ms.calculateStruts(null==a?this.bsA():a,null==b?this.bsA():b)},"JU.BS,JU.BS");c(b,"getPreserveState",function(){return this.g.preserveState&&null!=this.scm});c(b,"isKiosk",function(){return this.$isKiosk});c(b,"hasFocus",function(){return this.haveDisplay&&(this.$isKiosk||this.apiPlatform.hasFocus(this.display))});c(b,"setFocus",function(){this.haveDisplay&&
!this.apiPlatform.hasFocus(this.display)&&this.apiPlatform.requestFocusInWindow(this.display)});c(b,"stopMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("stop",null)});c(b,"clearMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("clear",null)});c(b,"getMinimizationInfo",function(){return null==this.minimizer?"":this.minimizer.getProperty("log",0)});c(b,"checkMinimization",function(){this.refreshMeasures(!0);if(this.g.monitorEnergy){try{this.minimize(null,
0,0,this.getFrameAtoms(),null,null,0,1)}catch(a){if(!H(a,Exception))throw a;}this.echoMessage(this.getP("_minimizationForceField")+" Energy = "+this.getP("_minimizationEnergy"))}});c(b,"minimize",function(a,b,c,e,f,h,j,m){var n=null!=e;n&&(m|=2);var p=0!=(m&16),q=0!=(m&256),r=0!=(m&1),s=0!=(m&8),v=0!=(m&64),w=v||0!=(m&32),x=null!=f;this.isModelKitOpen()&&this.setModelkitPropertySafely("constraint",null);null==h&&(h=this.getFrameAtoms());!s&&(!p&&n&&!x&&!w)&&(x=JU.BSUtil.copy(h),f=JU.BSUtil.copy(x),
f.andNot(e),e=x,x=!0);n?s||e.and(h):(e=this.getThisModelAtoms(),w&&e.and(this.bsA()));if(!e.isEmpty())if(n=q||!w?JU.BSUtil.copy(this.ms.am[this.ms.at[e.nextSetBit(0)].mi].bsAsymmetricUnit):null,q&&null==n)this.scriptStatusMsg("MODELKIT MINIMIZE is only applicable to crystal structures.","minimization: not a crystal structure");else try{if(q)this.getModelkit(!1).cmdMinimize(a,n,b,c,j,m);else{var y=null==n?this.g.forceField:"UFF";this.getModelForAtomIndex(e.nextSetBit(0)).auxiliaryInfo.put("dimension",
"3D");s&&(h=e);var z=JU.BSUtil.copy(x?f:this.slm.getMotionFixedAtoms()),A=!z.isEmpty();A&&e.andNot(z);var B=null!=n&&q?this.getThisModelAtoms():w||!A?new JU.BS:this.ms.getAtomsWithinRadius(0>=j?5:j,e,!0,null,null);B.andNot(e);A?z.and(B):z=B;z.and(h);m|=(A?4:0)|(this.getBooleanProperty("minimizationSilent")?1:0);if(!s||!this.getBoolean(603979962)){if(s)try{r||JU.Logger.info("Minimizing "+e.cardinality()+" atoms"),this.getMinimizer(!0).minimize(b,c,e,z,null,m,"UFF")}catch(D){if(H(D,Exception))JU.Logger.error("Minimization error: "+
D.toString()),D.printStackTrace();else throw D;}if(p){var F=this.addHydrogens(e,m);s||e.or(F)}var I=e.cardinality();if(y.equals("MMFF")&&I>this.g.minimizationMaxAtoms)this.scriptStatusMsg("Too many atoms for minimization ("+I+">"+this.g.minimizationMaxAtoms+"); use 'set minimizationMaxAtoms' to increase this limit","minimization: too many atoms");else if(v&&(z.or(this.ms.getConnectingAtoms(e,z)),e.andNot(z)),r||JU.Logger.info("Minimizing "+e.cardinality()+" atoms"),this.getMinimizer(!0).minimize(b,
c,e,z,n,m,s?"MMFF":y),s){this.g.forceField="MMFF";this.setHydrogens(e);var K=this.getMinimizer(!1).getForceFieldUsed();null!=K&&this.showString("Minimized by Jmol using "+K,!1)}}}}catch(L){if(H(L,"JV.JmolAsyncException"))null!=a&&a.loadFileResourceAsync(L.getFileName());else if(H(L,Exception))a=L,JU.Logger.error("Minimization error: "+a.toString()),a.printStackTrace();else throw L;}},"J.api.JmolScriptEvaluator,~N,~N,JU.BS,JU.BS,JU.BS,~N,~N");c(b,"setHydrogens",function(a){for(var b=F(1,0),b=this.ms.calculateHydrogens(a,
b,null,2056),c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=b[c];if(!(null==e||0==e.length))for(var f=this.ms.at[c],h=f.bonds,j=0,m=0,n=f.getBondCount();j<n;j++){var p=h[j].getOtherAtom(f);if(1==p.getAtomicAndIsotopeNumber()){var q=e[m++];null!=q&&this.ms.setAtomCoord(p.i,q.x,q.y,q.z)}}}this.ms.resetMolecules()},"JU.BS");c(b,"setMotionFixedAtoms",function(a){this.slm.setMotionFixedAtoms(a)},"JU.BS");c(b,"setMotionFixed",function(a){this.slm.setMotionFixedAtoms(a)},"JU.BS");c(b,"getMotionFixedAtoms",
function(a,b){if(0>this.am.cmi)return new JU.BS;null==b&&(b=new JU.BS);b.or(this.slm.getMotionFixedAtoms());b.and(this.getThisModelAtoms());null==a&&(a=this.getOperativeSymmetry());null!=a&&null!=this.getModelkit(!1)&&this.modelkit.addLockedAtoms(a,b);return b},"J.api.SymmetryInterface,JU.BS");c(b,"getAtomicPropertyState",function(a,b,c,e,f){this.getStateCreator().getAtomicPropertyStateBuffer(a,b,c,e,f)},"JU.SB,~N,JU.BS,~S,~A");c(b,"getCenterAndPoints",function(a,b){return this.ms.getCenterAndPoints(a,
b)},"JU.Lst,~B");c(b,"writeFileData",function(a,b,c,e){return this.getOutputManager().writeFileData(a,b,c,e)},"~S,~S,~N,~A");c(b,"getPdbData",function(a,b,c,e,f,h){return this.getPropertyManager().getPdbData(a,b,null==c?this.bsA():c,e,f,h)},"~N,~S,JU.BS,~A,JU.OC,~B");c(b,"getGroupsWithin",function(a,b){return this.ms.getGroupsWithin(a,b)},"~N,JU.BS");c(b,"setShapeSize",function(a,b,c){null==c&&(c=this.bsA());this.shm.setShapeSizeBs(a,b,null,c)},"~N,~N,JU.BS");c(b,"setShapeProperty",function(a,b,c){0<=
a&&this.shm.setShapePropertyBs(a,b,c,null)},"~N,~S,~O");c(b,"getShapeProperty",function(a,b){return this.shm.getShapePropertyIndex(a,b,-2147483648)},"~N,~S");c(b,"getShapePropertyAsInt",function(a,b){var c=this.getShapeProperty(a,b);return null==c||!y(c,Integer)?-2147483648:c.intValue()},"~N,~S");c(b,"setModelVisibility",function(){null!=this.shm&&this.shm.setModelVisibility(null)});c(b,"resetShapes",function(a){this.shm.resetShapes(!a);a&&(this.shm.loadDefaultShapes(this.ms),this.clearRepaintManager(-1))},
"~B");c(b,"setParallel",function(a){return this.$isParallel=this.g.multiProcessor&&a},"~B");c(b,"isParallel",function(){return this.g.multiProcessor&&this.$isParallel});c(b,"undoMoveAction",function(a,b){return this.g.preserveState?this.getStateCreator().undoMoveAction(a,b):0},"~N,~N");c(b,"undoMoveActionClear",function(a,b,c){this.g.preserveState&&null==this.getOperativeSymmetry()&&this.getStateCreator().undoMoveActionClear(a,b,c)},"~N,~N,~B");c(b,"moveAtomWithHydrogens",function(a,b,c,e,f,h){this.stopMinimization();
var j=null!=f&&0==b,m=this.ms.at[a];null==h&&(h=JU.BSUtil.newAndSetBit(a),(null==this.getOperativeSymmetry()||this.isModelKitOpen()&&!this.modelkit.hasConstraint(a,!0,!1))&&!j&&this.ms.addConnectedHAtoms(m,h));return this.moveSelected(b,c,e,-2147483648,-2147483648,h,m,f,!0,!0,0)},"~N,~N,~N,~N,JU.P3,JU.BS");c(b,"isModelPDB",function(a){return this.ms.am[a].isBioModel},"~N");j(b,"deleteMeasurement",function(a){this.setShapeProperty(6,"delete",Integer.$valueOf(a))},"~N");j(b,"getSmiles",function(a){return this.getSmilesOpt(a,
-1,-1,16|(null==a&&JU.Logger.debugging?131072:0),null)},"JU.BS");j(b,"getOpenSmiles",function(a){return this.getSmilesOpt(a,-1,-1,5|(null==a&&JU.Logger.debugging?131072:0),"/open///")},"JU.BS");c(b,"getBioSmiles",function(a){return this.getSmilesOpt(a,-1,-1,24117248|(JU.Logger.debugging?131072:0),null)},"JU.BS");c(b,"getSmilesOpt",function(a,b,c,e,f){var h=17825792==(e&17825792)?JV.Viewer.getJmolVersion()+" "+this.getModelName(this.am.cmi):f,j=this.ms.at;null==a&&(0>b||0>c?a=this.bsA():(1048576==
(e&1048576)&&(b>c&&(a=b,b=c,c=a),b=j[b].group.firstAtomIndex,c=j[c].group.lastAtomIndex),a=new JU.BS,a.setBits(b,c+1)));e|=this.isModel2D(a)?134217728:0;b=this.getSmilesMatcher();return JV.JC.isSmilesCanonical(f)?(e=b.getSmiles(j,this.ms.ac,a,"/noAromatic/",e),this.getChemicalInfo(e,"smiles",null).trim()):b.getSmiles(j,this.ms.ac,a,h,e)},"JU.BS,~N,~N,~N,~S");c(b,"isModel2D",function(a){a=this.getModelForAtomIndex(a.nextSetBit(0));return null!=a&&"2D".equals(a.auxiliaryInfo.get("dimension"))},"JU.BS");
c(b,"alert",function(a){this.prompt(a,null,!0)},"~S");c(b,"prompt",function(a,b,c){try{return this.promptButtons(a,b,null,c)}catch(e){if(H(e,Exception))return null;throw e;}},"~S,~S,~B");c(b,"promptButtons",function(a,b,c,e){return this.$isKiosk?"null":this.apiPlatform.prompt(a,b,c,e)},"~S,~S,~A,~B");c(b,"dialogAsk",function(a,b){return prompt(a,b)},"~S,~S,java.util.Map");c(b,"initializeExporter",function(a){var b=a.get("type").equals("JS");if(b){if(null!=this.jsExporter3D)return this.jsExporter3D.initializeOutput(this,
this.privateKey,a),this.jsExporter3D}else{var c=a.get("fileName"),e=a.get("fullPath"),c=this.getOutputChannel(c,e);if(null==c)return null;a.put("outputChannel",c)}c=J.api.Interface.getOption("export.Export3D",this,"export");if(null==c)return null;a=c.initializeExporter(this,this.privateKey,this.gdata,a);b&&null!=a&&(this.jsExporter3D=c);return null==a?null:c},"java.util.Map");c(b,"getMouseEnabled",function(){return this.refreshing&&!this.creatingImage});j(b,"calcAtomsMinMax",function(a,b){this.ms.calcAtomsMinMax(a,
b)},"JU.BS,JU.BoxInfo");c(b,"getObjectMap",function(a,b){switch(b.charCodeAt(0)){case 123:null!=this.getScriptManager()&&(null!=this.definedAtomSets&&a.putAll(this.definedAtomSets),JS.T.getTokensType(a,2097152));break;case 36:case 48:this.shm.getObjectMap(a,"$"==b)}},"java.util.Map,~S");c(b,"setPicked",function(a,b){var c=null,e=null;0<=a&&(b&&this.setPicked(-1,!1),this.g.setI("_atompicked",a),c=this.g.getParam("picked",!0),e=this.g.getParam("pickedList",!0));if(null==c||10!=c.tok)c=JS.SV.newV(10,
new JU.BS),e=JS.SV.getVariableList(new JU.Lst),this.g.setUserVariable("picked",c),this.g.setUserVariable("pickedList",e);0>a||(JS.SV.getBitSet(c,!1).set(a),c=e.pushPop(null,null),10==c.tok&&e.pushPop(null,c),(10!=c.tok||!c.value.get(a))&&e.pushPop(null,JS.SV.newV(10,JU.BSUtil.newAndSetBit(a))))},"~N,~B");j(b,"runScript",function(a){return""+this.evaluateExpression(x(-1,[x(-1,[JS.T.tokenScript,JS.T.tokenLeftParen,JS.SV.newS(a),JS.T.tokenRightParen])]))},"~S");j(b,"runScriptCautiously",function(a){var b=
new JU.SB;try{if(null==this.getScriptManager())return null;this.eval.runScriptBuffer(a,b,!1)}catch(c){if(H(c,Exception))return this.eval.getErrorMessage();throw c;}return b.toString()},"~S");c(b,"setFrameDelayMs",function(a){this.ms.setFrameDelayMs(a,this.getVisibleFramesBitSet())},"~N");c(b,"getBaseModelBitSet",function(){return this.ms.getModelAtomBitSetIncludingDeleted(this.getJDXBaseModelIndex(this.am.cmi),!0)});c(b,"clearTimeouts",function(){null!=this.timeouts&&J.thread.TimeoutThread.clear(this.timeouts)});
c(b,"setTimeout",function(a,b,c){this.haveDisplay&&(!this.headless&&!this.autoExit)&&(null==a?this.clearTimeouts():(null==this.timeouts&&(this.timeouts=new java.util.Hashtable),J.thread.TimeoutThread.setTimeout(this,this.timeouts,a,b,c)))},"~S,~N,~S");c(b,"triggerTimeout",function(a){this.haveDisplay&&null!=this.timeouts&&J.thread.TimeoutThread.trigger(this.timeouts,a)},"~S");c(b,"clearTimeout",function(a){this.setTimeout(a,0,null)},"~S");c(b,"showTimeout",function(a){return this.haveDisplay?J.thread.TimeoutThread.showTimeout(this.timeouts,
a):""},"~S");c(b,"getOrCalcPartialCharges",function(a,b){null==a&&(a=this.bsA());a=JU.BSUtil.copy(a);JU.BSUtil.andNot(a,b);JU.BSUtil.andNot(a,this.ms.bsPartialCharges);a.isEmpty()||this.calculatePartialCharges(a);return this.ms.getPartialCharges()},"JU.BS,JU.BS");c(b,"calculatePartialCharges",function(a){if(null==a||a.isEmpty())a=this.getFrameAtoms();a.isEmpty()||(JU.Logger.info("Calculating MMFF94 partial charges for "+a.cardinality()+" atoms"),this.getMinimizer(!0).calculatePartialCharges(this.ms,
a,null))},"JU.BS");c(b,"setCurrentModelID",function(a){var b=this.am.cmi;0<=b&&this.ms.setInfo(b,"modelID",a)},"~S");c(b,"cacheClear",function(){this.fm.cacheClear();this.ligandModels=this.ligandModelSet=null;this.ms.clearCache();this.cm.ce.clearCache()});c(b,"cachePut",function(a,b){JU.Logger.info("Viewer cachePut "+a);this.fm.cachePut(a,b)},"~S,~O");c(b,"cacheFileByName",function(a,b){return null==a?(this.cacheClear(),-1):this.fm.cacheFileByNameAdd(a,b)},"~S,~B");c(b,"clearThreads",function(){null!=
this.eval&&this.eval.stopScriptThreads();this.stopMinimization();this.tm.clearThreads();this.setAnimationOn(!1)});c(b,"getEvalContextAndHoldQueue",function(a){if(null==a||!JV.Viewer.isJS&&!this.testAsync)return null;a.pushContextDown("getEvalContextAndHoldQueue");a=a.getThisContext();a.setMustResume();this.queueOnHold=a.isJSThread=!0;return a},"J.api.JmolScriptEvaluator");c(b,"getDefaultPropertyParam",function(a){return this.getPropertyManager().getDefaultPropertyParam(a)},"~N");c(b,"getPropertyNumber",
function(a){return this.getPropertyManager().getPropertyNumber(a)},"~S");c(b,"checkPropertyParameter",function(a){return this.getPropertyManager().checkPropertyParameter(a)},"~S");c(b,"extractProperty",function(a,b,c){return this.getPropertyManager().extractProperty(a,b,c,null,!1)},"~O,~O,~N");c(b,"addHydrogens",function(a,b){var c=1==(b&1),e=8==(b&8),f=null==a;null==a&&(a=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1));var h=new JU.BS;if(a.isEmpty())return h;var j=new JU.Lst,
f=this.getAdditionalHydrogens(a,j,b|(f?256:0)),m=!1,m=this.g.appendNew;if(0<f.length){this.clearModelDependentObjects();try{h=e&&j.get(0).mi==this.ms.mc-1?this.ms.addHydrogens(j,f):this.addHydrogensInline(a,j,f,null),this.setModelkitPropertySafely("updateatomkeys",a)}catch(n){if(H(n,Exception))System.out.println(n.toString());else throw n;}m&&(this.g.appendNew=!0)}c||this.scriptStatus(J.i18n.GT.i(J.i18n.GT.$("{0} hydrogens added"),f.length));return h},"JU.BS,~N");c(b,"addHydrogensInline",function(a,
b,c,e){return null==this.getScriptManager()?null:this.scm.addHydrogensInline(a,b,c,e)},"JU.BS,JU.Lst,~A,java.util.Map");j(b,"evalFunctionFloat",function(a,b,c){return null==this.getScriptManager()?0:this.eval.evalFunctionFloat(a,b,c)},"~O,~O,~A");c(b,"evalParallel",function(a,b){this.displayLoadErrors=!1;var c=null!=this.getScriptManager()&&this.eval.evalParallel(a,null==b?this.shm:b);this.displayLoadErrors=!0;return c},"JS.ScriptContext,JV.ShapeManager");j(b,"evaluateExpression",function(a){return null==
this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!1)},"~O");j(b,"evaluateExpressionAsVariable",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!0,!1)},"~O");c(b,"getAtomBitSet",function(a){if(y(a,"JU.BS"))return this.slm.excludeAtoms(a,!1);this.getScriptManager();return this.getAtomBitSetEval(this.eval,a)},"~O");c(b,"getScriptContext",function(a){return null==this.getScriptManager()?null:this.eval.getScriptContext(a)},"~S");c(b,"getAtomDefs",function(a){var b=
new JU.Lst,c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)y(c.getValue(),"JU.BS")&&b.addLast("{"+c.getKey()+"} <"+c.getValue().cardinality()+" atoms>\n");c=b.size();a=Array(c);b.toArray(a);java.util.Arrays.sort(a);for(var b=new JU.SB,e=0;e<c;e++)b.append(a[e]);return b.append("\n").toString()},"java.util.Map");c(b,"setCGO",function(a){this.shm.loadShape(23);this.shm.setShapePropertyBs(23,"setCGO",a,null)},"java.util.Map");c(b,"setModelSet",function(a){this.ms=this.mm.modelSet=a},
"JM.ModelSet");c(b,"setObjectProp",function(a,b){this.getScriptManager();null==a&&(a="*");return null==this.eval?null:this.eval.setObjectPropSafe(a,b)},"~S,~N");c(b,"setDihedrals",function(a,b,c){null==b&&(b=this.ms.getBsBranches(a));this.ms.setDihedrals(a,b,c)},"~A,~A,~N");c(b,"getChainID",function(a,b){var c=this.chainMap.get(a);if(null!=c)return c.intValue();var e=a.charAt(0).charCodeAt(0);if(1<a.length)e=300+this.chainList.size();else if((b||this.chainCaseSpecified)&&97<=e&&122>=e)e+=159;if(256<=
e){c=this.chainMap.get(a);if(null!=c)return c.intValue();this.chainCaseSpecified=(new Boolean(this.chainCaseSpecified|b)).valueOf();this.chainList.addLast(a)}c=Integer.$valueOf(e);this.chainMap.put(c,a);this.chainMap.put(a,c);return e},"~S,~B");c(b,"getChainIDStr",function(a){return this.chainMap.get(Integer.$valueOf(a))},"~N");c(b,"getScriptQueueInfo",function(){return null!=this.scm&&this.scm.isQueueProcessing()?Boolean.TRUE:Boolean.FALSE});c(b,"getNMRCalculation",function(){return null==this.nmrCalculation?
(this.nmrCalculation=J.api.Interface.getOption("quantum.NMRCalculation",this,"script")).setViewer(this):this.nmrCalculation});c(b,"getDistanceUnits",function(a){null==a&&(a=this.getDefaultMeasurementLabel(2));var b=a.indexOf("//");return 0>b?this.g.measureDistanceUnits:a.substring(b+2)},"~S");c(b,"calculateFormalCharges",function(a){return this.ms.fixFormalCharges(null==a?this.bsA():a)},"JU.BS");c(b,"setModulation",function(a,b,c,e){e&&this.g.setO("_modt",JU.Escape.eP(c));this.ms.setModulation(null==
a?this.getAllAtoms():a,b,c,e);this.refreshMeasures(!0)},"JU.BS,~B,JU.P3,~B");c(b,"checkInMotion",function(a){switch(a){case 0:this.setTimeout("_SET_IN_MOTION_",0,null);break;case 1:this.inMotion||this.setTimeout("_SET_IN_MOTION_",2*this.g.hoverDelayMs,"!setInMotion");break;case 2:this.setInMotion(!0),this.refresh(3,"timeoutThread set in motion")}},"~N");c(b,"checkMotionRendering",function(a){if(!this.getInMotion(!0)&&!this.tm.spinOn&&!this.tm.vibrationOn&&!this.am.animationOn)return!0;if(this.g.wireframeRotation)return!1;
var b=0;switch(a){case 1677721602:case 1153433601:b=2;break;case 1112150020:b=3;break;case 1112150021:b=4;break;case 1112152066:b=5;break;case 1073742018:b=6;break;case 1111490588:b=7;break;case 603979786:b=8}return this.g.platformSpeed>=b},"~N");c(b,"openExportChannel",function(a,b,c){return this.getOutputManager().openOutputChannel(a,b,c,!1)},"~N,~S,~B");j(b,"log",function(a){null!=a&&this.getOutputManager().logToFile(a)},"~S");c(b,"getLogFileName",function(){return null==this.logFileName?"":this.logFileName});
c(b,"getCommands",function(a,b,c){return this.getStateCreator().getCommands(a,b,c)},"java.util.Map,java.util.Map,~S");c(b,"allowCapture",function(){return!this.isApplet||this.isSignedApplet});c(b,"compileExpr",function(a){var b=null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!0);return y(b,Array)?b:x(-1,[JS.T.o(4,a)])},"~S");c(b,"checkSelect",function(a,b){return null!=this.getScriptManager()&&this.eval.checkSelect(a,b)},"java.util.Map,~A");c(b,"getAnnotationInfo",function(a,
b,c){return this.getAnnotationParser(c).getAnnotationInfo(this,a,b,c,this.am.cmi)},"JS.SV,~S,~N");c(b,"getAtomValidation",function(a,b){return this.getAnnotationParser(1073742189).getAtomValidation(this,a,b)},"~S,JM.Atom");c(b,"dragMinimizeAtom",function(a){this.stopMinimization();var b=0,c=this.getOperativeSymmetry();null!=c&&(b=256);c=0!=b?null:this.getMotionFixedAtoms(c,null).isEmpty()?this.ms.getAtoms(this.ms.isAtomPDB(a)?1086324742:1094713360,JU.BSUtil.newAndSetBit(a)):JU.BSUtil.setAll(this.ms.ac);
try{this.minimize(this.eval,2147483647,0,c,null,null,0,b)}catch(e){if(H(e,Exception)){if(this.async){var f=(S("JV.Viewer$1")?0:JV.Viewer.$Viewer$1$(),U(JV.Viewer$1,this,la("me",this,"iAtom",a)));setTimeout(function(){f.run()},100)}}else throw e;}},"~N");c(b,"getJBR",function(){return null==this.jbr?this.jbr=J.api.Interface.getInterface("JM.BioResolver",this,"file").setViewer(this):this.jbr});c(b,"checkMenuUpdate",function(){null!=this.jmolpopup&&this.jmolpopup.jpiUpdateComputedMenus()});c(b,"getChimeMessenger",
function(){return null==this.jcm?this.jcm=J.api.Interface.getInterface("JV.ChimeMessenger",this,"script").set(this):this.jcm});c(b,"getModelSetAuxiliaryInfoForAtoms",function(a){return this.ms.getModelSetAuxiliaryInfo(this.ms.getModelBS(this.getAtomBitSet(a),!1))},"~O");c(b,"getJSJSONParser",function(){return null==this.jsonParser?this.jsonParser=J.api.Interface.getInterface("JU.JSJSONParser",this,"script"):this.jsonParser});c(b,"parseJSON",function(a){return null==a?null:(a=a.trim()).startsWith("{")?
this.parseJSONMap(a):this.parseJSONArray(a)},"~S");c(b,"parseJSONMap",function(a){return this.getJSJSONParser().parseMap(a,!0)},"~S");c(b,"parseJSONArray",function(a){return this.getJSJSONParser().parse(a,!0)},"~S");c(b,"getSymTemp",function(){return J.api.Interface.getSymmetry(this,"temp")});c(b,"getSymStatic",function(){return null==this.symStatic?this.symStatic=J.api.Interface.getSymmetry(this,"static"):this.symStatic});c(b,"setWindowDimensions",function(a){this.resizeInnerPanel(D(a[0]),D(a[1]))},
"~A");c(b,"getTriangulator",function(){return null==this.triangulator?this.triangulator=J.api.Interface.getUtil("Triangulator",this,"script"):this.triangulator});c(b,"getCurrentModelAuxInfo",function(){return 0<=this.am.cmi?this.ms.getModelAuxiliaryInfo(this.am.cmi):null});c(b,"connectNBO",function(a){0>this.am.cmi||this.getNBOParser().connectNBO(this.am.cmi,a)},"~S");c(b,"getNBOParser",function(){return null==this.nboParser?this.nboParser=J.api.Interface.getInterface("J.adapter.readers.quantum.NBOParser",
this,"script").set(this):this.nboParser});c(b,"getNBOAtomLabel",function(a){return this.getNBOParser().getNBOAtomLabel(a)},"JM.Atom");c(b,"calculateChirality",function(a){null==a&&(a=this.bsA());return this.ms.calculateChiralityForAtoms(a,!0)},"JU.BS");c(b,"getSubstructureSetArray",function(a,b,c){return this.getSmilesMatcher().getSubstructureSetArray(a,this.ms.at,this.ms.ac,b,null,c)},"~O,JU.BS,~N");c(b,"getSubstructureSetArrayForNodes",function(a,b,c){return this.getSmilesMatcher().getSubstructureSetArray(a,
b,b.length,null,null,c)},"~O,~A,~N");c(b,"getSmilesAtoms",function(a){return this.getSmilesMatcher().getAtoms(a)},"~S");c(b,"calculateChiralityForSmiles",function(a){try{return J.api.Interface.getSymmetry(this,"smiles").calculateCIPChiralityForSmiles(a)}catch(b){if(H(b,Exception))return null;throw b;}},"~S");c(b,"getPdbID",function(){return this.ms.getInfo(this.am.cmi,JV.JC.getBoolName(4))===Boolean.TRUE?this.ms.getInfo(this.am.cmi,"pdbID"):null});c(b,"getModelInfo",function(a){return this.ms.getInfo(this.am.cmi,
a)},"~S");c(b,"notifyScriptEditor",function(a,b){null!=this.scriptEditor&&this.scriptEditor.notify(a,b)},"~N,~A");c(b,"sendConsoleMessage",function(a){null!=this.appConsole&&this.appConsole.sendConsoleMessage(a)},"~S");c(b,"getModelkitPropertySafely",function(a){return null==this.modelkit?null:null==a?Boolean.TRUE:this.modelkit.getProperty(a)},"~S");c(b,"setModelkitPropertySafely",function(a,b){return null==this.modelkit?null:this.modelkit.setProperty(a,b)},"~S,~O");c(b,"isModelKitOption",function(a,
b){return null!=this.modelkit&&this.modelkit.checkOption(a,b)},"~S,~S");c(b,"getSymmetryInfo",function(a,b,c,e,f,h,j,m,n,p,q,r){try{return this.getSymTemp().getSymmetryInfoAtom(this.ms,a,b,c,e,f,h,m,j,n,p,q,r)}catch(s){if(H(s,Exception))return System.out.println("Exception in Viewer.getSymmetryInfo: "+s),JV.Viewer.isJS||s.printStackTrace(),null;throw s;}},"~N,~S,~N,JU.P3,JU.P3,JU.P3,~N,~S,~N,~N,~N,~A");c(b,"getMacro",function(a){if(null==this.macros||this.macros.isEmpty())try{var b=this.getAsciiFileOrNull(this.g.macroDirectory+
"/macros.json");this.macros=this.parseJSON(b)}catch(c){if(H(c,Exception))this.macros=new java.util.Hashtable;else throw c;}if(null==a){var b=new JU.SB,e;for(a=this.macros.keySet().iterator();a.hasNext()&&((e=a.next())||1);){var f=this.macros.get(e);b.append(e).append("\t").appendO(f).append("\n")}return b.toString()}a=a.toLowerCase();return this.macros.containsKey(a)?this.macros.get(a).get("path").toString():null},"~S");c(b,"getConsoleFontScale",function(){return this.consoleFontScale});c(b,"setConsoleFontScale",
function(a){this.consoleFontScale=a},"~N");c(b,"confirm",function(a,b){return this.apiPlatform.confirm(a,b)},"~S,~S");c(b,"evalStringGUI",function(a){this.evalStringQuiet(a+"; ## GUI ##")},"~S");c(b,"selectStatus",function(a,b,c,e,f){this.select(a,b,c,e);f&&this.setStatusSelect(a)},"JU.BS,~B,~N,~B,~B");c(b,"setStatusSelect",function(a){this.hasSelected=!1;this.sm.setStatusSelect(null==a?this.bsA():a)},"JU.BS");c(b,"wasmInchiHack",function(a){(JV.Viewer.isJS&&(0<=a.indexOf("inchi")||0<=a.indexOf("INCHI"))||
0<=a.indexOf("TAUTOMER")||0<=a.indexOf("tautomer"))&&this.getInchi(null,null,null);return a},"~S");c(b,"getInchi",function(a,b,c){try{var e=this.apiPlatform.getInChI();if(null==a&&null==b)return"";if("string"==typeof b){var f=b;f.startsWith("$")||f.startsWith(":")?b=this.getFileAsString4(f,-1,!1,!1,!0,"script"):!f.startsWith("InChI=")&&0>f.indexOf(" ")&&(f=this.setLoadFormat(!1,"$"+b,"$",!1),b=this.getFileAsString4(f,-1,!1,!1,!0,"script"))}return e.getInchi(this,a,b,c)}catch(h){return""}},"JU.BS,~O,~S");
c(b,"findSpaceGroup",function(a,b,c,e,f,h,j){var m=null;if(null==b&&null==c||0!=(j&2))b=this.getThisModelAtoms();null==c?b.isEmpty()||(a=null==a?this.getOperativeSymmetry():a,m=null==a?null:a.findSpaceGroup(b,null,e,null,h,j)):(m=this.getSymTemp(),m.setSpaceGroupTo(a),m=m.findSpaceGroup(b,c,e,f,h,j));return null==m&&0!=(j&1)?"":m},"J.api.SymmetryInterface,JU.BS,~S,~A,JU.T3,~A,~N");c(b,"restrictToModel",function(a,b){null==a&&(a=this.bsA());var c=a.isEmpty();if(c&&0<=b)return a;-1==b&&(b=this.am.cmi);
if(0>b){if(c)return this.getThisModelAtoms();b=this.ms.at[a.nextSetBit(0)].getModelIndex()}c=this.getModelUndeletedAtomsBitSet(b);c.and(a);return c},"JU.BS,~N");c(b,"getThisModelAtoms",function(){return this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().nextSetBit(0))});c(b,"getSymmetryEquivPoints",function(a,b){var c=this.getCurrentUnitCell();return null==c?new JU.Lst:c.getEquivPoints(a,b,0)},"JU.Point3fi,~S");c(b,"getSymmetryEquivPointList",function(a,b){var c=this.getCurrentUnitCell();
if(null==c)return new JU.Lst;c.getEquivPointList(0,b.toLowerCase(),null,0,a,null);return a},"JU.Lst,~S");c(b,"getOperativeSymmetry",function(){var a=this.getCurrentUnitCell();return null==a||null==a.getSymmetryOperations()?null:a});c(b,"formatText",function(a){if(0>a.indexOf("@{")&&0>a.indexOf("%{"))return a;var b=a,c=0<=b.indexOf("\\");c&&(b=JU.PT.rep(b,"\\%","\u0001"),b=JU.PT.rep(b,"\\@","\u0002"),c=!b.equals(a));for(var b=JU.PT.rep(b,"%{","@{"),e;0<=(a=b.indexOf("@{"));){a++;var f=a+1;e=b.length;
for(var h=1,j="\x00",m="\x00";0<h&&++a<e;){var n=b.charAt(a);if("\x00"!=j)"\\"==m?n="\x00":n==j&&(j="\x00"),m=n;else switch(n.charCodeAt(0)){case 39:case 34:j=n;break;case 123:h++;break;case 125:h--}}if(a>=e)return b;e=b.substring(f,a);if(0==e.length)return b;e=this.evaluateExpression(e);y(e,"JU.P3")&&(e=JU.Escape.eP(e));b=b.substring(0,f-2)+e.toString()+b.substring(a+1)}c&&(b=JU.PT.rep(b,"\u0002","@"),b=JU.PT.rep(b,"\u0001","%"));return b},"~S");c(b,"getScaleText",function(a,b,c,e){a=JM.Measurement.fixUnits(0<
a.length?(a.startsWith("//")?a.substring(2):a).toLowerCase():this.g.measureDistanceUnits.equals("vdw")?"angstroms":this.g.measureDistanceUnits);0==JM.Measurement.fromUnits(1,a)&&(a=JM.Measurement.fixUnits(this.g.measureDistanceUnits));if(null==e)return a;var f=this.tm.modelRadius*this.tm.scaleDefaultPixelsPerAngstrom/this.tm.scalePixelsPerAngstrom/4,h=b?2:1,j=0,m=b=0,n=0;for(c=2*(c*this.imageFontScaling/h);b<c;)m=JM.Measurement.toUnits(f,a,!1),j=w(Math.floor(Math.log10(m))),n=Math.pow(10,j),m=JM.Measurement.fromUnits(n+
1E-6,a),b=D(m*this.tm.scalePixelsPerAngstrom/h),b<c&&(f*=10);c=0<=j?" "+D(n)+" ":" 0."+"000000000".substring(0,-1-j)+"1 ";e[0]=b;e[1]=m;return c+a},"~S,~B,~N,~A");c(b,"setStatusAtomMoved",function(a,b){a&&this.checkMinimization();this.sm.setStatusAtomMoved(b)},"~B,JU.BS");c(b,"getFormulaForAtoms",function(a,b,c){return JU.JmolMolecule.getMolecularFormulaAtoms(this.ms.at,a,"CELLFORMULA".equals(b)?this.ms.getCellWeights(a):null,c)},"JU.BS,~S,~B");c(b,"evalCallback",function(a,b,c){null!=this.getScriptManager()&&
this.scm.evalCallback(a,b,c)},"~S,~A,~B");c(b,"checkConsoleScript",function(a){return 0==a.indexOf("JSCONSOLE")?(this.html5Applet._showInfo(0>a.indexOf("CLOSE")),0<=a.indexOf("CLEAR")&&this.html5Applet._clearConsole(),!0):!1},"~S");c(b,"haveAccessInternal",function(a){if(null==a)return this.access===JV.Viewer.ACCESS.INTERNAL;if(JV.Viewer.isJS)return!0;a=a.$replace("\\","/");var b=this.access!==JV.Viewer.ACCESS.NONE&&(null==this.internalAccessPath||this.access!==JV.Viewer.ACCESS.INTERNAL||a.startsWith(this.internalAccessPath));
b||System.err.println("Viewer: Internal file access in "+this.internalAccessPath+" denied for "+a);return b},"~S");c(b,"setAccessInternal",function(a){JV.Viewer.isJS||(null==a?this.access=this.access0:this.access!==JV.Viewer.ACCESS.INTERNAL&&(this.access=JV.Viewer.ACCESS.INTERNAL),this.internalAccessPath=a)},"~S");c(b,"getItaNumberFor",function(a){a=this.getSymStatic().getSpaceGroupInfoObj("itaNumber",a,!1,!1);return null==a?-1:JU.PT.parseInt(a)},"~S");c(b,"is2D",function(){return this.getBoolean(603979882)});
c(b,"getUnitCellCenter",function(){var a=this.getCurrentUnitCell();return null==a?new JU.P3:a.getUnitCellCenter()});c(b,"setUnitCellAtomIndex",function(a){var b=this.getCurrentUnitCell();null!=b&&b.setOffsetPt(new JU.P3);this.am.setUnitCellAtomIndex(a)},"~N");c(b,"getUnitCellAtomIndex",function(){return this.am.getUnitCellAtomIndex()});c(b,"writeBinaryFile",function(a,b){var c=new java.util.Hashtable,e=new JU.Lst;e.addLast(b);c.put("imageData",e);c.put("fileName",a);c.put("type","BINARY");return this.getOutputManager().outputToFile(c)},
"~S,~A");c(b,"rotateModelSpinVectors",function(a,b){null!=this.ms.vibrations&&(0>a&&(a=this.am.cmi),0>a||a>=this.ms.mc||(null==b&&this.tm.setSpinOff(),0<=this.ms.vib.rotateModelSpinVectors(this.ms,a,b,!1)&&this.updatePointGroup(a)))},"~N,JU.M3");c(b,"updatePointGroup",function(){},"~N");c(b,"rotateSpins",function(a,b){if(null!=this.ms.vib){var c=new JU.M3;if(c.setAsBallRotation(0.017453292519943295,-b,-a)){var e=this.am.splitFrame?this.am.getSplitFrameModel():this.am.cmi;0<=this.ms.vib.rotateModelSpinVectors(this.ms,
e,c,!0)&&this.updatePointGroup(e);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateSpins "+a+" "+b:"")}}},"~N,~N");c(b,"setSelectionColors",function(a,b,c,e){this.slm.setSelectionColors(a,b,c,e)},"Integer,Integer,~S,~N");c(b,"plugin",function(a,b,c){var e=new java.util.Hashtable;e.put("service",a);e.put("action",b);e.put("options",c);this.sm.processService(e);return e},"~S,~S,~S");c(b,"isPluginAtive",function(a){return this.pluginRequest(a,"isactive",null).booleanValue()},"~S");c(b,"startPlugin",
function(a){this.plugin(a,"start",null)},"~S");c(b,"pluginRequest",function(a,b,c){return this.sm.processPluginRequest(a,b,c)},"~S,~S,~O");c(b,"getCurrentModelFile",function(a,b){null==a&&(a=this.getParameter("_modelFile"));if((""+a).equals("null")){var c=this.ms.getInlineData(this.am.cmi);return!b?c:c.startsWith(";base64,")?JU.Base64.decodeBase64(c):c.getBytes()}return b?this.fm.getFileAsBytes(a,null):this.getFileAsString(a)},"~S,~B");c(b,"movetoHome",function(a,b){this.moveTo(a,b,null,JV.JC.axisZ,
0,null,100,0,0,0,null,NaN,NaN,NaN,NaN,NaN,NaN)},"JS.ScriptEval,~N");b.$Viewer$1$=function(){var a=$(JV,"Viewer$1",null,Runnable);j(a,"run",function(){this.f$.me.dragMinimizeAtom(this.f$.iAtom)})};var a=I(JV.Viewer,"ACCESS",Enum);K(a,"NONE",0,[]);K(a,"READSPT",1,[]);K(a,"ALL",2,[]);K(a,"INTERNAL",3,[]);self.Jmol&&Jmol.extend&&Jmol.extend("vwr",JV.Viewer.prototype);b.isJS=!1;b.isSwingJS=!1;b.isJmolSwingJS=!1;b.appletDocumentBase="";b.appletCodeBase="";b.appletIdiomaBase=null;b.jsDocumentBase="";b.jmolObject=
null;b.strJavaVendor="Java: "+System.getProperty("java.vendor","j2s");b.strOSName=System.getProperty("os.name","");b.strJavaVersion="Java "+System.getProperty("java.version","");b.version_date=null;b.staticFunctions=new java.util.Hashtable;b.nProcessors=1;b.isHighPrecision=!1})}ba._coreLoaded=!0})(Clazz,Clazz.getClassName,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,
Clazz.floatToLong,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,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.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
